proposition: Lemma AlignedEncoder_none_inv {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) : forall s ce b ce' sz (t : Vector.t Core.char sz) n1, enc' s ce = Some (b, ce') -> enc _ t n1 s ce = None -> (sz < n1 + numBytes b)%nat.
proof: Proof. intros. destruct (Nat.le_decidable (1 + sz) (numBytes b + n1)). omega. assert (sz = n1 + (numBytes b + (sz - (n1+numBytes b)))) by omega. revert dependent t. rewrite H2. intros. destruct (Vector_append_destruct3 t) as [t1 [t2 [t3 ?]]]. subst. edestruct enc_OK as [? _]. edestruct H3; eauto. clear H3. destruct_conjs. rewrite H3 in H0. 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