19.4 The tactic itself

After having registered all the setoids and morphisms you need, you can use the tactic called Setoid_replace. The syntax is

Setoid_replace term1 with term2
The effect is similar to the one of Replace.

You also have a tactic called Setoid_rewrite which is the equivalent of Rewrite for setoids. The syntax is

Setoid_rewrite term

Variants:
  1. Setoid_rewrite -> term
  2. Setoid_rewrite <- term
The arrow tells the systems in which direction the rewriting has to be done. Moreover, you can use Rewrite for setoid rewriting. In that case the system will check if the term you give is an equality or a setoid equivalence and do the appropriate work.