Some extra support for homogeneous n-ary products #2736
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Lately my students and I have been writing a lot of code with N-ary products where all elements either belong to types with the same universe level or belong to the same types. This adds some extra infrastructure to make this all a little bit nicer.
If
⨆
(which acts as a fold) took a level for then = zero
case instead of defaulting toLevel.zero
then we could prove thatHomoProduct n A : Set a
instead ofHomoProduct n A : Set (lconst n a)
. However, a) that is a breaking change and b) there's no nice way that I can see to make that cast so that the other n-ary functions over n-ary products can see through the cast. Therefore leaving as is in order to make incremental progress