Tag Archives: Restriction

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:

matt_damon_splashnews--300x300

ashton_kutcher-4036

Sigh.  There is too much beauty in the world.

Advertisements

Some More Clean-Up Work: Propositions And States Of Affairs

Following Chisholm, I have been identifying propositions with states of affairs.  A proposition is a subset of the set of states of affairs.  The state of affairs of John grasping a doorknob at time t_0 in Chicago is a state of affairs that always occurs (or always fails to occur).   States of affairs like this one are propositions.  The truth (falsity) of a proposition is nothing but a certain state of affairs occurring (failing to occur).  I am ignoring the question, which is pestering me right now, of why then it seems so awkward to talk about a ‘true’ (‘false’) state of affairs.  From The Stanford Encyclopedia of Philosophy article on Roderick Chisholm:

Consider the state of affairs that is expressed by the sentence ‘Someone is walking’. Chisholm wanted to say that this state of affairs occurs whenever someone walks, and fails to occur at times when no one is walking. Other states of affairs are not like this. For them, it is impossible to sometimes occur and sometimes fail to occur. Chisholm claims that this provides the opportunity for an ontological reduction. We can define a proposition as a state of affairs of this latter sort — it is impossible for there to be times when it occurs and other times when it does not occur. A true proposition is thus one that occurs; and afalse proposition is one that does not occur. Chisholm thinks that we may understand the principles of logic to be about these propositions. By saying that a fact is a true proposition, Chisholm gains yet another ontological reduction ([P&O], 123).

Chisholm thought that in some cases it makes sense to speak of the location at which a state of affairs occurs. Suppose John walks in Chicago at a certain time. Then Chisholm would be willing to say that the state of affairs of John’s walking occurs in Chicago and at that time.

Those states of affairs that are not propositions are events.   I am going through this stuff a bit impressionistically; the chances of my making an error someplace are high.

The tuples in the body of a database relation are propositions.  That is to say, they are states of affairs.  In a conventional database, these are always states of affairs occurring now, and now, and now…. John is an employee of WIDGETS_R_US now, the ‘now’ being implicit in the presence of that tuple in the relation.   In a temporal database as described by Date and Darwen (TEMPORAL DATA AND THE RELATIONAL MODEL),  these are states of affairs that occurred during a time period, or are occurring now (“Since t_0….”), the relevant time periods being explicitly stated in the tuple.

Since propositions are nothing but states of affairs of a certain kind, the operations of the Relational Algebra are operations on states of affairs of that kind.  On the relation ‘Standing_To_The_RIGHT_Of’, for example, we can perform a RESTRICT operation that delivers to us the state of affairs of Don standing to the right of Genghis Khan, then perform a PROJECT operation on that derived relation to obtain just Don.

We will figure out later what to do with Don now that we have him.

My homage to Plato’s SYMPOSIUM for this post will be Matt Damon.  This time we are a bit further along on the way towards eros for mathematical beauty:

mattdamon2a

But let’s not forget it all originally stems from eros for gorgeous young men.


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.

GORGEOUS_EQUALS_GORGEOUS(0)
THIS_ONE THAT_ONE
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:

GORGEOUS_EQUALS_GORGEOUS{THIS_ONE, THAT_ONE} where THIS_ONE = PERSON(NAME(‘Robert Pattinson’))
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:

GORGEOUS_EQUALS_GORGEOUS(1a)
THIS_ONE THAT_ONE
Robert Pattinson Robert Pattinson

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

GORGEOUS_EQUALS_GORGEOUS{THAT_ONE} where THIS_ONE = NAME(‘Robert Pattinson’)

To get the relation pictured by:

GORGEOUS_EQUALS_GORGEOUS(1)
THAT_ONE
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.

So:

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 Predicate Returns A Relation

We have seen that the predicate:

x is to the left of y

is mapped to the truth value TRUE when Charles is substituted for x and Genghis Khan is substituted for y.  The Relation TO_THE_LEFT_OF comprises all true propositions and only true propositions that get generated when values are substituted for x and y.  So the predicate is a function whose range is the truth value TRUE for every proposition that is included in the relation, and FALSE for every proposition that is not included in the relation.

I think, however, that we would get a slightly simpler account if we see the predicate as a function returning Relations comprising the single proposition TRUE, or the single proposition FALSE.  In the Relational Algebra, we would get a relation comprising the single tuple (and therefore proposition) TRUE if, after doing the Restriction that gives us:

Charles is to the left of Genghis Khan.

we then projected on the null set of attributes (“columns”).  We would then end up with Chris Date’s TABLE_DEE, that is, the Relation with cardinality 0 (o attributes, that is, 0 “columns”) and a single tuple.  TABLE_DEE is the Relation that corresponds to (I guess I should say ‘is identical with’) the weird classical logic proposition TRUE.  The predicate returns the proposition TRUE wrapped in the Relation TABLE_DEE when the Charles and Genghis Khan substitution is made.

Correspondingly, when John is substituted for x and Genghis Khan is subsituted for y, so that we get:

John is to the left of Genghis Khan.

the Restriction selects no tuple in the Relation TO_THE_LEFT_OF.  We then have a Derived Relation with a cardinality of 2 (i.e., the Relation has 2 “columns”) holding the null set of tuples.   If we then project on the null set of attributes, we end up with a Relation of cardinality 0 comprising 0 tuples.  Chris Date calls this Relation TABLE_DUM, and it holds the tuple, that is to say, the proposition FALSE.  The predicate returns the proposition FALSE wrapped in the Relation TABLE_DUM when the John and Genghis Khan substitution is made.

Thinking of the predicate as returning either TABLE_DEE or TABLE_DUM simplifies things a bit, because it means we never have to leave the Relational Algebra when modeling the predicate.  Everything gets explained in terms of just one set of operations, the operations of the Relational Algebra.

 

 

 


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.