Skip to content

[Merged by Bors] - feat(RingTheory/Radical): Radical of an element in a unique factorization normalization monoid#14873

Closed
seewoo5 wants to merge 12 commits intomasterfrom
feature/element-radical
Closed

[Merged by Bors] - feat(RingTheory/Radical): Radical of an element in a unique factorization normalization monoid#14873
seewoo5 wants to merge 12 commits intomasterfrom
feature/element-radical

Conversation

@seewoo5
Copy link
Copy Markdown
Collaborator

@seewoo5 seewoo5 commented Jul 18, 2024

For a unique factorization normalization monoid, define a radical of an element as a product of normalized prime factors (without duplication).


This is part of our project to port Mason-Stothers Theorem in mathlib @jcpaik. You can find more theorems that will be added in future PRs here.

Open in Gitpod

@seewoo5 seewoo5 added the t-algebra Algebra (groups, rings, fields, etc) label Jul 18, 2024
@seewoo5 seewoo5 self-assigned this Jul 18, 2024
@github-actions github-actions bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Jul 18, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 18, 2024

PR summary 0963a13d95

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.RingTheory.Radical 1012

Declarations diff

+ primeFactors
+ primeFactors_pow
+ radical
+ radical_dvd_self
+ radical_eq_of_associated
+ radical_mul_unit
+ radical_of_prime
+ radical_one_eq
+ radical_pow
+ radical_pow_of_prime
+ radical_unit_eq_one
+ radical_unit_mul
+ radical_zero_eq

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.

@seewoo5 seewoo5 changed the title feat(RingTheory/Radical): Radical of an element in unique factorization normalization monoid feat(RingTheory/Radical): Radical of an element in a unique factorization normalization monoid Jul 18, 2024
Copy link
Copy Markdown
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Thanks for your PR!

theorem radical_zero_eq_one : radical (0 : α) = 1 := by
rw [radical, primeFactors, normalizedFactors_zero, Multiset.toFinset_zero, Finset.prod_empty]

theorem radical_one_eq_one : radical (1 : α) = 1 := by
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
theorem radical_one_eq_one : radical (1 : α) = 1 := by
@[simp]
theorem radical_one : radical (1 : α) = 1 := by

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should I also change radical_unit_eq_one to radical_unit_eq? I wonder what is the rule behind the naming (if the simp reduction is 'trivial', drop the right hand side?).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Another minor question is: do we want radical_(zero|one)_eq or radical_(zero|one)?

@jcommelin jcommelin added the awaiting-author A reviewer has asked the author a question or requested changes. label Jul 19, 2024
@jcpaik jcpaik removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jul 22, 2024
@jcpaik jcpaik requested a review from jcommelin July 22, 2024 01:01
@jcpaik jcpaik self-assigned this Jul 22, 2024
@seewoo5
Copy link
Copy Markdown
Collaborator Author

seewoo5 commented Jul 28, 2024

@jcommelin Could you check the updates? Thanks!

rw [primeFactors, Multiset.toFinset_val]
apply Multiset.dedup_le

theorem radical_prime {a : α} (ha : Prime a) : radical a = normalize a := by
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
theorem radical_prime {a : α} (ha : Prime a) : radical a = normalize a := by
theorem radical_of_prime {a : α} (ha : Prime a) : radical a = normalize a := by

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This holds for every square-free element right? How hard is it to generalise this? same below.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I believe so, but not sure how hard it is. For commutative rings, coprime induction with additional theorems in #15331 might work (assuming that we have multiplicativity theorem for the normalization map).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Now that I think of it more, I think it follows easily from squarefree_iff_nodup_normalizedFactors.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Should I prove it in this PR, or make another one later? FYI these are mainly for porting the formalization of Mason-Stothers theorem and we don't need the generalization.

@seewoo5
Copy link
Copy Markdown
Collaborator Author

seewoo5 commented Aug 13, 2024

@jcommelin @erdOne Let me know if any updates are needed!

Copy link
Copy Markdown
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

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

