Summary: We minimize the number of "'sorry' used warning messages". We also re-target the error to the main declaration. Example: foo._main ==> foo We do not report for auxiliary declarations such as "_example" and "foo.equations._eqn_1" Get rid of the redundant error message "error : failed" for tactics. We added "silent failures" in the tactic framework. We do not store line/col information for tactics nested in notation declarations. Before this commit, we would have tactics such as (tactic.save_info line col) nested inside of notation declarations.
18 lines
556 B
Text
18 lines
556 B
Text
open tactic
|
||
|
||
lemma ex1 : let x := 1 in ∀ y, x = y → y = 1 :=
|
||
by using_smt $ smt_tactic.intros >> get_local `x >>= (fun a, trace a)
|
||
|
||
open tactic_result
|
||
|
||
meta def fail_if_success {α : Type} (t : smt_tactic α) : smt_tactic unit :=
|
||
λ ss ts, match t ss ts with
|
||
| success _ _ := failed ts
|
||
| exception _ _ _ := success ((), ss) ts
|
||
end
|
||
|
||
def my_smt_config : smt_config :=
|
||
{ pre_cfg := { zeta := tt } }
|
||
|
||
lemma ex2 : let x := 1 in ∀ y, x = y → y = 1 :=
|
||
by using_smt_core my_smt_config $ smt_tactic.intros >> fail_if_success (get_local `x) >> return ()
|