-
Notifications
You must be signed in to change notification settings - Fork 194
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
join construction #1860
base: master
Are you sure you want to change the base?
join construction #1860
Conversation
Signed-off-by: Ali Caglayan <[email protected]>
snrapply Join_rec. | ||
- exact f. | ||
- exact IHn. | ||
- intros ? ?; nrapply path_ishprop; exact _. |
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.
This part could also use equiv_into_hprop
from Join.Core.
Definition himage@{i j} {A : Type@{i}} {B : Type@{j}} (f : A -> B) : Type@{j} | ||
:= {y : B & merely@{j j} (hfiber f y)}. | ||
|
||
(** ** Essentially Small and Locally Small Types *) |
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.
This might be a good time to merge the file https://github.com/jdchristensen/NonAccessible/blob/main/Smallness.v,
which proves a lot of things about smallness (but relies on the join construction stated as an axiom). We might want a folder with (a) a short file with the main definitions, like the beginning of Smallness.v, (b) a file containing this new material, (c) the rest of Smallness.v. Or maybe some other arrangement.
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 can take the stuff that doesn't rely on the join construction first and rebase the work here on that. I'll do that in another PR.
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.
This was done, but I guess I'll leave this unresolved until the commented out IsEssentiallySmall
is removed.
Proof. | ||
nrapply Pushout@{k k k k}. | ||
- exact (pullback_pr1@{_ _ _ k} (f := f) (g := g)). | ||
- exact (pullback_pr2@{_ _ _ k}(f := f) (g := g)). |
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.
- exact (pullback_pr2@{_ _ _ k}(f := f) (g := g)). | |
- exact (pullback_pr2@{_ _ _ k} (f := f) (g := g)). |
Definition himage@{i j} {A : Type@{i}} {B : Type@{j}} (f : A -> B) : Type@{j} | ||
:= {y : B & merely@{j j} (hfiber f y)}. |
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.
A priori, the image of a map from A : Type@{i} to B : Type@{j} should live in Type@{max(i,j)}. Here you constrain i <= j, but I don't think that makes sense for what could be a general definition.
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.
Yes, that makes more sense.
(** Instead of using the propositional truncation defined in Truncations.Core, we instead give a simpler definition here out of simple HITs. This way we can break dependencies and also manage universe levels better. *) | ||
(** TODO: this should be used in Truncations.Core instead of the other definition. *) | ||
|
||
Definition merely@{i j} (A : Type@{i}) : Type@{j}. |
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.
Shouldn't this just take one universe variable, with the output universe the same as the input universe?
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'm also not sure why this is needed. Can't you just use (Tr -1) from Truncations.Core? It's separately interesting that pushouts and sequential colimits suffice for defining propositional truncation, but for the goal of proving that appropriate images are small, it isn't needed. I'd be inclined to make this part a separate file, maybe in the metatheory folder. But I could be convinced otherwise.
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.
My original thinking was that I wanted to make propositional truncations definable before we touch ReflectiveSubuniverse/ since Seperated.v would use it. I guess this isn't really necessary in the end. I'll move it to a metatheory file.
theories/Homotopy/JoinConstruction.v
Outdated
Theorem isessentiallysmall_infinite_fiberwise_join_power@{u v k | u <= v, v < k} | ||
`{Funext} {A : Type@{u}} {X : Type@{v}} (f : A -> X) | ||
(ils_X : IsLocallySmall@{v k} X) | ||
: IsEssentiallySmall@{v k} (himage@{u v} f). |
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'm not sure why u and v are independent here. Shouldn't the constraint on how small A is (u) be the same as the constraint on how small the path types of B are (v)?
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.
Also, this suffers from the same problems as the result about sigma types. It's a tautology and can be proved with exact (_; equiv_idmap).
. And if you fix the universe variables, then the proof below won't go through, since it requires X to be small on the second line.
Definition FiberwiseJoin@{a b x k} | ||
{A : Type@{a}} {B : Type@{b}} (X : Type@{x}) (f : A -> X) (g : B -> X) | ||
: Type@{k}. |
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 had to work a lot with fiberwise joins in work on projective spaces and tangent spaces (no public repo yet), and it was much cleaner there to work with type families instead of maps. Then the fiberwise join of P : X -> Type and Q : X -> Type is simply the pointwise join: fun x => Join (P x) (Q x). This gets rid of the things you had to deal with involving bundling of data. OTOH, it would mean having to take sigma types at the end. I think it's worth thinking about, though.
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.
That sounds like a good idea. I didn't want to diverge too much from the setup in Egbert's thesis so I wasn't courageous enough to try defining fiberwise joins too differently. I think this is the better thing to do, as it means we can reuse stuff we have for Joins for the fiberwise version.
It's great to see this! I've given it a quick look over, and can review again later, maybe after some restructuring. One meta-comment is that we can't really trust this until the universe issues with GraphQuotient are worked out, since they put the result in the wrong universe, and the colimits defined here use that construction. I don't think there will be a problem, but technically speaking we can't consider this complete until that is resolved. Another comment is that the parts of this file that are general facts about joins should probably go into the Join folder, in new or existing files. |
theories/Homotopy/JoinConstruction.v
Outdated
Definition isessentiallysmall_sigma@{u v k | u <= v, v < k} | ||
`{Funext} (A : Type@{u}) (P : A -> Type@{v}) | ||
(ies_A : IsEssentiallySmall@{u k} A) | ||
(ies_P : forall x, IsEssentiallySmall@{v k} (P x)) | ||
: IsEssentiallySmall@{v k} {x : A & P x}. |
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.
This something wrong here. You start with A in universe u, and also assume that A is u-small, which is automatic. Similarly, P lands in universe v, but you also assume that it is v small. Since u <= v, this result is then a tautology, and can be proved with exact (_; equiv_idmap).
FTR, when developing this file locally, it is based on top of my other patches, that includes the universe levels for GraphQuotient being fixed. So I am a little bit more certain the universes are correct here. However as you have noticed, my grip on the universe levels is not good and I probably have quite a few mistakes in this file.
Yes, this is something that I need to do. One question I have about organisation is do we want the define the propositional truncation this way? I kept everything in one file to keep it mostly self contained, but ideally we would use the join construction in Seperated.v, I will have to think about how to organize things. |
It seems that 2 years ago I wrote a file called |
I've updated https://github.com/jdchristensen/NonAccessible to work with the current library. Part of the file Smallness.v from that repo has now been merged into Coq-HoTT via #1867 , and I've updated the remaining part of Smallness.v to work with the new naming and other conventions. The part of Smallness.v that remains is the part that depends on the join construction, so that's why I'm mentioning this in this PR. |
I've tried to update this PR using the new smallness stuff, but for whatever reason I cannot get the smallness of joins to typecheck. The statement is: Global Instance issmall_join@{u k l big+ | k < big, u <= l, k <= l}
(A : Type@{k}) (B : Type@{k})
(sA : IsSmall@{u k} A) (sB : IsSmall@{u k} B)
: IsSmall@{u k} (Join@{k k k} A B).
Proof. But if you observe the term that fills it: Check(
fun (A : Type@{k}) (B : Type@{k})
(sA : IsSmall@{u k} A) (sB : IsSmall@{u k} B)
=>
Build_IsSmall@{u k}
(Join@{k k k} A B)
(Join@{u u u} (smalltype@{u k} A) (smalltype@{u k} B))
(equiv_functor_join@{u k u k l big}
(equiv_smalltype@{u k} A : Equiv@{u k} _ _)
(equiv_smalltype@{u k} B : Equiv@{u k} _ _)
)). It forces the universes FTR the universe |
I can see why it is happening, but can't find a simple solution. The first thing is that Join@{u u l} is not definitionally equal to Join@{u u u}. And equiv_functor_join produces an equivalence from Join@{k k l} to Join@{u u l}. So this only matches the goal of an equivalence from Join@{k k k} to Join@{u u u} when both k and u equal l (and therefore equal each other). I tried a few tweaks to make equiv_functor_join and isequiv_functor_join more flexible, but they didn't work. It should be possible to decouple the third universe in Join@{u1 u2 u3} from the universe level of the equivalence. |
Signed-off-by: Ali Caglayan <[email protected]>
I managed to get it to work by making the universes in the functoriality of join more flexible. |
Great! BTW, this kind of problem should go away with algebraic universes, since that third universe variable wouldn't even be there in that case. |
Signed-off-by: Ali Caglayan <[email protected]>
I've pushed my partial adaptation of the join construction to the new smallness stuff. Unfortunately I couldn't finish the proof about smallness of colimits since I found the number of universe variables involved far too overwhelming to keep track of. It's likely I've introduced some mistakes in this push, so we will need to be careful of the universe levels and check they make sense. |
It's too bad that the changes to equiv_functor_join required so many universe annotations. Do you think it's worth waiting for algebraic universes, which I expect will simplify a lot of things here? |
@jdchristensen It's possible it can already be simplified, but I spent a lot of time fighting Coq this time around to get it to work. I can see about removing some annotations when I get some more time. I'm not sure if algebraic universes will come around soon, but if development there speeds up I wouldn't mind waiting. |
Here is a formalization of the basic results in the join construction. We can now construct essentially small homotopy images of maps and define the propositional truncation from simpler HITs.
This was quite tricky to formalize as I had to constantly wrestle with the universe constraints, but I managed to get somewhere in the end.
I've left this as a draft for now as it is missing the theory about image factorizations, embeddings etc. I'm looking to get some feedback on what I have so far before I continue.
Previous discussion on the join construction here:
TODO: