# stuck! first order logic - identities (specifically "only")

Please correct me on why these may be wrong(identities). I've tried many times but it seems I'm missing something. for they key: M(x) = is a moon, O(x,y) = x orbits y, and m = mars, e = earth

Only mars has a moon: my attempt: ∀x((M(x)∧O(x,m))↔ x=m)

Earth has only one moon. my attempt" Ay(M(x) ∧ O(x,e) > x = e)

in addition, how would I approach a question like: There are exactly two moons with an atmosphere.

Thank you!

• You don’t want the moon to be identical to the planet, right? I’ll give you the answer for the first one so you have an idea for the other: ∀x∀y((M(x)∧O(x,y))→y=m). That is, for any two things, if the first is a moon that orbits the second thing, then the second this is Mars. Note that this example uses a conditional as the main propositional operator, as opposed to the bi-conditional in your attempt. Apr 12 at 18:13

"Only Mars has a moon" <-> "If a planet x has a moon y, then x is Mars"

(Note: I am assuming there is no existential import here, i.e. assuming that it is not implied that Mars does have a moon.)

"A planet x has a moon y":

``````∃y M(y) ∧ O(y,x)
``````

"If a planet x has a moon y, then x is Mars"

``````∀x (∃y M(y) ∧ O(y,x)) → x = m
``````

"Earth has only one moon" <-> "There is a moon x that orbits Earth, and if y is a moon that also orbits Earth, then x and y are the same moon."

``````(∃y M(x) ∧ O(x,e)) ∧ (∀y (M(y) ∧ O(y,e)) → x = y)
``````

"There are exactly two moons with an atmosphere." <-> "There is a moon x with an atmosphere and a moon y with an atmosphere, and x is different from y, and if there is a moon z with an atmosphere, then z is either x or y."

I will use the predicate A() for "has an atmosphere."

``````∃x ∃y M(x) ∧ A(x) ∧ M(y) ∧ A(y) ∧ x ≠ y ∧ (∀z (M(z) ∧ A(z)) → (z = x ∨ z = y))
``````

Pay close attention to what you're actually expressing.

M(x) means "x is a moon". x = m means "x is Mars". x = e means "x is Earth".

So in the first example, you're calling Mars a moon, and in the second you're calling Earth a moon. Remember, x is going to keep a stable reference inside the quantifier.

• In the first case you want to express something more like "For all x, if x is a Moon then x orbits Mars." `∀x((M(x) -> O(x,m))`

• In the second case, something more like "There exists an x such that for all y, if y orbits Earth, y = x"

In the case of exactly two moons with an atmosphere

• "There exists x and y, x not equal to y, such that for all z, if z is a moon, z = x or z = y."
##### “Only Mars has a moon.”

Thinking process:

“has a moon” is probably going to be expressed, given the options above, as “there is something that orbits it”. We only have m and e as constants (identified things), so we will need existential quantification to say, “there is a moon” (even if I don’t know what it’s called, say.) So far, we have:

There exists x such that Moon(x) and Orbit(x, Mars).

This says “Mars has a moon”. (That is, at least one moon.)

A very common way to express “uniqueness” in math is to say, “if there is any other thing with this property, then it is actually just the same thing.” In this world (or context) where only Mars has a moon, we need to say “If something else has a Moon, that other thing turns out to still be Mars”. The mathematical way of saying “is” is “equals”. So this would be:

For all y, if Moon(y) and Orbit(y, x), then x equals Mars.

(Remember that “if-then” can be expressed with the implication arrow.)

I did not quantify over x, to emphasize the role of y, first: y can be “anything else, which is a moon”.

Now we can just bring x back in too, to round out the statement, “for any 2 things in the world, if the first is a moon orbiting something, then the second thing has to be Mars.”

For all x and y, if Moon(y) and Orbit(y, x), then x equals Mars.

This is extremely similar to your attempt, except you put “Mars” into the variable representing “things which could have a moon orbiting them”, instead of leaving that variable open to range over all the other things which could be something other than Mars (but then turn out not to be).

You also do not need the bidirectional implication arrow. “If something has a moon, then it is Mars” is sufficient. There is no obvious “reversal” of that implication: if something is Mars, then what? Anything could follow - if something is Mars, then apples are red. This is similar to the “principle of explosion”, but I don’t know what it’s called.

Actually, I want to take back what I said above. The only problem with “if something has a moon, then it is Mars” is that in logic, this could be interpreted as a hypothetical: “If something were to have a moon, then it would be Mars.” Then we would also have to add in: “And there exists at least one thing, which has a moon.” Then I think we could use Modus Ponens to show that therefore, Mars has a moon.

There is an equivalent formulation, and I bet you can show with the axioms that they are equivalent, which is, “For all things such that they have a moon, they are equal to Mars”:

For all x, if there exists a y such that Moon(y) and Orbit(y, x), then x equals Mars.

This question gave me a lot of thoughts so I might have to come back to analyze it further. You could also use De Morgan’s laws to make the statements in the negative: “If something is not Mars, then it does not have a moon.” (And in regards to my previous observation, we might add: “And Mars has a moon.”)

##### “Earth has only one moon.”

Thinking process:

• Earth has a moon
• There is no other moon that Earth has, apart from the one just mentioned
• Therefore, if there were some hypothetical “other moon” of Earth, it would turn out to be the same moon mentioned above.

Let’s try, “Earth has a moon x, and, if there were some other moon y, it would turn out to be the same moon”:

There exists x such that Moon(x) and Orbit(x, Earth); and for all y such that Moon(y) and Orbit(y, Earth), y equals x).

In your attempt, you made the mistake of saying “x = e”, or that, “if something is a moon that orbits Earth, then that thing is Earth”, which is not true (Earth is not a moon, and does not orbit itself.) Also, you have free variables - x - that are not quantified over. Maybe it’s good practice to always check that all variables are quantified, in this scenario.

It might make it a lot easier to define a predicate, to make the notation more conceptually simple.

`HasMoon(x) := there exists y such that Moon(y) and Orbit(y, x)`.

Now think about the general form of “is unique”, or, “there is only one”:

`HoldsPropertyUniquely(x, P()) := for all y such that P(y), y = x`.

Or equivalently:

`HoldsPropertyUniquely(x, P()) := for all y, if P(y), then y = x`.

(I think this hints at that “such that” can be defined in terms of the implication arrow.)

Now see if you can put them together -

“If it has a moon, then it’s unique”:

For all y, if HasMoon(y), then HoldsPropertyUniquely(y, HasMoon).

And then we can add, “And, it is Mars which holds that property uniquely:

For all y, if HoldsPropertyUniquely(y, HasMoon), then y equals Mars.

But maybe this reduces to something much simpler!

HoldsPropertyUniquely(Mars, HasMoon).

My only worry is that the above is not allowed because you are quantifying predicates, so it counts as second-order quantification, I think.

See if you can formulate “If it has a moon, then the moon is unique”, in the same way.

(I am also worried that my predicates don’t handle the case where there are no moons. Always more work to be done.)

##### “There are exactly two moons with an atmosphere.”

I would say this is actually pretty open-ended. If you accept all the axioms of set theory as the context of that statement, you could just say, “the size of the set of all moons is 2”. If you have not yet assumed the axioms of set theory, what you need is a theory which has some kind of number. And that is actually no small business. There are different ways in different deductive systems to define a concept behaving like “numbers”. In general, almost every formal system I know of defined the natural numbers with what’s called a “successor function”, but that starts to be a larger topic, out of scope here.