Vector logic

Last updated

Vector logic [1] [2] is an algebraic model of elementary logic based on matrix algebra. Vector logic assumes that the truth values 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 as a vector space, [3] [4] in which the unit vectors are propositional variables. Predicate logic can be represented as a vector space of the same type in which the axes represent the predicate letters and . [5] 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".

Contents

Overview

Classic binary 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 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-valued column vectors s and n, hence:

    and    

(where is an arbitrary natural number, and "normalized" means that the length of the vector is 1; usually s and n are orthogonal vectors). This correspondence generates a space of vector truth-values: V2 = {s,n}. 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 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 and the negation:

Dyadic operators

The 16 two-valued dyadic operators correspond to functions of the type ; the dyadic matrices have q2 rows and q columns. The matrices that execute these dyadic operations are based on the properties of the Kronecker product. Two properties of this product are essential for the formalism of vector logic:

  1. The mixed-product property If A, B, C and D are matrices of such size that one can form the matrix products AC and BD, then
  2. Distributive transpose The operation of transposition is distributive over the Kronecker product:

Using these properties, expressions for dyadic logic functions can be obtained:

and verifies
and
resulting in
and
and the properties of classical implication are satisfied:
and
with
and
The Exclusive or is the negation of the equivalence, ¬(pq); it corresponds with the matrix given by
with and

The matrices S and P correspond to the Sheffer (NAND) and the Peirce (NOR) operations, respectively:

Numerical examples

Here are numerical examples of some basic logical gates implemented as matrices for two different sets of 2-dimensional orthonormal vectors for s and n.

Set 1:

In this case the identity and negation operators are the identity and anti-diagonal identity matrices:,

and the matrices for conjunction, disjunction and implication are

respectively.


Set 2:


Here the identity operator is the identity matrix, but the negation operator is no longer the anti-diagonal identity matrix :

The resulting matrices for conjunction, disjunction and implication are:

respectively.

De Morgan's law

In the two-valued logic, the conjunction and the disjunction operations satisfy the De Morgan's law: pq≡¬(¬p∨¬q), and its dual: pq≡¬(¬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: [6]

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. [7] 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 was developed by many researchers, particularly by Jan Łukasiewicz and allows extending logical operations to truth-values that include uncertainties. [8] 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. [1]

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 with similarities with the many-valued logic of Reichenbach. [9] [10] [11] 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 {0, ½, 1}, 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. [6]

Square root of NOT

This operator was originally defined for qubits in the framework of quantum computing. [12] [13] In vector logic, this operator can be extended for arbitrary orthonormal truth values. [2] [14] 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 to represent logic operations can be referred to Peirce and Copilowish, [15] particularly in the use of logical matrices to interpret the calculus of relations.

The approach has been inspired in neural network models based on the use of high-dimensional matrices and vectors. [16] [17] Vector logic is a direct translation into a matrix–vector formalism of the classical Boolean polynomials. [18] This kind of formalism has been applied to develop a fuzzy logic in terms of complex numbers. [19] Other matrix and vector approaches to logical calculus have been developed in the framework of quantum physics, computer science and optics. [20] [21]

The Indian 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. [22] It requires independent affirmative evidence for each assertion in a proposition, and does not make the assumption for binary complementation.

Boolean polynomials

George Boole established the development of logical operations as polynomials. [18] For the case of monadic operators (such as identity or negation), 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 tables. 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 1x correspond to vectors s and n respectively (the same for y and 1y). 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:

Extensions

See also

Related Research Articles

<span class="mw-page-title-main">Pauli matrices</span> Matrices important in quantum mechanics and the study of spin

In mathematical physics and mathematics, the Pauli matrices are a set of three 2 × 2 complex matrices which are Hermitian, involutory and unitary. Usually indicated by the Greek letter sigma, they are occasionally denoted by tau when used in connection with isospin symmetries.

In mathematics, the tensor product of two vector spaces V and W is a vector space to which is associated a bilinear map that maps a pair to an element of denoted

<span class="mw-page-title-main">Angular displacement</span>

Angular displacement of a body is the angle through which a point revolves around a centre or a specified axis in a specified sense. When a body rotates about its axis, the motion cannot simply be analyzed as a particle, as in circular motion it undergoes a changing velocity and acceleration at any time (t). When dealing with the rotation of a body, it becomes simpler to consider the body itself rigid. A body is generally considered rigid when the separations between all the particles remains constant throughout the body's motion, so for example parts of its mass are not flying off. In a realistic sense, all things can be deformable, however this impact is minimal and negligible. Thus the rotation of a rigid body over a fixed axis is referred to as rotational motion.

In linear algebra, the outer product of two coordinate vectors is a matrix. If the two vectors have dimensions n and m, then their outer product is an n × m matrix. More generally, given two tensors, their outer product is a tensor. The outer product of tensors is also referred to as their tensor product, and can be used to define the tensor algebra.

