proposition: Lemma Return_EncodeMEquivAlignedEncodeM : EncodeMEquivAlignedEncodeM (fun (s : S) (env : CacheFormat) => Some (mempty, env)) AlignedEncode_Nil.
proof: Proof. unfold EncodeMEquivAlignedEncodeM, AlignedEncode_Nil, ReturnAlignedEncodeM; intros; injections; simpl in *; intuition. - injections; simpl. assert (idx < Datatypes.S (idx + m))%nat as H' by omega; rewrite <- ltb_lt in H'; rewrite H'. revert v. eapply Vector.case0; simpl. rewrite (plus_comm idx 0); simpl; eexists _; intuition. pose proof (mempty_left (build_aligned_ByteString v2)) as H''; simpl in H''; rewrite H'', <- build_aligned_ByteString_append; reflexivity. - injections; simpl in *. destruct (idx <? (Datatypes.S numBytes')) eqn: ?; auto. rewrite ltb_lt in Heqb. omega. - injections; simpl in *; omega. - discriminate. Qed.
imports: Fiat.Common.Coq__8_4__8_5__Compat Bedrock.Word Coq.ZArith.ZArith Coq.NArith.NArith Coq.Arith.Arith Coq.Numbers.Natural.Peano.NPeano Coq.Logic.Eqdep_dec Fiat.Common.BoundedLookup Fiat.Narcissus.Common.Specs Fiat.Narcissus.Common.ComposeOpt Fiat.Narcissus.Common.ComposeIf Fiat.Narcissus.BaseFormats Fiat.Narcissus.BinLib.Core Fiat.Narcissus.BinLib.AlignedByteString