| author | wenzelm | 
| Sat, 13 Nov 2010 12:32:21 +0100 | |
| changeset 40521 | 8896bd93488e | 
| parent 35251 | e244adbbc28f | 
| child 41757 | 7bbd11360bd3 | 
| permissions | -rw-r--r-- | 
| 15469 | 1 | (* Title: HOL/Library/LaTeXsugar.thy | 
| 2 | Author: Gerwin Klain, Tobias Nipkow, Norbert Schirmer | |
| 3 | Copyright 2005 NICTA and TUM | |
| 4 | *) | |
| 5 | ||
| 6 | (*<*) | |
| 7 | theory LaTeXsugar | |
| 30663 
0b6aff7451b2
Main is (Complex_Main) base entry point in library theories
 haftmann parents: 
30304diff
changeset | 8 | imports Main | 
| 15469 | 9 | begin | 
| 10 | ||
| 11 | (* LOGIC *) | |
| 21210 | 12 | notation (latex output) | 
| 19674 | 13 |   If  ("(\<^raw:\textsf{>if\<^raw:}> (_)/ \<^raw:\textsf{>then\<^raw:}> (_)/ \<^raw:\textsf{>else\<^raw:}> (_))" 10)
 | 
| 14 | ||
| 15469 | 15 | syntax (latex output) | 
| 16 | ||
| 17 | "_Let" :: "[letbinds, 'a] => 'a" | |
| 18 |   ("(\<^raw:\textsf{>let\<^raw:}> (_)/ \<^raw:\textsf{>in\<^raw:}> (_))" 10)
 | |
| 19 | ||
| 20 | "_case_syntax":: "['a, cases_syn] => 'b" | |
| 21 |   ("(\<^raw:\textsf{>case\<^raw:}> _ \<^raw:\textsf{>of\<^raw:}>/ _)" 10)
 | |
| 22 | ||
| 16110 | 23 | (* should become standard syntax once x-symbols supports it *) | 
| 24 | syntax (latex) | |
| 25 |   nexists :: "('a => bool) => bool"           (binder "\<nexists>" 10)
 | |
| 26 | translations | |
| 27 | "\<nexists>x. P" <= "\<not>(\<exists>x. P)" | |
| 28 | ||
| 15469 | 29 | (* SETS *) | 
| 30 | ||
| 31 | (* empty set *) | |
| 27688 | 32 | notation (latex) | 
| 30304 
d8e4cd2ac2a1
set operations Int, Un, INTER, UNION, Inter, Union, empty, UNIV are now proper qualified constants with authentic syntax
 haftmann parents: 
29493diff
changeset | 33 |   "Set.empty" ("\<emptyset>")
 | 
| 15469 | 34 | |
| 35 | (* insert *) | |
| 36 | translations | |
| 31462 | 37 |   "{x} \<union> A" <= "CONST insert x A"
 | 
| 15690 | 38 |   "{x,y}" <= "{x} \<union> {y}"
 | 
| 15469 | 39 |   "{x,y} \<union> A" <= "{x} \<union> ({y} \<union> A)"
 | 
| 27688 | 40 |   "{x}" <= "{x} \<union> \<emptyset>"
 | 
| 15469 | 41 | |
| 42 | (* set comprehension *) | |
| 43 | syntax (latex output) | |
| 44 |   "_Collect" :: "pttrn => bool => 'a set"              ("(1{_ | _})")
 | |
| 45 | translations | |
| 46 |   "_Collect p P"      <= "{p. P}"
 | |
| 15690 | 47 |   "_Collect p P"      <= "{p|xs. P}"
 | 
| 15469 | 48 | |
| 49 | (* LISTS *) | |
| 50 | ||
| 51 | (* Cons *) | |
| 21210 | 52 | notation (latex) | 
| 19674 | 53 |   Cons  ("_\<cdot>/_" [66,65] 65)
 | 
| 15469 | 54 | |
| 55 | (* length *) | |
| 21210 | 56 | notation (latex output) | 
| 19674 | 57 |   length  ("|_|")
 | 
| 15469 | 58 | |
| 59 | (* nth *) | |
| 21210 | 60 | notation (latex output) | 
| 19674 | 61 |   nth  ("_\<^raw:\ensuremath{_{[\mathit{>_\<^raw:}]}}>" [1000,0] 1000)
 | 
| 15469 | 62 | |
| 63 | (* DUMMY *) | |
| 64 | consts DUMMY :: 'a ("\<^raw:\_>")
 | |
