Skip to content
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

feat(ring_theory/unique_factorization_domain): API for coprime, coprime factor of a power is a power #3984

Closed
wants to merge 14 commits into from

Conversation

paulvanwamelen
Copy link
Collaborator


Main result is is_pow_of_coprime. I want this for a proof of the n=4 case of fermat.

@paulvanwamelen paulvanwamelen added the awaiting-review The author would like community review of the PR label Aug 30, 2020
@awainverse
Copy link
Collaborator

I've been working on some related stuff at the branch mathlib:ufm. I was thinking that we would take gcd a b = 1 as the definition of coprime a b, but I'm not sure which is better. Yours is more general, but mine has nice properties in a general gcd_monoid, and they only coincide in a ufm.

src/algebra/associated.lean Outdated Show resolved Hide resolved
src/algebra/associated.lean Outdated Show resolved Hide resolved
src/algebra/associated.lean Outdated Show resolved Hide resolved
Comment on lines 568 to 569
def associates_coprime (a b : associates α) : Prop :=
∀ (p : associates α), prime p → p ∣ a → ¬ p ∣ b
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
def associates_coprime (a b : associates α) : Prop :=
∀ (p : associates α), prime p → p a → ¬ p b
def associates_coprime (a b : associates α) : Prop :=
∀ (p : associates α), prime p → p a → ¬ p b

When in Rome, do as the Romans do: you'll see that the lemmas around this all use instead of , and there is even an explicit theorem dvd_eq_le saying that ∣ = ≤ (not the other way round!)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This definition has to move, but when I do I'll keep this change in mind.

src/algebra/associated.lean Outdated Show resolved Hide resolved
Comment on lines 587 to 590
begin
intros p h₁ hb ha,
exact h _ h₁ ha hb
end
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
begin
intros p h₁ hb ha,
exact h _ h₁ ha hb
end
λ p h₁ hb ha, h p h₁ ha hb

src/algebra/group_with_zero_power.lean Outdated Show resolved Hide resolved
paulvanwamelen and others added 5 commits August 30, 2020 14:43
golf

Co-authored-by: Kenny Lau <kc_kennylau@yahoo.com.hk>
Co-authored-by: Kenny Lau <kc_kennylau@yahoo.com.hk>
Co-authored-by: Kenny Lau <kc_kennylau@yahoo.com.hk>
Co-authored-by: Kenny Lau <kc_kennylau@yahoo.com.hk>
Co-authored-by: Kenny Lau <kc_kennylau@yahoo.com.hk>
@kckennylau
Copy link
Collaborator

kckennylau commented Aug 30, 2020

If you use the "Files changed" tab, you can apply the changes in one commit instead of five.

@paulvanwamelen paulvanwamelen added WIP Work in progress and removed awaiting-review The author would like community review of the PR labels Aug 30, 2020
@paulvanwamelen paulvanwamelen added awaiting-review The author would like community review of the PR and removed WIP Work in progress labels Sep 3, 2020
@paulvanwamelen
Copy link
Collaborator Author

I'll open a new one with a clean commit that should be easier to review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants