The four fold


I have been thinking about Aristotelean Logic and programming languages for a longer post.   But I am going to jot down some of my ideas here.  I am trying to write through this because some of the thinking breaks down.

First off, the foundational basis of Aristotelean logic is the proposition. The proposition itself is made up of two terms – the subject and the predicate. And this we could say sets up all of western metaphysics and the whole subject/object distinction and issues there in. But lets this is implicit in the variable definition of programming languages. The variable definition is the foundation of the programming language just as the proposition is the foundation of Aristotelean logic.   Variables must be defined in programming languages, this is why monte carlo simulation are so popular, because you can just run a program with a bunch of different values. But different from say a differential equation, you cannot leave the variables undefined.

The difference between the proposition and the variable is variable is always affirmative – it is never a negation. I cannot write something like int x = not 2, I can only write int x =2;

But negation arises with that other building block of programming language, the conditional. All programming can be boiled down to propositions and demorgans law (ie AND OR and NOT). A new proposition is evaluated. if x > 4 then do something.

So say we have the following

x is 10

x is greater than 4

print “hi”

While this is not a syllogism in the sense that the conclusion is derived from the premisises. It is a syllogysm in the sense that the conclusion results from the truth content of the propositions.

Socrates is a man

all men are  mortal

then socrates is mortal

can be translated to if socrates is a man and all men are mortal then socrates is motal in the way that if x is 10 and x> 4 the print “10”, one is logical the other is performative one involves the content of the proposition the other is interested only in the form or boolean logic of the propositions.

The analogies definitely break down and this line of reasoning seems to be a stretch, but there is something about the conditional as the root of the syllogism and the root of the programming language. Further the root of the conditional is the the proposition or the subject – predicate relationship. If x is y then z.

But what about the types of propositions – the four fold? There is another famous four fold, Heidegger’s. Aristotle’s four fold is about the four types of propositions  and ties into his metaphysical notions of categories (universals and particulars): anyway :

universal and true statements, particular and true statements, universal and false statements and particular and false statements.    Does this influence a programming language?

For me a universal is an undefined variable: int i.  A universal and true statement would be something like  type(i) == type(1).  Is this really used or useful in programming languages, not really, but it is implicit even in dynamically typed languages.  But if we were using object oriented languages then this could be an interface check – does car have the interface of vehicle?  In a functional language, this could be something like a callback or a curried function where the arguments are not defined. There is something to type definition, programming languages and Aristotle.

Ok particular and true, this is something like x >3, where x is previously defined.

Now what of the negative cases?  This is where the relationship breaks down.  Because a proposition is always true. It is in the case of the conditional when it is evaluated that it can be false. Is the conditional the syllogism or the proposition?





Leave a Reply