HOME

TheInfoList



OR:

In
logic Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the study of deductively valid inferences or logical truths. It examines how conclusions follow from premises based on the structure o ...
, a functionally complete set of
logical connective In logic, a logical connective (also called a logical operator, sentential connective, or sentential operator) is a logical constant. Connectives can be used to connect logical formulas. For instance in the syntax of propositional logic, the ...
s or Boolean operators is one that can be used to express all possible
truth table A truth table is a mathematical table used in logic—specifically in connection with Boolean algebra, Boolean functions, and propositional calculus—which sets out the functional values of logical expressions on each of their functional arg ...
s by combining members of the
set Set, The Set, SET or SETS may refer to: Science, technology, and mathematics Mathematics *Set (mathematics), a collection of elements *Category of sets, the category whose objects and morphisms are sets and total functions, respectively Electro ...
into a
Boolean expression In computer science, a Boolean expression (also known as logical expression) is an expression used in programming languages that produces a Boolean value when evaluated. A Boolean value is either true or false. A Boolean expression may be compos ...
.. ("Complete set of logical connectives").. (" nctional completeness of set of logical operators"). A well-known complete set of connectives is . Each of the singleton sets and is functionally complete. However, the set is incomplete, due to its inability to express NOT. A gate (or set of gates) that is functionally complete can also be called a universal gate (or a universal set of gates). In a context of
propositional logic The propositional calculus is a branch of logic. It is also called propositional logic, statement logic, sentential calculus, sentential logic, or sometimes zeroth-order logic. Sometimes, it is called ''first-order'' propositional logic to contra ...
, functionally complete sets of connectives are also called (''expressively'') ''adequate''.. (Defines "expressively adequate", shortened to "adequate set of connectives" in a section heading.) From the point of view of
digital electronics Digital electronics is a field of electronics involving the study of digital signals and the engineering of devices that use or produce them. It deals with the relationship between Binary number, binary inputs and outputs by passing electrical s ...
, functional completeness means that every possible
logic gate A logic gate is a device that performs a Boolean function, a logical operation performed on one or more binary inputs that produces a single binary output. Depending on the context, the term may refer to an ideal logic gate, one that has, for ...
can be realized as a network of gates of the types prescribed by the set. In particular, all logic gates can be assembled from either only binary
NAND gate In digital electronics, a NAND (NOT AND) gate is a logic gate which produces an output which is false only if all its inputs are true; thus its output is complement to that of an AND gate. A LOW (0) output results only if all the inputs to the ...
s, or only binary
NOR gate The NOR (NOT OR) gate is a digital logic gate that implements logical NOR - it behaves according to the truth table to the right. A HIGH output (1) results if both the inputs to the gate are LOW (0); if one or both input is HIGH (1), a LOW o ...
s.


Introduction

Modern texts on logic typically take as primitive some subset of the connectives: conjunction (\land);
disjunction In logic, disjunction (also known as logical disjunction, logical or, logical addition, or inclusive disjunction) is a logical connective typically notated as \lor and read aloud as "or". For instance, the English language sentence "it is ...
(\lor);
negation In logic, negation, also called the logical not or logical complement, is an operation (mathematics), operation that takes a Proposition (mathematics), proposition P to another proposition "not P", written \neg P, \mathord P, P^\prime or \over ...
(\neg);
material conditional The material conditional (also known as material implication) is a binary operation commonly used in logic. When the conditional symbol \to is interpreted as material implication, a formula P \to Q is true unless P is true and Q is false. M ...
(\to); and possibly the
biconditional In logic and mathematics, the logical biconditional, also known as material biconditional or equivalence or bidirectional implication or biimplication or bientailment, is the logical connective used to conjoin two statements P and Q to form t ...
(\leftrightarrow). Further connectives can be defined, if so desired, by defining them in terms of these primitives. For example, NOR (the negation of the disjunction, sometimes denoted \downarrow) can be expressed as conjunction of two negations: : A \downarrow B := \neg A \land \neg B Similarly, the negation of the conjunction, NAND (sometimes denoted as \uparrow), can be defined in terms of disjunction and negation. Every binary connective can be defined in terms of \, which means that set is functionally complete. However, it contains redundancy: this set is not a ''minimal'' functionally complete set, because the conditional and biconditional can be defined in terms of the other connectives as : \begin A \to B &:= \neg A \lor B\\ A \leftrightarrow B &:= (A \to B) \land (B \to A). \end It follows that the smaller set \ is also functionally complete. (Its functional completeness is also proved by the
Disjunctive Normal Form Theorem In boolean logic, a disjunctive normal form (DNF) is a canonical normal form of a logical formula consisting of a disjunction of conjunctions; it can also be described as an OR of ANDs, a sum of products, or in philosophical logic a ''cluster ...
.) But this is still not minimal, as \lor can be defined as : A \lor B := \neg(\neg A \land \neg B). Alternatively, \land may be defined in terms of \lor in a similar manner, or \lor may be defined in terms of \rightarrow : : \ A \vee B := \neg A \rightarrow B. No further simplifications are possible. Hence, every two-element set of connectives containing \neg and one of \ is a minimal functionally complete
subset In mathematics, a Set (mathematics), set ''A'' is a subset of a set ''B'' if all Element (mathematics), elements of ''A'' are also elements of ''B''; ''B'' is then a superset of ''A''. It is possible for ''A'' and ''B'' to be equal; if they a ...
of \.


