cycle_power_reflect_shifted_pair_defect
Reflection transports a defective pair-ownership equation and reverses the phase.
Statement
theorem cycle_power_reflect_shifted_pair_defect (D L : ℕ) (hL : 0 < L) (hLD : L ≤ D) (x : ℤ → ℕ → Bool) (e : ℤ → Bool) (shift : ℤ) (h : ∀ v : ℤ, (Finset.range L).sum (fun a => (x (v-(a : ℤ)) a && x (v-(a : ℤ)) (a+D-L)).toNat) + (e (v+shift)).toNat = 1) : ∀ v : ℤ, (Finset.range L).sum (fun a => (cycle_power_rooted_reflect D x (v-(a : ℤ)) a && cycle_power_rooted_reflect D x (v-(a : ℤ)) (a+D-L)).toNat) + (e (-v-((D-L : ℕ) : ℤ)+shift)).toNat = 1
- 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
- cycle_power_dyadic_reflect_defective_half_modelReflecting a defective half model reverses its defect function and changes its top-owner phase from shift to half-span minus shift.
The proof, explained
The proof establishes that reflection preserves the defect equation for shifted pair ownership by evaluating the given hypothesis at the reflected base vertex -v - (D - L). Reversing the summation index over {0, ..., L - 1} aligns the defect term with the hypothesis immediately. Unfolding rooted reflection and simplifying the indices shows that the reflected summand at L - 1 - a corresponds to the original summand at a with its two boolean factors swapped. The proof concludes using the commutativity of boolean conjunction.
Fix an arbitrary vertex v ∈ ℤ; reversing the summation index over {0, ..., L - 1} replaces each index a with L - 1 - a.
We introduce the arbitrary vertex v. Using Finset.sum_range_reflect, the sum over a ∈ range L is rewritten in reverse order, replacing each index a with L - 1 - a.
uses
Finset.sum_range_reflectintro v rw [← Finset.sum_range_reflect]
Evaluating the hypothesis at the reflected position -v - (D - L) reduces the goal to showing that the reflected sum and the hypothesized sum agree term-by-term.
We instantiate the hypothesis h at the reflected vertex -v - (D - L), giving an equation hs whose defect term (e(-v - (D - L) + shift)).toNat matches the defect term of the goal. Matching the two equations using convert hs using 1 and cancelling the identical defect terms with congrArg leaves the equality of the two sums over range L. Applying Finset.sum_congr reduces this to showing that their summands are equal for every a ∈ range L.
uses
congrArg,Finset.sum_congrhave hs := h (-v-((D-L : ℕ) : ℤ)) convert hs using 1 apply congrArg (fun z : ℕ => z + (e (-v-((D-L : ℕ) : ℤ)+shift)).toNat) apply Finset.sum_congr rfl
For any index a ∈ range L, we have a < L, and expanding cycle_power_rooted_reflect expresses the reflected summands in terms of x.
Let a ∈ range L. Range membership via Finset.mem_range.mp gives a < L. Expanding the definition cycle_power_rooted_reflect D x p k = x (-p - (D - 1)) (D - 1 - k) expresses both factors of the conjunction in terms of x at vertex -(v - (L - 1 - a)) - (D - 1) with indices D - 1 - (L - 1 - a) and D - 1 - ((L - 1 - a) + D - L).
uses
Finset.mem_range.mpintro a ha have haL : a < L := Finset.mem_range.mp ha dsimp [cycle_power_rooted_reflect]
Under the bounds 0 < L ≤ D and a < L, the reflected indices and vertex simplify to a + D - L, a, and -v - (D - L) - a.
Using linear integer arithmetic (omega), we establish three identities: the first index D - 1 - (L - 1 - a) equals a + D - L (hidx₁), the second index D - 1 - ((L - 1 - a) + D - L) equals a (hidx₂), and the vertex -(v - (L - 1 - a)) - (D - 1) equals -v - (D - L) - a (hp).
have hidx₁ : D-1-(L-1-a)=a+D-L := by omega have hidx₂ : D-1-((L-1-a)+D-L)=a := by omega have hp : -(v-((L-1-a : ℕ) : ℤ))-((D-1 : ℕ) : ℤ) = -v-((D-L : ℕ) : ℤ)-(a : ℤ) := by omega
Rewriting with the index identities and commutativity of boolean conjunction closes the goal.
Rewriting with hidx₁, hidx₂, and hp transforms the reflected product into x (-v - (D - L) - a) (a + D - L) && x (-v - (D - L) - a) a. Applying Bool.and_comm swaps the two boolean terms, matching the summand in the hypothesis and completing the proof.
uses
Bool.and_commrw [hidx₁,hidx₂,hp,Bool.and_comm]
Finset.sum_range_reflect- Reversing the summation index over {0, ..., n - 1} via j ↦ n - 1 - j preserves the sum: ∑ j ∈ range n, f (n - 1 - j) = ∑ j ∈ range n, f j.
congrArg- If two inputs are equal, applying a function to both yields equal outputs: a₁ = a₂ → f a₁ = f a₂.
Finset.sum_congr- Two sums over equal finite sets are equal if their summands agree on every element.
Finset.mem_range.mp- An element a in Finset.range n is strictly less than n: a ∈ range n → a < n.
Bool.and_comm- Boolean conjunction is commutative: (x && y) = (y && x).
- The index arithmetic on natural numbers involves truncated subtraction; the bounds 0 < L ≤ D and a < L ensure that expressions like L - 1 - a and D - 1 - (L - 1 - a) do not underflow, which Lean's omega tactic verifies automatically.
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
open Finsettheorem cycle_power_reflect_shifted_pair_defect (D L : ℕ) (hL : 0 < L) (hLD : L ≤ D) (x : ℤ → ℕ → Bool) (e : ℤ → Bool) (shift : ℤ) (h : ∀ v : ℤ, (Finset.range L).sum (fun a => (x (v-(a : ℤ)) a && x (v-(a : ℤ)) (a+D-L)).toNat) + (e (v+shift)).toNat = 1) : ∀ v : ℤ, (Finset.range L).sum (fun a => (cycle_power_rooted_reflect D x (v-(a : ℤ)) a && cycle_power_rooted_reflect D x (v-(a : ℤ)) (a+D-L)).toNat) + (e (-v-((D-L : ℕ) : ℤ)+shift)).toNat = 1 := by intro v rw [← Finset.sum_range_reflect] have hs := h (-v-((D-L : ℕ) : ℤ)) convert hs using 1 apply congrArg (fun z : ℕ => z + (e (-v-((D-L : ℕ) : ℤ)+shift)).toNat) apply Finset.sum_congr rfl intro a ha have haL : a < L := Finset.mem_range.mp ha dsimp [cycle_power_rooted_reflect] have hidx₁ : D-1-(L-1-a)=a+D-L := by omega have hidx₂ : D-1-((L-1-a)+D-L)=a := by omega have hp : -(v-((L-1-a : ℕ) : ℤ))-((D-1 : ℕ) : ℤ) = -v-((D-L : ℕ) : ℤ)-(a : ℤ) := by omega rw [hidx₁,hidx₂,hp,Bool.and_comm]