3

Working through first order logic examples and want to make sure I am translating correctly before moving on to harder resolution of first order logic

Use the predicates HasBugs(x), Comments(x), HighQuality(x), QuickSolve(x), and BestPractice(x), where x is a programmer

My translations are:

#1

"All programmers who do not have bugs in their code and comment their code write high-quality code"

∀x(¬HasBugs(x) ∧ Comments(x) ⇒ HighQuality(x))

#2

"Programmers who use best coding practices comment their code"

∀x(BestPractice(x) ⇒ Comments(x))

#3

"Programmers who write high-quality code solve programming problems quickly."

∀x(HighQuality(x) ⇒ QuickSolve(x))

#4

"Amanda uses best coding practices and does not have bugs in her code."

BestPractice(Amanda) ∧ ¬HasBugs(Amanda)

#5

"Bill does not comment his code."

¬Comments(Bill)

Note: my main question is if I have to include a Programmer(x) predicate at all or if my use of Amanda is correct here? Or is this implied since x is a programmer?

RTT
  • 35

0 Answers0