doc-src/IsarRef/pure.tex
changeset 12976 5cfe2941a5db
parent 12966 6373b4d09325
child 13016 c039b8ede204
equal deleted inserted replaced
12975:d796a2fd6c69 12976:5cfe2941a5db
   317 \end{matharray}
   317 \end{matharray}
   318 
   318 
   319 \begin{rail}
   319 \begin{rail}
   320   'axioms' (axmdecl prop +)
   320   'axioms' (axmdecl prop +)
   321   ;
   321   ;
   322   ('lemmas' | 'theorems') (thmdef? thmrefs + 'and')
   322   ('lemmas' | 'theorems') locale? (thmdef? thmrefs + 'and')
   323   ;
   323   ;
   324 \end{rail}
   324 \end{rail}
   325 
   325 
   326 \begin{descr}
   326 \begin{descr}
       
   327   
   327 \item [$\isarkeyword{axioms}~a: \phi$] introduces arbitrary statements as
   328 \item [$\isarkeyword{axioms}~a: \phi$] introduces arbitrary statements as
   328   axioms of the meta-logic.  In fact, axioms are ``axiomatic theorems'', and
   329   axioms of the meta-logic.  In fact, axioms are ``axiomatic theorems'', and
   329   may be referred later just as any other theorem.
   330   may be referred later just as any other theorem.
   330   
   331   
   331   Axioms are usually only introduced when declaring new logical systems.
   332   Axioms are usually only introduced when declaring new logical systems.
   332   Everyday work is typically done the hard way, with proper definitions and
   333   Everyday work is typically done the hard way, with proper definitions and
   333   actual proven theorems.
   334   actual proven theorems.
   334 \item [$\isarkeyword{lemmas}~a = \vec b$] stores existing facts.  Typical
   335   
   335   applications would also involve attributes, to declare Simplifier rules, for
   336 \item [$\isarkeyword{lemmas}~a = \vec b$] restrieves and stores existing facts
   336   example.
   337   in the theory context, or the specified locale (see also
       
   338   \S\ref{sec:locale}).  Typical applications would also involve attributes, to
       
   339   declare Simplifier rules, for example.
       
   340   
   337 \item [$\isarkeyword{theorems}$] is essentially the same as
   341 \item [$\isarkeyword{theorems}$] is essentially the same as
   338   $\isarkeyword{lemmas}$, but marks the result as a different kind of facts.
   342   $\isarkeyword{lemmas}$, but marks the result as a different kind of facts.
       
   343 
   339 \end{descr}
   344 \end{descr}
   340 
   345 
   341 
   346 
   342 \subsection{Name spaces}
   347 \subsection{Name spaces}
   343 
   348 
   719 Automated methods (such as $simp$ or $auto$) just insert any given facts
   724 Automated methods (such as $simp$ or $auto$) just insert any given facts
   720 before their usual operation.  Depending on the kind of procedure involved,
   725 before their usual operation.  Depending on the kind of procedure involved,
   721 the order of facts is less significant here.
   726 the order of facts is less significant here.
   722 
   727 
   723 
   728 
   724 \subsection{Goal statements}
   729 \subsection{Goal statements}\label{sec:goals}
   725 
   730 
   726 \indexisarcmd{lemma}\indexisarcmd{theorem}\indexisarcmd{corollary}
   731 \indexisarcmd{lemma}\indexisarcmd{theorem}\indexisarcmd{corollary}
   727 \indexisarcmd{have}\indexisarcmd{show}\indexisarcmd{hence}\indexisarcmd{thus}
   732 \indexisarcmd{have}\indexisarcmd{show}\indexisarcmd{hence}\indexisarcmd{thus}
   728 \begin{matharray}{rcl}
   733 \begin{matharray}{rcl}
   729   \isarcmd{lemma} & : & \isartrans{theory}{proof(prove)} \\
   734   \isarcmd{lemma} & : & \isartrans{theory}{proof(prove)} \\
  1125   ;
  1130   ;
  1126   'defer' nat?
  1131   'defer' nat?
  1127   ;
  1132   ;
  1128   'prefer' nat
  1133   'prefer' nat
  1129   ;
  1134   ;
  1130   'declare' thmrefs
  1135   'declare' locale? (thmrefs + 'and')
  1131   ;
  1136   ;
  1132 \end{rail}
  1137 \end{rail}
  1133 
  1138 
  1134 \begin{descr}
  1139 \begin{descr}
  1135 \item [$\APPLY{m}$] applies proof method $m$ in initial position, but unlike
  1140 \item [$\APPLY{m}$] applies proof method $m$ in initial position, but unlike
  1161   the latest proof command.\footnote{Unlike the ML function \texttt{back}
  1166   the latest proof command.\footnote{Unlike the ML function \texttt{back}
  1162     \cite{isabelle-ref}, the Isar command does not search upwards for further
  1167     \cite{isabelle-ref}, the Isar command does not search upwards for further
  1163     branch points.} Basically, any proof command may return multiple results.
  1168     branch points.} Basically, any proof command may return multiple results.
  1164   
  1169   
  1165 \item [$\isarkeyword{declare}~thms$] declares theorems to the current theory
  1170 \item [$\isarkeyword{declare}~thms$] declares theorems to the current theory
  1166   context.  No theorem binding is involved here, unlike
  1171   context (or the specified locale, see also \S\ref{sec:locale}).  No theorem
  1167   $\isarkeyword{theorems}$ or $\isarkeyword{lemmas}$ (cf.\ 
  1172   binding is involved here, unlike $\isarkeyword{theorems}$ or
  1168   \S\ref{sec:axms-thms}).  So $\isarkeyword{declare}$ only has the effect of
  1173   $\isarkeyword{lemmas}$ (cf.\ \S\ref{sec:axms-thms}), so
  1169   applying attributes as included in the theorem specification.
  1174   $\isarkeyword{declare}$ only has the effect of applying attributes as
       
  1175   included in the theorem specification.
  1170 \end{descr}
  1176 \end{descr}
  1171 
  1177 
  1172 Any proper Isar proof method may be used with tactic script commands such as
  1178 Any proper Isar proof method may be used with tactic script commands such as
  1173 $\APPLYNAME$.  A few additional emulations of actual tactics are provided as
  1179 $\APPLYNAME$.  A few additional emulations of actual tactics are provided as
  1174 well; these would be never used in actual structured proofs, of course.
  1180 well; these would be never used in actual structured proofs, of course.