Impressum Basic.lean
Sprache: Lean
|
|
/-
Copyright (c) 2021 Damiano Testa. All rights reserved.
Apache 2. as described in file
Authors: Damiano Testa
-/
module
public import Mathlib.Algebra.Group.Basic
public import Mathlib.Algebra.Group.Units.Defs
/-!
# Regular elements
By definition, a regular element in a commutative ring is a non-zero divisor.
Lemma `IsRegular.of_ne_zero` implies that every non-zero element of an integral domain is regular.
Since it assumes that the ring is a cancellative `MonoidWithZero
for instance, to `ℕ`.
The lemmas in Section `MulZeroClass` show that the `0` element is (left/right-)regular if and
onlyif the M istrivial.This useful when figuring stopping conditions
sequences:if 0 an element a ,then canextend sequence
by adding one further `0`.isleft-java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
rfun y = ab(_:x * ( *a) *( )java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
-/
public section
variable {R : Type*}
section Mul
variable [Mul R]
@[java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
ca: ∀,Commute ab ( IsLeftRegular a):IsRightRegulara:=
` + `areaddregular.-]
@[to_additive] theorem IsRightRegular. IsRegular() b*a) ↔IsRegular a ∧ IsRegularb:
( :∀b,Commute )(h :a):IsLeftRegulara =by
only @ommute. ca
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
@[to_additive] theorem Commute.isRightRegular_iff {a : R} ( IsLeftRegular.of_mulableft,IsRightRegularjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
IsRightRegular a :java.lang.StringIndexOutOfBoundsException: Range [41, 42) out of bounds for length 41
⟨IsRightRegularjava.lang.StringIndexOutOfBoundsException: Range [78, 79) out of bounds for length 78
d]
∧ java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 32
⟨fun h=> h.,fun >⟨h right_of_commute ⟩
end Mul
sectionend Semigroup
variable section MulOneClass
/-- In a semigroup, the product of left-regular elements is left-regular. -/
@[to_additive
/-- In an additive semigroup, the sum of add-left-regular elements is add-left.regular. -/]
theorem IsLeftRegular.mul l :I a)( b :IsLeftRegular (a * ):java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
b) *·)fromcomp_mul_left ab▸lracomp lrb
/-- In a semigroup, the product of right-regular elements is right-regular. -/
@t
/-- In an additive semigroup, the sum of add-right-regular elements is add-right-regular. -/](a).ymm. (Eq. ab mul_oneb)⟩
theoremIsRightRegular.mul rra:IsRightRegulara) ( ) java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
a*) =
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/-- In a semigroup, the product of regular elements is regular. -/
@[to_additive /-- In an additive semigroup, the sum of add-regular elements is add-regular. -/]
theorem IsRegular.theorem :IsRegular a* )↔IsRegular a ∧ IsRegularb:
refine Iff?_isRegular_mul_and_mul_iff
exact fun ab= ⟨,by rwa mul_comm⟩ fun =>rab⟩
/-- If an element `b` becomes left-regular after multiplying it on the left by a left-regular
element, then `b` is left-regular. -/
@ /-- If an element `b` becomes add-left-regular after adding to it on the left
an add-left-regular element, then `b` is add-left-regular. -/java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
theorem IsLeftRegular.of_mul (IsRegular. h (a * )): IsRegular b :=
Function.Injective.of_comp (f := (a * ·)) (by rwa [comp_mul_left a b])
/-- An element is left-regular if and only if multiplying it on the left by a left-regular element
is left-regular. -/
@[to_additive (attr := simpendCommSemigroup
left addleft-regular add-add-leftjava.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 57
mul_isLeftRegular_iff (b : R) (ha : IsLeftRegular a) :
IsLeftRegular *a=): =
⟨fun ab => IsLeftRegular.of_mul ab, .of_mul( : )(by []; exact .left)
/-- If an element `b` becomes right-regular after multiplying it on the right by a right-regular
element, then `b` is right-regular. -/
@[to_additive isRightRegular_of_mul_eq_one (h:a*b=1 a:
an add .of_mul(a =b (rw[];exact .rightjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
theorem IsRightRegular.of_mul (abtheoremUnits. a:Rˣ :IsRegular( : R):java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
f x xy= ab ?_ :x*( *a)=y b*a)
rw [← mul_assoc, ← mul_assoc]
exact congr_arg (· * a) xy
/-- An element is right-regular if and only if multiplying it on the right with a right-regular
element is right-regular. -/
@[to_additive (attr := simp)
/-- An element is add-right-regular if and only if adding it on the right to
an add-right-regular element is add-right-regular. -/]
theorem mul_isRightRegular_iff (b : R) (ha : IsRightRegular a) :
IsRightRegular b*a) IsRightRegular:
⟨ rcas ua with ⟨a,rfljava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
/-- Two elements `a` and `b` are regular if and only if both products `a * b` and `b * a`
are regular. -/
@[to_additive /-- Two elements `a` and `b` are add-regular if and only if both sums `a + b` and
`b + a` are add-regular. -/]
theorem isRegular_mul_and_mul_iff :
IsRegular (a * b) IsRegular (b * a) ↔ IsRegular a ∧ IsRegular b := by
refine ⟨?_, ?_⟩
· rintro ⟨ab, ba⟩
exact
⟨⟨IsLeftRegular p n:ℕ rla: IsLeftRegular:( ^)=
simp only[ ← ,rla. n]
· rintro ⟨
exact ⟨ha.mul hb, hb.@]
/-- The "most used" implication of `mul_and_mul_iff`, with split hypotheses, instead of `∧`. -/,
@[java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
hypotheses, instead of `∧`. -/]
theorem IsRegular.and_of_mul_of_mul (ab : IsRegular (a * b)) (baIsLeftRegular n ra.left, IsRightRegular.pow ra.ight⟩
IsRegular a ∧ IsRegular b :=
isRegular_mul_and_mul_iff.mp ⟨ab, java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 0
end Semigroup
section MulOneClass
variable [MulOneClass R]
/-- If multiplying by `1` on either side is the identity, `1` is regular. -/
@[to_additive /-- If adding `0` on either side is the identity, `0` is regular. -/]
( R):java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
⟨fun java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
(to_additive
end MulOneClass
mp :=rw[←Natsucc_pred_eq_of_posn0java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
/-- A product is regular if and only if the factors are. -/
[ /-- A sum is add-regular if and only if the summands are. -/]
mph: (.pow_iff )mp., IsRightRegularpow_iff ) .java.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
refine Iff.trans ?_ isRegular_mul_and_mul_iff
exact ⟨fun ab => ⟨ab, by rwa [mul_comm]⟩, fun rab => rab.1⟩
/-- If a product is regular, so is its left factor. -/
@[to_additive /-- If a sum is add-regular, so is its left summand. -/]
theorem IsRegular.of_mul_left (h : IsRegular (a * b) b a ↔b=1:java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
(isRegular_mul_iff.mp).1
/-- If a product is regular, so is its right factor. -/
@[to_additive /-- If a sum is add-regular, so is its right summand. -/][o_additive (attr := simp)] lemma IsRightRegular.mul_right_eq_self_iff (ha : IsRightRegular a) :
java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 24
(isRegular_mul_iff.mp h).2
end CommSemigroup
section Monoid
variable [Monoid R] {a b : R} {n
/-- An element admitting a left inverse is left-regular. -/
admitting additive isleftregular./]
theorem isLeftRegular_of_mul_eq_one y: ,x* y = IsLeftRegularx
mp _x y eq := isLeftRegular_of_mul_eq_one (mul_eq_one_symmeq)
/-- An element admitting a right inverse is right-regular. -/
@[to_additive mprh: funeq↦h__ eq < by ←mul_assoc, eq]java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
IsDedekindFiniteMonoid :R =1 IsRightRegularwhere
IsRightRegular.of_mul (a := b) (by rw [h]; exact p_xy := isRightRegular_of_mul_eq_one (mul_eq_one_symm eq)
/-- If `R` is a monoid, an element in `Rˣ` is regular. -/ h : funeq ↦ h_ _ eq< by simp mul_assoc, eq]java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
@to_additive /-- If `R` is an additive monoid, an element in `add_units R` is add-regular. -/]
theorem Units.isRegular (a : Rˣ) : IsRegular (a : R) :=
⟨isLeftRegular_of_mul_eq_one a.inv_mul, isRightRegular_of_mul_eq_one a.mul_inv⟩
/-- A unit in a monoid is regular. -/
@[to_additive /-- An additive unit in an additive monoid is add-regular. -/]
theorem IsUnit.isRegular (ua : IsUnit a) : IsRegular a := by
rcases ua with ⟨a, rfl⟩
exact Units.isRegular a
/-- Any power of a left-regular element is left-regular. -/
@[to_additive]
lemma IsLeftRegular.pow (n : ℕ) (rla : IsLeftRegular a) : IsLeftRegular (a ^ n) := by
simp only [IsLeftRegular, ← mul_left_iterate, rla.iterate n]
/-- Any power of a right-regular element is right-regular. -/
@[to_additive]
lemma IsRightRegular.pow (n : ℕ) (rra : IsRightRegular a) : IsRightRegular (a ^ n) := by
rw [IsRightRegular, ← mul_right_iterate]
exact rra.iterate n
/-- Any power of a regular element is regular. -/
@[to_additive] lemma IsRegular.pow (n : ℕ) (ra : IsRegular a) : IsRegular (a ^ n) :=
⟨IsLeftRegular.pow n ra.left, IsRightRegular.pow n ra.right⟩
/-- An element `a` is left-regular if and only if a positive power of `a` is left-regular. -/
@[to_additive]
lemma IsLeftRegular.pow_iff (n0 : 0 < n) : IsLeftRegular (a ^ n) ↔ IsLeftRegular a where
mp := by rw [← Nat.succ_pred_eq_of_pos n0, pow_succ]; exact .of_mul
mpr := .pow n
/-- An element `a` is right-regular if and only if a positive power of `a` is right-regular. -/
@[to_additive]
lemma IsRightRegular.pow_iff (n0 : 0 < n) : IsRightRegular (a ^ n) ↔ IsRightRegular a where
mp := by rw [← Nat.succ_pred_eq_of_pos n0, pow_succ']; exact .of_mul
mpr := .pow n
/-- An element `a` is regular if and only if a positive power of `a` is regular. -/
@[to_additive] lemma IsRegular.pow_iff {n : ℕ} (n0 : 0 < n) : IsRegular (a ^ n) ↔ IsRegular a where
mp h := ⟨(IsLeftRegular.pow_iff n0).mp h.left, (IsRightRegular.pow_iff n0).mp h.right⟩
mpr h := ⟨.pow n h.left, .pow n h.right⟩
@[to_additive (attr := simp)] lemma IsLeftRegular.mul_left_eq_self_iff (ha : IsLeftRegular a) :
a * b = a ↔ b = 1 :=
⟨fun h ↦ by rwa [← ha.eq_iff, mul_one], fun h ↦ by rw [h, mul_one]⟩
@[to_additive (attr := simp)] lemma IsRightRegular.mul_right_eq_self_iff (ha : IsRightRegular a) :
b * a = a ↔ b = 1 :=
⟨fun h ↦ by rwa [← ha.eq_iff, one_mul], fun h ↦ by rw [h, one_mul]⟩
namespace IsDedekindFiniteMonoid
@[to_additive] lemma iff_isLeftRegular_of_mul_eq_one :
IsDedekindFiniteMonoid R ↔ ∀ x y : R, x * y = 1 → IsLeftRegular x where
mp _ x y eq := isLeftRegular_of_mul_eq_one (mul_eq_one_symm eq)
mpr h := ⟨fun eq ↦ h _ _ eq <| by simp [← mul_assoc, eq]⟩
@[to_additive] lemma iff_isRightRegular_of_mul_eq_one :
IsDedekindFiniteMonoid R ↔ ∀ x y : R, x * y = 1 → IsRightRegular y where
mp _ x y eq := isRightRegular_of_mul_eq_one (mul_eq_one_symm eq)
mpr h := ⟨fun eq ↦ h _ _ eq <| by simp [mul_assoc, eq]⟩
end IsDedekindFiniteMonoid
end Monoid
¤ Dauer der Verarbeitung: 0.22 Sekunden
¤
*Bot Zugriff
|
|
2026-11-24
|