proposition: Theorem substring_correct1 : forall (s : string) (n m p : nat), p < m -> get p (substring n m s) = get (p + n) s.
proof: Proof. intros s; elim s; simpl; auto. - intros n; case n; simpl; auto. intros m; case m; simpl; auto. - intros a s' Rec; intros n; case n; simpl; auto. + intros m; case m; simpl; auto. * intros p H; inversion H. * intros m' p; case p; simpl; auto. intros n0 H; apply Rec; simpl; auto. apply <- Nat.succ_lt_mono; auto. + intros n' m p H; rewrite Nat.add_succ_r; auto. Qed.
imports: Arith Ascii Bool Coq.Strings.Byte