Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit ef90a7a

Browse files
committed
refactor(*): bundle is_basis (#7496)
This PR replaces the definition of a basis used in mathlib and fixes the usages throughout. Rationale: Previously, `is_basis` was a predicate on a family of vectors, saying this family is linear independent and spans the whole space. We encountered many small annoyances when working with these unbundled definitions, for example complicated `is_basis` arguments being hidden in the goal view or slow elaboration when mapping a basis to a slightly different set of basis vectors. The idea to turn `basis` into a bundled structure originated in the discussion on #4949. @digama0 suggested on Zulip to identify these "bundled bases" with their map `repr : M ≃ₗ[R] (ι →₀ R)` that sends a vector to its coordinates. (In fact, that specific map used to be only a `linear_map` rather than an equiv.) Overview of the changes: - The `is_basis` predicate has been replaced with the `basis` structure. - Parameters of the form `{b : ι → M} (hb : is_basis R b)` become a single parameter `(b : basis ι R M)`. - Constructing a basis from a linear independent family spanning the whole space is now spelled `basis.mk hli hspan`, instead of `and.intro hli hspan`. - You can also use `basis.of_repr` to construct a basis from an equivalence `e : M ≃ₗ[R] (ι →₀ R)`. If `ι` is a `fintype`, you can use `basis.of_equiv_fun (e : M ≃ₗ[R] (ι → R))` instead, saving you from having to work with `finsupp`s. - Most declaration names that used to contain `is_basis` are now spelled with `basis`, e.g. `pi.is_basis_fun` is now `pi.basis_fun`. - Theorems of the form `exists_is_basis K V : ∃ (s : set V) (b : s -> V), is_basis K b` and `finite_dimensional.exists_is_basis_finset K V : [finite_dimensional K V] -> ∃ (s : finset V) (b : s -> V), is_basis K b` have been replaced with (noncomputable) defs such as `basis.of_vector_space K V : basis (basis.of_vector_space_index K V) K V` and `finite_dimensional.finset_basis : basis (finite_dimensional.finset_basis_index K V) K V`; the indexing sets being a separate definition means we can declare a `fintype (basis.of_vector_space_index K V)` instance on finite dimensional spaces, rather than having to use `cases exists_is_basis_fintype K V with ...` each time. - Definitions of a `basis` are now, wherever practical, accompanied by `simp` lemmas giving the values of `coe_fn` and `repr` for that basis. - Some auxiliary results like `pi.is_basis_fun₀` have been removed since they are no longer needed. Basic API overview: * `basis ι R M` is the type of `ι`-indexed `R`-bases for a module `M`, represented by a linear equiv `M ≃ₗ[R] ι →₀ R`. * the basis vectors of a basis `b` are given by `b i` for `i : ι` * `basis.repr` is the isomorphism sending `x : M` to its coordinates `basis.repr b x : ι →₀ R`. The inverse of `b.repr` is `finsupp.total _ _ _ b`. The converse, turning this isomorphism into a basis, is called `basis.of_repr`. * If `ι` is finite, there is a variant of `repr` called `basis.equiv_fun b : M ≃ₗ[R] ι → R`. The converse, turning this isomorphism into a basis, is called `basis.of_equiv_fun`. * `basis.constr hv f` constructs a linear map `M₁ →ₗ[R] M₂` given the values `f : ι → M₂` at the basis elements `⇑b : ι → M₁`. * `basis.mk`: a linear independent set of vectors spanning the whole module determines a basis (the converse consists of `basis.linear_independent` and `basis.span_eq` * `basis.ext` states that two linear maps are equal if they coincide on a basis; similar results are available for linear equivs (if they coincide on the basis vectors), elements (if their coordinates coincide) and the functions `b.repr` and `⇑b`. * `basis.of_vector_space` states that every vector space has a basis. * `basis.reindex` uses an equiv to map a basis to a different indexing set, `basis.map` uses a linear equiv to map a basis to a different module Zulip discussions: * https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/Bundled.20basis * https://leanprover.zulipchat.com/#narrow/stream/144837-PR-reviews/topic/.234949
1 parent f985e36 commit ef90a7a

34 files changed

+2139
-1629
lines changed

archive/sensitivity.lean

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,11 @@ since this cardinal is finite, as a natural number in `finrank_V` -/
229229

230230
lemma dim_V : module.rank ℝ (V n) = 2^n :=
231231
have module.rank ℝ (V n) = (2^n : ℕ),
232-
by { rw [dim_eq_card_basis (dual_pair_e_ε _).is_basis, Q.card]; apply_instance },
232+
by { rw [dim_eq_card_basis (dual_pair_e_ε _).basis, Q.card]; apply_instance },
233233
by assumption_mod_cast
234234

235235
instance : finite_dimensional ℝ (V n) :=
236-
finite_dimensional.of_fintype_basis (dual_pair_e_ε _).is_basis
236+
finite_dimensional.of_fintype_basis (dual_pair_e_ε _).basis
237237

238238
lemma finrank_V : finrank ℝ (V n) = 2^n :=
239239
have _ := @dim_V n,
@@ -367,12 +367,14 @@ begin
367367
rw ← dim_eq_of_injective (g m) g_injective,
368368
apply dim_V },
369369
have dimW : dim W = card H,
370-
{ have li : linear_independent ℝ (set.restrict e H) :=
371-
linear_independent.comp (dual_pair_e_ε _).is_basis.1 _ subtype.val_injective,
370+
{ have li : linear_independent ℝ (set.restrict e H),
371+
{ convert (dual_pair_e_ε _).basis.linear_independent.comp _ subtype.val_injective,
372+
rw (dual_pair_e_ε _).coe_basis },
372373
have hdW := dim_span li,
373374
rw set.range_restrict at hdW,
374375
convert hdW,
375-
rw [cardinal.mk_image_eq (dual_pair_e_ε _).is_basis.injective, cardinal.fintype_card] },
376+
rw [← (dual_pair_e_ε _).coe_basis, cardinal.mk_image_eq (dual_pair_e_ε _).basis.injective,
377+
cardinal.fintype_card] },
376378
rw ← finrank_eq_dim ℝ at ⊢ dim_le dim_add dimW,
377379
rw [← finrank_eq_dim ℝ, ← finrank_eq_dim ℝ] at dim_add,
378380
norm_cast at ⊢ dim_le dim_add dimW,
@@ -406,7 +408,7 @@ begin
406408
= |ε q (s • y)| :
407409
by rw [map_smul, smul_eq_mul, abs_mul, abs_of_nonneg (real.sqrt_nonneg _)]
408410
... = |ε q (f (m+1) y)| : by rw [← f_image_g y (by simpa using y_mem_g)]
409-
... = |ε q (f (m+1) (lc _ (coeffs y)))| : by rw (dual_pair_e_ε _).decomposition y
411+
... = |ε q (f (m+1) (lc _ (coeffs y)))| : by rw (dual_pair_e_ε _).lc_coeffs y
410412
... = |(coeffs y).sum (λ (i : Q (m + 1)) (a : ℝ), a • ((ε q) ∘ (f (m + 1)) ∘
411413
λ (i : Q (m + 1)), e i) i)| :
412414
by erw [(f $ m + 1).map_finsupp_total, (ε q).map_finsupp_total, finsupp.total_apply]

