The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V34. The tactics of Mathlib

Mathlib.Tactic.NormNum.Prime

19 declarations. Mathlib docs · Source

theorem Mathlib.Meta.NormNum.not_prime_mul_of_ble E1 #

∀ (a b n : ℕ), a * b = n → a.ble 1 = false → b.ble 1 = false → ¬Nat.Prime n

def Mathlib.Meta.NormNum.deriveNotPrime E1 #

ℕ → ℕ → (en : Q(ℕ)) → Q(¬Nat.Prime «$en»)

Produce a proof that n is not prime from a factor 1 < d < n. en should be the expression that is the natural number literal n.

def Mathlib.Meta.NormNum.MinFacHelper E1 #

ℕ → ℕ → Prop

A predicate representing partial progress in a proof of minFac.

theorem Mathlib.Meta.NormNum.MinFacHelper.one_lt E1 #

∀ {n k : ℕ}, Mathlib.Meta.NormNum.MinFacHelper n k → 1 < n

theorem Mathlib.Meta.NormNum.minFacHelper_0 E1 #

∀ (n : ℕ), Nat.ble 2 n = true → 1 = n % 2 → Mathlib.Meta.NormNum.MinFacHelper n 3

theorem Mathlib.Meta.NormNum.minFacHelper_1 E1 #

∀ {n k k' : ℕ},
  k + 2 = k' → Mathlib.Meta.NormNum.MinFacHelper n k → n.minFac ≠ k → Mathlib.Meta.NormNum.MinFacHelper n k'

theorem Mathlib.Meta.NormNum.minFacHelper_2 E1 #

∀ {n k k' : ℕ},
  k + 2 = k' → ¬Nat.Prime k → Mathlib.Meta.NormNum.MinFacHelper n k → Mathlib.Meta.NormNum.MinFacHelper n k'

theorem Mathlib.Meta.NormNum.minFacHelper_3 E1 #

∀ {n k k' : ℕ},
  k + 2 = k' → (n % k).beq 0 = false → Mathlib.Meta.NormNum.MinFacHelper n k → Mathlib.Meta.NormNum.MinFacHelper n k'

theorem Mathlib.Meta.NormNum.isNat_minFac_1 E1 #

∀ {a : ℕ}, Mathlib.Meta.NormNum.IsNat a 1 → Mathlib.Meta.NormNum.IsNat a.minFac 1

theorem Mathlib.Meta.NormNum.isNat_minFac_2 E1 #

∀ {a a' : ℕ}, Mathlib.Meta.NormNum.IsNat a a' → a' % 2 = 0 → Mathlib.Meta.NormNum.IsNat a.minFac 2

theorem Mathlib.Meta.NormNum.isNat_minFac_3 E1 #

∀ {n n' : ℕ} (k : ℕ),
  Mathlib.Meta.NormNum.IsNat n n' →
    Mathlib.Meta.NormNum.MinFacHelper n' k → 0 = n' % k → Mathlib.Meta.NormNum.IsNat n.minFac k

theorem Mathlib.Meta.NormNum.isNat_minFac_4 E1 #

∀ {n n' k : ℕ},
  Mathlib.Meta.NormNum.IsNat n n' →
    Mathlib.Meta.NormNum.MinFacHelper n' k → (k * k).ble n' = false → Mathlib.Meta.NormNum.IsNat n.minFac n'

def Mathlib.Meta.NormNum.evalMinFac.core E1 #

(n nn : Q(ℕ)) → Q(Mathlib.Meta.NormNum.IsNat «$n» «$nn») → ℕ → Lean.MetaM (Mathlib.Meta.NormNum.Result q(«$n».minFac))

The core of the norm_num extension which normalizes expressions of the form minFac n. This is public for use in the Nat.primeFactorsList_ofNat simproc.

def Mathlib.Meta.NormNum.evalMinFac E1 #

Mathlib.Meta.NormNum.NormNumExt

The norm_num extension which identifies expressions of the form minFac n.

theorem Mathlib.Meta.NormNum.isNat_prime_0 E1 #

∀ {n : ℕ}, Mathlib.Meta.NormNum.IsNat n 0 → ¬Nat.Prime n

theorem Mathlib.Meta.NormNum.isNat_prime_1 E1 #

∀ {n : ℕ}, Mathlib.Meta.NormNum.IsNat n 1 → ¬Nat.Prime n

theorem Mathlib.Meta.NormNum.isNat_prime_2 E1 #

∀ {n n' : ℕ},
  Mathlib.Meta.NormNum.IsNat n n' → Nat.ble 2 n' = true → Mathlib.Meta.NormNum.IsNat n'.minFac n' → Nat.Prime n

theorem Mathlib.Meta.NormNum.isNat_not_prime E1 #

∀ {n n' : ℕ}, Mathlib.Meta.NormNum.IsNat n n' → ¬Nat.Prime n' → ¬Nat.Prime n

def Mathlib.Meta.NormNum.evalNatPrime E1 #

Mathlib.Meta.NormNum.NormNumExt

The norm_num extension which identifies expressions of the form Nat.Prime n.