This repository was archived by the owner on Apr 2, 2023. It is now read-only.

Description
I want a function similar to what we call "normal" in cubicaltt. The purpose of this function is to normalize/simplify terms as far as possible, this means that it has to go under binders, unfold all definitions and compute all coe/hcom's as far as possible.
This is very useful for seeing how complicated definitions really are. I've found many things in cubicaltt that look innocent on the surface but once you start unfolding things you see that they are really complicated because they contain coe/hcom's in complicated types that unfold to a lot more hcom/coe's.
Another very useful thing with this kind of function is that they can be used to debug the system. If I have a term t : T in cubicaltt I can normalize/simplify it to get t', I can then ask the typechecker if t' : T. If this fails then I know that there is a bug somewhere and we managed to find a lot of bugs this way by doing this for the term inhabiting the type of the univalence axiom. In RedPRL we can probably not do exactly the same, but it might be that the heuristics are powerful enough to see that "t' : T" in many cases?
Note that it might be necessary for such a normalization/simplification function to be type-directed in RedPRL in order for things like (@ p 0) to reduce.