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

Commit 5b77413

Browse files
refactor(analysis/inner_product_space/pi_L2): change std_orthonormal_basis to type orthonormal_basis (#12253)
Co-authored-by: Daniel-Packer <62404584+Daniel-Packer@users.noreply.github.com> Co-authored-by: Daniel Packer <62404584+Daniel-Packer@users.noreply.github.com>
1 parent 6379d39 commit 5b77413

File tree

8 files changed

+321
-191
lines changed

8 files changed

+321
-191
lines changed

src/analysis/inner_product_space/orientation.lean

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Copyright (c) 2022 Joseph Myers. All rights reserved.
33
Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Joseph Myers
55
-/
6-
import analysis.inner_product_space.projection
6+
import analysis.inner_product_space.pi_L2
77
import linear_algebra.orientation
88

99
/-!
@@ -37,7 +37,7 @@ protected def orientation.fin_orthonormal_basis {n : ℕ} (hn : 0 < n) (h : finr
3737
begin
3838
haveI := fin.pos_iff_nonempty.1 hn,
3939
haveI := finite_dimensional_of_finrank (h.symm ▸ hn : 0 < finrank ℝ E),
40-
exact (fin_std_orthonormal_basis h).adjust_to_orientation x
40+
exact (fin_std_orthonormal_basis h).to_basis.adjust_to_orientation x
4141
end
4242

4343
/-- `orientation.fin_orthonormal_basis` is orthonormal. -/
@@ -47,7 +47,9 @@ protected lemma orientation.fin_orthonormal_basis_orthonormal {n : ℕ} (hn : 0
4747
begin
4848
haveI := fin.pos_iff_nonempty.1 hn,
4949
haveI := finite_dimensional_of_finrank (h.symm ▸ hn : 0 < finrank ℝ E),
50-
exact (fin_std_orthonormal_basis_orthonormal h).orthonormal_adjust_to_orientation _
50+
exact (show orthonormal ℝ (fin_std_orthonormal_basis h).to_basis, -- Note sure how to format this
51+
by simp only [orthonormal_basis.coe_to_basis, orthonormal_basis.orthonormal]
52+
).orthonormal_adjust_to_orientation _
5153
end
5254

5355
/-- `orientation.fin_orthonormal_basis` gives a basis with the required orientation. -/

src/analysis/inner_product_space/pi_L2.lean

Lines changed: 219 additions & 27 deletions
Large diffs are not rendered by default.

src/analysis/inner_product_space/projection.lean

Lines changed: 0 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,6 @@ defined in `analysis.inner_product_space.basic`); the lemma
2727
`submodule.sup_orthogonal_of_is_complete`, stating that for a complete subspace `K` of `E` we have
2828
`K ⊔ Kᗮ = ⊤`, is a typical example.
2929
30-
The last section covers orthonormal bases, etc. The lemma
31-
`maximal_orthonormal_iff_orthogonal_complement_eq_bot` states that an orthonormal set in an inner
32-
product space is maximal, if and only the orthogonal complement of its span is trivial.
33-
Various consequences are stated for finite-dimensional `E`, including that a maximal orthonormal
34-
set is a basis (`maximal_orthonormal_iff_basis_of_finite_dimensional`); these consequences require
35-
the theory on the orthogonal complement developed earlier in this file. For consequences in
36-
infinite dimension (Hilbert bases, etc.), see the file `analysis.inner_product_space.l2_space`.
37-
3830
## References
3931
4032
The orthogonal projection construction is adapted from
@@ -1067,8 +1059,6 @@ end orthogonal_family
10671059

10681060
section orthonormal_basis
10691061

1070-
/-! ### Existence of orthonormal basis, etc. -/
1071-
10721062
variables {𝕜 E} {v : set E}
10731063

10741064
open finite_dimensional submodule set
@@ -1138,8 +1128,6 @@ begin
11381128
exact hu.inner_finsupp_eq_zero hxv' hl }
11391129
end
11401130

1141-
section finite_dimensional
1142-
11431131
variables [finite_dimensional 𝕜 E]
11441132

11451133
/-- An orthonormal set in a finite-dimensional `inner_product_space` is maximal, if and only if it
@@ -1160,104 +1148,4 @@ begin
11601148
rw [← h.span_eq, coe_h, hv_coe] }
11611149
end
11621150

1163-
/-- In a finite-dimensional `inner_product_space`, any orthonormal subset can be extended to an
1164-
orthonormal basis. -/
1165-
lemma exists_subset_is_orthonormal_basis
1166-
(hv : orthonormal 𝕜 (coe : v → E)) :
1167-
∃ (u ⊇ v) (b : basis u 𝕜 E), orthonormal 𝕜 b ∧ ⇑b = coe :=
1168-
begin
1169-
obtain ⟨u, hus, hu, hu_max⟩ := exists_maximal_orthonormal hv,
1170-
obtain ⟨b, hb⟩ := (maximal_orthonormal_iff_basis_of_finite_dimensional hu).mp hu_max,
1171-
exact ⟨u, hus, b, by rwa hb, hb⟩
1172-
end
1173-
1174-
variables (𝕜 E)
1175-
1176-
/-- Index for an arbitrary orthonormal basis on a finite-dimensional `inner_product_space`. -/
1177-
def orthonormal_basis_index : set E :=
1178-
classical.some (exists_subset_is_orthonormal_basis (orthonormal_empty 𝕜 E))
1179-
1180-
1181-
/-- A finite-dimensional `inner_product_space` has an orthonormal basis. -/
1182-
def std_orthonormal_basis :
1183-
basis (orthonormal_basis_index 𝕜 E) 𝕜 E :=
1184-
(exists_subset_is_orthonormal_basis (orthonormal_empty 𝕜 E)).some_spec.some_spec.some
1185-
1186-
lemma std_orthonormal_basis_orthonormal :
1187-
orthonormal 𝕜 (std_orthonormal_basis 𝕜 E) :=
1188-
(exists_subset_is_orthonormal_basis (orthonormal_empty 𝕜 E)).some_spec.some_spec.some_spec.1
1189-
1190-
@[simp] lemma coe_std_orthonormal_basis :
1191-
⇑(std_orthonormal_basis 𝕜 E) = coe :=
1192-
(exists_subset_is_orthonormal_basis (orthonormal_empty 𝕜 E)).some_spec.some_spec.some_spec.2
1193-
1194-
instance : fintype (orthonormal_basis_index 𝕜 E) :=
1195-
@is_noetherian.fintype_basis_index _ _ _ _ _ _
1196-
(is_noetherian.iff_fg.2 infer_instance) (std_orthonormal_basis 𝕜 E)
1197-
1198-
variables {𝕜 E}
1199-
1200-
/-- An `n`-dimensional `inner_product_space` has an orthonormal basis indexed by `fin n`. -/
1201-
def fin_std_orthonormal_basis {n : ℕ} (hn : finrank 𝕜 E = n) :
1202-
basis (fin n) 𝕜 E :=
1203-
have h : fintype.card (orthonormal_basis_index 𝕜 E) = n,
1204-
by rw [← finrank_eq_card_basis (std_orthonormal_basis 𝕜 E), hn],
1205-
(std_orthonormal_basis 𝕜 E).reindex (fintype.equiv_fin_of_card_eq h)
1206-
1207-
lemma fin_std_orthonormal_basis_orthonormal {n : ℕ} (hn : finrank 𝕜 E = n) :
1208-
orthonormal 𝕜 (fin_std_orthonormal_basis hn) :=
1209-
suffices orthonormal 𝕜 (std_orthonormal_basis _ _ ∘ equiv.symm _),
1210-
by { simp only [fin_std_orthonormal_basis, basis.coe_reindex], assumption }, -- simpa doesn't work?
1211-
(std_orthonormal_basis_orthonormal 𝕜 E).comp _ (equiv.injective _)
1212-
1213-
section subordinate_orthonormal_basis
1214-
open direct_sum
1215-
variables {n : ℕ} (hn : finrank 𝕜 E = n) {ι : Type*} [fintype ι] [decidable_eq ι]
1216-
{V : ι → submodule 𝕜 E} (hV : is_internal V)
1217-
1218-
/-- Exhibit a bijection between `fin n` and the index set of a certain basis of an `n`-dimensional
1219-
inner product space `E`. This should not be accessed directly, but only via the subsequent API. -/
1220-
@[irreducible] def direct_sum.is_internal.sigma_orthonormal_basis_index_equiv :
1221-
(Σ i, orthonormal_basis_index 𝕜 (V i)) ≃ fin n :=
1222-
let b := hV.collected_basis (λ i, std_orthonormal_basis 𝕜 (V i)) in
1223-
fintype.equiv_fin_of_card_eq $ (finite_dimensional.finrank_eq_card_basis b).symm.trans hn
1224-
1225-
/-- An `n`-dimensional `inner_product_space` equipped with a decomposition as an internal direct
1226-
sum has an orthonormal basis indexed by `fin n` and subordinate to that direct sum. -/
1227-
@[irreducible] def direct_sum.is_internal.subordinate_orthonormal_basis :
1228-
basis (fin n) 𝕜 E :=
1229-
(hV.collected_basis (λ i, std_orthonormal_basis 𝕜 (V i))).reindex
1230-
(hV.sigma_orthonormal_basis_index_equiv hn)
1231-
1232-
/-- An `n`-dimensional `inner_product_space` equipped with a decomposition as an internal direct
1233-
sum has an orthonormal basis indexed by `fin n` and subordinate to that direct sum. This function
1234-
provides the mapping by which it is subordinate. -/
1235-
def direct_sum.is_internal.subordinate_orthonormal_basis_index (a : fin n) : ι :=
1236-
((hV.sigma_orthonormal_basis_index_equiv hn).symm a).1
1237-
1238-
/-- The basis constructed in `orthogonal_family.subordinate_orthonormal_basis` is orthonormal. -/
1239-
lemma direct_sum.is_internal.subordinate_orthonormal_basis_orthonormal
1240-
(hV' : @orthogonal_family 𝕜 _ _ _ _ (λ i, V i) _ (λ i, (V i).subtypeₗᵢ)) :
1241-
orthonormal 𝕜 (hV.subordinate_orthonormal_basis hn) :=
1242-
begin
1243-
simp only [direct_sum.is_internal.subordinate_orthonormal_basis, basis.coe_reindex],
1244-
have : orthonormal 𝕜 (hV.collected_basis (λ i, std_orthonormal_basis 𝕜 (V i))) :=
1245-
hV.collected_basis_orthonormal hV' (λ i, std_orthonormal_basis_orthonormal 𝕜 (V i)),
1246-
exact this.comp _ (equiv.injective _),
1247-
end
1248-
1249-
/-- The basis constructed in `orthogonal_family.subordinate_orthonormal_basis` is subordinate to
1250-
the `orthogonal_family` in question. -/
1251-
lemma direct_sum.is_internal.subordinate_orthonormal_basis_subordinate (a : fin n) :
1252-
hV.subordinate_orthonormal_basis hn a ∈ V (hV.subordinate_orthonormal_basis_index hn a) :=
1253-
by simpa only [direct_sum.is_internal.subordinate_orthonormal_basis, basis.coe_reindex]
1254-
using hV.collected_basis_mem (λ i, std_orthonormal_basis 𝕜 (V i))
1255-
((hV.sigma_orthonormal_basis_index_equiv hn).symm a)
1256-
1257-
attribute [irreducible] direct_sum.is_internal.subordinate_orthonormal_basis_index
1258-
1259-
end subordinate_orthonormal_basis
1260-
1261-
end finite_dimensional
1262-
12631151
end orthonormal_basis

src/analysis/inner_product_space/spectrum.lean

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -179,30 +179,31 @@ finite-dimensional inner product space `E`.
179179
180180
TODO Postcompose with a permutation so that these eigenvectors are listed in increasing order of
181181
eigenvalue. -/
182-
noncomputable def eigenvector_basis : basis (fin n) 𝕜 E :=
182+
noncomputable def eigenvector_basis : orthonormal_basis (fin n) 𝕜 E :=
183183
hT.direct_sum_is_internal.subordinate_orthonormal_basis hn
184-
185-
lemma eigenvector_basis_orthonormal : orthonormal 𝕜 (hT.eigenvector_basis hn) :=
186-
hT.direct_sum_is_internal.subordinate_orthonormal_basis_orthonormal hn
187184
hT.orthogonal_family_eigenspaces'
188185

189186
/-- The sequence of real eigenvalues associated to the standard orthonormal basis of eigenvectors
190187
for a self-adjoint operator `T` on `E`.
191188
192189
TODO Postcompose with a permutation so that these eigenvalues are listed in increasing order. -/
193190
noncomputable def eigenvalues (i : fin n) : ℝ :=
194-
@is_R_or_C.re 𝕜 _ $ hT.direct_sum_is_internal.subordinate_orthonormal_basis_index hn i
191+
@is_R_or_C.re 𝕜 _ $
192+
hT.direct_sum_is_internal.subordinate_orthonormal_basis_index hn i
193+
hT.orthogonal_family_eigenspaces'
195194

196195
lemma has_eigenvector_eigenvector_basis (i : fin n) :
197196
has_eigenvector T (hT.eigenvalues hn i) (hT.eigenvector_basis hn i) :=
198197
begin
199198
let v : E := hT.eigenvector_basis hn i,
200-
let μ : 𝕜 := hT.direct_sum_is_internal.subordinate_orthonormal_basis_index hn i,
199+
let μ : 𝕜 := hT.direct_sum_is_internal.subordinate_orthonormal_basis_index
200+
hn i hT.orthogonal_family_eigenspaces',
201201
change has_eigenvector T (is_R_or_C.re μ) v,
202202
have key : has_eigenvector T μ v,
203203
{ have H₁ : v ∈ eigenspace T μ,
204-
{ exact hT.direct_sum_is_internal.subordinate_orthonormal_basis_subordinate hn i },
205-
have H₂ : v ≠ 0 := (hT.eigenvector_basis_orthonormal hn).ne_zero i,
204+
{ exact hT.direct_sum_is_internal.subordinate_orthonormal_basis_subordinate
205+
hn i hT.orthogonal_family_eigenspaces' },
206+
have H₂ : v ≠ 0 := by simpa using (hT.eigenvector_basis hn).to_basis.ne_zero i,
206207
exact ⟨H₁, H₂⟩ },
207208
have re_μ : ↑(is_R_or_C.re μ) = μ,
208209
{ rw ← is_R_or_C.eq_conj_iff_re,
@@ -219,28 +220,25 @@ attribute [irreducible] eigenvector_basis eigenvalues
219220
T (hT.eigenvector_basis hn i) = (hT.eigenvalues hn i : 𝕜) • hT.eigenvector_basis hn i :=
220221
mem_eigenspace_iff.mp (hT.has_eigenvector_eigenvector_basis hn i).1
221222

222-
/-- An isometry from an inner product space `E` to Euclidean space, induced by a choice of
223-
orthonormal basis of eigenvectors for a self-adjoint operator `T` on `E`. -/
224-
noncomputable def diagonalization_basis : E ≃ₗᵢ[𝕜] euclidean_space 𝕜 (fin n) :=
225-
((hT.eigenvector_basis hn).to_orthonormal_basis (hT.eigenvector_basis_orthonormal hn)).repr
226-
227-
@[simp] lemma diagonalization_basis_symm_apply (w : euclidean_space 𝕜 (fin n)) :
228-
(hT.diagonalization_basis hn).symm w = ∑ i, w i • hT.eigenvector_basis hn i :=
229-
by simp [diagonalization_basis]
230-
231223
/-- *Diagonalization theorem*, *spectral theorem*; version 2: A self-adjoint operator `T` on a
232224
finite-dimensional inner product space `E` acts diagonally on the identification of `E` with
233225
Euclidean space induced by an orthonormal basis of eigenvectors of `T`. -/
234226
lemma diagonalization_basis_apply_self_apply (v : E) (i : fin n) :
235-
hT.diagonalization_basis hn (T v) i = hT.eigenvalues hn i * hT.diagonalization_basis hn v i :=
227+
(hT.eigenvector_basis hn).repr (T v) i =
228+
hT.eigenvalues hn i * (hT.eigenvector_basis hn).repr v i :=
236229
begin
237230
suffices : ∀ w : euclidean_space 𝕜 (fin n),
238-
T ((hT.diagonalization_basis hn).symm w)
239-
= (hT.diagonalization_basis hn).symm (λ i, hT.eigenvalues hn i * w i),
240-
{ simpa [-diagonalization_basis_symm_apply] using
241-
congr_arg (λ v, hT.diagonalization_basis hn v i) (this (hT.diagonalization_basis hn v)) },
231+
T ((hT.eigenvector_basis hn).repr.symm w)
232+
= (hT.eigenvector_basis hn).repr.symm (λ i, hT.eigenvalues hn i * w i),
233+
{ simpa [orthonormal_basis.sum_repr_symm] using
234+
congr_arg (λ v, (hT.eigenvector_basis hn).repr v i)
235+
(this ((hT.eigenvector_basis hn).repr v)) },
242236
intros w,
243-
simp [mul_comm, mul_smul],
237+
simp_rw [← orthonormal_basis.sum_repr_symm, linear_map.map_sum,
238+
linear_map.map_smul, apply_eigenvector_basis],
239+
apply fintype.sum_congr,
240+
intros a,
241+
rw [smul_smul, mul_comm],
244242
end
245243

246244
end version2

src/analysis/normed_space/pi_Lp.lean

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,47 @@ variables (x y : pi_Lp p β) (x' y' : Π i, β i) (i : ι)
353353
@[simp] lemma smul_apply : (c • x) i = c • x i := rfl
354354
@[simp] lemma neg_apply : (-x) i = - (x i) := rfl
355355

356+
variables {ι' : Type*}
357+
variables [fintype ι']
358+
359+
variables (p 𝕜) (E : Type*) [normed_group E] [normed_space 𝕜 E]
360+
361+
/-- An equivalence of finite domains induces a linearly isometric equivalence of finitely supported
362+
functions-/
363+
def _root_.linear_isometry_equiv.pi_Lp_congr_left (e : ι ≃ ι') :
364+
pi_Lp p (λ i : ι, E) ≃ₗᵢ[𝕜] pi_Lp p (λ i : ι', E) :=
365+
{ to_linear_equiv := linear_equiv.Pi_congr_left' 𝕜 (λ i : ι, E) e,
366+
norm_map' :=
367+
begin
368+
intro x,
369+
simp only [norm],
370+
simp_rw linear_equiv.Pi_congr_left'_apply 𝕜 (λ i : ι, E) e x _,
371+
congr,
372+
rw fintype.sum_equiv (e.symm),
373+
exact λ i, rfl,
374+
end, }
375+
376+
variables {p 𝕜 E}
377+
378+
@[simp] lemma _root_.linear_isometry_equiv.pi_Lp_congr_left_apply
379+
(e : ι ≃ ι') (v : pi_Lp p (λ i : ι, E)) :
380+
linear_isometry_equiv.pi_Lp_congr_left p 𝕜 E e v = equiv.Pi_congr_left' (λ i : ι, E) e v :=
381+
rfl
382+
383+
@[simp] lemma _root_.linear_isometry_equiv.pi_Lp_congr_left_symm (e : ι ≃ ι') :
384+
(linear_isometry_equiv.pi_Lp_congr_left p 𝕜 E e).symm
385+
= (linear_isometry_equiv.pi_Lp_congr_left p 𝕜 E e.symm) :=
386+
linear_isometry_equiv.ext $ λ x, rfl
387+
388+
@[simp] lemma _root_.linear_isometry_equiv.pi_Lp_congr_left_single
389+
[decidable_eq ι] [decidable_eq ι'] (e : ι ≃ ι') (i : ι) (v : E) :
390+
linear_isometry_equiv.pi_Lp_congr_left p 𝕜 E e (pi.single i v) = pi.single (e i) v :=
391+
begin
392+
funext x,
393+
simp [linear_isometry_equiv.pi_Lp_congr_left, linear_equiv.Pi_congr_left', equiv.Pi_congr_left',
394+
pi.single, function.update, equiv.symm_apply_eq],
395+
end
396+
356397
@[simp] lemma equiv_zero : pi_Lp.equiv p β 0 = 0 := rfl
357398
@[simp] lemma equiv_symm_zero : (pi_Lp.equiv p β).symm 0 = 0 := rfl
358399

src/geometry/manifold/instances/sphere.lean

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ from `(ℝ ∙ v)ᗮ` to the Euclidean space. -/
294294
def stereographic' (n : ℕ) [fact (finrank ℝ E = n + 1)] (v : sphere (0:E) 1) :
295295
local_homeomorph (sphere (0:E) 1) (euclidean_space ℝ (fin n)) :=
296296
(stereographic (norm_eq_of_mem_sphere v)) ≫ₕ
297-
(linear_isometry_equiv.from_orthogonal_span_singleton n
298-
(ne_zero_of_mem_unit_sphere v)).to_homeomorph.to_local_homeomorph
297+
(orthonormal_basis.from_orthogonal_span_singleton n
298+
(ne_zero_of_mem_unit_sphere v)).repr.to_homeomorph.to_local_homeomorph
299299

300300
@[simp] lemma stereographic'_source {n : ℕ} [fact (finrank ℝ E = n + 1)] (v : sphere (0:E) 1) :
301301
(stereographic' n v).source = {v}ᶜ :=
@@ -326,8 +326,8 @@ lemma stereographic'_symm_apply {n : ℕ} [fact (finrank ℝ E = n + 1)]
326326
(v : sphere (0:E) 1) (x : euclidean_space ℝ (fin n)) :
327327
((stereographic' n v).symm x : E) =
328328
let U : (ℝ ∙ (v:E))ᗮ ≃ₗᵢ[ℝ] euclidean_space ℝ (fin n) :=
329-
linear_isometry_equiv.from_orthogonal_span_singleton n
330-
(ne_zero_of_mem_unit_sphere v) in
329+
(orthonormal_basis.from_orthogonal_span_singleton n
330+
(ne_zero_of_mem_unit_sphere v)).repr in
331331
((∥(U.symm x : E)∥ ^ 2 + 4)⁻¹ • (4 : ℝ) • (U.symm x : E) +
332332
(∥(U.symm x : E)∥ ^ 2 + 4)⁻¹ • (∥(U.symm x : E)∥ ^ 2 - 4) • v) :=
333333
by simp [real_inner_comm, stereographic, stereographic', ← submodule.coe_norm]
@@ -341,12 +341,16 @@ instance {n : ℕ} [fact (finrank ℝ E = n + 1)] :
341341
smooth_manifold_with_corners_of_cont_diff_on (𝓡 n) (sphere (0:E) 1)
342342
begin
343343
rintros _ _ ⟨v, rfl⟩ ⟨v', rfl⟩,
344-
let U : (ℝ ∙ (v:E))ᗮ ≃ₗᵢ[ℝ] euclidean_space ℝ (fin n) :=
345-
linear_isometry_equiv.from_orthogonal_span_singleton n
346-
(ne_zero_of_mem_unit_sphere v),
347-
let U' : (ℝ ∙ (v':E))ᗮ ≃ₗᵢ[ℝ] euclidean_space ℝ (fin n) :=
348-
linear_isometry_equiv.from_orthogonal_span_singleton n
349-
(ne_zero_of_mem_unit_sphere v'),
344+
let U := -- Removed type ascription, and this helped for some reason with timeout issues?
345+
(orthonormal_basis.from_orthogonal_span_singleton n
346+
(ne_zero_of_mem_unit_sphere v)).repr,
347+
let U' :=-- Removed type ascription, and this helped for some reason with timeout issues?
348+
(orthonormal_basis.from_orthogonal_span_singleton n
349+
(ne_zero_of_mem_unit_sphere v')).repr,
350+
have hUv : stereographic' n v = (stereographic (norm_eq_of_mem_sphere v)) ≫ₕ
351+
U.to_homeomorph.to_local_homeomorph := rfl,
352+
have hU'v' : stereographic' n v' = (stereographic (norm_eq_of_mem_sphere v')).trans
353+
U'.to_homeomorph.to_local_homeomorph := rfl,
350354
have H₁ := U'.cont_diff.comp_cont_diff_on cont_diff_on_stereo_to_fun,
351355
have H₂ := (cont_diff_stereo_inv_fun_aux.comp
352356
(ℝ ∙ (v:E))ᗮ.subtypeL.cont_diff).comp U.symm.cont_diff,
@@ -363,8 +367,9 @@ begin
363367
split,
364368
{ exact continuous_subtype_coe },
365369
{ intros v _,
366-
let U : (ℝ ∙ ((-v):E))ᗮ ≃ₗᵢ[ℝ] euclidean_space ℝ (fin n) :=
367-
linear_isometry_equiv.from_orthogonal_span_singleton n (ne_zero_of_mem_unit_sphere (-v)),
370+
let U := -- Again, removing type ascription...
371+
(orthonormal_basis.from_orthogonal_span_singleton n
372+
(ne_zero_of_mem_unit_sphere (-v))).repr,
368373
exact ((cont_diff_stereo_inv_fun_aux.comp
369374
(ℝ ∙ ((-v):E))ᗮ.subtypeL.cont_diff).comp U.symm.cont_diff).cont_diff_on }
370375
end
@@ -383,8 +388,8 @@ begin
383388
rw cont_mdiff_iff_target,
384389
refine ⟨continuous_induced_rng hf.continuous, _⟩,
385390
intros v,
386-
let U : (ℝ ∙ ((-v):E))ᗮ ≃ₗᵢ[ℝ] euclidean_space ℝ (fin n) :=
387-
(linear_isometry_equiv.from_orthogonal_span_singleton n (ne_zero_of_mem_unit_sphere (-v))),
391+
let U := -- Again, removing type ascription... Weird that this helps!
392+
(orthonormal_basis.from_orthogonal_span_singleton n (ne_zero_of_mem_unit_sphere (-v))).repr,
388393
have h : cont_diff_on ℝ ⊤ _ set.univ :=
389394
U.cont_diff.cont_diff_on,
390395
have H₁ := (h.comp' cont_diff_on_stereo_to_fun).cont_mdiff_on,

src/linear_algebra/finite_dimensional.lean

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,11 @@ begin
314314
apply cardinal.nat_lt_aleph_0,
315315
end
316316

317+
lemma _root_.linear_independent.finite {K : Type*} {V : Type*} [division_ring K] [add_comm_group V]
318+
[module K V] [finite_dimensional K V] {b : set V} (h : linear_independent K (λ (x:b), (x:V))) :
319+
b.finite :=
320+
cardinal.lt_aleph_0_iff_set_finite.mp (finite_dimensional.lt_aleph_0_of_linear_independent h)
321+
317322
lemma not_linear_independent_of_infinite {ι : Type w} [inf : infinite ι] [finite_dimensional K V]
318323
(v : ι → V) : ¬ linear_independent K v :=
319324
begin

0 commit comments

Comments
 (0)