Rocq proof terms formerly Coq

Impossible equationsdiscriminate

discriminate derives False from a constructor clash.

Tactic script

Theorem discriminate_ex : forall n : nat, S n = 0 -> False.
Proof.
  intros n H.
  discriminate H.
Qed.

Proof term

MMMMMMMMMM
discriminate H. built let H0 : False := eq_ind (S n) (fun e : nat => match e with | 0 => False | S _ => True end) I 0 H in False_ind False H0
(fun (n : nat) (H : S n = 0) =>
   let H0 : False := eq_ind (S n)  I 0 H in
   False_ind False H0)

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

discriminate in Rocq (Coq)

discriminate derives False from a constructor clash.

General shape: False_ind … (eq_ind … I … H). Uses the equation between different constructors to derive False, then False_ind.

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 discriminate_ex : forall n : nat, S n = 0 -> False. Starts with a single hole whose type is the statement.
    ?Goal

    1 open goal: ?Goal

  2. intros n H. Built (fun (n : nat) (H : S n = 0) => ?Goal).
    (fun (n : nat) (H : S n = 0) => ?Goal)

    1 open goal: ?Goal

  3. discriminate H. Built let H0 : False := eq_ind (S n) (fun e : nat => match e with | 0 => False | S _ => True end) I 0 H in False_ind False H0.
    (fun (n : nat) (H : S n = 0) => let H0 : False := eq_ind (S n) (fun e : nat => match e with | 0 => False | S _ => True end) I 0 H in False_ind False H0)

    No holes left: the term is complete.

  4. Qed. The kernel type-checks the finished term against the statement.
    discriminate_ex
    : forall n : nat, S n = 0 -> False

    Print Assumptions: Closed under the global context

Other tactics