proposition: Theorem fmap_reifier_default X n (P : nat -> X -> Prop) : inhabited X -> (forall x, x < n -> ex (P x)) -> exists f, forall x, x < n -> P x (f x).
proof: Proof. Proof with try lia. intros [ u ]. revert P; induction n as [ | n IHn ]; intros P HP. + exists (fun _ => u); intros... + destruct (IHn (fun i => P (S i))) as (f & Hf). { intros; apply HP... } destruct (HP 0) as (x & Hx)... exists (fun i => match i with 0 => x | S i => f i end). intros [|] ?; auto; apply Hf... Qed.
imports: Arith Lia