15-317 Constructive Logic
Recitation 5: Common Mistakes and Classical Computation
Today in recitation we went over selected solutions to problems from
Assignment 2. We highlighted some common mistakes and misconceptions
to watch out for:
Check the Homework 2
Solutions for details.
- Don't name two parameters the same: if a derivation uses two
rules that introduce a parameter, make sure they're different.
- Don't let parameters escape their scope: closed-scope elims
like OrE and ExistsE introduce hypotheses only in certain
premises, and they shouldn't leak into the conclusion. (Closed-scope
elims sort of turn your proof on its side: instead of deriving
downward, you gain a new assumption in a new line of reasoning.)
- Don't confuse terms and parameters. Metavariables like
t, s, and r represent general terms with
arbitrary structure, while metavariables like a, b,
and c represent parameters that can be substituted for.
(We sometimes also use x, y, and z to be
- Do make sure metavariables don't overlap. In particular,
when showing a local reduction, name all of the subderivations and
subterms differently, so as to ensure that the derivation you are
reducing is as general as possible.
We also talked intuitively about classical computation, going over the
multiplication early-exit example from class. Call/cc or
let/cc is a primitive that lets you capture the current
continuation, or "rest of the program", in such a way that it can be
restored later by throw'ing a value to it. That value replaces
the entire call/cc expression.