hypercube_coord_reflect_involutive
For any coordinate subset T of Fin n and any Boolean vector x : Fin n → Bool, applying coordinate reflection with respect to T twice returns x.
Statement
theorem hypercube_coord_reflect_involutive {n : ℕ} (T : Finset (Fin n)) (x : Fin n → Bool) :
hypercube_coord_reflect T (hypercube_coord_reflect T x) = x- Source
- arXiv:2610.38287 Eq. (14)
- Verified
- 08 Nov 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 1
- hypercube_coord_reflectGiven a coordinate subset T of Fin n and a Boolean vector x : Fin n → Bool, hypercube_coord_reflect T x is the Boolean vector obtained by…
- Used by 1
- hypercube_d_convex_iff_majority_closed_and_has_relative_opposite_pairLet X : Finset (Fin n → Bool) be a nonempty finite subset of vertices of the unit hypercube. Then X is D-convex (hypercube_is_d_convex X)…
Read back from the Lean
For every natural number $n$, every subset $T \subseteq \text{Fin } n$ (as a Finset), and every boolean vector $x : \text{Fin } n \to \text{Bool}$, applying hypercube_coord_reflect T twice to $x$ yields $x$ itself.
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
The proof, explained
To show that coordinate reflection with respect to a coordinate set T is an involution, we consider an arbitrary coordinate i of the hypercube. By definition, coordinate reflection negates the i-th bit if i ∈ T and leaves it fixed otherwise. Applying the reflection twice either flips the bit twice or leaves it fixed twice, which in both cases preserves the original value x(i).
It suffices to show that the double reflection agrees with x at every coordinate i
By function extensionality (the ext tactic), two Boolean vectors on Fin n are equal if and only if they agree at every coordinate i.
ext iAt every coordinate i, reflecting twice preserves the coordinate value x(i)
Unfolding the definition of hypercube_coord_reflect rewrites the double reflection at coordinate i into nested conditionals depending on whether i ∈ T. A case split on whether i ∈ T shows: if i ∈ T, the coordinate is negated twice (!!x(i) = x(i)); if i ∉ T, the coordinate is left unchanged both times (x(i) = x(i)). In either case, the result simplifies to x(i).
uses
hypercube_coord_reflectsimp [hypercube_coord_reflect] split_ifs <;> simp
hypercube_coord_reflect- the coordinate reflection of a Boolean vector x along a subset of coordinates T, which flips x(i) if i ∈ T and leaves x(i) unchanged otherwise
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.
/-- Coordinate reflection on the unit hypercube is an involution. -/theorem hypercube_coord_reflect_involutive {n : ℕ} (T : Finset (Fin n)) (x : Fin n → Bool) : hypercube_coord_reflect T (hypercube_coord_reflect T x) = x := by ext i simp [hypercube_coord_reflect] split_ifs <;> simp