Category Archives: Cartesian Product

Logical Pairings

In previous posts I’ve tried to interpret the canonical Tagalog sentence (e.g., maganda si Taylor Lautner) in terms of an equality relation, GORGEOUS_EQUALS_GORGEOUS.  Conceptually, the relation is formed by logically pairing each member of the set GORGEOUS (MAGANDA) to each of the members, then taking a subset of the set that results from this logical paring.  That subset comprises those logical pairings in which each member of the pair is identical with the other.

What do I mean by ‘logical pairing’?  In the real world, to pair one thing with another is to bring the two things together in some way.  One may pair, for example, some particular matte board, with its particular color, with the painting one is getting framed.  Here, the matte board and painting are getting physically paired.  Or one may pair John with Bill by picturing them in the mind’s eye as together as a couple.  Or one may pair John with John by first seeing him double (i.e., seeing him twice but simultaneously), then by realizing the two Johns are in fact one.

To get a logical pairing, abstract from any concrete form of pairing, that is, ignore any particular way in which the bringing together is done.  Ignore in fact everything about them except that they go under the heading ‘bringing together’ (since maybe that is the only single thing they all have in common.)   Then be content with the fact that, while each member of the set MAGANDA can potentially be brought together with every member of that set,  any actual pairings will be performed just every now and then, and only for a few members.  (For example, in a particular article, Dan Savage pictures Ashton Kutcher and Matt Damon together.)  A logical pairing is a bringing together in which all concrete details of the bringing together (how it is done, in what sense the things are brought together?  Physically?  In the imagination only?  By already knowing that the “objects” of one’s double vision are in fact one and the same?) are ignored.  One salient detail in particular is ignored:  is the pairing actually being done in any given instance, or is it just something that could be done?

If one does not want to rest content with each member of the set being brought together just potentially with every other member of the set, they (plural third person intentionally being used here as a neutral singular third person) are free to imagine a Demiurge ala Plato or a God ala the medievals whose cognitive capacities are sufficiently large as to simultaneously bring together in its mind’s eye every member of the set MAGANDA with every member of that set, so large, in fact, as to be able to see Matt Damon twice with the mind’s eye but already know that Matt Damon is, well, Matt Damon.

I will end by confessing that I like to think of projection as the Demiurge’s ignoring one or more attributes of a relation, and of restriction as the Demiurge’s ignoring one or more tuples in the relation.

Today, my homage to Plato’s SYMPOSIUM (first, gorgeous guys, then the Relational Algebra, then the form Beauty itself) will take the form of a concrete (not just a logical) pairing of Matt Damon and Ashton Kutcher:



Sigh.  There is too much beauty in the world.


Some Gorgeous One Equals Robert Pattinson

Below, I have argued that (or, more accurately, attempted to provoke the Aha Erlebniss that)  the following three Tagalog sentences:

Titser ang babae.

Maganda ang lalaki.

Umalis ang babae.

…have as their most literal translation something like the following:

Some teacher one  equals the woman.

Some gorgeous one equals the man.

Some having left one equals the woman.

How would these sentences be expressed in the Relational Algebra?  Let me try to express “Some beautiful one equals Robert Pattinson” (I am switching from Team Jacob to Team Edward for the moment) in the Relational Algebra.  (Notice I am switching from ‘the man’ to ‘Robert Pattinson’.  Can I get away with this?)

A relation is a set of ordered pairs formed by taking the Cartesian Product of two sets, not necessarily distinct, and obtaining a subset (possibly identical with the entire set) of the set of ordered pairs.  Let’s form a particular EQUALS relation, GORGEOUS_EQUALS_GORGEOUS, by taking the Cartesian Product of the set GORGEOUS with the set GORGEOUS, then take from that Product the set of all those ordered pairs in which each member of the pair is identical with the other.  So that the relation can be more easily manipulated (conceptually), add in all the stuff necessary to turn this relation into a database relation, complete with tuples and attributes and all that good stuff.

Robert Pattinson Robert Pattinson
Taylor Lautner Taylor Lautner
Kellan Lutz Kellan Lutz
Brad Pitt Brad Pitt
Ashton Kutchner Ashton Kutchner

Restrict GORGEOUS_EQUALS_GORGEOUS to just the Robert Pattinson tuple:

More attention needs to be paid to the literal selector PERSON(NAME(‘Robert Pattinson’)).  Will my worries about this, unarticulated here, eventually blow up in my face?

To get the relation pictured by:

Robert Pattinson Robert Pattinson

Now project on the attribute THAT_ONEi in addition to performing the RESTRICT:


To get the relation pictured by:

Robert Pattinson

(Imagine the surrounding white space as regnant with the matrix from which this relation sprints, namely, the base relation GORGEOUS_EQUALS_GORGEOUS.)

The above relation expresses the proposition that is also expressed in English as:

Some gorgeous one equals Robert Pattinson.

and that is also expressed in Tagalog, I claim, as:

Maganda si Robert Pattinson.


Maganda si Robert Pattinson.

Some gorgous one equals Robert Pattinson

have the same semantics.  (Well, would have the exact same semantics if ‘gorgeous’ were exactly equivalent to ‘maganda’, which of course may be doubtful.)

Now, in the spirit of Plato’s Symposium (eros for gorgeous  young men inspires eros for the Relational Algebra and the Predicate Logic, and from there to the Form of Beauty itself), let me picture some of the members of that set which inspires my forays into the Relational Algebra.  These pictures are a bit more colorful than the pictures of relations shown above.

Do I really have to choose between Team Edward and Team Jacob?

