60770
|
1 |
section \<open>Example 3.8\<close>
|
4905
|
2 |
|
17248
|
3 |
theory Ex2
|
58974
|
4 |
imports "../LCF"
|
17248
|
5 |
begin
|
4905
|
6 |
|
47025
|
7 |
axiomatization
|
58977
|
8 |
P :: "'a \<Rightarrow> tr" and
|
|
9 |
F :: "'b \<Rightarrow> 'b" and
|
|
10 |
G :: "'a \<Rightarrow> 'a" and
|
|
11 |
H :: "'a \<Rightarrow> 'b \<Rightarrow> 'b" and
|
|
12 |
K :: "('a \<Rightarrow> 'b \<Rightarrow> 'b) \<Rightarrow> ('a \<Rightarrow> 'b \<Rightarrow> 'b)"
|
47025
|
13 |
where
|
|
14 |
F_strict: "F(UU) = UU" and
|
58977
|
15 |
K: "K = (\<lambda>h x y. P(x) \<Rightarrow> y | F(h(G(x),y)))" and
|
17248
|
16 |
H: "H = FIX(K)"
|
|
17 |
|
19755
|
18 |
declare F_strict [simp] K [simp]
|
|
19 |
|
58977
|
20 |
lemma example: "\<forall>x. F(H(x::'a,y::'b)) = H(x,F(y))"
|
19755
|
21 |
apply (simplesubst H)
|
58977
|
22 |
apply (induct "K:: ('a\<Rightarrow>'b\<Rightarrow>'b) \<Rightarrow> ('a\<Rightarrow>'b\<Rightarrow>'b)")
|
47025
|
23 |
apply simp
|
|
24 |
apply (simp split: COND_cases_iff)
|
19755
|
25 |
done
|
4905
|
26 |
|
|
27 |
end
|