(* dfbfall f : where f[*,v] has one free variable 
      is equivalent to [n,v] => f[0,v] /\ f[1,v] /\ ... /\ f[n-1,v] 
      also with one free variable 

   Notice that the value of n is not available to f *) 

Definition dv_change (ν : nat -> nat) x n := match n with 0 => x | _ => ν n end.Definition dfbfall := proj1_sig dfbfall_full.Fact dfbfall_spec : forall ν, df_pred dfbfall ν <-> forall i, i < ν 0 -> df_pred f (dv_change ν i).Definition df_fall_lt := df_subst (fun n => match n with 0 => x | S n => de_var (S n) end) (dfbfall f).Fact df_fall_lt_spec ν : df_pred df_fall_lt ν <-> forall n, n < de_eval ν x -> df_pred f (dv_change ν n).Corollary dio_rel_fall_lt_0 (K : nat -> (nat -> nat) -> Prop) : 
            𝔻R (fun ν => K (ν 0) (fun n => ν (S n))) 
   -> 𝔻R (fun ν => forall x, x < ν 0 -> K x (fun n => ν (S n))).

(* Specifications: *)
Theorem dio_rel_fall_lt a (K : nat -> (nat -> nat) -> Prop) : 𝔻P a -> 𝔻R (fun ν => K (ν 0) (fun n => ν (S n))) -> 𝔻R (fun ν => forall x, x < a ν -> K x ν).
Theorem dio_rel_fall_lt_bound a (K : nat -> nat -> (nat -> nat) -> Prop) : 𝔻P a -> 𝔻R (fun ν => K (ν 0) (a (fun n => ν (S n))) (fun n => ν (S n))) -> 𝔻R (fun ν => forall x, x < a ν -> K x (a ν) ν).
Theorem dio_rel_fall_le a (K : nat -> (nat -> nat) -> Prop) : 𝔻P a -> 𝔻R (fun ν => K (ν 0) (fun n => ν (S n))) -> 𝔻R (fun ν => forall x, x <= a ν -> K x ν).