AFTD Auto-Formalizing Theoretical Domains

CommunicationComplexity.flipAt_apply_same

theoremverifiedimported Lean

Value of the single-coordinate flip at the flipped coordinate. Let $n \in \bbn$, let $i \in \mathrm{Fin}\,n$ be a coordinate index, and let $x$ be an $n$-bit Boolean input. The single-coordinate flip of $x$ at $i$ — the input obtained from $x$ by negating its $i$-th coordinate and leaving all others unchanged — has value $\neg\,x_i$ at coordinate $i$.

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
@[simp] lemma CommunicationComplexity.flipAt_apply_same {n : ℕ} (i : Fin n) (x : BoolInput n) :
    flipAt i x i = !(x i)
Source
TCSlib, `CommunicationComplexity.flipAt_apply_same`
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
propext
Built on 2
  • CommunicationComplexity.flipAtGiven $i : \mathrm{Fin}\,n$ and $x : \texttt{BoolInput}(n)$, $\texttt{flipAt}\,i\,x$ is the Boolean input obtained from $x$ by negating…
  • CommunicationComplexity.BoolInput$\texttt{BoolInput}(n)$ is the type of $n$-bit Boolean inputs, defined as the function type $\mathrm{Fin}\,n \to \mathrm{Bool}$.
Used by 3

Lean source view module on GitHub

set_option relaxedAutoImplicit false inset_option autoImplicit false in/-- Flipping coordinate `i` negates the value at coordinate `i`. -/@[simp] lemma CommunicationComplexity.flipAt_apply_same {n : ℕ} (i : Fin n) (x : BoolInput n) :    flipAt i x i = !(x i) := by  simp [flipAt]
See it in the graphDiscuss this resultChallenge it