Monday, August 6, 2012

Pre-Logic, Syntax and Semantics


Wittgen, like most, though not all, programming environments, is pre-logical. 

In this post I intend to explain what “pre-logical”  means and to demonstrate that it applies to Wittgen. I will discuss the difference between syntax and semantics in the context of logic as well as where the concepts of “true” and “false” come in.

In standard descriptions of formal logic you start with a formal system which is comprised of the following elements:

  1. An alphabet, a finite set of characters which can be combined, for example, to form text strings. Typically this will be the letters of the alphabet plus the digits but in some special cases it might be only 0 and 1. It can be also be extended to other elements such as electric charges, spin states of electrons etc. Assume an alphabet of any character you could type on a computer keyboard for now. Any combination of elements from the alphabet will be referred to as a string.
  2. A grammar, which is a set of rules that  either generate or define acceptable strings from the alphabet.  When used to define acceptability, it either rejects or accepts the string. A accepted string can be referred to as a well-formed string or formula (wfs or wff). A grammar might define, for example, that any string may be accepted but that if it has parentheses, there must be one and only one closing parenthesis for every open one and the close must follow the open. Thus a string which has an unclosed parenthesis, is unacceptable or not a wfs, even though it is composed only from elements listed in the alphabet.
  3. A set of acceptable strings as defined by the grammar (wfs’s).  This will be referred to as the current database. The initial strings of the database can be called the axioms.
  4. A set of rules, the inference rules, that can be applied to any wfs of the database which produces one or more new wfs’s that are added to the database. An inference move on a database is the application of one or more inference rules on zero, one or more wfs’s on condition that any wfs used is part of the database. An inference move on a database creates a new database (which might be, though is not usually, identical to the original database).
  5. A legal database is the initial database (the axioms), a database that results from the initial database by applying any inference move on the initial database or a database that results from any inference move on a legal database. A legal inference move is the application of an inference move to legal database. A legal wfs is a wfs that appears in at least one possible legal database.

It is more common to use the word “valid” instead of the word “legal” but this uncommon terminology is used to avoid confusion when, later, valid and invalid rules of inference are discussed.

A formal system may be viewed dynamically or statically. A static approach asks only whether a specific wfs is a legal wfs. A dynamic approach sees the formal system as a process executing legal inference rules sequentially. A static approach, while looking for a yes or no answer to the legality of a wfs, requires a proof method which means finding some sequence of inference moves that results in a database that contains the wfs in question. 

The dynamic perspective suffers from the apparent need for a cognitive, or at least selection-enabled, agent that will choose which of the possible inference moves to execute; there is often more than one  alternative because there may be more than one rule or more than one wfs to select for application.

On the other hand, the dynamic perspective does not really need the concept of legality; it is inherent in the process. If you observe the database at any step in the dynamic process, it will automatically be a legal database.

Wittgen provides a significant restriction relative to the full formal system described here. This still means that it falls within the definition of a formal system but it is a specialization of it. Wittgen does not provide a choice regarding which inference move to make. For any given Wittgen database, there is only one inference move that can be applied. The first assign in the Doing Now variable is the only legal move. Thus for any given database, there is only one database that can result from the next inference move. This removes the agent problem just mentioned for the dynamic perspective on formal systems. Note that Wittgen also allows for a situation where there is no legal inference move. This occurs if the Doing Now variable is empty.  (This is the equivalent of a <halt> in computer science terms). A final database is a database that allows no legal inference move from it. 

Wittgen also requires an extension of a formal system as normally defined. Typically, formal systems only envision adding wfs’s to the database; they do not explicitly allow for changing strings or removing them. However, there seems little reason not to allow for this extension. The system is still a formal syntax-only system. Wittgen inference moves may change strings by assigning new content to old variables. (The formal system of temporal modal logic may also allow for such inference operations.)

Combining the possibility for changing wfs with the concept of a final database allows for one more definition. A legal final wfs is a wfs that is found in a final database

A formal system as described so far suffers from the fact that the grammar, the inference rules and the concept of legality require definitions specified in some other language or formal system. Call this formal system in which the rules are defined FS2. Now FS2 will have its own grammar and inference rules which will have to be defined in FS3.  There follows an endless sequence or recursion of formal system definitions. This shall be referred to as the rule definition regression problem. 

