De Morgan formulas #
A De Morgan formula is a formula over the De Morgan signature, Formula Boolean.signature n,
evaluated under Boolean.interpretation. Negations may appear anywhere. Pushing them to the
leaves by De Morgan's laws does not change the leaf size, so lower bounds on the leaf size of these
formulas are at least as strong as for formulas whose negations sit at the leaves
Jukna, Chapter 6.
Main definitions #
Cslib.Circuits.Formula.const,Cslib.Circuits.Formula.not,Cslib.Circuits.Formula.and,Cslib.Circuits.Formula.or: De Morgan formulas built from constants and smaller formulas.Cslib.Circuits.Formula.xor: the exclusive or(F ∧ ¬G) ∨ (¬F ∧ G).Cslib.Circuits.Formula.orList,Cslib.Circuits.Formula.andList: the disjunction and the conjunction of a list of formulas as balanced trees of binary gates (Formula.balanced).Cslib.Circuits.Boolean.formulaDepth: the least depth of a De Morgan formula for a function, with negations and constants free.
Main results #
Cslib.Circuits.Formula.size_orList_add_one,Cslib.Circuits.Formula.depthWith_orList_le,Cslib.Circuits.Formula.size_andList_add_one,Cslib.Circuits.Formula.depthWith_andList_le: a balanced tree ofk ≥ 1formulas addsk - 1nodes and⌈log₂ k⌉levels.Cslib.Circuits.Formula.exists_computes: every Boolean function has a De Morgan formula.Cslib.Circuits.Boolean.exists_computes_depthWith_eq_formulaDepth: some formula attains the formula depth.Cslib.Circuits.Boolean.arity_le_two: the De Morgan basis has fan-in at most two.
References #
The constant De Morgan formula.
Instances For
The negation of a De Morgan formula.
Instances For
The conjunction of two De Morgan formulas.
Instances For
The disjunction of two De Morgan formulas.
Instances For
The exclusive or of two De Morgan formulas, (F ∧ ¬G) ∨ (¬F ∧ G).
Instances For
A negation adds one operation node.
A negation is one deeper than its argument.
A conjunction is the binary node of .and.
A disjunction is the binary node of .or.
The disjunction of a list of De Morgan formulas, as a balanced tree (Formula.balanced); the
constant false for no formulas.
Instances For
The conjunction of a list of De Morgan formulas, as a balanced tree (Formula.balanced); the
constant true for no formulas.
Instances For
The disjunction of one formula is that formula.
The conjunction of one formula is that formula.
A balanced disjunction is deeper than its disjuncts by ⌈log₂⌉ of their number times the
cost of a disjunction; the disjunction of no formulas is a constant.
A balanced conjunction is deeper than its conjuncts by ⌈log₂⌉ of their number times the
cost of a conjunction; the conjunction of no formulas is a constant.
With negations and constants free, a balanced disjunction is deeper than its disjuncts by
⌈log₂⌉ of their number.
With negations and constants free, a balanced conjunction is deeper than its conjuncts by
⌈log₂⌉ of their number.
The literal of bit i that is true at z.
Instances For
Every Boolean function has a De Morgan formula: its disjunctive normal form.
The least depth of a De Morgan formula computing f, with negations and constants free: the
least depth with costs binaryCost (Formula.minDepthWith), which is finite because every
function has a formula (Formula.exists_computes).
Instances For
The formula depth is the least depth with costs binaryCost.
The formula depth is at most the depth of every formula computing the function.
Some formula attains the formula depth.