equal
deleted
inserted
replaced
250 by (simp add: nat_of_char_def) |
250 by (simp add: nat_of_char_def) |
251 |
251 |
252 setup {* |
252 setup {* |
253 let |
253 let |
254 val nibbles = map_range (Thm.cterm_of @{theory} o HOLogic.mk_nibble) 16; |
254 val nibbles = map_range (Thm.cterm_of @{theory} o HOLogic.mk_nibble) 16; |
255 val simpset = HOL_ss addsimps |
255 val simpset = |
256 @{thms nat_of_nibble.simps mult_0 mult_1 add_0 add_0_right arith_simps numeral_plus_one}; |
256 put_simpset HOL_ss @{context} |
|
257 addsimps @{thms nat_of_nibble.simps mult_0 mult_1 add_0 add_0_right arith_simps numeral_plus_one}; |
257 fun mk_code_eqn x y = |
258 fun mk_code_eqn x y = |
258 Drule.instantiate' [] [SOME x, SOME y] @{thm nat_of_char_Char} |
259 Drule.instantiate' [] [SOME x, SOME y] @{thm nat_of_char_Char} |
259 |> simplify simpset; |
260 |> simplify simpset; |
260 val code_eqns = map_product mk_code_eqn nibbles nibbles; |
261 val code_eqns = map_product mk_code_eqn nibbles nibbles; |
261 in |
262 in |