Skip to content

Commit 2f4be05

Browse files
committed
chore: golf LinearMap.weakBilin_withSeminorms (#18443)
1 parent 4b231df commit 2f4be05

File tree

1 file changed

+8
-39
lines changed

1 file changed

+8
-39
lines changed

Mathlib/Analysis/LocallyConvex/WeakDual.lean

Lines changed: 8 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -85,47 +85,16 @@ section Topology
8585

8686
variable [NormedField 𝕜] [AddCommGroup E] [Module 𝕜 E] [AddCommGroup F] [Module 𝕜 F]
8787

88-
theorem LinearMap.hasBasis_weakBilin (B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜) :
89-
(𝓝 (0 : WeakBilin B)).HasBasis B.toSeminormFamily.basisSets _root_.id := by
90-
let p := B.toSeminormFamily
91-
rw [nhds_induced, nhds_pi]
92-
simp only [map_zero, LinearMap.zero_apply]
93-
have h := @Metric.nhds_basis_ball 𝕜 _ 0
94-
have h' := Filter.hasBasis_pi fun _ : F => h
95-
have h'' := Filter.HasBasis.comap (fun x y => B x y) h'
96-
refine h''.to_hasBasis ?_ ?_
97-
· rintro (U : Set F × (F → ℝ)) hU
98-
cases' hU with hU₁ hU₂
99-
simp only [_root_.id]
100-
let U' := hU₁.toFinset
101-
by_cases hU₃ : U.fst.Nonempty
102-
· have hU₃' : U'.Nonempty := hU₁.toFinset_nonempty.mpr hU₃
103-
refine ⟨(U'.sup p).ball 0 <| U'.inf' hU₃' U.snd, p.basisSets_mem _ <|
104-
(Finset.lt_inf'_iff _).2 fun y hy => hU₂ y <| hU₁.mem_toFinset.mp hy, fun x hx y hy => ?_⟩
105-
simp only [Set.mem_preimage, Set.mem_pi, mem_ball_zero_iff]
106-
rw [Seminorm.mem_ball_zero] at hx
107-
rw [← LinearMap.toSeminormFamily_apply]
108-
have hyU' : y ∈ U' := (Set.Finite.mem_toFinset hU₁).mpr hy
109-
have hp : p y ≤ U'.sup p := Finset.le_sup hyU'
110-
refine lt_of_le_of_lt (hp x) (lt_of_lt_of_le hx ?_)
111-
exact Finset.inf'_le _ hyU'
112-
rw [Set.not_nonempty_iff_eq_empty.mp hU₃]
113-
simp only [Set.empty_pi, Set.preimage_univ, Set.subset_univ, and_true]
114-
exact Exists.intro ((p 0).ball 0 1) (p.basisSets_singleton_mem 0 one_pos)
115-
rintro U (hU : U ∈ p.basisSets)
116-
rw [SeminormFamily.basisSets_iff] at hU
117-
rcases hU with ⟨s, r, hr, hU⟩
118-
rw [hU]
119-
refine ⟨(s, fun _ => r), ⟨by simp only [s.finite_toSet], fun y _ => hr⟩, fun x hx => ?_⟩
120-
simp only [Set.mem_preimage, Set.mem_pi, Finset.mem_coe, mem_ball_zero_iff] at hx
121-
simp only [_root_.id, Seminorm.mem_ball, sub_zero]
122-
refine Seminorm.finset_sup_apply_lt hr fun y hy => ?_
123-
rw [LinearMap.toSeminormFamily_apply]
124-
exact hx y hy
125-
12688
theorem LinearMap.weakBilin_withSeminorms (B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜) :
12789
WithSeminorms (LinearMap.toSeminormFamily B : F → Seminorm 𝕜 (WeakBilin B)) :=
128-
SeminormFamily.withSeminorms_of_hasBasis _ B.hasBasis_weakBilin
90+
let e : F ≃ (Σ _ : F, Fin 1) := .symm <| .sigmaUnique _ _
91+
have : Nonempty (Σ _ : F, Fin 1) := e.symm.nonempty
92+
withSeminorms_induced (withSeminorms_pi (fun _ ↦ norm_withSeminorms 𝕜 𝕜))
93+
(LinearMap.ltoFun 𝕜 F 𝕜 ∘ₗ B : (WeakBilin B) →ₗ[𝕜] (F → 𝕜)) |>.congr_equiv e
94+
95+
theorem LinearMap.hasBasis_weakBilin (B : E →ₗ[𝕜] F →ₗ[𝕜] 𝕜) :
96+
(𝓝 (0 : WeakBilin B)).HasBasis B.toSeminormFamily.basisSets _root_.id :=
97+
LinearMap.weakBilin_withSeminorms B |>.hasBasis
12998

13099
end Topology
131100

0 commit comments

Comments
 (0)