Directed wires for CNF substitution #
A wire lists pairs of cell entry and exit variables, from its source to its clause. Local constraints must equate the two values in each cell. One binary implication joins each exit to the next entry. Positive literals direct that implication backwards; negative literals direct it forwards. In either case, a true literal at the final exit implies the source literal. Constant values satisfy every link.
These are conditional composition rules. They construct no layout and do not establish that any particular generator satisfies the local equalities or endpoint conditions.
Main definitions #
Cslib.Logic.PL.CNF.DirectedWire.links: one directed binary clause per cell gap.Cslib.Logic.PL.CNF.DirectedWire.assemble: endpoint clauses and links for indexed occurrences.
Main results #
Cslib.Logic.PL.CNF.DirectedWire.propagate: literal truth propagates from final exit to entry.Cslib.Logic.PL.CNF.DirectedWire.eval_links_of_constant: constant signals satisfy the links.Cslib.Logic.PL.CNF.DirectedWire.length_links: exact clause count, including empty wires.Cslib.Logic.PL.CNF.DirectedWire.eval_assemble_sound: projection under local constraints.Cslib.Logic.PL.CNF.DirectedWire.eval_assemble_complete: compatibility-based completeness.Cslib.Logic.PL.CNF.DirectedWire.length_assemble,Cslib.Logic.PL.CNF.DirectedWire.length_vars_assemble: exact total resource counts.
References #
The polarity-directed composition and cell-pair construction are original.
A positive literal propagates truth backwards; a negative literal propagates falsity backwards by a forward implication. This reuses the ordinary implication-clause constructor.
Instances For
Given local entry/exit equality in each cell, final literal truth implies initial truth.
The propagation rule for a possibly empty list, with nonemptiness stated explicitly. The fallback only makes the endpoint expressions total; it is unused under this hypothesis.
There is exactly one clause per consecutive gap.
Every directed link has exactly two literals, even if its endpoints coincide.
Replace each original literal by the final exit variable on its occurrence's wire, retaining its polarity and its clause/literal position.
Instances For
The directed-link clauses for every original literal occurrence, including duplicates.
Instances For
Original clauses at their wire endpoints, followed by all directed links. Local cell constraints, such as crossover formulas, are supplied separately by the caller.
Instances For
Evaluation of the replacement clauses, indexed by the original clause and literal positions.
The global link block holds exactly when every occurrence's wire links hold.
Satisfaction projects back to the ordinary source formula when the caller proves local cell equality and agreement between the first entries and source variable values.
A source satisfying assignment extends through the link assembly whenever the caller supplies one compatible target assignment constant along each occurrence's nonempty wire. This is an assignment-level conditional result, not an existence theorem for such a target.
Clause replacement preserves all original clause widths.
The link block has one clause per gap of each occurrence's wire.
Exact total clause count: original clauses plus all intercell gaps.
Endpoint replacement preserves the number of source literal occurrences.
The global link block contributes exactly two literals per gap.
Exact total literal count, with no distinctness assumptions on signal variables.
Source clause widths are preserved and every added clause is binary.