Formal definition

Given the
Boolean domain In mathematics and abstract algebra, a Boolean domain is a set consisting of exactly two elements whose interpretations include ''false'' and ''true''. In logic, mathematics and theoretical computer science, a Boolean domain is usually written ...
, a set ''F'' of Boolean functions is ''functionally complete'' if the clone on B generated by the basic functions ''f''''i'' contains all functions , for all ''strictly positive'' integers . In other words, the set is functionally complete if every Boolean function that takes at least one variable can be expressed in terms of the functions ''f''''i''. Since every Boolean function of at least one variable can be expressed in terms of binary Boolean functions, ''F'' is functionally complete if and only if every binary Boolean function can be expressed in terms of the functions in ''F''. A more natural condition would be that the clone generated by ''F'' consist of all functions , for all integers . However, the examples given above are not functionally complete in this stronger sense because it is not possible to write a
nullary In logic Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the study of deductively valid inferences or logical truths. It examines how conclusions follow from premises based on the ...
function, i.e. a constant expression, in terms of ''F'' if ''F'' itself does not contain at least one nullary function. With this stronger definition, the smallest functionally complete sets would have 2 elements. Another natural condition would be that the clone generated by ''F'' together with the two nullary constant functions be functionally complete or, equivalently, functionally complete in the strong sense of the previous paragraph. The example of the Boolean function given by if and otherwise shows that this condition is strictly weaker than functional completeness.


Characterization of functional completeness

Emil Post Emil Leon Post (; February 11, 1897 – April 21, 1954) was an American mathematician and logician. He is best known for his work in the field that eventually became known as computability theory. Life Post was born in Augustów, Suwałki Govern ...
proved that a set of logical connectives is functionally complete if and only if it is not a subset of any of the following sets of connectives: * The
monotonic In mathematics, a monotonic function (or monotone function) is a function between ordered sets that preserves or reverses the given order. This concept first arose in calculus, and was later generalized to the more abstract setting of ord ...
connectives; changing the truth value of any connected variables from F to T without changing any from T to F never makes these connectives change their return value from T to F, e.g. \vee, \wedge, \top, \bot. * The
affine Affine may describe any of various topics concerned with connections or affinities. It may refer to: * Affine, a Affinity_(law)#Terminology, relative by marriage in law and anthropology * Affine cipher, a special case of the more general substi ...
connectives, such that each connected variable either always or never affects the truth value these connectives return, e.g. \neg, \top, \bot, \leftrightarrow, \nleftrightarrow. * The ''self-dual'' connectives, which are equal to their own de Morgan dual; if the truth values of all variables are reversed, so is the truth value these connectives return, e.g. \neg, . * The ''truth-preserving'' connectives; they return the
truth value In logic and mathematics, a truth value, sometimes called a logical value, is a value indicating the relation of a proposition to truth, which in classical logic has only two possible values ('' true'' or '' false''). Truth values are used in ...
T under any interpretation that assigns T to all variables, e.g. \vee, \wedge, \top, \rightarrow, \leftrightarrow. * The ''falsity-preserving'' connectives; they return the truth value F under any interpretation that assigns F to all variables, e.g. \vee, \wedge, \bot, \nrightarrow, \nleftrightarrow. Post gave a complete description of the lattice of all clones (sets of operations closed under composition and containing all projections) on the two-element set , nowadays called Post's lattice, which implies the above result as a simple corollary: the five mentioned sets of connectives are exactly the maximal nontrivial clones.


Minimal functionally complete operator sets

When a single logical connective or Boolean operator is functionally complete by itself, it is called a ''Sheffer function''The term was originally restricted to ''binary'' operations, but since the end of the 20th century it is used more generally. . or sometimes a sole sufficient operator. There are no unary operators with this property. NAND and NOR, which are dual to each other, are the only two binary Sheffer functions. These were discovered, but not published, by
Charles Sanders Peirce Charles Sanders Peirce ( ; September 10, 1839 – April 19, 1914) was an American scientist, mathematician, logician, and philosopher who is sometimes known as "the father of pragmatism". According to philosopher Paul Weiss (philosopher), Paul ...
around 1880, and rediscovered independently and published by Henry M. Sheffer in 1913. . In digital electronics terminology, the binary
NAND gate In digital electronics, a NAND (NOT AND) gate is a logic gate which produces an output which is false only if all its inputs are true; thus its output is complement to that of an AND gate. A LOW (0) output results only if all the inputs to the ...
(↑) and the binary
NOR gate The NOR (NOT OR) gate is a digital logic gate that implements logical NOR - it behaves according to the truth table to the right. A HIGH output (1) results if both the inputs to the gate are LOW (0); if one or both input is HIGH (1), a LOW o ...
(↓) are the only binary universal logic gates. The following are the minimal functionally complete sets of logical connectives with
arity In logic, mathematics, and computer science, arity () is the number of arguments or operands taken by a function, operation or relation. In mathematics, arity may also be called rank, but this word can have many other meanings. In logic and ...
≤ 2:Wernick, William (1942) "Complete Sets of Logical Functions," ''Transactions of the American Mathematical Society 51'': 117–32. In his list on the last page of the article, Wernick does not distinguish between ← and →, or between \nleftarrow and \nrightarrow. ;One element: , . ;Two elements: \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \, \. ;Three elements: \, \, \, \, \, \. There are no minimal functionally complete sets of more than three at most binary logical connectives. In order to keep the lists above readable, operators that ignore one or more inputs have been omitted. For example, an operator that ignores the first input and outputs the negation of the second can be replaced by a unary negation.


