Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

Logic of "all" + verbs + relative clauses, for a class at Indiana University

Views: 6871
1
module ExampleRules where
2
import Data.List
3
import ARC/Syntax2
4
import ARC/FrontEnd
5
import ARC/ExampleSentences
6
7
type RuleName = String
8
data Rule = Rule {rulename :: RuleName,
9
premises :: [Sent],
10
conclusion :: Sent}
11
deriving (Show, Eq)
12
type RuleList = [Rule]
13
14
junk = Rule {rulename = "junk", premises = readSs ["all x x", "all y y"] , conclusion = readS "all x y"}
15
16
anti = Rule {rulename = "anti", premises = readSs ["all x y"] , conclusion = readS "all non-y non-x"}
17
barbara = Rule {rulename = "barbara", premises = readSs ["all x y", "all y z"] , conclusion = readS "all x z"}
18
some1 = Rule {rulename = "some1", premises = readSs ["some x y"], conclusion = readS "some x x"}
19
some2 = Rule {rulename = "some2", premises = readSs ["some x y"], conclusion = readS "some y x"}
20
darii = Rule {rulename = "darii", premises = readSs ["all y z", "some x y"], conclusion = readS "some x z"}
21
zero = Rule {rulename = "zero", premises = readSs ["all x non-x"], conclusion =readS "all x y"}
22
one = Rule {rulename = "one", premises = readSs ["all non-x x"], conclusion =readS "all y x"}
23
axiom = Rule {rulename = "axiom", premises = [], conclusion =readS "all x x"}
24
exFalso = Rule {rulename = "X", premises = readSs ["some x y", "all x non-y"],
25
conclusion = Sent Contradiction (CNasTerm x) (CNasTerm y) }
26
sdagger = [anti,barbara,some1, some2, darii,zero,axiom,exFalso]
27
28
antiARC = Rule {rulename = "anti", premises = [Sent All Ter1 Ter2], conclusion = (Sent All (TermMaker r (TermNP All Ter2)) (TermMaker r (TermNP All Ter1)))}
29
barbaraARC = Rule {rulename = "barbara", premises = [Sent All Ter1 Ter2, Sent All Ter2 Ter3], conclusion =(Sent All Ter1 Ter3)}
30
downARC = Rule {rulename = "down", premises = [Sent All Ter1 Ter2, Sent All Ter3 (TermMaker r (TermNP All Ter2)) ], conclusion = (Sent All Ter3 (TermMaker r (TermNP All Ter1)))}
31
axiomARC = Rule {rulename = "axiomARC", premises = [], conclusion = (Sent All Ter1 Ter1)}
32
33