Rocq proof terms formerly Coq

Introducing hypothesesintro / intros

Each intro peels one binder off the goal and wraps the hole in a fun.

Tactic script

Theorem intro_ex : forall (P Q : Prop), P -> Q -> P.
Proof.
  intros P Q.
  intro p.
  intro q.
  exact p.
Qed.

Proof term

MMMMMMMMMM
intros P Q. built (fun P Q : Prop => ?Goal)
(fun (P Q : Prop) => ?Goal)

Open goals (1) one per hole

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

intro / intros in Rocq (Coq)

Each intro peels one binder off the goal and wraps the hole in a fun.

General shape: fun x => ?hole. Each introduced hypothesis becomes a lambda binder around the remaining goal.

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

    1 open goal: ?Goal

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

    1 open goal: ?Goal

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

    1 open goal: ?Goal

  4. intro q. Built (q : Q) => ?Goal.
    (fun (P Q : Prop) (p : P) (q : Q) => ?Goal)

    1 open goal: ?Goal

  5. exact p. Built (_ : Q) => p.
    (fun (P Q : Prop) (p : P) (_ : Q) => p)

    No holes left: the term is complete.

  6. Qed. The kernel type-checks the finished term against the statement.
    intro_ex
    : forall P Q : Prop, P -> Q -> P

    Print Assumptions: Closed under the global context

Other tactics