proposition: Lemma is_char_parts str ch : (is_true (is_char str ch)) <-> (length str = 1 /\ get 0 str = Some ch).
proof: Proof. destruct (is_char str ch) eqn:H; (split; intro H'; try solve [ inversion H' | reflexivity ]). { split. { apply length_singleton in H; assumption. } { apply get_0, add_take_1_singleton, H. } } { apply not_is_char_options in H; tauto. } 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