AFTD Auto-Formalizing Theoretical Domains

CommunicationComplexity.flipAt_flipAt

theoremverifiedimported Lean

Single-coordinate flip is an involution. Fix $n \in \bbn$, a coordinate $i \in \mathrm{Fin}\,n$, and an $n$-bit Boolean input $x \colon \mathrm{Fin}\,n \to \mathrm{Bool}$. Writing $\mathrm{flip}_i$ for the operation that negates the $i$-th coordinate of an input and leaves all other coordinates unchanged, applying it twice recovers the original input: \[ \mathrm{flip}_i\bigl(\mathrm{flip}_i(x)\bigr) = x. \]

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
@[simp] lemma CommunicationComplexity.flipAt_flipAt {n : ℕ} (i : Fin n) (x : BoolInput n) :
    flipAt i (flipAt i x) = x
Source
TCSlib, `CommunicationComplexity.flipAt_flipAt`
Lean proof
By Lucy Horowitz, Timothe Kasriel, Mihir Singhal, from github.com/Shilun-Allan-Li/tcslib at c8a02591b1e5 (Copyright (c) 2026 Lucy Horowitz, Timothe Kasriel, and Mihir Singhal. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.
Verified
07 Oct 2026
Axioms
Quot.soundpropext
Built on 4
Used by 1

Lean source view module on GitHub

set_option relaxedAutoImplicit false inset_option autoImplicit false in/-- Flipping the same coordinate twice returns the original input. -/@[simp] lemma CommunicationComplexity.flipAt_flipAt {n : ℕ} (i : Fin n) (x : BoolInput n) :    flipAt i (flipAt i x) = x := by  ext j  by_cases hij : j = i  · subst hij    simp [flipAt]  · simp [flipAt, hij]
See it in the graphDiscuss this resultChallenge it