test: test “motive is not type correct” (#3122)
This commit is contained in:
parent
13d41f82d7
commit
1145976ff9
2 changed files with 15 additions and 0 deletions
8
tests/lean/motiveNotTypeCorect.lean
Normal file
8
tests/lean/motiveNotTypeCorect.lean
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
inductive D : Nat -> Type
|
||||
def mwe (t : Nat) (f : Nat -> Nat) (h : f t = t)
|
||||
(d : D (f t))
|
||||
(P : (t : Nat) -> D t -> Prop)
|
||||
: P (f t) d
|
||||
:= by
|
||||
rw [h] -- tactic 'rewrite' failed, motive is not type correct
|
||||
sorry
|
||||
7
tests/lean/motiveNotTypeCorect.lean.expected.out
Normal file
7
tests/lean/motiveNotTypeCorect.lean.expected.out
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
motiveNotTypeCorect.lean:7:6-7:7: error: tactic 'rewrite' failed, motive is not type correct
|
||||
t : Nat
|
||||
f : Nat → Nat
|
||||
h : f t = t
|
||||
d : D (f t)
|
||||
P : (t : Nat) → D t → Prop
|
||||
⊢ P (f t) d
|
||||
Loading…
Add table
Reference in a new issue