Documentation

Complexitylib.Circuits.DecisionTree

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 #

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.

Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      The query depth of a decision tree (the longest root-to-leaf path).

      Equations
      Instances For

        The number of leaves of a decision tree.

        Equations
        Instances For

          The set of variables a decision tree queries.

          Equations
          Instances For
            @[simp]
            theorem Complexity.DecisionTree.eval_leaf (α : Bool) (b : Bool) :
            eval α (leaf b) = b
            @[simp]
            theorem Complexity.DecisionTree.eval_node (α : Bool) (i : ) (t₀ t₁ : DecisionTree) :
            eval α (node i t₀ t₁) = if α i = true then eval α t₁ else eval α t₀

            Every decision tree has at least one leaf.

            theorem Complexity.DecisionTree.eval_eq_of_agree (t : DecisionTree) {α β : Bool} :
            (∀ it.vars, α i = β i)eval α t = eval β t

            Locality (junta property). A decision tree's output depends only on the variables it queries: if two assignments agree on vars t, they yield the same value.

            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.