Prolog and the Language of Thought: Logic as an introduction to Cognitive Science

Roy Elveton (Carlton College)

Abstract

Most current courses in first-order logic treat logic as an important, but self-contained, discipline. I do not wish to dispute its importance. However, I do wish to challenge the somewhat claustrophobic atmosphere in which it is presented. Moreover, perhaps most students who are urged to enroll in a logic course are so because of a promised end that it will enable them to think more ''logically''. However, there is little empirical evidence that such will be the case. One alternative is to employ a beginning course in logic to develop explicit exercises in identifying basic logical skills and, more importantly, to develop insight into the possible importance and limitations of modern formal logic as a window to reasoning and human cognition.

The alternative approach that I will outline begins with a set of arguments in support of the claim that there exists a''language of thought''. Such a language, if it exists, is then tentatively identified with the ''hidden structure'' (McGinn) of natural languages. Such a hidden structure, displaying the logical form of natural languages, is viewed as an example of a ''structured domain'', a domain of well-defined elements (atoms) that can be ordered and reordered in accordance with definite rules. (Other examples of structured domains include Chomskyian linguistics, kinship systems and certain forms of moral theory.)

Within this context, Prolog is introduced as an elegant and minimal formalism for attempting to capture the logical form of natural languages. The basics of propositional logic are introduced, including truth tables, in order to (a) identify the basic vocabulary of first-order propositional logic, and (b) contrast it with the simpler basic vocabulary of Prolog's syntax. Truth tables and the standard definition of logical tautology are used to introduce Prologís single rule of inference: the resolution rule.

(This initial presentation of the motivation for and syntax of Prolog can be enhanced and/or supplemented by a variety of exercises, including the translation into Prolog of arguments in natural language and the solving of ''logical puzzles''.)

This initial presentation of Prolog can be concluded with explicit exercises identifying basic search strategies important for artificial intelligence programming: breath-first, depth-first and heuristic search. An in-depth discussion of Prologís own search strategy easily follows, with the introduction of SLD trees. A variety of straight forward exercises are employed to strengthen studentsí grasp of the deduction by resolution strategy and Prolog's search algorithm.