equal
deleted
inserted
replaced
35 by (Fast_tac 1); |
35 by (Fast_tac 1); |
36 val de_morgan = result(); |
36 val de_morgan = result(); |
37 |
37 |
38 (* Lists *) |
38 (* Lists *) |
39 |
39 |
40 val list_ss = simpset_of List.thy; |
40 Goal "hd(l@m) = (if l~=[] then hd(l) else hd(m))"; |
41 |
|
42 goal List.thy "hd(l@m) = (if l~=[] then hd(l) else hd(m))"; |
|
43 by (induct_tac "l" 1); |
41 by (induct_tac "l" 1); |
44 by (simp_tac list_ss 1); |
42 by (Simp_tac 1); |
45 by (simp_tac list_ss 1); |
43 by (Simp_tac 1); |
46 val hd_append =result(); |
44 val hd_append =result(); |
47 |
45 |
48 goal List.thy "l ~= [] --> (? x xs. l = (x#xs))"; |
46 Goal "l ~= [] --> (? x xs. l = (x#xs))"; |
49 by (induct_tac "l" 1); |
47 by (induct_tac "l" 1); |
50 by (simp_tac list_ss 1); |
48 by (Simp_tac 1); |
51 by (Fast_tac 1); |
49 by (Fast_tac 1); |
52 qed"cons_not_nil"; |
50 qed"cons_not_nil"; |