11/9/2020
Grok | COMP30026 Practice Exam
Ques on 1 Part A (4 marks)
Recall that says that
Consider the following two formulas, and :
Using only proposi onal variables, the connec ve new proposi onal formula, , such that
, but , and , but .
Instruc ons
Ques on 1 Part A (4 marks)
is a logical consequence of .
Theanswershouldbegivenasthevalueofvariableexp1A :: Exp. Format
The Haskell type Exp has data constructors FALSE, TRUE, VAR, NOT, AND, OR, XOR, BIIM, and IMPL. Its defini on is provided in the file Exp.hs, along with a simple parserparse :: String -> Exp.Thesetoolsarethesameasyouarefamiliarwith from worksheets and assignments.
For example, the formula can be expressed as: IMPL (IMPL (VAR ‘P’) (VAR ‘Q’)) (VAR ‘R’), or
parse “((P => Q) => R)”usingtheparsefunc on.
(Note that parse expects its string argument to have parentheses surrounding each
non-trivial sub-expression.)
Of course, in this ques on, you will only use a restricted set of the Exp constructors.
Visualisa on
https://groklearning.com/learn/unimelb-comp30026-2020-s2/prac-exam/1/ 1/1
, and possibly parentheses, give a
Cheng
⇒
R⇒)Q⇒ P(
ρψ φψψ⊨φ
φ
ρ ̸≡ φ ρ ⊨ φ φ ̸≡ ψ φ ⊨ ψ
)R⇒Q(⇒ P:ρ R⇒)Q⇒ P(:ψ