RedPRL / redtt

"Between the darkness and the dawn, a red cube rises!": a proof assistant for cartesian cubical type theory
Apache License 2.0
204 stars 12 forks source link

Type checking of composite types in NewTyping #443

Closed jonsterling closed 4 years ago

jonsterling commented 5 years ago

Things like box, cap. This involves unleashing a couple power moves (already unleashed in the V types):

  1. Checking of box should look at the dimensions and delegate to the right thing in case it is trivial (see Vin). for now, don't worry about if you are ignoring junk which appears in the term.

  2. Checking of cap should do the same as above.

  3. The main case for box should be implicit, as fhcom is treated as a negative type. We should "eta expand" the generic element of fhcom on the fly, and check that, if possible. This would be in harmony with the way that V-types and all other negative types are checked. This may be a little subtle to figure out.