Closed Alizter closed 3 months ago
Instead of your approach, you can just change induction
to simple_induction'
, and it goes through with the reduced universe variables. No annotations required.
(By coincidence, I've just been trying the use of fixpoints for list in induction, and it works there too!)
@jdchristensen I don't understand your suggestion. If I change induction
to simple_induction'
like you said, I end up having unbound universes. Could you elaborate a bit more?
If you completely revert your changes to Types/Sigma.v and just change induction
to simple_induction'
, doesn't it work?
If you completely revert your changes to Types/Sigma.v and just change
induction
tosimple_induction'
, doesn't it work?
I tried that, it didn't work for me.
Ah nevermind, I see the problem. The issue is that I was expecting 3 universes. But your simple induction gives 4, however it is not strictly larger.
? When I use simple_induction'
, I get istrunc_sigma@{u u0 u1}
, with just three universes.
Oh yes you are correct. I had an annotation left over. Whoops. I will force push the fix.
Thanks @jdchristensen that is a much cleaner "fix"!
This was quite difficult to fix, but I worked it out in the end.
The previous proof was using the generated polymorphic induction principle which is actually less general than what we could be. This meant that we required an extra strictly larger universe for the induction hypothesis to work.
Rewriting the proof using a fixpoint allows us to use the most general version of the "induction principle", i.e. the rules of the underlying fixpoint. This allows us to remain in the same universe, simplifying the universe requirements elsewhere too.
The main motivation for this patch was to reduce the universes in
istrunc_vector
and now we don't need a superfluous larger universe.cc @mikeshulman who participated in the corresponding Zulip discussion: https://hott.zulipchat.com/#narrow/stream/228519-general/topic/.E2.9C.94.20Truncation.20level.20of.20sigma.20type