Switching-lemma substrate -- definitions #
Two decision-tree constructions are provided. The elementary canonical tree queries one variable at a time. The switching tree instead queries every currently free variable of the first surviving term before it either accepts or continues. This complete-block construction is the one needed by the standard switching-lemma encoding.
The explicit fuel is a proof-engineering device. The public construction starts with the number of variables in the DNF, and its correctness proof shows that each recursive query removes its variable from support.
Auxiliary information carried by the elementary deepest-path encoding: the queried input coordinate and chosen branch bit at each path position.
Equations
Instances For
Per-query advice for a width-sensitive switching encoding: a bounded literal position, the original path bit, and an end-of-phase marker.
Equations
Instances For
A term is consistent when repeated occurrences of one variable always have the same polarity. Contradictory terms must be removed or excluded before using their polarities as a satisfying assignment.
Equations
Instances For
Every term in the DNF is internally consistent.
Equations
- formula.Consistent = ∀ term ∈ formula.terms, Complexity.DNF.TermConsistent term
Instances For
Remove contradictory DNF terms. Such terms are identically false, so this semantic cleanup does not change the represented function.
Equations
- formula.consistentPart = { terms := List.filter (fun (term : List (Complexity.Literal N)) => decide (Complexity.DNF.TermConsistent term)) formula.terms }
Instances For
The first original term that survives a restriction, paired with its reduced list of free literals. Keeping the original term supplies the provenance needed by width-sensitive switching encodings.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Fuelled canonical decision tree for a DNF.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.DNF.canonicalDecisionTreeAux 0 x✝ = Complexity.DecisionTree.On.leaf (x✝.eval fun (x : Fin N) => false)
- Complexity.DNF.canonicalDecisionTreeAux n.succ { terms := [] } = Complexity.DecisionTree.On.leaf false
- Complexity.DNF.canonicalDecisionTreeAux n.succ { terms := [] :: tail } = Complexity.DecisionTree.On.leaf true
Instances For
The canonical finite decision tree for a DNF.
Equations
- formula.canonicalDecisionTree = Complexity.DNF.canonicalDecisionTreeAux formula.vars.card formula
Instances For
Fuelled block decision tree used by the switching lemma.
For the first surviving term, this tree queries every distinct variable in one
complete block. A satisfying block ends at true; every other block restricts
the DNF and continues with one less unit of fuel.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.DNF.switchingDecisionTreeAux 0 x✝ = Complexity.DecisionTree.On.leaf (x✝.eval fun (x : Fin N) => false)
- Complexity.DNF.switchingDecisionTreeAux n.succ { terms := [] } = Complexity.DecisionTree.On.leaf false
- Complexity.DNF.switchingDecisionTreeAux n.succ { terms := [] :: tail } = Complexity.DecisionTree.On.leaf true
Instances For
The canonical complete-block tree used in switching arguments.
Equations
- formula.switchingDecisionTree = Complexity.DNF.switchingDecisionTreeAux formula.vars.card formula
Instances For
Fuelled complete-block switching tree that retains the original DNF and accumulates a restriction separately. This is extensionally the same tree as first simplifying the DNF, but it preserves original-term provenance.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.DNF.switchingDecisionTreeUnderAux 0 x✝¹ x✝ = Complexity.DecisionTree.On.leaf (x✝¹.eval (x✝.applyTo fun (x : Fin N) => false))
Instances For
Complete-block switching tree for an original DNF under an accumulated restriction, with enough fuel for every surviving variable.
Equations
- formula.switchingDecisionTreeUnder restriction = Complexity.DNF.switchingDecisionTreeUnderAux (Complexity.DNF.restrict restriction formula).vars.card formula restriction
Instances For
The bad event bounded by the switching lemma: after applying the decoded
random restriction, the complete-block DNF switching tree still has depth at
least queryCount.
Equations
- formula.switchingBad queryCount restriction = (queryCount ≤ (formula.switchingDecisionTreeUnder restriction).depth)
Instances For
Equations
- formula.switchingBadDecidable queryCount restriction = id inferInstance
A CNF is consistent when no clause is tautological. Equivalently, every term in its De Morgan dual DNF is internally consistent.
Equations
- formula.Consistent = formula.neg.Consistent
Instances For
Delete tautological CNF clauses by cleaning the contradictory terms in the De Morgan dual. This preserves the represented function.
Equations
- formula.consistentPart = formula.neg.consistentPart.neg
Instances For
The canonical decision tree for a CNF, obtained by the De Morgan dual DNF and leaf complementation.
Equations
- formula.canonicalDecisionTree = formula.neg.canonicalDecisionTree.neg
Instances For
The complete-block switching tree for a CNF, obtained from its De Morgan dual DNF by complementing the leaves.
Equations
- formula.switchingDecisionTree = formula.neg.switchingDecisionTree.neg
Instances For
Complete-block switching tree for a CNF under an accumulated restriction, obtained by dualizing the provenance-preserving DNF construction.
Equations
- formula.switchingDecisionTreeUnder restriction = (formula.neg.switchingDecisionTreeUnder restriction).neg
Instances For
The CNF bad event for the switching lemma.
Equations
- formula.switchingBad queryCount restriction = (queryCount ≤ (formula.switchingDecisionTreeUnder restriction).depth)
Instances For
Equations
- formula.switchingBadDecidable queryCount restriction = id inferInstance