Skip to content

Commit

Permalink
chore(topology/continuous_function, analysis/normed_space): use `is_e…
Browse files Browse the repository at this point in the history
…mpty α` instead of `¬nonempty α` (#8352)

Two lemmas with their assumptions changed, and some proofs golfed using the new forms of these and other lemmas.
  • Loading branch information
eric-wieser committed Jul 20, 2021
1 parent b3fbcec commit 0f58e13
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
15 changes: 7 additions & 8 deletions src/analysis/normed_space/multilinear.lean
Expand Up @@ -694,26 +694,25 @@ calc ∥continuous_multilinear_map.mk_pi_algebra 𝕜 ι A∥ ≤ if nonempty ι
multilinear_map.mk_continuous_norm_le _ (by split_ifs; simp [zero_le_one]) _
... = _ : if_pos ‹_›

lemma norm_mk_pi_algebra_of_empty (h : ¬nonempty ι) :
lemma norm_mk_pi_algebra_of_empty [is_empty ι] :
∥continuous_multilinear_map.mk_pi_algebra 𝕜 ι A∥ = ∥(1 : A)∥ :=
begin
apply le_antisymm,
calc ∥continuous_multilinear_map.mk_pi_algebra 𝕜 ι A∥ ≤ if nonempty ι then 1 else ∥(1 : A)∥ :
multilinear_map.mk_continuous_norm_le _ (by split_ifs; simp [zero_le_one]) _
... = ∥(1 : A)∥ : if_neg ‹_›,
convert ratio_le_op_norm _ (λ _, 1); [skip, apply_instance],
simp [eq_empty_of_not_nonempty h univ]
... = ∥(1 : A)∥ : if_neg (not_nonempty_iff.mpr ‹_›),
convert ratio_le_op_norm _ (λ _, (1 : A)),
simp [eq_empty_of_is_empty (univ : finset ι)],
end

@[simp] lemma norm_mk_pi_algebra [norm_one_class A] :
∥continuous_multilinear_map.mk_pi_algebra 𝕜 ι A∥ = 1 :=
begin
by_cases hι : nonempty ι,
{ resetI,
refine le_antisymm norm_mk_pi_algebra_le _,
casesI is_empty_or_nonempty ι,
{ simp [norm_mk_pi_algebra_of_empty] },
{ refine le_antisymm norm_mk_pi_algebra_le _,
convert ratio_le_op_norm _ (λ _, 1); [skip, apply_instance],
simp },
{ simp [norm_mk_pi_algebra_of_empty hι] }
end

end
Expand Down
16 changes: 6 additions & 10 deletions src/order/filter/at_top_bot.lean
Expand Up @@ -882,16 +882,12 @@ lemma tendsto_finset_preimage_at_top_at_top {f : α → β} (hf : function.injec
lemma prod_at_top_at_top_eq {β₁ β₂ : Type*} [semilattice_sup β₁] [semilattice_sup β₂] :
(at_top : filter β₁) ×ᶠ (at_top : filter β₂) = (at_top : filter (β₁ × β₂)) :=
begin
by_cases ne : nonempty β₁ ∧ nonempty β₂,
{ cases ne,
resetI,
simp [at_top, prod_infi_left, prod_infi_right, infi_prod],
exact infi_comm },
{ rw not_and_distrib at ne,
cases ne;
{ have : ¬ (nonempty (β₁ × β₂)), by simp [ne],
rw [at_top.filter_eq_bot_of_not_nonempty ne, at_top.filter_eq_bot_of_not_nonempty this],
simp only [bot_prod, prod_bot] } }
casesI (is_empty_or_nonempty β₁).symm,
casesI (is_empty_or_nonempty β₂).symm,
{ simp [at_top, prod_infi_left, prod_infi_right, infi_prod],
exact infi_comm, },
{ simp only [at_top.filter_eq_bot_of_is_empty, prod_bot] },
{ simp only [at_top.filter_eq_bot_of_is_empty, bot_prod] },
end

lemma prod_at_bot_at_bot_eq {β₁ β₂ : Type*} [semilattice_inf β₁] [semilattice_inf β₂] :
Expand Down
4 changes: 2 additions & 2 deletions src/topology/continuous_function/bounded.lean
Expand Up @@ -158,8 +158,8 @@ lemma dist_lt_iff_of_nonempty_compact [nonempty α] [compact_space α] :
⟨λ w x, lt_of_le_of_lt (dist_coe_le_dist x) w, dist_lt_of_nonempty_compact⟩

/-- On an empty space, bounded continuous functions are at distance 0 -/
lemma dist_zero_of_empty (e : ¬ nonempty α) : dist f g = 0 :=
le_antisymm ((dist_le (le_refl _)).2 $ λ x, e.elim ⟨x⟩) dist_nonneg'
lemma dist_zero_of_empty [is_empty α] : dist f g = 0 :=
le_antisymm ((dist_le (le_refl _)).2 is_empty_elim) dist_nonneg'

/-- The type of bounded continuous functions, with the uniform distance, is a metric space. -/
instance : metric_space (α →ᵇ β) :=
Expand Down

0 comments on commit 0f58e13

Please sign in to comment.