proposition: Lemma INIT_spec offset ns s w : (offset, INIT offset) // (offset, Vector.append w (0 ## 0 ## 0 ## 0 ## enc_list ns ## enc_term s ## vec_nil)) ->> (INIT_len+offset, Vector.append w (0 ## 0 ## 0 ## 0 ## 0 ## enc_closure (closure [] (fold_left (fun s n => app s (L.nat_enc n)) ns s)) ## vec_nil)).
proof: Proof. elim: ns s => [s|n ns IH s]. { rewrite ?vec_simpl. apply: (compose_sss_compute_trans 0). { by apply: JZ_spec. } rewrite ?vec_simpl. apply: (compose_sss_compute_trans 10). { by apply: PACK_spec. } rewrite ?vec_simpl. by apply: sss_compute_refl. } rewrite ?vec_simpl. apply: (compose_sss_compute_trans 0). { by apply: JZ_spec. } rewrite ?vec_simpl enc_pair_match. apply: (compose_sss_compute_trans 1). { by apply: UNPACK_spec. } rewrite ?vec_simpl. apply: (compose_sss_compute_trans 2). { by apply: PACK_spec. } rewrite ?vec_simpl. apply: (compose_sss_compute_trans 3). { by apply: NAT_ENC_spec. } rewrite ?vec_simpl. apply: (compose_sss_compute_trans 4). { by apply: INC_spec. } rewrite ?vec_simpl. apply: (compose_sss_compute_trans 5). { by apply: INC_spec. } rewrite ?vec_simpl. apply: (compose_sss_compute_trans 6). { by apply: UNPACK_spec. } rewrite ?vec_simpl. apply: (compose_sss_compute_trans 7). { by apply: PACK_spec. } rewrite ?vec_simpl. apply: (compose_sss_compute_trans 8). { by apply: MOVE_spec. } rewrite ?vec_simpl. apply: (compose_sss_compute_trans 9). { by apply: JMP_spec. } rewrite ?vec_simpl. by apply: (IH (app s (L.nat_enc n))). Qed.
imports: Undecidability(MinskyMachines.MM MinskyMachines.MMA L.L) Undecidability.Shared.Libs.DLW(Vec.pos Vec.vec Code.sss Code.subcode) Undecidability(MinskyMachines.Util.MMA_pairing L.AbstractMachines.wCBV) PeanoNat List Lia Wf_nat ssreflect ssrbool ssrfun