The semantics of Clause and CNF: evaluation with respect to an assignment, together with the
Sat and Unsat predicates built on top of it.
Evaluating a Clause with respect to an assignment a.
Equations
- Std.Sat.CNF.Clause.eval a c = c.literals.any fun (x : Std.Sat.Literal α) => match x with | (i, n) => a i == n
Instances For
Equations
- Std.Sat.CNF.Clause.Sat a c = (Std.Sat.CNF.Clause.eval a c = true)
Instances For
Evaluating a CNF formula with respect to an assignment a.
Equations
- Std.Sat.CNF.eval a f = f.clauses.all fun (c : Std.Sat.CNF.Clause α) => Std.Sat.CNF.Clause.eval a c
Instances For
Equations
- Std.Sat.CNF.Sat a f = (Std.Sat.CNF.eval a f = true)
Instances For
@[simp]
theorem
Std.Sat.CNF.sat_of_all_mem_sat
{α : Type u_1}
{f : CNF α}
{a : α → Bool}
:
(∀ (c : Clause α), c ∈ f → Clause.Sat a c) → Sat a f
theorem
Std.Sat.CNF.sat_of_mem
{α : Type u_1}
{a : α → Bool}
{c : Clause α}
{f : CNF α}
(h1 : Sat a f)
(h2 : c ∈ f)
:
Clause.Sat a c