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

Homeomorphism example #39

Merged
merged 4 commits into from
Jun 24, 2022
Merged

Homeomorphism example #39

merged 4 commits into from
Jun 24, 2022

Conversation

Columbus240
Copy link
Collaborator

@Columbus240 Columbus240 commented Feb 7, 2022

Sample proof, that unit sphere is homeomorphic to a unit interval with glued ends.

TODO:

  • Make CI happy with 8.12
  • Decide whether to keep supporting 8.10 & 8.11
  • Possibly move examples to a separate subdirectory.
  • Generalize to n-spheres using suspension.
  • Rebase it onto master and squash/split commits

Copied from #36.

@Columbus240
Copy link
Collaborator Author

Maybe we should consider creating a separate directory for examples – since it would inevitably require supplementary lemmas unrelated to topology, that have a little value outside it. Among real number lemmas above, perhaps, only sin x < x is useful, so I submitted it to the standard library - see coq/coq#15599.

Sounds reasonable to me.

@stop-cran
Copy link
Collaborator

stop-cran commented Feb 7, 2022

The reference asin was not found in the current environment.

Looks like asin was not defined in versions 8.11 and 8.10.

@Columbus240
Copy link
Collaborator Author

We could drop support to 8.10 & 8.11 if we want.

I looked more closely over your work. We could avoid defining the function from S¹ to [0,1] explicitly, by using the theorem that any continuous function from a compact to a Hausdorff space is an embedding (a homeomorphism onto its image). Because the function f_inv : [0,1]/{0,1} → S¹ is such a function, we can spare ourselves the technical details of the inverse map.
Also, we can simplify the definition of f_inv as

Definition circle_cover (t : RTop) : ProductTopology2 RTop RTop :=
  (cos (2*PI*t), sin (2*PI*t)).

Axiom circle_cover_image : forall t, In S1_Ensemble (circle_cover t).

Axiom f_inv_helper : forall (x y : UnitInterval) :
  SpaceAdjunction (Couple U0 U1) x y ->
  (fun x => exist _ (circle_cover (subspace_inc _ x)) (circle_cover_image _)) x =
  (fun x => exist _ (circle_cover (subspace_inc _ x)) (circle_cover_image _)) y.

Definition f_inv : ClosedUnitInterval -> S1 :=
  induced_function
    (fun x => exist _ (circle_cover (subspace_inc _ x)) _)
    (SpaceAdjunction_equivalence _) f_inv_helper.

Using some (new) lemmas about the properties of induced_function, we can reduce the length of the proofs and remove technical details, by staying "more conceptual".

@Columbus240
Copy link
Collaborator Author

Columbus240 commented Feb 7, 2022

I am so free and push some changes, implementing the above sketch.
Above I claimed

We could avoid defining the function from S¹ to [0,1] explicitly, by using the theorem …

But this is wrong. For surjectivity we still need to do define this function. At least we can avoid concerning ourselves with continuity of that function, or we could define the function only inside the proof.

The largest proofs are currently circle_cover_inj, circle_cover_preimage (less so) and f_inv_bijective. A lot of time they spend shuffling real numbers around.
Erm, there are some redundancies in a proof (I pose both PI > 0 and PI <> 0) and the commit a18aac7 should not be in this branch.

@Columbus240
Copy link
Collaborator Author

Columbus240 commented Feb 12, 2022

The theorems cos_inj and sin_inj of the stdlib were only added in coq/coq@aa99264, which is part of v8.12. If we wanted this branch to be compatible with v8.10 and v8.11 we would need to add the theorems to our library ourselves or get them from another dependency.
I don't think either of these things is worth it and propose removing support for v8.10 and v8.11. Because I don't know of any project that makes use of this library, I think it's ok to do so. Dropping support for v8.10 would also allow us to fix the deprecated-ident-entry warnings of v8.13 and upwards (see #17).

@Columbus240 Columbus240 force-pushed the homeomorphism-example branch from 132efb0 to b2bcbf6 Compare February 12, 2022 20:14
@stop-cran
Copy link
Collaborator

@Columbus240 I agree to remove support for v8.10 and v8.11, because apart from the last issue, we have missing definition of asin and related lemmas.

@Columbus240
Copy link
Collaborator Author

Ok, then I will make a new release and then drop support in master.
You may have seen already: I pushed my previous notes on the product of Ensembles to master.

@Columbus240 Columbus240 force-pushed the homeomorphism-example branch from 845780d to 282f18e Compare June 24, 2022 20:26
Only since v8.13 is it possible to use `apply` on multiple hypotheses
simultaneously.

The functions `curry` and `uncurry` only exist since Coq v8.13 and were
earlier called `prod_uncurry` and `prod_curry`. But the latter got
deprecated. To ensure compatibility with Coq v8.12 (and simplifying the
code a little when using `f1` but complicating the def. of `f1`) the
definition of `f1` is changed a little.

This theorem is only available in Coq v8.13 and later. To stay
compatible with Coq v8.12, this theorem has to be avoided.
@Columbus240
Copy link
Collaborator Author

I extracted those lemmas out of Examples/S1.v which I found worthy. If we did more work involving the reals or trigonometry, we might need the other ones too, but that can be done as necessary. The rest of the commits I squashed down.
I moved the file into a separate folder, as we discussed.
I'll merge this, as it is now.

@Columbus240 Columbus240 force-pushed the homeomorphism-example branch from 282f18e to 27dca7f Compare June 24, 2022 20:35
@Columbus240 Columbus240 merged commit f784257 into master Jun 24, 2022
@Columbus240 Columbus240 deleted the homeomorphism-example branch June 24, 2022 20:35
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.

2 participants