Section equality_elimination.
Variables (A: Type)
(a b : A)
(p : a = b)
(Q : A -> Type).
Check (fun H : Q a =>
match p in (eq _  y) return Q y with
refl_equal => H
end).
End equality_elimination.

Lemma Rw :  forall x y: nat, y = y * x -> y * x * x = y.