@@ -15,6 +15,14 @@ universe u
15
15
lemma zero_le_mul {α : Type u} [ordered_semiring α] {a b : α} : 0 ≤ a → 0 ≤ b → 0 ≤ a * b :=
16
16
mul_nonneg
17
17
18
+ instance linear_ordered_semiring.to_top_order {α : Type *} [linear_ordered_semiring α] :
19
+ no_top_order α :=
20
+ ⟨assume a, ⟨a + 1 , lt_add_of_pos_right _ zero_lt_one⟩⟩
21
+
22
+ instance linear_ordered_semiring.to_bot_order {α : Type *} [linear_ordered_ring α] :
23
+ no_bot_order α :=
24
+ ⟨assume a, ⟨a - 1 , sub_lt_iff.mpr $ lt_add_of_pos_right _ zero_lt_one⟩⟩
25
+
18
26
lemma inv_pos {α : Type *} [linear_ordered_field α] {r : α} : 0 < r → 0 < r⁻¹ :=
19
27
by rw [inv_eq_one_div]; exact div_pos_of_pos_of_pos zero_lt_one
20
28
@@ -523,35 +531,80 @@ instance : t2_space ennreal := by apply_instance
523
531
lemma continuous_of_real : continuous of_real :=
524
532
have ∀x:ennreal, is_open {a : ℝ | x < of_real a},
525
533
from forall_ennreal.mpr ⟨assume r hr,
526
- begin
527
- simp [of_real_lt_of_real_iff_cases],
528
- exact is_open_and
529
- (is_open_lt continuous_const continuous_id)
530
- (is_open_lt continuous_const continuous_id)
531
- end ,
534
+ by simp [of_real_lt_of_real_iff_cases]; exact is_open_and (is_open_lt' r) (is_open_lt' 0 ),
532
535
by simp⟩,
533
536
have ∀x:ennreal, is_open {a : ℝ | of_real a < x},
534
537
from forall_ennreal.mpr ⟨assume r hr,
535
- begin
536
- simp [of_real_lt_of_real_iff_cases],
537
- exact is_open_and (is_open_lt continuous_id continuous_const) is_open_const
538
- end ,
538
+ by simp [of_real_lt_of_real_iff_cases]; exact is_open_and (is_open_gt' r) is_open_const,
539
539
by simp [is_open_const]⟩,
540
540
continuous_generated_from $ begin simp [or_imp_distrib, *] {contextual := tt} end
541
541
542
- /- TODO:
542
+ lemma tendsto_of_real : tendsto of_real (nhds r) (nhds (of_real r)) :=
543
+ continuous_iff_tendsto.mp continuous_of_real r
544
+
545
+ lemma tendsto_of_ennreal (hr : 0 ≤ r) : tendsto of_ennreal (nhds (of_real r)) (nhds r) :=
546
+ tendsto_orderable_unbounded (no_top _) (no_bot _) $
547
+ assume l u hl hu,
548
+ by_cases
549
+ (assume hr : r = 0 ,
550
+ have hl : l < 0 , by rw [hr] at hl; exact hl,
551
+ have hu : 0 < u, by rw [hr] at hu; exact hu,
552
+ have nhds (of_real r) = (⨅l (h₂ : 0 < l), principal {x | x < l}),
553
+ from calc nhds (of_real r) = nhds ⊥ : by simp [hr]; refl
554
+ ... = (⨅u (h₂ : 0 < u), principal {x | x < u}) : nhds_bot_orderable,
555
+ have {x | x < of_real u} ∈ (nhds (of_real r)).sets,
556
+ by rw [this ];
557
+ from mem_infi_sets (of_real u) (mem_infi_sets (by simp *) (subset.refl _)),
558
+ ((nhds (of_real r)).upwards_sets this $ forall_ennreal.mpr $
559
+ by simp [le_of_lt, hu, hl] {contextual := tt}; exact assume p hp _, lt_of_lt_of_le hl hp))
560
+ (assume hr_ne : r ≠ 0 ,
561
+ have hu0 : 0 < u, from lt_of_le_of_lt hr hu,
562
+ have hu_nn: 0 ≤ u, from le_of_lt hu0,
563
+ have hr' : 0 < r, from lt_of_le_of_ne hr hr_ne.symm,
564
+ have hl' : ∃l, l < of_real r, from ⟨0 , by simp [hr, hr']⟩,
565
+ have hu' : ∃u, of_real r < u, from ⟨of_real u, by simp [hr, hu_nn, hu]⟩,
566
+ begin
567
+ rw [mem_nhds_lattice_unbounded hu' hl'],
568
+ existsi (of_real l), existsi (of_real u),
569
+ simp [*, of_real_lt_of_real_iff_cases, forall_ennreal] {contextual := tt}
570
+ end )
571
+
543
572
lemma nhds_of_real_eq_map_of_real_nhds {r : ℝ} (hr : 0 ≤ r) :
544
- nhds (of_real r) = (nhds r ⊓ principal {x | 0 ≤ x}).map of_real :=
573
+ nhds (of_real r) = (nhds r).map of_real :=
574
+ have h₁ : {x | x < ∞} ∈ (nhds (of_real r)).sets,
575
+ from mem_nhds_sets (is_open_gt' ∞) of_real_lt_infty,
576
+ have h₂ : {x | x < ∞} ∈ ((nhds r).map of_real).sets,
577
+ from mem_map.mpr $ univ_mem_sets' $ assume a, of_real_lt_infty,
578
+ have h : ∀x<∞, ∀y<∞, of_ennreal x = of_ennreal y → x = y,
579
+ by simp [forall_ennreal] {contextual:=tt},
545
580
le_antisymm
546
- _
547
- _
548
-
581
+ (by_cases
582
+ (assume (hr : r = 0 ) s (hs : {x | of_real x ∈ s} ∈ (nhds r).sets),
583
+ have hs : {x | of_real x ∈ s} ∈ (nhds (0 :ℝ)).sets, from hr ▸ hs,
584
+ let ⟨l, u, hl, hu, h⟩ := (mem_nhds_lattice_unbounded (no_top 0 ) (no_bot 0 )).mp hs in
585
+ have nhds (of_real r) = nhds ⊥, by simp [hr]; refl,
586
+ begin
587
+ rw [this , nhds_bot_orderable],
588
+ apply mem_infi_sets (of_real u) _,
589
+ apply mem_infi_sets (zero_lt_of_real_iff.mpr hu) _,
590
+ simp [set.subset_def],
591
+ intro x, rw [lt_iff_exists_of_real],
592
+ simp [le_of_lt hu] {contextual := tt},
593
+ exact assume p _ hp hpu, h _ (lt_of_lt_of_le hl hp) hpu
594
+ end )
595
+ (assume : r ≠ 0 ,
596
+ have hr' : 0 < r, from lt_of_le_of_ne hr this.symm,
597
+ have h' : map (of_ennreal ∘ of_real) (nhds r) = map id (nhds r),
598
+ from map_cong $ (nhds r).upwards_sets (mem_nhds_sets (is_open_lt' 0 ) hr') $
599
+ assume r hr, by simp [le_of_lt hr, (∘)],
600
+ le_of_map_le_map_inj' h₁ h₂ h $ le_trans (tendsto_of_ennreal hr) $ by simp [h']))
601
+ tendsto_of_real
602
+
603
+ /- TODO
549
604
instance : topological_add_monoid ennreal :=
550
605
have ∀a₁ a₂ : ennreal, tendsto (λp:ennreal×ennreal, p.1 + p.2) (nhds (a₁, a₂)) (nhds (a₁ + a₂)),
551
606
from forall_ennreal.mpr ⟨_, _⟩,
552
- ⟨continuous_iff_tendsto.mpr $
553
- assume ⟨a₁, a₂⟩,
554
- begin simp [ nhds_prod_eq ] end⟩
607
+ ⟨continuous_iff_tendsto.mpr _⟩
555
608
-/
556
609
557
610
end topological_space
0 commit comments