(* inversion de rt_cumul *)

  Inductive cumul_hn_inv : env -> term -> term -> Prop :=
    | cuhi_srt :
        forall (e : env) (s s' : sort),
        rt_univ s s' -> cumul_hn_inv e (Srt s) (Srt s')
    | cuhi_ref : forall (e : env) (n : nat), cumul_hn_inv e (Ref n) (Ref n)
    | cuhi_abs :
        forall (e : env) (A A' M M' : term),
        conv hdr e A A' ->
        conv hdr (Ax A' :: e) M M' -> cumul_hn_inv e (Abs A M) (Abs A' M')
    | cuhi_app :
        forall (e : env) (u u' v v' : term),
        conv hdr e u u' ->
        conv hdr e v v' -> cumul_hn_inv e (App u v) (App u' v')
    | cuhi_prod :
        forall (e : env) (A A' B B' : term),
        rt_cumul e A' A ->
        rt_cumul (Ax A' :: e) B B' -> cumul_hn_inv e (Prod A B) (Prod A' B').(* inversion de rt_cumul *)

  Inductive cumul_hn_inv : env -> term -> term -> Prop :=
    | cuhi_srt :
        forall (e : env) (s s' : sort),
        rt_univ s s' -> cumul_hn_inv e (Srt s) (Srt s')
    | cuhi_ref : forall (e : env) (n : nat), cumul_hn_inv e (Ref n) (Ref n)
    | cuhi_abs :
        forall (e : env) (A A' M M' : term),
        conv hdr e A A' ->
        conv hdr (Ax A' :: e) M M' -> cumul_hn_inv e (Abs A M) (Abs A' M')
    | cuhi_app :
        forall (e : env) (u u' v v' : term),
        conv hdr e u u' ->
        conv hdr e v v' -> cumul_hn_inv e (App u v) (App u' v')
    | cuhi_prod :
        forall (e : env) (A A' B B' : term),
        rt_cumul e A' A ->
        rt_cumul (Ax A' :: e) B B' -> cumul_hn_inv e (Prod A B) (Prod A' B').(* inversion de rt_cumul *)

  Inductive cumul_hn_inv : env -> term -> term -> Prop :=
    | cuhi_srt :
        forall (e : env) (s s' : sort),
        rt_univ s s' -> cumul_hn_inv e (Srt s) (Srt s')
    | cuhi_ref : forall (e : env) (n : nat), cumul_hn_inv e (Ref n) (Ref n)
    | cuhi_abs :
        forall (e : env) (A A' M M' : term),
        conv hdr e A A' ->
        conv hdr (Ax A' :: e) M M' -> cumul_hn_inv e (Abs A M) (Abs A' M')
    | cuhi_app :
        forall (e : env) (u u' v v' : term),
        conv hdr e u u' ->
        conv hdr e v v' -> cumul_hn_inv e (App u v) (App u' v')
    | cuhi_prod :
        forall (e : env) (A A' B B' : term),
        rt_cumul e A' A ->
        rt_cumul (Ax A' :: e) B B' -> cumul_hn_inv e (Prod A B) (Prod A' B').(* inversion de rt_cumul *)

  Inductive cumul_hn_inv : env -> term -> term -> Prop :=
    | cuhi_srt :
        forall (e : env) (s s' : sort),
        rt_univ s s' -> cumul_hn_inv e (Srt s) (Srt s')
    | cuhi_ref : forall (e : env) (n : nat), cumul_hn_inv e (Ref n) (Ref n)
    | cuhi_abs :
        forall (e : env) (A A' M M' : term),
        conv hdr e A A' ->
        conv hdr (Ax A' :: e) M M' -> cumul_hn_inv e (Abs A M) (Abs A' M')
    | cuhi_app :
        forall (e : env) (u u' v v' : term),
        conv hdr e u u' ->
        conv hdr e v v' -> cumul_hn_inv e (App u v) (App u' v')
    | cuhi_prod :
        forall (e : env) (A A' B B' : term),
        rt_cumul e A' A ->
        rt_cumul (Ax A' :: e) B B' -> cumul_hn_inv e (Prod A B) (Prod A' B').(* inversion de rt_cumul *)

  Inductive cumul_hn_inv : env -> term -> term -> Prop :=
    | cuhi_srt :
        forall (e : env) (s s' : sort),
        rt_univ s s' -> cumul_hn_inv e (Srt s) (Srt s')
    | cuhi_ref : forall (e : env) (n : nat), cumul_hn_inv e (Ref n) (Ref n)
    | cuhi_abs :
        forall (e : env) (A A' M M' : term),
        conv hdr e A A' ->
        conv hdr (Ax A' :: e) M M' -> cumul_hn_inv e (Abs A M) (Abs A' M')
    | cuhi_app :
        forall (e : env) (u u' v v' : term),
        conv hdr e u u' ->
        conv hdr e v v' -> cumul_hn_inv e (App u v) (App u' v')
    | cuhi_prod :
        forall (e : env) (A A' B B' : term),
        rt_cumul e A' A ->
        rt_cumul (Ax A' :: e) B B' -> cumul_hn_inv e (Prod A B) (Prod A' B').(* inversion de rt_cumul *)

  Inductive cumul_hn_inv : env -> term -> term -> Prop :=
    | cuhi_srt :
        forall (e : env) (s s' : sort),
        rt_univ s s' -> cumul_hn_inv e (Srt s) (Srt s')
    | cuhi_ref : forall (e : env) (n : nat), cumul_hn_inv e (Ref n) (Ref n)
    | cuhi_abs :
        forall (e : env) (A A' M M' : term),
        conv hdr e A A' ->
        conv hdr (Ax A' :: e) M M' -> cumul_hn_inv e (Abs A M) (Abs A' M')
    | cuhi_app :
        forall (e : env) (u u' v v' : term),
        conv hdr e u u' ->
        conv hdr e v v' -> cumul_hn_inv e (App u v) (App u' v')
    | cuhi_prod :
        forall (e : env) (A A' B B' : term),
        rt_cumul e A' A ->
        rt_cumul (Ax A' :: e) B B' -> cumul_hn_inv e (Prod A B) (Prod A' B').

Lemma equiv_inv_cumul_hn : forall (e : env) (x y : term), rt_cumul e x y -> forall x' y' : term, red hdr e x x' -> head_normal hdr e x' -> red hdr e y y' -> head_normal hdr e y' -> cumul_hn_inv e x' y'.