proposition: Lemma of_string_length str : length (of_string str) = List.length str.
proof: Proof. induction str as [|ch str IHstr]. { apply no_first_char_empty. rewrite get_of_string; reflexivity. } { simpl; rewrite <- IHstr; clear IHstr. assert (H : of_string str =s drop 1 (of_string (ch :: str))) by (rewrite drop_of_string; reflexivity). rewrite H, drop_length. destruct (length (of_string (ch::str))) eqn:H'. { apply has_first_char_nonempty in H'. rewrite get_of_string in H'; simpl in H'. inversion H'. } { omega. } } 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