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.PowMod

12 declarations. Mathlib docs · Source

structure Mathlib.Meta.NormNum.IsNatPowModT E1 #

Prop → ℕ → ℕ → ℕ → ℕ → Prop

Represents and proves equalities of the form a^b % m = c for natural numbers.

ctor Mathlib.Meta.NormNum.IsNatPowModT.mk E0 #

∀ {p : Prop} {a b m c : ℕ}, (p → (a.pow b).mod m = c) → Mathlib.Meta.NormNum.IsNatPowModT p a b m c

theorem Mathlib.Meta.NormNum.IsNatPowModT.run' E1 #

∀ {p : Prop} {a b m c : ℕ}, Mathlib.Meta.NormNum.IsNatPowModT p a b m c → p → (a.pow b).mod m = c

theorem Mathlib.Meta.NormNum.IsNatPowModT.run E1 #

∀ {a m : ℕ} {b c : ℕ}, Mathlib.Meta.NormNum.IsNatPowModT ((a.pow 1).mod m = a.mod m) a b m c → (a.pow b).mod m = c

theorem Mathlib.Meta.NormNum.IsNatPowModT.trans E1 #

∀ {p : Prop} {a b m c b' c' : ℕ},
  Mathlib.Meta.NormNum.IsNatPowModT p a b m c →
    Mathlib.Meta.NormNum.IsNatPowModT ((a.pow b).mod m = c) a b' m c' → Mathlib.Meta.NormNum.IsNatPowModT p a b' m c'

theorem Mathlib.Meta.NormNum.IsNatPowModT.bit0 E1 #

∀ {a b m : ℕ} {c : ℕ}, Mathlib.Meta.NormNum.IsNatPowModT ((a.pow b).mod m = c) a (2 * b) m ((c.mul c).mod m)

theorem Mathlib.Meta.NormNum.natPow_zero_natMod_zero E1 #

∀ {a : ℕ}, (a.pow 0).mod 0 = 1

theorem Mathlib.Meta.NormNum.natPow_zero_natMod_one E1 #

∀ {a : ℕ}, (a.pow 0).mod 1 = 0

theorem Mathlib.Meta.NormNum.natPow_zero_natMod_succ_succ E1 #

∀ {a : ℕ} {m : ℕ}, (a.pow 0).mod m.succ.succ = 1

theorem Mathlib.Meta.NormNum.natPow_one_natMod E1 #

∀ {a m : ℕ}, (a.pow 1).mod m = a.mod m

theorem Mathlib.Meta.NormNum.IsNatPowModT.bit1 E1 #

∀ {a b m : ℕ} {c : ℕ},
  Mathlib.Meta.NormNum.IsNatPowModT ((a.pow b).mod m = c) a (2 * b + 1) m ((c.mul ((c.mul a).mod m)).mod m)

def Mathlib.Meta.NormNum.evalNatPowMod E1 #

(a b m : Q(ℕ)) → (c : Q(ℕ)) × Q((«$a».pow «$b»).mod «$m» = «$c»)

Evaluates and proves a^b % m for natural numbers using fast modular exponentiation.