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