NEWS
changeset 18601 b248754b60bc
parent 18590 f6a553aa3d81
child 18642 6954633b6a76
equal deleted inserted replaced
18600:20ad06db427b 18601:b248754b60bc
   146 new format.
   146 new format.
   147 
   147 
   148 * Provers/induct: improved handling of simultaneous goals.  Instead of
   148 * Provers/induct: improved handling of simultaneous goals.  Instead of
   149 introducing object-level conjunction, the statement is now split into
   149 introducing object-level conjunction, the statement is now split into
   150 several conclusions, while the corresponding symbolic cases are
   150 several conclusions, while the corresponding symbolic cases are
   151 duplicated accordingly.  INCOMPATIBILITY, proofs need to be structured
   151 nested accordingly.  INCOMPATIBILITY, proofs need to be structured
   152 explicitly, e.g. like this:
   152 explicitly.  For example:
   153 
   153 
   154   lemma
   154   lemma
   155     fixes n :: nat
   155     fixes n :: nat
   156     shows "P n" and "Q n"
   156     shows "P n" and "Q n"
   157   proof (induct n)
   157   proof (induct n)
   158     case 01
   158     case 0 case 1
   159     show "P 0" sorry
   159     show "P 0" sorry
   160   next
   160   next
   161     case 02
   161     case 0 case 2
   162     show "Q 0" sorry
   162     show "Q 0" sorry
   163   next
   163   next
   164     case (Suc1 n)
   164     case (Suc n) case 1
   165     note `P n` and `Q n`
   165     note `P n` and `Q n`
   166     show "P (Suc n)" sorry
   166     show "P (Suc n)" sorry
   167   next
   167   next
   168     case (Suc2 n)
   168     case (Suc n) case 2
   169     note `P n` and `Q n`
   169     note `P n` and `Q n`
   170     show "Q (Suc n)" sorry
   170     show "Q (Suc n)" sorry
       
   171   qed
       
   172 
       
   173 The split into subcases may be deferred as follows -- this is
       
   174 particularly relevant for goal statements with local premises.
       
   175 
       
   176   lemma
       
   177     fixes n :: nat
       
   178     shows "A n ==> P n" and "B n ==> Q n"
       
   179   proof (induct n)
       
   180     case 0
       
   181     {
       
   182       case 1
       
   183       note `A 0`
       
   184       show "P 0" sorry
       
   185     next
       
   186       case 2
       
   187       note `B 0`
       
   188       show "Q 0" sorry
       
   189     }
       
   190   next
       
   191     case (Suc n)
       
   192     note `A n ==> P n` and `B n ==> Q n`
       
   193     {
       
   194       case 1
       
   195       note `A (Suc n)`
       
   196       show "P (Suc n)" sorry
       
   197     next
       
   198       case 2
       
   199       note `B (Suc n)`
       
   200       show "Q (Suc n)" sorry
       
   201     }
   171   qed
   202   qed
   172 
   203 
   173 If simultaneous goals are to be used with mutual rules, the statement
   204 If simultaneous goals are to be used with mutual rules, the statement
   174 needs to be structured carefully as a two-level conjunction, using
   205 needs to be structured carefully as a two-level conjunction, using
   175 lists of propositions separated by 'and':
   206 lists of propositions separated by 'and':