doc-src/IsarImplementation/Thy/unused.thy
author wenzelm
Tue Sep 05 16:42:32 2006 +0200 (2006-09-05 ago)
changeset 20477 e623b0e30541
parent 20474 af069653f1d7
child 20491 98ba42f19995
permissions -rw-r--r--
tuned;
wenzelm@20477
     1
section {* Structured output *}
wenzelm@20477
     2
wenzelm@20477
     3
subsection {* Pretty printing *}
wenzelm@20477
     4
wenzelm@20477
     5
text FIXME
wenzelm@20477
     6
wenzelm@20477
     7
subsection {* Output channels *}
wenzelm@20477
     8
wenzelm@20477
     9
text FIXME
wenzelm@20477
    10
wenzelm@20477
    11
subsection {* Print modes \label{sec:print-mode} *}
wenzelm@20477
    12
wenzelm@20477
    13
text FIXME
wenzelm@18537
    14
wenzelm@18537
    15
text {*
wenzelm@20460
    16
wenzelm@20474
    17
wenzelm@20474
    18
  \medskip The general concept supports block-structured reasoning
wenzelm@20474
    19
  nicely, with arbitrary mechanisms for introducing local assumptions.
wenzelm@20474
    20
  The common reasoning pattern is as follows:
wenzelm@20474
    21
wenzelm@20474
    22
  \medskip
wenzelm@20474
    23
  \begin{tabular}{l}
wenzelm@20474
    24
  @{text "add_assms e\<^isub>1 A\<^isub>1"} \\
wenzelm@20474
    25
  @{text "\<dots>"} \\
wenzelm@20474
    26
  @{text "add_assms e\<^isub>n A\<^isub>n"} \\
wenzelm@20474
    27
  @{text "export"} \\
wenzelm@20474
    28
  \end{tabular}
wenzelm@20474
    29
  \medskip
wenzelm@20474
    30
wenzelm@20474
    31
  \noindent The final @{text "export"} will turn any fact @{text
wenzelm@20474
    32
  "A\<^isub>1, \<dots>, A\<^isub>n \<turnstile> B"} into some @{text "\<turnstile> B'"}, by
wenzelm@20474
    33
  applying the export rules @{text "e\<^isub>1, \<dots>, e\<^isub>n"}
wenzelm@20474
    34
  inside-out.
wenzelm@20470
    35
  
wenzelm@20470
    36
wenzelm@20470
    37
  A \emph{fixed variable} acts like a local constant in the current
wenzelm@20470
    38
  context, representing some simple type @{text "\<alpha>"}, or some value
wenzelm@20470
    39
  @{text "x: \<tau>"} (for a fixed type expression @{text "\<tau>"}).  A
wenzelm@20470
    40
  \emph{schematic variable} acts like a placeholder for arbitrary
wenzelm@20470
    41
  elements, similar to outermost quantification.  The division between
wenzelm@20470
    42
  fixed and schematic variables tells which abstract entities are
wenzelm@20470
    43
  inside and outside the current context.
wenzelm@20470
    44
wenzelm@20470
    45
wenzelm@20460
    46
  @{index_ML Variable.trade: "Proof.context -> (thm list -> thm list) -> thm list -> thm list"} \\
wenzelm@20460
    47
wenzelm@20460
    48
wenzelm@20460
    49
wenzelm@20460
    50
  \item @{ML Variable.trade} composes @{ML Variable.import} and @{ML
wenzelm@20460
    51
  Variable.export}, i.e.\ it provides a view on facts with all
wenzelm@20460
    52
  variables being fixed in the current context.
wenzelm@20460
    53
wenzelm@20460
    54
wenzelm@20429
    55
  In practice, super-contexts emerge either by merging existing ones,
wenzelm@20429
    56
  or by adding explicit declarations.  For example, new theories are
wenzelm@20429
    57
  usually derived by importing existing theories from the library
wenzelm@20429
    58
  @{text "\<Theta> = \<Theta>\<^sub>1 + \<dots> + \<Theta>\<^isub>n"}, or 
wenzelm@20429
    59
wenzelm@20429
    60
wenzelm@20429
    61
wenzelm@18537
    62
  The Isar toplevel works differently for interactive developments
wenzelm@18537
    63
  vs.\ batch processing of theory sources.  For example, diagnostic
wenzelm@18537
    64
  commands produce a warning batch mode, because they are considered
wenzelm@18537
    65
  alien to the final theory document being produced eventually.
wenzelm@18537
    66
  Moreover, full @{text undo} with intermediate checkpoints to protect
wenzelm@18537
    67
  against destroying theories accidentally are limited to interactive
wenzelm@18537
    68
  mode.  In batch mode there is only a single strictly linear stream
wenzelm@18537
    69
  of potentially desctructive theory transformations.
wenzelm@18537
    70
wenzelm@18537
    71
  \item @{ML Toplevel.empty} is an empty transition; the Isar command
wenzelm@18537
    72
  dispatcher internally applies @{ML Toplevel.name} (for the command)
wenzelm@18537
    73
  name and @{ML Toplevel.position} for the source position.
wenzelm@18537
    74
wenzelm@20429
    75
*}
wenzelm@20429
    76