Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit f46d32b

Browse files
committed
feat(algebra/archimedean): generalize real thms to archimedean fields
1 parent 0e42187 commit f46d32b

File tree

13 files changed

+377
-171
lines changed

13 files changed

+377
-171
lines changed

algebra/archimedean.lean

Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
/-
2+
Copyright (c) 2018 Mario Carneiro. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Mario Carneiro
5+
6+
Archimedean groups and fields.
7+
-/
8+
import algebra.group_power data.rat data.int.order
9+
10+
local infix ` • `:73 := add_monoid.smul
11+
12+
variables {α : Type*}
13+
14+
class floor_ring (α) extends linear_ordered_ring α :=
15+
(floor : α → ℤ)
16+
(le_floor : ∀ (z : ℤ) (x : α), z ≤ floor x ↔ (z : α) ≤ x)
17+
18+
instance : floor_ring ℤ :=
19+
{ floor := id, le_floor := by simp,
20+
..linear_ordered_comm_ring.to_linear_ordered_ring ℤ }
21+
22+
instance : floor_ring ℚ :=
23+
{ floor := rat.floor, le_floor := @rat.le_floor,
24+
..linear_ordered_comm_ring.to_linear_ordered_ring ℚ }
25+
26+
section
27+
variable [floor_ring α]
28+
29+
def floor : α → ℤ := floor_ring.floor
30+
31+
notation `⌊` x `⌋` := floor x
32+
33+
theorem le_floor : ∀ {z : ℤ} {x : α}, z ≤ ⌊x⌋ ↔ (z : α) ≤ x :=
34+
floor_ring.le_floor
35+
36+
theorem floor_lt {x : α} {z : ℤ} : ⌊x⌋ < z ↔ x < z :=
37+
le_iff_le_iff_lt_iff_lt.1 le_floor
38+
39+
theorem floor_le (x : α) : (⌊x⌋ : α) ≤ x :=
40+
le_floor.1 (le_refl _)
41+
42+
theorem floor_nonneg {x : α} : 0 ≤ ⌊x⌋ ↔ 0 ≤ x :=
43+
by simpa using @le_floor _ _ 0 x
44+
45+
theorem lt_succ_floor (x : α) : x < ⌊x⌋.succ :=
46+
floor_lt.1 $ int.lt_succ_self _
47+
48+
theorem lt_floor_add_one (x : α) : x < ⌊x⌋ + 1 :=
49+
by simpa [int.succ] using lt_succ_floor x
50+
51+
theorem sub_one_lt_floor (x : α) : x - 1 < ⌊x⌋ :=
52+
sub_lt_iff_lt_add.2 (lt_floor_add_one x)
53+
54+
@[simp] theorem floor_coe (z : ℤ) : ⌊(z:α)⌋ = z :=
55+
eq_of_forall_le_iff $ λ a, by rw [le_floor, int.cast_le]
56+
57+
theorem floor_mono {a b : α} (h : a ≤ b) : ⌊a⌋ ≤ ⌊b⌋ :=
58+
le_floor.2 (le_trans (floor_le _) h)
59+
60+
@[simp] theorem floor_add_int (x : α) (z : ℤ) : ⌊x + z⌋ = ⌊x⌋ + z :=
61+
eq_of_forall_le_iff $ λ a, by rw [le_floor,
62+
← sub_le_iff_le_add, ← sub_le_iff_le_add, le_floor, int.cast_sub]
63+
64+
theorem floor_sub_int (x : α) (z : ℤ) : ⌊x - z⌋ = ⌊x⌋ - z :=
65+
eq.trans (by rw [int.cast_neg]; refl) (floor_add_int _ _)
66+
67+
/-- `ceil x` is the smallest integer `z` such that `x ≤ z` -/
68+
def ceil (x : α) : ℤ := -⌊-x⌋
69+
70+
notation `⌈` x `⌉` := ceil x
71+
72+
theorem ceil_le {z : ℤ} {x : α} : ⌈x⌉ ≤ z ↔ x ≤ z :=
73+
by rw [ceil, neg_le, le_floor, int.cast_neg, neg_le_neg_iff]
74+
75+
theorem lt_ceil {x : α} {z : ℤ} : z < ⌈x⌉ ↔ (z:α) < x :=
76+
le_iff_le_iff_lt_iff_lt.1 ceil_le
77+
78+
theorem le_ceil (x : α) : x ≤ ⌈x⌉ :=
79+
ceil_le.1 (le_refl _)
80+
81+
@[simp] theorem ceil_coe (z : ℤ) : ⌈(z:α)⌉ = z :=
82+
by rw [ceil, ← int.cast_neg, floor_coe, neg_neg]
83+
84+
theorem ceil_mono {a b : α} (h : a ≤ b) : ⌈a⌉ ≤ ⌈b⌉ :=
85+
ceil_le.2 (le_trans h (le_ceil _))
86+
87+
@[simp] theorem ceil_add_int (x : α) (z : ℤ) : ⌈x + z⌉ = ⌈x⌉ + z :=
88+
by rw [ceil, neg_add', floor_sub_int, neg_sub, sub_eq_neg_add]; refl
89+
90+
theorem ceil_sub_int (x : α) (z : ℤ) : ⌈x - z⌉ = ⌈x⌉ - z :=
91+
eq.trans (by rw [int.cast_neg]; refl) (ceil_add_int _ _)
92+
93+
theorem ceil_lt_add_one (x : α) : (⌈x⌉ : α) < x + 1 :=
94+
by rw [← lt_ceil, ← int.cast_one, ceil_add_int]; apply lt_add_one
95+
96+
end
97+
98+
class archimedean (α) [ordered_comm_monoid α] : Prop :=
99+
(arch : ∀ (x : α) {y}, 0 < y → ∃ n, x ≤ y • n)
100+
101+
theorem exists_nat_gt [linear_ordered_semiring α] [archimedean α]
102+
(x : α) : ∃ n : ℕ, x < n :=
103+
let ⟨n, h⟩ := archimedean.arch x zero_lt_one in
104+
⟨n+1, lt_of_le_of_lt (by simpa using h)
105+
(nat.cast_lt.2 (nat.lt_succ_self _))⟩
106+
107+
section linear_ordered_ring
108+
variables [linear_ordered_ring α] [archimedean α]
109+
110+
theorem exists_int_gt (x : α) : ∃ n : ℤ, x < n :=
111+
let ⟨n, h⟩ := exists_nat_gt x in ⟨n, by simp [h]⟩
112+
113+
theorem exists_int_lt (x : α) : ∃ n : ℤ, (n : α) < x :=
114+
let ⟨n, h⟩ := exists_int_gt (-x) in ⟨-n, by simp [neg_lt.1 h]⟩
115+
116+
theorem exists_floor (x : α) :
117+
∃ (fl : ℤ), ∀ (z : ℤ), z ≤ fl ↔ (z : α) ≤ x :=
118+
begin
119+
have := classical.prop_decidable,
120+
have : ∃ (ub : ℤ), (ub:α) ≤ x ∧ ∀ (z : ℤ), (z:α) ≤ x → z ≤ ub :=
121+
int.exists_greatest_of_bdd
122+
(let ⟨n, hn⟩ := exists_int_gt x in ⟨n, λ z h',
123+
int.cast_le.1 $ le_trans h' $ le_of_lt hn⟩)
124+
(let ⟨n, hn⟩ := exists_int_lt x in ⟨n, le_of_lt hn⟩),
125+
refine this.imp (λ fl h z, _),
126+
cases h with h₁ h₂,
127+
exact ⟨λ h, le_trans (int.cast_le.2 h) h₁, h₂ z⟩,
128+
end
129+
130+
end linear_ordered_ring
131+
132+
instance : archimedean ℕ :=
133+
⟨λ n m m0, ⟨n, by simpa using nat.mul_le_mul_right n m0⟩⟩
134+
135+
instance : archimedean ℤ :=
136+
⟨λ n m m0, ⟨n.to_nat, begin
137+
simp [add_monoid.smul_eq_mul],
138+
refine le_trans (int.le_to_nat _) _,
139+
simpa using mul_le_mul_of_nonneg_right
140+
(int.add_one_le_iff.2 m0) (int.coe_zero_le n.to_nat),
141+
end⟩⟩
142+
143+
noncomputable def archimedean.floor_ring (α)
144+
[R : linear_ordered_ring α] [archimedean α] : floor_ring α :=
145+
{ floor := λ x, classical.some (exists_floor x),
146+
le_floor := λ z x, classical.some_spec (exists_floor x) z,
147+
..R }
148+
149+
section linear_ordered_field
150+
variables [linear_ordered_field α]
151+
152+
theorem archimedean_iff_nat_lt :
153+
archimedean α ↔ ∀ x : α, ∃ n : ℕ, x < n :=
154+
⟨@exists_nat_gt α _, λ H, ⟨λ x y y0,
155+
(H (x / y)).imp $ λ n h, le_of_lt $
156+
by rwa [div_lt_iff y0, ← add_monoid.smul_eq_mul'] at h⟩⟩
157+
158+
theorem archimedean_iff_nat_le :
159+
archimedean α ↔ ∀ x : α, ∃ n : ℕ, x ≤ n :=
160+
archimedean_iff_nat_lt.trans
161+
⟨λ H x, (H x).imp $ λ _, le_of_lt,
162+
λ H x, let ⟨n, h⟩ := H x in ⟨n+1,
163+
lt_of_le_of_lt h (nat.cast_lt.2 (lt_add_one _))⟩⟩
164+
165+
theorem exists_rat_gt [archimedean α] (x : α) : ∃ q : ℚ, x < q :=
166+
let ⟨n, h⟩ := exists_nat_gt x in ⟨n, by simp [h]⟩
167+
168+
theorem archimedean_iff_rat_lt :
169+
archimedean α ↔ ∀ x : α, ∃ q : ℚ, x < q :=
170+
⟨@exists_rat_gt α _,
171+
λ H, archimedean_iff_nat_lt.2 $ λ x,
172+
let ⟨q, h⟩ := H x in
173+
⟨rat.nat_ceil q, lt_of_lt_of_le h $
174+
by simpa using (@rat.cast_le α _ _ _).2 (rat.le_nat_ceil _)⟩⟩
175+
176+
theorem archimedean_iff_rat_le :
177+
archimedean α ↔ ∀ x : α, ∃ q : ℚ, x ≤ q :=
178+
archimedean_iff_rat_lt.trans
179+
⟨λ H x, (H x).imp $ λ _, le_of_lt,
180+
λ H x, let ⟨n, h⟩ := H x in ⟨n+1,
181+
lt_of_le_of_lt h (rat.cast_lt.2 (lt_add_one _))⟩⟩
182+
183+
variable [archimedean α]
184+
185+
theorem exists_rat_lt (x : α) : ∃ q : ℚ, (q : α) < x :=
186+
let ⟨n, h⟩ := exists_int_lt x in ⟨n, by simp [h]⟩
187+
188+
theorem exists_pos_rat_lt {x : α} (x0 : 0 < x) : ∃ q : ℚ, 0 < q ∧ (q : α) < x :=
189+
let ⟨n, h⟩ := exists_nat_gt x⁻¹ in begin
190+
have n0 := nat.cast_pos.1 (lt_trans (inv_pos x0) h),
191+
refine ⟨n⁻¹, inv_pos (nat.cast_pos.2 n0), _⟩,
192+
simpa [rat.cast_inv_of_ne_zero, ne_of_gt n0] using
193+
(inv_lt x0 (nat.cast_pos.2 n0)).1 h
194+
end
195+
196+
theorem exists_rat_btwn {x y : α} (h : x < y) : ∃ q : ℚ, x < q ∧ (q:α) < y :=
197+
begin
198+
cases exists_nat_gt (y - x)⁻¹ with n nh,
199+
cases exists_floor (x * n) with z zh,
200+
refine ⟨(z + 1 : ℤ) / n, _⟩,
201+
have n0 := nat.cast_pos.1 (lt_trans (inv_pos (sub_pos.2 h)) nh),
202+
simp [rat.cast_div_of_ne_zero, -int.cast_add, ne_of_gt n0],
203+
have n0' := (@nat.cast_pos α _ _).2 n0,
204+
refine ⟨(lt_div_iff n0').2 $
205+
(le_iff_le_iff_lt_iff_lt.1 (zh _)).1 (lt_add_one _), _⟩,
206+
simp [div_lt_iff n0', -add_comm],
207+
refine lt_of_le_of_lt (add_le_add_right ((zh _).1 (le_refl _)) _) _,
208+
rwa [← lt_sub_iff_add_lt', ← sub_mul,
209+
← div_lt_iff' (sub_pos.2 h), one_div_eq_inv]
210+
end
211+
212+
end linear_ordered_field
213+
214+
section
215+
variables [discrete_linear_ordered_field α] [archimedean α]
216+
217+
theorem exists_rat_near (x : α) {ε : α} (ε0 : ε > 0) :
218+
∃ q : ℚ, abs (x - q) < ε :=
219+
let ⟨q, h₁, h₂⟩ := exists_rat_btwn $
220+
lt_trans ((sub_lt_self_iff x).2 ε0) ((lt_add_iff_pos_left x).2 ε0) in
221+
⟨q, abs_sub_lt_iff.2 ⟨sub_lt.1 h₁, sub_lt_iff_lt_add.2 h₂⟩⟩
222+
223+
end
224+
225+
instance : archimedean ℚ :=
226+
archimedean_iff_rat_le.2 $ λ q, ⟨q, by simp⟩

algebra/group_power.lean

Lines changed: 63 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ a^n is used for the first, but users can locally redefine it to gpow when needed
1111
1212
Note: power adopts the convention that 0^0=1.
1313
-/
14-
import data.nat.basic data.int.basic algebra.group algebra.field data.list.basic
14+
import algebra.char_zero data.int.basic algebra.group algebra.ordered_field data.list.basic
1515

1616
universe u
1717
variable {α : Type u}
@@ -80,6 +80,9 @@ theorem add_monoid.smul_mul (a : β) (m : ℕ) : ∀ n, a•(m * n) = (a•m)•
8080
| (n+1) := by rw [nat.mul_succ, add_monoid.smul_add, smul_succ', add_monoid.smul_mul]
8181
attribute [to_additive add_monoid.smul_mul] pow_mul
8282

83+
@[simp] theorem add_monoid.one_smul [has_one β] : ∀ n, (1 : β) • n = n :=
84+
nat.eq_cast _ (add_monoid.smul_zero _) (add_monoid.smul_one _) (add_monoid.smul_add _)
85+
8386
@[to_additive smul_bit0]
8487
theorem pow_bit0 (a : α) (n : ℕ) : a ^ bit0 n = a^n * a^n := pow_add _ _ _
8588

@@ -257,6 +260,32 @@ attribute [to_additive gsmul_bit1] gpow_bit1
257260

258261
end group
259262

263+
theorem add_monoid.smul_eq_mul [semiring α] (a : α) : ∀ n, a • n = a * n
264+
| 0 := by simp
265+
| (n+1) := by simp [add_monoid.smul_eq_mul n, mul_add, smul_succ']
266+
267+
theorem add_monoid.smul_eq_mul' [semiring α] (a : α) (n) : a • n = n * a :=
268+
by rw [add_monoid.smul_eq_mul, nat.mul_cast_comm]
269+
270+
theorem add_monoid.mul_smul_assoc [semiring α] (a b : α) (n) : (a * b) • n = a * b • n :=
271+
by rw [add_monoid.smul_eq_mul, add_monoid.smul_eq_mul, mul_assoc]
272+
273+
theorem add_monoid.mul_smul_right [semiring α] (a b : α) (n) : (a * b) • n = a • n * b :=
274+
by rw [add_monoid.smul_eq_mul', add_monoid.smul_eq_mul', mul_assoc]
275+
276+
theorem gsmul_eq_mul [ring α] (a : α) : ∀ n, gsmul a n = a * n
277+
| (n : ℕ) := by simp [add_monoid.smul_eq_mul]
278+
| -[1+ n] := by simp [add_monoid.smul_eq_mul, -add_comm, mul_add]
279+
280+
theorem gsmul_eq_mul' [ring α] (a : α) (n) : gsmul a n = n * a :=
281+
by rw [gsmul_eq_mul, int.mul_cast_comm]
282+
283+
theorem mul_gsmul_assoc [ring α] (a b : α) (n) : gsmul (a * b) n = a * gsmul b n :=
284+
by rw [gsmul_eq_mul, gsmul_eq_mul, mul_assoc]
285+
286+
theorem mul_gsmul_right [ring α] (a b : α) (n) : gsmul (a * b) n = gsmul a n * b :=
287+
by rw [gsmul_eq_mul', gsmul_eq_mul', mul_assoc]
288+
260289
theorem pow_ne_zero [domain α] {a : α} (n : ℕ) (h : a ≠ 0) : a ^ n ≠ 0 :=
261290
by induction n with n ih; simp [pow_succ, mul_eq_zero, *]
262291

@@ -271,35 +300,55 @@ by simp [inv_eq_one_div, -one_div_eq_inv, ha]
271300
@[simp] theorem div_pow [field α] (a : α) {b : α} (hb : b ≠ 0) (n) : (a / b) ^ n = a ^ n / b ^ n :=
272301
by rw [div_eq_mul_one_div, mul_pow, one_div_pow hb, ← div_eq_mul_one_div]
273302

274-
section ordered_ring
275-
variable [linear_ordered_ring α]
303+
theorem add_monoid.smul_nonneg [ordered_comm_monoid α] {a : α} (H : 0 ≤ a) : ∀ n, 0 ≤ a • n
304+
| 0 := le_refl _
305+
| (n+1) := add_nonneg' H (add_monoid.smul_nonneg n)
306+
307+
section linear_ordered_semiring
308+
variable [linear_ordered_semiring α]
276309

277-
theorem pow_pos {a : α} (H : a > 0) : ∀ (n : ℕ), a ^ n > 0
278-
| 0 := by simp; apply zero_lt_one
279-
| (n+1) := begin simp [_root_.pow_succ], apply mul_pos, assumption, apply pow_pos end
310+
theorem pow_pos {a : α} (H : 0 < a) : ∀ (n : ℕ), 0 < a ^ n
311+
| 0 := by simp [zero_lt_one]
312+
| (n+1) := by simpa [pow_succ] using mul_pos H (pow_pos _)
280313

281-
theorem pow_nonneg {a : α} (H : a ≥ 0) : ∀ (n : ℕ), a ^ n0
282-
| 0 := by simp; apply zero_le_one
283-
| (n+1) := begin simp [_root_.pow_succ], apply mul_nonneg, assumption, apply pow_nonneg end
314+
theorem pow_nonneg {a : α} (H : 0 ≤ a) : ∀ (n : ℕ), 0a ^ n
315+
| 0 := by simp [zero_le_one]
316+
| (n+1) := by simpa [pow_succ] using mul_nonneg H (pow_nonneg _)
284317

285-
theorem pow_ge_one_of_ge_one {a : α} (H : a ≥ 1) : ∀ (n : ℕ), a ^ n1
318+
theorem one_le_pow_of_one_le {a : α} (H : 1 ≤ a) : ∀ (n : ℕ), 1a ^ n
286319
| 0 := by simp; apply le_refl
287320
| (n+1) :=
288321
begin
289-
simp [_root_.pow_succ], rw ←(one_mul (1 : α)),
322+
simp [pow_succ], rw ← one_mul (1 : α),
290323
apply mul_le_mul,
291324
assumption,
292-
apply pow_ge_one_of_ge_one,
325+
apply one_le_pow_of_one_le,
293326
apply zero_le_one,
294327
transitivity, apply zero_le_one, assumption
295328
end
296329

330+
theorem pow_ge_one_add_mul {a : α} (H : a ≥ 0) :
331+
∀ (n : ℕ), 1 + a • n ≤ (1 + a) ^ n
332+
| 0 := by simp
333+
| (n+1) := begin
334+
rw [pow_succ', smul_succ'],
335+
refine le_trans _ (mul_le_mul_of_nonneg_right
336+
(pow_ge_one_add_mul n) (add_nonneg zero_le_one H)),
337+
rw [mul_add, mul_one, ← add_assoc, add_le_add_iff_left],
338+
simpa using mul_le_mul_of_nonneg_right
339+
((le_add_iff_nonneg_right 1).2 (add_monoid.smul_nonneg H n)) H
340+
end
341+
297342
theorem pow_le_pow {a : α} {n m : ℕ} (ha : 1 ≤ a) (h : n ≤ m) : a ^ n ≤ a ^ m :=
298343
let ⟨k, hk⟩ := nat.le.dest h in
299344
calc a ^ n = a ^ n * 1 : by simp
300345
... ≤ a ^ n * a ^ k : mul_le_mul_of_nonneg_left
301-
(pow_ge_one_of_ge_one ha _)
346+
(one_le_pow_of_one_le ha _)
302347
(pow_nonneg (le_trans zero_le_one ha) _)
303348
... = a ^ m : by rw [←hk, pow_add]
304349

305-
end ordered_ring
350+
end linear_ordered_semiring
351+
352+
theorem pow_ge_one_add_sub_mul [linear_ordered_ring α]
353+
{a : α} (H : a ≥ 1) (n : ℕ) : 1 + (a - 1) • n ≤ a ^ n :=
354+
by simpa using pow_ge_one_add_mul (sub_nonneg.2 H) n

analysis/complex.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Author: Mario Carneiro
55
66
Topology of the complex numbers.
77
-/
8-
import data.complex analysis.metric_space
8+
import data.complex.basic analysis.metric_space
99

1010
noncomputable theory
1111
open filter

analysis/ennreal.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ protected lemma lt_iff_exists_rat_btwn :
405405
rcases lt_iff_exists_of_real.1 h with ⟨p, p0, rfl, _⟩;
406406
rcases dense h with ⟨c, pc, cb⟩;
407407
rcases lt_iff_exists_of_real.1 cb with ⟨r, r0, rfl, _⟩;
408-
rcases real.exists_rat_btwn ((of_real_lt_of_real_iff p0 r0).1 pc) with ⟨q, pq, qr⟩;
408+
rcases exists_rat_btwn ((of_real_lt_of_real_iff p0 r0).1 pc) with ⟨q, pq, qr⟩;
409409
have q0 := le_trans p0 (le_of_lt pq); exact
410410
⟨q, rat.cast_nonneg.1 q0, (of_real_lt_of_real_iff p0 q0).2 pq,
411411
lt_trans ((of_real_lt_of_real_iff q0 r0).2 qr) cb⟩,

analysis/limits.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ lemma mul_add_one_le_pow {r : ℝ} (hr : 0 ≤ r) : ∀{n:ℕ}, (n:ℝ) * r + 1
8282

8383
lemma tendsto_pow_at_top_at_top_of_gt_1 {r : ℝ} (h : r > 1) : tendsto (λn:ℕ, r ^ n) at_top at_top :=
8484
tendsto_infi.2 $ assume p, tendsto_principal.2 $
85-
let ⟨n, hn⟩ := real.exists_nat_gt (p / (r - 1)) in
85+
let ⟨n, hn⟩ := exists_nat_gt (p / (r - 1)) in
8686
have hn_nn : (0:ℝ) ≤ n, from nat.cast_nonneg n,
8787
have r - 1 > 0, from sub_lt_iff.mp $ by simp; assumption,
8888
have p ≤ r ^ n,

analysis/measure_theory/borel_space.lean

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -220,13 +220,13 @@ have ∀a b : ℚ, a < b → g.is_measurable (Ioo a b),
220220
from assume q, g.is_measurable_compl _ $ hg q,
221221
have (⋃c>a, - Iio (c:ℝ)) ∩ Iio b = Ioo a b,
222222
from set.ext $ assume x,
223-
have h₁ : x < b → ∀p:ℚ, (p:ℝ) ≤ x → p > a → (a:ℝ) < x,
224-
from assume hxb p hpx hpa, lt_of_lt_of_le (rat.cast_lt.2 hpa) hpx,
225-
have h₂ : x < b → (a:ℝ) < x → (∃ (i : ℚ), (i:ℝ) ≤ xi > a),
226-
from assume hxb hax,
223+
have h₁ : ∀p:ℚ, p > a → (p:ℝ) ≤ x → x < b → (a:ℝ) < x,
224+
from assume p hpa hpx hxb, lt_of_lt_of_le (rat.cast_lt.2 hpa) hpx,
225+
have h₂ : (a:ℝ) < x → x < b → (∃ (i : ℚ), i > a(i:ℝ) ≤ x),
226+
from assume hax hxb,
227227
let ⟨c, hac, hcx⟩ := exists_rat_btwn hax in
228-
⟨c, le_of_lt hcx, rat.cast_lt.1 hac⟩,
229-
by simp [iff_def, Iio, Ioo, and_comm] {contextual := tt}; exact ⟨h₁, h₂⟩,
228+
⟨c, rat.cast_lt.1 hac, le_of_lt hcx⟩,
229+
by simp [iff_def, Iio, Ioo] {contextual := tt}; exact ⟨h₁, h₂⟩,
230230
this ▸ @is_measurable_inter _ g _ _
231231
(@is_measurable_bUnion _ _ g _ _ countable_encodable $ assume b hb, hgc b)
232232
(hg b),

0 commit comments

Comments
 (0)