test(tests/lean/run): add append tactic test
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
91b0dcad0f
commit
2ad1a93657
1 changed files with 24 additions and 0 deletions
24
tests/lean/run/tactic28.lean
Normal file
24
tests/lean/run/tactic28.lean
Normal file
|
@ -0,0 +1,24 @@
|
|||
import standard
|
||||
using tactic
|
||||
|
||||
inductive sum (A B : Type) : Type :=
|
||||
| inl : A → sum A B
|
||||
| inr : B → sum A B
|
||||
|
||||
theorem inl_inhabited {A : Type} (B : Type) (H : inhabited A) : inhabited (sum A B)
|
||||
:= inhabited_elim H (λ a, inhabited_intro (inl B a))
|
||||
|
||||
theorem inr_inhabited (A : Type) {B : Type} (H : inhabited B) : inhabited (sum A B)
|
||||
:= inhabited_elim H (λ b, inhabited_intro (inr A b))
|
||||
|
||||
infixl `..`:100 := append
|
||||
|
||||
definition my_tac := repeat (trace "iteration"; state;
|
||||
( apply @inl_inhabited; trace "used inl"
|
||||
.. apply @inr_inhabited; trace "used inr"
|
||||
.. apply @num.inhabited_num; trace "used num")) ; now
|
||||
|
||||
|
||||
tactic_hint [inhabited] my_tac
|
||||
|
||||
theorem T : inhabited (sum false num.num)
|
Loading…
Reference in a new issue