Every mathematician is a scientis but only some mathematicians are teachers - first-order-logic

I can't figure out the FOL for this question.. Need help with this question. I have tried ∀ x, ∃y mathematician(x) , mathematician (y) -> scientist (x) & teacher (y)

∀ x (mathematician(x) -> scientist (x)) and
∃y mathematician(x)

Related

SICP stream integrator

In SICP chapter 3.5 the code for a integrator is given
(define (solve f y0 dt)
(define y (integral dy y0 dt))
(define dy (stream-map f y))
y)
a signal-processing system for solving the differential equation dy/dt=f(y)
where f
is a given function. The figure shows a mapping component, which applies f
to its input signal, linked in a feedback loop to an integrator in a manner very similar to that of the analog computer circuits that are actually used to solve such equations.
What is the real life useage of the given program?

First order logic - position of quantifier

When you have a statement with →, does it matter if you use a quantifier before or after the implication?
ex. the statement "Every man loves a king" (2 different semantic interpretations)
Every man loves a king and these kings may all differ from each other. ∀x IsMan(x) → ∃y (IsKing(y) ∧ Loves(x,y))
There is a single king that every man loves. ∃y, ∀x (IsKing(y) ∧ IsMan(x)) → Loves(x,y)
For #1, would it be equally correct to write it as ∀x, ∃y, (IsMan(x) ∧ IsKing(y)) → Loves(x,y)?
And for #2, what about ∃y IsKing(y) → ∀x (IsMan(x) ∧ Loves(x,y))?
Yes, the order of quantifier matters to decide the satisfiability/validity of a formula.
One way to be sure of it is to know that (A → B) is the same as (not A or B) and that (not (∀x x))is the same as (∃x (not x)).
Thus, when you have (∃x, ∀y x → y) it is the same as (∀x ∃y ((not x) or y)).
Which is different from (∃x, x → ∀y y) which can then be ((∀x (not x) or (∀y y)).

express the following statements as formulas in first-order predicate logic

Let:
• B(x) for “x has bifurcated horns”
• D(x) for “x suffers from dermal asthenia”
• F(x) for “x is female”
• M(x, y) for “x is the mother of y”
• S(x) for “x is Syldavian”
• U(x) for “x is a unicorn”
How do I express
1) "Mother unicorns with dermal asthenia pass the condition on to all their offspring"
2) "Any unicorn whose mother is Syldavian suffers from dermal asthenia"
in first-order predicate logic?
My attempt
1)
there exist a x and for all y,
if x is mother of y
and x is a unicorn
and x has dermal asthenia,
it implies y have dermal asthenia too.
∃x∀y( (M(x,y) ∧ U(x) ∧ D(x) ) -> D(y) )
2)
for all x and y,
if y is a unicorn
and x is mother of y,
and x is Syldavian,
it implies y has dermal asthenia
∀x∀y( ( U(y) ∧ M(x,y) ∧ S(x) ) -> B(y) )
Any help would be appreciated, especially on when to use ∀ and when to use ∃.
Thank you.
"Mother unicorns with dermal asthenia pass the condition on to all their offspring"
∀x∀y((M(x,y) ∧ U(x) ∧ D(x)) -> D(y))
"Any unicorn whose mother is Syldavian suffers from dermal asthenia"
∀x∀y((M(x,y) ∧ U(y) ∧ S(x)) -> D(x))
Here there is no statements "there exists" or "at least one". These statements are about all unicorns so we do not use ∃.

Difference between ∀x∃y and ∃y∀x

I'm currently reading this document by the University of Texas in Austin about Predicate Logic, and got stuck on the following:
Note about nested quantifiers: For predicate P (x, y): ∀x∀yP (x, y) has the same meaning as ∀y∀xP (x, y). ∃x∃yP (x, y) has the same meaning as ∃y∃xP (x, y).
We can not interchange the position of ∀ and ∃ like this!
Example: U = set of married people. True or false? 1. ∀x∃y[x is married to y]
2. ∃y∀x[x is married to y]
I'm doubtful about the answer to this example. Also, some explanation about ordering of ∃ and ∀ operators would be appreciated.
1) ∀x∃y: For every x there exists a y (such that...)
2) ∃y∀x: There exists a y (such that) for every x...
Using the marriage example respectively:
1) Everyone is married to someone (ie. For every person there exists a person to whom he/she is married)
2) Someone is married to everyone (ie. There is someone who is married to everyone)

Simplify expressions with nested ∃ and an equality

I came across a proof that I could not easily automate until I threw this lemma into Isabelle’s simplifier set:
lemma ex_ex_eq_hint:
"(∃x. (∃xs ys. x = f xs ys ∧ P xs ys) ∧ Q x) ⟷
(∃xs ys. Q (f xs ys) ∧ P xs ys)"
by auto
Now I am wondering: Is there a good reason why the simplifier or the classical reasoner is not able perform this simplification in general and automatically? Is there a more general form of this lemma that could be added to the default simpset to achieve this?
In Isabelle2015, the simplifier knows a number of rules to eliminate existentially bound variables which are determined by equality. For your case, the relevant ones are simp_thms(36-40):
(∃x. ?P) ⟷ ?P
∃x. x = ?t
∃x. ?t = x
(∃x. x = ?t ∧ ?P x) ⟷ ?P ?t
(∃x. ?t = x ∧ ?P x) ⟷ ?P ?t
Additionally, ex_simps(1-2) push existentials into conjuncts if one side does not mention the bound variable:
(∃x. ?P x ∧ ?Q) ⟷ (∃x. ?P x) ∧ ?Q
(∃x. ?P ∧ ?Q x) ⟷ ?P ∧ (∃x. ?Q x)
In many cases, these rules suffice to eliminate the existential quantifier. In your case, however, there are further existential quantifiers for xs and ys in between. In principle, the above rules and ex_comm, i.e., (∃x y. ?P x y) ⟷ (∃y x. ?P x y) (and associativity of op &, but that's a default simp rule anyway), suffice to prove your lemma by rewriting. However, one would have to pull the existentials out of the conjuncts and then permute the quantifiers such that x is bound innermost. None of these steps is desireable in the general case. Moreover,commutativity is subject to Isabelle's term order, so the simplifier might not even apply it in the indended way.
Thus, this problem cannot be solved in general by a finite set of rewrite rules, because there may be arbitrarily many nestings of quantifiers. It could, however, be solved by a simproc which triggers on existential quantifiers and searches the quantified predicate term for an equality of the bound variable. If the equality appears in a position such that the existential can be eliminated, then it has to produce the appropriate rewrite rule on the spot (conversions might be useful for that).
However, the simproc should make sure that it does not disturb the structure of the goal too much. Some of such disturbance can already be seen in your example. On the left hand side, the predicate Q is not in the scope of the inner quantifiers, but it is on the right-hand side.
This means that it is not clear that this transformation is desirable in all cases. For example, on the left-hand side, the classical reasoner used by auto, fastforce, etc. can go under one existential quantifier and then use classical reasoning to find an instantiation for x by analysing Q. This may lead to further simplifications of the equality x = f xs ys, which can lead to further instantiations. In contrast, on the right-hand side, the reasoner first has to introduce two schematic variables for existential quantifiers before it can even start to look at Q.
So in summary, I recommend that you analyse your setup to see why this form of quantifier nesting has occured at all in a goal state. Maybe you can adjust it such that everything works with the existing set of rules.

Resources