This is an archived version pinned as of the submission of my master's thesis. An up-to-date version may be found online.
Erasing equality
module reflection.erasing-equality where
Idea
Agda's builtin primitive primEraseEquality is a special construct on
identifications that for every
identification x = y gives an identification x = y with the following
reduction behaviour:
- If the two end points
x = ynormalize to the same term,primEraseEqualityreduces torefl.
For example, primEraseEquality applied to the loop of the
circle will compute to refl, while
primEraseEquality applied to the nontrivial identification in the
interval will not reduce.
This primitive is useful for rewrite rules, as it
ensures that the identification used in defining the rewrite rule also computes
to refl. Concretely, if the identification β defines a rewrite rule, and β
is defined via primEraseEqaulity, then we have the strict equality β ≐ refl.
Primitives
primitive primEraseEquality : {l : Level} {A : UU l} {x y : A} → x = y → x = y
External links
- Built-ins#Equality at Agda's documentation pages