Canonicity with erased matches in the target language

Prove canonicity for natural numbers in the untyped lambda-calculus target language produced by extraction even when erased matches for weak Σ-types are permitted; specifically, show that every extracted closed term corresponding to a well-typed source term of type N reduces to a numeral despite the presence of erased matches.

Background

Allowing erased matches for weak Σ-types breaks the fundamental lemma used in the paper’s erasure logical relation, which is why the main soundness theorem excludes such matches for open terms. Nevertheless, the authors expect that the extracted target programs still satisfy canonicity for natural numbers in this setting.

Formally establishing canonicity for the target language in the presence of erased matches would strengthen the guarantees of the extraction and clarify the limits of the logical-relations approach when erased pattern matches are available.

References

Although the fundamental lemma does not hold, we conjecture that canonicity for natural numbers does hold for the target language even in the presence of erased matches.

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