proposition: Lemma substring1_get {n str} : substring n 1 str = option_rect (fun _ => String.string) (fun a => String.String a ""%string) ""%string (get n str).
proof: Proof. revert n; induction str; intro n. { destruct n; reflexivity. } { destruct n; simpl. { destruct str; reflexivity. } { rewrite <- IHstr; reflexivity. } } Qed.
imports: Fiat.Common.Coq__8_4__8_5__Compat Coq.ZArith.ZArith Coq.Arith.PeanoNat Coq.Strings.Ascii Coq.Strings.String Fiat.Common.List.Operations Fiat.Common.StringOperations