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

Realfun and subspaces #752

Merged
merged 15 commits into from
Oct 6, 2022
Merged

Realfun and subspaces #752

merged 15 commits into from
Oct 6, 2022

Conversation

zstone1
Copy link
Contributor

@zstone1 zstone1 commented Sep 23, 2022

Motivation for this change

I need to deal with monotone, continuous R->R functions in homotopy theory. Thankfully, much of it already exists. However, when this was written we didn't have a nice way to talk about behavior at the endpoints of intervals. With the subspace topology infrastructure, we can clean this all up. All changed theorem have been improved:

  • Many conditions weaken from {in I, continuous f} to {within I, continuous f}. The problem is { in [a,b], continuous f} relies on f being continuous from the left at a. That's bad news, because it depends on values outside of [a,b]. Instead {within I, continuous f} truly doesn't care about values outside of I.
  • Many of the results strengthen from {in ]a, b[, continuous f} to {within [a,b], continuous f}, which is slightly stronger by controlling the "from-the-right" continuity at a, and dually at b. The original result can be recovered with a continuous_subspaceW + open_continuous_subspace.

Several of the theorems that strengthen the result from {in ]a, b[, continuous f} to {within [a,b], continuous f} are pretty tricky. The endpoints require a lot of annoying interval arithmetic to get right, but I did end up finding a way.

Things done/to do
  • added corresponding entries in CHANGELOG_UNRELEASED.md
    (do not edit former entries, only append new ones, be careful:
    merge and rebase have a tendency to mess up CHANGELOG_UNRELEASED.md)
  • [] added corresponding documentation in the headers
Automatic note to reviewers

Read this Checklist and put a milestone if possible.

CHANGELOG_UNRELEASED.md Outdated Show resolved Hide resolved
theories/realfun.v Outdated Show resolved Hide resolved
Co-authored-by: Cyril Cohen <CohenCyril@users.noreply.github.com>
theories/realfun.v Outdated Show resolved Hide resolved
rewrite eqEsubset; split => z; rewrite /= itvxx.
by move=> ?; apply/eqP.
by move=>/eqP.
- by move=> ->; rewrite set_itv1; exact: continuous_subspace1.
Copy link
Member

Choose a reason for hiding this comment

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

I observe that when performing the rewrite the continuous notation is such that the goal is displayed as continuous f. Hasn't something changed in an undesirable way about this notation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sadly I don't think {within A, continuous f} ever printed correctly. There are a handful of other notations in topology.v, like pointwise convergence. that have the same problem. Coq is not picking "specialized" notation. Surprisingly we don't have an open issue for fixing this. I'll add one.

Copy link
Member

Choose a reason for hiding this comment

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

Could we achieve this with a specialised notation which detects subspace_... canonicals?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Commit b4230 seems like a nice step in the right direction. For the purpose of completing this PR, I'm satisfied with the current improvement. If you agree, we should continue to discuss in #758. I'm quite interested in how you'd build notations that depend on the presence of canonicals.

Copy link
Member

Choose a reason for hiding this comment

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

Should we try to address the other notation problems mentioned by issue #758 as part of this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've updated with corresponding change for the other notations.

Copy link
Member

Choose a reason for hiding this comment

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

It means that issue #758 is (mostly) fixed?

Copy link
Contributor Author

@zstone1 zstone1 Oct 6, 2022

Choose a reason for hiding this comment

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

Yeah, seems like it. The approach won't work for all notations, but it does work fine for swapping topologies. Once this is merged I'll close that ticket.

theories/topology.v Outdated Show resolved Hide resolved
Copy link
Member

@affeldt-aist affeldt-aist left a comment

Choose a reason for hiding this comment

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

More general lemmas and more stable notations, this looks like a good improvement to me.

@zstone1 zstone1 merged commit 9cc2753 into math-comp:master Oct 6, 2022
@affeldt-aist affeldt-aist mentioned this pull request Mar 13, 2023
2 tasks
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