Skip to content

Commit

Permalink
chore(topology/algebra/ordered): generalize intermediate_value_Icc
Browse files Browse the repository at this point in the history
…etc (#5235)

Several lemmas assumed that the codomain is a conditionally complete
linear order while actually the statements are true for a linear
order. Also introduce `mem_range_of_exists_le_of_exists_ge` and use it
in `surjective_of_continuous`.
  • Loading branch information
urkud committed Dec 6, 2020
1 parent 9cb27c9 commit 8d54d52
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/topology/algebra/ordered.lean
Expand Up @@ -319,6 +319,12 @@ lemma intermediate_value_univ {γ : Type*} [topological_space γ] [preconnected_
Icc (f a) (f b) ⊆ range f :=
λ x hx, intermediate_value_univ₂ hf continuous_const hx.1 hx.2

/-- Intermediate Value Theorem for continuous functions on connected spaces. -/
lemma mem_range_of_exists_le_of_exists_ge {γ : Type*} [topological_space γ] [preconnected_space γ]
{c : α} {f : γ → α} (hf : continuous f) (h₁ : ∃ a, f a ≤ c) (h₂ : ∃ b, c ≤ f b) :
c ∈ range f :=
let ⟨a, ha⟩ := h₁, ⟨b, hb⟩ := h₂ in intermediate_value_univ a b hf ⟨ha, hb⟩

/-- If a preconnected set contains endpoints of an interval, then it includes the whole interval. -/
lemma is_preconnected.Icc_subset {s : set α} (hs : is_preconnected s)
{a b : α} (ha : a ∈ s) (hb : b ∈ s) :
Expand Down Expand Up @@ -2278,37 +2284,31 @@ begin
is_preconnected_Iic, is_preconnected_univ, is_preconnected_empty],
end

variables {δ : Type*} [linear_order δ] [topological_space δ] [order_closed_topology δ]

/--Intermediate Value Theorem for continuous functions on closed intervals, case `f a ≤ t ≤ f b`.-/
lemma intermediate_value_Icc {a b : α} (hab : a ≤ b) {f : α → β} (hf : continuous_on f (Icc a b)) :
lemma intermediate_value_Icc {a b : α} (hab : a ≤ b) {f : α → δ} (hf : continuous_on f (Icc a b)) :
Icc (f a) (f b) ⊆ f '' (Icc a b) :=
is_preconnected_Icc.intermediate_value (left_mem_Icc.2 hab) (right_mem_Icc.2 hab) hf

/--Intermediate Value Theorem for continuous functions on closed intervals, case `f a ≥ t ≥ f b`.-/
lemma intermediate_value_Icc' {a b : α} (hab : a ≤ b) {f : α → β} (hf : continuous_on f (Icc a b)) :
lemma intermediate_value_Icc' {a b : α} (hab : a ≤ b) {f : α → δ} (hf : continuous_on f (Icc a b)) :
Icc (f b) (f a) ⊆ f '' (Icc a b) :=
is_preconnected_Icc.intermediate_value (right_mem_Icc.2 hab) (left_mem_Icc.2 hab) hf

/-- A continuous function which tendsto `at_top` `at_top` and to `at_bot` `at_bot` is surjective. -/
lemma surjective_of_continuous {f : α → β} (hf : continuous f) (h_top : tendsto f at_top at_top)
lemma surjective_of_continuous {f : α → δ} (hf : continuous f) (h_top : tendsto f at_top at_top)
(h_bot : tendsto f at_bot at_bot) :
function.surjective f :=
begin
intros p,
obtain ⟨b, hb⟩ : ∃ b, p ≤ f b,
{ rcases (tendsto_at_top_at_top.mp h_top) p with ⟨b, hb⟩,
exact ⟨b, hb b rfl.ge⟩ },
obtain ⟨a, hab, ha⟩ : ∃ a, a ≤ b ∧ f a ≤ p,
{ rcases (tendsto_at_bot_at_bot.mp h_bot) p with ⟨x, hx⟩,
exact ⟨min x b, min_le_right x b, hx (min x b) (min_le_left x b)⟩ },
rcases intermediate_value_Icc hab hf.continuous_on ⟨ha, hb⟩ with ⟨x, _, hx⟩,
exact ⟨x, hx⟩
end
λ p, mem_range_of_exists_le_of_exists_ge hf
(h_bot.eventually (eventually_le_at_bot p)).exists
(h_top.eventually (eventually_ge_at_top p)).exists

/-- A continuous function which tendsto `at_bot` `at_top` and to `at_top` `at_bot` is surjective. -/
lemma surjective_of_continuous' {f : α → β} (hf : continuous f) (h_top : tendsto f at_bot at_top)
lemma surjective_of_continuous' {f : α → δ} (hf : continuous f) (h_top : tendsto f at_bot at_top)
(h_bot : tendsto f at_top at_bot) :
function.surjective f :=
@surjective_of_continuous (order_dual α) β _ _ _ _ _ _ _ _ hf h_top h_bot
@surjective_of_continuous (order_dual α) _ _ _ _ _ _ _ _ _ hf h_top h_bot

end densely_ordered

Expand Down

0 comments on commit 8d54d52

Please sign in to comment.