equal
deleted
inserted
replaced
1 (* Title: HOL/Map.ML |
1 (* Title: HOL/Map.ML |
2 ID: $Id$ |
2 ID: $Id$ |
3 Author: Tobias Nipkow |
3 Author: Tobias Nipkow |
4 Copyright 1997 TU Muenchen |
4 Copyright 1997 TU Muenchen |
5 |
5 |
6 Map lemmas |
6 Map lemmas. |
7 *) |
7 *) |
8 |
8 |
9 section "empty"; |
9 section "empty"; |
10 |
10 |
11 Goalw [empty_def] "empty k = None"; |
11 Goalw [empty_def] "empty k = None"; |
12 by (Simp_tac 1); |
12 by (Simp_tac 1); |
13 qed "empty_def2"; |
13 qed "empty_def2"; |
14 Addsimps [empty_def2]; |
14 Addsimps [empty_def2]; |
|
15 |
|
16 Goal "empty(x := None) = empty"; |
|
17 by (rtac ext 1); |
|
18 by (Simp_tac 1); |
|
19 qed "empty_upd_none"; |
|
20 Addsimps [empty_upd_none]; |
15 |
21 |
16 Goal "sum_case empty empty = empty"; |
22 Goal "sum_case empty empty = empty"; |
17 by (rtac ext 1); |
23 by (rtac ext 1); |
18 by (simp_tac (simpset() addsplits [sum.split]) 1); |
24 by (simp_tac (simpset() addsplits [sum.split]) 1); |
19 qed "sum_case_empty_empty"; |
25 qed "sum_case_empty_empty"; |
200 qed "dom_map_upd"; |
206 qed "dom_map_upd"; |
201 Addsimps [dom_map_upd]; |
207 Addsimps [dom_map_upd]; |
202 |
208 |
203 Goalw [dom_def] "finite (dom (map_of l))"; |
209 Goalw [dom_def] "finite (dom (map_of l))"; |
204 by (induct_tac "l" 1); |
210 by (induct_tac "l" 1); |
205 by (auto_tac (claset(), |
211 by (auto_tac (claset(), |
206 simpset() addsimps [insert_Collect RS sym])); |
212 simpset() addsimps [insert_Collect RS sym])); |
207 qed "finite_dom_map_of"; |
213 qed "finite_dom_map_of"; |
208 |
214 |
209 Goalw [dom_def] "dom(m++n) = dom n Un dom m"; |
215 Goalw [dom_def] "dom(m++n) = dom n Un dom m"; |
210 by Auto_tac; |
216 by Auto_tac; |
211 qed "dom_override"; |
217 qed "dom_override"; |