src/HOL/Corec_Examples/Tests/Merge_D.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_D.thy	Tue Mar 22 12:39:37 2016 +0100
     1.3 @@ -0,0 +1,41 @@
     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_D
    1.15 +imports Merge_B Merge_C
    1.16 +begin
    1.17 +
    1.18 +thm ta.coinduct_upto
    1.19 +
    1.20 +(* Merges files having defined their own friends and uses these friends to
    1.21 +define another corecursive function. *)
    1.22 +
    1.23 +corec gd where
    1.24 +  "gd = fc (gc (gb (fb (ga (Ca 0 gd)))))"
    1.25 +
    1.26 +thm gd_def
    1.27 +
    1.28 +term fc
    1.29 +
    1.30 +corec hd :: "('a::zero) ta \<Rightarrow> 'a ta" where
    1.31 +  "hd s = fc (gc (gb (fb (ga (Ca 0 (hd s))))))"
    1.32 +
    1.33 +friend_of_corec hd where
    1.34 +  "hd s = Ca 0 (fc (gc (gb (fb (ga (Ca 0 (hd s)))))))"
    1.35 +  sorry
    1.36 +
    1.37 +corecursive (friend) ff :: "'a ta \<Rightarrow> 'a ta" where
    1.38 +  "ff x = Ca undefined (ff x)"
    1.39 +  sorry
    1.40 +
    1.41 +thm ta.cong_intros
    1.42 +thm ta.cong_gb
    1.43 +
    1.44 +end