Sorry for the late response. I was away on holidays.

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Aug 14, 2024
mathlib-bors bot pushed a commit that referenced this pull request Aug 14, 2024
…tion normalization monoid (#14873)

For a unique factorization normalization monoid, define a radical of an element as a product of normalized prime factors (without duplication).



Co-authored-by: Jineon Baek <jcpaik@jcpaik-desktop.local>
Co-authored-by: Johan Commelin <johan@commelin.net>
@@ -0,0 +1,104 @@
/-
Copyright (c) 2024 Jineon Back and Seewoo Lee. All rights reserved.
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
Copyright (c) 2024 Jineon Back and Seewoo Lee. All rights reserved.
Copyright (c) 2024 Jineon Baek, Seewoo Lee. All rights reserved.

Radical of an element `a` in a unique factorization monoid is the product of
the prime factors of `a`.
-/
def radical (a : M) : M :=
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.

Don't you think this is too generic of a name to be put in the root namespace?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@YaelDillies I agree, do you have any suggestions? I was thinking something like element_radical. Maybe I should also change the name of the file Radical.lean accordingly?

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.

The defs you're using are in the UniqueFactorizationDomain namespace. m not a huge fan of it (why not just UFD or RingTheory?) but it would be an obvious statu quo choice

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I may not understand completely but moving everything to the RingTheory/UniqueFactorizationDomain.lean would be okay?

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.

No, I'm talking about the namespace, not the file!

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Aug 14, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(RingTheory/Radical): Radical of an element in a unique factorization normalization monoid [Merged by Bors] - feat(RingTheory/Radical): Radical of an element in a unique factorization normalization monoid Aug 14, 2024
@mathlib-bors mathlib-bors bot closed this Aug 14, 2024
@mathlib-bors mathlib-bors bot deleted the feature/element-radical branch August 14, 2024 13:56
@jcommelin
Copy link
Copy Markdown
Member

@seewoo5 Could you please create a follow-up PR implementing the comments by @YaelDillies ?

YaelDillies pushed a commit that referenced this pull request Aug 14, 2024
…tion normalization monoid (#14873)

For a unique factorization normalization monoid, define a radical of an element as a product of normalized prime factors (without duplication).



Co-authored-by: Jineon Baek <jcpaik@jcpaik-desktop.local>
Co-authored-by: Johan Commelin <johan@commelin.net>
mathlib-bors bot pushed a commit that referenced this pull request Aug 16, 2024
…15826)

Restrict scope of radical as suggested in [this comment](#14873 (comment)) by @YaelDillies.
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 9, 2024
…tion normalization monoid (#14873)

For a unique factorization normalization monoid, define a radical of an element as a product of normalized prime factors (without duplication).



Co-authored-by: Jineon Baek <jcpaik@jcpaik-desktop.local>
Co-authored-by: Johan Commelin <johan@commelin.net>
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 9, 2024
…15826)

Restrict scope of radical as suggested in [this comment](#14873 (comment)) by @YaelDillies.
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 9, 2024
…tion normalization monoid (#14873)

For a unique factorization normalization monoid, define a radical of an element as a product of normalized prime factors (without duplication).



Co-authored-by: Jineon Baek <jcpaik@jcpaik-desktop.local>
Co-authored-by: Johan Commelin <johan@commelin.net>
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 9, 2024
…15826)

Restrict scope of radical as suggested in [this comment](#14873 (comment)) by @YaelDillies.
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 12, 2024
…tion normalization monoid (#14873)

For a unique factorization normalization monoid, define a radical of an element as a product of normalized prime factors (without duplication).



Co-authored-by: Jineon Baek <jcpaik@jcpaik-desktop.local>
Co-authored-by: Johan Commelin <johan@commelin.net>
bjoernkjoshanssen pushed a commit that referenced this pull request Sep 12, 2024
…15826)

Restrict scope of radical as suggested in [this comment](#14873 (comment)) by @YaelDillies.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! ready-to-merge This PR has been sent to bors. t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants