Iterations of a function #
In this file we prove simple properties of nat.iterate f n a.k.a. f^[n]:
-
iterate_zero,iterate_succ,iterate_succ',iterate_add,iterate_mul: formulas forf^[0],f^[n+1](two versions),f^[n+m], andf^[n*m]; -
iterate_id:id^[n]=id; -
injective.iterate,surjective.iterate,bijective.iterate: iterates of an injective/surjective/bijective function belong to the same class; -
left_inverse.iterate,right_inverse.iterate,commute.iterate_left,commute.iterate_right,commute.iterate_iterate: some properties of pairs of functions survive under iterations -
iterate_fixed,semiconj.iterate_*,semiconj₂.iterate: ifffixes a point (resp., semiconjugates unary/binary operarations), then so doesf^[n].
theorem
function.surjective.iterate
{α : Type u}
{f : α → α}
(Hsurj : function.surjective f)
(n : ℕ) :
theorem
function.semiconj.iterate_right
{α : Type u}
{β : Type v}
{f : α → β}
{ga : α → α}
{gb : β → β}
(h : function.semiconj f ga gb)
(n : ℕ) :
function.semiconj f ga^[n] gb^[n]
theorem
function.semiconj.iterate_left
{α : Type u}
{f : α → α}
{g : ℕ → α → α}
(H : ∀ (n : ℕ), function.semiconj f (g n) (g (n + 1)))
(n k : ℕ) :
function.semiconj f^[n] (g k) (g (n + k))
theorem
function.commute.iterate_right
{α : Type u}
{f g : α → α}
(h : function.commute f g)
(n : ℕ) :
function.commute f g^[n]
theorem
function.commute.iterate_left
{α : Type u}
{f g : α → α}
(h : function.commute f g)
(n : ℕ) :
function.commute f^[n] g
theorem
function.commute.iterate_iterate
{α : Type u}
{f g : α → α}
(h : function.commute f g)
(m n : ℕ) :
function.commute f^[m] g^[n]
theorem
function.commute.iterate_eq_of_map_eq
{α : Type u}
{f g : α → α}
(h : function.commute f g)
(n : ℕ)
{x : α}
(hx : f x = g x) :
theorem
function.commute.iterate_iterate_self
{α : Type u}
(f : α → α)
(m n : ℕ) :
function.commute f^[m] f^[n]
theorem
function.semiconj₂.iterate
{α : Type u}
{f : α → α}
{op : α → α → α}
(hf : function.semiconj₂ f op op)
(n : ℕ) :
function.semiconj₂ f^[n] op op
theorem
function.iterate.rec_zero
{α : Type u}
(p : α → Sort u_1)
{f : α → α}
(h : Π (a : α), p a → p (f a))
{a : α}
(ha : p a) :
function.iterate.rec p h ha 0 = ha
theorem
function.left_inverse.iterate
{α : Type u}
{f g : α → α}
(hg : function.left_inverse g f)
(n : ℕ) :
theorem
function.right_inverse.iterate
{α : Type u}
{f g : α → α}
(hg : function.right_inverse g f)
(n : ℕ) :
theorem
function.iterate_commute
{α : Type u}
(m n : ℕ) :
function.commute (λ (f : α → α), f^[m]) (λ (f : α → α), f^[n])
theorem
list.foldl_const
{α : Type u}
{β : Type v}
(f : α → α)
(a : α)
(l : list β) :
list.foldl (λ (b : α) (_x : β), f b) a l = f^[l.length] a
theorem
list.foldr_const
{α : Type u}
{β : Type v}
(f : β → β)
(b : β)
(l : list α) :
list.foldr (λ (_x : α), f) b l = f^[l.length] b