AFTD Auto-Formalizing Theoretical Domains

dyadic_sector_S_knot

theoremverifiedformalization

For every natural number s >= 1 with A = (2 : ℝ)^s and B = A^2, and for every integer j, dyadic_sector_S s (B ^ j / (B - 1)) = A ^ j / (A - 1).

Statement

theorem dyadic_sector_S_knot (s : ℕ) (hs : 1 ≤ s) (j : ℤ) :
    let A : ℝ := (2 : ℝ) ^ s
    let B : ℝ := A ^ 2
    dyadic_sector_S s (B ^ j / (B - 1)) = A ^ j / (A - 1)
Formalizes
arXiv:2611.07003; OP-1787
Verified
17 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • dyadic_sector_SGiven a natural number s and a real number t, let A = 2^s and B = A^2. The function dyadic_sector_S s t is defined by setting the integer…

Read back from the Lean

For every natural number $s$ such that $1 \le s$, and for every integer $j \in \mathbb{Z}$, let $A = 2^s \in \mathbb{R}$ and $B = A^2 \in \mathbb{R}$; then dyadic_sector_S evaluated at $s$ and $B^j / (B - 1)$ is equal to $A^j / (A - 1)$.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

The proof, explained

The dyadic sector function dyadic_sector_S(s, t) interpolates affine segments on dyadic intervals indexed by the floor ⌊log(t(B - 1)) / log B⌋. At a knot point t = B^j / (B - 1), the product t(B - 1) collapses to B^j, making the logarithm simplify directly to j * log B and the floor index evaluate exactly to j. Substituting this index makes the interpolation term vanish, leaving precisely A^j / (A - 1).

  1. Introduce A = 2^s and B = A^2, and establish that 2 ≤ A.

    We introduce the local variables A = 2^s and B = A^2. Since s ≥ 1 (by hypothesis hs) and 1 ≤ 2, monotonicity of powers (pow_le_pow_right₀) gives 2 = 2^1 ≤ 2^s = A.

    lines 6–10

    uses pow_le_pow_right₀

      intro A B
      have hA : 2 ≤ A := by
        dsimp [A]
        have h := pow_le_pow_right₀ (by norm_num : (1 : ℝ) ≤ 2) hs
        simpa using h
  2. Establish that 1 < B, B - 1 ≠ 0, and log B ≠ 0.

    Since B = A^2 and A ≥ 2, non-linear arithmetic gives B ≥ 4 > 1. Linear arithmetic then yields B - 1 ≠ 0. Furthermore, because B > 1, its natural logarithm is strictly positive by Real.log_pos, which in turn implies log B ≠ 0.

    lines 11–17

    uses Real.log_pos

      have hB_gt : 1 < B := by
        dsimp [B]
        nlinarith
      have hB_sub : B - 1 ≠ 0 := by linarith
      have hlog : Real.log B ≠ 0 := by
        have : 0 < Real.log B := Real.log_pos hB_gt
        linarith
  3. Unfold the definition of dyadic_sector_S at t = B^j / (B - 1).

    By definition of dyadic_sector_S, evaluating at t = B^j / (B - 1) rewrites the left-hand side into A^(j') / (A - 1) + (B^j / (B - 1) - B^(j') / (B - 1)) * A^(-j'), where j' = ⌊log((B^j / (B - 1)) * (B - 1)) / log B⌋.

    lines 18–20

      change
        let j' : ℤ := ⌊Real.log ((B ^ j / (B - 1)) * (B - 1)) / Real.log B⌋
        A ^ j' / (A - 1) + (B ^ j / (B - 1) - B ^ j' / (B - 1)) * A ^ (-j') = A ^ j / (A - 1)
  4. The floor index ⌊log((B^j / (B - 1)) * (B - 1)) / log B⌋ simplifies to j.

    Since B - 1 ≠ 0, multiplying by B - 1 cancels the denominator via div_mul_cancel₀, leaving log(B^j). Then Real.log_zpow extracts the integer exponent, yielding j * log B. Because log B ≠ 0, dividing by log B cancels via mul_div_cancel_right₀, leaving j. Finally, the floor of an integer cast is j itself by Int.floor_intCast.

    lines 21–25

    uses div_mul_cancel₀, Real.log_zpow, mul_div_cancel_right₀, Int.floor_intCast

      have hj : ⌊Real.log ((B ^ j / (B - 1)) * (B - 1)) / Real.log B⌋ = j := by
        rw [div_mul_cancel₀ (B ^ j) hB_sub]
        rw [Real.log_zpow]
        rw [mul_div_cancel_right₀ (j : ℝ) hlog]
        rw [Int.floor_intCast]
  5. The equation holds, completing the proof.

    Substituting j for the floor expression j' causes the interpolation difference (B^j / (B - 1) - B^j / (B - 1)) in the second term to vanish identically. The remaining expression simplifies to A^j / (A - 1) by ring arithmetic.

    lines 26–28

      dsimp only
      rw [hj]
      ring
pow_le_pow_right₀
For any base a ≥ 1 in an ordered monoid with zero, m ≤ n implies a^m ≤ a^n.
Real.log_pos
For any real number x > 1, the natural logarithm log x is strictly positive.
div_mul_cancel₀
In a group with zero (such as ℝ), (a / b) * b = a provided b ≠ 0.
Real.log_zpow
For a real number x and integer power n, log(x^n) = n * log x.
mul_div_cancel_right₀
For any element a and non-zero b, (a * b) / b = a.
Int.floor_intCast
The floor of an integer embedded into an ordered ring (such as ℝ) is the integer itself: ⌊z⌋ = z.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

/-- Exact value of the dyadic sector function at knot points. -/theorem dyadic_sector_S_knot (s : ℕ) (hs : 1 ≤ s) (j : ℤ) :    let A : ℝ := (2 : ℝ) ^ s    let B : ℝ := A ^ 2    dyadic_sector_S s (B ^ j / (B - 1)) = A ^ j / (A - 1) := by  intro A B  have hA : 2 ≤ A := by    dsimp [A]    have h := pow_le_pow_right₀ (by norm_num : (1 : ℝ) ≤ 2) hs    simpa using h  have hB_gt : 1 < B := by    dsimp [B]    nlinarith  have hB_sub : B - 1 ≠ 0 := by linarith  have hlog : Real.log B ≠ 0 := by    have : 0 < Real.log B := Real.log_pos hB_gt    linarith  change    let j' : ℤ := ⌊Real.log ((B ^ j / (B - 1)) * (B - 1)) / Real.log B⌋    A ^ j' / (A - 1) + (B ^ j / (B - 1) - B ^ j' / (B - 1)) * A ^ (-j') = A ^ j / (A - 1)  have hj : ⌊Real.log ((B ^ j / (B - 1)) * (B - 1)) / Real.log B⌋ = j := by    rw [div_mul_cancel₀ (B ^ j) hB_sub]    rw [Real.log_zpow]    rw [mul_div_cancel_right₀ (j : ℝ) hlog]    rw [Int.floor_intCast]  dsimp only  rw [hj]  ring
See it in the graphDiscuss this resultChallenge it