Not official documentation. This is an unofficial explainer of John N. Shutt's vau calculus. It is not written, reviewed or endorsed by John N. Shutt, Dale Schumacher, Mitchell Wand, or any author of the cited sources. An AI model (Claude) drafted the text and the Lean, and no person has reviewed them. The text may contain errors; the Lean statements are the ground truth for what is proved, and the cited sources are the ground truth for the theory. The Lean covers the pure vau-x calculus (no delta-rules) and a model of vau-e (environments, $vau, derived $lambda) with this project's additions (encapsulation types, an actor model). It does not formalize Shutt's general framework; confluence is proved directly for these concrete rules only.Licence of this repository: MIT License. Cited works keep their own copyright; only short, attributed phrases are quoted.
Vau/Contextual.lean65 lines · 4 declarations on the siteview on GitHub ↗
import Vau.Confluence
/-!
# Contextual equivalence in vau-x is nontrivial
Wand (1998) showed that in a calculus with implicit evaluation and fully reflective fexprs,
contextual equivalence is trivial: it holds only between terms that are the same up to renaming
of bound variables. With de Bruijn indices, that means only between equal terms.
This file uses one simple notion of observation, chosen by this project (Shutt's general notion
is thesis Definition 13.90, for calculi with an operational semantics, which vau-x lacks):
* a context `c` **observes** a normal form `N` of a term `t` if `c[t] ->* N`, where `N` is a
normal form (a term with no step);
* `t1` and `t2` are **contextually equivalent** if, in every context, they reach the same normal
forms. In particular, `c[t1]` reaches some normal form iff `c[t2]` does.
This observes more than Shutt's Definition 13.90 in one way (any normal form, not only minimal
observables) and less in another (full reduction, not an evaluation order).
Contexts are the one-hole contexts `Ctx` of `Vau/Reduction.lean`. They may capture free
variables, and they are not required to be closed.
Results:
* `conv_ctxEquiv`: equal terms in the equational theory are contextually equivalent. The proof
uses confluence.
* `nontrivial`: `[eval 5]` and `5` are two different terms that are contextually equivalent,
and `5` and `6` are not contextually equivalent. So the relation is neither equality nor