Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
| Download
Logic of "all" + verbs + relative clauses, for a class at Indiana University
Project: moss notebooks
Views: 7213module ExampleRules where1import Data.List2import ARC/Syntax23import ARC/FrontEnd4import ARC/ExampleSentences56type RuleName = String7data Rule = Rule {rulename :: RuleName,8premises :: [Sent],9conclusion :: Sent}10deriving (Show, Eq)11type RuleList = [Rule]1213junk = Rule {rulename = "junk", premises = readSs ["all x x", "all y y"] , conclusion = readS "all x y"}1415anti = Rule {rulename = "anti", premises = readSs ["all x y"] , conclusion = readS "all non-y non-x"}16barbara = Rule {rulename = "barbara", premises = readSs ["all x y", "all y z"] , conclusion = readS "all x z"}17some1 = Rule {rulename = "some1", premises = readSs ["some x y"], conclusion = readS "some x x"}18some2 = Rule {rulename = "some2", premises = readSs ["some x y"], conclusion = readS "some y x"}19darii = Rule {rulename = "darii", premises = readSs ["all y z", "some x y"], conclusion = readS "some x z"}20zero = Rule {rulename = "zero", premises = readSs ["all x non-x"], conclusion =readS "all x y"}21one = Rule {rulename = "one", premises = readSs ["all non-x x"], conclusion =readS "all y x"}22axiom = Rule {rulename = "axiom", premises = [], conclusion =readS "all x x"}23exFalso = Rule {rulename = "X", premises = readSs ["some x y", "all x non-y"],24conclusion = Sent Contradiction (CNasTerm x) (CNasTerm y) }25sdagger = [anti,barbara,some1, some2, darii,zero,axiom,exFalso]2627antiARC = Rule {rulename = "anti", premises = [Sent All Ter1 Ter2], conclusion = (Sent All (TermMaker r (TermNP All Ter2)) (TermMaker r (TermNP All Ter1)))}28barbaraARC = Rule {rulename = "barbara", premises = [Sent All Ter1 Ter2, Sent All Ter2 Ter3], conclusion =(Sent All Ter1 Ter3)}29downARC = 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)))}30axiomARC = Rule {rulename = "axiomARC", premises = [], conclusion = (Sent All Ter1 Ter1)}313233