| 65 | ||
| 66 | (* THEOREMS *) | |
| 35251 
e244adbbc28f
modernized notation -- to make it work for authentic syntax;
 wenzelm parents: 
31462diff
changeset | 67 | notation (Rule output) | 
| 
e244adbbc28f
modernized notation -- to make it work for authentic syntax;
 wenzelm parents: 
31462diff
changeset | 68 |   "==>"  ("\<^raw:\mbox{}\inferrule{\mbox{>_\<^raw:}}>\<^raw:{\mbox{>_\<^raw:}}>")
 | 
| 
e244adbbc28f
modernized notation -- to make it work for authentic syntax;
 wenzelm parents: 
31462diff
changeset | 69 | |
| 15469 | 70 | syntax (Rule output) | 
| 71 | "_bigimpl" :: "asms \<Rightarrow> prop \<Rightarrow> prop" | |
| 72 |   ("\<^raw:\mbox{}\inferrule{>_\<^raw:}>\<^raw:{\mbox{>_\<^raw:}}>")
 | |
| 73 | ||
| 74 | "_asms" :: "prop \<Rightarrow> asms \<Rightarrow> asms" | |
| 75 |   ("\<^raw:\mbox{>_\<^raw:}\\>/ _")
 | |
| 76 | ||
| 77 |   "_asm" :: "prop \<Rightarrow> asms" ("\<^raw:\mbox{>_\<^raw:}>")
 | |
| 78 | ||
| 35251 
e244adbbc28f
modernized notation -- to make it work for authentic syntax;
 wenzelm parents: 
31462diff
changeset | 79 | notation (Axiom output) | 
| 
e244adbbc28f
modernized notation -- to make it work for authentic syntax;
 wenzelm parents: 
31462diff
changeset | 80 |   "Trueprop"  ("\<^raw:\mbox{}\inferrule{\mbox{}}{\mbox{>_\<^raw:}}>")
 | 
| 22328 
cc403d881873
added print-mode Axiom to print theorems without premises with a rule on top.
 schirmer parents: 
21210diff
changeset | 81 | |
| 35251 
e244adbbc28f
modernized notation -- to make it work for authentic syntax;
 wenzelm parents: 
31462diff
changeset | 82 | notation (IfThen output) | 
| 
e244adbbc28f
modernized notation -- to make it work for authentic syntax;
 wenzelm parents: 
31462diff
changeset | 83 |   "==>"  ("\<^raw:{\normalsize{}>If\<^raw:\,}> _/ \<^raw:{\normalsize \,>then\<^raw:\,}>/ _.")
 | 
| 15469 | 84 | syntax (IfThen output) | 
| 85 | "_bigimpl" :: "asms \<Rightarrow> prop \<Rightarrow> prop" | |
| 25467 | 86 |   ("\<^raw:{\normalsize{}>If\<^raw:\,}> _ /\<^raw:{\normalsize \,>then\<^raw:\,}>/ _.")
 | 
| 87 |   "_asms" :: "prop \<Rightarrow> asms \<Rightarrow> asms" ("\<^raw:\mbox{>_\<^raw:}> /\<^raw:{\normalsize \,>and\<^raw:\,}>/ _")
 | |
| 15469 | 88 |   "_asm" :: "prop \<Rightarrow> asms" ("\<^raw:\mbox{>_\<^raw:}>")
 | 
| 89 | ||
| 35251 
e244adbbc28f
modernized notation -- to make it work for authentic syntax;
 wenzelm parents: 
31462diff
changeset | 90 | notation (IfThenNoBox output) | 
| 
e244adbbc28f
modernized notation -- to make it work for authentic syntax;
 wenzelm parents: 
31462diff
changeset | 91 |   "==>"  ("\<^raw:{\normalsize{}>If\<^raw:\,}> _/ \<^raw:{\normalsize \,>then\<^raw:\,}>/ _.")
 | 
| 15469 | 92 | syntax (IfThenNoBox output) | 
| 93 | "_bigimpl" :: "asms \<Rightarrow> prop \<Rightarrow> prop" | |
| 25467 | 94 |   ("\<^raw:{\normalsize{}>If\<^raw:\,}> _ /\<^raw:{\normalsize \,>then\<^raw:\,}>/ _.")
 | 
| 95 |   "_asms" :: "prop \<Rightarrow> asms \<Rightarrow> asms" ("_ /\<^raw:{\normalsize \,>and\<^raw:\,}>/ _")
 | |
| 15469 | 96 |   "_asm" :: "prop \<Rightarrow> asms" ("_")
 | 
| 97 | ||
| 98 | end | |
| 99 | (*>*) |