11548
|
1 |
"You know my methods. Apply them!"
|
|
2 |
|
10281
|
3 |
Implementation
|
|
4 |
==============
|
10177
|
5 |
|
11158
|
6 |
- (#2 * x) = #2 * - x is not proved by arith
|
|
7 |
|
11160
|
8 |
a simp command for terms
|
|
9 |
|
|
10 |
----------------------------------------------------------------------
|
|
11 |
primrec
|
|
12 |
"(foorec [] []) = []"
|
|
13 |
"(foorec [] (y # ys)) = (y # (foorec [] ys))"
|
|
14 |
|
|
15 |
*** Primrec definition error:
|
|
16 |
*** extra variables on rhs: "y", "ys"
|
|
17 |
*** in
|
|
18 |
*** "((foorec [] ((y::'a_1) # (ys::'a_1 list))) = (y # (foorec [] ys)))"
|
|
19 |
*** At command "primrec".
|
|
20 |
|
|
21 |
Bessere Fehlermeldung!
|
|
22 |
----------------------------------------------------------------------
|
|
23 |
|
10608
|
24 |
Relation: comp -> composition
|
10177
|
25 |
|
|
26 |
Add map_cong?? (upto 10% slower)
|
|
27 |
|
10281
|
28 |
Recdef: Get rid of function name in header.
|
|
29 |
Support mutual recursion (Konrad?)
|
10177
|
30 |
|
11282
|
31 |
improve solver in simplifier: treat & and ! ...
|
|
32 |
|
|
33 |
better 1 point rules:
|
|
34 |
!x. !y. x = f y --> P x y should reduce to !y. P (f y) y.
|
|
35 |
|
10177
|
36 |
use arith_tac in recdef to solve termination conditions?
|
|
37 |
-> new example in Recdef/termination
|
|
38 |
|
|
39 |
a tactic for replacing a specific occurrence:
|
10654
|
40 |
apply(subst [2] thm)
|
10177
|
41 |
|
10186
|
42 |
it would be nice if @term could deal with ?-vars.
|
|
43 |
then a number of (unchecked!) @texts could be converted to @terms.
|
|
44 |
|
10189
|
45 |
it would be nice if one could get id to the enclosing quotes in the [source] option.
|
|
46 |
|
10281
|
47 |
More predefined functions for datatypes: map?
|
|
48 |
|
|
49 |
Induction rules for int: int_le/ge_induct?
|
|
50 |
Needed for ifak example. But is that example worth it?
|
|
51 |
|
10608
|
52 |
Komischerweise geht das Splitten von _Annahmen_ auch mit simp_tac, was
|
|
53 |
ein generelles Feature ist, das man vielleicht mal abstellen sollte.
|
|
54 |
|
10520
|
55 |
proper mutual simplification
|
|
56 |
|
|
57 |
defs with = and pattern matching??
|
10340
|
58 |
|
10186
|
59 |
|
10177
|
60 |
Minor fixes in the tutorial
|
|
61 |
===========================
|
|
62 |
|
11561
|
63 |
1/2 no longer abbrevs for Suc.
|
|
64 |
Warning: needs simplification to turn 1 into Suc 0. arith does so
|
|
65 |
automatically.
|
|
66 |
|
11282
|
67 |
recdef: failed tcs no longer shown! (sec:Recursion over nested datatypes)
|
11256
|
68 |
say something about how conditions are proved?
|
|
69 |
No, better show failed proof attempts.
|
11160
|
70 |
|
11256
|
71 |
Advanced recdef: explain recdef_tc? No. Adjust recdef!
|
11160
|
72 |
|
10983
|
73 |
Adjust FP textbook refs: new Bird, Hudak
|
|
74 |
Discrete math textbook: Rosen?
|
10340
|
75 |
|
10983
|
76 |
adjust type of ^ in tab:overloading
|
10509
|
77 |
|
10177
|
78 |
an example of induction: !y. A --> B --> C ??
|
|
79 |
|
10509
|
80 |
Explain type_definition and mention pre-proved thms in subset.thy?
|
|
81 |
-> Types/typedef
|
|
82 |
|
10177
|
83 |
Appendix: Lexical: long ids.
|
|
84 |
|
|
85 |
Warning: infixes automatically become reserved words!
|
|
86 |
|
|
87 |
Forward ref from blast proof of Puzzle (AdvancedInd) to Isar proof?
|
|
88 |
|
|
89 |
recdef with nested recursion: either an example or at least a pointer to the
|
|
90 |
literature. In Recdef/termination.thy, at the end.
|
|
91 |
%FIXME, with one exception: nested recursion.
|
|
92 |
|
11202
|
93 |
Syntax section: syntax annotations not just for consts but also for constdefs and datatype.
|
10186
|
94 |
|
10283
|
95 |
Appendix with list functions.
|
|
96 |
|
11235
|
97 |
All theory sources on the web?
|
|
98 |
|
10177
|
99 |
|
|
100 |
Minor additions to the tutorial, unclear where
|
|
101 |
==============================================
|
|
102 |
|
10855
|
103 |
unfold?
|
10845
|
104 |
|
10177
|
105 |
|
|
106 |
Possible exercises
|
|
107 |
==================
|
|
108 |
|
|
109 |
Exercises
|
10971
|
110 |
|
|
111 |
For extensionality (in Sets chapter): prove
|
|
112 |
valif o norm = valif
|
|
113 |
in If-expression case study (Ifexpr)
|
10177
|
114 |
|
|
115 |
Nested inductive datatypes: another example/exercise:
|
|
116 |
size(t) <= size(subst s t)?
|
|
117 |
|
|
118 |
insertion sort: primrec, later recdef
|
|
119 |
|
|
120 |
OTree:
|
|
121 |
first version only for non-empty trees:
|
|
122 |
Tip 'a | Node tree tree
|
|
123 |
Then real version?
|
|
124 |
First primrec, then recdef?
|
|
125 |
|
|
126 |
Ind. sets: define ABC inductively and prove
|
|
127 |
ABC = {rep A n @ rep B n @ rep C n. True}
|
|
128 |
|
10654
|
129 |
Partial rekursive functions / Nontermination:
|
|
130 |
|
|
131 |
Exercise: ?! f. !i. f i = if i=0 then 1 else i*f(i-1)
|
|
132 |
(What about sum? Is there one, a unique one?)
|
|
133 |
|
|
134 |
Exercise
|
|
135 |
Better(?) sum i = fst(while (%(s,i). i=0) (%(s,i). (s+i,i-1)) (0,i))
|
|
136 |
Prove 0 <= i ==> sum i = i*(i+1) via while-rule
|
|
137 |
|
10177
|
138 |
Possible examples/case studies
|
|
139 |
==============================
|
|
140 |
|
|
141 |
Trie: Define functional version
|
|
142 |
datatype ('a,'b)trie = Trie ('b option) ('a => ('a,'b)trie option)
|
|
143 |
lookup t [] = value t
|
|
144 |
lookup t (a#as) = case tries t a of None => None | Some s => lookup s as
|
|
145 |
Maybe as an exercise?
|
|
146 |
|
|
147 |
Trie: function for partial matches (prefixes). Needs sets for spec/proof.
|
|
148 |
|
|
149 |
Sets via ordered list of intervals. (Isa/Interval(2))
|
|
150 |
|
|
151 |
propositional logic (soundness and completeness?),
|
|
152 |
predicate logic (soundness?),
|
|
153 |
|
|
154 |
Tautology checker. Based on Ifexpr or prop.logic?
|
|
155 |
Include forward reference in relevant section.
|
|
156 |
|
|
157 |
Sorting with comp-parameter and with type class (<)
|
|
158 |
|
10654
|
159 |
Recdef:more example proofs:
|
|
160 |
if-normalization with measure function,
|
|
161 |
nested if-normalization,
|
|
162 |
quicksort
|
|
163 |
Trie?
|
|
164 |
|
10177
|
165 |
New book by Bird?
|
|
166 |
|
|
167 |
Steps Towards Mechanizing Program Transformations Using PVS by N. Shankar,
|
|
168 |
Science of Computer Programming, 26(1-3):33-57, 1996.
|
|
169 |
You can get it from http://www.csl.sri.com/scp95.html
|
|
170 |
|
|
171 |
J Moore article Towards a ...
|
|
172 |
Mergesort, JVM
|
|
173 |
|
|
174 |
|
|
175 |
Additional topics
|
|
176 |
=================
|
|
177 |
|
10281
|
178 |
Recdef with nested recursion?
|
10177
|
179 |
|
|
180 |
Extensionality: applications in
|
|
181 |
- boolean expressions: valif o bool2if = value
|
|
182 |
- Advanced datatypes exercise subst (f o g) = subst f o subst g
|
|
183 |
|
|
184 |
A look at the library?
|
10281
|
185 |
Map.
|
10177
|
186 |
|
|
187 |
Prototyping?
|
|
188 |
|
|
189 |
==============================================================
|