(** Numbers up to @n@ **)
Require Coq.Lists.List.
Set Implicit Arguments.
Set Strict Implicit.
Set Asymmetric Patterns.
(** `fin n` corresponds to "naturals less than `n`", ** i.e. a finite set of size n **)
Inductive fin : nat -> Type :=
| F0 : forall {n}, fin (S n)
| FS : forall {n}, fin n -> fin (S n).
Fixpoint fin_all (n : nat) : list (fin n) :=
match n as n return list (fin n) with
| 0 => nil
| S n => @F0 n :: List.map (@FS _) (fin_all n)
end%list.

Theorem fin_all_In : forall {n} (f : fin n),
List.In f (fin_all n).