(**************************************************************)
(*   Copyright Dominique Larchey-Wendling [*]                 *)
(*                                                            *)
(*                             [*] Affiliation LORIA -- CNRS  *)
(**************************************************************)
(*      This file is distributed under the terms of the       *)
(*         CeCILL v2 FREE SOFTWARE LICENSE AGREEMENT          *)
(**************************************************************)
(** ** Reification for bounded quantification *)
Set Implicit Arguments.
(** A nat indexed finite number of conjunctions *)
Definition fmap_reifier_t X (Q : nat -> X -> Prop) k :
(forall i, i < k -> sig (Q i))
-> { f : forall i, i < k -> X | forall i Hi, Q i (f i Hi) }.

Theorem fmap_reifer_bound n P :
(forall x, x < n -> ex (P x))
-> exists m f, forall x, x < n -> f x < m /\ P x (f x).