Boolean decision trees #
Decision trees over Boolean variables, with evaluation, depth, and leaf-count
measures (roadmap track L4). A decision tree queries one variable per internal
node and branches on its value; leaves carry the output bit. Decision trees are
the combinatorial substrate for restrictions and switching-lemma arguments, and
are distinct from the DAG-shaped Circuit.
Main definitions and results #
DecisionTree— the tree syntaxDecisionTree.eval— evaluation under an assignmentDecisionTree.depth,DecisionTree.numLeaves— the query-depth and leaf-count measuresDecisionTree.numLeaves_le_two_pow_depth— a depth-dtree has at most2 ^ dleavesDecisionTree.vars,DecisionTree.eval_eq_of_agree— the queried-variable set and the locality property: a tree's output depends only on the variables it queries (a decision tree is a junta onvars)DecisionTree.toFormula,DecisionTree.toFormula_eval— compilation to an equivalent Boolean formula (the decision-tree ⟹ formula direction)
A Boolean decision tree: a leaf carries an output bit; a node i t₀ t₁
queries variable i and continues into t₀ if it is false, t₁ if
true.
- leaf
(b : Bool)
: DecisionTree
A leaf carrying output bit
b. - node
(i : ℕ)
(t₀ t₁ : DecisionTree)
: DecisionTree
Query variable
i; branch tot₀onfalse,t₁ontrue.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Complexity.instDecidableEqDecisionTree.decEq (Complexity.DecisionTree.leaf a) (Complexity.DecisionTree.leaf b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Complexity.instDecidableEqDecisionTree.decEq (Complexity.DecisionTree.leaf b) (Complexity.DecisionTree.node i t₀ t₁) = isFalse ⋯
- Complexity.instDecidableEqDecisionTree.decEq (Complexity.DecisionTree.node i t₀ t₁) (Complexity.DecisionTree.leaf b) = isFalse ⋯
Instances For
The query depth of a decision tree (the longest root-to-leaf path).
Equations
- (Complexity.DecisionTree.leaf b).depth = 0
- (Complexity.DecisionTree.node i t₀ t₁).depth = max t₀.depth t₁.depth + 1
Instances For
The number of leaves of a decision tree.
Equations
- (Complexity.DecisionTree.leaf b).numLeaves = 1
- (Complexity.DecisionTree.node i t₀ t₁).numLeaves = t₀.numLeaves + t₁.numLeaves
Instances For
The set of variables a decision tree queries.
Equations
Instances For
Every decision tree has at least one leaf.
A depth-d decision tree queries fewer than 2 ^ d distinct variables
(|vars t| < 2 ^ depth t), the branching-count bound behind decision-tree
complexity.
A decision tree of depth d has at most 2 ^ d leaves.
Compile a decision tree into an equivalent Boolean formula: a leaf becomes a
constant, and a query node node i t₀ t₁ becomes
(x_i ∧ ⟦t₁⟧) ∨ (¬x_i ∧ ⟦t₀⟧).
Equations
Instances For
The compiled formula computes the same function as the tree.
The compiled formula has depth at most 2 · depth t + 1: each query node
expands to a two-level ∨-of-∧ gadget, and the negated literal adds one
further level.