| 41828 |      1 | (*  Title:      HOL/ex/Case_Product.thy
 | 
|  |      2 |     Author:     Lars Noschinski
 | 
|  |      3 |     Copyright   2011 TU Muenchen
 | 
|  |      4 | *)
 | 
|  |      5 | 
 | 
| 61343 |      6 | section \<open>Examples for the 'case_product' attribute\<close>
 | 
| 41828 |      7 | 
 | 
|  |      8 | theory Case_Product
 | 
|  |      9 | imports Main
 | 
|  |     10 | begin
 | 
|  |     11 | 
 | 
| 61343 |     12 | text \<open>
 | 
| 65563 |     13 |   The @{attribute case_product} attribute combines multiple case distinction
 | 
| 41828 |     14 |   lemmas into a single case distinction lemma by building the product of all
 | 
|  |     15 |   these case distinctions.
 | 
| 61343 |     16 | \<close>
 | 
| 41828 |     17 | 
 | 
| 65563 |     18 | lemmas nat_list_exhaust = nat.exhaust [case_product list.exhaust]
 | 
| 41828 |     19 | 
 | 
| 65563 |     20 | text \<open>The attribute honours preconditions.\<close>
 | 
| 41828 |     21 | 
 | 
| 65563 |     22 | lemmas trancl_acc_cases = trancl.cases [case_product acc.cases]
 | 
| 41828 |     23 | 
 | 
| 65563 |     24 | text \<open>Also, case names are generated based on the old names.\<close>
 | 
| 41828 |     25 | 
 | 
|  |     26 | end
 |