proposition: Lemma of_to_string str : of_string (to_string str) =s str.
proof: Proof. remember (length str) as n eqn:H. revert str H; induction n; intros. { unfold fold. apply bool_eq_empty; rewrite <- H, ?of_string_length; reflexivity. } { rewrite fold_recr. apply bool_eq_from_get. intros [|n']. { destruct (get 0 str) eqn:H'. { rewrite get_of_string; reflexivity. } { apply no_first_char_empty in H'; congruence. } } { rewrite !get_S. rewrite <- (IHn (drop 1 str)) by (rewrite drop_length; omega). rewrite drop_of_string. destruct (get 0 str) eqn:H'; simpl. { reflexivity. } { apply no_first_char_empty in H'; congruence. } } } Qed.
imports: Fiat.Common.Coq__8_4__8_5__Compat Coq.ZArith.ZArith Fiat.Common Fiat.Common.List.Operations Fiat.Common.List.ListFacts Fiat.Common.Le Fiat.Common.Tactics.SetoidSubst Fiat.Common.Tactics.IsClosed Fiat.Parsers.StringLike.Core Fiat.Common.UIP