Lean4
/-- If `c` is a multiplicative congruence on `Mᵐᵒᵖ`, then `(a, b) ↦ c bᵒᵖ aᵒᵖ` is a multiplicative
congruence on `M`. -/
@[to_additive /-- If `c` is an additive congruence on `Mᵃᵒᵖ`, then `(a, b) ↦ c bᵒᵖ aᵒᵖ` is an
additive congruence on `M`. -/
]
def unop (c : Con Mᵐᵒᵖ) : Con M where
r a b := c (.op b) (.op a)
iseqv :=
{ refl := fun a ↦ c.refl (.op a)
symm := c.symm
trans := fun h1 h2 ↦ c.trans h2 h1 }
mul' h1 h2 := c.mul h2 h1