(** 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_case : forall n (f : fin (S n)),
f = F0 \/ exists f', f = FS f'.