proposition: Lemma refine_CorrectAlignedEncoder {S : Type} {cache : Cache} : forall format format' encode, (forall (s : S) (env : CacheFormat), refine (format s env) (format' s env) /\ ((forall v, ~ computes_to (format' s env) v) -> (forall v, ~ computes_to (format s env) v))) -> (CorrectAlignedEncoder format' encode) -> (CorrectAlignedEncoder format encode).
proof: Proof. unfold CorrectAlignedEncoder; intros. destruct X as [? [? ?] ]; eexists; intuition eauto. rewrite (proj1 (H _ _)); eauto. eapply H0; eauto. eapply H; eauto. intros. eapply H0 in H1; eauto. 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