Skip to content

[Merged by Bors] - feat(Algebra/Order/{Monoid,GroupWithZero}/Lex): ordered inclusions and projections of prod of ordered groups#22420

Closed
pechersky wants to merge 54 commits intomasterfrom
pechersky/lin-ord-g-w-zero-prod
Closed

[Merged by Bors] - feat(Algebra/Order/{Monoid,GroupWithZero}/Lex): ordered inclusions and projections of prod of ordered groups#22420
pechersky wants to merge 54 commits intomasterfrom
pechersky/lin-ord-g-w-zero-prod

Conversation

@pechersky
Copy link
Copy Markdown
Contributor

@pechersky pechersky commented Mar 1, 2025

and define `Order(Add)MonoidIso.symm`
bringing along a copy of lemmas from MulEquiv

clean up the simps
…nd projections into prod of ordered groups

with a TODO about creating the associated categories
@pechersky pechersky added t-algebra Algebra (groups, rings, fields, etc) t-order Order theory labels Mar 1, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 1, 2025

PR summary 124c4b2dbc

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Order.Prod.Lex.Hom (new file) 223
Mathlib.Algebra.Order.Monoid.Lex (new file) 410
Mathlib.Algebra.Order.GroupWithZero.Lex (new file) 417

Declarations diff

+ Prod.Lex.toLexOrderHom
+ coe_symm_toLexMulEquiv
+ coe_toLexMulEquiv
+ commute_inl_inr
+ commute_inlₗ_inrₗ
+ fst_comp_inr
+ fstₗ
+ fstₗ_comp_inlₗ
+ inl_eq_coe_inlₗ
+ inl_mul_inr_eq_coe_toLex
+ inl_mul_inr_eq_mk
+ inlₗ
+ inlₗ_mul_inrₗ_eq_toLex
+ inr_eq_coe_inrₗ
+ inrₗ
+ snd
+ snd_comp_inl
+ snd_comp_inr
+ toEquiv_symm_toLexMulEquiv
+ toEquiv_toLexMulEquiv
+ toLexMulEquiv
+ toMonoidWithZeroHom_coe
+ toMonoidWithZeroHom_mk
+ toOrderMonoidHom_comp
++ fst
++ fst_comp_inl
++ fst_mono
++ inl
++ inl_mono
++ inl_strictMono
++ inr
++ inr_mono
++ inr_strictMono
++ snd_mono

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Mar 1, 2025
can't have the `fst_comp_inr` without a "send everything to one except zero" hom
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Apr 7, 2025
@pechersky pechersky added the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 4, 2025
@YaelDillies YaelDillies added the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 11, 2025
pfaffelh pushed a commit to pfaffelh/mathlib4 that referenced this pull request Jun 15, 2025
…ro.map'` (leanprover-community#25660)

factored out of leanprover-community#22420




Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
pfaffelh pushed a commit to pfaffelh/mathlib4 that referenced this pull request Jun 15, 2025
…ro.map'` (leanprover-community#25660)

factored out of leanprover-community#22420




Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
@pechersky pechersky removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 15, 2025
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

maintainer delegate

@[to_additive (attr := simps!) "Given ordered additive monoids M, N, the natural inclusion ordered
homomorphism from N to the lexicographic M ×ₗ N."]
def inrₗ : β →*o (α ×ₗ β) where
__ := (Prod.Lex.toLexOrderHom).comp (inr α β)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's evil!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which is the evil part?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have expected

Suggested change
__ := (Prod.Lex.toLexOrderHom).comp (inr α β)
__ := Prod.Lex.toLexOrderHom.comp (inr α β)

The product of ordered monoids `α × β` is an ordered monoid itself with both natural inclusions
and projections, making it the coproduct as well.

TODO: Create the "OrdCommMon" category.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
TODO: Create the "OrdCommMon" category.
## TODO
Create the "OrdCommMon" category.

rfl

@[simp]
lemma comp_coe_orderMonoidHom (f : β →*₀o γ) (g : α →*₀o β) :
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest

Suggested change
lemma comp_coe_orderMonoidHom (f : β →*₀o γ) (g : α →*₀o β) :
lemma toOrderMonoidHom_comp (f : β →*₀o γ) (g : α →*₀o β) :

for clarity

simp

theorem inlₗ_mul_inrₗ_eq_coe_toLex {m : α} {n : β} (hm : m ≠ 0) (hn : n ≠ 0) :
(inl α β m * inr α β n) = toLex (Units.mk0 _ hm, Units.mk0 _ hn) := by
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(inl α β m * inr α β n) = toLex (Units.mk0 _ hm, Units.mk0 _ hn) := by
inl α β m * inr α β n = toLex (Units.mk0 _ hm, Units.mk0 _ hn) := by

Is there no inrₗ_mul_inlₗ version?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what that would give differently, since this is over a commgroup

@github-actions
Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by YaelDillies.

@ghost ghost added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Jun 15, 2025
@jcommelin
Copy link
Copy Markdown
Member

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jun 16, 2025

✌️ pechersky can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Jun 16, 2025
@pechersky
Copy link
Copy Markdown
Contributor Author

bors r+

mathlib-bors bot pushed a commit that referenced this pull request Jun 16, 2025
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jun 16, 2025

This PR was included in a batch that successfully built, but then failed to merge into master (it was a non-fast-forward update). It will be automatically retried.

mathlib-bors bot pushed a commit that referenced this pull request Jun 16, 2025
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jun 16, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Algebra/Order/{Monoid,GroupWithZero}/Lex): ordered inclusions and projections of prod of ordered groups [Merged by Bors] - feat(Algebra/Order/{Monoid,GroupWithZero}/Lex): ordered inclusions and projections of prod of ordered groups Jun 16, 2025
@mathlib-bors mathlib-bors bot closed this Jun 16, 2025
@mathlib-bors mathlib-bors bot deleted the pechersky/lin-ord-g-w-zero-prod branch June 16, 2025 16:52
Rida-Hamadani pushed a commit to Rida-Hamadani/mathlib4 that referenced this pull request Jun 24, 2025
callesonne pushed a commit to callesonne/mathlib4 that referenced this pull request Jul 24, 2025
…ro.map'` (leanprover-community#25660)

factored out of leanprover-community#22420




Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
callesonne pushed a commit to callesonne/mathlib4 that referenced this pull request Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). t-algebra Algebra (groups, rings, fields, etc) t-order Order theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants