Описание тега coq-tactic
Tactics are programs written in Ltac
, the untyped language used in the Coq
proof assistant to transform goals and terms. In general, the aim of using tactics is to construct a proof or proof object for the theorem in question. Initially, the proof object contains a hole corresponding to the goal of the theorem in question. As the proof proceeds, tactics transform the current goal/sub-goal and hypotheses in the local proof context using established theorems in the global context as well as hypotheses in the local context. Some tactics can introduce new sub-goals corresponding to new holes in the proof object. For example, if the goal is a conjunction P /\ Q
, can be decomposed into two sub-goals P
and Q
using the split
tactic. Certain tactics can also reduce the number of sub-goals (or holes in the proof object). The theorem is proved when there is no more sub-goals to prove (i.e. no more holes to fill in the proof object).
Strictly speaking, tactics are not necessary to prove theorems in Coq. It is possible to construct a proof object directly. However, tactics provide an interactive way of constructing a proof, which are closer to the manner proofs are developed manually.
For a comprehensive documentation of tactics, see the Coq reference manual: https://coq.inria.fr/refman/tactic-index.html