Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Prime period, the Sarkovskii ordering, and interval covering

Definition
Devaney_sarkovskii

by LG · Sep 14, 2026 · Mathlib 0df444a (Lean v4.33.1)

dynamical-systemsperiodic-points

The vocabulary of Sarkovskii's theorem.

Prime period. A point xxx has prime period n≥1n \ge 1n≥1 for fff if fn(x)=xf^{n}(x) = xfn(x)=x and fm(x)≠xf^{m}(x) \ne xfm(x)=x for every 0<m<n0 < m < n0<m<n.

The Sarkovskii ordering. Every positive integer is uniquely 2ap2^{a}p2ap with ppp odd; write a=v2(n)a = v_2(n)a=v2​(n) for the 222-adic valuation and p=odd(n)p = \mathrm{odd}(n)p=odd(n) for the odd part. The ordering

3▹5▹7▹⋯▹2⋅3▹2⋅5▹⋯▹22⋅3▹⋯▹23▹22▹2▹13 \triangleright 5 \triangleright 7 \triangleright \cdots \triangleright 2\cdot3 \triangleright 2\cdot5 \triangleright \cdots \triangleright 2^2\cdot3 \triangleright \cdots \triangleright 2^3 \triangleright 2^2 \triangleright 2 \triangleright 13▹5▹7▹⋯▹2⋅3▹2⋅5▹⋯▹22⋅3▹⋯▹23▹22▹2▹1

lists the odd numbers greater than one first, then their doubles, then their multiples by 444, and so on, with the powers of two last in decreasing order. Formally k▹ℓk \triangleright \ellk▹ℓ when: both odd parts exceed 111 and (v2(k),odd(k))(v_2(k), \mathrm{odd}(k))(v2​(k),odd(k)) is lexicographically smaller than (v2(ℓ),odd(ℓ))(v_2(\ell), \mathrm{odd}(\ell))(v2​(ℓ),odd(ℓ)); or odd(k)>1\mathrm{odd}(k) > 1odd(k)>1 and ℓ\ellℓ is a positive power of two; or both are powers of two and v2(ℓ)<v2(k)v_2(\ell) < v_2(k)v2​(ℓ)<v2​(k).

Covering. For sets I,JI, JI,J, one says f(I)f(I)f(I) covers JJJ when J⊆f(I)J \subseteq f(I)J⊆f(I). Chains of covering intervals are the engine of the proof.

Definition code
import Mathlib

namespace Devaney

/-- `x` is a periodic point of prime period `n` for `f`: the `n`-th iterate returns `x` to
itself and no smaller positive iterate does. -/
def HasPrimePeriod (f : ℝ → ℝ) (x : ℝ) (n : ℕ) : Prop :=
  0 < n ∧ f^[n] x = x ∧ ∀ m, 0 < m → m < n → f^[m] x ≠ x

/-- The exponent of `2` in `n`. -/
def twoAdicVal (n : ℕ) : ℕ := padicValNat 2 n

/-- The odd part of `n`, i.e. `n / 2 ^ twoAdicVal n`. -/
def oddPart (n : ℕ) : ℕ := n / 2 ^ padicValNat 2 n

/-- Devaney, §1.10: the Sarkovskii ordering of the positive integers,
$$3 \triangleright 5 \triangleright 7 \triangleright \cdots \triangleright 2\cdot 3 \triangleright
2 \cdot 5 \triangleright \cdots \triangleright 2^2 \cdot 3 \triangleright \cdots \triangleright
2^3 \triangleright 2^2 \triangleright 2 \triangleright 1 .$$
`SarkovskiiPrecedes k l` says that `k` comes strictly before `l`: writing `k = 2^a * p` and
`l = 2^b * q` with `p`, `q` odd, either both `p, q > 1` and `(a, p)` is lexicographically
smaller than `(b, q)`; or `p > 1` and `q = 1`; or both are powers of two and `b < a`. -/
def SarkovskiiPrecedes (k l : ℕ) : Prop :=
  (1 < oddPart k ∧ 1 < oddPart l ∧
      (twoAdicVal k < twoAdicVal l ∨
        (twoAdicVal k = twoAdicVal l ∧ oddPart k < oddPart l))) ∨
  (1 < oddPart k ∧ oddPart l = 1 ∧ 0 < l) ∨
  (oddPart k = 1 ∧ oddPart l = 1 ∧ 0 < l ∧ twoAdicVal l < twoAdicVal k)

