6

Notations are convenient when you're familiar with a project but can be confusing when you're just starting with a code base. I know you can turn off all notations with the vernacular Set Printing All. However, I want to keep some printing off, such as implicit arguments. Printing all as follows:

Require Import Utf8_core. 
Set Printing All.
Theorem contradiction_implies_anything : forall P Q : Prop,
  (P /\ ~P) -> Q.
Proof.

gives the following proof state:

1 subgoal (ID 120)

  ============================
  forall (P Q : Prop) (_ : and P (not P)), Q

Which is almost there, but I would like the _ to be removed and the forall to be and just unfold my notations.

I tried Set Printing Notations as indicated in the Coq Reference Manual but that didn't do anything, nor did enabling

Set Printing Implicit.
Set Printing Coercions.
Set Printing Synth.
Set Printing Projections.
sdpoll
  • 426
  • 2
  • 12

1 Answers1

7

The funny thing about Printing Notations is that you actually have to Unset it.

Unset Printing Notations.

Here's where the manual hints at it:

Printing Notations:
Controls whether to use notations for printing terms wherever possible. Default is on.

Li-yao Xia
  • 31,896
  • 2
  • 33
  • 56
  • Is there a way to "unset everything" so that Coq terms always appear in some standard for in a consistent manner? – Charlie Parker Jun 21 '21 at 18:55
  • `Set Printing All.` might be it. – Li-yao Xia Jun 21 '21 at 19:35
  • Would something like this work? ` Unset Printing Notations. Print my_notation_eq_fun_def.` I tried it but my term still has my definition for plus see: `my_notation_eq_fun_def = fun x1 x2 : my_nat => eq_refl : forall x1 x2 : my_nat, x1 [+] x2 = x1 [+] x2` – Charlie Parker Jun 23 '21 at 15:59
  • Have you tried `Set Printing All.`? You can also look for related options here in the manual: https://coq.inria.fr/distrib/current/refman/coq-optindex.html#cap-p – Li-yao Xia Jun 23 '21 at 16:18