proposition: Lemma ByteString_enqueue_ByteStringToBoundedByteString_eq : forall (b : bool) (b' : Core.ByteString), ByteString_enqueue b (ByteStringToBoundedByteString b') = ByteStringToBoundedByteString (Core.ByteString_enqueue b b').
proof: Proof. destruct b'; simpl. unfold Core.ByteString_enqueue; simpl. match goal with |- context [match ?z with _ => _ end] => destruct z; simpl end. - unfold ByteStringToBoundedByteString; simpl. unfold ByteString_enqueue; simpl. match goal with |- context [match ?z with _ => _ end] => destruct z; try omega end. eapply byteString_f_equal; simpl. + instantiate (1 := eq_refl _); reflexivity. + unfold ByteString_enqueue_full_word; simpl. instantiate (1 := app_length _ _ ); simpl. subst; clear. unfold eq_rec_r, eq_rec; simpl. replace e0 with (eq_refl 7); simpl. generalize (app_length byteString0 [WS b front0]). induction byteString0; simpl; intros. * replace e with (eq_refl 1); auto. eapply UIP_dec; eauto with arith. * injection e; intros. autounfold with ByteBuffer in *. simpl. rewrite (IHbyteString0 H); clear. erewrite eq_rect_Vector_cons. reflexivity. * eapply UIP_dec; eauto with arith. - unfold ByteStringToBoundedByteString; simpl. unfold ByteString_enqueue; simpl. match goal with |- context [match ?z with _ => _ end] => destruct z; try omega end. eapply byteString_f_equal; simpl. + instantiate (1 := eq_refl); reflexivity. + instantiate (1 := eq_refl); reflexivity. 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.Narcissus.Common.Specs Fiat.Narcissus.BinLib.Core Fiat.Narcissus.Formats.ByteBuffer