Argument Types

Predicates and Denotational Functions

Now we’ll talk about argument types in a little more detail.

Argument Types

Argument types have to do with the types of things that a predicate or function requires as its arguments. If you look at the first example expression on the slide, it takes the #$MotherFn function and applies it to Hillary Clinton, and of course we know that that gives you a non-atomic term that would denote the mother of Hillary Clinton, Dorothy Rodham.  This makes perfect sense.

But consider the second example; there’s something really odd about it.  I’ve taken the #$MotherFn function and applied it to the White House.  That’s perfectly fine as far as arity goes, but there’s something strange about that argument.  The White House is a building, and a building is not the kind of thing that can even have a mother; so there’s something really weird about that term.   It is a term that is syntactically well-formed, but its meaning is nonsensical.  So you would say that the argument that #$MotherFn is being applied to is not the right type of argument for that function (it’s not an appropriate or correct type of argument for the function we have).

As you can see from the second example, we need to be able to specify, in the CycL language, what types of arguments are appropriate are for a particular function or predicate.

Argument Types

  There are two ways you can indicate the appropriate types of arguments for particular functions or predicates.  There are a number of predicates, generically represented as #$arg[N]Isa, which state what the argument in the Nth position of the predicate which #$arg[N]isa is applied to must be an instance of.  For example, the #$arg2Isa predicate states that the second argument to which that particular relation is applied must be an instance of a particular collection.

The other way to specify a relation’s argument types is with a similar group of predicates that denote specialization.  These predicates, generically represented as #$arg[N]genl, state that a certain relation, with respect to the Nth argument place, must take an argument that is a specialization, or sub-collection, of a particular collection.

Now let’s see how these are actually used.

Argument Types

Refer to the slide for some examples of argument type designation.  The first bullet under Example 1 says that the first argument of the #$mother predicate must be an instance of the collection #$Animal.  The second bullet under Example 1 says that the second argument of the #$mother predicate must be an instance of the #$FemaleAnimal collection.  So, basically, what the two sentences say is that the #$mother predicate relates an animal to a female animal.

Refer to the third sentence, applying the #$mother predicate to Chelsea Clinton and  Hillary Clinton.  This sentence is well-formed based on the bulleted argument type declarations on the slide.  Chelsea Clinton is an instance of #$Animal and Hillary Clinton is an instance of #$FemaleAnimal.  Those arguments are both of the right types for the predicate in question -- #$mother.

Argument Types

  Now let’s look at the same sort of thing with respect to a function, the #$TransportViaFn function, which we haven’t seen yet.  The specifications on the slide under Example 2 tell us about the #$TransportViaFn function’s first argument.  In fact it’s just a unary function, so it only has one argument.  The first bullet states that the one argument must be an instance of the #$ExistingObjectType collection.  The second bullet states that the argument must be a specialization of the #$SolidTangibleThing collection.

The application of #$TransportViaFn to the collection, #$Automobile, is well-formed.  This is because #$Automobile is an instance of #$ExistingObjectType and is a specialization of #$SolidTangibleThing.  So it meets the argument type constraints, and the arity constraints are met as well.

Argument Types

To sum up the points that we’ve been discussing, a relation needs to be applied to arguments that meet its argument type specifications in order for the result to be what we call “semantically well-formed.”  Reviewing some earlier examples, #$MotherFn, applied to the White House, is semantically malformed, but when it’s applied to Hillary Clinton the result is semantically well-formed.

Let’s compare that to (Cf.) the other notion of well-formedness that we talked about in the previous lesson.   If a relation is applied to arguments which meet that relation’s argument type specifications, the result is said to be semantically well-formed.  If a relation is applied to the correct number of arguments for its arity, then the result is said to be syntactically well-formed.

  Let’s look at some examples and determine whether they’re well-formed or not.  First we’re given some information about the #$objectHasColor predicate. We’re told it’s a binary predicate and that its first argument must be an instance of #$SpatialThing-Localized.  So we know that  it’s some spatial thing that has some location in the physical universe.  We’re also told that its second argument has to be a color.  Consider the sample sentences on the lower half of the screen and determine if they’re well-formed.

The first example applies #$objectHasColor to three arguments.  This presents a problem since #$objectHasColor is a binary predicate, meaning that it takes only two arguments to be syntactically well-formed.  And since it is not syntactically well-formed, it is therefore not semantically well-formed.  A sentence cannot be semantically well-formed if it’s not syntactically well-formed.

Examples of Predicate Use

  The second sentence obeys arity because it applies the predicate to two arguments, so it’s syntactically well-formed.  Now let’s determine if it’s semantically well-formed.  The first argument, #$Emerald-Gem, as you might be able to guess from the name, is the collection of all emeralds -- not a particular emerald.  Does that meet the arg type constraints?  We’re told above that the first argument must be an instance of #$SpatialThing-Localized.  Even though any individual emerald is, of course, a spatial thing localized, the collection of all emeralds is not.  The collection of all emeralds is an abstract collection that includes all emeralds, so it’s not something that has a location in the physical universe.  Therefore, #$Emerald-Gem violates the arg type constraint for the first argument place of the predicate, thus making this example not semantically well-formed.

Examples of Predicate Use

  Now consider the third example sentence.  Arity is obeyed, so it’s syntactically well-formed.  In the first argument place we have the White House.  As you can probably tell from that name, it is not a collection, but a particular building.  A particular building is a spatial thing localized,  so that argument meets the arg constraint for the first argument position.  The second argument position requires an instance of #$Color.  Since #$WhiteColor is an instance of #$Color, the constraint on the second argument position is also fulfilled.  So we can say that this example is both syntactically and semantically well-formed.  This sentence simply says that the White House is white.

The last example is similar to the third; it just substitutes #$PinkColor for #$WhiteColor.  Even though the sentence is false (the White House is not pink), the sentence is semantically well-formed.  In fact, if a sentence isn’t semantically well-formed, it can’t be true or false.  So, the fact that a sentence is true or false implies that it is semantically well-formed.

Summary

 This concludes the lesson on Argument Types.