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