程序代写代做代考 Haskell 11/9/2020

11/9/2020
Grok | COMP30026 Practice Exam
Queson 1 Part A (4 marks)
Recall that says that
Consider the following two formulas, and :
Using only proposional variables, the connecve new proposional formula, , such that
, but , and , but .
Instrucons
Queson 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 definion 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)”usingtheparsefuncon.
(Note that parse expects its string argument to have parentheses surrounding each
non-trivial sub-expression.)
Of course, in this queson, you will only use a restricted set of the Exp constructors.
 Visualisaon
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(:ψ