The areas / V34. The tactics of Mathlib
Mathlib.Tactic.Primality.Cert
17 declarations. Mathlib docs · Source
theorem Mathlib.Tactic.Primality.Cert.lucas.inj E1 #
∀ {root : ℕ} {factorization : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert)} {root_1 : ℕ}
{factorization_1 : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert)},
Mathlib.Tactic.Primality.Cert.lucas root factorization = Mathlib.Tactic.Primality.Cert.lucas root_1 factorization_1 →
root = root_1 ∧ factorization = factorization_1
abbrev Mathlib.Tactic.Primality.Cert.ctorElimType E1 #
{motive_1 : Mathlib.Tactic.Primality.Cert → Sort u} → ℕ → Sort (max 1 u)
abbrev Mathlib.Tactic.Primality.Cert.brecOn_2.go E1 #
{motive_1 : Mathlib.Tactic.Primality.Cert → Sort u} →
{motive_2 : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert) → Sort u} →
{motive_3 : ℕ × ℕ × Mathlib.Tactic.Primality.Cert → Sort u} →
{motive_4 : ℕ × Mathlib.Tactic.Primality.Cert → Sort u} →
(t : ℕ × ℕ × Mathlib.Tactic.Primality.Cert) →
((t : Mathlib.Tactic.Primality.Cert) → t.below → motive_1 t) →
((t : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert)) →
Mathlib.Tactic.Primality.Cert.below_1 t → motive_2 t) →
((t : ℕ × ℕ × Mathlib.Tactic.Primality.Cert) → Mathlib.Tactic.Primality.Cert.below_2 t → motive_3 t) →
((t : ℕ × Mathlib.Tactic.Primality.Cert) → Mathlib.Tactic.Primality.Cert.below_3 t → motive_4 t) →
motive_3 t ×' Mathlib.Tactic.Primality.Cert.below_2 t
theorem Mathlib.Tactic.Primality.Cert.brecOn_3.eq E1 #
∀ {motive_1 : Mathlib.Tactic.Primality.Cert → Sort u} {motive_2 : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert) → Sort u}
{motive_3 : ℕ × ℕ × Mathlib.Tactic.Primality.Cert → Sort u} {motive_4 : ℕ × Mathlib.Tactic.Primality.Cert → Sort u}
(t : ℕ × Mathlib.Tactic.Primality.Cert) (F_1 : (t : Mathlib.Tactic.Primality.Cert) → t.below → motive_1 t)
(F_2 : (t : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert)) → Mathlib.Tactic.Primality.Cert.below_1 t → motive_2 t)
(F_3 : (t : ℕ × ℕ × Mathlib.Tactic.Primality.Cert) → Mathlib.Tactic.Primality.Cert.below_2 t → motive_3 t)
(F_4 : (t : ℕ × Mathlib.Tactic.Primality.Cert) → Mathlib.Tactic.Primality.Cert.below_3 t → motive_4 t),
Mathlib.Tactic.Primality.Cert.brecOn_3 t F_1 F_2 F_3 F_4 =
F_4 t (Mathlib.Tactic.Primality.Cert.brecOn_3.go t F_1 F_2 F_3 F_4).2
theorem Mathlib.Tactic.Primality.Cert.brecOn_1.eq E1 #
∀ {motive_1 : Mathlib.Tactic.Primality.Cert → Sort u} {motive_2 : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert) → Sort u}
{motive_3 : ℕ × ℕ × Mathlib.Tactic.Primality.Cert → Sort u} {motive_4 : ℕ × Mathlib.Tactic.Primality.Cert → Sort u}
(t : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert)) (F_1 : (t : Mathlib.Tactic.Primality.Cert) → t.below → motive_1 t)
(F_2 : (t : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert)) → Mathlib.Tactic.Primality.Cert.below_1 t → motive_2 t)
(F_3 : (t : ℕ × ℕ × Mathlib.Tactic.Primality.Cert) → Mathlib.Tactic.Primality.Cert.below_2 t → motive_3 t)
(F_4 : (t : ℕ × Mathlib.Tactic.Primality.Cert) → Mathlib.Tactic.Primality.Cert.below_3 t → motive_4 t),
Mathlib.Tactic.Primality.Cert.brecOn_1 t F_1 F_2 F_3 F_4 =
F_2 t (Mathlib.Tactic.Primality.Cert.brecOn_1.go t F_1 F_2 F_3 F_4).2
theorem Mathlib.Tactic.Primality.Cert.lucas.injEq E0 #
∀ (root : ℕ) (factorization : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert)) (root_1 : ℕ)
(factorization_1 : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert)),
(Mathlib.Tactic.Primality.Cert.lucas root factorization =
Mathlib.Tactic.Primality.Cert.lucas root_1 factorization_1) =
(root = root_1 ∧ factorization = factorization_1)
abbrev Mathlib.Tactic.Primality.Cert.brecOn_3.go E1 #
{motive_1 : Mathlib.Tactic.Primality.Cert → Sort u} →
{motive_2 : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert) → Sort u} →
{motive_3 : ℕ × ℕ × Mathlib.Tactic.Primality.Cert → Sort u} →
{motive_4 : ℕ × Mathlib.Tactic.Primality.Cert → Sort u} →
(t : ℕ × Mathlib.Tactic.Primality.Cert) →
((t : Mathlib.Tactic.Primality.Cert) → t.below → motive_1 t) →
((t : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert)) →
Mathlib.Tactic.Primality.Cert.below_1 t → motive_2 t) →
((t : ℕ × ℕ × Mathlib.Tactic.Primality.Cert) → Mathlib.Tactic.Primality.Cert.below_2 t → motive_3 t) →
((t : ℕ × Mathlib.Tactic.Primality.Cert) → Mathlib.Tactic.Primality.Cert.below_3 t → motive_4 t) →
motive_4 t ×' Mathlib.Tactic.Primality.Cert.below_3 t
def Mathlib.Tactic.Primality.Cert.ctorIdx E1 #
Mathlib.Tactic.Primality.Cert → ℕ
abbrev Mathlib.Tactic.Primality.Cert.brecOn_1.go E1 #
{motive_1 : Mathlib.Tactic.Primality.Cert → Sort u} →
{motive_2 : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert) → Sort u} →
{motive_3 : ℕ × ℕ × Mathlib.Tactic.Primality.Cert → Sort u} →
{motive_4 : ℕ × Mathlib.Tactic.Primality.Cert → Sort u} →
(t : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert)) →
((t : Mathlib.Tactic.Primality.Cert) → t.below → motive_1 t) →
((t : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert)) →
Mathlib.Tactic.Primality.Cert.below_1 t → motive_2 t) →
((t : ℕ × ℕ × Mathlib.Tactic.Primality.Cert) → Mathlib.Tactic.Primality.Cert.below_2 t → motive_3 t) →
((t : ℕ × Mathlib.Tactic.Primality.Cert) → Mathlib.Tactic.Primality.Cert.below_3 t → motive_4 t) →
motive_2 t ×' Mathlib.Tactic.Primality.Cert.below_1 t
theorem Mathlib.Tactic.Primality.Cert.brecOn_2.eq E1 #
∀ {motive_1 : Mathlib.Tactic.Primality.Cert → Sort u} {motive_2 : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert) → Sort u}
{motive_3 : ℕ × ℕ × Mathlib.Tactic.Primality.Cert → Sort u} {motive_4 : ℕ × Mathlib.Tactic.Primality.Cert → Sort u}
(t : ℕ × ℕ × Mathlib.Tactic.Primality.Cert) (F_1 : (t : Mathlib.Tactic.Primality.Cert) → t.below → motive_1 t)
(F_2 : (t : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert)) → Mathlib.Tactic.Primality.Cert.below_1 t → motive_2 t)
(F_3 : (t : ℕ × ℕ × Mathlib.Tactic.Primality.Cert) → Mathlib.Tactic.Primality.Cert.below_2 t → motive_3 t)
(F_4 : (t : ℕ × Mathlib.Tactic.Primality.Cert) → Mathlib.Tactic.Primality.Cert.below_3 t → motive_4 t),
Mathlib.Tactic.Primality.Cert.brecOn_2 t F_1 F_2 F_3 F_4 =
F_3 t (Mathlib.Tactic.Primality.Cert.brecOn_2.go t F_1 F_2 F_3 F_4).2
abbrev Mathlib.Tactic.Primality.Cert.brecOn.go E1 #
{motive_1 : Mathlib.Tactic.Primality.Cert → Sort u} →
{motive_2 : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert) → Sort u} →
{motive_3 : ℕ × ℕ × Mathlib.Tactic.Primality.Cert → Sort u} →
{motive_4 : ℕ × Mathlib.Tactic.Primality.Cert → Sort u} →
(t : Mathlib.Tactic.Primality.Cert) →
((t : Mathlib.Tactic.Primality.Cert) → t.below → motive_1 t) →
((t : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert)) →
Mathlib.Tactic.Primality.Cert.below_1 t → motive_2 t) →
((t : ℕ × ℕ × Mathlib.Tactic.Primality.Cert) → Mathlib.Tactic.Primality.Cert.below_2 t → motive_3 t) →
((t : ℕ × Mathlib.Tactic.Primality.Cert) → Mathlib.Tactic.Primality.Cert.below_3 t → motive_4 t) →
motive_1 t ×' t.below
theorem Mathlib.Tactic.Primality.Cert.brecOn.eq E1 #
∀ {motive_1 : Mathlib.Tactic.Primality.Cert → Sort u} {motive_2 : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert) → Sort u}
{motive_3 : ℕ × ℕ × Mathlib.Tactic.Primality.Cert → Sort u} {motive_4 : ℕ × Mathlib.Tactic.Primality.Cert → Sort u}
(t : Mathlib.Tactic.Primality.Cert) (F_1 : (t : Mathlib.Tactic.Primality.Cert) → t.below → motive_1 t)
(F_2 : (t : List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert)) → Mathlib.Tactic.Primality.Cert.below_1 t → motive_2 t)
(F_3 : (t : ℕ × ℕ × Mathlib.Tactic.Primality.Cert) → Mathlib.Tactic.Primality.Cert.below_2 t → motive_3 t)
(F_4 : (t : ℕ × Mathlib.Tactic.Primality.Cert) → Mathlib.Tactic.Primality.Cert.below_3 t → motive_4 t),
t.brecOn F_1 F_2 F_3 F_4 = F_1 t (Mathlib.Tactic.Primality.Cert.brecOn.go t F_1 F_2 F_3 F_4).2
inductive Mathlib.Tactic.Primality.Cert E1 #
Type
A primality certificate for p (not recorded in the type).
ctor Mathlib.Tactic.Primality.Cert.normNum E0 #
Mathlib.Tactic.Primality.Cert
p is proved prime by norm_num.
ctor Mathlib.Tactic.Primality.Cert.known E0 #
Mathlib.Tactic.Primality.Cert
A proof that p is prime is provided, which should be stored in the initial state of
certifyPrime.
ctor Mathlib.Tactic.Primality.Cert.lucas E0 #
ℕ → List (ℕ × ℕ × Mathlib.Tactic.Primality.Cert) → Mathlib.Tactic.Primality.Cert
A Lucas certificate with the primitive root root and the factorization of p - 1 in
factorization, each prime factor with its exponent and certificate.
opaque Mathlib.Tactic.Primality.certifyPrime E1 #
(p : ℕ) → Mathlib.Tactic.Primality.Cert → StateT (Std.HashMap ℕ Lean.Expr) Lean.MetaM Q(Nat.Prime «$p»)
Proves Nat.Prime p from the certificate cert. Each prime is proved only once.