src/HOL/Lifting_Sum.thy
author kuncar
Thu, 10 Apr 2014 17:48:32 +0200
changeset 57867 b5b6ad5dc2ae
parent 57862 3373f5d1e074
child 57868 58ac520db7ae
permissions -rw-r--r--
simplify and fix theories thanks to 356a5efdb278
     1 (*  Title:      HOL/Lifting_Sum.thy
     2     Author:     Brian Huffman and Ondrej Kuncar
     3 *)
     4 
     5 header {* Setup for Lifting/Transfer for the sum type *}
     6 
     7 theory Lifting_Sum
     8 imports Lifting Basic_BNFs
     9 begin
    10 
    11 subsection {* Transfer rules for the Transfer package *}
    12 
    13 context
    14 begin
    15 interpretation lifting_syntax .
    16 
    17 lemma Inl_transfer [transfer_rule]: "(A ===> rel_sum A B) Inl Inl"
    18   unfolding rel_fun_def by simp
    19 
    20 lemma Inr_transfer [transfer_rule]: "(B ===> rel_sum A B) Inr Inr"
    21   unfolding rel_fun_def by simp
    22 
    23 lemma case_sum_transfer [transfer_rule]:
    24   "((A ===> C) ===> (B ===> C) ===> rel_sum A B ===> C) case_sum case_sum"
    25   unfolding rel_fun_def rel_sum_def by (simp split: sum.split)
    26 
    27 end
    28 
    29 end