author | wenzelm |
Tue, 27 Jul 1999 22:04:30 +0200 | |
changeset 7108 | 0229ce6735f6 |
parent 5291 | 5706f0ef1d43 |
child 9245 | 428385c4bc50 |
permissions | -rw-r--r-- |
2640 | 1 |
(* Title: HOLCF/Cfun1.ML |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
2 |
ID: $Id$ |
1461 | 3 |
Author: Franz Regensburger |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
4 |
Copyright 1993 Technische Universitaet Muenchen |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
5 |
|
2640 | 6 |
Lemmas for Cfun1.thy |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
7 |
*) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
8 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
9 |
open Cfun1; |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
10 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
11 |
(* ------------------------------------------------------------------------ *) |
5291 | 12 |
(* derive old type definition rules for Abs_CFun & Rep_CFun *) |
13 |
(* Rep_CFun and Abs_CFun should be replaced by Rep_Cfun anf Abs_Cfun in future *) |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
14 |
(* ------------------------------------------------------------------------ *) |
5291 | 15 |
qed_goal "Rep_Cfun" thy "Rep_CFun fo : CFun" |
2640 | 16 |
(fn prems => |
1461 | 17 |
[ |
2640 | 18 |
(rtac Rep_CFun 1) |
1461 | 19 |
]); |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
20 |
|
5291 | 21 |
qed_goal "Rep_Cfun_inverse" thy "Abs_CFun (Rep_CFun fo) = fo" |
2640 | 22 |
(fn prems => |
23 |
[ |
|
24 |
(rtac Rep_CFun_inverse 1) |
|
25 |
]); |
|
26 |
||
5291 | 27 |
qed_goal "Abs_Cfun_inverse" thy "f:CFun==>Rep_CFun(Abs_CFun f)=f" |
2640 | 28 |
(fn prems => |
29 |
[ |
|
30 |
(cut_facts_tac prems 1), |
|
31 |
(etac Abs_CFun_inverse 1) |
|
32 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
33 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
34 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
35 |
(* less_cfun is a partial order on type 'a -> 'b *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
36 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
37 |
|
3323
194ae2e0c193
eliminated the constant less by the introduction of the axclass sq_ord
slotosch
parents:
2838
diff
changeset
|
38 |
qed_goalw "refl_less_cfun" thy [less_cfun_def] "(f::'a->'b) << f" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
39 |
(fn prems => |
1461 | 40 |
[ |
41 |
(rtac refl_less 1) |
|
42 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
43 |
|
2640 | 44 |
qed_goalw "antisym_less_cfun" thy [less_cfun_def] |
3323
194ae2e0c193
eliminated the constant less by the introduction of the axclass sq_ord
slotosch
parents:
2838
diff
changeset
|
45 |
"[|(f1::'a->'b) << f2; f2 << f1|] ==> f1 = f2" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
46 |
(fn prems => |
1461 | 47 |
[ |
48 |
(cut_facts_tac prems 1), |
|
49 |
(rtac injD 1), |
|
50 |
(rtac antisym_less 2), |
|
51 |
(atac 3), |
|
52 |
(atac 2), |
|
53 |
(rtac inj_inverseI 1), |
|
54 |
(rtac Rep_Cfun_inverse 1) |
|
55 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
56 |
|
2640 | 57 |
qed_goalw "trans_less_cfun" thy [less_cfun_def] |
3323
194ae2e0c193
eliminated the constant less by the introduction of the axclass sq_ord
slotosch
parents:
2838
diff
changeset
|
58 |
"[|(f1::'a->'b) << f2; f2 << f3|] ==> f1 << f3" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
59 |
(fn prems => |
1461 | 60 |
[ |
61 |
(cut_facts_tac prems 1), |
|
62 |
(etac trans_less 1), |
|
63 |
(atac 1) |
|
64 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
65 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
66 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
67 |
(* lemmas about application of continuous functions *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
68 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
69 |
|
2640 | 70 |
qed_goal "cfun_cong" thy |
1461 | 71 |
"[| f=g; x=y |] ==> f`x = g`y" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
72 |
(fn prems => |
1461 | 73 |
[ |
74 |
(cut_facts_tac prems 1), |
|
75 |
(fast_tac HOL_cs 1) |
|
76 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
77 |
|
2640 | 78 |
qed_goal "cfun_fun_cong" thy "f=g ==> f`x = g`x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
79 |
(fn prems => |
1461 | 80 |
[ |
81 |
(cut_facts_tac prems 1), |
|
82 |
(etac cfun_cong 1), |
|
83 |
(rtac refl 1) |
|
84 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
85 |
|
2640 | 86 |
qed_goal "cfun_arg_cong" thy "x=y ==> f`x = f`y" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
87 |
(fn prems => |
1461 | 88 |
[ |
89 |
(cut_facts_tac prems 1), |
|
90 |
(rtac cfun_cong 1), |
|
91 |
(rtac refl 1), |
|
92 |
(atac 1) |
|
93 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
94 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
95 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
96 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
97 |
(* additional lemma about the isomorphism between -> and Cfun *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
98 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
99 |
|
5291 | 100 |
qed_goal "Abs_Cfun_inverse2" thy "cont f ==> Rep_CFun (Abs_CFun f) = f" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
101 |
(fn prems => |
1461 | 102 |
[ |
103 |
(cut_facts_tac prems 1), |
|
104 |
(rtac Abs_Cfun_inverse 1), |
|
2640 | 105 |
(rewtac CFun_def), |
1461 | 106 |
(etac (mem_Collect_eq RS ssubst) 1) |
107 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
108 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
109 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
110 |
(* simplification of application *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
111 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
112 |
|
5291 | 113 |
qed_goal "Cfunapp2" thy "cont f ==> (Abs_CFun f)`x = f x" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
114 |
(fn prems => |
1461 | 115 |
[ |
116 |
(cut_facts_tac prems 1), |
|
117 |
(etac (Abs_Cfun_inverse2 RS fun_cong) 1) |
|
118 |
]); |
|
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
119 |
|
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
120 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
121 |
(* beta - equality for continuous functions *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
122 |
(* ------------------------------------------------------------------------ *) |
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
123 |
|
2640 | 124 |
qed_goal "beta_cfun" thy |
1461 | 125 |
"cont(c1) ==> (LAM x .c1 x)`u = c1 u" |
243
c22b85994e17
Franz Regensburger's Higher-Order Logic of Computable Functions embedding LCF
nipkow
parents:
diff
changeset
|
126 |
(fn prems => |
1461 | 127 |
[ |
128 |
(cut_facts_tac prems 1), |
|
129 |
(rtac Cfunapp2 1), |
|
130 |
(atac 1) |
|
131 |
]); |