12/04/2012:  Updated to remove problematic assertions about the semantics of ‘is’.

The Mystery Of The Missing IS: Or, Had John Duns Scotus Been An Ordinary-Language Philosopher Working In Tagalog

Below, I have tried to start incubating the suspicion that there is something fishy about treating ‘is’ as a predicate with two parameters accepting one argument each, i.e., a two-place relation.

Tagalog doesn’t have a verb ‘is’, no verb ‘to be’.  Given that more literal translations of Tagalog sentences often display the phrase ang noun phrase structure as:


phrase [is] ang noun phrase

For example:

Titser ang babae.

Maganda ang lalaki.

Umalis ang babae.

gets rendered as:

Teacher [is] the woman.

Beautiful [is] the man.

Having left [is] the woman.

or as I prefer (see my attempt below at eliciting the ‘aha erlebniss’):

Some teacher one  [is] the woman.

Some beautiful one [is] the man.

Some having left one [is] the woman.

…given that, one might think that, always, the suspect verb aka predicate aka relation is implicitly in effect in sentences with that structure.  The lack of a verb ‘to be’, of an ‘is’ in Tagalog that so perplexed the first Spanish grammarians of the language (so that, in their total confusion and lack of understanding, they tried to interpret the Tagalog inversion marker ‘ay‘ as the verb ‘is’, a confusion and misinterpretation that has had hilarious consequences lasting to this day), is always there, just unpronounced (or unwritten).  The space between ‘maganda‘ and ‘ang lalaki‘ in the written sentence, or the lack of interruption in the string of sounds (if that is how maganda ang lalaki gets pronounced — I am not strong enough presently in Tagalog to know) or the glottal interruption (if one exists between the ‘maganda‘ and ‘ang lalaki‘)  … the space, or lack of interruption in the continuous stream of sound, or the glottal, these are, as the case may be, an implicit sign of the two-place relation ‘is’.

Following Naylor, Schachter, and my own intuition, I have been treating the space, the lack of interruption in the continuous stream of sound, the glottal as an implicit equals.  For example, I prefer to translate the above three Tagalog sentences as:

Some teacher one  = the woman.

Some beautiful one = the man.

Some having left one = the woman.

Unlike ‘is’, however, which is (if there is such a critter) a two-place relation, ‘equals’ (alternatively, ‘=’ ) is, as I am about to show, a one place relation.  It is not just that the sign corresponding to ‘is’ is lacking in Tagalog:  the (real or putative) semantics of ‘is’ is lacking in Tagalog as well.  Tagalog is working with something completely different.

Clearly the ‘equals’ that is in play here is not given by the ‘equals’ in the following two-place relation:



Morning Star Evening Star
3 3
Rose With Barcode 3185321 Rose With Barcode 3185321
Clifford Wirt Clifford Wirt
The murderer of Jones The butler

…because in sentences such as Maganda si Taylor Lautner, the word ‘Maganda’  does not, at the moment of its utterance, specify, identify, locate, expose, or pick out any one particular thing.   ‘Maganda’ is equivalent to ‘Some beautiful one’, or the part of the formal sentence below that occurs before the ‘=’:

∃x ∈ MAGANDA: x = si Taylor Lautner.

The x that belongs to the set MAGANDA is left unspecified, unidentified, unlocated, unexposed, un-picked-out at the start:  Maganda … though it does get specified at the end:  …si Taylor Lautner.  But a two-place relation requires two identified, specified arguments for its two attributes.

Let me try to capture in D the sentence ‘∃x ∈ MAGANDA: x = si Taylor Lautner’.  Let me posit the following 1-place relation:

Taylor Lautner
Sunset at time t and place p
Rose With Barcode 3185321
Wine Red
The Taj Mahal
Haendel’s Umbra Mai Fu

Taking this relation as my springboard, I capture ∃x ∈ MAGANDA as MAGANDA{} (which gives us TABLE_DEE, or TRUE, or YES), then do a CARTESIAN PRODUCT of that with a restriction of MAGANDA:

MAGANDA{} as t_sub_0,
MAGANDA{MAGANDANG_BAGAY} where   MAGANDANG_BAGAY= ‘Taylor    Lautner’ as t_sub_1:
t_sub_0 X t_sub_1

CARTESIAN PRODUCT is a special case of JOIN.  TABLE_DEE JOIN r, where r is any relation, yields r.  So the D statement above yields:

Taylor Lautner

which expresses the semantics of the sentence ‘Maganda si Taylor Lautner’.  In this way, we get rid of the doubtful (I think) verb aka two-place relation ‘is’.

To sum up, a bit impishly:  the semantics of ‘is’ is different in Tagalog than in English because Tagalog really doesn’t have an ‘is’.  Later, I will try to develop this into part of an argument that Tagalog lacks a subject.  Tagalog’s lacking a verb ‘to be’ is related to its lacking a subject.

To stray back for a moment to philosophy:  were Duns Scotus an ordinary-language philosopher working in Tagalog, it may never have occurred to him to try to find a single relation (e.g. ‘contracts’ ) between the entity Beauty, as the argument on one side of the predicate ‘is’, and Taylor Lautner as the argument on the other side of the predicate, and so on for every other proposition formed by supplying arguments to the parameters x and y in the predicate x is y.

11/10/2012:  Updated to make a point a bit more clearly.

11/10/2012:  Updated to parenthetically add some snark about the first Spanish grammarians of the Tagalog language in the 1600’s.


Update:  11/25/2012:  Post grayed-out because I am dissatisfied with it.

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.