-
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
import data.real.basic
import data.nat.prime
example {x y : ℝ} (h₀ : x ≤ y) (h₁ : ¬ y ≤ x) : x ≤ y ∧ x ≠ y :=
begin
split,
{ assumption },
intro h,
apply h₁,
rw h
end
example {x y : ℝ} (h₀ : x ≤ y) (h₁ : ¬ y ≤ x) : x ≤ y ∧ x ≠ y :=
⟨h₀, λ h, h₁ (by rw h)⟩
example {x y : ℝ} (h₀ : x ≤ y) (h₁ : ¬ y ≤ x) : x ≤ y ∧ x ≠ y :=
begin
have h : x ≠ y,
{ contrapose! h₁,
rw h₁ },
exact ⟨h₀, h⟩
end
example {x y : ℝ} (h : x ≤ y ∧ x ≠ y) : ¬ y ≤ x :=
begin
cases h with h₀ h₁,
contrapose! h₁,
exact le_antisymm h₀ h₁
end
example {x y : ℝ} : x ≤ y ∧ x ≠ y → ¬ y ≤ x :=
begin
rintros ⟨h₀, h₁⟩ h',
exact h₁ (le_antisymm h₀ h')
end
example {x y : ℝ} : x ≤ y ∧ x ≠ y → ¬ y ≤ x :=
λ ⟨h₀, h₁⟩ h', h₁ (le_antisymm h₀ h')
example {x y : ℝ} (h : x ≤ y ∧ x ≠ y) : ¬ y ≤ x :=
begin
intro h',
apply h.right,
exact le_antisymm h.left h'
end
example {x y : ℝ} (h : x ≤ y ∧ x ≠ y) : ¬ y ≤ x :=
λ h', h.right (le_antisymm h.left h')
example {m n : ℕ} (h : m ∣ n ∧ m ≠ n) :
m ∣ n ∧ ¬ n ∣ m :=
sorry
example : ∃ x : ℝ, 2 < x ∧ x < 4 :=
⟨5/2, by norm_num, by norm_num⟩
example (x y : ℝ) : (∃ z : ℝ, x < z ∧ z < y) → x < y :=
begin
rintros ⟨z, xltz, zlty⟩,
exact lt_trans xltz zlty
end
example (x y : ℝ) : (∃ z : ℝ, x < z ∧ z < y) → x < y :=
λ ⟨z, xltz, zlty⟩, lt_trans xltz zlty
example : ∃ x : ℝ, 2 < x ∧ x < 4 :=
begin
use 5 / 2,
split; norm_num
end
example : ∃ m n : ℕ,
4 < m ∧ m < n ∧ n < 10 ∧ nat.prime m ∧ nat.prime n :=
begin
use [5, 7],
norm_num
end
example {x y : ℝ} : x ≤ y ∧ x ≠ y → x ≤ y ∧ ¬ y ≤ x :=
begin
rintros ⟨h₀, h₁⟩,
use [h₀, λ h', h₁ (le_antisymm h₀ h')]
end
example {x y : ℝ} (h : x ≤ y) : ¬ y ≤ x ↔ x ≠ y :=
begin
split,
{ contrapose!,
rintro rfl,
reflexivity },
contrapose!,
exact le_antisymm h
end
example {x y : ℝ} (h : x ≤ y) : ¬ y ≤ x ↔ x ≠ y :=
⟨λ h₀ h₁, h₀ (by rw h₁), λ h₀ h₁, h₀ (le_antisymm h h₁)⟩
example {x y : ℝ} : x ≤ y ∧ ¬ y ≤ x ↔ x ≤ y ∧ x ≠ y :=
sorry
theorem aux {x y : ℝ} (h : x^2 + y^2 = 0) : x = 0 :=
begin
have h' : x^2 = 0,
{ sorry },
exact pow_eq_zero h'
end
example (x y : ℝ) : x^2 + y^2 = 0 ↔ x = 0 ∧ y = 0 :=
sorry
section
example (x y : ℝ) : abs (x + 3) < 5 → -8 < x ∧ x < 2 :=
begin
rw abs_lt,
intro h,
split; linarith
end
example : 3 ∣ nat.gcd 6 15 :=
begin
rw nat.dvd_gcd_iff,
split; norm_num
end
end
theorem not_monotone_iff {f : ℝ → ℝ}:
¬ monotone f ↔ ∃ x y, x ≤ y ∧ f x > f y :=
by { rw monotone, push_neg }
example : ¬ monotone (λ x : ℝ, -x) :=
sorry
section
variables {α : Type*} [partial_order α]
variables a b : α
example : a < b ↔ a ≤ b ∧ a ≠ b :=
begin
rw lt_iff_le_not_le,
sorry
end
end
section
variables {α : Type*} [preorder α]
variables a b c : α
example : ¬ a < a :=
begin
rw lt_iff_le_not_le,
sorry
end
example : a < b → b < c → a < c :=
begin
simp only [lt_iff_le_not_le],
sorry
end
end