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
15 lines
285 B
Text
15 lines
285 B
Text
new_frontend
|
||
|
||
universes u
|
||
|
||
def Below (n : Nat) : Nat → Prop :=
|
||
(· < n)
|
||
|
||
def f {n : Nat} (v : Subtype (Below n)) : Nat :=
|
||
v + 1
|
||
|
||
instance pred2subtype {α : Type u} : CoeSort (α → Prop) (Type u) :=
|
||
CoeSort.mk (fun p => Subtype p)
|
||
|
||
def g {n : Nat} (v : Below n) : Nat :=
|
||
v.val + 1
|