The implication graph of a Krom program #
A Krom program, instantiated in a structure, is a 2-CNF: its propositional
variables are the atoms of the block at tuples of elements
(DescriptiveComplexity.KromImpl.KromAtom), and each clause of the program contributes
one propositional clause per valuation of its universally quantified variables
satisfying its guard (DescriptiveComplexity.KromImpl.clauseRel).
So the criterion of DescriptiveComplexity.TwoCnf applies, and gives the fact this
file exists for:
(∃ ρ, prog.Holds ρ) ↔ no goal clause fires ∧ no literal reaches its own negation and back
(DescriptiveComplexity.KromImpl.exists_holds_iff). The first conjunct is the empty
clause of the 2-CNF, which has no place in the abstract criterion and is
therefore carried separately: a clause of the program with neither literal
slot filled is guard → ⊥, and its firing makes the program unsatisfiable
outright.
This is the Lean-level half of the converse translation from the Krom fragment
to FO(TC): what remains after it is to express the implication graph as a
DescriptiveComplexity.TCSpec, i.e. to build the transition formulas that walk it. The
half proved here is where the mathematics is; the other half is formula
plumbing.
The propositional variables #
A propositional variable of the instantiated program: a relation variable of the block together with a tuple of elements.
Equations
- DescriptiveComplexity.KromImpl.KromAtom B A = ((i : B.ι) × (Fin (B.arity i) → A))
Instances For
Dependency graph
Dependency graph
The block assignment described by a truth assignment of the propositional variables.
Equations
- DescriptiveComplexity.KromImpl.toAssign ν i x = ν ⟨i, x⟩
Instances For
Dependency graph
The truth assignment of the propositional variables described by a block assignment.
Equations
- DescriptiveComplexity.KromImpl.ofAssign ρ a = ρ a.fst a.snd
Instances For
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The propositional variable an atom denotes at a valuation.
Equations
Instances For
Dependency graph
The literal a Krom literal denotes at a valuation.
Equations
Instances For
Dependency graph
Dependency graph
The 2-CNF of a program #
The clauses of the instantiated program, as a 2-CNF in the sense of
DescriptiveComplexity.TwoCnf: a clause of the program whose guard holds at some
valuation contributes the disjunction of its two literals, read at that
valuation. A unit clause contributes the disjunction of its literal with
itself, which is what DescriptiveComplexity.TwoCnf expects.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The ordered pairs of literals a clause contributes to the implication
graph: the clause ℓ₁ ∨ ℓ₂ gives the edges ¬ℓ₁ → ℓ₂ and ¬ℓ₂ → ℓ₁, and a
unit clause ℓ the edge ¬ℓ → ℓ. The pair records the two clause literals,
the edge running from the negation of the first to the second.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The implication graph, clause by clause: there is an edge from p to
q exactly when some clause of the program, at some valuation satisfying its
guard, contributes the pair whose first literal is the negation of p and
whose second is q. The DescriptiveComplexity.TwoCnf.Step on the left is symmetric in
the two literals of a clause, which is why the ordered pairs of
DescriptiveComplexity.KromImpl.edgePairs suffice.
Dependency graph
Some goal clause of the program fires: a clause with neither literal slot
filled whose guard holds. Such a clause is guard → ⊥, so the program is then
unsatisfiable, a case the abstract criterion does not cover.
Equations
Instances For
Dependency graph
An assignment satisfies the program iff it satisfies the 2-CNF and no goal clause fires.
Dependency graph
The criterion for a Krom program: it is satisfiable exactly when no goal clause fires and no literal of its implication graph reaches its own negation and back.