# Monthly Archives: April 2012

## The Predicate As A Truth Valued Function

So far we have been modeling sentences in which nothing is left unspecified.  Chris invites AndrewLukas laughs.  How could we model, however, sentences such as Chris invited someone, Someone invited Andrew, Someone invited someone, Joe ate something, Someone laughed … sentences in which at least one of the “central participants in a situation” is left unspecified?  We can model these sentences, I think, by applying the Relational Algebra to them — or, more precisely, to the propositions that underlie them.  In this post, I start laying the groundwork for showing how we can use the Relational Algebra to model sentences containing ‘someone’, ‘anyone’, and the like.

Let me begin by outlining the key premise behind Relational Database Theory:

Predicates generate propositions which are either true or false.  A given Database Relation comprises all and only the true propositions generated by a given predicate.  (This is the Closed World Assumption.)  We can apply various operations of the Relational Algebra to the propositions contained in a Database Relation.

The key premise in Relational Database Theory talks about predicates.  What, then, is a predicate?

What the database theorist C.J. Date calls a predicate is what Kroch and Santorini call, in the primer on Chomskyan linguistics quoted from in the post below (The Verb Considered As A Function) a verb.  Date explains what a predicate is better than I can, so let him speak (LOGIC AND DATABASES THE ROOTS OF RELATIONAL THEORY, Trafford Publishing, Canada, 2007, p. 11):

A predicate in logic is a truth valued function.

In other words, a predicate is a function that, when invoked, returns a truth value.  Like all functions, it has a set of parameters; when it’s invoked, arguments are substituted for the parameters; substituting arguments for the parameters effectively converts the predicate into a proposition; and we say the arguments satisfy the predicate if and only if that proposition is true.  For example, the argument the sun satisfies the predicate “x is a star,” while the argument the moon does not.

Let’s look at another example:

x is further away than y

This predicate involves two parameters, x and y.  Substituting arguments the sun for x and the moon for y yields a true proposition; substituting arguments the moon for x and the sun for y yields a false one.

The key premise mentions Database Relations.  What, then, is a Database Relation?

The concept of a Database Relation is an elaboration on the concept of a Relation as defined in mathematics.  In mathematics, a Relation is defined as the subset of the Cartesian Product of two or more sets.  (What a Cartesian Product is will be obvious from the example.)  For example, in the sets {John, Charles, Cliff, Dan} and {Leon Trotsky, Genghis Khan}, the Cartesian Product is { (John; Leon Trotsky), (John; Genghis Khan), (Charles; Leon Trotsky), (Charles; Genghis Khan), (Cliff; Leon Trotsky), (Cliff; Genghis Khan), (Dan; Leon Trotsky), (Dan; Genghis Khan)}.  If, now, we pick out a subset of this Cartesian Product by seeing who happens to be standing to the left of whom at the moment, we get this Relation:  { (Charles; Genghis Khan), (Cliff; Genghis Khan), (Dan; Leon Trotsky)}.

In other words, our Relation is what we get when we start with the predicate:

x is standing to the left of y

and plug in values for x from the set {John, Charles, Cliff, Dan} and values for y {Leon Trotsky, Genghis Khan}, throw away all the false propositions that result, and keep all of the true propositions.

Let me go out on a limb, then, and say that a proposition (remember, our key premise mentions propositions) is a tuple, that is to say, an ordered pair (for example, (Charles, Genghis Khan) ) in a Relation.  (Please, pretty please, don’t saw this limb off.)

This means then that a proposition is a state of affairs ala R.M. Chisholm.  For example, the proposition Charles is standing to the left of Genghis Khan is the state of affairs comprising the flesh and blood Charles standing to the left of the flesh and blood Genghis Khan.  Propositions as states of affairs are the meaning of sentences… But I digress.

Back to Relations.

A Database Relation, I have said, is an elaboration of a Mathematical Relation.  A Database Relation comprises a Heading consisting of ordered pairs of (Name Of Type; Type) and a Body consisting in a set of ordered pairs (Name Of Type, Value).  A type is a set, for example, the set of integers, the set of words in a given language, the set of people, the set of cities in the world, and so on.  A value of a type is a member of the set identical with that type.  I will leave name undefined.

A Database Relation is an abstract object;  it is either an object really existing in some Platonic Heaven someplace or it is a fiction, depending upon which theory of abstract objects is the correct one.  Database Relations form the conceptual skeleton of databases concretely implemented by an RDBMS (Relational Database Management System) functioning inside a physical computer, but at least at the moment I am not talking about physical computers and the software they run.  I am talking about the abstract object, something that has the same status as the number 3 or the isoceles triangle.

Why do I want to talk about Database Relations rather than Mathematical Relations?  It will be easier in the  posts that (hopefully) will follow to illustrate the Relational Algebra operations Projection and Restriction.  I know how to apply these operations to Database Relations; I am not sure how to apply them to Relations simpliciter.   Projection and Restriction are the Relational Algebra operations which, I claim, will give us a model for sentences such as Joe ate something.

I’ve laid the groundwork for such a model; now let me go on to produce the model.

## The Verb Considered As A Function

From Kroch’s and Santorini’s Syntax of Natural Language:

I embraced the summer dawn

