AFTD Auto-Formalizing Theoretical Domains

ThreeSATToClique.getLitInClause

defimported Lean

Given 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 $1$, and $c.l_3$ at position $2$.

Statement

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
def ThreeSATToClique.getLitInClause {V : Type} (c : Clause3 V) : Fin 3 → Literal V
Defined in
TCSlib, `ThreeSATToClique.getLitInClause`
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
Built on 2
  • ThreeSATToClique.LiteralA literal for switching-lemma formulas: a variable $\mathtt{var} : \mathrm{Fin}\,n$ with a negation flag $\mathtt{neg} : \mathrm{Bool}$…
  • 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…
Used by 2
  • 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.getLitAt_mem_clauseVertex literal lies among its clause's three literals. Let $f$ be a 3-CNF formula, let $v$ be a vertex of the conflict graph of $f$, and…

Lean source view module on GitHub

set_option relaxedAutoImplicit false in
set_option autoImplicit false in
/-- Extract the literal at position `p` from a 3-clause. -/
def ThreeSATToClique.getLitInClause {V : Type} (c : Clause3 V) : Fin 3 → Literal V
  | ⟨0, _⟩ => c.l1
  | ⟨1, _⟩ => c.l2
  | ⟨2, _⟩ => c.l3
See it in the graphDiscuss this resultChallenge it