<span class="mw-page-title-main">Matrix multiplication</span> Mathematical operation in linear algebra

In mathematics, particularly in linear algebra, matrix multiplication is a binary operation that produces a matrix from two matrices. For matrix multiplication, the number of columns in the first matrix must be equal to the number of rows in the second matrix. The resulting matrix, known as the matrix product, has the number of rows of the first and the number of columns of the second matrix. The product of matrices A and B is denoted as AB.

In mechanics and geometry, the 3D rotation group, often denoted SO(3), is the group of all rotations about the origin of three-dimensional Euclidean space under the operation of composition.

In the mathematical field of differential geometry, a metric tensor is an additional structure on a manifold M that allows defining distances and angles, just as the inner product on a Euclidean space allows defining distances and angles there. More precisely, a metric tensor at a point p of M is a bilinear form defined on the tangent space at p, and a metric tensor on M consists of a metric tensor at each point p of M that varies smoothly with p.

<span class="mw-page-title-main">Exterior algebra</span> Algebra of exterior/ wedge products

In mathematics, the exterior algebra, or Grassmann algebra, named after Hermann Grassmann, is an algebra that uses the exterior product or wedge product as its multiplication. In mathematics, the exterior product or wedge product of vectors is an algebraic construction used in geometry to study areas, volumes, and their higher-dimensional analogues. The exterior product of two vectors and  denoted by is called a bivector and lives in a space called the exterior square, a vector space that is distinct from the original space of vectors. The magnitude of can be interpreted as the area of the parallelogram with sides and  which in three dimensions can also be computed using the cross product of the two vectors. More generally, all parallel plane surfaces with the same orientation and area have the same bivector as a measure of their oriented area. Like the cross product, the exterior product is anticommutative, meaning that for all vectors and  but, unlike the cross product, the exterior product is associative.

In linear algebra, a square matrix  is called diagonalizable or non-defective if it is similar to a diagonal matrix, i.e., if there exists an invertible matrix  and a diagonal matrix such that , or equivalently . For a finite-dimensional vector space , a linear map  is called diagonalizable if there exists an ordered basis of  consisting of eigenvectors of . These definitions are equivalent: if  has a matrix representation as above, then the column vectors of  form a basis consisting of eigenvectors of , and the diagonal entries of  are the corresponding eigenvalues of ; with respect to this eigenvector basis,  is represented by .Diagonalization is the process of finding the above  and .

In linear algebra, a Householder transformation is a linear transformation that describes a reflection about a plane or hyperplane containing the origin. The Householder transformation was used in a 1958 paper by Alston Scott Householder.

In numerical analysis, one of the most important problems is designing efficient and stable algorithms for finding the eigenvalues of a matrix. These eigenvalue algorithms may also find eigenvectors.

In mathematics, the matrix exponential is a matrix function on square matrices analogous to the ordinary exponential function. It is used to solve systems of linear differential equations. In the theory of Lie groups, the matrix exponential gives the exponential map between a matrix Lie algebra and the corresponding Lie group.

In mathematics, and specifically differential geometry, a connection form is a manner of organizing the data of a connection using the language of moving frames and differential forms.

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 specialization of the tensor product from vectors to matrices and gives the matrix of the tensor product linear map with respect to a standard choice of basis. The Kronecker product is to be distinguished from the usual matrix multiplication, which is an entirely different operation. The Kronecker product is also sometimes called matrix direct product.

In linear algebra, a rotation matrix is a transformation matrix that is used to perform a rotation in Euclidean space. For example, using the convention below, the matrix

In linear algebra, a coordinate vector is a representation of a vector as an ordered list of numbers that describes the vector in terms of a particular ordered basis. An easy example may be a position such as in a 3-dimensional Cartesian coordinate system with the basis as the axes of this system. Coordinates are always specified relative to an ordered basis. Bases and their associated coordinate representations let one realize vector spaces and linear transformations concretely as column vectors, row vectors, and matrices; hence, they are useful in calculations.

<span class="mw-page-title-main">Quantum logic gate</span> Basic circuit in quantum computing

In quantum computing and specifically the quantum circuit model of computation, a quantum logic gate is a basic quantum circuit operating on a small number of qubits. They are the building blocks of quantum circuits, like classical logic gates are for conventional digital circuits.

In mathematics, a matrix norm is a vector norm in a vector space whose elements (vectors) are matrices.

In linear algebra, an eigenvector or characteristic vector of a linear transformation is a nonzero vector that changes at most by a scalar factor when that linear transformation is applied to it. The corresponding eigenvalue, often denoted by , is the factor by which the eigenvector is scaled.

