Documentation

Complexity.Foundations.Combinatorics.FunctionalGraph.Powers

The number of distinct powers of a finite map #

For f : α → α on a finite type, let μ be the longest transient depth (maxTransientDepth) and λ the least common multiple of the cycle lengths (cyclePeriod). Two powers f^[a] and f^[b] with a < b agree exactly when μ ≤ a and λ ∣ b - a (iterate_eq_iterate_iff), so f has exactly μ + λ distinct powers (card_range_iterate). On an empty type μ = 0 and λ = 1: the only power is the empty function.

Main definitions #

Main results #

References #

noncomputable def Cslib.FunctionalGraph.maxTransientDepth {α : Type u} [Fintype α] (f : α → α) :

The longest transient depth μ over all states.

Instances For
    noncomputable def Cslib.FunctionalGraph.cyclePeriod {α : Type u} [Fintype α] (f : α → α) :

    The least common multiple λ of all cycle lengths.

    Instances For
      theorem Cslib.FunctionalGraph.cyclePeriod_pos {α : Type u} [Fintype α] (f : α → α) :

      The least common multiple of all cycle lengths is positive.

      theorem Cslib.FunctionalGraph.iterate_eq_iterate_iff {α : Type u} [Fintype α] (f : α → α) {a b : ℕ} (hab : a < b) :

      Two powers f^[a] and f^[b] with a < b coincide iff μ ≤ a and λ ∣ b - a.

      Every power past μ reduces to one of the first μ + λ powers.

      The powers f^[0], …, f^[μ + λ - 1] are pairwise distinct.

      theorem Cslib.FunctionalGraph.card_range_iterate {α : Type u} [Fintype α] (f : α → α) :

      The number of powers. A map on a finite type has exactly μ + λ distinct powers.