feat(group_theory/monoid_localization): some homs induced on localizations: lift, map#2118
feat(group_theory/monoid_localization): some homs induced on localizations: lift, map#2118mergify[bot] merged 41 commits intomasterfrom
Conversation
|
I have no idea why this is failing to build due to 'deep recursion' in Edit: Wow, doing what errors say really does work. Increased stack size and it seems to compile now |
jcommelin
left a comment
There was a problem hiding this comment.
On first reading, this looks really good. @ChrisHughes24 do you have some comments?
| /-- If `f : M →* N` is a localization map for a submonoid `S` and `k : N ≃* P` is an isomorphism | ||
| of `comm_monoid`s, `k ∘ f` is a localization map for `M` at `S`. -/ | ||
| @[to_additive "If `f : M →+ N` is a localization map for a submonoid `S` and `k : N ≃+ P` is an isomorphism of `add_comm_monoid`s, `k ∘ f` is a localization map for `M` at `S`."] | ||
| def mul_equiv_map (k : N ≃* P) : |
There was a problem hiding this comment.
I think the following definitions should come with some compatibility lemmas. E.g., the coe to function of this mul_equiv_map is k ∘ f.1. But also, what happens if I compose this with k.symm: then I recover f. Similar lemmas apply below.
There was a problem hiding this comment.
added some in this commit and the latest commit but I might be missing some obvious ones, I'm not sure
|
@ChrisHughes24, @101damnations, where are we up to on this one? I've lost track, and can't quite tell from the unresolved conversations above which issues are ongoing or not. Does it help to have extra eyes here, or is this almost ready to go? |
|
The one comment I have now, is that a lot of the monoid localisation file is quite difficult to read. Some docstribgs would be good so I can understand the statements of the theorems. |
|
I've not added doc strings at the end for now; those lemmas are about functions with unwieldy names but are just kind of unfolding the definitions... Apart from maybe |
| /-- Application of the 'weaker-than-injectivity' property of localization maps `f : M →* N` | ||
| for a submonoid `S ⊆ M` to the fact that for all `x₁ x₂ : M` and `y₁, y₂ ∈ S`, | ||
| `f x₁ * (f y₁)⁻¹ * f y₂ = f x₂ → f (x₁ * y₂) = f (x₂ * y₁)`. -/ | ||
| @[to_additive "Application of the 'weaker-than-injectivity' property of localization maps `f : M →+ N` for a submonoid `S ⊆ M` to the fact that for all `x₁ x₂ : M` and `y₁, y₂ ∈ S`, `(f x₁ - f y₁) + f y₂ = f x₂ → f (x₁ + y₂) = f (x₂ + y₁)`."] | ||
| lemma exists_of_sec_mk' (x) (y : S) : | ||
| ∃ c : S, x * (sec S f.1 $ f.mk' x y).2 * c = (sec S f.1 $ f.mk' x y).1 * y * c := | ||
| (f.4 _ _).1 $ f.mk'_eq_iff_eq.1 $ (mk'_sec _ _).symm |
There was a problem hiding this comment.
This docstring doesn't seem to match the statement of the theorem.
| let ⟨c, hc⟩ := (f.4 _ _).1 h in (k.4 _ _).2 | ||
| ⟨⟨g c, hg c⟩, show g _ * g _ = g _ * g _, by rw [←g.map_mul, hc, g.map_mul]⟩ | ||
|
|
||
| @[to_additive] lemma eq_of_eq (hg : ∀ y : S, is_unit (g y)) {x y} (h : f.1 x = f.1 y) : |
There was a problem hiding this comment.
I think this needs a docstring.
| @[simp, to_additive] lemma lift_id (x) : f.lift f.2 x = x := | ||
| monoid_hom.ext_iff.1 (f.lift_of_comp $ monoid_hom.id N) x | ||
|
|
||
| @[simp, to_additive] lemma lift_inv {k : localization_map S P} (z : N) : |
There was a problem hiding this comment.
I think this needs a docstring
| map for `S` and `k : P ≃* M` is an isomorphism of `comm_monoid`s such that `k(T) = S`, `f ∘ k` | ||
| is a localization map for `T`. -/ | ||
| @[to_additive "Given `comm_monoid`s `M, P` and submonoids `S ⊆ M, T ⊆ P`, if `f : M →* N` is a localization map for `S` and `k : P ≃* M` is an isomorphism of `comm_monoid`s such that `k(T) = S`, `f ∘ k` is a localization map for `T`."] | ||
| def mul_equiv_comap {k : P ≃* M} (H : T.map k.to_monoid_hom = S) : |
There was a problem hiding this comment.
To me the name comap means there's a contravariant functor somewhere. There might be a better name.
| /-- If `f : M →* N` is a localization map for a submonoid `S` and `k : N ≃* P` is an isomorphism | ||
| of `comm_monoid`s, `k ∘ f` is a localization map for `M` at `S`. -/ | ||
| @[to_additive "If `f : M →+ N` is a localization map for a submonoid `S` and `k : N ≃+ P` is an isomorphism of `add_comm_monoid`s, `k ∘ f` is a localization map for `M` at `S`."] | ||
| def to_mul_equiv (k : N ≃* P) : |
There was a problem hiding this comment.
to_mul_equiv sounds like it should make a mul_equiv
Also, @jcommelin do you think this might cause problems when in practice there is some canonical map M->P floating around that is eq but not defeq to the map given by this definition.
There was a problem hiding this comment.
That will probably be painful, yes... But maybe we should save that for a later refactor, because this is something that we don't have a good solution for anyways...
|
@jcommelin any further comments before I merge this? |
|
Nope, let's go! |
…tions: lift, map (leanprover-community#2118) * should I be changing and committing toml idk * initial monoid loc lemmas * responding to PR comments * removing bad @[simp] * inhabited instances * remove #lint * additive inhabited instance * using is_unit & is_add_unit * doc string * remove simp * submonoid.monoid_loc... -> submonoid.localization * submonoid.monoid_loc... -> submonoid.localization * generalize inhabited instance * remove inhabited instance * 2nd section * docs and linting * removing questionable `@[simp]s` * removing away * adding lemmas, removing 'include' * removing import * responding to PR comments * use eq_of_eq to prove comp_eq_of_eq * name change * trying to update mathlib * make lemma names consistent * Update src/algebra/group/is_unit.lean * Update src/algebra/group/is_unit.lean * fix build * documentation and minor changes * spacing * fix build * applying comments Co-authored-by: Chris Hughes <33847686+ChrisHughes24@users.noreply.github.com> Co-authored-by: Chris Hughes <chrishughes24@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…tions: lift, map (leanprover-community#2118) * should I be changing and committing toml idk * initial monoid loc lemmas * responding to PR comments * removing bad @[simp] * inhabited instances * remove #lint * additive inhabited instance * using is_unit & is_add_unit * doc string * remove simp * submonoid.monoid_loc... -> submonoid.localization * submonoid.monoid_loc... -> submonoid.localization * generalize inhabited instance * remove inhabited instance * 2nd section * docs and linting * removing questionable `@[simp]s` * removing away * adding lemmas, removing 'include' * removing import * responding to PR comments * use eq_of_eq to prove comp_eq_of_eq * name change * trying to update mathlib * make lemma names consistent * Update src/algebra/group/is_unit.lean * Update src/algebra/group/is_unit.lean * fix build * documentation and minor changes * spacing * fix build * applying comments Co-authored-by: Chris Hughes <33847686+ChrisHughes24@users.noreply.github.com> Co-authored-by: Chris Hughes <chrishughes24@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
…tions: lift, map (leanprover-community#2118) * should I be changing and committing toml idk * initial monoid loc lemmas * responding to PR comments * removing bad @[simp] * inhabited instances * remove #lint * additive inhabited instance * using is_unit & is_add_unit * doc string * remove simp * submonoid.monoid_loc... -> submonoid.localization * submonoid.monoid_loc... -> submonoid.localization * generalize inhabited instance * remove inhabited instance * 2nd section * docs and linting * removing questionable `@[simp]s` * removing away * adding lemmas, removing 'include' * removing import * responding to PR comments * use eq_of_eq to prove comp_eq_of_eq * name change * trying to update mathlib * make lemma names consistent * Update src/algebra/group/is_unit.lean * Update src/algebra/group/is_unit.lean * fix build * documentation and minor changes * spacing * fix build * applying comments Co-authored-by: Chris Hughes <33847686+ChrisHughes24@users.noreply.github.com> Co-authored-by: Chris Hughes <chrishughes24@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
The second third of
monoid_localization. The linter complained about loads of@[simp]s and I don't understand why (including some that made it through on the last PR). Maybe I need to experiment or read up on the linter, but I've removed the@[simp]s for now, anyway.The additive versions of the
away_mapstuff will be in the next PR.TO CONTRIBUTORS:
Make sure you have:
If this PR is related to a discussion on Zulip, please include a link in the discussion.
For reviewers: code review check list