-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[Merged by Bors] - feat(Algebra/Order): LinearEquiv version of toLex/ofLex
#27711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
494d834
92b50a0
3f414a0
5a400ed
3ef1834
4e50811
e13603f
3b3f5cb
aef0962
d529836
2116674
7843b71
242bb00
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,47 @@ | ||||||
| /- | ||||||
| Copyright (c) 2025 Weiyi Wang. All rights reserved. | ||||||
| Released under Apache 2.0 license as described in the file LICENSE. | ||||||
| Authors: Weiyi Wang | ||||||
| -/ | ||||||
| import Mathlib.Algebra.Group.Equiv.Defs | ||||||
| import Mathlib.Algebra.Order.Group.Synonym | ||||||
|
|
||||||
| /-! | ||||||
| # Add/Mul equivalence for order type synonyms | ||||||
| -/ | ||||||
|
|
||||||
| variable (α : Type*) | ||||||
|
|
||||||
| /-- `toLex` as a `MulEquiv`. -/ | ||||||
| @[to_additive "`toLex` as a `AddEquiv`."] | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This produces
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For things which ""are clearly projections"", the name tends to come last. At any rate,
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Got it. I have applied the change and removed
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Welp, the simp normal form checker rejected this
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ugh, I'm so sorry my suggestion depends on #21031 |
||||||
| def toLexMulEquiv [Mul α] : α ≃* Lex α where | ||||||
| __ := toLex | ||||||
wwylele marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| map_mul' _ _ := by simp | ||||||
|
|
||||||
| @[to_additive (attr := simp)] | ||||||
| theorem coe_toLexMulEquiv [Mul α] : ⇑(toLexMulEquiv α) = toLex := rfl | ||||||
|
|
||||||
| @[to_additive (attr := simp)] | ||||||
| theorem coe_symm_toLexMulEquiv [Mul α] : ⇑(toLexMulEquiv α).symm = ofLex := rfl | ||||||
|
|
||||||
| /-- `ofLex` as a `MulEquiv`. -/ | ||||||
| @[to_additive "`ofLex` as a `AddEquiv`."] | ||||||
| def ofLexMulEquiv [Mul α] : Lex α ≃* α where | ||||||
| __ := ofLex | ||||||
| map_mul' _ _ := by simp | ||||||
|
|
||||||
| @[to_additive (attr := simp)] | ||||||
| theorem coe_ofLexMulEquiv [Mul α] : ⇑(ofLexMulEquiv α) = ofLex := rfl | ||||||
|
|
||||||
| @[to_additive (attr := simp)] | ||||||
| theorem coe_symm_ofLexMulEquiv [Mul α] : ⇑(ofLexMulEquiv α).symm = toLex := rfl | ||||||
|
|
||||||
| @[to_additive (attr := simp)] | ||||||
| lemma toEquiv_toLexMulEquiv [Mul α] : | ||||||
| (toLexMulEquiv α : α ≃ Lex α) = toLex := | ||||||
| rfl | ||||||
|
|
||||||
| @[to_additive (attr := simp)] | ||||||
| lemma toEquiv_symm_toLexMulEquiv [Mul α] : | ||||||
| ((toLexMulEquiv α).symm : Lex α ≃ α) = ofLex := | ||||||
wwylele marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||
| rfl | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| /- | ||
| Copyright (c) 2025 Weiyi Wang. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Weiyi Wang | ||
| -/ | ||
| import Mathlib.Algebra.Module.Equiv.Basic | ||
| import Mathlib.Algebra.Order.Group.Equiv | ||
| import Mathlib.Algebra.Order.Module.Synonym | ||
|
|
||
| /-! | ||
| # Linear equivalence for order type synonyms | ||
| -/ | ||
|
|
||
| variable (α β : Type*) | ||
| variable [Semiring α] [AddCommMonoid β] [Module α β] | ||
|
|
||
| /-- `toLex` as a linear equivalence -/ | ||
| def toLexLinearEquiv : β ≃ₗ[α] Lex β := (toLexAddEquiv β).toLinearEquiv toLex_smul | ||
|
|
||
| @[simp] | ||
| theorem coe_toLexLinearEquiv : ⇑(toLexLinearEquiv α β) = toLex := rfl | ||
|
|
||
| @[simp] | ||
| theorem coe_symm_toLexLinearEquiv : ⇑(toLexLinearEquiv α β).symm = ofLex := rfl | ||
|
|
||
| /-- `ofLex` as a linear equivalence -/ | ||
| def ofLexLinearEquiv : Lex β ≃ₗ[α] β := (ofLexAddEquiv β).toLinearEquiv ofLex_smul | ||
|
|
||
| @[simp] | ||
| theorem coe_ofLexLinearEquiv : ⇑(ofLexLinearEquiv α β) = ofLex := rfl | ||
|
|
||
| @[simp] | ||
| theorem coe_symm_ofLexLinearEquiv : ⇑(ofLexLinearEquiv α β).symm = toLex := rfl | ||
wwylele marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Uh oh!
There was an error while loading. Please reload this page.