Skip to content

Conversation

Tragicus
Copy link
Collaborator

@Tragicus Tragicus commented Aug 21, 2025

Motivation for this change

The divergence of the sum of the reciprocal of primes theorem, extracted from #1690 because it has been ready and sitting there for too long. We can add it to the famous list of formalized theorems.

Checklist
  • added corresponding entries in CHANGELOG_UNRELEASED.md
  • added corresponding documentation in the headers

Reference: How to document

Merge policy

As a rule of thumb:

  • PRs with several commits that make sense individually and that
    all compile are preferentially merged into master.
  • PRs with disorganized commits are very likely to be squash-rebased.
Reminder to reviewers

Definition monotonous d (T : porderType d) (pT : predType T) (A : pT) (f : T -> T) :=
{in A &, {mono f : x y / (x <= y)%O}} \/ {in A &, {mono f : x y /~ (x <= y)%O}}.

Lemma mono_ext f : {mono f : m n / (m <= n)%N} -> forall n, (n <= f n)%N.
Copy link
Member

Choose a reason for hiding this comment

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

There is maybe a better name for mono_ext.
The identifier does not show it is about natural numbers
or that the conclusion is leq; what does ext mean?
What about mono_leq?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh, my bad, these functions are called "inflationary", not something like "extensive". I feel like mono_leq is too general. Maybe something like mono_leq_infl?

[set n : 'I_N.+1 |all (fun p => p < prime_seq k) (primes n)]%SET.
Let G (k N : nat) := ~: P k N.

Fact cardPcardG k N : #|G k N| + #|P k N| = N.+1.
Copy link
Member

Choose a reason for hiding this comment

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

Fact cardPcardG -> Local Lemma cardPcardG or Let cardPcardG?
Since it does not appear in the changelog, I guess this is the intent.

by rewrite -[X in _ + _ = X]card_ord addn0 -cardsT => ->.
Qed.

Fact cardG (R : realType) (k N : nat) :
Copy link
Member

Choose a reason for hiding this comment

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

Fact cardG -> Local Lemma cardG or Let cardG?
(same as just above)

by rewrite ltnS -x2eqx3.
Qed.

Fact cardP (k : nat) :
Copy link
Member

Choose a reason for hiding this comment

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

Fact cardP -> Local Lemma cardP or Let cardP?
Since this one does not depend on any R : realType
(it was wrongly flagged as such in the previous commit),
it could maybe be in a different section, or maybe
appear before the other intermediate lemmas, to highlight its different nature.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I do not really see the point in putting it in a different section, it is the natural course of the proof of the theorem and it just so happens to not require a hypothesis about real numbers.

Copy link
Member

Choose a reason for hiding this comment

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

Moreover if this turns into a Let or a Local Lemma, that indeed justifies to keep it in the same section.

by rewrite -expnD addnA addnn.
Qed.

Theorem DivergenceSumInversePrimeNumbers (R : realType) :
Copy link
Member

Choose a reason for hiding this comment

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

DivergenceSumInversePrimeNumbers -> dvg_sum_inv_prime_seq?
because I think that we favor small letters and underscores
instead of caps and identifiers made up of other identifiers
appearing in the statement.

@Tragicus Tragicus mentioned this pull request Sep 18, 2025
2 tasks
@CohenCyril
Copy link
Member

LGTM after @affeldt-aist remarks have been applied.

LucasMalaizier and others added 7 commits September 18, 2025 16:23
Prime numbers sequence
Divergence of the sum of inverse of the prime numbers
Abel transformation (discrete and continuous)
First Tchebychev function majoration
@affeldt-aist affeldt-aist merged commit a645da6 into math-comp:master Sep 18, 2025
67 checks passed
hoheinzollern pushed a commit to hoheinzollern/analysis that referenced this pull request Sep 22, 2025
* Starting PNT Proof

Prime numbers sequence
Divergence of the sum of inverse of the prime numbers
Abel transformation (discrete and continuous)
First Tchebychev function majoration

---------

Co-authored-by: LucasMalaizier <lucasmalaizier@PCLucas>
Co-authored-by: Reynald Affeldt <[email protected]>
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.

3 participants