It is not necessary to use second-order predicate logic to express
that Oranges have more Vitamin C than Apples.
First-order predicate logic includes the universal quantifier (?) and
functions, which is sufficient for your example.
First we define a function:
"Let C(x) represent the Vitamin C content of 'x'."
Then we can express that Oranges have more Vitamin C than Apples:
? orange, apple: C(orange) > C(apple)
You can read this as:
"For all possible pairings of an orange and an apple,
the Vitamin C content of the orange is greater
than the Vitamin C content of the apple"
Unlike colloquial English, where we can express a generalization such
as "Oranges have more Vitamin C than Apples", first-order predicate
logic makes us specify a property that holds for EVERY possible
pairing of apple and orange.
(We could also express a property that holds for SOME possible
pairings of apple and orange by using "There Exists" (?). However,
"There Exists" is not applicable to your example.)
A note of caution: a wide range of notational variants is in use for
first-order predicate logic. For example, we could also write your
formula this way:
?orange ?apple greater(C(orange), C(apple))
Here's another variant, using just ASCII characters:
\A orange,apple . greater(C(orange), C(apple))
That notation is interesting, because you can use it to type your
formula into the online "Kniffel" application, which can process the
formula in various ways. Kniffel can typeset it into LaTex or PNG
format, represent it as a tree, convert it to conjunctive normal form
or disjunctive normal form, check for structural errors, etc:
"Kniffel: First Order Predicate Logic Converter"
You can find much further information about First-order logic at Wikipedia:
I hope I have answered your question at the level that you are
seeking. If anything is not clear, please use the "Request
Google Search Strategy:
Request for Answer Clarification by
24 May 2006 21:46 PDT
Thanks for taking interest in my question, though I am hoping for some
clarification. Predicate logic, fully formalized, as I remember it,
translates terms such as 'orange' and 'apple' into terms like Ox, for
'x is an orange'. So, a statement such as "all presidents are liars"
might be represented as:
?x(Px -> Lx)
Or so I remember.
Given these constraints, could you clarify the answer to represent a
full predicate logic formalization? (I have an idea of what this would
look like, but then again my memory of translations is faded, indeed.)
Clarification of Answer by
25 May 2006 05:57 PDT
In my earlier answer, I used 'apple' and 'orange' as typed variables.
The types were implicit: the variable 'apple' ranged over apples, and
the variable 'orange' ranged over oranges:
"Values of the variables are taken from an understood universe
of discourse; a refinement of first-order logic allows variables
ranging over different sorts of object."
We can make the typing explicit, by using variables 'x' and 'y' which
range over 'things':
? x, y: orange(x) and apple(y) implies C(x) > C(y)
This is well-formed, yet it doesn't correspond to your example unless
the following things are known about the "universe of discourse":
1. orange(z) is a predicate indicating whether z is an orange
2. apple(z) is a predicate indicating whether z is an apple
3. C(z) is a function giving the Vitamin C content of z
4. ">" represents the greater-than relation
5. 'x' and 'y' are variables ranging over 'things'
As before, there are different notational conventions in use, and we
can write this in more than one way. The version above uses words
rather than symbols for logical-and ("and") and logical-conditional
("implies"), and has a precedence convention where ">" and "and" have
a higher precedence than "implies", which avoids the need to use
Here is a version that can be used as input to the Kniffel tool:
\A x,y . (orange(x) & apple(y) => greater(C(x), C(y)))
and here's another version, using symbols throughout and maximum parenthesization:
?x ?y ( (orange(x) ? apple(y)) ? (C(x) > C(y)) )
Informally, we can read this as "For all 'x' and 'y': if 'x' is an
orange and 'y' is an apple, it implies that the Vitamin C content of
'x' is greater than the Vitamin C content of 'y'".
We can apply various transformations to this, resulting in alternative
ways of expressing the same thing. For example, here it is re-cast
into conjunctive normal form:
?x ?y ( ¬(orange(x) ? ¬apple(y) ? (C(x) > C(y)) )
This says that for all 'x' and 'y': EITHER 'x' is not an orange OR
ELSE 'y' is not an apple OR ELSE the Vitamin C content of 'x' is
greater than the Vitamin C content of 'y'.
I hope this clarification provide the information that you are
seeking. If not, feel free to request further clarification.