Section MMA2_to_MM2.
Notation "i '/A/' r '⇢' s" := (@mma_sss 2 i r s) (at level 70, no associativity).
Notation "P '/A/' r '→' s" := (sss_step (@mma_sss 2) P r s) (at level 70, no associativity).
Notation "P '/A/' r '↠' s" := (sss_compute (@mma_sss 2) P r s) (at level 70, no associativity).
Notation "P '/A/' r '~~>' s" := (sss_output (@mma_sss 2) P r s) (at level 70, no associativity).
Notation "P '/A/' s ↓" := (sss_terminates (@mma_sss 2) P s) (at level 70, no associativity).
Notation "i '/2/' r '⇢' s" := (mm2_atom i r s) (at level 70, no associativity).
Notation "P '/2/' r '→' s" := (mm2_step P r s) (at level 70, no associativity).
Notation "P '/2/' x ↠ y" := (clos_refl_trans _ (mm2_step P) x y) (at level 70, no associativity).
Notation "P '/2/' s ↓" := (mm2_terminates P s) (at level 70, no associativity).
Definition mma_mm2_instr : mm_instr (pos 2) -> mm2_instr.
Let mma_mm2_mma_state s : mma_mm2_state (mm2_mma_state s) = s.
Local Fact mm2_mma_atom ρ s1 s2 : ρ /2/ s1 ⇢ s2 -> mm2_mma_instr ρ /A/ mm2_mma_state s1 ⇢ mm2_mma_state s2.
Fact mma_mm2_atom_equiv ρ s1 s2 : ρ /A/ s1 ⇢ s2 <-> mma_mm2_instr ρ /2/ mma_mm2_state s1 ⇢ mma_mm2_state s2.
Local Fact mma_mm2_step P s1 s2 : (1,P) /A/ s1 → s2 -> map mma_mm2_instr P /2/ mma_mm2_state s1 → mma_mm2_state s2.
Local Fact mm2_mma_step P s1 s2 : P /2/ s1 → s2 -> (1, map mm2_mma_instr P) /A/ mm2_mma_state s1 → mm2_mma_state s2.
Fact mma_mm2_step_equiv P s1 s2 : (1,P) /A/ s1 → s2 <-> map mma_mm2_instr P /2/ mma_mm2_state s1 → mma_mm2_state s2.
Local Fact mma_mm2_compute P s1 s2 : (1,P) /A/ s1 ↠ s2 -> map mma_mm2_instr P /2/ mma_mm2_state s1 ↠ mma_mm2_state s2.
Local Fact mm2_mma_compute P s1 s2 : P /2/ s1 ↠ s2 -> (1, map mm2_mma_instr P) /A/ mm2_mma_state s1 ↠ mm2_mma_state s2.
Local Fact mma_mm2_compute_equiv P s1 s2 : (1,P) /A/ s1 ↠ s2
<-> map mma_mm2_instr P /2/ mma_mm2_state s1 ↠ mma_mm2_state s2.
Local Fact mma_mm2_terminates_zero_equiv P s : (1,P) /A/ s ↠ (0,vec_zero)
<-> map mma_mm2_instr P /2/ mma_mm2_state s ↠ (0,(0,0)).
Fact mm2_mma_terminates P s : P /2/ s ↓ -> (1,map mm2_mma_instr P) /A/ mm2_mma_state s ↓.

Theorem mma_mma2_reduction P s : (1,P) /A/ s ↓ <-> map mma_mm2_instr P /2/ mma_mm2_state s ↓.