In quantum computing, quantum finite automata (QFA) or quantum state machines are a quantum analog of probabilistic automata or a Markov decision process. They provide a mathematical abstraction of real-world quantum computers. Several types of automata may be defined, including measure-once and measure-many automata. Quantum finite automata can also be understood as the quantization of subshifts of finite type, or as a quantization of Markov chains. QFAs are, in turn, special cases of geometric finite automata or topological finite automata.

References

  1. 1 2 Mizraji, E. (1992). Vector logics: the matrix-vector representation of logical calculus. Fuzzy Sets and Systems, 50, 179–185
  2. 1 2 3 4 5 Mizraji, E. (2008) Vector logic: a natural algebraic representation of the fundamental logical gates. Journal of Logic and Computation, 18, 97–121
  3. Westphal, J. and Hardy, J. (2005) Logic as a Vector System. Journal of Logic and Computation, 751-765
  4. Westphal, J. Caulfield, H.J. Hardy, J. and Qian, L.(2005) Optical Vector Logic Theorem-Proving. Proceedings of the Joint Conference on Information Systems, Photonics, Networking and Computing Division.
  5. Westphal, J (2010). The Application of Vector Theory to Syllogistic Logic. New Perspectives on the Square of Opposition, Bern, Peter Lang.
  6. 1 2 3 Mizraji, E. (1996) The operators of vector logic. Mathematical Logic Quarterly, 42, 27–39
  7. 1 2 Suppes, P. (1957) Introduction to Logic, Van Nostrand Reinhold, New York.
  8. Łukasiewicz, J. (1980) Selected Works. L. Borkowski, ed., pp. 153–178. North-Holland, Amsterdam, 1980
  9. Rescher, N. (1969) Many-Valued Logic. McGraw–Hill, New York
  10. Blanché, R. (1968) Introduction à la Logique Contemporaine, Armand Colin, Paris
  11. Klir, G.J., Yuan, G. (1995) Fuzzy Sets and Fuzzy Logic. Prentice–Hall, New Jersey
  12. Hayes, B. (1995) The square root of NOT. American Scientist, 83, 304–308
  13. Deutsch, D., Ekert, A. and Lupacchini, R. (2000) Machines, logic and quantum physics. The Bulletin of Symbolic Logic, 6, 265-283.
  14. Mizraji, E. (2020). Vector logic allows counterfactual virtualization by the square root of NOT, Logic Journal of the IGPL. Online version ( doi : 10.1093/jigpal/jzaa026)
  15. Copilowish, I.M. (1948) Matrix development of the calculus of relations. Journal of Symbolic Logic, 13, 193–203
  16. Kohonen, T. (1977) Associative Memory: A System-Theoretical Approach. Springer-Verlag, New York
  17. Mizraji, E. (1989) Context-dependent associations in linear distributed memories. Bulletin of Mathematical Biology, 50, 195–205
  18. 1 2 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
  19. Dick, S. (2005) Towards complex fuzzy logic. IEEE Transactions on Fuzzy Systems, 15,405–414, 2005
  20. Mittelstaedt, P. (1968) Philosophische Probleme der Modernen Physik, Bibliographisches Institut, Mannheim
  21. Stern, A. (1988) Matrix Logic: Theory and Applications. North-Holland, Amsterdam
  22. Jain, M.K. (2011) Logic of evidence-based inference propositions, Current Science, 1663–1672, 100
  23. Mizraji, E. (1994) Modalities in vector logic Archived 2014-08-11 at the Wayback Machine . Notre Dame Journal of Formal Logic, 35, 272–283
  24. Mizraji, E., Lin, J. (2002) The dynamics of logical decisions. Physica D, 168–169, 386–396
  25. beim Graben, P., Potthast, R. (2009). Inverse problems in dynamic cognitive modeling. Chaos, 19, 015103
  26. beim Graben, P., Pinotsis, D., Saddy, D., Potthast, R. (2008). Language processing with dynamic fields. Cogn. Neurodyn., 2, 79–88
  27. beim Graben, P., Gerth, S., Vasishth, S.(2008) Towards dynamical system models of language-related brain potentials. Cogn. Neurodyn., 2, 229–255
  28. beim Graben, P., Gerth, S. (2012) Geometric representations for minimalist grammars. Journal of Logic, Language and Information, 21, 393-432 .
  29. Binazzi, A.(2012) Cognizione logica e modelli mentali. Studi sulla formazione, 1–2012, pag. 69–84
  30. Mizraji, E. (2006) The parts and the whole: inquiring how the interaction of simple subsystems generates complexity. International Journal of General Systems, 35, pp. 395–415.
  31. Arruti, C., Mizraji, E. (2006) Hidden potentialities. International Journal of General Systems, 35, 461–469.
  32. Mizraji, E. (2015) Differential and integral calculus for logical operations. A matrix–vector approach Journal of Logic and Computation 25, 613-638, 2015