10341
|
1 |
(* ID: $Id$ *)
|
16417
|
2 |
theory Functions imports Main begin
|
10294
|
3 |
|
36745
|
4 |
ML "Pretty.margin_default := 64"
|
10294
|
5 |
|
|
6 |
|
|
7 |
text{*
|
|
8 |
@{thm[display] id_def[no_vars]}
|
|
9 |
\rulename{id_def}
|
|
10 |
|
|
11 |
@{thm[display] o_def[no_vars]}
|
|
12 |
\rulename{o_def}
|
|
13 |
|
|
14 |
@{thm[display] o_assoc[no_vars]}
|
|
15 |
\rulename{o_assoc}
|
|
16 |
*}
|
|
17 |
|
|
18 |
text{*
|
|
19 |
@{thm[display] fun_upd_apply[no_vars]}
|
|
20 |
\rulename{fun_upd_apply}
|
|
21 |
|
|
22 |
@{thm[display] fun_upd_upd[no_vars]}
|
|
23 |
\rulename{fun_upd_upd}
|
|
24 |
*}
|
|
25 |
|
|
26 |
|
|
27 |
text{*
|
|
28 |
definitions of injective, surjective, bijective
|
|
29 |
|
|
30 |
@{thm[display] inj_on_def[no_vars]}
|
|
31 |
\rulename{inj_on_def}
|
|
32 |
|
|
33 |
@{thm[display] surj_def[no_vars]}
|
|
34 |
\rulename{surj_def}
|
|
35 |
|
|
36 |
@{thm[display] bij_def[no_vars]}
|
|
37 |
\rulename{bij_def}
|
|
38 |
*}
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
text{*
|
|
43 |
possibly interesting theorems about inv
|
|
44 |
*}
|
|
45 |
|
|
46 |
text{*
|
|
47 |
@{thm[display] inv_f_f[no_vars]}
|
|
48 |
\rulename{inv_f_f}
|
|
49 |
|
|
50 |
@{thm[display] inj_imp_surj_inv[no_vars]}
|
|
51 |
\rulename{inj_imp_surj_inv}
|
|
52 |
|
|
53 |
@{thm[display] surj_imp_inj_inv[no_vars]}
|
|
54 |
\rulename{surj_imp_inj_inv}
|
|
55 |
|
|
56 |
@{thm[display] surj_f_inv_f[no_vars]}
|
|
57 |
\rulename{surj_f_inv_f}
|
|
58 |
|
|
59 |
@{thm[display] bij_imp_bij_inv[no_vars]}
|
|
60 |
\rulename{bij_imp_bij_inv}
|
|
61 |
|
|
62 |
@{thm[display] inv_inv_eq[no_vars]}
|
|
63 |
\rulename{inv_inv_eq}
|
|
64 |
|
|
65 |
@{thm[display] o_inv_distrib[no_vars]}
|
|
66 |
\rulename{o_inv_distrib}
|
|
67 |
*}
|
|
68 |
|
|
69 |
text{*
|
|
70 |
small sample proof
|
|
71 |
|
|
72 |
@{thm[display] ext[no_vars]}
|
|
73 |
\rulename{ext}
|
|
74 |
|
39795
|
75 |
@{thm[display] fun_eq_iff[no_vars]}
|
|
76 |
\rulename{fun_eq_iff}
|
10294
|
77 |
*}
|
|
78 |
|
|
79 |
lemma "inj f \<Longrightarrow> (f o g = f o h) = (g = h)";
|
39795
|
80 |
apply (simp add: fun_eq_iff inj_on_def)
|
10294
|
81 |
apply (auto)
|
|
82 |
done
|
|
83 |
|
|
84 |
text{*
|
|
85 |
\begin{isabelle}
|
|
86 |
inj\ f\ \isasymLongrightarrow \ (f\ \isasymcirc \ g\ =\ f\ \isasymcirc \ h)\ =\ (g\ =\ h)\isanewline
|
|
87 |
\ 1.\ \isasymforall x\ y.\ f\ x\ =\ f\ y\ \isasymlongrightarrow \ x\ =\ y\ \isasymLongrightarrow \isanewline
|
|
88 |
\ \ \ \ (\isasymforall x.\ f\ (g\ x)\ =\ f\ (h\ x))\ =\ (\isasymforall x.\ g\ x\ =\ h\ x)
|
|
89 |
\end{isabelle}
|
|
90 |
*}
|
|
91 |
|
|
92 |
|
|
93 |
text{*image, inverse image*}
|
|
94 |
|
|
95 |
text{*
|
|
96 |
@{thm[display] image_def[no_vars]}
|
|
97 |
\rulename{image_def}
|
|
98 |
*}
|
|
99 |
|
|
100 |
text{*
|
|
101 |
@{thm[display] image_Un[no_vars]}
|
|
102 |
\rulename{image_Un}
|
|
103 |
*}
|
|
104 |
|
|
105 |
text{*
|
|
106 |
@{thm[display] image_compose[no_vars]}
|
|
107 |
\rulename{image_compose}
|
|
108 |
|
|
109 |
@{thm[display] image_Int[no_vars]}
|
|
110 |
\rulename{image_Int}
|
|
111 |
|
|
112 |
@{thm[display] bij_image_Compl_eq[no_vars]}
|
|
113 |
\rulename{bij_image_Compl_eq}
|
|
114 |
*}
|
|
115 |
|
|
116 |
|
|
117 |
text{*
|
|
118 |
illustrates Union as well as image
|
|
119 |
*}
|
10849
|
120 |
|
10839
|
121 |
lemma "f`A \<union> g`A = (\<Union>x\<in>A. {f x, g x})"
|
10849
|
122 |
by blast
|
10294
|
123 |
|
10839
|
124 |
lemma "f ` {(x,y). P x y} = {f(x,y) | x y. P x y}"
|
10849
|
125 |
by blast
|
10294
|
126 |
|
|
127 |
text{*actually a macro!*}
|
|
128 |
|
10839
|
129 |
lemma "range f = f`UNIV"
|
10849
|
130 |
by blast
|
10294
|
131 |
|
|
132 |
|
|
133 |
text{*
|
|
134 |
inverse image
|
|
135 |
*}
|
|
136 |
|
|
137 |
text{*
|
|
138 |
@{thm[display] vimage_def[no_vars]}
|
|
139 |
\rulename{vimage_def}
|
|
140 |
|
|
141 |
@{thm[display] vimage_Compl[no_vars]}
|
|
142 |
\rulename{vimage_Compl}
|
|
143 |
*}
|
|
144 |
|
|
145 |
|
|
146 |
end
|