(Type u) is the old (Type (u+1)) (PType u) is the old (Type u) Type* is the old (Type (_+1)) PType* is the old Type* The stdlib can be compiled, but we still have > 70 broken tests See discussion at #1341
20 lines
431 B
Text
20 lines
431 B
Text
open nat
|
|
|
|
def below (n : nat) : nat → Prop :=
|
|
λ i, i < n
|
|
|
|
def f {n : nat} (v : subtype (below n)) : nat :=
|
|
v + 1
|
|
|
|
universe variable u
|
|
|
|
instance pred2subtype {A : Type u} : has_coe_to_sort (A → Prop) :=
|
|
⟨Type u, (λ p : A → Prop, subtype p)⟩
|
|
|
|
instance coesubtype {A : Type u} {p : A → Prop} : has_coe (@coe_sort _ pred2subtype p) A :=
|
|
⟨λ s, subtype.elt_of s⟩
|
|
|
|
def g {n : nat} (v : below n) : nat :=
|
|
v + 1
|
|
|
|
print g
|