1 |
1 |
2 (** some basic simplifiactions **) |
2 (*Note: any of these goals may be solved by a single stroke of |
|
3 auto(); or force 1;*) |
|
4 |
|
5 |
|
6 (* some basic simplifications *) |
3 |
7 |
4 Goal "!!m n p. x (| x = m, y = n, ... = p |) = m"; |
8 Goal "!!m n p. x (| x = m, y = n, ... = p |) = m"; |
5 by (Simp_tac 1); |
9 by (Simp_tac 1); |
|
10 result(); |
6 |
11 |
7 Goal "!!m n p. (| x = m, y = n, ... = p |) (| x:= 0 |) = (| x = 0, y = n, ... = p |)"; |
12 Goal "!!m n p. (| x = m, y = n, ... = p |) (| x:= 0 |) = (| x = 0, y = n, ... = p |)"; |
8 by (Simp_tac 1); |
13 by (Simp_tac 1); |
|
14 result(); |
9 |
15 |
10 |
16 |
11 |
17 (* splitting quantifiers *) |
12 (** splitting **) |
|
13 |
18 |
14 Goal "!!r m n. r (| x := n |) (| y := m |) = r (| y := m |) (| x := n |)"; |
19 Goal "!!r m n. r (| x := n |) (| y := m |) = r (| y := m |) (| x := n |)"; |
15 by (record_split_tac 1); |
20 by (record_split_tac 1); |
16 by (Simp_tac 1); |
21 by (Simp_tac 1); |
|
22 result(); |
17 |
23 |
18 Goal "!!r m n. r (| x := n |) (| x := m |) = r (| x := m |)"; |
24 Goal "!!r m n. r (| x := n |) (| x := m |) = r (| x := m |)"; |
19 by (record_split_tac 1); |
25 by (record_split_tac 1); |
20 by (Simp_tac 1); |
26 by (Simp_tac 1); |
|
27 result(); |
21 |
28 |
22 |
29 |
23 |
30 (* record equality *) |
24 (** Equality **) |
|
25 |
31 |
26 Goal "!!r. (| x = n, y = p |) = (| x = n', y = p' |) & n = 0 ==> n' = 0"; |
32 Goal "!!r. (| x = n, y = p |) = (| x = n', y = p' |) & n = 0 ==> n' = 0"; |
27 by (Asm_full_simp_tac 1); |
33 by (Asm_full_simp_tac 1); |
28 by (Fast_tac 1); |
34 by (Blast_tac 1); |
|
35 result(); |
29 |
36 |
30 Goalw [getX_def, setX_def, incX_def] "!!r n. incX r = setX r (Suc (getX r))"; |
37 Goalw [getX_def, setX_def, incX_def] "!!r n. incX r = setX r (Suc (getX r))"; |
31 by (record_split_tac 1); |
38 by (record_split_tac 1); |
32 by (Simp_tac 1); |
39 by (Simp_tac 1); |
|
40 result(); |