2

I'm reading a book by Mark Tarver called Logic, Proof and Computation.

Chapter 8 (starting p71) is about First Order Logic. On page 77 (of Chapter 8) the author writes:

For any value for 'x', in '(taller x Elton_John)' the resulting proposition is true.

In first order logic this is written

( $\forall x\;$ (taller x Elton_John))

$\forall \;$ is the universal quantifier.

Now when I studied Discrete Maths at Uni 15 years ago - the universal quantifier $\forall\;$ meant for every x.

When I look at functional programming (Lisp, Haskell etc) for all and any are two distinct concepts. In functional programming for all means (every? function elements) and any means (some? function elements). That is the first applies the function to every element regardless of the result of the function, and the latter applies the function lazily, until it returns true.

My question is: Is the universal quantification symbol $\forall\;$ known as "for any x" or "for all x" in first order logic, and why is this different to discrete math?

hawkeye
  • 1,121
  • 8
  • 14

2 Answers2

5

The semantics of the English word "any" is quite complex, influenced by whether the verb in (or another part of) the sentence it appears in is negated, whether it is a question, and a lot of other subtle linguistic cues.

This is part of why mathematics has explict quantifiers, such that we can be completely precise about what we mean when there's a risk of misunderstanding.

$\forall x$ always means the same thing. The words "for any" may or may not mean that thing, depending on which context you find them in.

Note that the designers of your Lisp functions wisely refrained from naming one of them any?.

  • But you're saying for the mathematical universal quantifier, 'for every' and 'for any' mean the same thing, regardless of whether it is first order logic or not. – hawkeye May 16 '16 at 12:19
  • 2
    @hawkeye: No, I'm most definitely not saying that. The mathematical $\forall$ quantifier means what it means. The English phrase "for every" means that same thing (or at least I can't offhand think of an exception to this). The English phrase "for any" sometimes means the same as $\forall$ and at other times means something different. – hmakholm left over Monica May 16 '16 at 12:29
1

You question is related to English more than math. It always means "for every $x$,", but in English that's basically equivalent to "for any $x$ that you choose,". In context, that is shortened to "for any $x$," which has basically become a set phrase in mathematics very different from the use of "any" related to those programming languages.

Mark S.
  • 23,925
  • So you're saying from a predicate logic point of view, 'for every' and 'for any' have the same outcome? – hawkeye May 16 '16 at 12:16
  • 1
    @hawkeye, I'm saying that, in math, "for any" usually has the outcome the "for every" unambiguously has. If by "the outcome of 'for any'" you mean "a meaning like "any" in those programming languages", then the answer to your question is "no". If you meant "the outcome of 'for any' when written in a math textbook" then the answer to your question is "almost always yes". – Mark S. May 16 '16 at 13:00