Syntax for defining hints

This module defines notations that can convert certain BI facts into hints for the automation. To this end it offers several notations that can parse various BI (bi-)entailments into forward, backward, and cancellation hints.

Simple Examples

Forward hints

Given a proof H : P |-- Q, we use the notation [FWD] H to obtain a forward hint Fwd P, which exchanges premise P for premise Q.

Lemma hintPQ : P |-- Q.
Proof. (* proof of the hint *) Qed.
Definition hintPQ_F (* : Fwd P *) := [FWD] hintPQ.

As a convention, we use the suffix _F for forward hints, _B for backward hints, and _C for cancellation hints.

Backwards hint

Given a proof H : P |-- Q we use the notation [BWD] H to obtain a backward hint Bwd Q, which exchanges conclusion Q for conclusion P.

Definition hintPQ_B (* : Bwd P *) := [BWD] hintPQ.

Cancellation hints

Given a proof H : P |-- P' ** (Q' -∗ Q), we use the notation [CANCEL] H to obtain a cancellation hint Cancel P Q that exchanges premise P for premise P', and conclusion Q for conclusion Q'.

Lemma hintPQ' : P |-- P' ** (Q' -∗ Q).
Proof. (* proof of the hint *) Qed.
Definition hintPQ'_C (* : Cancel P Q *) := [CANCEL] hintPQ'.

Advanced Features

Re-Orienting Hints

All notations in this module also optionally re-orient bi-entailments. Given H : P -|- Q, we can derive Fwd Q (instead of Fwd P) via [FWD<-] H. (Note the backward arrow.)

Specification

The full set of notations is:

The general form of hints parsed by the notations is:

The tactics will parse lemmas whose type ends in one of the above forms by introducing universal quantifiers and implications it encounters while traversing the type and mirroring them in the resulting hint.