-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathChap5Ex.lean
214 lines (165 loc) · 7.05 KB
/
Chap5Ex.lean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
import HTPILib.Chap5
namespace HTPI.Exercises
/- Section 5.1 -/
-- 1.
theorem func_from_graph_ltr {A B : Type} (F : Set (A × B)) :
(∃ (f : A → B), graph f = F) → is_func_graph F := sorry
-- 2.
theorem Exercise_5_1_13a
{A B C : Type} (R : Set (A × B)) (S : Set (B × C)) (f : A → C)
(h1 : ∀ (b : B), b ∈ Ran R ∧ b ∈ Dom S) (h2 : graph f = comp S R) :
is_func_graph S := sorry
-- 3.
theorem Exercise_5_1_14a
{A B : Type} (f : A → B) (R : BinRel A) (S : BinRel B)
(h : ∀ (x y : A), R x y ↔ S (f x) (f y)) :
reflexive S → reflexive R := sorry
-- 4.
--You might not be able to complete this proof
theorem Exercise_5_1_15a
{A B : Type} (f : A → B) (R : BinRel A) (S : BinRel B)
(h : ∀ (x y : B), S x y ↔ ∃ (u v : A), f u = x ∧ f v = y ∧ R u v) :
reflexive R → reflexive S := sorry
-- 5.
--You might not be able to complete this proof
theorem Exercise_5_1_15c
{A B : Type} (f : A → B) (R : BinRel A) (S : BinRel B)
(h : ∀ (x y : B), S x y ↔ ∃ (u v : A), f u = x ∧ f v = y ∧ R u v) :
transitive R → transitive S := sorry
-- 6.
theorem Exercise_5_1_16b
{A B : Type} (R : BinRel B) (S : BinRel (A → B))
(h : ∀ (f g : A → B), S f g ↔ ∀ (x : A), R (f x) (g x)) :
symmetric R → symmetric S := sorry
-- 7.
theorem Exercise_5_1_17a {A : Type} (f : A → A) (a : A)
(h : ∀ (x : A), f x = a) : ∀ (g : A → A), f ∘ g = f := sorry
-- 8.
theorem Exercise_5_1_17b {A : Type} (f : A → A) (a : A)
(h : ∀ (g : A → A), f ∘ g = f) :
∃ (y : A), ∀ (x : A), f x = y := sorry
/- Section 5.2 -/
-- 1.
theorem Exercise_5_2_10a {A B C : Type} (f: A → B) (g : B → C) :
onto (g ∘ f) → onto g := sorry
-- 2.
theorem Exercise_5_2_10b {A B C : Type} (f: A → B) (g : B → C) :
one_to_one (g ∘ f) → one_to_one f := sorry
-- 3.
theorem Exercise_5_2_11a {A B C : Type} (f: A → B) (g : B → C) :
onto f → ¬(one_to_one g) → ¬(one_to_one (g ∘ f)) := sorry
-- 4.
theorem Exercise_5_2_11b {A B C : Type} (f: A → B) (g : B → C) :
¬(onto f) → one_to_one g → ¬(onto (g ∘ f)) := sorry
-- 5.
theorem Exercise_5_2_12 {A B : Type} (f : A → B) (g : B → Set A)
(h : ∀ (b : B), g b = {a : A | f a = b}) :
onto f → one_to_one g := sorry
-- 6.
theorem Exercise_5_2_16 {A B C : Type}
(R : Set (A × B)) (S : Set (B × C)) (f : A → C) (g : B → C)
(h1 : graph f = comp S R) (h2 : graph g = S) (h3 : one_to_one g) :
is_func_graph R := sorry
-- 7.
theorem Exercise_5_2_17a
{A B : Type} (f : A → B) (R : BinRel A) (S : BinRel B)
(h1 : ∀ (x y : B), S x y ↔ ∃ (u v : A), f u = x ∧ f v = y ∧ R u v)
(h2 : onto f) : reflexive R → reflexive S := sorry
-- 8.
theorem Exercise_5_2_17b
{A B : Type} (f : A → B) (R : BinRel A) (S : BinRel B)
(h1 : ∀ (x y : B), S x y ↔ ∃ (u v : A), f u = x ∧ f v = y ∧ R u v)
(h2 : one_to_one f) : transitive R → transitive S := sorry
-- 9.
theorem Exercise_5_2_21a {A B C : Type} (f : B → C) (g h : A → B)
(h1 : one_to_one f) (h2 : f ∘ g = f ∘ h) : g = h := sorry
-- 10.
theorem Exercise_5_2_21b {A B C : Type} (f : B → C) (a : A)
(h1 : ∀ (g h : A → B), f ∘ g = f ∘ h → g = h) :
one_to_one f := sorry
/- Section 5.3 -/
-- 1.
theorem Theorem_5_3_2_2 {A B : Type} (f : A → B) (g : B → A)
(h1 : graph g = inv (graph f)) : f ∘ g = id := sorry
-- 2.
theorem Theorem_5_3_3_2 {A B : Type} (f : A → B) (g : B → A)
(h1 : f ∘ g = id) : onto f := sorry
-- 3.
theorem Exercise_5_3_11a {A B : Type} (f : A → B) (g : B → A) :
one_to_one f → f ∘ g = id → graph g = inv (graph f) := sorry
-- 4.
theorem Exercise_5_3_11b {A B : Type} (f : A → B) (g : B → A) :
onto f → g ∘ f = id → graph g = inv (graph f) := sorry
-- 5.
theorem Exercise_5_3_14a {A B : Type} (f : A → B) (g : B → A)
(h : f ∘ g = id) : ∀ x ∈ Ran (graph g), g (f x) = x := sorry
-- 6.
theorem Exercise_5_3_18 {A B C : Type} (f : A → C) (g : B → C)
(h1 : one_to_one g) (h2 : onto g) :
∃ (h : A → B), g ∘ h = f := sorry
-- Definition for next two exercises:
def conjugate (A : Type) (f1 f2 : A → A) : Prop :=
∃ (g g' : A → A), (f1 = g' ∘ f2 ∘ g) ∧ (g ∘ g' = id) ∧ (g' ∘ g = id)
-- 7.
theorem Exercise_5_3_17a {A : Type} : symmetric (conjugate A) := sorry
-- 8.
theorem Exercise_5_3_17b {A : Type} (f1 f2 : A → A)
(h1 : conjugate A f1 f2) (h2 : ∃ (a : A), f1 a = a) :
∃ (a : A), f2 a = a := sorry
/- Section 5.4 -/
-- 1.
example {A : Type} (F : Set (Set A)) (B : Set A) :
smallestElt (sub A) B F → B = ⋂₀ F := sorry
-- 2.
def complement {A : Type} (B : Set A) : Set A := {a : A | a ∉ B}
theorem Exercise_5_4_7 {A : Type} (f g : A → A) (C : Set A)
(h1 : f ∘ g = id) (h2 : closed f C) : closed g (complement C) := sorry
-- 3.
theorem Exercise_5_4_9a {A : Type} (f : A → A) (C1 C2 : Set A)
(h1 : closed f C1) (h2 : closed f C2) : closed f (C1 ∪ C2) := sorry
-- 4.
theorem Exercise_5_4_10a {A : Type} (f : A → A) (B1 B2 C1 C2 : Set A)
(h1 : closure f B1 C1) (h2 : closure f B2 C2) :
B1 ⊆ B2 → C1 ⊆ C2 := sorry
-- 5.
theorem Exercise_5_4_10b {A : Type} (f : A → A) (B1 B2 C1 C2 : Set A)
(h1 : closure f B1 C1) (h2 : closure f B2 C2) :
closure f (B1 ∪ B2) (C1 ∪ C2) := sorry
-- 6.
theorem Theorem_5_4_9 {A : Type} (f : A → A → A) (B : Set A) :
∃ (C : Set A), closure2 f B C := sorry
-- 7.
theorem Exercise_5_4_13a {A : Type} (F : Set (A → A)) (B : Set A) :
∃ (C : Set A), closure_family F B C := sorry
/- Section 5.5 -/
--Warning! Not all of these examples are correct!
example {A B : Type} (f : A → B) (W X : Set A) :
image f (W ∪ X) = image f W ∪ image f X := sorry
example {A B : Type} (f : A → B) (W X : Set A) :
image f (W \ X) = image f W \ image f X := sorry
example {A B : Type} (f : A → B) (W X : Set A) :
W ⊆ X ↔ image f W ⊆ image f X := sorry
example {A B : Type} (f : A → B) (Y Z : Set B) :
inverse_image f (Y ∩ Z) =
inverse_image f Y ∩ inverse_image f Z := sorry
example {A B : Type} (f : A → B) (Y Z : Set B) :
inverse_image f (Y ∪ Z) =
inverse_image f Y ∪ inverse_image f Z := sorry
example {A B : Type} (f : A → B) (Y Z : Set B) :
inverse_image f (Y \ Z) =
inverse_image f Y \ inverse_image f Z := sorry
example {A B : Type} (f : A → B) (Y Z : Set B) :
Y ⊆ Z ↔ inverse_image f Y ⊆ inverse_image f Z := sorry
example {A B : Type} (f : A → B) (X : Set A) :
inverse_image f (image f X) = X := sorry
example {A B : Type} (f : A → B) (Y : Set B) :
image f (inverse_image f Y) = Y := sorry
example {A : Type} (f : A → A) (C : Set A) :
closed f C → image f C ⊆ C := sorry
example {A : Type} (f : A → A) (C : Set A) :
image f C ⊆ C → C ⊆ inverse_image f C := sorry
example {A : Type} (f : A → A) (C : Set A) :
C ⊆ inverse_image f C → closed f C := sorry
example {A B : Type} (f : A → B) (g : B → A) (Y : Set B)
(h1 : f ∘ g = id) (h2 : g ∘ f = id) :
inverse_image f Y = image g Y := sorry