@@ -39,25 +39,25 @@ section SetsAndRegularity
3939namespace IsGreenL
4040
4141/-- The equivalence class of `x` under Green's L relation as a `Set S`. -/
42- def eqvClass (x : S) : Set S := setOf (IsGreenL · x)
42+ abbrev eqvClass (x : S) : Set S := setOf (IsGreenL · x)
4343
4444end IsGreenL
4545
4646namespace IsGreenR
4747
4848/-- The equivalence class of `x` under Green's R relation as a `Set S`. -/
49- def eqvClass (x : S) : Set S := setOf (IsGreenR · x)
49+ abbrev eqvClass (x : S) : Set S := setOf (IsGreenR · x)
5050
5151end IsGreenR
5252
5353namespace IsGreenH
5454
5555/-- The equivalence class of `x` under Green's H relation as a `Set S`. -/
56- def eqvClass (x : S) : Set S := setOf (IsGreenH · x)
56+ abbrev eqvClass (x : S) : Set S := setOf (IsGreenH · x)
5757
5858open MulOpposite in
5959/-- An equivalence between the H-class of `a` and the H-class of `op a`. -/
60- def equivHClassOp (a : S) : eqvClass a ≃ eqvClass (op a) where
60+ abbrev equivHClassOp (a : S) : eqvClass a ≃ eqvClass (op a) where
6161 toFun := fun ⟨x, hx⟩ ↦ ⟨op x, isGreenH_iff_isGreenH_op.mp hx⟩
6262 invFun := fun ⟨y, hy⟩ ↦ ⟨unop y, isGreenH_iff_isGreenH_op.mpr (by rwa [op_unop])⟩
6363 left_inv := fun ⟨x, _⟩ ↦ Subtype.ext (unop_op x)
@@ -68,26 +68,25 @@ end IsGreenH
6868namespace IsGreenD
6969
7070/-- The equivalence class of `x` under Green's D relation as a `Set S`. -/
71- def eqvClass (x : S) : Set S := setOf (IsGreenD · x)
71+ abbrev eqvClass (x : S) : Set S := setOf (IsGreenD · x)
7272
7373end IsGreenD
7474
7575namespace IsGreenJ
7676
7777/-- The equivalence class of `x` under Green's J relation as a `Set S`. -/
78- def eqvClass (x : S) : Set S := setOf (IsGreenJ · x)
78+ abbrev eqvClass (x : S) : Set S := setOf (IsGreenJ · x)
7979
8080end IsGreenJ
8181
8282/-- An element `a` is regular if there exists `s` such that `a * s * a = a`. -/
83- def IsGreenRegular (a : S) := ∃ s, a * s * a = a
83+ abbrev IsGreenRegular (a : S) := ∃ s, a * s * a = a
8484
8585/-- A D-class is regular if all its elements are regular. -/
86- def IsRegularDClass (D : Set S) := ∀ x ∈ D, IsGreenRegular x
86+ abbrev IsRegularDClass (D : Set S) := ∀ x ∈ D, IsGreenRegular x
8787
8888end SetsAndRegularity
8989
90-
9190section QuotientAPI
9291
9392/-- The quotient type of `S` by Green's L relation. -/
@@ -96,15 +95,16 @@ abbrev GreenLClass (S : Type*) [Semigroup S] := Quotient (IsGreenL.setoid S)
9695namespace GreenLClass
9796
9897/-- Constructs the Green's L-class of an element `x`. -/
99- def mk (x : S) : GreenLClass S := Quotient.mk (IsGreenL.setoid S) x
98+ abbrev mk (x : S) : GreenLClass S := Quotient.mk (IsGreenL.setoid S) x
10099
101100/-- The projection map to Green's L-classes is surjective. -/
102101lemma mk_surjective : Function.Surjective (mk : S → GreenLClass S) :=
103102 @Quotient.exists_rep _ (IsGreenL.setoid S)
104103
105104/-- Two elements have the same Green's L-class if and only if they are L-related. -/
106- lemma mk_eq_mk_iff {a b : S} : mk a = mk b ↔ IsGreenL a b :=
107- @Quotient.eq _ (IsGreenL.setoid S) _ _
105+ lemma mk_eq_mk_iff {a b : S} : mk a = mk b ↔ IsGreenL a b := by
106+ dsimp [mk, IsGreenL.setoid]
107+ exact Quotient.eq
108108
109109instance [Inhabited S] : Inhabited (GreenLClass S) := ⟨mk default⟩
110110
@@ -117,12 +117,25 @@ lemma isGreenLeftDvd_respects (a₁ b₁ a₂ b₂ : S)
117117 fun h ↦ h1.left.trans (h.trans h2.right)
118118 ⟩
119119
120- /-- The partial order on L-classes. `[a] ≤ [b]` iff `a` is a left multiple of `b`. -/
121- instance : PartialOrder (GreenLClass S) where
120+ /-- Green's L relation induces a natural left-multiplication order on L-classes.
121+ `[a] ≤ [b]` iff `a` is a left multiple of `b`. -/
122+ instance : LE (GreenLClass S) where
122123 le := Quotient.lift₂ IsGreenLeftDvd isGreenLeftDvd_respects
123- le_refl := by rintro ⟨a⟩; exact IsGreenLeftDvd.refl a
124- le_trans := by rintro ⟨a⟩ ⟨b⟩ ⟨c⟩ hab hbc; exact hab.trans hbc
125- le_antisymm := by rintro ⟨a⟩ ⟨b⟩ hab hba; exact mk_eq_mk_iff.mpr ⟨hab, hba⟩
124+
125+ /-- The partial order on L-classes. -/
126+ instance : PartialOrder (GreenLClass S) where
127+ le_refl := by
128+ rintro ⟨a⟩
129+ dsimp [LE.le]
130+ exact IsGreenLeftDvd.refl a
131+ le_trans := by
132+ rintro ⟨a⟩ ⟨b⟩ ⟨c⟩ hab hbc
133+ dsimp [LE.le] at hab hbc ⊢
134+ exact hab.trans hbc
135+ le_antisymm := by
136+ rintro ⟨a⟩ ⟨b⟩ hab hba
137+ dsimp [LE.le] at hab hba
138+ exact mk_eq_mk_iff.mpr ⟨hab, hba⟩
126139
127140end GreenLClass
128141
@@ -133,7 +146,7 @@ abbrev GreenRClass (S : Type*) [Semigroup S] := Quotient (IsGreenR.setoid S)
133146namespace GreenRClass
134147
135148/-- Constructs the Green's R-class of an element `x`. -/
136- def mk (x : S) : GreenRClass S := Quotient.mk (IsGreenR.setoid S) x
149+ abbrev mk (x : S) : GreenRClass S := Quotient.mk (IsGreenR.setoid S) x
137150
138151/-- The projection map to Green's R-classes is surjective. -/
139152lemma mk_surjective : Function.Surjective (mk : S → GreenRClass S) :=
@@ -154,12 +167,25 @@ lemma isGreenRightDvd_respects (a₁ b₁ a₂ b₂ : S)
154167 fun h ↦ IsGreenRightDvd.trans (IsGreenRightDvd.trans ha.left h) hb.right
155168 ⟩
156169
157- /-- The partial order on R-classes. `[a] ≤ [b]` iff `a` is a right multiple of `b`. -/
158- instance : PartialOrder (GreenRClass S) where
170+ /-- Green's R relation induces a natural right-multiplication order on R-classes.
171+ `[a] ≤ [b]` iff `a` is a right multiple of `b`. -/
172+ instance : LE (GreenRClass S) where
159173 le := Quotient.lift₂ IsGreenRightDvd isGreenRightDvd_respects
160- le_refl := by rintro ⟨a⟩; exact IsGreenRightDvd.refl a
161- le_trans := by rintro ⟨a⟩ ⟨b⟩ ⟨c⟩ hab hbc; exact IsGreenRightDvd.trans hab hbc
162- le_antisymm := by rintro ⟨a⟩ ⟨b⟩ hab hba; exact mk_eq_mk_iff.mpr ⟨hab, hba⟩
174+
175+ /-- The partial order on R-classes. -/
176+ instance : PartialOrder (GreenRClass S) where
177+ le_refl := by
178+ rintro ⟨a⟩
179+ dsimp [LE.le]
180+ exact IsGreenRightDvd.refl a
181+ le_trans := by
182+ rintro ⟨a⟩ ⟨b⟩ ⟨c⟩ hab hbc
183+ dsimp [LE.le] at hab hbc ⊢
184+ exact IsGreenRightDvd.trans hab hbc
185+ le_antisymm := by
186+ rintro ⟨a⟩ ⟨b⟩ hab hba
187+ dsimp [LE.le] at hab hba
188+ exact mk_eq_mk_iff.mpr ⟨hab, hba⟩
163189
164190end GreenRClass
165191
@@ -170,7 +196,7 @@ abbrev GreenJClass (S : Type*) [Semigroup S] := Quotient (IsGreenJ.setoid S)
170196namespace GreenJClass
171197
172198/-- Constructs the Green's J-class of an element `x`. -/
173- def mk (x : S) : GreenJClass S := Quotient.mk (IsGreenJ.setoid S) x
199+ abbrev mk (x : S) : GreenJClass S := Quotient.mk (IsGreenJ.setoid S) x
174200
175201/-- The projection map to Green's J-classes is surjective. -/
176202lemma mk_surjective : Function.Surjective (mk : S → GreenJClass S) :=
@@ -191,12 +217,25 @@ lemma isGreenJRel_respects (a₁ b₁ a₂ b₂ : S)
191217 fun h ↦ IsGreenJRel.trans (IsGreenJRel.trans ha.left h) hb.right
192218 ⟩
193219
194- /-- The partial order on J-classes. `[a] ≤ [b]` iff `a` is a two-sided multiple of `b`. -/
195- instance : PartialOrder (GreenJClass S) where
220+ /-- Green's J relation induces a natural two-sided order on J-classes.
221+ `[a] ≤ [b]` iff `a` is a two-sided multiple of `b`. -/
222+ instance : LE (GreenJClass S) where
196223 le := Quotient.lift₂ IsGreenJRel isGreenJRel_respects
197- le_refl := by rintro ⟨a⟩; exact IsGreenJRel.refl a
198- le_trans := by rintro ⟨a⟩ ⟨b⟩ ⟨c⟩ hab hbc; exact IsGreenJRel.trans hab hbc
199- le_antisymm := by rintro ⟨a⟩ ⟨b⟩ hab hba; exact mk_eq_mk_iff.mpr ⟨hab, hba⟩
224+
225+ /-- The partial order on J-classes. -/
226+ instance : PartialOrder (GreenJClass S) where
227+ le_refl := by
228+ rintro ⟨a⟩
229+ dsimp [LE.le]
230+ exact IsGreenJRel.refl a
231+ le_trans := by
232+ rintro ⟨a⟩ ⟨b⟩ ⟨c⟩ hab hbc
233+ dsimp [LE.le] at hab hbc ⊢
234+ exact IsGreenJRel.trans hab hbc
235+ le_antisymm := by
236+ rintro ⟨a⟩ ⟨b⟩ hab hba
237+ dsimp [LE.le] at hab hba
238+ exact mk_eq_mk_iff.mpr ⟨hab, hba⟩
200239
201240end GreenJClass
202241
@@ -207,7 +246,7 @@ abbrev GreenHClass (S : Type*) [Semigroup S] := Quotient (IsGreenH.setoid S)
207246namespace GreenHClass
208247
209248/-- Constructs the Green's H-class of an element `x`. -/
210- def mk (x : S) : GreenHClass S := Quotient.mk (IsGreenH.setoid S) x
249+ abbrev mk (x : S) : GreenHClass S := Quotient.mk (IsGreenH.setoid S) x
211250
212251/-- The projection map to Green's H-classes is surjective. -/
213252lemma mk_surjective : Function.Surjective (mk : S → GreenHClass S) :=
@@ -221,14 +260,13 @@ instance [Inhabited S] : Inhabited (GreenHClass S) := ⟨mk default⟩
221260
222261end GreenHClass
223262
224-
225263/-- The quotient type of `S` by Green's D relation. -/
226264abbrev GreenDClass (S : Type *) [Semigroup S] := Quotient (IsGreenD.setoid S)
227265
228266namespace GreenDClass
229267
230268/-- Constructs the Green's D-class of an element `x`. -/
231- def mk (x : S) : GreenDClass S := Quotient.mk (IsGreenD.setoid S) x
269+ abbrev mk (x : S) : GreenDClass S := Quotient.mk (IsGreenD.setoid S) x
232270
233271/-- The projection map to Green's D-classes is surjective. -/
234272lemma mk_surjective : Function.Surjective (mk : S → GreenDClass S) :=
0 commit comments