Documentation

CslibFrontier.Computability.DecisionTree.NormalForm

Decision trees in normal form #

The paths of a decision tree to leaves labelled true are the terms of a formula in disjunctive normal form computing the same function (DecisionTree.toDNF), and the paths to leaves labelled false, negated, are the clauses of a formula in conjunctive normal form (DecisionTree.toCNF). A path reads each variable at most once, a variable read again following the branch of its first reading, so the terms and clauses have distinct variables and at most depth literals Jukna, Section 14.1. So a function of decision tree depth t is a disjunction of terms and a conjunction of clauses of width at most t.

Main definitions #

Main results #

References #

The terms of the paths of a decision tree to leaves labelled true, each extending the term p of the path so far; a variable already in p is not read again.

The formula in disjunctive normal form of the paths of a decision tree to leaves labelled true.

The formula in conjunctive normal form of the negated paths of a decision tree to leaves labelled false.

@[simp]
theorem Cslib.DecisionTree.eval_toDNF {ι : Type u_1} [DecidableEq ι] (t : DecisionTree ι Bool) (x : ι → Bool) :

The paths to leaves labelled true compute the tree.

@[simp]
theorem Cslib.DecisionTree.eval_toCNF {ι : Type u_1} [DecidableEq ι] (t : DecisionTree ι Bool) (x : ι → Bool) :

The negated paths to leaves labelled false compute the tree.

The terms of the normal form of a tree have at most depth literals.

The terms of the normal form of a tree read each variable once.

The clauses of the conjunctive normal form of a tree have at most depth literals.