doc-src/Ref/simplifier.tex
changeset 5575 9ea449586464
parent 5574 620130d6b8e6
child 5776 3bcc29d0c783
equal deleted inserted replaced
5574:620130d6b8e6 5575:9ea449586464
   265 
   265 
   266 \end{ttdescription}
   266 \end{ttdescription}
   267 
   267 
   268 
   268 
   269 \subsection{Accessing the current simpset}
   269 \subsection{Accessing the current simpset}
   270 
   270 \label{sec:access-current-simpset}
   271 \begin{ttbox}
   271 
   272 simpset        : unit -> simpset
   272 \begin{ttbox}
   273 simpset_ref    : unit -> simpset ref
   273 simpset        : unit   -> simpset
       
   274 simpset_ref    : unit   -> simpset ref
   274 simpset_of     : theory -> simpset
   275 simpset_of     : theory -> simpset
   275 simpset_ref_of : theory -> simpset ref
   276 simpset_ref_of : theory -> simpset ref
   276 SIMPSET        : (simpset -> tactic) -> tactic
       
   277 SIMPSET'       : (simpset -> 'a -> tactic) -> 'a -> tactic
       
   278 print_simpset  : theory -> unit
   277 print_simpset  : theory -> unit
       
   278 SIMPSET        :(simpset ->       tactic) ->       tactic
       
   279 SIMPSET'       :(simpset -> 'a -> tactic) -> 'a -> tactic
   279 \end{ttbox}
   280 \end{ttbox}
   280 
   281 
   281 Each theory contains a current simpset\index{simpset!current} stored
   282 Each theory contains a current simpset\index{simpset!current} stored
   282 within a private ML reference variable.  This can be retrieved and
   283 within a private ML reference variable.  This can be retrieved and
   283 modified as follows.
   284 modified as follows.
   294 \item[\ttindexbold{simpset_of} $thy$;] retrieves the simpset value
   295 \item[\ttindexbold{simpset_of} $thy$;] retrieves the simpset value
   295   from theory $thy$.
   296   from theory $thy$.
   296   
   297   
   297 \item[\ttindexbold{simpset_ref_of} $thy$;] retrieves the simpset
   298 \item[\ttindexbold{simpset_ref_of} $thy$;] retrieves the simpset
   298   reference variable from theory $thy$.
   299   reference variable from theory $thy$.
       
   300 
       
   301 \item[\ttindexbold{print_simpset} $thy$;] prints the current simpset
       
   302   of theory $thy$ in the same way as \texttt{print_ss}.
   299 
   303 
   300 \item[\ttindexbold{SIMPSET} $tacf$, \ttindexbold{SIMPSET'} $tacf'$]
   304 \item[\ttindexbold{SIMPSET} $tacf$, \ttindexbold{SIMPSET'} $tacf'$]
   301   are tacticals that make a tactic depend on the implicit current
   305   are tacticals that make a tactic depend on the implicit current
   302   simpset of the theory associated with the proof state they are
   306   simpset of the theory associated with the proof state they are
   303   applied on.
   307   applied on.
   304 
       
   305 \item[\ttindexbold{print_simpset} $thy$;] prints the current simpset
       
   306   of theory $thy$ in the same way as \texttt{print_ss}.
       
   307 
   308 
   308 \end{ttdescription}
   309 \end{ttdescription}
   309 
   310 
   310 \begin{warn}
   311 \begin{warn}
   311   There is a subtle difference between \texttt{(SIMPSET'~$tacf$)} and
   312   There is a subtle difference between \texttt{(SIMPSET'~$tacf$)} and