Vector logic
[Mizraji, E. (1992)]
Vector logics: the matrix-vector representation of logical calculus.
Fuzzy Sets and Systems, 50, 179–185[Mizraji, E. (2008]
Vector logic: a natural algebraic representation of the fundamental logical gates.
Journal of Logic and Computation, 18, 97–121 is an
algebra
Algebra () is one of the broad areas of mathematics. Roughly speaking, algebra is the study of mathematical symbols and the rules for manipulating these symbols in formulas; it is a unifying thread of almost all of mathematics.
Elementary a ...
ic
model
A model is an informative representation of an object, person or system. The term originally denoted the Plan_(drawing), plans of a building in late 16th-century English, and derived via French and Italian ultimately from Latin ''modulus'', a mea ...
of elementary
logic
Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the science of deductively valid inferences or of logical truths. It is a formal science investigating how conclusions follow from premises ...
based on
matrix algebra
In abstract algebra, a matrix ring is a set of matrices with entries in a ring ''R'' that form a ring under matrix addition and matrix multiplication . The set of all matrices with entries in ''R'' is a matrix ring denoted M''n''(''R'')Lang, ''U ...
. Vector logic assumes that 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'').
Computing
In some progr ...
s map on
vectors, and that the
monadic and
dyadic operations are executed by matrix operators. "Vector logic" has also been used to refer to the representation of
classical propositional logic
Propositional calculus is a branch of logic. It is also called propositional logic, statement logic, sentential calculus, sentential logic, or sometimes zeroth-order logic. It deals with propositions (which can be true or false) and relations ...
as a
vector space
In mathematics and physics, a vector space (also called a linear space) is a set whose elements, often called ''vectors'', may be added together and multiplied ("scaled") by numbers called '' scalars''. Scalars are often real numbers, but can ...
, in which the unit vectors are
propositional variable
In mathematical logic, a propositional variable (also called a sentential variable or sentential letter) is an input variable (that can either be true or false) of a truth function. Propositional variables are the basic building-blocks of propositi ...
s.
Predicate logic
First-order logic—also known as predicate logic, quantificational logic, and first-order predicate calculus—is a collection of formal systems used in mathematics, philosophy, linguistics, and computer science. First-order logic uses quantifie ...
can be represented as a vector space of the same type in which the axes represent the predicate letters
and
. In the vector space for propositional logic the origin represents the false, F, and the infinite periphery represents the true, T, whereas in the space for predicate logic the origin represents "nothing" and the periphery represents the flight from nothing, or "something".
Overview
Classic
binary
Binary may refer to:
Science and technology Mathematics
* Binary number, a representation of numbers using only two digits (0 and 1)
* Binary function, a function that takes two arguments
* Binary operation, a mathematical operation that t ...
logic is represented by a small set of mathematical functions depending on one (monadic) or two (dyadic) variables. In the binary set, the value 1 corresponds to ''
true
True most commonly refers to truth, the state of being in congruence with fact or reality.
True may also refer to:
Places
* True, West Virginia, an unincorporated community in the United States
* True, Wisconsin, a town in the United States
* Tr ...
'' and the value 0 to ''
false''. A two-valued vector logic requires a correspondence between the truth-values ''true'' (t) and ''false'' (f), and two ''q''-dimensional normalized
real
Real may refer to:
Currencies
* Brazilian real (R$)
* Central American Republic real
* Mexican real
* Portuguese real
* Spanish real
* Spanish colonial real
Music Albums
* ''Real'' (L'Arc-en-Ciel album) (2000)
* ''Real'' (Bright album) (2010)
...
-valued
column vector
In linear algebra, a column vector with m elements is an m \times 1 matrix consisting of a single column of m entries, for example,
\boldsymbol = \begin x_1 \\ x_2 \\ \vdots \\ x_m \end.
Similarly, a row vector is a 1 \times n matrix for some n, c ...
s ''s'' and ''n'', hence:
:
and
(where
is an arbitrary natural number, and "normalized" means that the
length
Length is a measure of distance. In the International System of Quantities, length is a quantity with dimension distance. In most systems of measurement a base unit for length is chosen, from which all other units are derived. In the Interna ...
of the vector is 1; usually ''s'' and ''n'' are orthogonal vectors). This correspondence generates a space of vector truth-values: ''V''
2 = . The basic logical operations defined using this set of vectors lead to matrix operators.
The operations of vector logic are based on the
scalar product
In mathematics, the dot product or scalar productThe term ''scalar product'' means literally "product with a scalar as a result". It is also used sometimes for other symmetric bilinear forms, for example in a pseudo-Euclidean space. is an algebra ...
between ''q''-dimensional column vectors:
: the orthonormality between vectors ''s'' and ''n'' implies that
if
, and
if
, where
.
Monadic operators
The monadic operators result from the application
, and the associated matrices have ''q'' rows and ''q'' columns. The two basic monadic operators for this two-valued vector logic are the
identity
Identity may refer to:
* Identity document
* Identity (philosophy)
* Identity (social science)
* Identity (mathematics)
Arts and entertainment Film and television
* ''Identity'' (1987 film), an Iranian film
* ''Identity'' (2003 film), ...
and the
negation
In logic, negation, also called the logical complement, is an operation that takes a proposition P to another proposition "not P", written \neg P, \mathord P or \overline. It is interpreted intuitively as being true when P is false, and false ...
:
* Identity: A logical identity ID(''p'') is represented by matrix
, where the juxtapositions are
Kronecker product
In mathematics, the Kronecker product, sometimes denoted by ⊗, is an operation on two matrices of arbitrary size resulting in a block matrix. It is a generalization of the outer product (which is denoted by the same symbol) from vectors to ...
s. This matrix operates as follows: ''Ip'' = ''p'', ''p'' ∈ ''V''
2; due to the orthogonality of ''s'' with respect to ''n'', we have
, and similarly
. It is important to note that this vector logic identity matrix is not generally an
identity matrix
In linear algebra, the identity matrix of size n is the n\times n square matrix with ones on the main diagonal and zeros elsewhere.
Terminology and notation
The identity matrix is often denoted by I_n, or simply by I if the size is immaterial o ...
in the sense of matrix algebra.
* Negation: A logical negation ¬''p'' is represented by matrix
Consequently, ''Ns'' = ''n'' and ''Nn'' = ''s''. The
involutory behavior of the logical negation, namely that ¬(¬''p'') equals ''p'', corresponds with the fact that ''N''
2 = ''I''.
Dyadic operators
The 16 two-valued dyadic operators correspond to functions of the type
; the dyadic matrices have ''q''
2 rows and ''q'' columns.
The matrices that execute these dyadic operations are based on the properties of the
Kronecker product
In mathematics, the Kronecker product, sometimes denoted by ⊗, is an operation on two matrices of arbitrary size resulting in a block matrix. It is a generalization of the outer product (which is denoted by the same symbol) from vectors to ...
. (Multiplying such a dyadic matrix by a
matrix yields a
column whose entries are
Frobenius inner product
In mathematics, the Frobenius inner product is a binary operation that takes two matrices and returns a scalar. It is often denoted \langle \mathbf,\mathbf \rangle_\mathrm. The operation is a component-wise inner product of two matrices as though t ...
s of the square matrix by blocks of its same size within the dyadic matrix.)
Two properties of this product are essential for the formalism of vector logic:
Using these properties, expressions for dyadic logic functions can be obtained:
*
Conjunction
Conjunction may refer to:
* Conjunction (grammar), a part of speech
* Logical conjunction, a mathematical operator
** Conjunction introduction, a rule of inference of propositional logic
* Conjunction (astronomy), in which two astronomical bodies ...
. The conjunction (''p''∧''q'') is executed by a matrix that acts on two vector truth-values:
.This matrix reproduces the features of the classical conjunction truth-table in its formulation:
::
::and verifies
::
and
::
*
Disjunction
In logic, disjunction is a logical connective typically notated as \lor and read aloud as "or". For instance, the English language sentence "it is raining or it is snowing" can be represented in logic using the disjunctive formula R \lor S ...
. The disjunction (''p''∨''q'') is executed by the matrix
::
resulting in
::
and
::
*
Implication. The implication corresponds in classical logic to the expression ''p'' → ''q'' ≡ ¬''p'' ∨ ''q''. The vector logic version of this equivalence leads to a matrix that represents this implication in vector logic:
. The explicit expression for this implication is:
::
::and the properties of classical implication are satisfied:
::
and
::
*
Equivalence and
Exclusive or
Exclusive or or exclusive disjunction is a logical operation that is true if and only if its arguments differ (one is true, the other is false).
It is symbolized by the prefix operator J and by the infix operators XOR ( or ), EOR, EXOR, , ...
. In vector logic the equivalence ''p''≡''q'' is represented by the following matrix:
::
with
::
and
::
::The Exclusive or is the negation of the equivalence, ¬(''p''≡''q''); it corresponds with the matrix
given by
::
::with
and
::
*
NAND and
NOR
The matrices ''S'' and ''P'' correspond to the
Sheffer (NAND) and the
Peirce (NOR) operations, respectively:
::
::
De Morgan's law
In the two-valued logic, the conjunction and the disjunction operations satisfy the
De Morgan's law
In propositional logic and Boolean algebra, De Morgan's laws, also known as De Morgan's theorem, are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathem ...
: ''p''∧''q''≡¬(¬''p''∨¬''q''), and its dual: ''p''∨''q''≡¬(¬''p''∧¬''q'')). For the two-valued vector logic this law is also verified:
::
, where ''u'' and ''v'' are two logic vectors.
The Kronecker product implies the following factorization:
::
Then it can be proved that in the two-dimensional vector logic the De Morgan's law is a law involving operators, and not only a law concerning operations:
[Mizraji, E. (1996) The operators of vector logic. Mathematical Logic Quarterly, 42, 27–39]
::
Law of contraposition
In the classical propositional calculus, the
law of contraposition ''p'' → ''q'' ≡ ¬''q'' → ¬''p'' is proved because the equivalence holds for all the possible combinations of truth-values of ''p'' and ''q''.
[Suppes, P. (1957) Introduction to Logic, Van Nostrand Reinhold, New York.] Instead, in vector logic, the law of contraposition emerges from a chain of equalities within the rules of matrix algebra and Kronecker products, as shown in what follows:
::
::
This result is based in the fact that ''D'', the disjunction matrix, represents a commutative operation.
Many-valued two-dimensional logic
Many-valued logic
Many-valued logic (also multi- or multiple-valued logic) refers to a propositional calculus in which there are more than two truth values. Traditionally, in Aristotle's logical calculus, there were only two possible values (i.e., "true" and "false" ...
was developed by many researchers, particularly by
Jan Łukasiewicz
Jan Łukasiewicz (; 21 December 1878 – 13 February 1956) was a Polish logician and philosopher who is best known for Polish notation and Łukasiewicz logic His work centred on philosophical logic, mathematical logic and history of logic. He ...
and allows extending logical operations to truth-values that include uncertainties. In the case of two-valued vector logic, uncertainties in the truth values can be introduced using vectors with ''s'' and ''n'' weighted by probabilities.
Let
, with
be this kind of "probabilistic" vectors. Here, the many-valued character of the logic is introduced
''a posteriori'' via the uncertainties introduced in the inputs.
Scalar projections of vector outputs
The outputs of this many-valued logic can be projected on scalar functions and generate a particular class of
probabilistic logic Probabilistic logic (also probability logic and probabilistic reasoning) involves the use of probability and logic to deal with uncertain situations. Probabilistic logic extends traditional logic truth tables with probabilistic expressions. A diffic ...
with similarities with the many-valued logic of Reichenbach. Given two vectors
and
and a dyadic logical matrix
, a scalar probabilistic logic is provided by the projection over vector ''s'':
::
Here are the main results of these projections:
::
::
::
::
::
The associated negations are:
::
::
::
If the scalar values belong to the set , this many-valued scalar logic is for many of the operators almost identical to the 3-valued logic of Łukasiewicz. Also, it has been proved that when the monadic or dyadic operators act over probabilistic vectors belonging to this set, the output is also an element of this set.
Square root of NOT
This operator was originally defined for qubits in the framework of
quantum computing
Quantum computing is a type of computation whose operations can harness the phenomena of quantum mechanics, such as superposition, interference, and entanglement. Devices that perform quantum computations are known as quantum computers. Though ...
. In vector logic, this operator can be extended for arbitrary orthonormal truth values.
[Mizraji, E. (2020). Vector logic allows counterfactual virtualization by the square root of NOT, Logic Journal of the IGPL. Online version ()] There are, in fact, two square roots of NOT:
::
, and
::
,
with
.
and
are complex conjugates:
, and note that
, and
. Another interesting point is the analogy with the two square roots of -1. The positive root
corresponds to
, and the negative root
corresponds to
; as a consequence,
.
History
Early attempts to use
linear algebra
Linear algebra is the branch of mathematics concerning linear equations such as:
:a_1x_1+\cdots +a_nx_n=b,
linear maps such as:
:(x_1, \ldots, x_n) \mapsto a_1x_1+\cdots +a_nx_n,
and their representations in vector spaces and through matrices.
...
to represent logic operations can be referred to
Peirce and
Copilowish, particularly in the use of
logical matrices to interpret the
calculus of relations
In mathematical logic, algebraic logic is the reasoning obtained by manipulating equations with free variables.
What is now usually called classical algebraic logic focuses on the identification and algebraic description of models appropriate for ...
.
The approach has been inspired in
neural network
A neural network is a network or circuit of biological neurons, or, in a modern sense, an artificial neural network, composed of artificial neurons or nodes. Thus, a neural network is either a biological neural network, made up of biological ...
models based on the use of high-dimensional matrices and vectors. Vector logic is a direct translation into a matrix–vector formalism of the classical
Boolean polynomials.
[Boole, G. (1854) An Investigation of the Laws of Thought, on which are Founded the Theories of Logic and Probabilities. Macmillan, London, 1854; Dover, New York Reedition, 1958] This kind of formalism has been applied to develop a
fuzzy logic
Fuzzy logic is a form of many-valued logic in which the truth value of variables may be any real number between 0 and 1. It is employed to handle the concept of partial truth, where the truth value may range between completely true and completely ...
in terms of
complex numbers
In mathematics, a complex number is an element of a number system that extends the real numbers with a specific element denoted , called the imaginary unit and satisfying the equation i^= -1; every complex number can be expressed in the form a ...
. Other matrix and vector approaches to logical calculus have been developed in the framework of
quantum physics
Quantum mechanics is a fundamental theory in physics that provides a description of the physical properties of nature at the scale of atoms and subatomic particles. It is the foundation of all quantum physics including quantum chemistry, qua ...
,
computer science
Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to Applied science, practical discipli ...
and
optics
Optics is the branch of physics that studies the behaviour and properties of light, including its interactions with matter and the construction of instruments that use or detect it. Optics usually describes the behaviour of visible, ultraviole ...
.
The
Indian
Indian or Indians may refer to:
Peoples South Asia
* Indian people, people of Indian nationality, or people who have an Indian ancestor
** Non-resident Indian, a citizen of India who has temporarily emigrated to another country
* South Asia ...
biophysicist
G.N. Ramachandran developed a formalism using algebraic matrices and vectors to represent many operations of classical
Jain logic known as Syad and Saptbhangi; see
Indian logic
The development of Indian logic dates back to the ''anviksiki'' of Medhatithi Gautama (c. 6th century BCE); the Sanskrit grammar rules of Pāṇini (c. 5th century BCE); the Vaisheshika school's analysis of atomism (c. 6th century BCE to 2nd centur ...
. It requires independent affirmative evidence for each assertion in a proposition, and does not make the assumption for binary complementation.
Boolean polynomials
George Boole
George Boole (; 2 November 1815 – 8 December 1864) was a largely self-taught English mathematician, philosopher, and logician, most of whose short career was spent as the first professor of mathematics at Queen's College, Cork in Ire ...
established the development of logical operations as polynomials.
For the case of monadic operators (such as
identity
Identity may refer to:
* Identity document
* Identity (philosophy)
* Identity (social science)
* Identity (mathematics)
Arts and entertainment Film and television
* ''Identity'' (1987 film), an Iranian film
* ''Identity'' (2003 film), ...
or
negation
In logic, negation, also called the logical complement, is an operation that takes a proposition P to another proposition "not P", written \neg P, \mathord P or \overline. It is interpreted intuitively as being true when P is false, and false ...
), the Boolean polynomials look as follows:
::
The four different monadic operations result from the different binary values for the coefficients. Identity operation requires ''f''(1) = 1 and ''f''(0) = 0, and negation occurs if ''f''(1) = 0 and ''f''(0) = 1. For the 16 dyadic operators, the Boolean polynomials are of the form:
::
The dyadic operations can be translated to this polynomial format when the coefficients ''f'' take the values indicated in the respective
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 argumen ...
s. For instance: the
NAND operation requires that:
::
and
.
These Boolean polynomials can be immediately extended to any number of variables, producing a large potential variety of logical operators.
In vector logic, the matrix-vector structure of logical operators is an exact translation to the format of linear algebra of these Boolean polynomials, where the ''x'' and 1−''x'' correspond to vectors ''s'' and ''n'' respectively (the same for ''y'' and 1−''y''). In the example of NAND, ''f''(1,1)=''n'' and ''f''(1,0)=''f''(0,1)=''f''(0,0)=''s'' and the matrix version becomes:
::