proposition: Lemma CorrectAlignedEncoderThenCAssoc {S : Type} {cache : Cache} (format_A format_B format_C : FormatM S ByteString) (encode : forall sz, AlignedEncodeM sz) : CorrectAlignedEncoder ((format_A ++ format_B) ++ format_C) encode -> CorrectAlignedEncoder (format_A ++ format_B ++ format_C) encode.
proof: Proof. intros; eapply refine_CorrectAlignedEncoder; eauto. unfold sequence_Format, compose; intros. unfold Bind2. split. - repeat setoid_rewrite Monad.refineEquiv_bind_bind. setoid_rewrite Monad.refineEquiv_bind_unit; simpl. f_equiv; intro. simpl; f_equiv; intro. simpl; f_equiv; intro. rewrite ByteString_enqueue_ByteString_assoc; reflexivity. - intros. intro; eapply (H v). computes_to_inv; repeat computes_to_econstructor; eauto. simpl; subst. rewrite <- ByteString_enqueue_ByteString_assoc; reflexivity. Defined.
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