CookBook/Tactical.thy
changeset 114 13fd0a83d3c3
parent 109 b4234e8a0202
child 118 5f003fdf2653
equal deleted inserted replaced
113:9b6c9d172378 114:13fd0a83d3c3
   664   a tactic that applies a rule according to the topmost logic connective in the 
   664   a tactic that applies a rule according to the topmost logic connective in the 
   665   subgoal (to illustrate this we only analyse a few connectives). The code
   665   subgoal (to illustrate this we only analyse a few connectives). The code
   666   of the tactic is as follows.\label{tac:selecttac}
   666   of the tactic is as follows.\label{tac:selecttac}
   667 *}
   667 *}
   668 
   668 
   669 ML %linenumbers{*fun select_tac (t,i) =
   669 ML %linenosgray{*fun select_tac (t,i) =
   670   case t of
   670   case t of
   671      @{term "Trueprop"} $ t' => select_tac (t',i)
   671      @{term "Trueprop"} $ t' => select_tac (t',i)
   672    | @{term "op \<Longrightarrow>"} $ _ $ t' => select_tac (t',i)
   672    | @{term "op \<Longrightarrow>"} $ _ $ t' => select_tac (t',i)
   673    | @{term "op \<and>"} $ _ $ _ => rtac @{thm conjI} i
   673    | @{term "op \<and>"} $ _ $ _ => rtac @{thm conjI} i
   674    | @{term "op \<longrightarrow>"} $ _ $ _ => rtac @{thm impI} i
   674    | @{term "op \<longrightarrow>"} $ _ $ _ => rtac @{thm impI} i