Search code examples
logicfirst-order-logic

First-order logic formula


If I want to express in first-order logic that 'the element(s) in the set with the smallest radius has the value 0', would the following be right?

∀ e1 ∈ S.   ∀ e2 ∈ S.   Radius e1 ≤ Radius e2   ⇒   Value e1 = 0?

Are the variables correctly quantified?

Thanks


Solution

  • Just to clarify with parentheses, what you wrote is usually taken to mean:

    \forall e1 \in S. (\forall e2 \in S. (Radius e1 <= Radius e2 --> Value e1 = 0))
    

    This statement asserts that the value of every element is 0. Here's how: Pick an arbitrary e1, now pick e2 = e1, and we have: Radius e1 <= Radius e1 --> Value e1 = 0. Since the antecedent (thing before the -->) is true, we have Value e1 = 0. And since we made no assumptions about e1, we have forall e \in S. Value e = 0.

    The problem is that your parentheses are off.

    \forall e1 \in S. (\forall e2 \in S. Radius e1 <= Radius e2) --> Value e1 = 0
    

    In order for the antecedent to be true now, e1's radius has to be less than or equal to every (as opposed to any) other radius, which seems like what you intended.