(* given n <= m, returns the list [n-1,...,0] with proofs of < m *)
    Program Fixpoint enum_from n m (pr : le n m) : list (ordinal m) :=
      match n with
        O => nil
      | S n => (@Ordinal m n ltac:(rewrite <-Heq_n in *; apply (introT leP pr)))
                :: @enum_from n m ltac:(rewrite <-Heq_n in *; apply Le.le_Sn_le, pr)
      end.Definition enum n := Coq.Lists.List.rev (@enum_from n n (Le.le_refl n)).Fixpoint countdown (n: nat) := match n with O => nil | S n' => n' :: countdown n' end.

Lemma countdown_rev_iota: forall n, countdown n = List.rev (iota 0 n).