@[reducible, inline]
A conjunction of clauses
Equations
- Trestle.Cnf L = Array (Trestle.Clause L)
Instances For
A conjunction of literals. The implementation is identical to clauses, but the interpretation is different.
Equations
- Trestle.Cube L = Array L
Instances For
Equations
- Trestle.Clause.instToString = { toString := fun (C : Trestle.Clause L) => toString "(" ++ toString (" ∨ ".intercalate (Array.map toString C).toList) ++ toString ")" }
def
Trestle.Clause.map
{L : Type u}
{ν : Type v}
[LitVar L ν]
{ν' : Type u_1}
(L' : Type u_2)
[LitVar L' ν']
(f : ν → ν')
(c : Clause L)
:
Clause L'
Equations
- Trestle.Clause.map L' f c = Array.map (Trestle.LitVar.map f) c
Instances For
Equations
- Trestle.Cnf.instToString = { toString := fun (C : Trestle.Cnf L) => toString "" ++ toString (" ∧ ".intercalate (Array.map toString C).toList) ++ toString "" }
Equations
- f.addClause C = Array.push f C
Instances For
Equations
- Trestle.Cnf.any ls = #[ls]
Instances For
Equations
- Trestle.Cnf.all ls = Array.map (fun (l : L) => #[l]) ls
Instances For
Equations
- Trestle.Cube.instToString = { toString := fun (C : Trestle.Cube L) => toString "(" ++ toString (" ∧ ".intercalate (Array.map toString C).toList) ++ toString ")" }
Equations
def
Trestle.Cube.map
{L : Type u}
{ν : Type v}
[LitVar L ν]
{ν' : Type u_1}
(L' : Type u_2)
[LitVar L' ν']
(f : ν → ν')
(c : Cube L)
:
Cube L'
Equations
- Trestle.Cube.map L' f c = Array.map (Trestle.LitVar.map f) c
Instances For
Instances For
Equations
- c1.prod c2 = List.map (fun (x : Trestle.Cube L × Trestle.Cube L) => match x with | (a, b) => a.and b) (List.product c1 c2)