equal
deleted
inserted
replaced
161 by (res_inst_tac [("n", "n")] natE 1); |
161 by (res_inst_tac [("n", "n")] natE 1); |
162 by (asm_simp_tac (!simpset addsimps [ntrunc_0]) 1); |
162 by (asm_simp_tac (!simpset addsimps [ntrunc_0]) 1); |
163 by (rename_tac "n'" 1); |
163 by (rename_tac "n'" 1); |
164 by (res_inst_tac [("n", "n'")] natE 1); |
164 by (res_inst_tac [("n", "n'")] natE 1); |
165 by (asm_simp_tac (!simpset addsimps [CONS_def, ntrunc_one_In1]) 1); |
165 by (asm_simp_tac (!simpset addsimps [CONS_def, ntrunc_one_In1]) 1); |
166 by (asm_simp_tac (!simpset addsimps [CONS_def, ntrunc_In1, ntrunc_Scons]) 1); |
166 by (asm_simp_tac (!simpset addsimps [CONS_def, ntrunc_In1, ntrunc_Scons, less_Suc_eq]) 1); |
167 qed "LListD_implies_ntrunc_equality"; |
167 qed "LListD_implies_ntrunc_equality"; |
168 |
168 |
169 (*The domain of the LListD relation*) |
169 (*The domain of the LListD relation*) |
170 goalw LList.thy (llist.defs @ [NIL_def, CONS_def]) |
170 goalw LList.thy (llist.defs @ [NIL_def, CONS_def]) |
171 "fst``LListD(diag(A)) <= llist(A)"; |
171 "fst``LListD(diag(A)) <= llist(A)"; |
305 by (simp_tac (!simpset setloop (split_tac [expand_sum_case])) 1); |
305 by (simp_tac (!simpset setloop (split_tac [expand_sum_case])) 1); |
306 by (strip_tac 1); |
306 by (strip_tac 1); |
307 by (res_inst_tac [("n", "n")] natE 1); |
307 by (res_inst_tac [("n", "n")] natE 1); |
308 by (res_inst_tac [("n", "xb")] natE 2); |
308 by (res_inst_tac [("n", "xb")] natE 2); |
309 by (ALLGOALS(asm_simp_tac(!simpset addsimps |
309 by (ALLGOALS(asm_simp_tac(!simpset addsimps |
310 [ntrunc_0,ntrunc_one_CONS,ntrunc_CONS]))); |
310 [ntrunc_0,ntrunc_one_CONS,ntrunc_CONS, less_Suc_eq]))); |
311 result(); |
311 result(); |
312 |
312 |
313 |
313 |
314 (*** Lconst -- defined directly using lfp, but equivalent to a LList_corec ***) |
314 (*** Lconst -- defined directly using lfp, but equivalent to a LList_corec ***) |
315 |
315 |