Rahul Sharma (Editor)

Vector logic

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

Vector logic 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.

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 column vectors composed by real numbers s and n, hence:

t s     and     f n

(where q 2 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: u T v = u , v : the orthonormality between vectors s and n implies that u , v = 1 if u = v , and u , v = 0 if u v .

Monadic operators

The monadic operators result from the application M o n : V 2 V 2 , 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:

  • Identity: A logical identity ID(p)is represented by matrix I = s s T + n n T . This matrix operates as follows: Ip = p, p ∈ V2; due to the orthogonality of s respect to n, we have I s = s s T s + n n T s = s s , s + n n , s = s ,   and conversely I n = n .
  • Negation: A logical negation ¬p is represented by matrix N = n s T + s n T Consequently, Ns = n and Nn = s. The involutory behavior of the logical negation, namely that ¬(¬p) equals p, corresponds with the fact that N2 = I. Is important to note that this vector logic identity matrix is not generally an identity matrix in the sense of matrix algebra.
  • Dyadic operators

    The 16 two-valued dyadic operators correspond to functions of the type D y a d : V 2 V 2 V 2 ; the dyadic matrices have q rows and q2 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:

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

  • Conjunction. The conjunction (p∧q) is executed by a matrix that acts on two vector truth-values: C ( u v ) .This matrix reproduces the features of the classical conjunction truth-table in its formulation:
  • Disjunction. The disjunction (p∨q) is executed by the matrix
  • 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: L = D ( N I ) . The explicit expression for this implication is:
  • Equivalence and Exclusive or. In vector logic the equivalence p≡q is represented by the following matrix:
  • 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: p∧q≡¬(¬p∨¬q), and its dual: p∨q≡¬(¬p∧¬q)). For the two-valued vector logic this Law is also verified:

    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:

    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. 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. 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 f = ϵ s + δ n , with ϵ , δ [ 0 , 1 ] , ϵ + δ = 1 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 with similarities with the many-valued logic of Reichenbach. Given two vectors u = α s + β n and v = α s + β n and a dyadic logical matrix G , 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.

    History

    The approach has been inspired in neural network 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. This kind of formalism has been applied to develop a fuzzy logic in terms of complex numbers. Other matrix and vector approaches to logical calculus have been developed in the framework of quantum physics, computer science and optics. Early attempts to use linear algebra to represent logic operations can be referred to Peirce and Copilowish. 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. Indian logic. 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. 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:

    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 liner 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:

    Extensions

  • Vector logic can be extended to include many truth values since large dimensional vector spaces allow to create many orthogonal truth values and the corresponding logical matrices.
  • Logical modalities can be fully represented in this context, with recursive process inspired in neural models
  • Some cognitive problems about logical computations can be analyzed using this formalism, in particular recursive decisions. Any logical expression of classical propositional calculus can be naturally represented by a tree structure. This fact is retained by vector logic, and has been partially used in neural models focused in the investigation of the branched structure of natural languages.
  • The computation via reversible operations as the Fredkin gate can be implemented in vector logic. This implementations provides explicit expressions for matrix operators that produce the input format and the output filtering necessary for obtaining computations
  • Elementary cellular automata can be analyzed using the operator structure of vector logic; this analysis leads to a spectral decomposition of the laws governing its dynamics
  • In addition, based on this formalism, a discrete differential and integral calculus has been developed
  • References

    Vector logic Wikipedia


    Similar Topics