Soundness of extraction with erased matches for open programs

Prove soundness of the extraction function for open programs when erased matches for weak Σ-types are allowed, by showing that for any well-typed term of type N whose free variables are all erasable in a consistent context, evaluation produces the same natural-number result before and after extraction even though erased matches are permitted.

Background

The paper proves soundness of the erasure-based extraction for programs of natural-number type, including certain open programs, but only under the restriction that erased matches on weak Σ-types are disallowed. Allowing erased matches complicates the simulation argument for open terms, because matching on a neutral erased pair can get stuck in the source while the extracted target term may continue to evaluate.

The authors’ current proof does not cover this case; nevertheless they indicate that the result should still hold, and they point to further discussion in the subsection on erased matches. Establishing this result would remove a key limitation of their current soundness theorem.

References

Our proof of soundness of extraction does not work for open programs if erased matches are allowed, but we suspect that soundness could be proved also in this case (see \cref{sec:erasedMatching}).

A Graded Modal Dependent Type Theory with Erasure, Formalized  (2603.29716 - Abel et al., 31 Mar 2026) in Introduction (Section 1)