AFTD Auto-Formalizing Theoretical Domains

cycle_power_four_zero_phase_corrected_count_periodic

theoremverified

In every exponent-two zero-phase defective half model, the lower-half active count plus the defect is two-periodic.

Statement

theorem cycle_power_four_zero_phase_corrected_count_periodic
    (y : ℤ → ℕ → Bool) (e : ℤ → Bool)
    (hm : cycle_power_dyadic_defective_half_model 2 y e 0) :
    ∀ 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
Built on 3

The proof, explained

The proof deduces the 2-periodicity of the defect-corrected lower-half count for an exponent-2 model by invoking the specialized reduction cycle_power_four_corrected_count_periodic_of_count. The required endpoint condition (that bits 0 and 3 are always true) is derived by instantiating the exact dyadic condition at level j = 0, where the sum consists of a single term. The remaining top-scale and total-count conditions are then verified by evaluating the model's defining equations at t = 2 and shift 0.

  1. The model hypothesis hm is unpacked into its exact-scale, top-scale, and total-count components.

    Deconstruct the definition cycle_power_dyadic_defective_half_model with exponent t = 2 and shift 0. This provides the exact pair-sum condition for levels j < 1 (hexact), the top-scale condition at level j = 1 with zero phase shift (htop), and the total diagonal count condition (hcount).

    line 7

      rcases hm with ⟨_, hexact, htop, _, hcount⟩
  2. For every row p, both endpoint bits y(p, 0) and y(p, 3) are true.

    Specialize the exact condition hexact to dyadic scale j = 0 (since 0 + 1 < 2) at row p. The sum over range (2^0) = range 1 reduces by Finset.sum_range_succ to the single term (y(p, 0) && y(p, 3)).toNat = 1. Simplifying this equality forces both boolean values to be true, verified across all cases.

    lines 8–11

    uses Finset.sum_range_succ

      have hend (p : ℤ) : y p 0 = true ∧ y p 3 = true := by
        have h := hexact 0 (by omega) p
        norm_num [Finset.sum_range_succ] at h
        cases h0 : y p 0 <;> cases h3 : y p 3 <;> simp_all
  3. The 2-periodicity of the corrected lower-half count reduces to verifying the top-scale condition and the total diagonal count condition.

    Apply the reduction lemma cycle_power_four_corrected_count_periodic_of_count using the established endpoint property hend. This leaves two obligations: checking the top-scale pair sum with defect is 1, and the length-4 diagonal sum with defect is 3.

    line 12

    uses cycle_power_four_corrected_count_periodic_of_count

      apply cycle_power_four_corrected_count_periodic_of_count y e hend
  4. The top-scale active pair sum plus defect equals 1 everywhere.

    For any vertex v, the hypothesis htop specializes to a sum over range 2^(2-1) = range 2 with offset 2^2 - 2^(2-1) = 2 and defect e(v + 0) = e(v). Arithmetic simplification confirms this is identical to the required condition.

    lines 13–14

      · intro v
        simpa using htop v
  5. The total 4-element diagonal count plus defect equals 3 everywhere.

    For any vertex v, the hypothesis hcount specifies that the sum over range (2^2) = range 4 plus e(v) equals 2 + 1 = 3, which directly matches the second goal after arithmetic simplification.

    lines 15–16

      · intro v
        simpa using hcount v
Finset.sum_range_succ
A sum over {0, ..., n} equals the sum over {0, ..., n - 1} plus the term at index n.
cycle_power_four_corrected_count_periodic_of_count
If an array on 4 bits has true endpoints (at indices 0 and 3) on every row, its distance-2 active pair sum plus defect is identically 1, and its total 4-diagonal count plus defect is identically 3, then its lower-half 2-element active count plus defect is 2-periodic.

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_zero_phase_corrected_count_periodic    (y : ℤ → ℕ → Bool) (e : ℤ → Bool)    (hm : cycle_power_dyadic_defective_half_model 2 y e 0) :    ∀ 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  rcases hm with ⟨_, hexact, htop, _, hcount⟩  have hend (p : ℤ) : y p 0 = true ∧ y p 3 = true := by    have h := hexact 0 (by omega) p    norm_num [Finset.sum_range_succ] at h    cases h0 : y p 0 <;> cases h3 : y p 3 <;> simp_all  apply cycle_power_four_corrected_count_periodic_of_count y e hend  · intro v    simpa using htop v  · intro v    simpa using hcount v
See it in the graphDiscuss this resultChallenge it