Definition singles (y z x : nat) := if Dec (x = y) then z else x.
Notation "x :-> y" := (singles x y) (at level 20).
Definition ren_ctx {b : logic} f := map (ren f).
Definition fun_comp {X Y Z} (f : Y -> Z) (g : X -> Y) x := f (g x).
Notation "f ∘ g" := (fun_comp f g) (at level 20).
Arguments fun_comp : simpl nomatch.
(**  Renamings and identity *)

Lemma ren_ctx_id {b : logic} A :
ren_ctx (fun x => x) A = A.