NAEtoColor.OutputVertex
inductiveimported Lean
The vertex set of the reduction graph is an inductive type with three
constructors:
• $\mathtt{groundNode}$ --- a single ground vertex (colored ``neutral'');
• $\mathtt{varNode}\;v$ --- one vertex per variable $v \in V$;
• $\mathtt{clauseNode}\;c\;k$ --- three internal gadget vertices
($k \in \mathrm{Fin}\,3$) for each clause $c$.
Statement
set_option relaxedAutoImplicit false in set_option autoImplicit false in inductive NAEtoColor.OutputVertex (V : Type)
- Defined in
- TCSlib, `NAEtoColor.OutputVertex`
- 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.OutputVertex← NAEtoColor.OutputVertex (TCSlib/Complexity/NPReductions/NAESATToColoring.lean:146): verbatim
- Verified
- 07 Oct 2026
- Axioms
- none listed
- Built on 1
- NAEtoColor.NAEclauseA Not-All-Equal Clause
- Used by 6
- NAEtoColor.NAEtoColorReductionCorrectness of the NAE-SAT to 3-coloring reduction. Let $f$ be a NAE-SAT instance over a variable type $V$, and let $\Gamma(f)$ denote its…
- 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.naeColoringGiven a Boolean assignment $\mathit{assign} : V \to \mathtt{Bool}$, defines a coloring of all vertices of the reduction graph by:…
- NAEtoColor.ReductionGraphGiven a NAE-SAT instance $f$, $\texttt{NAEtoColor.ReductionGraph}\;f$ is the simple graph on $\texttt{NAEtoColor.OutputVertex}\;V$ whose…
- NAEtoColor.EdgeRelationGiven a NAE-SAT instance $\mathit{clauses}$, the directed edge relation on $\texttt{NAEtoColor.OutputVertex}\;V$ is defined by: (1)…
Lean source view module on GitHub
set_option relaxedAutoImplicit false in set_option autoImplicit false in /-- Vertex set for reduction from NAE-SAT to 3-COLORING. We map the input variables to output vertices using an inductive type. This cleanly separates the three kinds of vertices without any integer indexing: • groundNode – 1 ground node, who color is 0 (assume True = 1, False = 2). • varNode – 1 node per variable. • clauseNode – 3 internal nodes per clause that encode the NAE constraint. -/ inductive NAEtoColor.OutputVertex (V : Type) | groundNode -- ground vertex colored "neutral" | varNode (v : V) -- one node per variable | clauseNode (c : NAEclause V) (idx : Fin 3) -- 3 nodes per clause