proposition: Lemma CorrectAlignedEncoder_morphism {S : Type} {cache : Cache} : forall format format' (encode encode': forall sz : nat, AlignedEncodeM sz), (EquivFormat format' format) -> (forall sz v idx w c, encode' sz v idx w c = encode sz v idx w c) -> CorrectAlignedEncoder (S := S) format encode -> CorrectAlignedEncoder (S := S) format' encode'.
proof: Proof. unfold CorrectAlignedEncoder; intros. destruct X as [? [? ?] ]; eexists; intuition eauto. eapply H1 in H2; rewrite <- H2; eapply H. eapply H1 in H2; eauto. eapply H; eauto. eauto using EncodeMEquivAlignedEncodeM_morphism. 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