From the point of view of a simple formal semantics, the verb laugh is a function from entities to truth values, as illustrated in (1). Entities that laugh are associated with the value T(rue); entities that don’t with the value F(alse). In the world described in (1), Beatrice, Gary, Lukas, and Tina laugh, and Chris and Eva don’t.

 By convention, entities are indicated by boldface, sets are enclosed in curly brackets, and ordered pairs are enclosed in angle brackets. It is also conventional to indicate denotations of expressions by enclosing the expressions in special square brackets. These special brackets are not part of the HTML character set, so we use two ordinary square brackets instead.
 (1) [[ laugh ]] = { Beatrice → T, Chris → F, Eva → F, Gary → T, Lukas → T, Tina → T }

Laugh can combine with a single argument, which denotes an entity. Intuitively, we can think of arguments as the central participants in a situation. Combining laugh with an argument (say, Lukas) has a syntactic effect and a corresponding semantic effect. The syntactic effect is to yield the sentence in (2a). (For simplicity, we disregard the past tense morpheme -ed here and in what follows.) The corresponding semantic effect is to apply the function in (1) to the argument; that is, to select the entity denoted by the argument in the function in (1) and to return the associated value. In the example at hand, the sentence comes out as true, as shown in (2b).

 (2) a. Lukas laughed. b. T

On the other hand, combining Chris with laughed yields Chris laughed with a truth value of F.

In addition to denoting simple functions, verbs can also denote recursive functions. For instance, a transitive verb denotes a function from entities to a second function, the latter of the same type as just described for the intransitive verb laugh (a function from entities to truth values). So the transitive verb invite might denote the function in (3).

 (3) [[ invite ]] = { Chris → ( Andrew → T ) , David → ( Andrew → T ) , Eddie → ( Andrew → F ) , Chris → ( Brian → F ) , David → ( Brian → F ) , Eddie → ( Brian → T ) }

Combining invite with a theme argument (say, David) has the syntactic effect of yielding the phrase in (4a). As before, the corresponding semantic effect is to select the entity denoted by the argument in (3) and to return the associated values, as shown in (4b).

 (4) a. invited David b. [[ invited David ]] = { ( Andrew → T ) , ( Brian → F ) }

Further combining invited David with an agent argument (say, Andrew) yields the sentence in (5a) and the truth value in (5b). This second step in the derivation of a transitive sentence is exactly equivalent to the first and only step that is necessary in an intransitive sentence.

 (5) a. Andrew invited David. b. [[ Andrew invited David ]] = T

It is important to understand that the order of the arguments in (3) reflects derivational order (the order in which the arguments combine structurally), not their superficial linear order. Given purely semantic considerations, it is equally easy to write functions in which derivational order is congruent with linear order, and you are asked to do so in Exercise 3.1.

Verbs like laugh and invite are instances of one-place and two-place predicates, respectively. The term predicate here refers to a vocabulary item, with a focus on its capacity to combine with one or more arguments. The number of arguments that a predicate requires is its semantic valency.

If truth in hearts that perish

This simple formal semantics is a model of the verb laughs employing abstract objects such as functions, sets, denotations, truth values.  As a function, laughs associates, or is an association of, concrete, flesh-and-blood entity such as Chris or Lukas, with one or another of the abstract objects (T)rue or (F)alse.  Laughs has a parameter which can accept an argument (to use Date’s terminology); or to use the authors’ terminology, laughs can combine with an argument.  When combined with the name Lukas, the function laughs gets applied to the flesh-and-blood Lukas — that is to say, it selects this flesh-and-blood creature — and returns (T)rue.

If one is a Platonist they may be content with treating all the abstract objects mentioned here as existing and non-fictional:  functions and truth values exist as abstract, non-material objects just as abstract objects as the perfect triangle or the perfect square do.  If one is not a Platonist, he may still be content picturing all of these objects as if they existed, and hold out for the hope that there is, or will be, a way of treating all of these as fictions.

When considered as something that can accept (or ‘combine with’) arguments, a function is an abstract machine:  it accepts an input (the name Lukas), performs an ‘applies’ or ‘selects’ operation, and generates an output (here the truth value (T)rue).  The applying and selecting are abstract; that is, no particular, concrete operation is getting specified.  And I suppose this is how one produces an abstract operation:  name an operation, but omit any concrete implementation of that operation.

Even the Platonist in me, however,  has some difficulty with the notion of abstract operations such as ‘applies’ and ‘selects’.  Tortured by a bee buzzing around in his bonnet, my inner Platonist feels compelled to utilize something like Plato’s Demiurge in the Timaeus to picture these operations.  Instead of Plato’s divine craftsman who shapes the world guided by his vision of the Forms, this Demiurge has something of a lower-level task of taking the string (or sounds, or hand-signals, or whatever) embodying the name Lukas, searching through the entities bearing that name (somehow the Demiurge has no problems with ambiguity), selecting one, seeing that this entity is indeed laughing, and returning a truth value.

This image of a Demiurge selecting entities and applying functions to them would have equal value for the Platonist and the fictionalist, at least if the Platonist hews to Plato.  For Plato regarded regarded his Forms (abstract objects) as real, but his Demiurge as just a myth, just a picture…in other words, a fiction. Likewise, our Demiurge, our all-seeing, untroubled-by-ambiguity selector of entities, is just a picture, a creature existing only in the realm of ‘as if’.  We need this picture as a psychological crutch to make up for that lack of any concrete implementation of the abstract operations which gets the bee in our bonnet buzzing.

One side-note:  Santorini and Kroch have the function laughs returning both a truth value and a phrase (Lukas laughed).  But isn’t a function supposed to always return just a single value?