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.
This PR does away with
ElIn
andElOut
, and makesElStable code
definitionally equal tounfold_el code
, and closes #189.I initially tried removing
ElStable
entirely, but found that this solution was the simplest, as there are several places where we rely on something being a code.The main complication this introduces is that pattern matching on a type requires also matching on its code, because they're now equal. The only place we don't have to do this is when matching on the goal in a tactic, because we have still have
intro_implicit_connectives
andelim_implicit_connectives
, which now unfold anElStable
but do not addElIn
orElOut
. PerhapsElStable
should no longer be an "implicit connective" and we should instead be pattern matching on codes in tactics as a matter of consistency?Having multiple representations of definitionally equal types in the core theory initially felt awkward to me, but @TOTBWF pointed out to me that this is sort of like an eta law for the universe. The main difference is that we're not usually pattern matching on "a variable at function type or a lambda" but we match on types pretty regularly.
This is a non-trivial change to cooltt, so please let me know if this implementation is a Bad Idea and needs to be reworked.