agda icon indicating copy to clipboard operation
agda copied to clipboard

Fix #5816: skip generating cubical clauses for Prop stuff

Open andreasabel opened this issue 2 years ago • 3 comments

Fix #5816: skip generating cubical clauses for Prop stuff

TODO:

  • [ ] disallow --cubical and --prop together?

andreasabel avatar May 09 '22 15:05 andreasabel

The models of CTT support a Prop universe. What one should do for indexed families and/or HITs in Prop would require more thought though. It does not seem like you should be able to support the same eliminators in general.

Saizan avatar May 09 '22 16:05 Saizan

Thanks for chiming in, @Saizan.
Current master contributes indexed inductive types to Cubical Agda, but the development isn't finished yet. We need a plan what to do about it for the 2.6.3 release. This PR is a clumsy attempt to work around an internal error introduced by the new code for indexed inductive cubicality. Any help to do better appreciated.

andreasabel avatar May 09 '22 21:05 andreasabel

Thanks for chiming in, @Saizan. Current master contributes indexed inductive types to Cubical Agda, but the development isn't finished yet. We need a plan what to do about it for the 2.6.3 release.

One option is perhaps to disallow the combination of --prop and --cubical/--erased-cubical when --safe is active. However, if the combination of --prop and --cubical can lead to lots of broken invariants, then perhaps it should be ruled out entirely.

nad avatar May 10 '22 14:05 nad

@mergifyio rebase

andreasabel avatar Aug 16 '22 18:08 andreasabel

rebase

✅ Branch has been successfully rebased

mergify[bot] avatar Aug 16 '22 18:08 mergify[bot]

The fix looks good; In the future we'd have to revisit generation of hcomp clauses into types living in Prop if we were to e.g. make Prop univalent. For the 2.6.3 release, I think the cleanest option is to lock support for cubical indexed inductives behind a flag: it has a tendency to explode (#5816, #6005, #6001) and Injectivity is a very popular unification step.

plt-amy avatar Aug 16 '22 23:08 plt-amy

For the 2.6.3 release, I think the cleanest option is to lock support for cubical indexed inductives behind a flag

Should that flag be compatible with --safe?

nad avatar Aug 17 '22 08:08 nad

It doesn't let you prove anything new, so it's not not --safe... but it's not entirely safe since there's a lot of __IMPOSSIBLE__ to run into? So I'd say "no"

plt-amy avatar Aug 17 '22 13:08 plt-amy

If the only problem is that Agda might crash, then I think it is fine to make the flag compatible with --safe. The idea of that flag is that when it is used, then any logical or runtime errors are Agda bugs.

nad avatar Aug 22 '22 07:08 nad

In the past we have often made experimental flags not compatible with --safe, even though in principle they do not add any inconsistencies (see for example --prop). If this is still the policy, I would suggest making this new flag incompatible with --safe until it is fully implemented (in particular with support for Injectivity and Prop).

jespercockx avatar Aug 22 '22 14:08 jespercockx

Actually, do we still need this after #6153? I don't think so

plt-amy avatar Oct 21 '22 18:10 plt-amy

Since the problems reported in #5816 are fixed (and a testcase has been added), I don't see a reason to keep this PR.

andreasabel avatar Oct 25 '22 04:10 andreasabel