We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cedfaa7 commit 47f7aa7Copy full SHA for 47f7aa7
AddOperationNew.lean
@@ -1,9 +1,13 @@
1
import Mathlib
2
3
-- random math fact
4
-instance {p : ℕ} [Fact (Nat.Prime p)] : NoZeroDivisors (Fin p) := sorry
+instance {p : ℕ} [hp : Fact (Nat.Prime (p + 1))] : NoZeroDivisors (Fin (p + 1)) := by
5
+ have : IsDomain (ZMod (p + 1)) := ZMod.instIsDomain (hp := ⟨hp.1⟩)
6
+ simp [ZMod] at this
7
+ infer_instance
8
9
macro "WORD_SIZE" : term => `(2)
10
+
11
abbrev p := 2013265921
12
13
@[reducible] def Word (T : Type) := Vector T WORD_SIZE
0 commit comments