Documentation

Complexitylib.Circuits.DecisionTree.Finite

Finite-arity decision trees #

DecisionTree.On N records the input arity in its query labels. It is the decision-tree representation used by finite switching and restriction arguments; no query can silently fall outside the sampled variable set.

Erasing query bounds preserves evaluation on the canonical total extension of a bit string.

Erasing query bounds preserves depth exactly.

Erasing query bounds preserves leaf count exactly.

A depth-d finite decision tree has at most 2 ^ d leaves.

A finite-arity tree queries at most its declared number of variables.

theorem Complexity.DecisionTree.On.eval_neg {N : } (input : BitString N) (tree : On N) :
eval input tree.neg = !eval input tree

Negating every leaf complements the computed function.

theorem Complexity.DecisionTree.On.depth_neg {N : } (tree : On N) :
tree.neg.depth = tree.depth

Leaf negation preserves query depth exactly.

Leaf negation preserves the number of leaves exactly.

theorem Complexity.DecisionTree.On.vars_neg {N : } (tree : On N) :
tree.neg.vars = tree.vars

Leaf negation preserves the queried-variable set exactly.

theorem Complexity.DecisionTree.On.eval_restrict {N : } (restriction : Restriction.On N) (input : BitString N) (tree : On N) :
eval input (restrict restriction tree) = eval (restriction.applyTo input) tree

Restriction commutes with finite-tree evaluation.

theorem Complexity.DecisionTree.On.depth_restrict_le {N : } (restriction : Restriction.On N) (tree : On N) :
(restrict restriction tree).depth tree.depth

Restriction cannot increase finite decision-tree depth.

theorem Complexity.DecisionTree.On.vars_restrict_subset_filter {N : } (restriction : Restriction.On N) (tree : On N) :
(restrict restriction tree).vars {indextree.vars | restriction index = none}

Every query surviving restriction was queried originally and remains free.

theorem Complexity.DecisionTree.On.restrict_comp {N : } (first second : Restriction.On N) (tree : On N) :
restrict second (restrict first tree) = restrict (first.comp second) tree

Sequential restriction agrees with left-biased finite composition.