Parsing a sentence using logical operators (Logical expressions)

44 Views Asked by At

Parse the logical structure

"If everyone passes the quiz, Mr. Johnson will play his guitar."

-Use q as a constant to represent the quiz

-Use g as a constant to represent Mr. Johnson's guitar

-Use u as constant to represent Mr. Johnson

-Use $P(w, x)$ as the two-place predicate "w passes x"

-Use $Q(y, z)$ as the two-place predicate "y will play z"

Not sure if I am parsing this correctly This what I have so far, but I feel that I am doing it wrong.

$\forall w(P(w,q))\rightarrow Q(u,g)$

1

There are 1 best solutions below

1
On

I don't know how to start this. I understand how logical operators work but don't know how I would parse the sentence into a logical expression.

Start by replacing the constants and predicates for words. PS: I also suggest use $v$ for "his guitar".

Next, apply the universal quantifier and express "If ... , (then) ..." as a logical connective.


(edit)

Not sure if I am parsing this correctly. This what I have so far, but I feel that I am doing it wrong.

$\forall w~(P(w,q))~\to~ Q(u,g)$

That is correct.