Soundness of the TM → Grammar Construction #
This file proves that the grammar tmToGrammar constructed from a TM0 machine is
sound: it only generates words on which the TM halts.
Proof strategy for is_TM #
The is_TM definition fixes the input embedding into the tape alphabet:
input symbols are written as some (Sum.inl t), while the recognizer may use
additional work symbols from an existential finite alphabet Γ.
To reduce to the existing tmToGrammar construction (which works with
Option Δ for any Δ), we:
- Apply
tmToGrammar (T ⊕ Γ) Λ Mto get a grammar over all tape symbols. - Apply
pullbackGrammarto convert from grammar overT ⊕ Γto grammar overTvia the fixedSum.inlinclusion. - Use
pullbackGrammar_languageandtmToGrammar_correctto establish the language correspondence.
Every TM-recognizable language over a finite alphabet is generated by an unrestricted grammar.