proposition: Corollary AlignedEncoder_inv2 {S} {cache : Cache} (enc' : EncodeM S ByteString) (enc : forall sz, AlignedEncodeM sz) (enc_OK : EncodeMEquivAlignedEncodeM enc' enc) (enc'_aligned : forall s ce t ce', enc' s ce = Some (t, ce') -> padding t = 0) n : forall (t : Vector.t Core.char n) n1 s ce v idx ce', enc _ t n1 s ce = Some (v, idx, ce') -> exists n2 n3 (t1 : Vector.t Core.char n1) (t23 : Vector.t Core.char (n2+n3)) v23 (pf : n1 + (n2+n3) = n), enc _ t23 0 s ce = Some (v23, n2, ce') /\ idx = n1 + n2 /\ t = eq_rect _ _ (t1 ++ t23) _ pf /\ v = eq_rect _ _ (t1 ++ v23) _ pf.
proof: Proof. intros. edestruct @AlignedEncoder_inv; eauto. destruct_conjs. repeat eexists; eauto. eauto using AlignedEncoder_extr. 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