Rocq proof terms formerly Coq

Choosing the right disjunctright

right on P \/ Q builds or_intror.

Tactic script

Theorem right_ex : forall P Q : Prop, Q -> P \/ Q.
Proof.
  intros P Q q.
  right.
  exact q.
Qed.

Proof term

MMMMMMMMMM
right. built or_intror ?Goal
(fun (P Q : Prop) (q : Q) => or_intror ?Goal)

Open goals (1) one per hole

  • ?Goalcurrent goal
    P : PropQ : Propq : Q
    ⊢ Q
built by the current tactichole: a goal still to fillearlier tactics greyed · later ones dashed

right in Rocq (Coq)

right on P \/ Q builds or_intror.

General shape: or_intror ?r. Picks the right disjunct.

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 right_ex : forall P Q : Prop, Q -> P \/ Q. Starts with a single hole whose type is the statement.
    ?Goal

    1 open goal: ?Goal

  2. intros P Q q. Built (fun (P Q : Prop) (q : Q) => ?Goal).
    (fun (P Q : Prop) (q : Q) => ?Goal)

    1 open goal: ?Goal

  3. right. Built or_intror ?Goal.
    (fun (P Q : Prop) (q : Q) => or_intror ?Goal)

    1 open goal: ?Goal

  4. exact q. Built q.
    (fun (P Q : Prop) (q : Q) => or_intror q)

    No holes left: the term is complete.

  5. Qed. The kernel type-checks the finished term against the statement.
    right_ex
    : forall P Q : Prop, Q -> P \/ Q

    Print Assumptions: Closed under the global context

Other tactics