Skip to content

Commit

Permalink
feat: A result on composition of lift of MonoidLocalization (#10373)
Browse files Browse the repository at this point in the history
Added a result on composition of lift of the localization map on Monoids. Modified some cases'. 



Co-authored-by: Xavier Xarles <56635243+XavierXarles@users.noreply.github.com>
  • Loading branch information
XavierXarles and XavierXarles committed Feb 16, 2024
1 parent 369f8d7 commit 4bb195e
Showing 1 changed file with 29 additions and 19 deletions.
48 changes: 29 additions & 19 deletions Mathlib/GroupTheory/MonoidLocalization.lean
Expand Up @@ -444,10 +444,10 @@ protected irreducible_def smul [SMul R M] [IsScalarTower R M M] (c : R) (z : Loc
Localization S :=
Localization.liftOn z (fun a b ↦ mk (c • a) b)
(fun {a a' b b'} h ↦ mk_eq_mk_iff.2 (by
cases' b with b hb
cases' b' with b' hb'
let ⟨b, hb⟩ := b
let ⟨b', hb'⟩ := b'
rw [r_eq_r'] at h ⊢
cases' h with t ht
let ⟨t, ht⟩ := h
use t
dsimp only [Subtype.coe_mk] at ht ⊢
-- TODO: this definition should take `SMulCommClass R M M` instead of `IsScalarTower R M M` if
Expand Down Expand Up @@ -701,7 +701,7 @@ variable (f : LocalizationMap S N)
theorem map_right_cancel {x y} {c : S} (h : f.toMap (c * x) = f.toMap (c * y)) :
f.toMap x = f.toMap y := by
rw [f.toMap.map_mul, f.toMap.map_mul] at h
cases' f.map_units c with u hu
let ⟨u, hu⟩ := f.map_units c
rw [← hu] at h
exact (Units.mul_right_inj u).1 h
#align submonoid.localization_map.map_right_cancel Submonoid.LocalizationMap.map_right_cancel
Expand Down Expand Up @@ -1087,27 +1087,37 @@ theorem lift_id (x) : f.lift f.map_units x = x :=
#align submonoid.localization_map.lift_id Submonoid.LocalizationMap.lift_id
#align add_submonoid.localization_map.lift_id AddSubmonoid.LocalizationMap.lift_id

/-- Given Localization maps `f : M →* N` for a Submonoid `S ⊆ M` and
`k : M →* Q` for a Submonoid `T ⊆ M`, such that `S ≤ T`, and we have
`l : M →* A`, the composition of the induced map `f.lift` for `k` with
the induced map `k.lift` for `l` is equal to the induced map `f.lift` for `l`. -/
@[to_additive
"Given Localization maps `f : M →+ N` for a Submonoid `S ⊆ M` and
`k : M →+ Q` for a Submonoid `T ⊆ M`, such that `S ≤ T`, and we have
`l : M →+ A`, the composition of the induced map `f.lift` for `k` with
the induced map `k.lift` for `l` is equal to the induced map `f.lift` for `l`"]
theorem lift_comp_lift {T : Submonoid M} (hST : S ≤ T) {Q : Type*} [CommMonoid Q]
(k : LocalizationMap T Q) {A : Type*} [CommMonoid A] {l : M →* A}
(hl : ∀ w : T, IsUnit (l w)) :
(k.lift hl).comp (f.lift (map_units k ⟨_, hST ·.2⟩)) =
f.lift (hl ⟨_, hST ·.2⟩) := .symm <|
lift_unique _ _ fun x ↦ by rw [← MonoidHom.comp_apply,
MonoidHom.comp_assoc, lift_comp, lift_comp]

@[to_additive]
theorem lift_comp_lift_eq {Q : Type*} [CommMonoid Q] (k : LocalizationMap S Q)
{A : Type*} [CommMonoid A] {l : M →* A} (hl : ∀ w : S, IsUnit (l w)) :
(k.lift hl).comp (f.lift k.map_units) = f.lift hl :=
lift_comp_lift f le_rfl k hl

/-- Given two Localization maps `f : M →* N, k : M →* P` for a Submonoid `S ⊆ M`, the hom
from `P` to `N` induced by `f` is left inverse to the hom from `N` to `P` induced by `k`. -/
@[to_additive (attr := simp)
"Given two Localization maps `f : M →+ N, k : M →+ P` for a Submonoid `S ⊆ M`, the hom
from `P` to `N` induced by `f` is left inverse to the hom from `N` to `P` induced by `k`."]
theorem lift_left_inverse {k : LocalizationMap S P} (z : N) :
k.lift f.map_units (f.lift k.map_units z) = z := by
rw [lift_spec]
cases' f.surj z with x hx
conv_rhs =>
congr
next => skip
rw [f.eq_mk'_iff_mul_eq.2 hx]
rw [mk', ← mul_assoc, mul_inv_right f.map_units, ← f.toMap.map_mul, ← f.toMap.map_mul]
apply k.eq_of_eq f.map_units
rw [k.toMap.map_mul, k.toMap.map_mul, ← sec_spec, mul_assoc, lift_spec_mul]
repeat' rw [← k.toMap.map_mul]
apply f.eq_of_eq k.map_units
repeat' rw [f.toMap.map_mul]
rw [sec_spec', ← hx]
ac_rfl
k.lift f.map_units (f.lift k.map_units z) = z :=
(DFunLike.congr_fun (lift_comp_lift_eq f k f.map_units) z).trans (lift_id f z)
#align submonoid.localization_map.lift_left_inverse Submonoid.LocalizationMap.lift_left_inverse
#align add_submonoid.localization_map.lift_left_inverse AddSubmonoid.LocalizationMap.lift_left_inverse

Expand Down

0 comments on commit 4bb195e

Please sign in to comment.