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. "Vector logic" has also been used to refer to the representation of classical propositional logic as a vector space, 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 S and P. 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 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:
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: uTv=⟨u,v⟩: the orthonormality between vectors s and n implies that ⟨u,v⟩=1 if u=v, and ⟨u,v⟩=0 if u≠v, where u,v∈{s,n}.
Monadic operators The monadic operators result from the application Mon:V2→V2, 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=ssT+nnT. This matrix operates as follows: Ip = p, p ∈ V2; due to the orthogonality of s with respect to n, we have Is=ssTs+nnTs=s⟨s,s⟩+n⟨n,s⟩=s, and similarly In=n. This vector logic identity matrix is not generally an identity matrix in the sense of matrix algebra. Negation: A logical negation ¬p is represented by matrix N=nsT+snT 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.
Dyadic operators The 16 two-valued dyadic operators correspond to functions of the type Dyad:V2⊗V2→V2; 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:
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: C=s(s⊗s)T+n(s⊗n)T+n(n⊗s)T+n(n⊗n)T and verifies C(s⊗s)=s, and C(s⊗n)=C(n⊗s)=C(n⊗n)=n. Disjunction. The disjunction (p∨q) is executed by the matrix D=s(s⊗s)T+s(s⊗n)T+s(n⊗s)T+n(n⊗n)T, resulting in D(s⊗s)=D(s⊗n)=D(n⊗s)=s and D(n⊗n)=n. 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: L=s(s⊗s)T+n(s⊗n)T+s(n⊗s)T+s(n⊗n)T, and the properties of classical implication are satisfied: L(s⊗s)=L(n⊗s)=L(n⊗n)=s and L(s⊗n)=n. Equivalence and Exclusive or. In vector logic the equivalence p≡q is represented by the following matrix: E=s(s⊗s)T+n(s⊗n)T+n(n⊗s)T+s(n⊗n)T with E(s⊗s)=E(n⊗n)=s and E(s⊗n)=E(n⊗s)=n. The Exclusive or is the negation of the equivalence, ¬(p≡q); it corresponds with the matrix X=NE given by X=n(s⊗s)T+s(s⊗n)T+s(n⊗s)T+n(n⊗n)T, with X(s⊗s)=X(n⊗n)=n and X(s⊗n)=X(n⊗s)=s. NAND and NOR The matrices S and P correspond to the Sheffer (NAND) and the Peirce (NOR) operations, respectively:
S=NC P=ND
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: s=[10]n=[01] In this case the identity and negation operators are the identity and anti-diagonal identity matrices:, I=[1001],N=[0110] and the matrices for conjunction, disjunction and implication are C=[10000111],D=[11100001],L=[10110100] respectively.
Set 2: s=12[11]n=12[1−1]
Here the identity operator is the identity matrix, but the negation operator is no longer the anti-diagonal identity matrix : I=[1001],N=[100−1] The resulting matrices for conjunction, disjunction and implication are: C=12[2000−1111],D=12[2000111−1],L=[200011−11] 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:
C(u⊗v)=ND(Nu⊗Nv), where u and v are two logic vectors. The Kronecker product implies the following factorization:
C(u⊗v)=ND(N⊗N)(u⊗v). 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:
C=ND(N⊗N)
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:
L(u⊗v)=D(N⊗I)(u⊗v)=D(Nu⊗v)=D(Nu⊗NNv)= D(NNv⊗Nu)=D(N⊗I)(Nv⊗Nu)=L(Nv⊗Nu) This result is based in the fact that D, the disjunction matrix, represents a commutative operation.
… excerpt ends here. Continue reading the full article.