feat(library/init/meta/contradiction_tactic): make it more robust
This commit is contained in:
parent
c4542d5987
commit
efcebc60f7
2 changed files with 6 additions and 1 deletions
|
|
@ -34,7 +34,7 @@ private meta def contra_false : list expr → tactic unit
|
|||
private meta def contra_not_a_refl_rel_a : list expr → tactic unit
|
||||
| [] := failed
|
||||
| (H :: Hs) :=
|
||||
do t ← infer_type H,
|
||||
do t ← infer_type H >>= beta,
|
||||
(do (lhs, rhs) ← match_ne t,
|
||||
unify lhs rhs,
|
||||
tgt ← target,
|
||||
|
|
|
|||
5
tests/lean/run/contradiction_issue.lean
Normal file
5
tests/lean/run/contradiction_issue.lean
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
open tactic
|
||||
|
||||
def hd {α} : {l : list α // l ≠ []} → α
|
||||
| ⟨[], h⟩ := by contradiction
|
||||
| ⟨a::l, h⟩ := a
|
||||
Loading…
Add table
Reference in a new issue