@@ -318,6 +318,158 @@ begin
318
318
exact hs.Icc_subset ys zs ⟨le_of_lt hy, le_of_lt hz⟩
319
319
end
320
320
321
+ /-!
322
+ ### Neighborhoods to the left and to the right on an `order_closed_topology`
323
+
324
+ Limits to the left and to the right of real functions are defined in terms of neighborhoods to
325
+ the left and to the right, either open or closed, i.e., members of `nhds_within a (Ioi a)` and
326
+ `nhds_within a (Ici a)` on the right, and similarly on the left. Here we simply prove that all
327
+ right-neighborhoods of a point are equal, and we'll prove later other useful characterizations which
328
+ require the stronger hypothesis `order_topology α` -/
329
+
330
+ -- NB: If you extend the list, append to the end please to avoid breaking the API
331
+ /-- The following statements are equivalent:
332
+
333
+ 0. `s` is a neighborhood of `a` within `(a, +∞)`
334
+ 1. `s` is a neighborhood of `a` within `(a, b]`
335
+ 2. `s` is a neighborhood of `a` within `(a, b)` -/
336
+ lemma tfae_mem_nhds_within_Ioi' {a b : α} (hab : a < b) (s : set α) :
337
+ tfae [s ∈ nhds_within a (Ioi a), -- 0 : `s` is a neighborhood of `a` within `(a, +∞)`
338
+ s ∈ nhds_within a (Ioc a b), -- 1 : `s` is a neighborhood of `a` within `(a, b]`
339
+ s ∈ nhds_within a (Ioo a b)] := -- 2 : `s` is a neighborhood of `a` within `(a, b)`
340
+ begin
341
+ tfae_have : 1 → 2 , from λ h, nhds_within_mono _ Ioc_subset_Ioi_self h,
342
+ tfae_have : 2 → 3 , from λ h, nhds_within_mono _ Ioo_subset_Ioc_self h,
343
+ tfae_have : 3 → 1 ,
344
+ { rw [mem_nhds_within, mem_nhds_within],
345
+ rintros ⟨ u, huopen, hau, hu ⟩,
346
+ use u ∩ Iio b,
347
+ use is_open_inter huopen is_open_Iio,
348
+ use ⟨ hau, hab ⟩,
349
+ exact λ x ⟨ ⟨ hxu, hxb ⟩, hxa ⟩, hu ⟨ hxu, ⟨ hxa, hxb ⟩ ⟩ },
350
+ tfae_finish
351
+ end
352
+
353
+ @[simp] lemma nhds_within_Ioc_eq_nhds_within_Ioi {a b : α} (h : a < b) :
354
+ nhds_within a (Ioc a b) = nhds_within a (Ioi a) :=
355
+ filter.ext $ λ s, (tfae_mem_nhds_within_Ioi' h s).out 1 0
356
+
357
+ @[simp] lemma nhds_within_Ioo_eq_nhds_within_Ioi {a b : α} (hu : a < b) :
358
+ nhds_within a (Ioo a b) = nhds_within a (Ioi a) :=
359
+ filter.ext $ λ s, (tfae_mem_nhds_within_Ioi' hu s).out 2 0
360
+
361
+ @[simp] lemma continuous_within_at_Ioc_iff_Ioi [topological_space β] {a b : α} {f : α → β} (h : a < b) :
362
+ continuous_within_at f (Ioc a b) a ↔ continuous_within_at f (Ioi a) a :=
363
+ by simp only [continuous_within_at, nhds_within_Ioc_eq_nhds_within_Ioi h]
364
+
365
+ @[simp] lemma continuous_within_at_Ioo_iff_Ioi [topological_space β] {a b : α} {f : α → β} (h : a < b) :
366
+ continuous_within_at f (Ioo a b) a ↔ continuous_within_at f (Ioi a) a :=
367
+ by simp only [continuous_within_at, nhds_within_Ioo_eq_nhds_within_Ioi h]
368
+
369
+ /-- The following statements are equivalent:
370
+
371
+ 0. `s` is a neighborhood of `b` within `(-∞, b)`
372
+ 1. `s` is a neighborhood of `b` within `[a, b)`
373
+ 2. `s` is a neighborhood of `b` within `(a, b)` -/
374
+ lemma tfae_mem_nhds_within_Iio' {a b : α} (h : a < b) (s : set α) :
375
+ tfae [s ∈ nhds_within b (Iio b), -- 0 : `s` is a neighborhood of `b` within `(-∞, b)`
376
+ s ∈ nhds_within b (Ico a b), -- 1 : `s` is a neighborhood of `b` within `[a, b)`
377
+ s ∈ nhds_within b (Ioo a b)] := -- 2 : `s` is a neighborhood of `b` within `(a, b)`
378
+ begin
379
+ have := @tfae_mem_nhds_within_Ioi' (order_dual α) _ _ _ _ _ h s,
380
+ -- If we call `convert` here, it generates wrong equations, so we need to simplify first
381
+ simp only [exists_prop] at this ⊢,
382
+ rw [dual_Ioi, dual_Ioc, dual_Ioo] at this ,
383
+ convert this
384
+ end
385
+
386
+ @[simp] lemma nhds_within_Ico_eq_nhds_within_Iio {a b : α} (h : a < b) :
387
+ nhds_within b (Ico a b) = nhds_within b (Iio b) :=
388
+ filter.ext $ λ s, (tfae_mem_nhds_within_Iio' h s).out 1 0
389
+
390
+ @[simp] lemma nhds_within_Ioo_eq_nhds_within_Iio {a b : α} (h : a < b) :
391
+ nhds_within b (Ioo a b) = nhds_within b (Iio b) :=
392
+ filter.ext $ λ s, (tfae_mem_nhds_within_Iio' h s).out 2 0
393
+
394
+ @[simp] lemma continuous_within_at_Ico_iff_Iio [topological_space β] {a b : α} {f : α → β} (h : a < b) :
395
+ continuous_within_at f (Ico a b) b ↔ continuous_within_at f (Iio b) b :=
396
+ by simp only [continuous_within_at, nhds_within_Ico_eq_nhds_within_Iio h]
397
+
398
+ @[simp] lemma continuous_within_at_Ioo_iff_Iio [topological_space β] {a b : α} {f : α → β} (h : a < b) :
399
+ continuous_within_at f (Ioo a b) b ↔ continuous_within_at f (Iio b) b :=
400
+ by simp only [continuous_within_at, nhds_within_Ioo_eq_nhds_within_Iio h]
401
+
402
+ /-- The following statements are equivalent:
403
+
404
+ 0. `s` is a neighborhood of `a` within `[a, +∞)`
405
+ 1. `s` is a neighborhood of `a` within `[a, b]`
406
+ 2. `s` is a neighborhood of `a` within `[a, b)` -/
407
+ lemma tfae_mem_nhds_within_Ici' {a b : α} (hab : a < b) (s : set α) :
408
+ tfae [s ∈ nhds_within a (Ici a), -- 0 : `s` is a neighborhood of `a` within `[a, +∞)`
409
+ s ∈ nhds_within a (Icc a b), -- 1 : `s` is a neighborhood of `a` within `[a, b]`
410
+ s ∈ nhds_within a (Ico a b)] := -- 2 : `s` is a neighborhood of `a` within `[a, b)`
411
+ begin
412
+ tfae_have : 1 → 2 , from λ h, nhds_within_mono _ Icc_subset_Ici_self h,
413
+ tfae_have : 2 → 3 , from λ h, nhds_within_mono _ Ico_subset_Icc_self h,
414
+ tfae_have : 3 → 1 ,
415
+ { rw [mem_nhds_within, mem_nhds_within],
416
+ rintros ⟨ u, huopen, hau, hu ⟩,
417
+ use u ∩ Iio b,
418
+ use is_open_inter huopen is_open_Iio,
419
+ use ⟨ hau, hab ⟩,
420
+ exact λ x ⟨ ⟨ hxu, hxb ⟩, hxa ⟩, hu ⟨ hxu, ⟨ hxa, hxb ⟩ ⟩ },
421
+ tfae_finish
422
+ end
423
+
424
+ @[simp] lemma nhds_within_Icc_eq_nhds_within_Ici {a b : α} (h : a < b) :
425
+ nhds_within a (Icc a b) = nhds_within a (Ici a) :=
426
+ filter.ext $ λ s, (tfae_mem_nhds_within_Ici' h s).out 1 0
427
+
428
+ @[simp] lemma nhds_within_Ico_eq_nhds_within_Ici {a b : α} (hu : a < b) :
429
+ nhds_within a (Ico a b) = nhds_within a (Ici a) :=
430
+ filter.ext $ λ s, (tfae_mem_nhds_within_Ici' hu s).out 2 0
431
+
432
+ @[simp] lemma continuous_within_at_Icc_iff_Ici [topological_space β] {a b : α} {f : α → β} (h : a < b) :
433
+ continuous_within_at f (Icc a b) a ↔ continuous_within_at f (Ici a) a :=
434
+ by simp only [continuous_within_at, nhds_within_Icc_eq_nhds_within_Ici h]
435
+
436
+ @[simp] lemma continuous_within_at_Ico_iff_Ici [topological_space β] {a b : α} {f : α → β} (h : a < b) :
437
+ continuous_within_at f (Ico a b) a ↔ continuous_within_at f (Ici a) a :=
438
+ by simp only [continuous_within_at, nhds_within_Ico_eq_nhds_within_Ici h]
439
+
440
+ /-- The following statements are equivalent:
441
+
442
+ 0. `s` is a neighborhood of `b` within `(-∞, b]`
443
+ 1. `s` is a neighborhood of `b` within `[a, b]`
444
+ 2. `s` is a neighborhood of `b` within `(a, b]` -/
445
+ lemma tfae_mem_nhds_within_Iic' {a b : α} (h : a < b) (s : set α) :
446
+ tfae [s ∈ nhds_within b (Iic b), -- 0 : `s` is a neighborhood of `b` within `(-∞, b]`
447
+ s ∈ nhds_within b (Icc a b), -- 1 : `s` is a neighborhood of `b` within `[a, b]`
448
+ s ∈ nhds_within b (Ioc a b)] := -- 2 : `s` is a neighborhood of `b` within `(a, b]`
449
+ begin
450
+ have := @tfae_mem_nhds_within_Ici' (order_dual α) _ _ _ _ _ h s,
451
+ -- If we call `convert` here, it generates wrong equations, so we need to simplify first
452
+ simp only [exists_prop] at this ⊢,
453
+ rw [dual_Ici, dual_Icc, dual_Ico] at this ,
454
+ convert this
455
+ end
456
+
457
+ @[simp] lemma nhds_within_Icc_eq_nhds_within_Iic {a b : α} (h : a < b) :
458
+ nhds_within b (Icc a b) = nhds_within b (Iic b) :=
459
+ filter.ext $ λ s, (tfae_mem_nhds_within_Iic' h s).out 1 0 (by norm_num) (by norm_num)
460
+
461
+ @[simp] lemma nhds_within_Ioc_eq_nhds_within_Iic {a b : α} (h : a < b) :
462
+ nhds_within b (Ioc a b) = nhds_within b (Iic b) :=
463
+ filter.ext $ λ s, (tfae_mem_nhds_within_Iic' h s).out 2 0 (by norm_num) (by norm_num)
464
+
465
+ @[simp] lemma continuous_within_at_Icc_iff_Iic [topological_space β] {a b : α} {f : α → β} (h : a < b) :
466
+ continuous_within_at f (Icc a b) b ↔ continuous_within_at f (Iic b) b :=
467
+ by simp only [continuous_within_at, nhds_within_Icc_eq_nhds_within_Iic h]
468
+
469
+ @[simp] lemma continuous_within_at_Ioc_iff_Iic [topological_space β] {a b : α} {f : α → β} (h : a < b) :
470
+ continuous_within_at f (Ioc a b) b ↔ continuous_within_at f (Iic b) b :=
471
+ by simp only [continuous_within_at, nhds_within_Ioc_eq_nhds_within_Iic h]
472
+
321
473
end linear_order
322
474
323
475
section decidable_linear_order
@@ -738,13 +890,11 @@ lemma not_tendsto_at_bot_of_tendsto_nhds [no_bot_order α]
738
890
hf.not_tendsto (disjoint_nhds_at_bot x)
739
891
740
892
/-!
741
- ### Neighborhoods to the left and to the right
893
+ ### Neighborhoods to the left and to the right on an `order_topology`
742
894
743
- Limits to the left and to the right of real functions are defined in terms of neighborhoods to
744
- the left and to the right, either open or closed, i.e., members of `nhds_within a (Ioi a)` and
745
- `nhds_wihin a (Ici a)` on the right, and similarly on the left. Such neighborhoods can be
746
- characterized as the sets containing suitable intervals to the right or to the left of `a`.
747
- We give now these characterizations. -/
895
+ We've seen some properties of left and right neighborhood of a point in an `order_closed_topology`.
896
+ In an `order_topology`, such neighborhoods can be characterized as the sets containing suitable
897
+ intervals to the right or to the left of `a`. We give now these characterizations. -/
748
898
749
899
-- NB: If you extend the list, append to the end please to avoid breaking the API
750
900
/-- The following statements are equivalent:
@@ -761,30 +911,23 @@ lemma tfae_mem_nhds_within_Ioi {a b : α} (hab : a < b) (s : set α) :
761
911
∃ u ∈ Ioc a b, Ioo a u ⊆ s, -- 3 : `s` includes `(a, u)` for some `u ∈ (a, b]`
762
912
∃ u ∈ Ioi a, Ioo a u ⊆ s] := -- 4 : `s` includes `(a, u)` for some `u > a`
763
913
begin
764
- tfae_have : 1 → 2 , from λ h, nhds_within_mono _ Ioc_subset_Ioi_self h ,
765
- tfae_have : 2 → 3 , from λ h, nhds_within_mono _ Ioo_subset_Ioc_self h ,
914
+ tfae_have : 1 ↔ 2 , from (tfae_mem_nhds_within_Ioi' hab s).out 0 1 ,
915
+ tfae_have : 2 ↔ 3 , from (tfae_mem_nhds_within_Ioi' hab s).out 1 2 ,
766
916
tfae_have : 4 → 5 , from λ ⟨u, umem, hu⟩, ⟨u, umem.1 , hu⟩,
767
917
tfae_have : 5 → 1 ,
768
918
{ rintros ⟨u, hau, hu⟩,
769
919
exact mem_nhds_within.2 ⟨Iio u, is_open_Iio, hau, by rwa [inter_comm, Ioi_inter_Iio]⟩ },
770
- tfae_have : 3 → 4 ,
920
+ tfae_have : 1 → 4 ,
771
921
{ assume h,
772
922
rcases mem_nhds_within_iff_exists_mem_nhds_inter.1 h with ⟨v, va, hv⟩,
773
923
rcases exists_Ico_subset_of_mem_nhds' va hab with ⟨u, au, hu⟩,
774
924
refine ⟨u, au, λx hx, _⟩,
775
925
refine hv ⟨hu ⟨le_of_lt hx.1 , hx.2 ⟩, _⟩,
776
- exact Ioo_subset_Ioo_right au.2 hx },
926
+ exact hx.1 },
927
+ have := tfae_mem_nhds_within_Ioi' hab s,
777
928
tfae_finish
778
929
end
779
930
780
- @[simp] lemma nhds_within_Ioc_eq_nhds_within_Ioi {a b : α} (h : a < b) :
781
- nhds_within a (Ioc a b) = nhds_within a (Ioi a) :=
782
- filter.ext $ λ s, (tfae_mem_nhds_within_Ioi h s).out 1 0
783
-
784
- @[simp] lemma nhds_within_Ioo_eq_nhds_within_Ioi {a b : α} (hu : a < b) :
785
- nhds_within a (Ioo a b) = nhds_within a (Ioi a) :=
786
- filter.ext $ λ s, (tfae_mem_nhds_within_Ioi hu s).out 2 0
787
-
788
931
lemma mem_nhds_within_Ioi_iff_exists_mem_Ioc_Ioo_subset {a u' : α} {s : set α} (hu' : a < u') :
789
932
s ∈ nhds_within a (Ioi a) ↔ ∃u ∈ Ioc a u', Ioo a u ⊆ s :=
790
933
(tfae_mem_nhds_within_Ioi hu' s).out 0 3
@@ -852,14 +995,6 @@ begin
852
995
convert this ; ext l; rw [dual_Ioo]
853
996
end
854
997
855
- @[simp] lemma nhds_within_Ico_eq_nhds_within_Iio {a b : α} (h : a < b) :
856
- nhds_within b (Ico a b) = nhds_within b (Iio b) :=
857
- filter.ext $ λ s, (tfae_mem_nhds_within_Iio h s).out 1 0
858
-
859
- @[simp] lemma nhds_within_Ioo_eq_nhds_within_Iio {a b : α} (h : a < b) :
860
- nhds_within b (Ioo a b) = nhds_within b (Iio b) :=
861
- filter.ext $ λ s, (tfae_mem_nhds_within_Iio h s).out 2 0
862
-
863
998
lemma mem_nhds_within_Iio_iff_exists_mem_Ico_Ioo_subset {a l' : α} {s : set α} (hl' : l' < a) :
864
999
s ∈ nhds_within a (Iio a) ↔ ∃l ∈ Ico l' a, Ioo l a ⊆ s :=
865
1000
(tfae_mem_nhds_within_Iio hl' s).out 0 3
@@ -915,30 +1050,22 @@ lemma tfae_mem_nhds_within_Ici {a b : α} (hab : a < b) (s : set α) :
915
1050
∃ u ∈ Ioc a b, Ico a u ⊆ s, -- 3 : `s` includes `[a, u)` for some `u ∈ (a, b]`
916
1051
∃ u ∈ Ioi a, Ico a u ⊆ s] := -- 4 : `s` includes `[a, u)` for some `u > a`
917
1052
begin
918
- tfae_have : 1 → 2 , from λ h, nhds_within_mono _ Icc_subset_Ici_self h ,
919
- tfae_have : 2 → 3 , from λ h, nhds_within_mono _ Ico_subset_Icc_self h ,
1053
+ tfae_have : 1 ↔ 2 , from (tfae_mem_nhds_within_Ici' hab s).out 0 1 ,
1054
+ tfae_have : 2 ↔ 3 , from (tfae_mem_nhds_within_Ici' hab s).out 1 2 ,
920
1055
tfae_have : 4 → 5 , from λ ⟨u, umem, hu⟩, ⟨u, umem.1 , hu⟩,
921
1056
tfae_have : 5 → 1 ,
922
1057
{ rintros ⟨u, hau, hu⟩,
923
1058
exact mem_nhds_within.2 ⟨Iio u, is_open_Iio, hau, by rwa [inter_comm, Ici_inter_Iio]⟩ },
924
- tfae_have : 3 → 4 ,
1059
+ tfae_have : 1 → 4 ,
925
1060
{ assume h,
926
1061
rcases mem_nhds_within_iff_exists_mem_nhds_inter.1 h with ⟨v, va, hv⟩,
927
1062
rcases exists_Ico_subset_of_mem_nhds' va hab with ⟨u, au, hu⟩,
928
1063
refine ⟨u, au, λx hx, _⟩,
929
1064
refine hv ⟨hu ⟨hx.1 , hx.2 ⟩, _⟩,
930
- exact Ico_subset_Ico_right au. 2 hx },
1065
+ exact hx. 1 },
931
1066
tfae_finish
932
1067
end
933
1068
934
- @[simp] lemma nhds_within_Icc_eq_nhds_within_Ici {a b : α} (h : a < b) :
935
- nhds_within a (Icc a b) = nhds_within a (Ici a) :=
936
- filter.ext $ λ s, (tfae_mem_nhds_within_Ici h s).out 1 0 (by norm_num) (by norm_num)
937
-
938
- @[simp] lemma nhds_within_Ico_eq_nhds_within_Ici {a b : α} (hu : a < b) :
939
- nhds_within a (Ico a b) = nhds_within a (Ici a) :=
940
- filter.ext $ λ s, (tfae_mem_nhds_within_Ici hu s).out 2 0 (by norm_num) (by norm_num)
941
-
942
1069
lemma mem_nhds_within_Ici_iff_exists_mem_Ioc_Ico_subset {a u' : α} {s : set α} (hu' : a < u') :
943
1070
s ∈ nhds_within a (Ici a) ↔ ∃u ∈ Ioc a u', Ico a u ⊆ s :=
944
1071
(tfae_mem_nhds_within_Ici hu' s).out 0 3 (by norm_num) (by norm_num)
@@ -1006,14 +1133,6 @@ begin
1006
1133
convert this ; ext l; rw [dual_Ico]
1007
1134
end
1008
1135
1009
- @[simp] lemma nhds_within_Icc_eq_nhds_within_Iic {a b : α} (h : a < b) :
1010
- nhds_within b (Icc a b) = nhds_within b (Iic b) :=
1011
- filter.ext $ λ s, (tfae_mem_nhds_within_Iic h s).out 1 0 (by norm_num) (by norm_num)
1012
-
1013
- @[simp] lemma nhds_within_Ioc_eq_nhds_within_Iic {a b : α} (h : a < b) :
1014
- nhds_within b (Ioc a b) = nhds_within b (Iic b) :=
1015
- filter.ext $ λ s, (tfae_mem_nhds_within_Iic h s).out 2 0 (by norm_num) (by norm_num)
1016
-
1017
1136
lemma mem_nhds_within_Iic_iff_exists_mem_Ico_Ioc_subset {a l' : α} {s : set α} (hl' : l' < a) :
1018
1137
s ∈ nhds_within a (Iic a) ↔ ∃l ∈ Ico l' a, Ioc l a ⊆ s :=
1019
1138
(tfae_mem_nhds_within_Iic hl' s).out 0 3 (by norm_num) (by norm_num)
0 commit comments