AFTD Auto-Formalizing Theoretical Domains

cycle_power_four_corrected_count_periodic_of_count

theoremverified

At span four, endpoint membership, the defective top-owner equation, and the defective active-count equation alone force the lower-half count plus the defect to be two-periodic.

Statement

theorem cycle_power_four_corrected_count_periodic_of_count
    (y : ℤ → ℕ → Bool) (e : ℤ → Bool)
    (hend : ∀ p, y p 0 = true ∧ y p 3 = true)
    (htop : ∀ v : ℤ, (Finset.range 2).sum (fun a =>
      (y (v-(a:ℤ)) a && y (v-(a:ℤ)) (a+2)).toNat) + (e v).toNat = 1)
    (hcount : ∀ v : ℤ, (Finset.range 4).sum (fun a =>
      (y (v-(a:ℤ)) a).toNat) + (e v).toNat = 3) :
    ∀ v : ℤ,
      (Finset.range 2).sum (fun a => (y (v-(a:ℤ)) a).toNat) + (e v).toNat =
      (Finset.range 2).sum (fun a => (y (v+2-(a:ℤ)) a).toNat) + (e (v+2)).toNat
Source
Corrected lower-count periodicity in the zero-phase defective half-model for RT-1 and OP-205.
Verified
12 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 1

The proof, explained

To show that the defective lower-half count is 2-periodic, we fix an arbitrary vertex v and evaluate the defective top-owner equation at v alongside the defective active-count equation at v + 2. Unrolling the finite sums and substituting the fixed endpoint values at levels 0 and 3 reveals that both relations isolate the same shared variable, y(v, 2), equating both lower-half counts to 1 - y(v, 2). Linear integer arithmetic then immediately confirms that the count plus defect at v matches that at v + 2.

  1. Fix an arbitrary vertex v, and instantiate the top-owner equation at v and the active-count equation at v + 2.

    We introduce the arbitrary position v. We then specialize the top-owner hypothesis htop to v and the active-count hypothesis hcount to v + 2, providing two equations that constrain the boolean variables around v.

    lines 11–13

      intro v
      have ht := htop v
      have hc2 := hcount (v+2)
  2. Expand the finite sums and substitute the boundary values at levels 0 and 3.

    Using Finset.sum_range_succ to unroll the range summations and applying the endpoint conditions y(p, 0) = true and y(p, 3) = true from hend, the top-owner equation at v simplifies to y(v, 2) + y(v - 1, 1) + e(v) = 1. Similarly, the count equation at v + 2 simplifies to 1 + y(v + 1, 1) + y(v, 2) + 1 + e(v + 2) = 3, while the goal becomes 1 + y(v - 1, 1) + e(v) = 1 + y(v + 1, 1) + e(v + 2).

    line 14

    uses Finset.sum_range_succ

      norm_num [Finset.sum_range_succ, hend] at ht hc2 ⊢
  3. The 2-periodicity equality follows by linear arithmetic.

    From the two simplified equations, both y(v - 1, 1) + e(v) and y(v + 1, 1) + e(v + 2) are equal to 1 - y(v, 2). Adding 1 to each yields 2 - y(v, 2) on both sides of the goal, which Presburger linear arithmetic (omega) verifies directly.

    line 15

      omega
Finset.sum_range_succ
The sum of a function over {0, ..., n} equals the sum over {0, ..., n - 1} plus the term at n.

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

theorem cycle_power_four_corrected_count_periodic_of_count    (y : ℤ → ℕ → Bool) (e : ℤ → Bool)    (hend : ∀ p, y p 0 = true ∧ y p 3 = true)    (htop : ∀ v : ℤ, (Finset.range 2).sum (fun a =>      (y (v-(a:ℤ)) a && y (v-(a:ℤ)) (a+2)).toNat) + (e v).toNat = 1)    (hcount : ∀ v : ℤ, (Finset.range 4).sum (fun a =>      (y (v-(a:ℤ)) a).toNat) + (e v).toNat = 3) :    ∀ v : ℤ,      (Finset.range 2).sum (fun a => (y (v-(a:ℤ)) a).toNat) + (e v).toNat =      (Finset.range 2).sum (fun a => (y (v+2-(a:ℤ)) a).toNat) + (e (v+2)).toNat := by  intro v  have ht := htop v  have hc2 := hcount (v+2)  norm_num [Finset.sum_range_succ, hend] at ht hc2 ⊢  omega
See it in the graphDiscuss this resultChallenge it