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(NumberTheory): characterize elliptic divisibility sequences #13057

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

alreadydone
Copy link
Contributor

@alreadydone alreadydone commented May 20, 2024

Main results:

  • Every normEDS is an elliptic divisibility sequence (EDS). The key proof is rel₄_of_anti_oddRec_evenRec, based on my original argument first published on MathSE

  • Conversely, every EDS is equal to some normEDS (assuming that the first two terms are not zero divisors)


Open in Gitpod

@alreadydone alreadydone added WIP Work in progress t-number-theory Number theory (also use t-algebra or t-analysis to specialize) t-algebra Algebra (groups, rings, fields, etc) labels May 20, 2024
@alreadydone alreadydone requested a review from Multramate May 20, 2024 09:48
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) and removed blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) labels May 22, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 22, 2024
@alreadydone alreadydone added awaiting-review and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) WIP Work in progress labels May 23, 2024
Comment on lines +1132 to +1168
/-- The expression `W(m+1)W(m)W(m-1)/W₃W₂` for a normalised EDS. -/
def redInvarDenom : R :=
letI C := complEDS b c d
letI W := normEDS b c d
letI r₆ := normEDS b c d 5 - d ^ 2 -- W₆/W₃W₂
if m % 6 = 0 then r₆ * C 6 (m / 6) * W (m + 1) * W (m - 1) else
if m % 6 = 1 then r₆ * C 6 ((m - 1) / 6) * W (m + 1) * W m else
if m % 6 = 5 then r₆ * C 6 ((m + 1) / 6) * W m * W (m - 1) else
if m % 6 = 2 then C 3 ((m + 1) / 3) * C 2 (m / 2) * W (m - 1) else
if m % 6 = 4 then C 3 ((m - 1) / 3) * C 2 (m / 2) * W (m + 1) else
if m % 6 = 3 then C 3 (m / 3) * C 2 ((m - 1) / 2) * W (m + 1) else 0

lemma invarDenom_eq_redInvarDenom_mul :
invarDenom (normEDS b c d) 1 m = redInvarDenom b c d m * b * c := by
have h6 : (6 : ℤ) ≠ 0 := by decide
have h3 : (3 : ℤ) ≠ 0 := by decide
have hd k m dvd eq :=
(Int.dvd_iff_emod_eq_zero k m).mpr ((@Int.emod_emod_of_dvd m k 6 dvd).symm.trans eq)
have hd2 {m} := hd 2 m ⟨3, rfl⟩
have hd3 {m} := hd 3 m ⟨2, rfl⟩
have mul_eq := @normEDS_mul_complEDS_div _ _ b c d
rw [invarDenom, redInvarDenom]; split_ifs with h h h h h h
· rw [← mul_eq _ h6 _ (Int.dvd_of_emod_eq_zero h), normEDS_six_eq_mul]; ring
· rw [← mul_eq _ h6 _ (Int.dvd_sub_of_emod_eq h), normEDS_six_eq_mul]; ring
· rw [show m + 1 = m + 6 - 5 by abel, ← mul_eq _ h6, normEDS_six_eq_mul]; ring
exact Int.dvd_sub_of_emod_eq (Int.add_emod_self.trans h)
on_goal 1 => rw [← mul_eq _ h3 _ (hd3 <| by simp [h, Int.add_emod]),
← mul_eq _ two_ne_zero m (hd2 <| by simp [h])]
on_goal 2 => rw [← mul_eq _ h3 (m - 1) (hd3 <| by simp [h, Int.sub_emod]),
← mul_eq _ two_ne_zero m (hd2 <| by simp [h])]
on_goal 3 => rw [← mul_eq _ h3 m (hd3 <| by simp [h]),
← mul_eq _ two_ne_zero (m - 1) (hd2 <| by simp [h, Int.sub_emod])]
on_goal 4 =>
have h0 := Int.emod_nonneg m h6
have lt := Int.emod_lt_of_pos m (show 0 < 6 by decide)
interval_cases m % 6 <;> contradiction
all_goals rw [normEDS_three, normEDS_two]; ring
Copy link
Contributor Author

@alreadydone alreadydone May 23, 2024

Choose a reason for hiding this comment

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

The proof is a bit cumbersome; cf. this Zulip message.

@Multramate
Copy link
Collaborator

I think this is a massive PR, especially because it's a long argument. Can you try to split it to smaller self-contained chunks, so it's easier to review?

Copy link
Member

@kbuzzard kbuzzard left a comment

Choose a reason for hiding this comment

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

This is very long. The first 200 lines of the main file look fine but I didn't look at the rest yet.

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) label May 24, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label May 24, 2024
Comment on lines +1110 to +1111
def invarNumAux : R :=
preNormEDS (b ^ 4) c d (m - 2) * preNormEDS (b ^ 4) c d (m + 1) ^ 2 * if Even m then 1 else b
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file is getting long so I think I'll split everything about invar, invarNumAux, redInvar etc. into another file Invar. The compl stuff can't be split because they're used to show normEDS IsDivSequence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked-by-other-PR This PR depends on another PR to Mathlib (this label is automatically managed by a bot) merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) t-algebra Algebra (groups, rings, fields, etc) t-number-theory Number theory (also use t-algebra or t-analysis to specialize)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants