-
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
import data.real.basic
#check ∀ x : ℝ, 0 ≤ x → abs x = x
#check ∀ x y ε : ℝ, 0 < ε → ε ≤ 1 → abs x < ε → abs y < ε → abs (x * y) < ε
lemma my_lemma : ∀ x y ε : ℝ,
0 < ε → ε ≤ 1 → abs x < ε → abs y < ε → abs (x * y) < ε :=
sorry
section
variables a b δ : ℝ
variables (h₀ : 0 < δ) (h₁ : δ ≤ 1)
variables (ha : abs a < δ) (hb : abs b < δ)
#check my_lemma a b δ
#check my_lemma a b δ h₀ h₁
#check my_lemma a b δ h₀ h₁ ha hb
end
lemma my_lemma2 : ∀ {x y ε : ℝ},
0 < ε → ε ≤ 1 → abs x < ε → abs y < ε → abs (x * y) < ε :=
sorry
section
variables a b δ : ℝ
variables (h₀ : 0 < δ) (h₁ : δ ≤ 1)
variables (ha : abs a < δ) (hb : abs b < δ)
#check my_lemma2 h₀ h₁ ha hb
end
lemma my_lemma3 : ∀ {x y ε : ℝ},
0 < ε → ε ≤ 1 → abs x < ε → abs y < ε → abs (x * y) < ε :=
begin
intros x y ε epos ele1 xlt ylt,
sorry
end
lemma my_lemma4 : ∀ {x y ε : ℝ},
0 < ε → ε ≤ 1 → abs x < ε → abs y < ε → abs (x * y) < ε :=
begin
intros x y ε epos ele1 xlt ylt,
calc
abs (x * y) = abs x * abs y : sorry
... ≤ abs x * ε : sorry
... < 1 * ε : sorry
... = ε : sorry
end
def fn_ub (f : ℝ → ℝ) (a : ℝ) : Prop := ∀ x, f x ≤ a
def fn_lb (f : ℝ → ℝ) (a : ℝ) : Prop := ∀ x, a ≤ f x
section
variables (f g : ℝ → ℝ) (a b : ℝ)
example (hfa : fn_ub f a) (hgb : fn_ub g b) :
fn_ub (λ x, f x + g x) (a + b) :=
begin
intro x,
dsimp,
apply add_le_add,
apply hfa,
apply hgb
end
example (hfa : fn_lb f a) (hgb : fn_lb g b) :
fn_lb (λ x, f x + g x) (a + b) :=
sorry
example (nnf : fn_lb f 0) (nng : fn_lb g 0) :
fn_lb (λ x, f x * g x) 0 :=
sorry
example (hfa : fn_ub f a) (hfb : fn_ub g b)
(nng : fn_lb g 0) (nna : 0 ≤ a) :
fn_ub (λ x, f x * g x) (a * b) :=
sorry
end
section
variables {α : Type*} {R : Type*} [ordered_cancel_add_comm_monoid R]
#check @add_le_add
def fn_ub' (f : α → R) (a : R) : Prop := ∀ x, f x ≤ a
theorem fn_ub_add {f g : α → R} {a b : R}
(hfa : fn_ub' f a) (hgb : fn_ub' g b) :
fn_ub' (λ x, f x + g x) (a + b) :=
λ x, add_le_add (hfa x) (hgb x)
end
example (f : ℝ → ℝ) (h : monotone f) :
∀ {a b}, a ≤ b → f a ≤ f b := h
section
variables (f g : ℝ → ℝ)
example (mf : monotone f) (mg : monotone g) :
monotone (λ x, f x + g x) :=
begin
intros a b aleb,
apply add_le_add,
apply mf aleb,
apply mg aleb
end
example (mf : monotone f) (mg : monotone g) :
monotone (λ x, f x + g x) :=
λ a b aleb, add_le_add (mf aleb) (mg aleb)
example {c : ℝ} (mf : monotone f) (nnc : 0 ≤ c) :
monotone (λ x, c * f x) :=
sorry
example (mf : monotone f) (mg : monotone g) :
monotone (λ x, f (g x)) :=
sorry
def fn_even (f : ℝ → ℝ) : Prop := ∀ x, f x = f (-x)
def fn_odd (f : ℝ → ℝ) : Prop := ∀ x, f x = - f (-x)
example (ef : fn_even f) (eg : fn_even g) : fn_even (λ x, f x + g x) :=
begin
intro x,
calc
(λ x, f x + g x) x = f x + g x : rfl
... = f (-x) + g (-x) : by rw [ef, eg]
end
example (of : fn_odd f) (og : fn_odd g) : fn_even (λ x, f x * g x) :=
sorry
example (ef : fn_even f) (og : fn_odd g) : fn_odd (λ x, f x * g x) :=
sorry
example (ef : fn_even f) (og : fn_odd g) : fn_even (λ x, f (g x)) :=
sorry
end
section
variables {α : Type*} (r s t : set α)
example : s ⊆ s :=
by { intros x xs, exact xs }
theorem subset.refl : s ⊆ s := λ x xs, xs
theorem subset.trans : r ⊆ s → s ⊆ t → r ⊆ t :=
sorry
end
section
variables {α : Type*} [partial_order α]
variables (s : set α) (a b : α)
def set_ub (s : set α) (a : α) := ∀ x, x ∈ s → x ≤ a
example (h : set_ub s a) (h' : a ≤ b) : set_ub s b :=
sorry
end
section
open function
example (c : ℝ) : injective (λ x, x + c) :=
begin
intros x₁ x₂ h',
exact (add_left_inj c).mp h',
end
example {c : ℝ} (h : c ≠ 0) : injective (λ x, c * x) :=
sorry
variables {α : Type*} {β : Type*} {γ : Type*}
variables {g : β → γ} {f : α → β}
example (injg : injective g) (injf : injective f) :
injective (λ x, g (f x)) :=
sorry
end