Rocq proof terms formerly Coq

Choosing the left disjunctleft

left on P \/ Q builds or_introl.

Tactic script

Theorem left_ex : forall P Q : Prop, P -> P \/ Q.
Proof.
  intros P Q p.
  left.
  exact p.
Qed.

Proof term

MMMMMMMMMM
left. built or_introl ?Goal
(fun (P Q : Prop) (p : P) => or_introl ?Goal)

Open goals (1) one per hole

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

left in Rocq (Coq)

left on P \/ Q builds or_introl.

General shape: or_introl ?l. Picks the left 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 left_ex : forall P Q : Prop, P -> P \/ Q. Starts with a single hole whose type is the statement.
    ?Goal

    1 open goal: ?Goal

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

    1 open goal: ?Goal

  3. left. Built or_introl ?Goal.
    (fun (P Q : Prop) (p : P) => or_introl ?Goal)

    1 open goal: ?Goal

  4. exact p. Built p.
    (fun (P Q : Prop) (p : P) => or_introl p)

    No holes left: the term is complete.

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

    Print Assumptions: Closed under the global context

Other tactics