Mathlib Map

Theorems · Definition · number theory

Nat.fib

ℕ → ℕ

Implementation of the Fibonacci sequence satisfying fib 0 = 0, fib 1 = 1, fib (n + 2) = fib n + fib (n + 1). Note: We use a stream iterator for better performance when compared to the naive recursive implementation.

Defined in
Mathlib.Data.Nat.Fib.Basic
Cited by
74 results in Mathlib
Foundations
Depth 8 from the axioms · uses no axioms

Around this declaration

Dashed lines are statement dependencies; solid lines are citations in proofs.

Cites1

Mathlib declarations this one mentions in its statement or cites explicitly in its proof. Plumbing is filtered out.

Cited by79

Results whose statement or proof uses this declaration.