Section NatSeq.
(** [seq] computes the sequence of [len] contiguous integers that starts at [start]. For instance, [seq 2 3] is [2::3::4::nil]. *)
Fixpoint seq (start len:nat) : list nat :=
match len with
| 0 => nil
| S len => start :: seq (S start) len
end.

Lemma seq_nth : forall len start n d,
n < len -> nth n (seq start len) d = start+n.