test: test “motive is not type correct” (#3122)

This commit is contained in:
Joachim Breitner 2023-12-28 16:28:17 +01:00 committed by GitHub
parent 13d41f82d7
commit 1145976ff9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View 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

View 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