##### GENERAL #####
(rule $Unary ($PHRASE) (SimpleLexiconFn (type fb:type.any)))
(rule $Binary ($PHRASE) (SimpleLexiconFn (type (-> fb:type.any fb:type.any))))
(rule $Set ($Unary) (IdentityFn))
(rule $Set ($Unary $Set) (MergeFn and))
(rule $Set ($Binary $Set) (JoinFn forward betaReduce))
(rule $Set ($Set $Binary) (JoinFn backward betaReduce))
(rule $Set ($Set with $Set) (MergeFn and))
(rule $ROOT ($Set) (IdentityFn))
##### QUESTION 1 #####
(rule $Superlative ($PHRASE) (SimpleLexiconFn))
(rule $Superlative (with the $Superlative) (IdentityFn))
(rule $SuperlativeBinary ($Superlative $Binary) (JoinFn forward betaReduce))
(rule $Set ($Set $SuperlativeBinary) (JoinFn backward betaReduce))
##### QUESTION 2 #####
(rule $Top ($PHRASE) (SimpleLexiconFn))
(rule $Superlative ($Top $Unary) (JoinFn forward betaReduce))
(rule $SuperlativeUnary ($Superlative $Unary) (JoinFn forward betaReduce))
(rule $Set ($SuperlativeUnary by $Binary) (JoinFn forward betaReduce))
##### QUESTION 3 #####
### No new rules needed
###### QUESTION 4 #####
(rule $Set ($Binary have $Set) (JoinFn forward betaReduce))
###### QUESTION 5 #####
(rule $FunctionSet ($Unary) (JoinFn betaReduce forward (arg0 (lambda x (lambda f ((var f) (var x)))))))
(rule $Conj (and) (ConstantFn (lambda a (lambda b (lambda g (and ((var a) (var g)) ((var b) (var g))))))))
(rule $ConjRight ($Conj $FunctionSet) (JoinFn betaReduce forward))
(rule $FunctionSet ($FunctionSet $ConjRight) (JoinFn betaReduce backward))
(rule $Set ($Binary $FunctionSet) (JoinFn betaReduce backward))