-
Notifications
You must be signed in to change notification settings - Fork 49
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
adding domain restrictions and compact convergence #311
Conversation
Hi @zstone1 thank you for your contribution. At first glance, it is interesting and I have many remarks to make but I am very short in time during this period of the year. Just so you know, your restriction mechanism is akin to the one used in group theory You might also be interested in PR #224 |
Ah, thanks for the heads up about the integral PR. And no worries on time. I'd love to hear your thoughts when you get to it. |
Hi, @zstone1 I have many remarks and questions about this PR, but I'll start "small": would you consider using function restriction like this one? Lines 46 to 48 in 0eaabe8
In your case, since you don't have |
Thanks for this, it's an interesting point. First of all, I did consider such restrictions, and I don't have a good reason to use dependent pairs over restriction functions. It looks like the restriction functions will fit better into the existing paradigm, so I'm happy to make that change. It should be quite straightforward. On the other hand, I believe the "exploded" topology has the advantage of using the same filter everywhere. The only way I could figure out to use that
But then, for defining convergence over a family of sets, we'd need
Now we've got different filters for each set. So I can't really use the nice
as clean as possible. This also should prevent having to sprinkle in excess restrictions at application time. That being said, in another draft PR I just posted, I prove that geometric series converge compactly. I ended up using Does this explain my reasoning clearly? If I've missed something, please let me know. I'd love to simplify the PR. |
I agree that restrictions using dependent types might not be the most usable in general, though it could sometimes prove useful. When one stays with topology and more generally non algebraic structures, they might be ok (even if one has to pay the price of going back and forth a type and its subtype, it could be manageable). When one enters the realm of algebra, the predicate must satisfy more structure. So it's ok to keep them as a side tool, provided the theory is done once and applied to the other. About changing the topology on spaces of function, while it is unavoidable for the pointwise one, maybe the best strategy would be to change the topology on the domain using Definition restrict_type U (A : set U) := U.
Notation "U `\_ A" := (restrict_type U A) : type_scope. Then, filters on |
I remember trying something like that, but gave up. The uniform topology for functions doesn't use a topology on the domain; it's just a |
Ah right, I understand the problem, I think this could be done by adding some machinery that try to detect a restriction of a domain for the product topology.... |
Then I guess a solution would be to have a type |
Ok, that's quite reasonable. I've updated the proofs with the new syntax, as well as the docs. All this raises a (possibly out of scope) question. Should |
There is maybe a need for one more pass of linting. |
Ok, three things done:
Are there any other blockers for merging this? |
I tried to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zstone1 sorry for taking so much time to review. Please ask if something is unclear about my review.
theories/classical_sets.v
Outdated
Lemma bigcup_setU1 {T U : choiceType} (F : T -> set U) (x : T) (X : {fset T}) : | ||
\bigcup_(i in [set j | j \in x |` X]%fset) F i = | ||
F x `|` \bigcup_(i in [set j | j \in X]) F i. | ||
Proof. | ||
rewrite eqEsubset; split => [u|u [?|[/= t ? ?]]]. | ||
- by move=> [/= t /fset1UP [->| ?] ?]; [left|right; exists t]. | ||
- by exists x => //; apply/fset1UP; left. | ||
- by exists t => //; apply/fset1UP; right. | ||
Qed. | ||
|
||
Lemma bigcap_setU1 {T U : choiceType} (F : T -> set U) (x : T) (X : {fset T}) : | ||
\bigcap_(i in [set j | j \in x |` X]%fset) F i = | ||
F x `&` \bigcap_(i in [set j | j \in X]) F i. | ||
Proof. | ||
rewrite eqEsubset; split => [u |u [/= Fx ]] IFu. | ||
- split. | ||
+ by move/(_ x):IFu => /=; apply; apply/fset1UP; left. | ||
+ by move=> y yX; move/(_ y):IFu => /=; apply; apply/fset1UP; right. | ||
- by move=> y /= /fset1UP [->| yX] //; apply IFu. | ||
Qed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to have the bigcupD1
and bigcapD1
as in mathcomp bigD1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, although I would prefer to do it as a separate pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also missed them in another PR, hence PR #409
Ah, those notations suggestions are a nice improvement. I will address these issues this week. Separately, I had a realization that I can define |
Alright, I believe I've updated all the issues you identified. Also, using the weak topology of the restriction map has saved saved nearly 300 lines, and removed many of the awkward internal lemmas, such as all the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I'm going to make a pass on this one next week.
@zstone1 please never merge master into a PR, use rebase instead with squashing when necessary. |
Just wanted to check the status of this diff. Is there anything I can do here? |
I am back from vacation, I will attend this matter asap now. |
@zstone1 I pushed some refactorings in the branch |
Yes, do whatever you need. |
Sorry, when the remote branch is |
EDIT by Cyril: reopened as PR #462
With an eye towards more interesting complex analysis, the topology of compact convergence is missing from the topologies defined here. So I've added it, in a slightly roundabout way.
Summary
The main issue is that if A is a compact set in U, there's no nice way to define a function from (A -> V). While I could use some dependent pairs to turn A into a type, it's going to interfere with differentiability definitions. The whole system is really built around function from R (or C). Turns out this is quite solvable.
The approach I'm using is to build a quotient like topology on (U -> V) that's effectively the same as the one I'd want for (A -> V). In particular, convergence depends on the
A
portion of functions. The main downside of this approach is that the topology is not hausdorff. The following result (proved in the PR), I expect to be good enough in practice.Next, I define a topology for convergence on a family of sets in terms of the supremum topology (thanks to whoever wrote that! Big time saver). There's a dependent pair here, but it's largely under the hood. One of the key facts for complex analysis in practice is that it's enough to prove convergence on squares. I prove a general form of this fact about finite coverings.
Then finally I define the topology I care about.
A ~cc~> V
.Points of interest
Is the way I'm using these structures make sense? I've never really worked with this kind structure packing stuff before, so I'm just making it up as I go along.
Is the notation that I've introduced reasonable? For these non-canonical structures, I'm introducing a notation of "standard" uniform convergence
~~>
, restricted uniform convergence~~>_(A)
. And lastly, uniform convergence for a family as~fam~>
.The proof techniques are... a bit sloppy sometimes. Like I need to do an induction with a
\'bigcup
over a finite set. I do some nasty casing, and an explicit call tofinSet_rect
. Something seems wrong with this.In terms of axioms, I really need membership of
A
to be decidable. Seems like deciding stuff withasbool
is the way to go, just want to be sure I'm following the convention here.Naming/style conventions. Not all of the names I've chosen are reasonable. Suggestions are quite welcome.
There are lots of helper lemmas that are not really intended for use outside these proofs. Is there a nice way to indicate those?
Next steps
arzela ascoli is for compact convergence would be nice. Separately, there is some complex analysis stuff to do. Like show that the geometric series converges compactly on the unit ball.