Rocq proof terms formerly Coq

Putting a variable back in the goalrevert x

revert abstracts the goal over x; the term is a hole applied to x, not a fun.

Tactic script

Theorem revert_ex : forall n : nat, n = n.
Proof.
  intros n.
  revert n.
  intros m.
  reflexivity.
Qed.

Proof term

MMMMMMMMMM
revert n. built ?Goal n
(fun (n : nat) => ?Goal n)

Open goals (1) one per hole

  • ?Goalcurrent goal
    ⊢ forall n : nat, n = n
built by the current tactichole: a goal still to fillearlier tactics greyed · later ones dashed

revert x in Rocq (Coq)

revert abstracts the goal over x; the term is a hole applied to x, not a fun.

General shape: ?m x. The new goal is ∀ x, … and the hole is applied to x. It is not a fun: revert is the inverse of intro.

Step by step: the proof term after each sentence

Recorded from Coq with Show Proof. after every sentence. Teal is what the sentence built; ?Goal pills are holes still to fill.

  1. Theorem revert_ex : forall n : nat, n = n. Starts with a single hole whose type is the statement.
    ?Goal

    1 open goal: ?Goal

  2. intros n. Built (fun n : nat => ?Goal).
    (fun n : nat => ?Goal)

    1 open goal: ?Goal

  3. revert n. Built ?Goal n.
    (fun n : nat => ?Goal n)

    1 open goal: ?Goal

  4. intros m. Built (fun m : nat => ?Goal).
    (fun n : nat => (fun m : nat => ?Goal) n)

    1 open goal: ?Goal

  5. reflexivity. Built eq_refl.
    (fun n : nat => (fun m : nat => eq_refl) n)

    No holes left: the term is complete.

  6. Qed. The kernel type-checks the finished term against the statement.
    revert_ex
    : forall n : nat, n = n

    Print Assumptions: Closed under the global context

Other tactics