docs/overview.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,16 @@ Linear algebra:
138138
quotient space: 'submodule.quotient'
139139
tensor product: 'tensor_product'
140140
noetherian module: 'is_noetherian'
141-
basis: 'is_basis'
141+
basis: 'basis'
142142
multilinear map: 'multilinear_map'
143143
alternating map: 'alternating_map'
144144
general linear group: 'linear_map.general_linear_group'
145145
Duality:
146146
dual vector space: 'module.dual'
147-
dual basis: 'is_basis.dual_basis'
147+
dual basis: 'basis.dual_basis'
148148
Finite-dimensional vector spaces:
149149
finite-dimensionality : 'finite_dimensional'
150-
isomorphism with $K^n$: 'module_equiv_finsupp'
150+
isomorphism with $K^n$: 'basis.equiv_fun'
151151
isomorphism with bidual: 'module.eval_equiv'
152152
Matrices:
153153
ring-valued matrix: 'matrix'

docs/undergrad.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,28 @@ Linear algebra:
1313
complementary subspaces: 'submodule.exists_is_compl'
1414
linear independence: 'linear_independent'
1515
generating sets: 'submodule.span'
16-
bases: 'is_basis'
17-
existence of bases: 'exists_is_basis'
16+
bases: 'basis'
17+
existence of bases: 'basis.of_vector_space'
1818
linear map: 'linear_map'
1919
range of a linear map: 'linear_map.range'
2020
kernel of a linear map: 'linear_map.ker'
2121
algebra of endomorphisms of a vector space: 'module.endomorphism_algebra'
2222
general linear group: 'linear_map.general_linear_group'
2323
Duality:
2424
dual vector space: 'module.dual'
25-
dual basis: 'is_basis.dual_basis'
25+
dual basis: 'basis.dual_basis'
2626
transpose of a linear map: 'module.dual.transpose'
2727
orthogonality: ''
2828
Finite-dimensional vector spaces:
2929
finite-dimensionality : 'finite_dimensional'
30-
isomorphism with $K^n$: 'module_equiv_finsupp'
30+
isomorphism with $K^n$: 'basis.equiv_fun'
3131
rank of a linear map: 'rank'
3232
rank of a set of vectors: ''
3333
rank of a system of linear equations: ''
3434
isomorphism with bidual: 'module.eval_equiv'
3535
Multilinearity:
3636
multilinear map: 'multilinear_map'
37-
determinant of vectors: 'is_basis.det'
37+
determinant of vectors: 'basis.det'
3838
determinant of endomorphisms: ''
3939
special linear group: ''
4040
orientation of a $\R$-valued vector space: ''
@@ -217,7 +217,7 @@ Bilinear and Quadratic Forms Over a Vector Space:
217217
orthogonal complement: 'submodule.orthogonal'
218218
Cauchy-Schwarz inequality: 'inner_mul_inner_self_le'
219219
norm: 'inner_product_space.of_core.to_has_norm'
220-
orthonormal bases: 'maximal_orthonormal_iff_is_basis_of_finite_dimensional'
220+
orthonormal bases: 'maximal_orthonormal_iff_basis_of_finite_dimensional'
221221
Endomorphisms:
222222
orthogonal group:
223223
unitary group:

