proposition: Lemma fin_choice {n} {B : fin n → Type} (P : ∀ i, B i → Prop) : (∀ i, ∃ y, P i y) → ∃ f, ∀ i, P i (f i).
proof: Proof. induction n as [|n IH]; intros Hex. { exists (fin_0_inv _); intros i; inv_fin i. } destruct (IH _ _ (λ i, Hex (FS i))) as [f Hf], (Hex 0%fin) as [y Hy]. exists (fin_S_inv _ y f); intros i; by inv_fin i. Qed.
imports: stdpp(options)