-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: failed to infer implicit target (#3189)
The `induction` tactic complains if implicit targets cannot be inferred, let’s test that.
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
namespace Ex1 | ||
|
||
theorem elim_with_implicit_target (motive : Nat → Nat → Prop) (case1 : ∀ m n, motive m n) (n : Nat) {m : Nat} : motive m n := case1 _ _ | ||
|
||
example (n m : Nat) : n ≤ m := by | ||
induction n using elim_with_implicit_target | ||
case case1 => sorry | ||
|
||
end Ex1 | ||
|
||
namespace Ex2 | ||
|
||
theorem elim_with_implicit_target (motive : Nat → Nat → Prop) (case1 : ∀ m n, motive m n) {n : Nat} (m : Nat) : motive m n := case1 _ _ | ||
|
||
example (n m : Nat) : n ≤ m := by | ||
induction m using elim_with_implicit_target | ||
case case1 => sorry | ||
|
||
end Ex2 | ||
|
||
namespace Ex3 | ||
|
||
-- this one should work | ||
theorem elim_with_implicit_target (motive : (n : Nat) → Fin n → Prop) (case1 : ∀ m n, motive m n) {n : Nat} (m : Fin n) : motive n m := case1 _ _ | ||
|
||
example (n : Nat) (m : Fin n) : n ≤ m := by | ||
induction m using elim_with_implicit_target | ||
case case1 => sorry | ||
|
||
end Ex3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
indimpltarget.lean:6:2-6:45: error: failed to infer implicit target, it contains unresolved metavariables | ||
?m | ||
indimpltarget.lean:16:2-16:45: error: failed to infer implicit target, it contains unresolved metavariables | ||
?m | ||
indimpltarget.lean:26:0-26:7: warning: declaration uses 'sorry' |