src/algebra/module/basic.lean

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,17 @@ end add_comm_group
461461

462462
section module
463463

464+
variables {R} [ring R] [add_comm_group M] [module R M] [no_zero_smul_divisors R M]
465+
466+
lemma smul_right_injective {x : M} (hx : x ≠ 0) :
467+
function.injective (λ (c : R), c • x) :=
468+
λ c d h, sub_eq_zero.mp ((smul_eq_zero.mp
469+
(calc (c - d) • x = c • x - d • x : sub_smul c d x
470+
... = 0 : sub_eq_zero.mpr h)).resolve_right hx)
471+
464472
section nat
465473

466-
variables {R} [ring R] [add_comm_group M] [module R M] [no_zero_smul_divisors R M] [char_zero R]
474+
variables [char_zero R]
467475

468476
lemma ne_neg_of_ne_zero [no_zero_divisors R] {v : R} (hv : v ≠ 0) : v ≠ -v :=
469477
λ h, hv (eq_zero_of_eq_neg R h)

src/algebra/module/projective.lean

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,15 @@ section ring
134134
variables {R : Type u} [ring R] {P : Type v} [add_comm_group P] [module R P]
135135

136136
/-- Free modules are projective. -/
137-
theorem of_free {ι : Type*} {b : ι → P} (hb : is_basis R b) : is_projective R P :=
137+
theorem of_free {ι : Type*} (b : basis ι R P) : is_projective R P :=
138138
begin
139139
-- need P →ₗ (P →₀ R) for definition of projective.
140140
-- get it from `ι → (P →₀ R)` coming from `b`.
141-
use hb.constr (λ i, finsupp.single (b i) 1),
141+
use b.constr (λ i, finsupp.single (b i) (1 : R)),
142142
intro m,
143-
simp only [hb.constr_apply, mul_one, id.def, finsupp.smul_single', finsupp.total_single,
143+
simp only [b.constr_apply, mul_one, id.def, finsupp.smul_single', finsupp.total_single,
144144
linear_map.map_finsupp_sum],
145-
exact hb.total_repr m,
145+
exact b.total_repr m,
146146
end
147147

148148
end ring

src/analysis/normed_space/finite_dimension.lean

Lines changed: 56 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -75,28 +75,27 @@ all norms are equivalent in finite dimension.
7575
7676
This statement is superceded by the fact that every linear map on a finite-dimensional space is
7777
continuous, in `linear_map.continuous_of_finite_dimensional`. -/
78-
lemma continuous_equiv_fun_basis {ι : Type v} [fintype ι] (ξ : ι → E) (hξ : is_basis 𝕜 ξ) :
79-
continuous .equiv_fun :=
78+
lemma continuous_equiv_fun_basis {ι : Type v} [fintype ι] (ξ : basis ι 𝕜 E) :
79+
continuous ξ.equiv_fun :=
8080
begin
8181
unfreezingI { induction hn : fintype.card ι with n IH generalizing ι E },
8282
{ apply linear_map.continuous_of_bound _ 0 (λx, _),
83-
have : .equiv_fun x = 0,
83+
have : ξ.equiv_fun x = 0,
8484
by { ext i, exact (fintype.card_eq_zero_iff.1 hn i).elim },
85-
change ∥.equiv_fun x∥ ≤ 0 * ∥x∥,
85+
change ∥ξ.equiv_fun x∥ ≤ 0 * ∥x∥,
8686
rw this,
8787
simp [norm_nonneg] },
88-
{ haveI : finite_dimensional 𝕜 E := of_fintype_basis ,
88+
{ haveI : finite_dimensional 𝕜 E := of_fintype_basis ξ,
8989
-- first step: thanks to the inductive assumption, any n-dimensional subspace is equivalent
9090
-- to a standard space of dimension n, hence it is complete and therefore closed.
9191
have H₁ : ∀s : submodule 𝕜 E, finrank 𝕜 s = n → is_closed (s : set E),
9292
{ assume s s_dim,
93-
rcases exists_is_basis_finite 𝕜 s with ⟨b, b_basis, b_finite⟩,
94-
letI : fintype b := finite.fintype b_finite,
95-
have U : uniform_embedding b_basis.equiv_fun.symm.to_equiv,
96-
{ have : fintype.card b = n,
97-
by { rw ← s_dim, exact (finrank_eq_card_basis b_basis).symm },
98-
have : continuous b_basis.equiv_fun := IH (subtype.val : b → s) b_basis this,
99-
exact b_basis.equiv_fun.symm.uniform_embedding (linear_map.continuous_on_pi _) this },
93+
let b := basis.of_vector_space 𝕜 s,
94+
have U : uniform_embedding b.equiv_fun.symm.to_equiv,
95+
{ have : fintype.card (basis.of_vector_space_index 𝕜 s) = n,
96+
by { rw ← s_dim, exact (finrank_eq_card_basis b).symm },
97+
have : continuous b.equiv_fun := IH b this,
98+
exact b.equiv_fun.symm.uniform_embedding (linear_map.continuous_on_pi _) this },
10099
have : is_complete (s : set E),
101100
from complete_space_coe_iff_is_complete.1 ((complete_space_congr U).1 (by apply_instance)),
102101
exact this.is_closed },
@@ -105,7 +104,7 @@ begin
105104
{ assume f,
106105
have : finrank 𝕜 f.ker = n ∨ finrank 𝕜 f.ker = n.succ,
107106
{ have Z := f.finrank_range_add_finrank_ker,
108-
rw [finrank_eq_card_basis , hn] at Z,
107+
rw [finrank_eq_card_basis ξ, hn] at Z,
109108
by_cases H : finrank 𝕜 f.range = 0,
110109
{ right,
111110
rw H at Z,
@@ -120,14 +119,14 @@ begin
120119
{ cases this,
121120
{ exact H₁ _ this },
122121
{ have : f.ker = ⊤,
123-
by { apply eq_top_of_finrank_eq, rw [finrank_eq_card_basis , hn, this] },
122+
by { apply eq_top_of_finrank_eq, rw [finrank_eq_card_basis ξ, hn, this] },
124123
simp [this] } },
125124
exact linear_map.continuous_iff_is_closed_ker.2 this },
126125
-- third step: applying the continuity to the linear form corresponding to a coefficient in the
127126
-- basis decomposition, deduce that all such coefficients are controlled in terms of the norm
128-
have : ∀i:ι, ∃C, 0 ≤ C ∧ ∀(x:E), ∥.equiv_fun x i∥ ≤ C * ∥x∥,
127+
have : ∀i:ι, ∃C, 0 ≤ C ∧ ∀(x:E), ∥ξ.equiv_fun x i∥ ≤ C * ∥x∥,
129128
{ assume i,
130-
let f : E →ₗ[𝕜] 𝕜 := (linear_map.proj i).comp .equiv_fun,
129+
let f : E →ₗ[𝕜] 𝕜 := (linear_map.proj i).comp ξ.equiv_fun,
131130
let f' : E →L[𝕜] 𝕜 := { cont := H₂ f, ..f },
132131
exact ⟨∥f'∥, norm_nonneg _, λx, continuous_linear_map.le_op_norm f' x⟩ },
133132
-- fourth step: combine the bound on each coefficient to get a global bound and the continuity
@@ -148,18 +147,17 @@ theorem linear_map.continuous_of_finite_dimensional [finite_dimensional 𝕜 E]
148147
begin
149148
-- for the proof, go to a model vector space `b → 𝕜` thanks to `continuous_equiv_fun_basis`, and
150149
-- argue that all linear maps there are continuous.
151-
rcases exists_is_basis_finite 𝕜 E with ⟨b, b_basis, b_finite⟩,
152-
letI : fintype b := finite.fintype b_finite,
153-
have A : continuous b_basis.equiv_fun :=
154-
continuous_equiv_fun_basis _ b_basis,
155-
have B : continuous (f.comp (b_basis.equiv_fun.symm : (b → 𝕜) →ₗ[𝕜] E)) :=
150+
let b := basis.of_vector_space 𝕜 E,
151+
have A : continuous b.equiv_fun :=
152+
continuous_equiv_fun_basis b,
153+
have B : continuous (f.comp (b.equiv_fun.symm : (basis.of_vector_space_index 𝕜 E → 𝕜) →ₗ[𝕜] E)) :=
156154
linear_map.continuous_on_pi _,
157-
have : continuous ((f.comp (b_basis.equiv_fun.symm : (b → 𝕜) →ₗ[𝕜] E))
158-
b_basis.equiv_fun) := B.comp A,
155+
have : continuous ((f.comp (b.equiv_fun.symm : (basis.of_vector_space_index 𝕜 E → 𝕜) →ₗ[𝕜] E))
156+
b.equiv_fun) := B.comp A,
159157
convert this,
160158
ext x,
161159
dsimp,
162-
rw linear_equiv.symm_apply_apply
160+
rw [basis.equiv_fun_symm_apply, basis.sum_repr]
163161
end
164162

165163
theorem affine_map.continuous_of_finite_dimensional {PE PF : Type*}
@@ -269,40 +267,40 @@ def continuous_linear_equiv.of_finrank_eq [finite_dimensional 𝕜 E] [finite_di
269267
variables {ι : Type*} [fintype ι]
270268

271269
/-- Construct a continuous linear map given the value at a finite basis. -/
272-
def is_basis.constrL {v : ι → E} (hv : is_basis 𝕜 v) (f : ι → F) :
270+
def basis.constrL (v : basis ι 𝕜 E) (f : ι → F) :
273271
E →L[𝕜] F :=
274-
by haveI : finite_dimensional 𝕜 E := finite_dimensional.of_fintype_basis hv;
275-
exact (hv.constr f).to_continuous_linear_map
272+
by haveI : finite_dimensional 𝕜 E := finite_dimensional.of_fintype_basis v;
273+
exact (v.constr 𝕜 f).to_continuous_linear_map
276274

277-
@[simp, norm_cast] lemma is_basis.coe_constrL {v : ι → E} (hv : is_basis 𝕜 v) (f : ι → F) :
278-
(hv.constrL f : E →ₗ[𝕜] F) = hv.constr f := rfl
275+
@[simp, norm_cast] lemma basis.coe_constrL (v : basis ι 𝕜 E) (f : ι → F) :
276+
(v.constrL f : E →ₗ[𝕜] F) = v.constr 𝕜 f := rfl
279277

280278
/-- The continuous linear equivalence between a vector space over `𝕜` with a finite basis and
281279
functions from its basis indexing type to `𝕜`. -/
282-
def is_basis.equiv_funL {v : ι → E} (hv : is_basis 𝕜 v) : E ≃L[𝕜] (ι → 𝕜) :=
280+
def basis.equiv_funL (v : basis ι 𝕜 E) : E ≃L[𝕜] (ι → 𝕜) :=
283281
{ continuous_to_fun := begin
284-
haveI : finite_dimensional 𝕜 E := finite_dimensional.of_fintype_basis hv,
282+
haveI : finite_dimensional 𝕜 E := finite_dimensional.of_fintype_basis v,
285283
apply linear_map.continuous_of_finite_dimensional,
286284
end,
287285
continuous_inv_fun := begin
288-
change continuous hv.equiv_fun.symm.to_fun,
286+
change continuous v.equiv_fun.symm.to_fun,
289287
apply linear_map.continuous_of_finite_dimensional,
290288
end,
291-
..hv.equiv_fun }
289+
..v.equiv_fun }
292290

293291

294-
@[simp] lemma is_basis.constrL_apply {v : ι → E} (hv : is_basis 𝕜 v) (f : ι → F) (e : E) :
295-
(hv.constrL f) e = ∑ i, (hv.equiv_fun e i) • f i :=
296-
hv.constr_apply_fintype _ _
292+
@[simp] lemma basis.constrL_apply (v : basis ι 𝕜 E) (f : ι → F) (e : E) :
293+
(v.constrL f) e = ∑ i, (v.equiv_fun e i) • f i :=
294+
v.constr_apply_fintype 𝕜 _ _
297295

298-
@[simp] lemma is_basis.constrL_basis {v : ι → E} (hv : is_basis 𝕜 v) (f : ι → F) (i : ι) :
299-
(hv.constrL f) (v i) = f i :=
300-
constr_basis _
296+
@[simp] lemma basis.constrL_basis (v : basis ι 𝕜 E) (f : ι → F) (i : ι) :
297+
(v.constrL f) (v i) = f i :=
298+
v.constr_basis 𝕜 _ _
301299

302-
lemma is_basis.sup_norm_le_norm {v : ι → E} (hv : is_basis 𝕜 v) :
303-
∃ C > (0 : ℝ), ∀ e : E, ∑ i, ∥hv.equiv_fun e i∥ ≤ C * ∥e∥ :=
300+
lemma basis.sup_norm_le_norm (v : basis ι 𝕜 E) :
301+
∃ C > (0 : ℝ), ∀ e : E, ∑ i, ∥v.equiv_fun e i∥ ≤ C * ∥e∥ :=
304302
begin
305-
set φ := hv.equiv_funL.to_continuous_linear_map,
303+
set φ := v.equiv_funL.to_continuous_linear_map,
306304
set C := ∥φ∥ * (fintype.card ι),
307305
use [max C 1, lt_of_lt_of_le (zero_lt_one) (le_max_right C 1)],
308306
intros e,
@@ -315,23 +313,23 @@ begin
315313
... ≤ max C 1 * ∥e∥ : mul_le_mul_of_nonneg_right (le_max_left _ _) (norm_nonneg _)
316314
end
317315

318-
lemma is_basis.op_norm_le {ι : Type*} [fintype ι] {v : ι → E} (hv : is_basis 𝕜 v) :
316+
lemma basis.op_norm_le {ι : Type*} [fintype ι] (v : basis ι 𝕜 E) :
319317
∃ C > (0 : ℝ), ∀ {u : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ i, ∥u (v i)∥ ≤ M) → ∥u∥ ≤ C*M :=
320318
begin
321-
obtain ⟨C, C_pos, hC⟩ : ∃ C > (0 : ℝ), ∀ (e : E), ∑ i, ∥hv.equiv_fun e i∥ ≤ C * ∥e∥,
322-
from hv.sup_norm_le_norm,
319+
obtain ⟨C, C_pos, hC⟩ : ∃ C > (0 : ℝ), ∀ (e : E), ∑ i, ∥v.equiv_fun e i∥ ≤ C * ∥e∥,
320+
from v.sup_norm_le_norm,
323321
use [C, C_pos],
324322
intros u M hM hu,
325323
apply u.op_norm_le_bound (mul_nonneg (le_of_lt C_pos) hM),
326324
intros e,
327325
calc
328-
∥u e∥ = ∥u (∑ i, hv.equiv_fun e i • v i)∥ : by conv_lhs { rw ← hv.equiv_fun_total e }
329-
... = ∥∑ i, (hv.equiv_fun e i) • (u $ v i)∥ : by simp [u.map_sum, linear_map.map_smul]
330-
... ≤ ∑ i, ∥(hv.equiv_fun e i) • (u $ v i)∥ : norm_sum_le _ _
331-
... = ∑ i, ∥hv.equiv_fun e i∥ * ∥u (v i)∥ : by simp only [norm_smul]
332-
... ≤ ∑ i, ∥hv.equiv_fun e i∥ * M : finset.sum_le_sum (λ i hi,
326+
∥u e∥ = ∥u (∑ i, v.equiv_fun e i • v i)∥ : by rw [v.sum_equiv_fun]
327+
... = ∥∑ i, (v.equiv_fun e i) • (u $ v i)∥ : by simp [u.map_sum, linear_map.map_smul]
328+
... ≤ ∑ i, ∥(v.equiv_fun e i) • (u $ v i)∥ : norm_sum_le _ _
329+
... = ∑ i, ∥v.equiv_fun e i∥ * ∥u (v i)∥ : by simp only [norm_smul]
330+
... ≤ ∑ i, ∥v.equiv_fun e i∥ * M : finset.sum_le_sum (λ i hi,
333331
mul_le_mul_of_nonneg_left (hu i) (norm_nonneg _))
334-
... = (∑ i, ∥hv.equiv_fun e i∥) * M : finset.sum_mul.symm
332+
... = (∑ i, ∥v.equiv_fun e i∥) * M : finset.sum_mul.symm
335333
... ≤ C * ∥e∥ * M : mul_le_mul_of_nonneg_right (hC e) hM
336334
... = C * M * ∥e∥ : by ring
337335
end
@@ -346,13 +344,13 @@ begin
346344
(λ ε ε_pos, ⟨fin d → ℕ, by apply_instance, this ε ε_pos⟩),
347345
intros ε ε_pos,
348346
obtain ⟨u : ℕ → F, hu : dense_range u⟩ := exists_dense_seq F,
349-
obtain ⟨v : fin d → E, hv : is_basis 𝕜 v⟩ := finite_dimensional.fin_basis 𝕜 E,
347+
let v := finite_dimensional.fin_basis 𝕜 E,
350348
obtain ⟨C : ℝ, C_pos : 0 < C,
351349
hC : ∀ {φ : E →L[𝕜] F} {M : ℝ}, 0 ≤ M → (∀ i, ∥φ (v i)∥ ≤ M) → ∥φ∥ ≤ C * M⟩ :=
352-
hv.op_norm_le,
350+
v.op_norm_le,
353351
have h_2C : 0 < 2*C := mul_pos zero_lt_two C_pos,
354352
have hε2C : 0 < ε/(2*C) := div_pos ε_pos h_2C,
355-
have : ∀ φ : E →L[𝕜] F, ∃ n : fin d → ℕ, ∥φ - (hv.constrL $ u ∘ n)∥ ≤ ε/2,
353+
have : ∀ φ : E →L[𝕜] F, ∃ n : fin d → ℕ, ∥φ - (v.constrL $ u ∘ n)∥ ≤ ε/2,
356354
{ intros φ,
357355
have : ∀ i, ∃ n, ∥φ (v i) - u n∥ ≤ ε/(2*C),
358356
{ simp only [norm_sub_rev],
@@ -365,14 +363,14 @@ begin
365363
exact ⟨n, le_of_lt hn⟩ },
366364
choose n hn using this,
367365
use n,
368-
replace hn : ∀ i : fin d, ∥(φ - (hv.constrL $ u ∘ n)) (v i)∥ ≤ ε / (2 * C), by simp [hn],
366+
replace hn : ∀ i : fin d, ∥(φ - (v.constrL $ u ∘ n)) (v i)∥ ≤ ε / (2 * C), by simp [hn],
369367
have : C * (ε / (2 * C)) = ε/2,
370368
{ rw [eq_div_iff (two_ne_zero : (2 : ℝ) ≠ 0), mul_comm, ← mul_assoc,
371369
mul_div_cancel' _ (ne_of_gt h_2C)] },
372370
specialize hC (le_of_lt hε2C) hn,
373371
rwa this at hC },
374372
choose n hn using this,
375-
set Φ := λ φ : E →L[𝕜] F, (hv.constrL $ u ∘ (n φ)),
373+
set Φ := λ φ : E →L[𝕜] F, (v.constrL $ u ∘ (n φ)),
376374
change ∀ z, dist z (Φ z) ≤ ε/2 at hn,
377375
use n,
378376
intros x y hxy,
@@ -465,8 +463,8 @@ begin
465463
refine ⟨summable_of_summable_norm, λ hf, _⟩,
466464
-- First we use a finite basis to reduce the problem to the case `E = fin N → ℝ`
467465
suffices : ∀ {N : ℕ} {g : α → fin N → ℝ}, summable g → summable (λ x, ∥g x∥),
468-
{ rcases fin_basis ℝ E with ⟨v, hv⟩,
469-
set e := hv.equiv_funL,
466+
{ obtain v := fin_basis ℝ E,
467+
set e := v.equiv_funL,
470468
have : summable (λ x, ∥e (f x)∥) := this (e.summable.2 hf),
471469
refine summable_of_norm_bounded _ (this.mul_left
472470
↑(nnnorm (e.symm : (fin (finrank ℝ E) → ℝ) →L[ℝ] E))) (λ i, _),

0 commit comments

Comments
 (0)