(* equal_upto m f g means f 0 = g 0, ... f (m-1) = g (m-1) *)
Local Notation equal_upto := (fun m (f g : nat -> nat) => forall n, n < m -> f n = g n).
(** Given a predicate P over nat * (nat -> nat), which is supposed to be finitary  1/ for any x, P x only takes the first p values of its argument into acounts 2/ P x is satisfiable for any value of x lower than n  then there is a bound m such that for any x, there is always a solution f to P x f which is uniformly bounded by m  *)

Theorem fmmap_bound p n (P : nat -> (nat -> nat) -> Prop) :
(forall x f g, equal_upto p f g -> P x f -> P x g)
-> (forall x, x < n -> exists f, P x f)
-> exists m, forall x, x < n -> exists f, (forall i, i < p -> f i < m) /\ P x f.