src/HOL/Corec_Examples/Tests/Merge_A.thy
changeset 62696 7325d8573fb8
child 62726 5b2a7caa855b
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/HOL/Corec_Examples/Tests/Merge_A.thy	Tue Mar 22 12:39:37 2016 +0100
     1.3 @@ -0,0 +1,32 @@
     1.4 +(*  Title:      HOL/Corec_Examples/Tests/Merge_A.thy
     1.5 +    Author:     Aymeric Bouzy, Ecole polytechnique
     1.6 +    Author:     Jasmin Blanchette, Inria, LORIA, MPII
     1.7 +    Copyright   2015, 2016
     1.8 +
     1.9 +Tests theory merges.
    1.10 +*)
    1.11 +
    1.12 +section {* Tests Theory Merges *}
    1.13 +
    1.14 +theory Merge_A
    1.15 +imports "~~/src/HOL/Library/BNF_Corec"
    1.16 +begin
    1.17 +
    1.18 +codatatype 'a ta = Ca (sa1: 'a) (sa2: "'a ta")
    1.19 +
    1.20 +consts gb :: "'a ta \<Rightarrow> 'a ta"
    1.21 +
    1.22 +corec fa where
    1.23 +  "fa = Ca (Suc 0) fa"
    1.24 +
    1.25 +corec ga :: "'a ta \<Rightarrow> 'a ta" where
    1.26 +  "ga t = Ca (sa1 t) (sa2 t)"
    1.27 +
    1.28 +friend_of_corec ga :: "'a ta \<Rightarrow> 'a ta" where
    1.29 +  "ga t = Ca (sa1 t) (Ca (sa1 t) (sa2 t))"
    1.30 +  sorry
    1.31 +
    1.32 +thm ta.coinduct_upto
    1.33 +thm ta.cong_refl
    1.34 +
    1.35 +end