literal facts;
authorwenzelm
Fri, 28 Oct 2005 22:27:44 +0200
changeset 18021 99d170aebb6e
parent 18020 d23a846598d2
child 18022 c1bb6480534f
literal facts;
doc-src/IsarRef/isar-ref.tex
doc-src/IsarRef/pure.tex
doc-src/IsarRef/syntax.tex
--- a/doc-src/IsarRef/isar-ref.tex	Fri Oct 28 22:27:41 2005 +0200
+++ b/doc-src/IsarRef/isar-ref.tex	Fri Oct 28 22:27:44 2005 +0200
@@ -44,6 +44,9 @@
 \railalias{prop}{\railqtok{prop}}
 \railalias{atom}{\railqtok{atom}}
 
+\chardef\charbackquote=`\`
+\newcommand{\backquote}{\mbox{\tt\charbackquote}}
+
 \newcommand{\drv}{\mathrel{\vdash}}
 \newcommand{\edrv}{\mathop{\drv}\nolimits}
 \newcommand{\Or}{\mathrel{\;|\;}}
--- a/doc-src/IsarRef/pure.tex	Fri Oct 28 22:27:41 2005 +0200
+++ b/doc-src/IsarRef/pure.tex	Fri Oct 28 22:27:44 2005 +0200
@@ -1026,13 +1026,14 @@
 object-logic specific tools and packages (see chapters \ref{ch:gen-tools} and
 \ref{ch:logics}).
 
-\indexisarmeth{$-$}\indexisarmeth{assumption}
+\indexisarmeth{$-$}\indexisarmeth{fact}\indexisarmeth{assumption}
 \indexisarmeth{this}\indexisarmeth{rule}\indexisarmeth{iprover}
 \indexisarattof{Pure}{intro}\indexisarattof{Pure}{elim}
 \indexisarattof{Pure}{dest}\indexisarattof{Pure}{rule}
 \indexisaratt{OF}\indexisaratt{of}\indexisaratt{where}
 \begin{matharray}{rcl}
   - & : & \isarmeth \\
+  fact & : & \isarmeth \\
   assumption & : & \isarmeth \\
   this & : & \isarmeth \\
   rule & : & \isarmeth \\
@@ -1047,6 +1048,8 @@
 \end{matharray}
 
 \begin{rail}
+  'fact' thmrefs?
+  ;
   'rule' thmrefs?
   ;
   'iprover' ('!' ?) (rulemod *)
@@ -1073,6 +1076,14 @@
   \emph{do-nothing} proof step would be ``$\PROOF{-}$'' rather than
   $\PROOFNAME$ alone.
   
+\item [$fact~\vec a$] composes any previous fact from $\vec a$ (or implicitly
+  from the current proof context) modulo matching of schematic type and term
+  variables.  The rule structure is not taken into account, i.e.\ meta-level
+  implication is considered atomic.  This is the same principle underlying
+  literal facts (cf.\ \S\ref{sec:syn-att}): ``$\HAVE{}{\phi}~\BY{fact}$'' is
+  equivalent to ``$\NOTE{}{\backquote\phi\backquote}$'' provided that $\edrv
+  \phi$ is an instance of some known $\edrv \phi$ in the proof context.
+  
 \item [$assumption$] solves some goal by a single assumption step.  All given
   facts are guaranteed to participate in the refinement; this means there may
   be only $0$ or $1$ in the first place.  Recall that $\QEDNAME$ (see
--- a/doc-src/IsarRef/syntax.tex	Fri Oct 28 22:27:41 2005 +0200
+++ b/doc-src/IsarRef/syntax.tex	Fri Oct 28 22:27:44 2005 +0200
@@ -69,7 +69,8 @@
 
 \indexoutertoken{ident}\indexoutertoken{longident}\indexoutertoken{symident}
 \indexoutertoken{nat}\indexoutertoken{var}\indexoutertoken{typefree}
-\indexoutertoken{typevar}\indexoutertoken{string}\indexoutertoken{verbatim}
+\indexoutertoken{typevar}\indexoutertoken{string}\indexoutertoken{altstring}
+\indexoutertoken{verbatim}
 \begin{matharray}{rcl}
   ident & = & letter\,quasiletter^* \\
   longident & = & ident (\verb,.,ident)^+ \\
@@ -79,6 +80,7 @@
   typefree & = & \verb,',ident \\
   typevar & = & typefree ~|~ \verb,?,typefree ~|~ \verb,?,typefree\verb,.,nat \\
   string & = & \verb,", ~\dots~ \verb,", \\
+  altstring & = & \backquote ~\dots~ \backquote \\
   verbatim & = & \verb,{*, ~\dots~ \verb,*}, \\[1ex]
 
   letter & = & latin ~|~ \verb,\<,latin\verb,>, ~|~ \verb,\<,latin\,latin\verb,>, ~|~ greek ~|~ \\
@@ -102,10 +104,11 @@
 
 The syntax of $string$ admits any characters, including newlines; ``\verb|"|''
 (double-quote) and ``\verb|\|'' (backslash) need to be escaped by a backslash.
-The body of $verbatim$ may consist of any text not containing ``\verb|*}|'';
-this allows convenient inclusion of quotes without further escapes.  The greek
-letters do \emph{not} include \verb,\<lambda>,, which is already used
-differently in the meta-logic.
+Alternative strings according to $altstring$ are analogous, using single
+back-quotes instead.  The body of $verbatim$ may consist of any text not
+containing ``\verb|*}|''; this allows convenient inclusion of quotes without
+further escapes.  The greek letters do \emph{not} include \verb,\<lambda>,,
+which is already used differently in the meta-logic.
 
 Common mathematical symbols such as $\forall$ are represented in Isabelle as
 \verb,\<forall>,.  There are infinitely many legal symbols like this, although
@@ -338,10 +341,14 @@
 \railnonterm{thmdecl} usually refer to axioms, assumptions or results of goal
 statements, while \railnonterm{thmdef} collects lists of existing theorems.
 Existing theorems are given by \railnonterm{thmref} and \railnonterm{thmrefs},
-the former requires an actual singleton result.  An optional index selection
-specifies the individual theorems to be picked out of a given fact list.  Any
-kind of theorem specification may include lists of attributes both on the left
-and right hand sides; attributes are applied to any immediately preceding
+the former requires an actual singleton result.  There are three forms of
+theorem references: (1) named facts $a$, (2) selections from named facts $a(i,
+j - k)$, or (3) literal fact propositions using $altstring$ syntax
+$\backquote\phi\backquote$, (see also method $fact$ in
+\S\ref{sec:pure-meth-att}).
+
+Any kind of theorem specification may include lists of attributes both on the
+left and right hand sides; attributes are applied to any immediately preceding
 fact.  If names are omitted, the theorems are not stored within the theorem
 database of the theory or proof context, but any given attributes are applied
 nonetheless.
@@ -356,7 +363,7 @@
   ;
   thmdef: thmbind '='
   ;
-  thmref: nameref selection? attributes?
+  thmref: (nameref selection? | altstring) attributes?
   ;
   thmrefs: thmref +
   ;