AFTD Auto-Formalizing Theoretical Domains

SATtoColor.SatisfiesLiteral

defimported Lean

Given a Boolean assignment $\mathrm{assign} : V \to \mathrm{Bool}$, the function $\texttt{SATtoColor.SatisfiesLiteral}$ evaluates a literal: a positive literal $\mathrm{pos}(v)$ evaluates to $\mathrm{assign}(v)$, and a negative literal $\mathrm{neg}(v)$ evaluates to $\neg\,\mathrm{assign}(v)$.

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
def SATtoColor.SatisfiesLiteral {V : Type} (assign : V → Bool) : Literal V → Bool
Defined in
TCSlib, `SATtoColor.SatisfiesLiteral`
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.
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 5
  • 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.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.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
def SATtoColor.SatisfiesLiteral {V : Type} (assign : V → Bool) : Literal V → Bool
  | Literal.pos v => assign v
  | Literal.neg v => !(assign v)
See it in the graphDiscuss this resultChallenge it