The areas / V34. The tactics of Mathlib
Mathlib.Tactic.NormNum.NatFib
11 declarations. Mathlib docs · Source
norm_num extension for Nat.fib
This norm_num extension uses a strategy parallel to that of Nat.fastFib, but it instead
produces proofs of what Nat.fib evaluates to.
def Mathlib.Meta.NormNum.IsFibAux E0 #
ℕ → ℕ → ℕ → Prop
Auxiliary definition for proveFib extension.
theorem Mathlib.Meta.NormNum.isFibAux_zero E1 #
Mathlib.Meta.NormNum.IsFibAux 0 0 1
theorem Mathlib.Meta.NormNum.isFibAux_one E1 #
Mathlib.Meta.NormNum.IsFibAux 1 1 1
theorem Mathlib.Meta.NormNum.isFibAux_two_mul E1 #
∀ {n a b n' a' b' : ℕ},
Mathlib.Meta.NormNum.IsFibAux n a b →
2 * n = n' → a * (2 * b - a) = a' → a * a + b * b = b' → Mathlib.Meta.NormNum.IsFibAux n' a' b'
theorem Mathlib.Meta.NormNum.isFibAux_two_mul_add_one E1 #
∀ {n a b n' a' b' : ℕ},
Mathlib.Meta.NormNum.IsFibAux n a b →
2 * n + 1 = n' → a * a + b * b = a' → b * (2 * a + b) = b' → Mathlib.Meta.NormNum.IsFibAux n' a' b'
opaque Mathlib.Meta.NormNum.proveNatFibAux E0 #
(en' : Q(ℕ)) → (ea' : Q(ℕ)) × (eb' : Q(ℕ)) × Q(Mathlib.Meta.NormNum.IsFibAux «$en'» «$ea'» «$eb'»)
theorem Mathlib.Meta.NormNum.isFibAux_two_mul_done E1 #
∀ {n a b n' a' : ℕ}, Mathlib.Meta.NormNum.IsFibAux n a b → 2 * n = n' → a * (2 * b - a) = a' → Nat.fib n' = a'
theorem Mathlib.Meta.NormNum.isFibAux_two_mul_add_one_done E1 #
∀ {n a b n' a' : ℕ}, Mathlib.Meta.NormNum.IsFibAux n a b → 2 * n + 1 = n' → a * a + b * b = a' → Nat.fib n' = a'
def Mathlib.Meta.NormNum.proveNatFib E1 #
(en' : Q(ℕ)) → (em : Q(ℕ)) × Q(Nat.fib «$en'» = «$em»)
Given the natural number literal ex, returns Nat.fib ex as a natural number literal
and an equality proof. Panics if ex isn't a natural number literal.
theorem Mathlib.Meta.NormNum.isNat_fib E1 #
∀ {x nx z : ℕ}, Mathlib.Meta.NormNum.IsNat x nx → Nat.fib nx = z → Mathlib.Meta.NormNum.IsNat (Nat.fib x) z
def Mathlib.Meta.NormNum.evalNatFib E1 #
Mathlib.Meta.NormNum.NormNumExt
Evaluates the Nat.fib function.