+let rec tshift t = function
+ | ESort -> t
+ | EBind (e, a, b) -> tshift (TBind (a, b, t)) e
+ | EProj (e, a, d) -> tshift (TProj (a, d, t)) e
+
+let tshift c t = tshift t c
+
+let rec eshift f c = function
+ | ESort -> f c
+ | EBind (e, a, b) -> let f ee = f (EBind (ee, a, b)) in eshift f c e
+ | EProj (e, a, d) -> let f ee = f (EProj (ee, a, d)) in eshift f c e
+