## 7.13 Tacticals

We describe in this section how to combine the tactics provided by the system to write synthetic proof scripts called tacticals. The tacticals are built using tactic operators we present below.

### 7.13.1 `Idtac`

The constant `Idtac` is the identity tactic: it leaves any goal unchanged.

### 7.13.2 `Fail`

The tactic `Fail` is the always-failing tactic: it does not solve any goal. It is useful for defining other tacticals.

### 7.13.3 `Do` num`` tactic``

This tactic operator repeats num times the tactic tactic. It fails when it is not possible to repeat num times the tactic.

### 7.13.4 tactic`1``` `Orelse``` tactic`2```

The tactical tactic1 `Orelse` tactic2 tries to apply tactic1 and, in case of a failure, applies tactic2. It associates to the left.

### 7.13.5 `Repeat` tactic``

This tactic operator repeats tactic as long as it does not fail.

### 7.13.6 tactic`1``` `;``` tactic`2```

This tactic operator is a generalized composition for sequencing. The tactical tactic1 `;` tactic2 first applies tactic1 and then applies tactic2 to any subgoal generated by tactic1. `;` associates to the left.

### 7.13.7 tactic`0``; [` tactic`1``| ... |` tactic`n``]`

This tactic operator is a generalization of the precedent tactics operator. The tactical tactic`0``; [` tactic`1``| ... |` tactic`n``]` first applies tactic0 and then applies tactici to the i-th subgoal generated by tactic0. It fails if n is not the exact number of remaining subgoals.

### 7.13.8 `Try` tactic``

This tactic operator applies tactic tactic, and catches the possible failure of tactic. It never fails.

### 7.13.9 `First [` tactic`0``| ... |` tactic`n``]`

This tactic operator tries to apply the tactics tactici with i=0...n, starting from i=0, until one of them does not fail. It fails if all the tactics fail.
Error messages:

1. `No applicable tactic.`

### 7.13.10 `Solve [` tactic`0``| ... |` tactic`n``]`

This tactic operator tries to solve the current goal with the tactics tactici with i=0...n, starting from i=0, until one of them solves. It fails if no tactic can solve.
Error messages:

1. `Cannot solve the goal.`

### 7.13.11 `Info` tactic``

This is not really a tactical. For elementary tactics, this is equivalent to tactic. For complex tactic like `Auto`, it displays the operations performed by the tactic.

### 7.13.12 `Abstract` tactic``

From outside, typing `Abstract` tactic is the same that typing tactic. Internally it saves an auxiliary lemma called ident`_subproof`n where ident is the name of the current goal and n is chosen so that this is a fresh name.
This tactical is useful with tactics such `Omega` or `Discriminate` that generate big proof terms. With that tool the user can avoid the explosion at time of the `Save` command without having to cut ``by hand'' the proof in smaller lemmas.
Variants:

1. `Abstract` tactic`using` ident.
   Give explicitly the name of the auxiliary lemma.