Encyclopedia Foundation Foundation Primitive Recognition Calculus Grow Ratio Orbit Dense Mediant Mediant

ARTICLE 2 claims 1 theorem 1 model

Foundation Primitive Recognition Calculus Grow Ratio Orbit Dense Mediant Mediant

The mediant is a simple way to slide one fraction between two others, and the framework's library proves it always lands strictly between them.

The mediant operation

The mediant of two fractions is the fraction you get by adding the numerators and adding the denominators. For example, the mediant of 1/2 and 2/3 is (1+2)/(2+3) = 3/5. The mediant always lies strictly between the two original fractions, provided the original fractions are in lowest terms and ordered from smaller to larger. This is a classical fact of elementary arithmetic, known to anyone who has played with fractions.

The framework's machine-checked library of formal theorems defines this same operation on its own objects, called RatioOrbit, which are fractions in lowest terms. The definition mediant (a way to combine two ratios into a third that sits between them) is stated in the file RatioOrbitDenseMediant.lean. The library then proves, as a theorem, that if one ratio is less than another, the mediant is strictly greater than the first and strictly less than the second. This is the formal counterpart of the classical fact: the mediant lands in the gap between its two inputs.

This property matters for the framework's account of growth because it gives a constructive way to fill the gaps between ratios. Starting from any two ratios, you can take the mediant, then take the mediant of the new ratio with one of the original ones, and repeat. The library's theorem ltQ_mediant guarantees that each step produces a ratio strictly between the previous two, so the process never stalls and never jumps outside the interval. The result is a dense orbit, a sequence that gets arbitrarily close to any ratio in the interval, though the pack does not show the full density proof itself.

What the declaration does not claim is equally precise. It does not claim that the mediant is the only way to produce a ratio between two others, nor that the mediant operation is unique. It does not claim that every ratio in the interval is reached exactly by some finite number of mediants; the density claim is about getting close, not about hitting every point. It also does not claim that the mediant operation itself forces the golden ratio or any other constant; that is a separate part of the framework's forcing chain, not something this declaration establishes.

THEOREM ltQ_mediant · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/RatioOrbitDenseMediant.lean
theorem ltQ_mediant : ∀ p q, ltQ p q → ltQ p (mediant p q) ∧ ltQ (mediant p q) q := by
  intro p q h
  rw [ltQ_iff_toNat] at h
  refine ⟨?_, ?_⟩
  · rw [ltQ_iff_toNat]
    simp only [mediant, SignedOrbit.add_pos, SignedOrbit.add_neg,
               DistinctionNat.toNat_add, Nat.mul_add, Nat.add_mul]
    generalize p.num.pos.toNat * p.den.toNat = e1 at *
    generalize p.num.pos.toNat * q.den.toNat = e2 at *
    generalize p.num.neg.toNat * p.den.toNat = e3 at *
    generalize q.num.neg.toNat * p.den.toNat = e4 at *
    generalize q.num.pos.toNat * p.den.toNat = e5 at *
    generalize p.num.neg.toNat * q.den.toNat = e6 at *
    omega
  · rw [ltQ_iff_toNat]
    simp only [mediant, SignedOrbit.add_pos, SignedOrbit.add_neg,
               DistinctionNat.toNat_add, Nat.mul_add, Nat.add_mul]
    generalize p.num.pos.toNat * q.den.toNat = e2 at *
    generalize q.num.pos.toNat * q.den.toNat = e7 at *
    generalize q.num.neg.toNat * p.den.toNat = e4 at *
    generalize q.num.neg.toNat * q.den.toNat = e8 at *
    generalize q.num.pos.toNat * p.den.toNat = e5 at *
    generalize p.num.neg.toNat * q.den.toNat = e6 at *
    omega
MODEL mediant · IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/RatioOrbitDenseMediant.lean
def mediant (p q : RatioOrbit) : RatioOrbit where
  num := SignedOrbit.add p.num q.num
  den := p.den + q.den
  den_ne_zero := by
    intro h
    have hp := RatioOrbit.den_toNat_ne_zero p
    have hq := RatioOrbit.den_toNat_ne_zero q
    have hadd : (p.den + q.den).toNat = p.den.toNat + q.den.toNat :=
      DistinctionNat.toNat_add p.den q.den
    have h2 : DistinctionNat.zero.toNat = p.den.toNat + q.den.toNat := by
      rw [← h]; exact hadd
    have h0 : DistinctionNat.zero.toNat = 0 := rfl
    rw [h0] at h2
    omega

What this page does not claim

The mediant operation is not claimed to be unique. The mediant does not reach every ratio exactly after finitely many steps. The mediant operation does not by itself force the golden ratio or any other constant.

Verify this page

Every tagged claim above names its theorem. To check one yourself rather than trust this page, elaborate the source module with Lean 4 and audit its axiom basis:

$ lake env lean IndisputableMonolith/Foundation/PrimitiveRecognitionCalculus/Grow/RatioOrbitDenseMediant.lean
expected axiom basis: [propext, Classical.choice, Quot.sound] (the Lean kernel's standard three; no RS-specific axioms)

A page whose claims cannot be reproduced this way does not ship. In production, every anchor links to the exact declaration in the public source release, and this block carries the build receipt for the page itself.

Derived articles

This page is generated by a question-recursion engine: the questions its answers raise become the next pages. The current agenda, with open targets marked red:

MACHINE LAYER · GROUNDED CLAIM TABLE · CLICK TO EXPAND