NAEtoColor.SatisfiesClause
defimported Lean
Given a Boolean assignment $\mathit{assign} : V \to \mathtt{Bool}$ and a Not-All-Equal clause $c$ with three variables $c.v_0, c.v_1, c.v_2$, $\texttt{NAEtoColor.SatisfiesClause}$ returns $\mathtt{true}$ if and only if the three assigned values are not all equal, i.e.\ at least two of $\mathit{assign}(c.v_0)$, $\mathit{assign}(c.v_1)$, $\mathit{assign}(c.v_2)$ differ.
Statement
set_option relaxedAutoImplicit false in set_option autoImplicit false in def NAEtoColor.SatisfiesClause {V : Type} (assign : V → Bool) (c : NAEclause V) : Bool
- Defined in
- TCSlib, `NAEtoColor.SatisfiesClause`
- Lean proof
- By CS 294-268 course staff (UC Berkeley, Spring 2026), from github.com/Shilun-Allan-Li/tcslib at
c8a02591b1e5(Copyright (c) 2026 UC Berkeley CS 294. 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.NAEtoColor.SatisfiesClause← NAEtoColor.SatisfiesClause (TCSlib/Complexity/NPReductions/NAESATToColoring.lean:98): verbatim
- Verified
- 07 Oct 2026
- Axioms
- none listed
- Built on 1
- NAEtoColor.NAEclauseA Not-All-Equal Clause
- Used by 3
- NAEtoColor.NAEtoColorCompletenessCompleteness of the NAE-SAT to 3-coloring reduction. Let $f$ be a NAE-SAT instance over a variable type $V$, that is, a list of…
- NAEtoColor.NAEtoColorSoundnessSoundness of the NAE-SAT to 3-coloring reduction. Let $f$ be a NAE-SAT instance over a variable type $V$, that is, a list of Not-All-Equal…
- NAEtoColor.SatisfiesNAE3Given an assignment $\mathit{assign} : V \to \mathtt{Bool}$ and a NAE-SAT instance $f$, $\texttt{NAEtoColor.SatisfiesNAE3}$ returns…
Lean source view module on GitHub
set_option relaxedAutoImplicit false in set_option autoImplicit false in /-- Evaluate a Not-All-Equal clause -/ def NAEtoColor.SatisfiesClause {V : Type} (assign : V → Bool) (c : NAEclause V) : Bool := ( assign c.v0 ≠ assign c.v1 || assign c.v0 ≠ assign c.v2 || assign c.v1 ≠ assign c.v2 )