The areas / V34. The tactics of Mathlib
Mathlib.Tactic.NormNum.NatFactorial
9 declarations. Mathlib docs · Source
norm_num extensions for factorials
Extensions for norm_num that compute Nat.factorial, Nat.ascFactorial and Nat.descFactorial.
This is done by reducing each of these to ascFactorial, which is computed using a divide and
conquer strategy that improves performance and avoids exceeding the recursion depth.
theorem Mathlib.Meta.NormNum.asc_factorial_aux E0 #
∀ (n l m a b : ℕ), n.ascFactorial l = a → (n + l).ascFactorial m = b → n.ascFactorial (l + m) = a * b
opaque Mathlib.Meta.NormNum.proveAscFactorial E1 #
ℕ → ℕ → (en el : Q(ℕ)) → ℕ × (eresult : Q(ℕ)) × Q(«$en».ascFactorial «$el» = «$eresult»)
Calculate n.ascFactorial l and return this value along with a proof of the result.
theorem Mathlib.Meta.NormNum.isNat_factorial E1 #
∀ {n x : ℕ},
Mathlib.Meta.NormNum.IsNat n x → ∀ (a : ℕ), Nat.ascFactorial 1 x = a → Mathlib.Meta.NormNum.IsNat n.factorial a
def Mathlib.Meta.NormNum.evalNatFactorial E1 #
Mathlib.Meta.NormNum.NormNumExt
Evaluates the Nat.factorial function.
theorem Mathlib.Meta.NormNum.isNat_ascFactorial E1 #
∀ {n x l y : ℕ},
Mathlib.Meta.NormNum.IsNat n x →
Mathlib.Meta.NormNum.IsNat l y → ∀ (a : ℕ), x.ascFactorial y = a → Mathlib.Meta.NormNum.IsNat (n.ascFactorial l) a
def Mathlib.Meta.NormNum.evalNatAscFactorial E1 #
Mathlib.Meta.NormNum.NormNumExt
Evaluates the Nat.ascFactorial function.
theorem Mathlib.Meta.NormNum.isNat_descFactorial E1 #
∀ {n x l y : ℕ} (z : ℕ),
Mathlib.Meta.NormNum.IsNat n x →
Mathlib.Meta.NormNum.IsNat l y →
x = z + y → ∀ (a : ℕ), (z + 1).ascFactorial y = a → Mathlib.Meta.NormNum.IsNat (n.descFactorial l) a
theorem Mathlib.Meta.NormNum.isNat_descFactorial_zero E1 #
∀ {n x l y : ℕ} (z : ℕ),
Mathlib.Meta.NormNum.IsNat n x →
Mathlib.Meta.NormNum.IsNat l y → y = z + x + 1 → Mathlib.Meta.NormNum.IsNat (n.descFactorial l) 0
def Mathlib.Meta.NormNum.evalNatDescFactorial E1 #
Mathlib.Meta.NormNum.NormNumExt
Evaluates the Nat.descFactorial function.