SATtoColor.Clause
structureimported Lean
A clause over a variable type $V$ is a structure bundling exactly three literals $\ell_1, \ell_2, \ell_3 : \mathrm{Literal}\,V$. Each literal is either a positive or a negative occurrence of some variable.
Statement
set_option relaxedAutoImplicit false in set_option autoImplicit false in structure SATtoColor.Clause (V : Type)
- Defined in
- TCSlib, `SATtoColor.Clause`
- 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.SATtoColor.Clause← SATtoColor.Clause (TCSlib/Complexity/NPReductions/ThreeSATToColoring.lean:79): verbatim
- Verified
- 07 Oct 2026
- Axioms
- none listed
- Built on 1
- SATtoColor.LiteralA literal for switching-lemma formulas: a variable $\mathtt{var} : \mathrm{Fin}\,n$ with a negation flag $\mathtt{neg} : \mathrm{Bool}$…
- Used by 9
- SATtoColor.SatisfiesSat3An assignment $\mathrm{assign}$ satisfies a 3-SAT instance $f$ if every clause in the list $f$ is satisfied by $\mathrm{assign}$,…
- SATtoColor.EdgeRelation$\mathrm{EdgeRelation}(f, u, v)$ defines the (undirected) adjacency structure of the reduction graph. The edges are: all pairs of distinct…
- SATtoColor.sat3Coloring_litNodeColor of a literal node. Fix a variable type $V$ and a Boolean assignment $\alpha : V \to \{\text{true}, \text{false}\}$, and consider the…
- SATtoColor.OutputVertexThe vertex set of the reduction graph is the inductive type $\mathrm{OutputVertex}(V)$ with three constructors:
•… - SATtoColor.SATtoColorSoundnessSoundness of the 3-SAT to 3-colouring reduction. Let $f$ be a 3-SAT instance over a variable type $V$, that is, a list of clauses, each…
- SATtoColor.SatisfiesClauseUnder assignment $\mathrm{assign}$, a clause $c$ is satisfied if at least one of its three literals evaluates to
true:… - SATtoColor.SATtoColorCompletenessCompleteness of the 3-SAT to 3-coloring reduction. Let $f$ be a 3-SAT instance over a variable type $V$, that is, a list of clauses, each…
- SATtoColor.Sat3A 3-SAT instance over variable type $V$ is defined as a list of clauses, i.e.\ $\mathrm{Sat3}(V) := \mathrm{List}(\mathrm{Clause}\,V)$.
- SATtoColor.sat3ColoringGiven a satisfying assignment $\mathrm{assign} : V \to \mathrm{Bool}$, the function $\mathrm{sat3Coloring}(\mathrm{assign})$ maps every…
Lean source view module on GitHub
set_option relaxedAutoImplicit false in set_option autoImplicit false in structure SATtoColor.Clause (V : Type) where l1 : Literal V l2 : Literal V l3 : Literal V