AFTD Auto-Formalizing Theoretical Domains

cycle_power_reflect_count_defect

theoremverified

Reflection transports a pointwise active-count defect by negating its vertex.

Statement

theorem cycle_power_reflect_count_defect
    (D : ℕ) (hD : 0 < D) (x : ℤ → ℕ → Bool) (e : ℤ → Bool) (k : ℕ)
    (h : ∀ v : ℤ, (Finset.range D).sum (fun a => (x (v-(a : ℤ)) a).toNat) +
      (e v).toNat = k) :
    ∀ v : ℤ, (Finset.range D).sum (fun a =>
      (cycle_power_rooted_reflect D x (v-(a : ℤ)) a).toNat) + (e (-v)).toNat = k
Source
Reflection identities for the two-phase defective half-model route of RT-1.
Verified
10 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • cycle_power_rooted_reflectReflects the offsets of a rooted Boolean profile in its arc of length D and changes its integer root so that physical lattice points are…
Used by 1

The proof, explained

To show that reflection transports the pointwise defect to $-v$, we evaluate the defect hypothesis at $-v$. By reversing the summation index with `Finset.sum_range_reflect`, the sum of reflected terms aligns with the original sum at $-v$. Expanding the definition of rooted reflection and simplifying the coordinates via linear arithmetic shows that the summands match term by term.

  1. For any vertex $v$, the sum of reflected active counts can be reindexed in reverse order.

    We fix an arbitrary vertex $v \in \mathbb{Z}$. Using `Finset.sum_range_reflect`, we rewrite the sum over $\{0, \dots, D-1\}$ in reverse order by replacing the summation index with $D - 1 - j$.

    lines 9–10

    uses Finset.sum_range_reflect

      intro v
      rw [← Finset.sum_range_reflect]
  2. It suffices to show that the reversed reflected sum equals the defect sum at $-v$ term by term.

    We instantiate the defect hypothesis $h$ at vertex $-v$. Both the target equation and this specialized hypothesis have $+ (e(-v)).\text{toNat}$ added to their respective sums. Canceling this common term with `congrArg` and applying `Finset.sum_congr` reduces the goal to showing that each summand in the reversed sum equals the corresponding term $x(-v - a, a)$ for $a \in \{0, \dots, D-1\}$.

    lines 11–14

    uses congrArg, Finset.sum_congr

      have hs := h (-v)
      convert hs using 1
      apply congrArg (fun z : ℕ => z + (e (-v)).toNat)
      apply Finset.sum_congr rfl
  3. For each index $a < D$, the reflected term at index $D - 1 - a$ equals $x(-v - a, a)$.

    For $a \in \text{range } D$, we have $a < D$ by `Finset.mem_range.mp`. Unfolding `cycle_power_rooted_reflect`, the summand becomes $x(-(v - (D - 1 - a)) - (D - 1), D - 1 - (D - 1 - a))$. Linear arithmetic (`omega`) simplifies the second coordinate via $(D - 1) - (D - 1 - a) = a$ and the first coordinate via $-(v - (D - 1 - a)) - (D - 1) = -v - a$. Rewriting with these two equalities shows the summand matches $x(-v - a, a)$.

    lines 15–20

    uses Finset.mem_range.mp

      intro a ha
      have haD : a < D := Finset.mem_range.mp ha
      dsimp [cycle_power_rooted_reflect]
      have hi : D-1-(D-1-a)=a := by omega
      have hp : -(v-((D-1-a : ℕ) : ℤ))-((D-1 : ℕ) : ℤ) = -v-(a : ℤ) := by omega
      rw [hi,hp]
Finset.sum_range_reflect
A sum over the range of natural numbers from $0$ to $n-1$ is unchanged by reversing the index of summation to $n - 1 - j$.
congrArg
If two inputs are equal, applying the same function to both yields equal results.
Finset.sum_congr
Two sums over equal finite sets are equal if their summands agree at every element of the set.
Finset.mem_range.mp
If a natural number belongs to `Finset.range n`, it is strictly less than $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

open Finsettheorem cycle_power_reflect_count_defect    (D : ℕ) (hD : 0 < D) (x : ℤ → ℕ → Bool) (e : ℤ → Bool) (k : ℕ)    (h : ∀ v : ℤ, (Finset.range D).sum (fun a => (x (v-(a : ℤ)) a).toNat) +      (e v).toNat = k) :    ∀ v : ℤ, (Finset.range D).sum (fun a =>      (cycle_power_rooted_reflect D x (v-(a : ℤ)) a).toNat) + (e (-v)).toNat = k := by  intro v  rw [← Finset.sum_range_reflect]  have hs := h (-v)  convert hs using 1  apply congrArg (fun z : ℕ => z + (e (-v)).toNat)  apply Finset.sum_congr rfl  intro a ha  have haD : a < D := Finset.mem_range.mp ha  dsimp [cycle_power_rooted_reflect]  have hi : D-1-(D-1-a)=a := by omega  have hp : -(v-((D-1-a : ℕ) : ℤ))-((D-1 : ℕ) : ℤ) = -v-(a : ℤ) := by omega  rw [hi,hp]
See it in the graphDiscuss this resultChallenge it