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