Examples

* Examples of using the NAND (↑) completeness. As illustrated by, ** ¬''A'' ≡ ''A'' ↑ ''A'' ** ''A'' ∧ ''B'' ≡ ¬(''A'' ↑ ''B'') ≡ (''A'' ↑ ''B'') ↑ (''A'' ↑ ''B'') ** ''A'' ∨ ''B'' ≡ (¬''A'') ↑ (¬''B'') ≡ (''A'' ↑ ''A'') ↑ (''B'' ↑ ''B'') * Examples of using the NOR (↓) completeness. As illustrated by,"NOR Gate Operations" at http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/nor.html ** ¬''A'' ≡ ''A'' ↓ ''A'' ** ''A'' ∨ ''B'' ≡ ¬(''A'' ↓ ''B'') ≡ (''A'' ↓ ''B'') ↓ (''A'' ↓ ''B'') ** ''A'' ∧ ''B'' ≡ (¬''A'') ↓ (¬''B'') ≡ (''A'' ↓ ''A'') ↓ (''B'' ↓ ''B'') Note that an electronic circuit or a software function can be optimized by reuse, to reduce the number of gates. For instance, the "" operation, when expressed by ↑ gates, is implemented with the reuse of "", : ''X'' ≡ (''A'' ↑ ''B''); ''A'' ∧ ''B'' ≡ ''X'' ↑ ''X''


In other domains

Apart from logical connectives (Boolean operators), functional completeness can be introduced in other domains. For example, a set of reversible gates is called functionally complete, if it can express every reversible operator. The 3-input Fredkin gate is functionally complete reversible gate by itself – a sole sufficient operator. There are many other three-input universal logic gates, such as the
Toffoli gate In logic circuits, the Toffoli gate, also known as the CCNOT gate (“controlled-controlled-not”), invented by Tommaso Toffoli in 1980 is a CNOT gate with two control bits and one target bit. That is, the target bit (third bit) will be inver ...
. In
quantum computing A quantum computer is a computer that exploits quantum mechanical phenomena. On small scales, physical matter exhibits properties of wave-particle duality, both particles and waves, and quantum computing takes advantage of this behavior using s ...
, the
Hadamard gate The Hadamard transform (also known as the Walsh–Hadamard transform, Hadamard–Rademacher–Walsh transform, Walsh transform, or Walsh–Fourier transform) is an example of a generalized class of Fourier transforms. It performs an orthogonal ...
and the T gate are universal, albeit with a slightly more restrictive definition than that of functional completeness.


Set theory

There is an
isomorphism In mathematics, an isomorphism is a structure-preserving mapping or morphism between two structures of the same type that can be reversed by an inverse mapping. Two mathematical structures are isomorphic if an isomorphism exists between the ...
between the
algebra of sets In mathematics, the algebra of sets, not to be confused with the mathematical structure of ''an'' algebra of sets, defines the properties and laws of sets, the set-theoretic operations of union, intersection, and complementation and the re ...
and the
Boolean algebra In mathematics and mathematical logic, Boolean algebra is a branch of algebra. It differs from elementary algebra in two ways. First, the values of the variable (mathematics), variables are the truth values ''true'' and ''false'', usually denot ...
, that is, they have the same
structure A structure is an arrangement and organization of interrelated elements in a material object or system, or the object or system so organized. Material structures include man-made objects such as buildings and machines and natural objects such as ...
. Then, if we map boolean operators into set operators, the "translated" above text are valid also for sets: there are many "minimal complete set of set-theory operators" that can generate any other set relations. The more popular "Minimal complete operator sets" are and . If the
universal set In set theory, a universal set is a set which contains all objects, including itself. In set theory as usually formulated, it can be proven in multiple ways that a universal set does not exist. However, some non-standard variants of set theory inc ...
is forbidden, set operators are restricted to being falsity (Ø) preserving, and cannot be equivalent to functionally complete Boolean algebra.


See also

* * * * * * * *


References

{{Mathematical logic Boolean algebra Logic in computer science Propositional calculus Charles Sanders Peirce