Debian Codegraph @

test-suite/output/PrintingParentheses.v

raw
1 Module Test1.
2
3 Set Printing Parentheses.
4
5 Check (1+2*3,4,5).
6 Print mult_n_Sm.
7
8 End Test1.
9
10 Require Import TestSuite.list.
11
12 Module Test2.
13
14 Set Printing Parentheses.
15
16 Import ListNotations.
17 Check [1;2;3;4].
18
19 Check {0=1}+{2<=4+5}.
20
21 End Test2.
22
23 (* A test with custom entries *)
24
25 Module CustomEntry.
26
27 Declare Custom Entry myconstr.
28
29 Notation "[ x ]" := x (x custom myconstr at level 6).
30 Notation "x + y" := (Nat.add x y) (in custom myconstr at level 5, right associativity).
31 Notation "( x )" := x (in custom myconstr at level 0).
32 Notation "x" := x (in custom myconstr at level 0, x ident).
33
34 Unset Printing Parentheses.
35 Check forall x y z : nat, [ (x + y) + z ] = [ x + (y + z) ].
36 Set Printing Parentheses.
37 Check forall x y z : nat, [ (x + y) + z ] = [ x + (y + z) ].
38
39 End CustomEntry.