Inference Rules and Axioms

An inference rule is a set of antecedents and a consequent. If the antecedents are true, the consequent follows. (If A and B then C)

ABC=Inference Rule

Logic Rules:

A⟹BAA=If A implies B and A then B

Notational conventions:

Rules

Values evaluate to themselves. (Note the underline)

eval (Num v) = v

v―⇓v=NumE

Subtraction in AE is subtraction in Haskell

Note

We add a second rule to make sure invalid cases evaluate as well.

eval (Sub (Num v1) (Num v2))

t1⇓v1t2⇓v2v1≥v2t1−―t2⇓v1−v2=SubE+t1⇓v1t2⇓v2v1<v2t1−―t2⇓0=SubEZero