Rocq proof terms formerly Coq

Providing a witnessexists t

exists t builds ex_intro with the witness and a hole for the proof.

Tactic script

Theorem exists_ex : exists n : nat, n + 1 = 3.
Proof.
  exists 2.
  reflexivity.
Qed.

Proof term

MMMMMMMMMM
exists 2. built (ex_intro (fun n : nat => n + 1 = 3) 2 ?Goal)
(ex_intro  2 ?Goal)

Open goals (1) one per hole

  • ?Goalcurrent goal
    ⊢ 2 + 1 = 3
built by the current tactichole: a goal still to fillearlier tactics greyed · later ones dashed

exists t in Rocq (Coq)

exists t builds ex_intro with the witness and a hole for the proof.

General shape: ex_intro P t ?proof. The witness t and a hole for the proof that P holds of t.

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 exists_ex : exists n : nat, n + 1 = 3. Starts with a single hole whose type is the statement.
    ?Goal

    1 open goal: ?Goal

  2. exists 2. Built (ex_intro (fun n : nat => n + 1 = 3) 2 ?Goal).
    (ex_intro (fun n : nat => n + 1 = 3) 2 ?Goal)

    1 open goal: ?Goal

  3. reflexivity. Built eq_refl.
    (ex_intro (fun n : nat => n + 1 = 3) 2 eq_refl)

    No holes left: the term is complete.

  4. Qed. The kernel type-checks the finished term against the statement.
    exists_ex
    : exists n : nat, n + 1 = 3

    Print Assumptions: Closed under the global context

Other tactics