src/Doc/Isar_Ref/Generic.thy
changeset 59782 5d801eff5647
parent 59780 23b67731f4f0
child 59785 4e6ab5831cc0
equal deleted inserted replaced
59781:a71dbf3481a2 59782:5d801eff5647
   483   follows.\footnote{Unlike the corresponding Isar proof methods, the
   483   follows.\footnote{Unlike the corresponding Isar proof methods, the
   484   ML tactics do not insist in changing the goal state.}
   484   ML tactics do not insist in changing the goal state.}
   485 
   485 
   486   \begin{center}
   486   \begin{center}
   487   \small
   487   \small
   488   \begin{supertabular}{|l|l|p{0.3\textwidth}|}
   488   \begin{tabular}{|l|l|p{0.3\textwidth}|}
   489   \hline
   489   \hline
   490   Isar method & ML tactic & behavior \\\hline
   490   Isar method & ML tactic & behavior \\\hline
   491 
   491 
   492   @{text "(simp (no_asm))"} & @{ML simp_tac} & assumptions are ignored
   492   @{text "(simp (no_asm))"} & @{ML simp_tac} & assumptions are ignored
   493   completely \\\hline
   493   completely \\\hline
   506 
   506 
   507   @{text "(simp (asm_lr))"} & @{ML asm_lr_simp_tac} & compatibility
   507   @{text "(simp (asm_lr))"} & @{ML asm_lr_simp_tac} & compatibility
   508   mode: an assumption is only used for simplifying assumptions which
   508   mode: an assumption is only used for simplifying assumptions which
   509   are to the right of it \\\hline
   509   are to the right of it \\\hline
   510 
   510 
   511   \end{supertabular}
   511   \end{tabular}
   512   \end{center}
   512   \end{center}
   513 \<close>
   513 \<close>
   514 
   514 
   515 
   515 
   516 subsubsection \<open>Examples\<close>
   516 subsubsection \<open>Examples\<close>
  1000   control over rule application, beyond higher-order pattern matching.
  1000   control over rule application, beyond higher-order pattern matching.
  1001   Declaring @{thm unit_eq} as @{attribute simp} directly would make
  1001   Declaring @{thm unit_eq} as @{attribute simp} directly would make
  1002   the Simplifier loop!  Note that a version of this simplification
  1002   the Simplifier loop!  Note that a version of this simplification
  1003   procedure is already active in Isabelle/HOL.\<close>
  1003   procedure is already active in Isabelle/HOL.\<close>
  1004 
  1004 
  1005 simproc_setup unit ("x::unit") = \<open>
  1005 simproc_setup unit ("x::unit") =
  1006   fn _ => fn _ => fn ct =>
  1006   \<open>fn _ => fn _ => fn ct =>
  1007     if HOLogic.is_unit (Thm.term_of ct) then NONE
  1007     if HOLogic.is_unit (Thm.term_of ct) then NONE
  1008     else SOME (mk_meta_eq @{thm unit_eq})
  1008     else SOME (mk_meta_eq @{thm unit_eq})\<close>
  1009 \<close>
       
  1010 
  1009 
  1011 text \<open>Since the Simplifier applies simplification procedures
  1010 text \<open>Since the Simplifier applies simplification procedures
  1012   frequently, it is important to make the failure check in ML
  1011   frequently, it is important to make the failure check in ML
  1013   reasonably fast.\<close>
  1012   reasonably fast.\<close>
  1014 
  1013