This implements and partially verifies the paper

  Timothy G. Griffin, Logical Interpretations as Computational Simulations
  (Working Draft of Oct 23, 1991)

There are a couple of things which could be handled more elegantly with
the module system
 - we do not formally establish signatures defining minimal, intuitionistic,
   and classical logic.  Thus it must be checked by hand that the
   results of translation lie in the claimed fragments.
 - we do not make the translations independent of the choice of epsilon,
   but commit to epsilon = false in Section 3.
 - several convenient syntactical abbreviations, eg overbar-case, are not
   implemented, since the required local definition facility will only
   be available with the Elf module system.

Pending the implementation of the "totality checker", the theorems must be
considered only partially verified.  With the totality checker, we could
establish completely mechanically that the critical relations below are in
fact total in the appropriate argument, thus verifying the claimed theorems.
Currently, this is done by hand (not difficult).

The file transcript contains a transcript of Elf type-checking the signatures.
An example and the resulting substitution can be found at the end of the
load file.

Note that this does not (yet) treat the operational semantics of the languages
involved, only the type correctness of the interpretations.

Current Status:

Section 2.  The logics M, I, and C  (file: logics.elf)

  In absence of the module system, this is implemented as a flat signature in
the file logics.elf.  Since it is convenient to identify formulas and types,
we also identify terms and proofs.  This means that types are intrinisic to
the terms.  Fortunately, this does not intrude upon the syntax, as the formula
arguments to the inference rules are synthesized.

Section 3.1 Exception Returning Style, call-by-value  (file: xrs_cbv.elf)

  Translation functions are represented as judgments (relations).  We use A*
for the result of translating A by the function ()*, which is implemented by
the relation star : form -> form -> type.  Similarly, we use A- for "bar A",
implemented by overf : form -> form -> type.  We do not verify that this
translation is parametric in epsilon and dot : epsilon, but use the version
comitted to epsilon = bot.  Through the module system it would be easy to
express and check this modularity.

  The main judgment is
    over : tm A -> overf A A- -> tm A- -> type.
It implements the "bar" translation, with an additional argument of type
overf A A- (representing a proof that A translates to A-).  This is needed in
order to verify the correctness of the translation we must bridge the gap
between A and A-.  That is,
    over' : tm A -> tm A- -> type.
could also be written, and it might even be computationally adequate (i.e.,
translate terms of type A into terms of type A-), but we could not verify
its totality mechanically.

Section 3.2 XRS, call-by-name  (files: xrs_cbn.elf, xrs_cbv_2.elf)

  The file xrs_cbn.elf implements the call-by-name exception-returning
style simulation.  We use A+ and A_ in a manner similar to A* and A-
in the previous section.

  The type-checker (not me -fp) discovered a bug in the rule for projections.
I believe, that the correct rule should read
  \underline{\pi_i(M)} = \overline{case}(\underline{M}, \lambda m.\pi_i(m)),
that is, the call to inj_1 should be removed.

  The remark after Theorem 2 is implemented in the file xrs_cbv_2.elf.

Section 3.3 Friedman's translation --- not implemented

Section 4.1 CPS, call-by-value  (files: cps_cbv.elf and cps_cbv_o.elf).

The files a straightforward transcription of the translations and
the Theorems 4 (file: cps_cbv.elf) and 5 (file: cps_cbv_o.elf).  It would
be nice if, cps_cbv could simply be parameterized by O and a function F
bot -> o.  Theorem 4 could then be obtain by instantating obj O = bot
and obj F x = x.  Unfortunately, this will have to wait.

4.1.1. SML of NJ CPS & XRS --- not implemented

4.2. CPS Call-by-Name & Call-by-Value (Kolmogorov)
     (files: cps_cbn.elf, cps_cbv_2.elf)

Straightforward in the same spirit as other translations above.

4.3. Kuroda and Glivenco translations --- not implemented

4.4. Conservative Extension  (file: conserve.elf)

Interesting, but not difficult.  There is a small additional piece of code
which generates the (identical) *-translation of those formulas for which it
is idempotent.  This enables mechanical verification and could probably
be synthesized.

5. Simulation in the Implicational Fragment --- not implemented
