CookBook/Solutions.thy
changeset 177 4e2341f6599d
parent 175 7c09bd3227c5
child 178 fb8f22dd8ad0
equal deleted inserted replaced
176:3da5f3f07d8b 177:4e2341f6599d
    77   handle TERM _ => NONE
    77   handle TERM _ => NONE
    78 end*}
    78 end*}
    79 
    79 
    80 text {* The setup for the simproc is *}
    80 text {* The setup for the simproc is *}
    81 
    81 
    82 simproc_setup add_sp ("t1 + t2") = {* K add_sp_aux *}
    82 simproc_setup %gray add_sp ("t1 + t2") = {* K add_sp_aux *}
    83  
    83  
    84 text {* and a test case is the lemma *}
    84 text {* and a test case is the lemma *}
    85 
    85 
    86 lemma "P (Suc (99 + 1)) ((0 + 0)::nat) (Suc (3 + 3 + 3)) (4 + 1)"
    86 lemma "P (Suc (99 + 1)) ((0 + 0)::nat) (Suc (3 + 3 + 3)) (4 + 1)"
    87   apply(tactic {* simp_tac (HOL_basic_ss addsimprocs [@{simproc add_sp}]) 1 *})
    87   apply(tactic {* simp_tac (HOL_basic_ss addsimprocs [@{simproc add_sp}]) 1 *})