Rocq proof terms formerly Coq

Finding the hypothesisassumption

assumption fills the hole with the first hypothesis whose type matches.

Tactic script

Theorem assumption_ex : forall P Q : Prop, P -> Q -> Q.
Proof.
  intros P Q p q.
  assumption.
Qed.

Proof term

MMMMMMMMMM
assumption. built (_ : P) (q : Q) => q
(fun (P Q : Prop) (_ : P) (q : Q) => q)

No goals left

Every hole is filled: the term is complete.

built by the current tactichole: a goal still to fillearlier tactics greyed · later ones dashed

assumption in Rocq (Coq)

assumption fills the hole with the first hypothesis whose type matches.

General shape: the hypothesis. Fills the hole with the first hypothesis whose type matches the 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 assumption_ex : forall P Q : Prop, P -> Q -> 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. assumption. Built (_ : P) (q : Q) => q.
    (fun (P Q : Prop) (_ : P) (q : Q) => q)

    No holes left: the term is complete.

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

    Print Assumptions: Closed under the global context

Other tactics