-
Notifications
You must be signed in to change notification settings - Fork 10
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
Restructure cardinals, finiteness and homeomorphisms #45
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Columbus240
force-pushed
the
cardinals
branch
from
September 16, 2023 14:07
efdb034
to
4c3c252
Compare
Columbus240
force-pushed
the
master
branch
2 times, most recently
from
September 16, 2023 14:55
9b5a677
to
12dd48f
Compare
Columbus240
force-pushed
the
cardinals
branch
2 times, most recently
from
September 16, 2023 16:17
515c142
to
443e6fb
Compare
Columbus240
force-pushed
the
cardinals
branch
2 times, most recently
from
October 15, 2023 08:12
7118d34
to
427ad66
Compare
Smaller changes: - Reorders and reduces the imports in some files. - In `_CoqProject`: re-enable the warnings about missing hint/instance localities - Add hint/instance localities where they were missing. Use `#[export]` if possible. - Changed some hint/instance localities to `#[export]`. This is a breaking change depending on the circumstances of the user code.
Having this definition will simplify the redefinition of homeomorphism. Using `inverse_map` in the def. of homeomorphism will make the proofs more conceptual (fewer hypotheses to juggle around), but this will need a lot of changes. It would make sense to use `inverse_map` in the definition of `invertible`, but there's a lot that would need to be changed. That's why I postpone doing so.
Rework definition of `homeomorphism`, `homeomorphic` and `topological_property`. First, use `Definition` and `exists` instead of `Inductive`. Second, for `topological_property` require the spaces to be `homeomorphic` instead of requiring a `homeomorphism` between them (using the `Proper` typeclass). The former facilitates proving these properties and the latter facilitates using proofs of `topological_property`, since in practice one rarely wants to know the explicit homeomorphism between two spaces if one only wants to transfer a topological property. Then use the typeclass `Equivalence` to state that `homeomorphic` is an equivalence relation. This will simplify proofs.
Use `inverse_map` throughout, instead of `bijective`. This makes it easier to re-use lemmas. Use `invertible` instead of `bijective` because it is a slightly stronger property. In particular `FiniteT` behaves a bit better with `invertible` than with `bijective`. Move the definition of `eq_cardinal` from Cardinals to FiniteTypes, because to do it the the other way around, some lemmas would need to be moved.
Moves the definition of `eq_cardinal` to Cardinals, where it belongs. But to allow this, the statements `countable_img_inj` and `FiniteT_cardinality` had to be moved to Countable and FiniteTypes respectively. In addition, `CountableT_cardinality` was removed, because `CountableT` could be redefined in terms of `le_cardinal`, making the lemma even more trivial. Also, removes the file InfiniteTypes, because it has become empty. The lemmas `Finite_as_lt_cardinal_ens` and `injective_finite_inverse_image` currently are in `FiniteTypes.v`, because their proofs use `FiniteT` in essential ways.
The files concerning cardinalities (`eq_cardinal` and `le_cardinal`) in general are rather large and would be easier to manage if they are split into multiple files. This also solves a "practical" problem: the statement of `CSB` could be formulated using `eq_cardinal`. But this is not possible if the file `Cardinals.v` depends on the file `CSB.v`. Another possibility would be, that `CSB` is carefully stated, that it uses definitions compatible with `Cardinals.v`. But this would break `Search`, or we'd need to re-state `CSB` in terms of `eq_cardinal` and `le_cardinal` in `Cardinals.v`.
To make git happy, the file `ZornsLemma/Cardinals.v` is not included in the previous commit. This way git can notice, that we moved `ZornsLemma/Cardinals.v` to `ZornsLemma/Cardinals/Cardinals.v`. Thus also `git blame` still works. But the previous commit does not build.
Removed the `types_comparable` in favor of `le_cardinal_total`, because both proved the same thing.
This moves everything deduced from `CSB` to `CSB.v`. Also changes the statement of `CountableT_is_FiniteT_or_countably_infinite` to be more fitting to the rest of the theory.
The lemma says "unbounded subsets of ℕ are countably infinite", which does not belong to the general discussion of cardinals. It is a bit hard to sort this lemma into the existing files, but CountableTypes.v seems to work best, because it already is concerned with `nat`. Also moves `Finite_as_lt_cardinal_ens` and `injective_finite_inverse_image` to CountableTypes.v, because they depend on `nat_unbounded_impl_countably_infinite`. This is not ideal. A bit problematic is `nat_minimal_element_property_dec` and `nat_minimal_element_property` which are not exactly proofs of `Classical_Wf.minimal_element_property`. And they are self-contained, not depending on any theory in CountableTypes.v.
These notions are redundant. If they are used in lemmas, they make it harder to `Search` for results.
They hold independently of the def. `FiniteT` and are thus better placed in the Cardinals folder.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This branch does:
inverse_map f g
which holds for mapsf : X → Y
,g : Y → X
if they are inverses of eachother.invertible
,homeomorphism
,FiniteT
andeq_cardinal
in terms ofinverse_map
. This allows for more better reuse of statements.topological_property
to usehomeomorphic
instead ofhomeomorphism
. This makes it easier to apply proofs oftopological_property
. UseBuild_topological_property
as boilerplate when proving something is atopological_property
.eq_cardinal
andle_cardinal
and then use them forFinite
andFiniteT
. Previously the proofs would've been duplicated.eq_cardinal
andle_cardinal
into multiple files in the folderCardinals
. They are all exported in the fileCardinals.v
Left to do:
meta.yml
and theREADME.md
to reflect the new structure of the files.Finite_as_lt_cardinal_ens
andinjective_finite_inverse_image
be proven in a way such that they can be moved toFinite_sets
? That is, without usingFiniteT
ornat_unbounded_impl_countably_infinite
.This big restructuring of the library comes from some Yak shaving.
homeomorphism
,homeomorphic
andtopological_property
.inverse_map
would be useful in proofs about it.invertible
in terms ofinverse_map
, instead of doing its own thing withInductive
.FiniteT
.bij_finite
uses something likeeq_cardinal
, by redefiningeq_cardinal
to useinvertible
as well, we can extract the lemmas ofeq_cardinal _ _
from FiniteTypes and state them separately.