Calkin–Wilf: enumerates the positive rationals
ProvedCalkinWilf.hyperbinaryCount_ratio_bijOncombinatoricsnumber-theory
Let be the number of hyperbinary representations of . Every positive rational number occurs exactly once in the sequence
That is, is a bijection from onto .
This gives an explicit enumeration of the rationals, read off level by level from the Calkin–Wilf tree.
Formalization Note Stated as Set.BijOn from Set.univ : Set ℕ onto {q : ℚ | 0 < q}, with the ratio computed in ℚ.
Preamble
import Mathlib import Definitions.Def_CalkinWilf_hyperbinaryCount
Formal statement
namespace CalkinWilf
/-- Calkin–Wilf, Theorem 1 (pp.362–363), second part: every positive rational occurs exactly once
in the list `b(0)/b(1), b(1)/b(2), …`. -/
theorem hyperbinaryCount_ratio_bijOn :
Set.BijOn (fun n : ℕ => (hyperbinaryCount n : ℚ) / hyperbinaryCount (n + 1))
Set.univ {q : ℚ | 0 < q} := by
sorry
end CalkinWilf
Source
Calkin–Wilf, Recounting the Rationals, Amer. Math. Monthly 107 (2000), no. 4, 360–363, https://www.jstor.org/stable/2589182, Theorem 1, pp. 362–363