Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Mathlib/Algebra/Group/Commute/Defs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ protected theorem symm_iff {a b : S} : Commute a b ↔ Commute b a :=
instance : @Std.Refl S Commute :=
⟨Commute.refl⟩

@[to_additive]
instance : @Std.Symm S Commute where
symm _ _ := .symm

-- This instance is useful for `Finset.noncommProd`
@[to_additive]
instance on_refl {f : G → S} : Std.Refl fun a b => Commute (f a) (f b) :=
Expand Down
3 changes: 3 additions & 0 deletions Mathlib/RingTheory/Coprime/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ theorem IsCoprime.symm (H : IsCoprime x y) : IsCoprime y x :=
theorem isCoprime_comm : IsCoprime x y ↔ IsCoprime y x :=
⟨IsCoprime.symm, IsCoprime.symm⟩

instance : @Std.Symm R IsCoprime where
symm _ _ := .symm

theorem isCoprime_self : IsCoprime x x ↔ IsUnit x :=
fun ⟨a, b, h⟩ => .of_mul_eq_one (a + b) <| by rwa [mul_comm, add_mul], fun h =>
let ⟨b, hb⟩ := isUnit_iff_exists_inv'.1 h
Expand Down
Loading