When formulating the eliminator for equality in the absence of Pi-types we need to generalize it (this is related to the Frobenius condition):
We say
G,x,y:A,p:x=y,D |- P
G,x:A,D[y=x,p=refl] |- m : P[y=x,p=refl]
------------------------------------------------------
G,,x,y:A,p:x=y,D |- J(m) : P
and the first example where we need this is when we want to prove transitivity,
G,x,y,p:x=y,(z:A,q:y = z) |- J(q) : x=z
Moreover there doesn't seem to be a way to avoid this. I cannot do induction over q because I would need to move the y over the p.
However, when using the Paulin-Mohring eliminator we don't need D in this case
G |- a : A
G,y:A,p:a=y |- P
G |- m : P[y=x,p=refl]
----------------------------------
G,y:A,p:a=y |- J'(a,m) : P
G,x,y,p:x=y,z:A,q:y = z |- J'(y,q) : x=z
With the PM eliminator the need for D disappears because I can just eliminate over q. I also looked at some other examples (associativity for transitivity, functoriality of transitivity and couldn't find an example where the simple rule wouldn't be sufficient.
Is this true in general (the PM rule without the D is sufficient)? Or is there a counterexample to that conjecture?
Thorsten