Proof of `For-transducers are closed under composition`
What this proof establishes
no assumptions
Assuming the claims on the left, the claim on the right holds — checked by the archive's pipeline. Proof code is not displayed here.
In the paper
- page 159 of the paper of lax-157538, Transducers
Description
Functions computed by for-transducers are closed under composition (Lemma D.1.4), .
Proof strategy
The source simulates the second program on the output of the first: each position variable of the second program ranging over the output is replaced by the tuple of loop variables of the first program at which that output letter is produced, and the tests on output positions become tests on these tuples, evaluated by re-running the first program (, , ). transports both hypotheses and the conclusion.
Attribution
Lemma D.1.4 of Transducers, Part D; formalised by Aristotle (Harmonic).