Skip to content

Commit

Permalink
chore: move Associates.quot_out earlier (#8484)
Browse files Browse the repository at this point in the history
And don't require commutativity while we're here.
  • Loading branch information
Ruben-VandeVelde committed Dec 4, 2023
1 parent b9a6d49 commit afa2032
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 5 additions & 0 deletions Mathlib/Algebra/Associated.lean
Expand Up @@ -779,6 +779,11 @@ theorem quot_mk_eq_mk [Monoid α] (a : α) : Quot.mk Setoid.r a = Associates.mk
rfl
#align associates.quot_mk_eq_mk Associates.quot_mk_eq_mk

@[simp]
theorem quot_out [Monoid α] (a : Associates α) : Associates.mk (Quot.out a) = a := by
rw [← quot_mk_eq_mk, Quot.out_eq]
#align associates.quot_out Associates.quot_outₓ

theorem forall_associated [Monoid α] {p : Associates α → Prop} :
(∀ a, p a) ↔ ∀ a, p (Associates.mk a) :=
Iff.intro (fun h _ => h _) fun h a => Quotient.inductionOn a h
Expand Down
4 changes: 0 additions & 4 deletions Mathlib/RingTheory/UniqueFactorizationDomain.lean
Expand Up @@ -1920,10 +1920,6 @@ section

open Associates UniqueFactorizationMonoid

theorem Associates.quot_out {α : Type*} [CommMonoid α] (a : Associates α) :
Associates.mk (Quot.out a) = a := by rw [← quot_mk_eq_mk, Quot.out_eq]
#align associates.quot_out Associates.quot_out

/-- `toGCDMonoid` constructs a GCD monoid out of a unique factorization domain. -/
noncomputable def UniqueFactorizationMonoid.toGCDMonoid (α : Type*) [CancelCommMonoidWithZero α]
[UniqueFactorizationMonoid α] [DecidableEq (Associates α)] [DecidableEq α] : GCDMonoid α where
Expand Down

0 comments on commit afa2032

Please sign in to comment.