Together, the progress and preservation theorems imply the
standard type safety property: a well-typed term will not become
stuck. Formally, if ` e : , then, for some ` and H, we have
;; e ![ ] `; H. In particular, evaluation of e will never dereference a
freed memory location. This completes the proof of memory safety.
This is only half of the correctness of the garbage collector; we have
not yet shown that collection is meaning-preserving, i.e. that the
behavior of a garbage-collected program is identical to an execution
without collection. This property is straightforward to prove using
the same flattening machinery that was introduced in the previous
section. The proof simply requires extending the definitions and
proofs related to flattening to account for garbage collection. We