proposition: Lemma get_take_lt (str : String) n m (Hle : n < m) : get n (take m str) = get n str.
proof: Proof. repeat match goal with | _ => progress simpl in * | _ => congruence | _ => omega | _ => progress rewrite ?drop_take | [ |- context[get ?n _] ] => not constr_eq n 0; rewrite !(get_drop (n := n)) | [ |- context[get 0 ?str] ] => destruct (get 0 str) eqn:? | [ H : get 0 _ = Some _ |- _ ] => apply get_0 in H | [ H : get 0 _ = None |- _ ] => apply no_first_char_empty in H | [ H : _ |- _ ] => progress rewrite ?take_take, ?take_length in H | [ H : is_true (take ?n _ ~= [ _ ]) |- _ ] => progress apply take_n_1_singleton in H | [ |- Some _ = Some _ ] => apply f_equal | _ => eapply singleton_unique; eassumption | [ H : length ?str = 0, H' : is_true (take _ ?str ~= [ _ ]) |- _ ] => apply length_singleton in H' | [ H : ?x = 0, H' : context[?x] |- _ ] => rewrite H in H' | [ H : context[min _ _] |- _ ] => revert H; apply Nat.min_case_strong; intros end. 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