「SF-PLF」17 UseTactics
1 | From PLF Require Import LibTactics. |
LibTactics
vs. SSReflect
(another tactics package)
- for PL vs. for math
- traditional vs. rethinks..so harder
Tactics for Naming and Performing Inversion
introv
1 | Theorem ceval_deterministic: ∀c st st1 st2, |
inverts
1 | (* was... 需要 subst, clear *) |
Tactics for N-ary Connectives
Because Coq encodes conjunctions and disjunctions using binary constructors ∧ and ∨…
to work with aN
-ary logical connectives…
splits
n-ary conjunction
n-ary split
branch
n-ary disjunction
faster destruct
?
Tactics for Working with Equality
asserts_rewrite
and cuts_rewrite
substs
better subst
- not fail on circular eq
fequals
vs f_equal
?
applys_eq
variant of eapply
Some Convenient Shorthands
unfolds
better unfold
false
and tryfalse
better exfalso
gen
shorthand for generalize dependent
, multiple arg.
1 | (* old *) |
admits
, admit_rewrite
and admit_goal
wrappers around admit
sort
proof context more readable
vars -> top
hypotheses -> bottom
Tactics for Advanced Lemma Instantiation
Working on lets
Working on applys
, forwards
and specializes
评论
TwikooValine