Rocq proof terms formerly Coq

Proving a conjunctionsplit

split on P /\ Q builds conj with two holes.

Tactic script

Theorem split_ex : forall P Q : Prop, P -> Q -> P /\ Q.
Proof.
  intros P Q p q.
  split.
  - exact p.
  - exact q.
Qed.

Proof term

MMMMMMMMMM
split. built conj ?Goal ?Goal0
(fun (P Q : Prop) (p : P) (q : Q) => conj ?Goal ?Goal0)

Open goals (2) one per hole

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

split in Rocq (Coq)

split on P /\ Q builds conj with two holes.

General shape: conj ?l ?r. On a conjunction: the constructor conj with one hole per side. (It also intros any leading → first.)

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

    1 open goal: ?Goal

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

    1 open goal: ?Goal

  3. split. Built conj ?Goal ?Goal0.
    (fun (P Q : Prop) (p : P) (q : Q) => conj ?Goal ?Goal0)

    2 open goals: ?Goal, ?Goal0

  4. - Builds no new structure.
    (fun (P Q : Prop) (p : P) (q : Q) => conj ?Goal ?Goal0)

    2 open goals: ?Goal, ?Goal0

  5. exact p. Built p.
    (fun (P Q : Prop) (p : P) (q : Q) => conj p ?Goal)

    1 open goal: ?Goal

  6. - Builds no new structure.
    (fun (P Q : Prop) (p : P) (q : Q) => conj p ?Goal)

    1 open goal: ?Goal

  7. exact q. Built q.
    (fun (P Q : Prop) (p : P) (q : Q) => conj p q)

    No holes left: the term is complete.

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

    Print Assumptions: Closed under the global context

Other tactics