AFTD Auto-Formalizing Theoretical Domains

ThreeSATToClique.Literal

inductiveimported Lean

A literal for switching-lemma formulas: a variable $\mathtt{var} : \mathrm{Fin}\,n$ with a negation flag $\mathtt{neg} : \mathrm{Bool}$ (true = negated literal).

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
inductive ThreeSATToClique.Literal (V : Type)
Defined in
TCSlib, `ThreeSATToClique.Literal`
Lean proof
By Yangshuo Zou, from github.com/Shilun-Allan-Li/tcslib at c8a02591b1e5 (Copyright (c) 2026 Yangshuo Zou. 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
Used by 8
  • ThreeSATToClique.getLitInClauseGiven a 3-clause $c$ and a position $p : \mathrm{Fin}\,3$, returns the $p$-th literal of $c$: $c.l_1$ at position $0$, $c.l_2$ at position…
  • ThreeSATToClique.no_conflict_of_trueTrue literals never conflict. Let $\alpha$ be a truth assignment on a set $V$ of variables, and let $\ell_1,\ell_2$ be literals over $V$,…
  • ThreeSATToClique.getLitAtGiven a 3-CNF formula $f$ and a vertex $v : \mathtt{CliqueVertex}\,f.\mathtt{length}$, returns the literal at position $v.l\_idx$ within…
  • ThreeSATToClique.ThreeSAT_to_Clique_soundnessSoundness of the 3-SAT to clique reduction. Let $f$ be a 3-CNF formula consisting of $m$ clauses. If the conflict graph of $f$ has an…
  • ThreeSATToClique.evalLiteralGiven a truth assignment $\alpha : V \to \mathrm{Prop}$, the evaluation of a literal $\ell$ under $\alpha$ is $\alpha(v)$ when…
  • ThreeSATToClique.Clause3A 3-clause over $V$ is a structure with exactly three literals $l_1, l_2, l_3 : \mathtt{Literal}\,V$, representing a disjunction of…
  • ThreeSATToClique.literalsConflictTwo literals $l_1$ and $l_2$ conflict if one is the positive and the other the negative occurrence of the same variable, i.e.\…
  • ThreeSATToClique.literalsConflict_symmSymmetry of literal conflict. Call two literals over a variable set *conflicting* when one is the positive and the other the negative…

Lean source view module on GitHub

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
/-- A literal is either a positive or negative occurrence of a variable. -/
inductive ThreeSATToClique.Literal (V : Type) | pos (v : V)
  | neg (v : V)
See it in the graphDiscuss this resultChallenge it