Module UnscopedNotations.
Notation "f >> g" := (funcomp g f) (*fun x => g (f x)*) (at level 50).
Notation "s .: sigma" := (scons s sigma) (at level 70).
End UnscopedNotations.
Definition fext_eq {X Y} (f g : X -> Y) := (forall x, f x = g x).
(* Notation "f === g :> X" := (@fext_eq _ X f g) (at level 100). *)
Local Notation "f === g" := (fext_eq f g) (at level 80).
Definition shift  := S.
(* Definition scons {X: Type} (x : X) (xi : nat -> X) := fun n => match n with |0 => x |S n => xi n end. *)
Definition var_zero := 0.
(* Definition funcomp {X Y Z} (g : Y -> Z) (f : X -> Y)  := fun x => g (f x). *)
Local Arguments funcomp {X Y Z}.
Instance funcomp_Proper {X Y Z} :
Proper (fext_eq ==> fext_eq ==> fext_eq) (@funcomp X Y Z).
Definition up_ren (xi : nat -> nat) :=
0 .: (xi >> S).
Definition ap {X Y} (f : X -> Y) {x y : X} (p : x = y) : f x = f y :=
match p with eq_refl => eq_refl end.
Definition apc {X Y} {f g : X -> Y} {x y : X} (p : f = g) (q : x = y) : f x = g y :=
match q with eq_refl => match p with eq_refl => eq_refl end end.
Definition id {X} (x: X) := x.

Lemma scons_eta {T} (f : nat -> T) :
f var_zero .: shift >> f === f.