const_syntax;
authorwenzelm
Wed May 17 01:23:48 2006 +0200 (2006-05-17)
changeset 1967422b635240905
parent 19673 853f5a3cc06e
child 19675 a4894fb2a5f2
const_syntax;
src/HOL/Library/LaTeXsugar.thy
src/HOL/Library/OptionalSugar.thy
     1.1 --- a/src/HOL/Library/LaTeXsugar.thy	Wed May 17 01:23:46 2006 +0200
     1.2 +++ b/src/HOL/Library/LaTeXsugar.thy	Wed May 17 01:23:48 2006 +0200
     1.3 @@ -10,9 +10,10 @@
     1.4  begin
     1.5  
     1.6  (* LOGIC *)
     1.7 +const_syntax (latex output)
     1.8 +  If  ("(\<^raw:\textsf{>if\<^raw:}> (_)/ \<^raw:\textsf{>then\<^raw:}> (_)/ \<^raw:\textsf{>else\<^raw:}> (_))" 10)
     1.9 +
    1.10  syntax (latex output)
    1.11 -  If            :: "[bool, 'a, 'a] => 'a"
    1.12 -  ("(\<^raw:\textsf{>if\<^raw:}> (_)/ \<^raw:\textsf{>then\<^raw:}> (_)/ \<^raw:\textsf{>else\<^raw:}> (_))" 10)
    1.13  
    1.14    "_Let"        :: "[letbinds, 'a] => 'a"
    1.15    ("(\<^raw:\textsf{>let\<^raw:}> (_)/ \<^raw:\textsf{>in\<^raw:}> (_))" 10)
    1.16 @@ -51,16 +52,16 @@
    1.17  (* LISTS *)
    1.18  
    1.19  (* Cons *)
    1.20 -syntax (latex)
    1.21 -  Cons :: "'a \<Rightarrow> 'a list \<Rightarrow> 'a list" ("_\<cdot>/_" [66,65] 65)
    1.22 +const_syntax (latex)
    1.23 +  Cons  ("_\<cdot>/_" [66,65] 65)
    1.24  
    1.25  (* length *)
    1.26 -syntax (latex output)
    1.27 -  length :: "'a list \<Rightarrow> nat" ("|_|")
    1.28 +const_syntax (latex output)
    1.29 +  length  ("|_|")
    1.30  
    1.31  (* nth *)
    1.32 -syntax (latex output)
    1.33 -  nth :: "'a list \<Rightarrow> nat \<Rightarrow> 'a" ("_\<^raw:\ensuremath{_{[\mathit{>_\<^raw:}]}}>" [1000,0] 1000)
    1.34 +const_syntax (latex output)
    1.35 +  nth  ("_\<^raw:\ensuremath{_{[\mathit{>_\<^raw:}]}}>" [1000,0] 1000)
    1.36  
    1.37  (* DUMMY *)
    1.38  consts DUMMY :: 'a ("\<^raw:\_>")
     2.1 --- a/src/HOL/Library/OptionalSugar.thy	Wed May 17 01:23:46 2006 +0200
     2.2 +++ b/src/HOL/Library/OptionalSugar.thy	Wed May 17 01:23:48 2006 +0200
     2.3 @@ -17,9 +17,9 @@
     2.4  
     2.5  
     2.6  (* aligning equations *)
     2.7 -syntax (tab output)
     2.8 -  "op =" :: "'a \<Rightarrow> 'a \<Rightarrow> 'a" ("(_) \<^raw:}\putisatab\isa{\ >=\<^raw:}\putisatab\isa{> (_)" [50,49] 50)
     2.9 -  "==" :: "prop \<Rightarrow> prop \<Rightarrow> prop" ("(_) \<^raw:}\putisatab\isa{\ >\<equiv>\<^raw:}\putisatab\isa{> (_)")
    2.10 +const_syntax (tab output)
    2.11 +  "op ="  ("(_) \<^raw:}\putisatab\isa{\ >=\<^raw:}\putisatab\isa{> (_)" [50,49] 50)
    2.12 +  "=="  ("(_) \<^raw:}\putisatab\isa{\ >\<equiv>\<^raw:}\putisatab\isa{> (_)")
    2.13  
    2.14  (* Let *)
    2.15  translations