11020
|
1 |
|
|
2 |
header {* String examples *}
|
5199
|
3 |
|
10916
|
4 |
theory StringEx = Main:
|
|
5 |
|
|
6 |
lemma "hd ''ABCD'' = CHR ''A''"
|
|
7 |
by simp
|
|
8 |
|
|
9 |
lemma "hd ''ABCD'' \<noteq> CHR ''B''"
|
|
10 |
by simp
|
|
11 |
|
|
12 |
lemma "''ABCD'' \<noteq> ''ABCX''"
|
|
13 |
by simp
|
|
14 |
|
|
15 |
lemma "''ABCD'' = ''ABCD''"
|
|
16 |
by simp
|
|
17 |
|
11586
|
18 |
lemma "''ABCDEFGHIJKLMNOPQRSTUVWXYZ'' \<noteq>
|
|
19 |
''ABCDEFGHIJKLMNOPQRSTUVWXY''"
|
10916
|
20 |
by simp
|
|
21 |
|
|
22 |
lemma "set ''Foobar'' = {CHR ''F'', CHR ''a'', CHR ''b'', CHR ''o'', CHR ''r''}"
|
|
23 |
by (simp add: insert_commute)
|
|
24 |
|
|
25 |
lemma "set ''Foobar'' = ?X"
|
|
26 |
by (simp add: insert_commute)
|
|
27 |
|
|
28 |
end
|