Iterated switching for AC0 formulas -- definitions #
A restriction stage is stored newest first. The tail therefore contains the earlier stages used to simplify the children of a gate, while the head is the next restriction used to switch the normal form assembled at that gate.
This representation is finite and nonuniform. It contains restrictions and formula trees only; it does not contain or assume a circuit generator.
A newest-first sequence of exactly stageCount finite restrictions.
Equations
- Complexity.Switching.RestrictionStages N 0 = Unit
- Complexity.Switching.RestrictionStages N stageCount.succ = (Complexity.Restriction.On N × Complexity.Switching.RestrictionStages N stageCount)
Instances For
Compose all stages chronologically, so earlier fixed values take precedence over later stages.
Equations
- Complexity.Switching.RestrictionStages.cumulative 0 x_2 = Complexity.Restriction.On.empty
- Complexity.Switching.RestrictionStages.cumulative stageCount.succ stages = (Complexity.Switching.RestrictionStages.cumulative stageCount stages.2).comp stages.1
Instances For
Independent sparse-restriction seeds for exactly stageCount stages.
The recursive product stores the earlier stages before the newest seed.
Equations
- Complexity.RandomRestriction.StageSeed N q 0 = Unit
- Complexity.RandomRestriction.StageSeed N q stageCount.succ = (Complexity.RandomRestriction.StageSeed N q stageCount × Complexity.RandomRestriction.Seed N q)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Decode every seed in a staged sparse restriction.
Equations
Instances For
The cumulative finite restriction decoded from all stages.
Equations
Instances For
Count staged seeds whose decoded restrictions satisfy event.
Equations
- Complexity.RandomRestriction.stageEventCount q event = {seeds : Complexity.RandomRestriction.StageSeed N q stageCount | event (Complexity.RandomRestriction.decodeStages seeds)}.card
Instances For
Sum, over all staged seeds, of the number of variables left free by the cumulative restriction.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The depth-at-most-one decision tree used at the bottom of the staged compiler. Gate cases are a harmless fallback: correctness uses this construction only when the formula has connective depth zero.
Equations
- One or more equations did not get rendered due to their size.
- (Complexity.AC0Formula.const value).baseDecisionTree = Complexity.DecisionTree.On.leaf value
- (Complexity.AC0Formula.and children).baseDecisionTree = Complexity.DecisionTree.On.leaf (Complexity.AC0Formula.evalAll (fun (x : Fin N) => false) children)
- (Complexity.AC0Formula.or children).baseDecisionTree = Complexity.DecisionTree.On.leaf (Complexity.AC0Formula.evalAny (fun (x : Fin N) => false) children)
Instances For
Compile a depth-bounded AC0 formula through a newest-first sequence of switching stages.
At a gate, the earlier stages recursively compile every child to a decision tree. A conjunction of those trees becomes a CNF and a disjunction becomes a DNF. The newest restriction is then handled by the corresponding complete block switching tree.
Equations
- One or more equations did not get rendered due to their size.
- Complexity.AC0Formula.stagedDecisionTree 0 x_3 x✝ = x✝.baseDecisionTree
Instances For
The staged compiler fails its target depth when its output has depth at
least queryCount.
Equations
- formula.stagedBad queryCount stages = (queryCount ≤ (Complexity.AC0Formula.stagedDecisionTree stageCount stages formula).depth)
Instances For
Equations
- formula.stagedBadDecidable queryCount stageCount stages = id inferInstance