meeting -*- Outline -*- * definitions (4.3) Q: Why are we worried about consistency when extending a theory? Q: What's a conservative extension? ** constant definition ------------------------------------------ CONSTANT DEFINITION Format: ^ c = t (name) where t is a closed term Effect: - adds new constant c to SG - adds new axiom |- c = t to rules Example: ^ (backward o = (\ f g x . f.(g.x)) function composition) Shorthand for functions: ^ id.x = x (identity) ^ (f * g).x = g.(f.x) (forward composition) ^ (f o g).x = f.(g.x) (backward composition) ------------------------------------------ Q: how is this like Haskell? Q: how are the types of constant definitions figured out? ** abbreviations (syntactic sugars) *** local definitions ------------------------------------------ LET ^ (let v = t' in t) = (\ v . t).t' Derived inference rules: ________________________ (vacuous let) |- (let v = t' in t) = t * if v is not free in t ___________________________ (let over \) |- (let v = t' in (\ y . t)) = (\ y . let v = t' in t) * if y is not free in t' ------------------------------------------ Q: Can you simplify let x = 3 in x + x ?