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

The type of abstraction #485

Open
andrejbauer opened this issue Nov 25, 2019 · 1 comment
Open

The type of abstraction #485

andrejbauer opened this issue Nov 25, 2019 · 1 comment

Comments

@andrejbauer
Copy link
Member

This is a partial response to #482.

The abstraction notation {x : A} C is overloaded, as it has two possible types: C could be a judgement or a boundary. As far as the AML type system is concerned this is a hack (because the only form of polymorphism expressible is parametric polymorphism).

The principled solution would be to introduce several kinds of types. We would have the kind of all types type and the subkind judgement_or_boundary (where of course we'd need a better name). SML uses this solution to keep track of which types have a pre-defined structural equality (the types of kind eqtype).

Once we have the kind of "abstractable types" (so let us call this kind abstype), we would be tempted to stick in it other types, apart from judgement and boundary. For instance, it may be quite useful to have an abstracted pair of judgements, so abstype should/could be closed under products, so that once can have {x : A} (C1, C2) (here C1 and C2 are simultaneously abstracted by x : A). In fact, it could be closed under any type constructor which allows us to "fold" over the type.

It is not quite clear how to design this sort of thing. Does the nucleus know about abstracted pairs of judgements? List of abstacted judgement?

@andrejbauer
Copy link
Member Author

Whether it is worth having things like {x : A} (C1, C2) depends on whether in proof development one ever wants to have a pair of judgements which share a common abstraction. I imagine this sort of thing shows up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant