Skip to content

Conversation

@affeldt-aist
Copy link
Member

@affeldt-aist affeldt-aist commented Nov 25, 2025

Motivation for this change

fixes #1775

define isolated points and properties and refine a lemma about closure

@IshiguroYoshihiro

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

@affeldt-aist affeldt-aist added this to the 1.15.0 milestone Nov 25, 2025
@affeldt-aist affeldt-aist added the enhancement ✨ This issue/PR is about adding new features enhancing the library label Nov 25, 2025
@affeldt-aist affeldt-aist requested review from t6s and zstone1 November 25, 2025 03:59
@affeldt-aist
Copy link
Member Author

The last commit adds a proof that there is a countable number of isolated points, this is need for a proof by @IshiguroYoshihiro

@affeldt-aist
Copy link
Member Author

affeldt-aist commented Dec 9, 2025

It looks like the introduction of isolated points allowed for a strict improvement of the lemma closure_isolated_limit_point since it replaces a union with a disjoint union and we also have a used for the new lemma countable_isolated (work by @IshiguroYoshihiro ). Do you (@zstone1 , @t6s ) think we are missing something?
(Also, CI errors are unrelated.)

apply: dense_rat; last by apply: ball_open; rewrite divr_gt0.
by exists x; apply: ballxx; rewrite divr_gt0.
have [q /andP[rq qr]] : exists q, r / 4 < ratr q < r / 2.
have : ball (r / 3) (r / 12) `&` range ratr !=set0.
Copy link
Member

Choose a reason for hiding this comment

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

I like these magic numbers. Looks like optimal choices.

Lemma card_rat : [set: rat] #= [set: nat].
Proof. exact/eq_card_nat/infinite_rat/countableP. Qed.

Lemma infinite_prod_rat : infinite_set [set: rat * rat].
Copy link
Member

Choose a reason for hiding this comment

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

infinite_prod_rat and infinite_prod_nat can be unified by adding following lemmas:

Lemma finite_setX_or T T' (A : set T) (B : set T') :
  finite_set (A `*` B) -> finite_set A \/ finite_set B.
Proof.
have [->|/set0P[a Aa]] := eqVneq A set0; first by left.
have: [set a] `*` B `<=` A `*` B by move=> x/= [] -> ?; split.
move/sub_finite_set/[apply]/(finite_image snd).
rewrite (_ : _ @` _ = B); first by right.
apply/seteqP; split=> b /=.
  by case=> -[] /= ? ? [] ? ? <-.
by move=> ?; exists (a, b).
Qed.

Lemma infinite_setX {T} {A B : set T} :
  infinite_set A -> infinite_set B -> infinite_set (A `*` B).
Proof.
by move=> iA iB; have /not_orP := conj iA iB; exact/contra_not/finite_setX_or.
Qed.

Copy link
Member

@t6s t6s left a comment

Choose a reason for hiding this comment

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

Looks good, modulo the refactoring comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ✨ This issue/PR is about adding new features enhancing the library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

closure_limit_point can also be expressed as a disjoint union

2 participants