There is a possible response to this problem - even if it is not a solution. There are two possible perspectives on Wittgen; one abstract and one physical. In the abstract perspective a Wittgen database is just a set of strings that develops step by step according to formal rules. However, instead of a abstract perspective, one can view Wittgen as a physically embodied system. Strings are composed of symbols (not necessarily in one-to-one correspondence with elements from the alphabet) which are physical patterns arranged in space or even in some mental layout.  As mentioned before, physical patterns could be arrangements of matter, color, electric charges or something more exotic. There is a physical system or a set of pattern, there is also a machine or the laws of physics that act on these patterns. The grammars are physical limitations on the way the patterns can be arranged. The inference rules are just the way the machine operates on the physical patterns or the way the laws of physics require the patterns to segue from one configuration to another.

It is easy to find examples of physical systems that incorporate physical patterns which follow a strict set of rules of how one pattern segues into the next. Even a seemingly immobile rock contains ever-changing electron configurations which might answer to this description. However, if we search for physical systems that could embody the specific inference rules of Wittgen, the human brain, ANNs and suitably configured computers are all plausible candidates. For example, the patterns of electronic charges in the circuits of a computer which we interpret as 0s and 1s are the symbols of a physical embodiment of a formal system. The processor of a computer, once built in a certain way, responds to these symbols by transforming them in a deterministic manner. These transformations are the inference rules of the formal system. A suitably configured computer will implement the Wittgen inference rule.

Such physical embodiments do not suffer from the rule definition regression problem. The inference rules, or perhaps, more correctly, the transformation rules are not themselves expressed in any formal language. They are an empirically observed reality. An associative memory system, once built, will simply retrieve when given the retrieve instruction and assign when given the assign instruction. This may be determinate, observable and thus just a hard-nosed fact. Of course, the actual behavior depends on the actual configuration of memory at any time, but the fundamental factness of the transformation rules remains. Philosophically speaking, this position raises questions of its own (induction, reliability of observation and culture-dependence of the descriptive terms among them), but, given an unquestioned scientific naturalism, the physical embodiment perspective provides an answer to the regression problem. We may return to this issue in later posts. 

Everything discussed so far describes a formal system. A formal system is not yet a logic. For a formal system to be a logic, the formal system must be assigned an interpretation, a meaning or a model. One of the tasks of most interpretations (in the formal sense here) is to assign truth values to the wfs’s - both those of the initial database (the axioms) and those of any legal database. The formal system is purely syntactic. The application of the interpretation or meaning is the process of applying semantics to the syntactic system. Once there is semantics, one can speak of the the rules of inference as propagating “truth” from premises to conclusions by means of the inference rules. Thus an argument, viewed as a syntactic development from one legal database to another by means of the syntactic rules of inference, may be more than merely legal; it may aspire to be valid. In order for an argument to be not only legal but valid, there is a further stipulation that the rules of inference themselves be valid. If the premises of the argument are true and the argument is valid, the conclusions must be true.

Rules of Inference that are valid are rules that propagate truth from premises to conclusions.

Thus semantics introduces:

  1. Interpretation to wfs’s and, arguably, to sections of wfs’s (words). 
  2. Values of true and false assigned to wfs’s. (This is often part of the interpretation.)
  3. Selection of a small set of inference rules out of the the universe of possible inference rules as valid, truth preserving inferences.


Logic requires both a formal system and semantics. Sometimes, logic is seen as focused on only the question of valid inference rules. In that case a specific logic aims to discover what, for a given alphabet, grammar and inference rules would count as a valid argument regardless of the interpretation or meaning of most, but not all, of the words in the wfs’s.

While Wittgen can be used as the syntactic process behind such a logic, it is designed with other intentions in mind. Wittgen, taken by itself, is purely syntactic. (Again, so are most computer languages, programming environments and virtual and real computers.) The intention is that no semantics be added at all. The term “true” and “false” may still be used, but in a different way to the one described for logic. Instead “true” and “false” can be seen as purely syntactic components, as part of the strings of a particular system implemented in Wittgen. They have no meaning. They are just strings. Thus I might have one assertion:
    object on the mat::=cat}
and another:
  cat is the object on the mat:=true}
