Esempio n. 1
0
     ['implies', 'if-then', 'only if', 'is a sufficient condition for']),
    ('Biconditional', ['<->', u'\u2261'], 'INFIX OP',
     ['if and only if', 'iff', 'just if']),
    ('Necessitation', ['N:', u'\u25A1'], 'PREFIX OP',
     ['it is necessary that', 'it is necessarilly the case that']),
    ('Possibility', ['P:', u'\u25C7'], 'PREFIX OP',
     ['it is possible that', 'it is possibly the case that']),
    ('Entailment', ['|-', u'\u22A6'], 'ENTAILS', ['entails'])
]

GentzenLanguage = Language(GentzenLexicon, ['<->', u'\u2261'])

GentzenRules = [
    #           Name                            Abbreviation  Form (Sequent)
    #           ==============================  ============  =============================================
    ('Given', 'Given', GentzenLanguage.parseSeq('                       |-  P')
     ),
    ('Modus Ponens', 'MP',
     GentzenLanguage.parseSeq('P > Q, P               |-  Q')),
    ('Modus Tollens', 'MT',
     GentzenLanguage.parseSeq('P > Q, ~Q              |-  ~P')),
    ('Hypothetical Syllogism', 'HS',
     GentzenLanguage.parseSeq('P > Q, Q > R           |-  P > R')),
    ('Disjunctive Syllogism 1', 'DS1',
     GentzenLanguage.parseSeq('P v Q, ~P              |-  Q')),
    ('Disjunctive Syllogism 2', 'DS2',
     GentzenLanguage.parseSeq('P v Q, ~Q              |-  P')),
    ('Constructive Dilemma', 'CD',
     GentzenLanguage.parseSeq('P v Q, P > R, Q > S    |-  R v S, S v R')),
    ('Absorption', 'Abs',
     GentzenLanguage.parseSeq('P > Q                  |-  P > (P & Q)')),