The main issue is nontermination for problems that do not have solution. When using dependent coercions, we keep creating goals of the form `CoeSort ... (coe (coe (coe ...))) ...`. Same for `CoeFun`. I am considering simplifying it even further, and making sure `CoeDep` can be used at most once in a sequence of coercions `CoeTC`. Another option is to use a very small amount of fuel to guarantee termination when solving coercion TC problems. cc @Kha @dselsam
13 lines
263 B
Text
13 lines
263 B
Text
universe u
|
|
|
|
structure Group :=
|
|
(carrier : Type u) (mul : carrier → carrier → carrier) (one : carrier)
|
|
|
|
instance GroupToType : CoeSort Group (Type u) :=
|
|
CoeSort.mk (fun g => g.carrier)
|
|
|
|
new_frontend
|
|
|
|
variable (g : Group.{1})
|
|
|
|
#check fun (a b : g) => g.mul a b
|