Skip to main content

Subsection 4.1.4 Defining Predicates

We define a predicate by giving a clear statement of when it is true and when it is false. As is common in English definitions, we typically write “if” when we mean “if and only if”. To write predicate definitions, we use variables as placeholders.

Examples of predicate definitions:

    Notice that we’ve written these definitions in English. That makes them useful for us (as people). Before we can use our predicates in a formal reasoning system, we must, of course, provide formal definitions of them. We do that with premises. We will usually need some base facts (for example, that 1 is a number or that Smokey is a bear) and some rules that enable us to derive other facts (for example, that the successor of a number is also a number or, if your mother is a bear, so are you).

    Big Idea

    Logic is a formal system. All it does is manipulate symbols. The names we use have no meaning to the reasoning engine. They matter only to the extent that we use them to state premises and to interpret conclusions.

    Video cover image

    Exercises Exercises

    Exercise Group.

    1.

    Assume that Lloyd, Agnes, and Lucy are names of pets and that white, tortoise and calico are names for fur colors. We want to encode a set of facts about the fur color of our pets. We want to do that by writing:

    Fur(Lucy, calico) Fur(Agnes, tortoise) Fur(Lloyd, white)

    Consider the following proposed definitions for the predicate Fur:

    1. Fur(x, y) : True if x’s fur color is y.

    2. Fur(y, x) : True if y’s fur color is x.

    3. Fur(x, y) : True if y’s fur color is x.

    Which of these definitions is/are consistent with the way we have written our claims:

    1. Just I.

    2. Just II.

    3. Just III.

    4. Just I and II.

    5. Just II and III.

    6. Just I and III.

    7. All three.

    8. None of them.

    Answer.
    Correct answer is D.
    Solution.
    Explanation: In both definitions I and II, we assert that the first argument has, as its fur color, the second argument. In definition III, we assert that the second argument has, as its fur color, the first argument. If we want to use this definition, we must write our claims backwards as well. So, for example, we would have to write Fur(calico, Lucy).

    Exercise Group.

    Which of these definitions is/are consistent with the way we have written our claims?

    1.

    We want to define the predicate gt (for “greater than”) on the integers.

    (Part 1) Assume the following definition:

    gt(x, y) : True if x is greater than y.

    Which of the following claims is true in standard arithmetic:

    1. gt(5, 3)

    2. gt(3, 5)

    Answer.
    Correct answer is A.
    Solution.
    Explanation: 5 is greater than 3.
    2.

    (Part 2) Assume the following definition:

    gt(x, y) : True if y is greater than x.

    Which of the following claims is true in standard arithmetic:

    1. gt(2, 1)

    2. gt(1, 2)

    Answer.
    Correct answer is B.
    Solution.
    Explanation: Using this definition, the predicate gt is true if its second argument is greater than its first argument. Notice that, while this definition is legal, and we can use it if we are VERY careful, it’s not the kind of definition that we generally want. It violates our design rule that we should be able to read it as, “argument1 predicate argument2”. This would be a good definition for the predicate lt (less than).