Restrictions #
A restriction is a partial assignment that fixes some variables to constants and leaves the rest free — the basic operation behind random-restriction and switching-lemma arguments (roadmap track L4). This module defines restrictions, their composition, and proves that evaluating a restricted Boolean formula agrees with evaluating the original under the restriction applied to the assignment (evaluation commutes with restriction).
Main definitions and results #
Restriction,Restriction.applyTo,Restriction.compRestriction.On— a finite-arity restriction suitable for finite countingRestriction.applyTo_comp— applying a composite restriction is applying the two in sequenceBoolFormula.restrict,BoolFormula.eval_restrict,BoolFormula.restrict_comp— evaluation and composition laws
A restriction: a partial assignment fixing some variables (some b) and
leaving the rest free (none).
Equations
Instances For
The restriction leaving every variable free.
Equations
Instances For
Apply a restriction on top of a total assignment: fixed variables take the restriction's value, free variables fall back to the assignment.
Instances For
Compose two restrictions: the first takes precedence, the second fills in the variables the first leaves free.
Instances For
Restriction composition is associative, with the leftmost fixed value taking precedence.
Applying a composite restriction is the same as applying the two restrictions in sequence.
Finite-arity restrictions #
A restriction on exactly N variables.
Unlike the ambient Restriction = Nat → Option Bool, this is a finite type and
can therefore be used directly as a finite probability space.
Equations
- Complexity.Restriction.On N = (Fin N → Option Bool)
Instances For
The finite restriction leaving every coordinate free.
Equations
Instances For
Extend a finite-arity restriction by leaving every index outside its declared arity free.
Instances For
Applying a singleton restriction is function update at its fixed index.
Apply a restriction to a formula, replacing each fixed variable by the corresponding constant and leaving free variables in place.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.BoolFormula.restrict ρ Complexity.BoolFormula.tru = Complexity.BoolFormula.tru
- Complexity.BoolFormula.restrict ρ Complexity.BoolFormula.fls = Complexity.BoolFormula.fls
- Complexity.BoolFormula.restrict ρ φ.neg = (Complexity.BoolFormula.restrict ρ φ).neg
- Complexity.BoolFormula.restrict ρ (φ.conj ψ) = (Complexity.BoolFormula.restrict ρ φ).conj (Complexity.BoolFormula.restrict ρ ψ)
- Complexity.BoolFormula.restrict ρ (φ.disj ψ) = (Complexity.BoolFormula.restrict ρ φ).disj (Complexity.BoolFormula.restrict ρ ψ)
Instances For
The empty restriction is the identity on formulas.
Evaluation commutes with restriction. Evaluating a restricted formula at
α equals evaluating the original formula at the restriction applied to
α.
Applying ρ₁ and then ρ₂ to a formula is syntactically the same as
applying their left-biased composition.
Restriction preserves the tree size: fixing a variable replaces a leaf by a
constant leaf, and connectives are untouched. So (restrict ρ φ).size = φ.size
— restriction never grows a formula (a fact width/size arguments rely on).
Restriction also preserves the leaf count: (restrict ρ φ).leaves = φ.leaves.
Restriction preserves the formula depth exactly: it only relabels leaves,
leaving the connective tree — and hence every root-to-leaf path length —
untouched. So (restrict ρ φ).depth = φ.depth.
Restriction only ever removes variables: vars (restrict ρ φ) ⊆ vars φ. Fixing
a variable turns its leaf into a constant (dropping it); free variables are
untouched. This is the variable-tracking fact switching-lemma arguments use to
bound the surviving support after a random restriction.
Restriction removes exactly the fixed variables from a formula's support.