-
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
import data.real.basic
section
variables a b : ℝ
example (h : a < b) : ¬ b < a :=
begin
intro h',
have : a < a,
from lt_trans h h',
apply lt_irrefl a this
end
def fn_ub (f : ℝ → ℝ) (a : ℝ) : Prop := ∀ x, f x ≤ a
def fn_lb (f : ℝ → ℝ) (a : ℝ) : Prop := ∀ x, a ≤ f x
def fn_has_ub (f : ℝ → ℝ) := ∃ a, fn_ub f a
def fn_has_lb (f : ℝ → ℝ) := ∃ a, fn_lb f a
variable f : ℝ → ℝ
example (h : ∀ a, ∃ x, f x > a) : ¬ fn_has_ub f :=
begin
intros fnub,
cases fnub with a fnuba,
cases h a with x hx,
have : f x ≤ a,
from fnuba x,
linarith
end
example (h : ∀ a, ∃ x, f x < a) : ¬ fn_has_lb f :=
sorry
example : ¬ fn_has_ub (λ x, x) :=
sorry
#check (not_le_of_gt : a > b → ¬ a ≤ b)
#check (not_lt_of_ge : a ≥ b → ¬ a < b)
#check (lt_of_not_ge : ¬ a ≥ b → a < b)
#check (le_of_not_gt : ¬ a > b → a ≤ b)
example (h : monotone f) (h' : f a < f b) : a < b :=
sorry
example (h : a ≤ b) (h' : f b < f a) : ¬ monotone f :=
sorry
example :
¬ ∀ {f : ℝ → ℝ}, monotone f → ∀ {a b}, f a ≤ f b → a ≤ b :=
begin
intro h,
let f := λ x : ℝ, (0 : ℝ),
have monof : monotone f,
{ sorry },
have h' : f 1 ≤ f 0,
from le_refl _,
sorry
end
example (x : ℝ) (h : ∀ ε > 0, x < ε) : x ≤ 0 :=
sorry
end
section
variables {α : Type*} (P : α → Prop) (Q : Prop)
example (h : ¬ ∃ x, P x) : ∀ x, ¬ P x :=
sorry
example (h : ∀ x, ¬ P x) : ¬ ∃ x, P x :=
sorry
example (h : ¬ ∀ x, P x) : ∃ x, ¬ P x :=
sorry
example (h : ∃ x, ¬ P x) : ¬ ∀ x, P x :=
sorry
open_locale classical
example (h : ¬ ∀ x, P x) : ∃ x, ¬ P x :=
begin
by_contradiction h',
apply h,
intro x,
show P x,
by_contradiction h'',
exact h' ⟨x, h''⟩
end
example (h : ¬ ¬ Q) : Q :=
sorry
example (h : Q) : ¬ ¬ Q :=
sorry
end
open_locale classical
section
variable (f : ℝ → ℝ)
example (h : ¬ fn_has_ub f) : ∀ a, ∃ x, f x > a :=
sorry
example (h : ¬ ∀ a, ∃ x, f x > a) : fn_has_ub f :=
begin
push_neg at h,
exact h
end
example (h : ¬ fn_has_ub f) : ∀ a, ∃ x, f x > a :=
begin
simp only [fn_has_ub, fn_ub] at h,
push_neg at h,
exact h
end
example (h : ¬ monotone f) : ∃ x y, x ≤ y ∧ f y < f x :=
sorry
example (h : ¬ fn_has_ub f) : ∀ a, ∃ x, f x > a :=
begin
contrapose! h,
exact h
end
example (x : ℝ) (h : ∀ ε > 0, x ≤ ε) : x ≤ 0 :=
begin
contrapose! h,
use x / 2,
split; linarith
end
end
section
variable a : ℕ
example (h : 0 < 0) : a > 37 :=
begin
exfalso,
apply lt_irrefl 0 h
end
example (h : 0 < 0) : a > 37 :=
absurd h (lt_irrefl 0)
example (h : 0 < 0) : a > 37 :=
begin
have h' : ¬ 0 < 0,
from lt_irrefl 0,
contradiction
end
end