This is a follow-up question to Getting path induction to work in Agda
I wonder when that construct may be more expressive. It seems to me we can always express the same like so:
f : forall {A} -> {x y : A} -> x == y -> "some type"
f refl = instance of "some type" for p == refl
Here Agda will do path induction given the example which is the same as c : (x : A) -> C refl from that question:
pathInd : forall {A} -> (C : {x y : A} -> x == y -> Set)
-> (c : (x : A) -> C refl)
-> {x y : A} -> (p : x == y) -> C p
It seems this function is isomorphic to:
f' : forall {A} -> {x y : A} -> x == y -> "some type"
f' = pathInd (\p -> "some type") (\x -> f {x} refl)
Are these two ways (f vs pathInd) identical in power?
f. I don't see the use forpathInd, expressed as a function just like in HoTT, unless it is in some way more general thanf. In other words, since to usepathIndone needs to replicate the same thing one needs to do to definef, I don't see if there is anything practical to be gained by introducingpathInd, except for exercise, which of course is a merit. - Sassa NF