p = there is an undeclared variable
q = there is a syntax error in the first five lines
r = there is a missing simicolon
s = there is a misspelled variable name
We can then translate the four given sentences as:
i. p "\\lor" q
ii. q →(r "\\lor" s)
iii. ~ r
iiii. ~ s
Now we will assume that the previous four premises are true and derive a conclusion using rules of inference.
Step (reason)
1. p "\\lor" q (premise)
2. q →(r "\\lor" s) (premise)
3. ~ r (premise)
4. ~ s (premise)
5. ~ r "\\land" ~ s (conjunction of (3) and (4))
6. ~ (r "\\lor" s) (De Morgan’s Law of (5))
7. ~ q (Modus tollens of (2) and (6))
8. p (elimination of (1) and (7)
We have derived in step (8) that p is true and thus there is an undeclared variable.
Answer: There is an undeclared variable.
Comments
Leave a comment