Monday, November 04, 2024

Logic as a Vector System

 In their paper, "Logic as a Vector System" (Journal of Logic and Computation 2005 15(5): 751-765), Jonathan Westphal and Jim Hardy, describe propositional logic in terms of summed displacements in space. This allows for a fairly clean presentation of some common logical rules.

Modus Ponens

premise/conclusionp  q  
p -> q -11
p10
q01

Modus Tollens

premise/conclusionp  q  
p -> q -11
~q0-1
~p-10


Disjunctive Syllogism

premise/conclusionp  q  
p v q11
~p-10
q01


Hypothetical Syllogism

premise/conclusionp  q  r  
p -> q -110
q -> r0-11
p -> r-101


Constructive Dilemma

premise/conclusionp  q  r  s  
p -> q -1100
r -> s00-11
p v r1010
q v s0101

And so forth. You will note that you can get the conclusions from the premises by adding the columns. The reason for representing rules like this is that solving logical problems becomes vector addition in mathematics -- the summed displacements represent vectors, and then you can add the vectors. You can represent each of the above tables graphically, and the paper does so. Hypothetical Syllogism, of course, requires three dimensions and Constructive Dilemma four, but this doesn't affect the way the vectors work.

We see a similar structure in Term Functor Logic, in which p -> q is represented as -p+q, etc.  TFL, of course, is mostly used for syllogisms, and can just be extended to propositional logic using analogies that have been known for well over a century and a half now. The pluses and minuses in TFL represent what in old-fashioned logical texts is called 'distribution'. But in any case, the analogies mean that Westphal's and Hardy's vectorization of propositional logic can be extended in the other direction to represent syllogisms. 


Barbara Syllogism

premise/conclusionS   M  P  
All S is M-110
All M is P0-11
All S is P-101