/-- Devaney, §1.10: `f(I)` *covers* `J` when the image of `I` under `f` contains `J`. -/
def Covers (f : ℝ → ℝ) (I J : Set ℝ) : Prop := J ⊆ f '' I

end Devaney
Source
Robert L. Devaney, An Introduction to Chaotic Dynamical Systems, 2nd edition, Westview Press, 2003, ISBN 0-8133-4085-3, §1.10, pp. 60–62 (prime period; the Sarkovskii ordering; the covering relation)
Read-back

What the Lean code literally says, in plain math · self-authored by the drafting agent (non-blind, not an independent auditor)

Provenance note — this read-back is NOT blind. It was written by the same agent that drafted the Lean statements in this proposal, not by an independent auditor working from the code alone. It therefore is not independent testimony: any blind spot in the formalization is likely shared by this text, and agreement between the two should not be read as confirmation that the formalization is faithful.

The file introduces four definitions.

Prime period. For f:R→Rf : \mathbb{R}\to\mathbb{R}f:R→R, a real xxx and a natural nnn, the predicate HasPrimePeriod(f,x,n)\mathrm{HasPrimePeriod}(f,x,n)HasPrimePeriod(f,x,n) is the conjunction of: n>0n > 0n>0; fn(x)=xf^{n}(x) = xfn(x)=x (with fnf^{n}fn the nnn-fold composite); and for every natural mmm with 0<m<n0 < m < n0<m<n, fm(x)≠xf^{m}(x) \ne xfm(x)=x.

Arithmetic auxiliaries. v2(n)v_2(n)v2​(n) is the exponent of the prime 222 in nnn and odd(n)=n/2v2(n)\mathrm{odd}(n) = n / 2^{v_2(n)}odd(n)=n/2v2​(n) is its odd part, with natural-number division. For n=0n = 0n=0 these evaluate to v2(0)=0v_2(0) = 0v2​(0)=0 and odd(0)=0\mathrm{odd}(0) = 0odd(0)=0.

Sarkovskii relation. SarkovskiiPrecedes(k,ℓ)\mathrm{SarkovskiiPrecedes}(k,\ell)SarkovskiiPrecedes(k,ℓ) is the disjunction of three clauses:

  1. odd(k)>1\mathrm{odd}(k) > 1odd(k)>1 and odd(ℓ)>1\mathrm{odd}(\ell) > 1odd(ℓ)>1 and either v2(k)<v2(ℓ)v_2(k) < v_2(\ell)v2​(k)<v2​(ℓ), or v2(k)=v2(ℓ)v_2(k) = v_2(\ell)v2​(k)=v2​(ℓ) together with odd(k)<odd(ℓ)\mathrm{odd}(k) < \mathrm{odd}(\ell)odd(k)<odd(ℓ);
  2. odd(k)>1\mathrm{odd}(k) > 1odd(k)>1 and odd(ℓ)=1\mathrm{odd}(\ell) = 1odd(ℓ)=1 and ℓ>0\ell > 0ℓ>0;
  3. odd(k)=1\mathrm{odd}(k) = 1odd(k)=1, odd(ℓ)=1\mathrm{odd}(\ell) = 1odd(ℓ)=1, ℓ>0\ell > 0ℓ>0 and v2(ℓ)<v2(k)v_2(\ell) < v_2(k)v2​(ℓ)<v2​(k).

Because odd(0)=0\mathrm{odd}(0) = 0odd(0)=0, the relation fails whenever k=0k = 0k=0 or ℓ=0\ell = 0ℓ=0; it is irreflexive, so SarkovskiiPrecedes(k,k)\mathrm{SarkovskiiPrecedes}(k,k)SarkovskiiPrecedes(k,k) is false for every kkk.

Covering. Covers(f,I,J)\mathrm{Covers}(f, I, J)Covers(f,I,J) asserts J⊆f(I)J \subseteq f(I)J⊆f(I), the forward image of the set III; no interval, closedness or continuity assumption is built into this definition.

Human review
  • Endorsed by Shuze Chen · Sep 14, 2026

  • Endorsed by LG · Sep 14, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me