op2130_height_clear_mirror
A signed unit height between another signed unit height and a zero height is forced to zero.
Statement
theorem op2130_height_clear_mirror (h : ℕ → ℤ) (p : ℕ) (x y : ℤ)
(hx : x = 1 ∨ x = -1) (hy : y = 1 ∨ y = -1)
(hL : h (p-1) = y) (hC : h p = x) (hR : h (p+1) = 0) (c : Bool) :
op2130_height_step h p c = Function.update h p 0- Source
- OP-2130, forced signal circuit on path heights
- Verified
- 24 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 3
- op2130_height_stepOne greedy update of a path cumulative-height profile at an interior site, using the supplied coin for a tie.
- LinearOrder.toTotalPreorderEvery
LinearOrderis aTotalPreorder. - TotalPreorderA total preorder: a preorder where
≤is total (complete). This is weaker thanLinearOrder— it does NOT require antisymmetry or…
- Used by 1
- op2130_height_majority_gateTwo isolated signed unit heights separated by one zero can be combined into a single isolated majority signal in three updates.
The proof, explained
Unfolding the definition of `op2130_height_step` and substituting the given values reduces the new height at position $p$ to comparing $2x$ with $y + 0$. Since both $x$ and $y$ are in $\{1, -1\}$, we have $2x > y$ whenever $x = 1$ and $2x < y$ whenever $x = -1$. Thus, the step deterministically adds $-x$ in all cases, forcing the new height $x + (-x)$ to $0$ regardless of the coin toss.
The update at position $p$ reduces to evaluating the height step formula with the neighboring values $y$, $x$, and $0$.
Unfolding the definition of `op2130_height_step` expands the conditional update at index $p$. Substituting the hypotheses $h(p - 1) = y$, $h(p) = x$, and $h(p + 1) = 0$ simplifies the neighbor sum to $y + 0$ and the center term to $2x$.
unfold op2130_height_step rw [hL, hC, hR]
In all four possible cases for $x, y \in \{1, -1\}$, the updated height at position $p$ equals $0$. automation
A case split on $x = 1 \lor x = -1$ and $y = 1 \lor y = -1$ yields four subgoals. In each case, the comparison between $2x$ and $y$ is strict: when $x = 1$, $2 \cdot 1 > y$ so the step subtracts $1$ (yielding $1 - 1 = 0$); when $x = -1$, $2 \cdot (-1) < y$ so the step adds $1$ (yielding $-1 + 1 = 0$). Automated simplification evaluates the arithmetic in all branches to complete the proof.
rcases hx with rfl | rfl <;> rcases hy with rfl | rfl <;> simp
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.
theorem op2130_height_clear_mirror (h : ℕ → ℤ) (p : ℕ) (x y : ℤ) (hx : x = 1 ∨ x = -1) (hy : y = 1 ∨ y = -1) (hL : h (p-1) = y) (hC : h p = x) (hR : h (p+1) = 0) (c : Bool) : op2130_height_step h p c = Function.update h p 0 := by unfold op2130_height_step rw [hL, hC, hR] rcases hx with rfl | rfl <;> rcases hy with rfl | rfl <;> simp