-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I don't know if it's really a concern, but starting from the Dependent variant we can define an equality type and prove things about equalities. Unfortunately, the way unification is currently defined allows proving injectivity for an arbitrary function and thus making the whole thing inconsistent.
Here is the code:
data Eq (a : Type) (x : a) (y : a) where
| Refl (a : Type) (x : a) : Eq a x x
end
let inj :
(a : Type) ->
(b : Type) ->
(f : a -> b) ->
(x : a) ->
(y : a) ->
(eq : Eq b (f x) (f y)) ->
Eq a x y =
\a -> \b -> \f -> \x -> \y -> \eq ->
case y || eq
motive (y' : a) || (eq' : Eq b (f x) (f y')) || Eq a x y'
of
| .x || Refl .b .(f x) -> Refl a x
end
end
I would love to see any suggestion how to fix that.
PS It also type checks with Dependent.Monadic variant... It's not clear for me why as there is no unification involved...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels