src/HOL/ex/Case_Product.thy
author haftmann
Fri Oct 10 19:55:32 2014 +0200 (2014-10-10)
changeset 58646 cd63a4b12a33
parent 41828 d5b294734373
child 58889 5b7a9633cfa8
permissions -rw-r--r--
specialized specification: avoid trivial instances
noschinl@41828
     1
(*  Title:      HOL/ex/Case_Product.thy
noschinl@41828
     2
    Author:     Lars Noschinski
noschinl@41828
     3
    Copyright   2011 TU Muenchen
noschinl@41828
     4
*)
noschinl@41828
     5
noschinl@41828
     6
header {* Examples for the 'case_product' attribute *}
noschinl@41828
     7
noschinl@41828
     8
theory Case_Product
noschinl@41828
     9
imports Main
noschinl@41828
    10
begin
noschinl@41828
    11
noschinl@41828
    12
text {*
noschinl@41828
    13
  The {@attribute case_product} attribute combines multiple case distinction
noschinl@41828
    14
  lemmas into a single case distinction lemma by building the product of all
noschinl@41828
    15
  these case distinctions.
noschinl@41828
    16
*}
noschinl@41828
    17
noschinl@41828
    18
lemmas nat_list_exhaust = nat.exhaust[case_product list.exhaust]
noschinl@41828
    19
noschinl@41828
    20
text {*
noschinl@41828
    21
  The attribute honors preconditions
noschinl@41828
    22
*}
noschinl@41828
    23
noschinl@41828
    24
lemmas trancl_acc_cases= trancl.cases[case_product acc.cases]
noschinl@41828
    25
noschinl@41828
    26
text {*
noschinl@41828
    27
  Also, case names are generated based on the old names
noschinl@41828
    28
*}
noschinl@41828
    29
noschinl@41828
    30
end