-
Notifications
You must be signed in to change notification settings - Fork 12
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
composition in path types #222
Comments
@ecavallo I think the goals are actually correct; the problem is the right now, the subtyping theory for extension types is a bit impoverished, so there are times when you need to eta expand a neutral element of one extension type to see that it is an element of another extension type. This example works if you replace |
The more complicated systems that you see in the goals if you put a hole in there are induced by the boundary of the outer path type. |
I think I see what you mean, but the goals still don't seem right to me. In the
then I get |
I see what you mean... It looks like there may be a bug somewhere 😆 |
My hypothesis is that we have a dimension binding issue. |
I'm hoping that the issue lies with the elaborator rather than with the core, but we will see. |
@ecavallo I'm going through it now, and now I am less confident that there is a bug, though I admit there is behavior that seems unexpected (to be clear, I believe there may be a bug, but I'm having trouble convincing myself of it.) Your second example is combinatorially a bit too complex for me to really get down with mentally, so let me stick with the seemingly incorrect goals emitted by the first example. If the first example exhibits a bug, then it should be possible to step through the reasoning that I give below and indicate where I went wrong. We are trying to prove
What this means, is that in context Next, we want to establish this goal using a composition. Now, composition doesn't immediately apply to such a goal (a restriction type!), but the elaborator knows how to transform the goal into something equivalent which does have composition. In particular, we can push the restriction in, in order to get an extension type in which we can compose. So, the goal is transformed to the following:
Please note that Now, we will try to compose in this extension type along the extents
Let's understand what this means. The goal is an extension (pre)type of extension types. The outer extension is because the tube of a composition binds a dimension; its restriction I could go further, but above we have already seen why there is a constant |
Hm, I think I'm starting to see what the problem is. But first, can you explain why
raises
while
(which is the same thing but with |
May be pointing out something known here, but the "extension type in which we can compose" isn't Kan (though I guess it has hcom?) because it includes equations on dimension variables it doesn't bind. I think I have some idea what the right behavior here is, leaving for campus now and then I'll write something up. |
Ahh, you're quite right about that extension "type". We should change the behavior to be less clever. |
Ok, I suspect that the cleverness is the issue. Without that, I assume it would behave like I guess you have probably thought more than I have about how best to propagate restrictions into |
@ecavallo I think that we should retreat to pushing restrictions only through pi types (and later sigma, but not yet for certain reasons); and not extension type. |
The same kind of unexpected behavior happens with pi types:
raises |
Wouldn't it be nice if we could get rid of restriction types entirely? |
raises
Failure("Extension subtype: nope")
. If you replace thep
's in thecomp
with holes, you can see something weird is happening to the extension types.The text was updated successfully, but these errors were encountered: