3 "\langle a , b \rangle"
6 check \langle 1, \langle 2, 3 \rangle \rangle.
7 check 'pair 1 ('pair 2 ('pair 3 4)).
9 notation "a :: b" for @{ 'cons $a $b }.
13 "[ hovbox (list0 a sep ; ) ]"
23 "[ list1 a sep ; | b ]"
25 if @{ 'cons $_ $_ } then
29 else if @{ 'cons $_ $_ } then
38 check 'cons 1 ('cons 2 ('cons 3 'ugo)).
39 check 'cons 1 ('cons 2 ('cons 3 'nil)).
43 notation "a + b" left associative for @{ 'plus $a $b }.
47 notation "a + b" left associative for @{ 'plus $a $b }.
48 notation "a * b" left associative for @{ 'mult $a $b }.
49 interpretation 'plus x y = (cic:/Coq/Init/Peano/plus.con x y).
50 interpretation 'mult x y = (cic:/Coq/Init/Peano/mult.con x y).
51 render cic:/Coq/Arith/Mult/mult_plus_distr_r.con.
54 "hvbox ('if' a 'then' break b break 'else' break c)"
56 @{ 'ifthenelse $a $b $c }.
57 check if even then \forall x:nat.x else bump x.
62 @{ if $a > $b then $a else $b }
66 right associative with precedence 20
68 @{ 'lambda ${ident x} $a }.
71 "hvbox(a break \to b)"
73 @{ \forall $_:$a.$b }.
78 @a e' un'abbreviazione per @{term a}
79 "x" e' un'abbreviazione per @{keyword x}
80 @_ e' un'abbreviazione per @{anonymous}
82 \x simbolo della sintassi concreta
83 'x simbolo della sintassi astratta
85 \lbrace \rbrace per le parentesi graffe al livello 1
89 # sample mappings level 1 <--> level 2
91 notation \[ \TERM a ++ \OPT \NUM i \] for 'assign \TERM a ('plus \TERM a \DEFAULT \[\NUM i\] \[1\]).
94 notation \[ + \LIST0 \NUM a \] for \FOLD right \[ 'zero \] \LAMBDA acc \[ 'plus \NUM a \TERM acc \].
97 notation \[ [ \HOVBOX\[ \LIST0 \TERM a \SEP ; \] ] \] for \FOLD right \[ 'nil \] \LAMBDA acc \[ 'cons \TERM a \TERM acc \].
101 notation \[ [ \LIST0 \[ \TERM a ; \TERM b \] \SEP ; ] \] for \FOLD right \[ 'nil \] \LAMBDA acc \[ 'cons \TERM a ( 'cons \TERM b \TERM acc) \] .
106 notation \[ | \LIST0 \[ \TERM a \OPT \[ , \TERM b \] \] \SEP ; | \] for \FOLD right \[ 'nil \] \LAMBDA acc \[ 'cons \DEFAULT \[ \TERM a \] \[ ('pair \TERM a \TERM b) \] \TERM acc \] .
108 notation \[ | \LIST0 \[ \OPT \[ \NUM i \] \] \SEP ; | \] for \FOLD right \[ 'nil \] \LAMBDA acc \[ 'cons \DEFAULT \[ 'Some \NUM i \] \[ 'None \] \TERM acc \] .
110 # sample mappings level 2 <--> level 3
112 interpretation 'plus x y = (cic:/Coq/Init/Peano/plus.con x y).
113 interpretation 'mult x y = (cic:/Coq/Init/Peano/mult.con x y).
114 render cic:/Coq/Arith/Mult/mult_plus_distr_r.con.
116 notation \[ \TERM a \OVER \TERM b : \TERM c \SQRT \TERM d \] for 'megacoso \TERM a \TERM b \TERM c \TERM d.
117 interpretation "megacoso" 'megacoso x y z w =
118 (cic:/Coq/Init/Logic/eq.ind#xpointer(1/1)
119 cic:/Coq/Init/Datatypes/nat.ind#xpointer(1/1)
120 (cic:/Coq/Init/Peano/plus.con x y)
121 (cic:/Coq/Init/Peano/plus.con z w)).
122 render cic:/Coq/Arith/Plus/plus_comm.con.
126 notation \[ \TERM a + \TERM b \] for 'plus \TERM a \TERM b.
128 interpretation 'plus x y = (cic:/Coq/Init/Peano/plus.con x y).
129 render cic:/Coq/Arith/Plus/plus_comm.con.
131 notation \[ \TERM a + \TERM b \] left associative with precedence 50 for 'plus \TERM a \TERM b.
132 notation \[ \TERM a * \TERM b \] left associative with precedence 60 for 'mult \TERM a \TERM b.
133 interpretation 'plus x y = (cic:/Coq/Init/Peano/plus.con x y).
134 interpretation 'mult x y = (cic:/Coq/Init/Peano/mult.con x y).
135 render cic:/Coq/Arith/Mult/mult_plus_distr_r.con.
137 notation \[ \LIST \NUM a \] for \FOLD left \[ 'a \] \LAMBDA acc \[ 'b \NUM a \].