Skip to content

Commit

Permalink
Merge master into nightly-testing
Browse files Browse the repository at this point in the history
  • Loading branch information
leanprover-community-mathlib4-bot committed Jan 5, 2024
2 parents 14936aa + 26ccd1e commit 4f5f0e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 1 addition & 3 deletions Mathlib/Algebra/Associated.lean
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ Copyright (c) 2018 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl, Jens Wagemaker
-/
import Mathlib.Algebra.Divisibility.Basic
import Mathlib.Algebra.GroupPower.Lemmas
import Mathlib.Algebra.Parity

#align_import algebra.associated from "leanprover-community/mathlib"@"2f3994e1b117b1e1da49bcfb67334f33460c3ce4"
Expand Down Expand Up @@ -306,7 +304,7 @@ variable [CommMonoid α] {a : α}
theorem Irreducible.not_square (ha : Irreducible a) : ¬IsSquare a := by
rw [isSquare_iff_exists_sq]
rintro ⟨b, rfl⟩
exact not_irreducible_pow one_lt_two.ne' ha
exact not_irreducible_pow (by decide) ha
#align irreducible.not_square Irreducible.not_square

theorem IsSquare.not_irreducible (ha : IsSquare a) : ¬Irreducible a := fun h => h.not_square ha
Expand Down
9 changes: 9 additions & 0 deletions Mathlib/Algebra/Regular/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ theorem IsLeftRegular.right_of_commute {a : R}
fun x y xy => h <| (ca x).trans <| xy.trans <| (ca y).symm
#align is_left_regular.right_of_commute IsLeftRegular.right_of_commute

theorem IsRightRegular.left_of_commute {a : R}
(ca : ∀ b, Commute a b) (h : IsRightRegular a) : IsLeftRegular a := by
simp_rw [@Commute.symm_iff R _ a] at ca
exact fun x y xy => h <| (ca x).trans <| xy.trans <| (ca y).symm

theorem Commute.isRightRegular_iff {a : R} (ca : ∀ b, Commute a b) :
IsRightRegular a ↔ IsLeftRegular a :=
⟨IsRightRegular.left_of_commute ca, IsLeftRegular.right_of_commute ca⟩

theorem Commute.isRegular_iff {a : R} (ca : ∀ b, Commute a b) : IsRegular a ↔ IsLeftRegular a :=
fun h => h.left, fun h => ⟨h, h.right_of_commute ca⟩⟩
#align commute.is_regular_iff Commute.isRegular_iff
Expand Down

0 comments on commit 4f5f0e7

Please sign in to comment.