-
Kimaya Bedarkar authoredKimaya Bedarkar authored
List of Tactics
In effort to make it easier for new users to get started with the Prosa project, the idea is to maintain a list of the tactics used in the project in this file.
Each tactic should be named and briefly described (just a few sentences). Please add links to additional documentation elsewhere (if available).
Tactics from VBase
Tactics taken from the standard library of Viktor Vafeiadis.
-
ins
: combination ofintros
,simpl
andeauto
. Some trivial proofs follow fromby ins
. -
exploit H
: When applied to a hypothesis/lemmaH
, converts pre-conditions into goals in order to infer the post-condition ofH
, which is then added to the local context. -
feed H
: Same as exploit, but only generates a goal for the first pre-condition. That is, applying exploit toH: P1 -> P2 -> P3
producesH: P2 -> P3
and convertsP1
into a goal. This is useful for cleaning up induction hypotheses. -
feed_n k H
: Same as feed, but generates goals up to thek
-th pre-condition. -
specialize (H x1 x2 x3)
: instantiates hypothesisH
in place with valuesx1
,x2
, andx3
.
To be continued… please help out.
ssreflect
Tactics from -
have y := f x1 x2 x3
: creates an alias tof x1 x2 x3
calledy
(in the local context). Note thatf
can be a function or a proposition/lemma. It's usually easier to read thanmove: (f x1 x2 x3) => y
.
To be continued… please help out.
Standard Coq Tactics
Generally speaking, in new code, prefer ssreflect
tactics over standard Coq tactics whenever possible. While the current code base is a mix of classic Coq tactics and ssreflect
tactics, that's only a historical accident not worth emulating.
-
lia
: Solves arithmetic goals, including ones withssreflect
's definitions (thanks to thecoq-mathcomp-zify
dependency).
To be continued… please help out.
PROSA Tactics
-
move_neq_down H
: moves inequalityH : t1 <= t2
(orH : t1 < t2
) from the context into goals ast1 > t2
(ort1 >= t2
) -
move_neq_up H
: the reverse operation that moves inequalityt1 <= t2
(ort1 < t2
) from goals into the context asH : t1 > t2
(orH : t1 >= t2
) -
interval_to_duration t1 t2 k
: any interval[t1, t2]
can be represented as[t1, t1 + k]
for some natural numberk
. This tactic searches for inequalityt1 <= t2
(ort1 < t2
) in the context and replacest2
witht1 + k
. Note:k
is the name of a newly created natural number. -
rt_auto
: equivalent toauto with basic_rt_facts
-
rt_eauto
: equivalent toeauto with basic_rt_facts