The constant-free De Morgan basis #
The basis of fan-in-two AND, fan-in-two OR and NOT, with no constant gates, is the circuit model of
Ilango, Loff and Oliveira [IlangoLoffOliveira2020, p. 22:3]: "A Boolean circuit consists of fan-in
two AND gates, fan-in two OR gates, and NOT gates", and its size is "the number of AND, OR, and
NOT gates". Here Circuit.size counts every gate, so the size of a circuit over
Boolean.DeMorgan.signature is exactly that number. cslib's Boolean.signature is the same basis
with the two constants added; the map Boolean.DeMorgan.toBoolean embeds the first in the second,
keeping sizes (Circuit.size_mapOp) and the computed function.
Without constants and without inputs no gate can be built (Program.size_eq_zero_of_deMorgan), so
no function on zero inputs has a circuit: the basis is not complete in cslib's sense
(Boolean.DeMorgan.not_isComplete), and complexities over it are taken in ℕ∞ (ecomplexity).
Boolean.DeMorganBasis I packages what results stated for both bases use: a meaning-keeping map
from the constant-free basis into the signature of I, which supplies binary AND, binary OR and
unary NOT gates, together with a bound of two on every arity and at most five operations. It has
instances for the constant-free basis and for cslib's Boolean.interpretation. Only the first has
the size measure of the source: in the second a constant costs one gate, while without constants
it costs two (x ∧ ¬x), so results over cslib's basis are library variants of the source's.
Main definitions #
Cslib.Circuits.Boolean.DeMorgan.signature,Cslib.Circuits.Boolean.DeMorgan.interpretation: the constant-free De Morgan basis and its Boolean meaning.Cslib.Circuits.Boolean.DeMorgan.toBoolean: its map into cslib'sBoolean.signature.Cslib.Circuits.Boolean.DeMorganBasis: interpretations with AND, OR and NOT gates, fan-in at most two and at most five operations.
Main results #
Cslib.Circuits.ecomplexity_le_of_preserves: a meaning-keeping map of signatures does not increase complexity.Cslib.Circuits.Boolean.DeMorgan.ecomplexity_boolean_le: complexity with constants is at most complexity without them.Cslib.Circuits.Program.size_eq_zero_of_deMorgan,Cslib.Circuits.Boolean.DeMorgan.ecomplexity_eq_top,Cslib.Circuits.Boolean.DeMorgan.not_isComplete: without inputs there are no gates and nothing to compute.
References #
A map of signatures that keeps the meaning of every operation does not increase complexity: translating a circuit gate by gate keeps its size and its function.
The three operations of the constant-free basis.
The constant-free De Morgan signature: NOT is unary, AND and OR are binary.
The Boolean meaning of the constant-free De Morgan basis.
Instances For
The constant-free basis as a part of cslib's De Morgan basis with constants.
Instances For
The embedding keeps the meaning of every operation.
Without constants and without inputs no gate has an argument, so a program over the constant-free De Morgan basis on zero inputs has no gates.
The constant-free De Morgan basis is not complete: no circuit computes a function on zero inputs.
An interpretation over a De Morgan basis: a meaning-keeping map from the constant-free De Morgan basis into its signature, which supplies binary AND, binary OR and unary NOT gates, with every operation of arity at most two and at most five operations. Results proved under this class hold for the constant-free basis of Ilango, Loff and Oliveira and for cslib's basis with constants alike; only the first has the source's size measure.
- hom : DeMorgan.signature.Hom σ
The AND, OR and NOT gates of the basis.
The gates mean AND, OR and NOT.
Every operation has at most two arguments.
The basis has finitely many operations.
The basis has at most five operations, as many as cslib's basis with its two constants, so that counting bounds over a De Morgan basis are uniform in the basis.
Instances
The constant-free basis is a De Morgan basis.
cslib's De Morgan basis with constants is a De Morgan basis.