However, “true” here is just another string. It is not intrinsically the opposite of “false”. If I want to make make it the opposite of false in some sense, I could add further assignments such as:
    statement is true:=
        Doing Now:=
            @Return Doing Now}
            }
        }
    Make False:=
        Doing Now:=@statement is @@test}}}}
        Doing Now:=
            @test}:=false}
            Doing Now:=@Return Doing Now}}
            }
         }      


To use these lines you create assertions such as:
    test:=cat is the object on the mat}
    Doing Now:=@Make False}}

Then, if the database already contains an assertion such as, 
    cat is the object on the mat:=true}

These lines form a procedure that when, say, “cat is the object on the mat” does not refer to “true”, makes it refer to “false”. If the statement does refer to “true”, it just goes back to what was being executed before the test. But “true” and “false” are just strings that the procedures operate on. Syntactically, that is what all words are, the data of procedures. They are not special meanings that are assigned to strings.

This same example that demonstrates that “true” and “false” can be just arbitrary strings is also a demonstration of the fact that Wittgen can be used to create rules of inference. “Make False”, in the last example, is such an inference rule. However, one must differentiate between the intrinsic rule of inference, the rule of inference that defines Wittgen, and a rule of inference created using text strings in Wittgen’s language. Consider the following Wittgen code:
    MP A->B true:=
        Doing Now:=
            @x} is @B}:=true}
            }
        }
    MP:=
        Doing Now:=
            @MP A->B @@x} is @A}}}
            }
        }

This code is a standard Modus Ponens framework. It means that if A implies B (If A then B or A->B) and A is true, B is true. It is used as follows:
    x:=Socrates}
    A:=Greek}
    B:=Wise}
    Doing Now:=@MP}}

This code snippet supplies the assertion “All Greeks are Wise” or “∀x[Greek(x)->Wise(x)]” and runs the “proof” by making one call to the inference rule Modus Ponens. Thus if the database has been previously provided the assignment:
    Socrates is Greek:=true}
a new assignment will be made equivalent to:
    Socrates is Wise:=true}

Thus MP is an inference rule that exists only if the database includes it. The intrinsic inference rule, the inference rule that defines Wittgen itself, on the other hand, defines rather than is defined using Wittgen. The intrinsic inference rule, in the perspective of an abstract system, requires symbols to define it within a different formal system. In the physical embodiment perspective the intrinsic rule is just an empirical fact (assuming there are any such). However, even non-intrinsic inference rules are guaranteed to operate.  1

In the world of logic, as opposed to formal systems, Modus Ponens is a valid rule of inference.

However, consider AC which stands for Affirming the Consequent:
    AC A->B true:=
        Doing Now:=
            @x} is @A}:=true}
            }
        }
    AC:=
        Doing Now:=
            @AC A->B @@x} is @B}}}
            }
        }
If the inputs are provided as before indicating the assertion that “if x is Greek, x is Wise”, but the database contains:
    Socrates is Wise:=true}
calling AC will create the following assignment:
    Socrates is Greek:=true}

AC is considered an invalid rule of inference or a formal fallacy. However, Wittgen is unconcerned for the difference between MP and AC. It is a formal system, it specifies syntax but not semantics. Wittgen is, in this sense, pre-logical. As is, some claim, the human mind.

In this sense Wittgen is pre-logical. As it stands, it is a purely syntactic, formal system. It would require layers of semantics, meaning, interpretation, ascription of validity to a subset of the possible inference rules before it can be used as a logic which can talk about “true” and “false” in a meta-syntactic sense.

Being pre-logical is an important aspect of Wittgen. It allows Wittgen to be a tool for exploring and understanding syntactic systems. Ultimately, it may be used to question whether meaning and semantics are really required in modeling our reality.



1 Note that the intrinsic rule is a form of Modus Ponens in a restricted sense of applying to strings themselves but not what they might be used to refer to. Thus if there has been an assignment such as:
a:=b}
and this is interpreted to mean the premise “a->b” or “if a then b” then,
Doing Now:=
conclusion:=@a}
}
will necessarily (for some meaning of necessarily) result in an assignment equivalent to
conclusion:=b}
Thus “if a then b” and “a” results in “b”. However, this cannot be used as a more general inference because you cannot treat a and b as variables as we did for A and B in the previous case. You cannot write:
a:=Socrates is Greek}
b:=Socrates is Wise}
and then call
a:=b}

No comments:

Post a Comment