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.
theorem
Mathlib.Meta.NormNum.isFibAux_two_mul
{n a b n' a' b' : ℕ}
(H : Mathlib.Meta.NormNum.IsFibAux n a b)
(hn : 2 * n = n')
(h1 : a * (2 * b - a) = a')
(h2 : a * a + b * b = b')
:
Mathlib.Meta.NormNum.IsFibAux n' a' b'
partial def
Mathlib.Meta.NormNum.proveNatFibAux
(en' : Q(ℕ))
:
(ea' : Q(ℕ)) × (eb' : Q(ℕ)) × Q(Mathlib.Meta.NormNum.IsFibAux «$en'» «$ea'» «$eb'»)
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.
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Mathlib.Meta.NormNum.isNat_fib
{x nx z : ℕ}
:
Mathlib.Meta.NormNum.IsNat x nx → Nat.fib nx = z → Mathlib.Meta.NormNum.IsNat (Nat.fib x) z
Evaluates the Nat.fib
function.
Equations
- One or more equations did not get rendered due to their size.