Skip to content

Commit

Permalink
feat(analysis/normed_space/finite_dimension): finite-dimensionality o…
Browse files Browse the repository at this point in the history
…f spaces of continuous linear map (#10259)
  • Loading branch information
sgouezel committed Nov 10, 2021
1 parent 3c2bc2e commit dfa7363
Show file tree
Hide file tree
Showing 12 changed files with 89 additions and 55 deletions.
63 changes: 34 additions & 29 deletions src/analysis/inner_product_space/basic.lean
Expand Up @@ -224,7 +224,7 @@ lemma inner_sub_right {x y z : F} : ⟪x, y - z⟫ = ⟪x, y⟫ - ⟪x, z⟫ :=
by { simp [sub_eq_add_neg, inner_add_right, inner_neg_right] }

lemma inner_mul_conj_re_abs {x y : F} : re (⟪x, y⟫ * ⟪y, x⟫) = abs (⟪x, y⟫ * ⟪y, x⟫) :=
by { rw[←inner_conj_sym, mul_comm], exact re_eq_abs_of_mul_conj (inner y x), }
by { rw [←inner_conj_sym, mul_comm], exact re_eq_abs_of_mul_conj (inner y x), }

/-- Expand `inner (x + y) (x + y)` -/
lemma inner_add_add_self {x y : F} : ⟪x + y, x + y⟫ = ⟪x, x⟫ + ⟪x, y⟫ + ⟪y, x⟫ + ⟪y, y⟫ :=
Expand Down Expand Up @@ -297,8 +297,8 @@ local attribute [instance] to_has_norm

lemma norm_eq_sqrt_inner (x : F) : ∥x∥ = sqrt (re ⟪x, x⟫) := rfl

lemma inner_self_eq_norm_sq (x : F) : re ⟪x, x⟫ = ∥x∥ * ∥x∥ :=
by rw[norm_eq_sqrt_inner, ←sqrt_mul inner_self_nonneg (re ⟪x, x⟫),
lemma inner_self_eq_norm_mul_norm (x : F) : re ⟪x, x⟫ = ∥x∥ * ∥x∥ :=
by rw [norm_eq_sqrt_inner, ←sqrt_mul inner_self_nonneg (re ⟪x, x⟫),
sqrt_mul_self inner_self_nonneg]

lemma sqrt_norm_sq_eq_norm {x : F} : sqrt (norm_sqF x) = ∥x∥ := rfl
Expand All @@ -308,11 +308,11 @@ lemma abs_inner_le_norm (x y : F) : abs ⟪x, y⟫ ≤ ∥x∥ * ∥y∥ :=
nonneg_le_nonneg_of_sq_le_sq (mul_nonneg (sqrt_nonneg _) (sqrt_nonneg _))
begin
have H : ∥x∥ * ∥y∥ * (∥x∥ * ∥y∥) = re ⟪y, y⟫ * re ⟪x, x⟫,
{ simp only [inner_self_eq_norm_sq], ring, },
{ simp only [inner_self_eq_norm_mul_norm], ring, },
rw H,
conv
begin
to_lhs, congr, rw[inner_abs_conj_sym],
to_lhs, congr, rw [inner_abs_conj_sym],
end,
exact inner_mul_inner_self_le y x,
end
Expand Down Expand Up @@ -340,7 +340,7 @@ normed_group.of_core F
have h₃ : re ⟪x, y⟫ ≤ ∥x∥ * ∥y∥ := by linarith,
have h₄ : re ⟪y, x⟫ ≤ ∥x∥ * ∥y∥ := by rwa [←inner_conj_sym, conj_re],
have : ∥x + y∥ * ∥x + y∥ ≤ (∥x∥ + ∥y∥) * (∥x∥ + ∥y∥),
{ simp [←inner_self_eq_norm_sq, inner_add_add_self, add_mul, mul_add, mul_comm],
{ simp [←inner_self_eq_norm_mul_norm, inner_add_add_self, add_mul, mul_add, mul_comm],
linarith },
exact nonneg_le_nonneg_of_sq_le_sq (add_nonneg (sqrt_nonneg _) (sqrt_nonneg _)) this
end,
Expand Down Expand Up @@ -528,7 +528,7 @@ begin
end

lemma inner_self_abs_to_K {x : E} : (absK ⟪x, x⟫ : 𝕜) = ⟪x, x⟫ :=
by { rw[←inner_self_re_abs], exact inner_self_re_to_K }
by { rw [←inner_self_re_abs], exact inner_self_re_to_K }

lemma real_inner_self_abs {x : F} : absR ⟪x, x⟫_ℝ = ⟪x, x⟫_ℝ :=
by { have h := @inner_self_abs_to_K ℝ F _ _ x, simpa using h }
Expand All @@ -554,7 +554,7 @@ lemma inner_sub_right {x y z : E} : ⟪x, y - z⟫ = ⟪x, y⟫ - ⟪x, z⟫ :=
by { simp [sub_eq_add_neg, inner_add_right] }

lemma inner_mul_conj_re_abs {x y : E} : re (⟪x, y⟫ * ⟪y, x⟫) = abs (⟪x, y⟫ * ⟪y, x⟫) :=
by { rw[←inner_conj_sym, mul_comm], exact re_eq_abs_of_mul_conj (inner y x), }
by { rw [←inner_conj_sym, mul_comm], exact re_eq_abs_of_mul_conj (inner y x), }

/-- Expand `⟪x + y, x + y⟫` -/
lemma inner_add_add_self {x y : E} : ⟪x + y, x + y⟫ = ⟪x, x⟫ + ⟪x, y⟫ + ⟪y, x⟫ + ⟪y, y⟫ :=
Expand Down Expand Up @@ -859,19 +859,24 @@ end
lemma norm_eq_sqrt_real_inner (x : F) : ∥x∥ = sqrt ⟪x, x⟫_ℝ :=
by { have h := @norm_eq_sqrt_inner ℝ F _ _ x, simpa using h }

lemma inner_self_eq_norm_sq (x : E) : re ⟪x, x⟫ = ∥x∥ * ∥x∥ :=
by rw[norm_eq_sqrt_inner, ←sqrt_mul inner_self_nonneg (re ⟪x, x⟫),
lemma inner_self_eq_norm_mul_norm (x : E) : re ⟪x, x⟫ = ∥x∥ * ∥x∥ :=
by rw [norm_eq_sqrt_inner, ←sqrt_mul inner_self_nonneg (re ⟪x, x⟫),
sqrt_mul_self inner_self_nonneg]

lemma real_inner_self_eq_norm_sq (x : F) : ⟪x, x⟫_ℝ = ∥x∥ * ∥x∥ :=
by { have h := @inner_self_eq_norm_sq ℝ F _ _ x, simpa using h }
lemma inner_self_eq_norm_sq (x : E) : re ⟪x, x⟫ = ∥x∥^2 :=
by rw [pow_two, inner_self_eq_norm_mul_norm]

lemma real_inner_self_eq_norm_mul_norm (x : F) : ⟪x, x⟫_ℝ = ∥x∥ * ∥x∥ :=
by { have h := @inner_self_eq_norm_mul_norm ℝ F _ _ x, simpa using h }

lemma real_inner_self_eq_norm_sq (x : F) : ⟪x, x⟫_ℝ = ∥x∥^2 :=
by rw [pow_two, real_inner_self_eq_norm_mul_norm]

/-- Expand the square -/
lemma norm_add_sq {x y : E} : ∥x + y∥^2 = ∥x∥^2 + 2 * (re ⟪x, y⟫) + ∥y∥^2 :=
begin
repeat {rw [sq, ←inner_self_eq_norm_sq]},
rw[inner_add_add_self, two_mul],
repeat {rw [sq, ←inner_self_eq_norm_mul_norm]},
rw [inner_add_add_self, two_mul],
simp only [add_assoc, add_left_inj, add_right_inj, add_monoid_hom.map_add],
rw [←inner_conj_sym, conj_re],
end
Expand All @@ -895,14 +900,14 @@ by { have h := @norm_add_mul_self ℝ F _ _, simpa using h }
/-- Expand the square -/
lemma norm_sub_sq {x y : E} : ∥x - y∥^2 = ∥x∥^2 - 2 * (re ⟪x, y⟫) + ∥y∥^2 :=
begin
repeat {rw [sq, ←inner_self_eq_norm_sq]},
rw[inner_sub_sub_self],
repeat {rw [sq, ←inner_self_eq_norm_mul_norm]},
rw [inner_sub_sub_self],
calc
re (⟪x, x⟫ - ⟪x, y⟫ - ⟪y, x⟫ + ⟪y, y⟫)
= re ⟪x, x⟫ - re ⟪x, y⟫ - re ⟪y, x⟫ + re ⟪y, y⟫ : by simp
... = -re ⟪y, x⟫ - re ⟪x, y⟫ + re ⟪x, x⟫ + re ⟪y, y⟫ : by ring
... = -re (⟪x, y⟫†) - re ⟪x, y⟫ + re ⟪x, x⟫ + re ⟪y, y⟫ : by rw[inner_conj_sym]
... = -re ⟪x, y⟫ - re ⟪x, y⟫ + re ⟪x, x⟫ + re ⟪y, y⟫ : by rw[conj_re]
... = -re (⟪x, y⟫†) - re ⟪x, y⟫ + re ⟪x, x⟫ + re ⟪y, y⟫ : by rw [inner_conj_sym]
... = -re ⟪x, y⟫ - re ⟪x, y⟫ + re ⟪x, x⟫ + re ⟪y, y⟫ : by rw [conj_re]
... = re ⟪x, x⟫ - 2*re ⟪x, y⟫ + re ⟪y, y⟫ : by ring
end

Expand All @@ -927,7 +932,7 @@ lemma abs_inner_le_norm (x y : E) : abs ⟪x, y⟫ ≤ ∥x∥ * ∥y∥ :=
nonneg_le_nonneg_of_sq_le_sq (mul_nonneg (norm_nonneg _) (norm_nonneg _))
begin
have : ∥x∥ * ∥y∥ * (∥x∥ * ∥y∥) = (re ⟪x, x⟫) * (re ⟪y, y⟫),
simp only [inner_self_eq_norm_sq], ring,
simp only [inner_self_eq_norm_mul_norm], ring,
rw this,
conv_lhs { congr, skip, rw [inner_abs_conj_sym] },
exact inner_mul_inner_self_le _ _
Expand All @@ -948,8 +953,8 @@ include 𝕜
lemma parallelogram_law_with_norm {x y : E} :
∥x + y∥ * ∥x + y∥ + ∥x - y∥ * ∥x - y∥ = 2 * (∥x∥ * ∥x∥ + ∥y∥ * ∥y∥) :=
begin
simp only [← inner_self_eq_norm_sq],
rw[← re.map_add, parallelogram_law, two_mul, two_mul],
simp only [← inner_self_eq_norm_mul_norm],
rw [← re.map_add, parallelogram_law, two_mul, two_mul],
simp only [re.map_add],
end
omit 𝕜
Expand Down Expand Up @@ -1079,7 +1084,7 @@ if they have the same norm. -/
lemma real_inner_add_sub_eq_zero_iff (x y : F) : ⟪x + y, x - y⟫_ℝ = 0 ↔ ∥x∥ = ∥y∥ :=
begin
conv_rhs { rw ←mul_self_inj_of_nonneg (norm_nonneg _) (norm_nonneg _) },
simp only [←inner_self_eq_norm_sq, inner_add_left, inner_sub_right,
simp only [←inner_self_eq_norm_mul_norm, inner_add_left, inner_sub_right,
real_inner_comm y x, sub_eq_zero, re_to_real],
split,
{ intro h,
Expand All @@ -1093,7 +1098,7 @@ end
lemma norm_sub_eq_norm_add {v w : E} (h : ⟪v, w⟫ = 0) : ∥w - v∥ = ∥w + v∥ :=
begin
rw ←mul_self_inj_of_nonneg (norm_nonneg _) (norm_nonneg _),
simp [h, ←inner_self_eq_norm_sq, inner_add_left, inner_add_right, inner_sub_left,
simp [h, ←inner_self_eq_norm_mul_norm, inner_add_left, inner_add_right, inner_sub_left,
inner_sub_right, inner_re_symm]
end

Expand All @@ -1114,11 +1119,11 @@ end

/-- The inner product of a vector with a multiple of itself. -/
lemma real_inner_smul_self_left (x : F) (r : ℝ) : ⟪r • x, x⟫_ℝ = r * (∥x∥ * ∥x∥) :=
by rw [real_inner_smul_left, ←real_inner_self_eq_norm_sq]
by rw [real_inner_smul_left, ←real_inner_self_eq_norm_mul_norm]

/-- The inner product of a vector with a multiple of itself. -/
lemma real_inner_smul_self_right (x : F) (r : ℝ) : ⟪x, r • x⟫_ℝ = r * (∥x∥ * ∥x∥) :=
by rw [inner_smul_right, ←real_inner_self_eq_norm_sq]
by rw [inner_smul_right, ←real_inner_self_eq_norm_mul_norm]

/-- The inner product of a nonzero vector with a nonzero multiple of
itself, divided by the product of their norms, has absolute value
Expand All @@ -1128,7 +1133,7 @@ lemma abs_inner_div_norm_mul_norm_eq_one_of_ne_zero_of_ne_zero_mul
begin
have hx' : ∥x∥ ≠ 0 := by simp [norm_eq_zero, hx],
have hr' : abs r ≠ 0 := by simp [is_R_or_C.abs_eq_zero, hr],
rw [inner_smul_right, is_R_or_C.abs_mul, ←inner_self_re_abs, inner_self_eq_norm_sq,
rw [inner_smul_right, is_R_or_C.abs_mul, ←inner_self_re_abs, inner_self_eq_norm_mul_norm,
norm_smul],
rw [is_R_or_C.norm_eq_abs, ←mul_assoc, ←div_div_eq_div_mul, mul_div_cancel _ hx',
←div_div_eq_div_mul, mul_comm, mul_div_cancel _ hr', div_self hx'],
Expand Down Expand Up @@ -1185,12 +1190,12 @@ begin
have ht0 : ⟪x, t⟫ = 0,
{ rw [ht, inner_sub_right, inner_smul_right, hr],
norm_cast,
rw [←inner_self_eq_norm_sq, inner_self_re_to_K,
rw [←inner_self_eq_norm_mul_norm, inner_self_re_to_K,
div_mul_cancel _ (λ h, hx0 (inner_self_eq_zero.1 h)), sub_self] },
replace h : ∥r • x∥ / ∥t + r • x∥ = 1,
{ rw [←sub_add_cancel y (r • x), ←ht, inner_add_right, ht0, zero_add, inner_smul_right,
is_R_or_C.abs_div, is_R_or_C.abs_mul, ←inner_self_re_abs,
inner_self_eq_norm_sq] at h,
inner_self_eq_norm_mul_norm] at h,
norm_cast at h,
rwa [_root_.abs_mul, abs_norm_eq_norm, abs_norm_eq_norm, ←mul_assoc, mul_comm,
mul_div_mul_left _ _ (λ h, hx0 (norm_eq_zero.1 h)), ←is_R_or_C.norm_eq_abs,
Expand All @@ -1203,7 +1208,7 @@ begin
have h2 : ∥r • x∥ ^ 2 = ∥t + r • x∥ ^ 2,
{ rw [eq_of_div_eq_one h] },
replace h2 : ⟪r • x, r • x⟫ = ⟪t, t⟫ + ⟪t, r • x⟫ + ⟪r • x, t⟫ + ⟪r • x, r • x⟫,
{ rw [sq, sq, ←inner_self_eq_norm_sq, ←inner_self_eq_norm_sq ] at h2,
{ rw [sq, sq, ←inner_self_eq_norm_mul_norm, ←inner_self_eq_norm_mul_norm ] at h2,
have h2' := congr_arg (λ z : ℝ, (z : 𝕜)) h2,
simp_rw [inner_self_re_to_K, inner_add_add_self] at h2',
exact h2' },
Expand Down
4 changes: 2 additions & 2 deletions src/analysis/inner_product_space/calculus.lean
Expand Up @@ -120,7 +120,7 @@ lemma deriv_inner_apply {f g : ℝ → E} {x : ℝ} (hf : differentiable_at ℝ

lemma times_cont_diff_norm_sq : times_cont_diff ℝ n (λ x : E, ∥x∥ ^ 2) :=
begin
simp only [sq, ← inner_self_eq_norm_sq],
simp only [sq, ← inner_self_eq_norm_mul_norm],
exact (re_clm : 𝕜 →L[ℝ] ℝ).times_cont_diff.comp (times_cont_diff_id.inner times_cont_diff_id)
end

Expand Down Expand Up @@ -185,7 +185,7 @@ omit 𝕜
lemma has_strict_fderiv_at_norm_sq (x : F) :
has_strict_fderiv_at (λ x, ∥x∥ ^ 2) (bit0 (inner_right x)) x :=
begin
simp only [sq, ← inner_self_eq_norm_sq],
simp only [sq, ← inner_self_eq_norm_mul_norm],
convert (has_strict_fderiv_at_id x).inner (has_strict_fderiv_at_id x),
ext y,
simp [bit0, real_inner_comm],
Expand Down
7 changes: 7 additions & 0 deletions src/analysis/inner_product_space/dual.lean
Expand Up @@ -130,4 +130,11 @@ variables {E}

@[simp] lemma to_dual_apply {x y : E} : to_dual 𝕜 E x y = ⟪x, y⟫ := rfl

@[simp] lemma to_dual_symm_apply {x : E} {y : normed_space.dual 𝕜 E} :
⟪(to_dual 𝕜 E).symm y, x⟫ = y x :=
begin
rw ← to_dual_apply,
simp only [linear_isometry_equiv.apply_symm_apply],
end

end inner_product_space
2 changes: 1 addition & 1 deletion src/analysis/inner_product_space/rayleigh.lean
Expand Up @@ -142,7 +142,7 @@ begin
convert hc,
have : ∥x₀∥ ≠ 0 := by simp [hx₀],
field_simp,
simpa [inner_smul_left, real_inner_self_eq_norm_sq, sq] using congr_arg (λ x, ⟪x, x₀⟫_ℝ) hc,
simpa [inner_smul_left, real_inner_self_eq_norm_mul_norm, sq] using congr_arg (λ x, ⟪x, x₀⟫_ℝ) hc,
end

end real
Expand Down
3 changes: 3 additions & 0 deletions src/analysis/normed_space/dual.lean
Expand Up @@ -44,6 +44,9 @@ instance : normed_group (dual 𝕜 F) := continuous_linear_map.to_normed_group

instance : normed_space 𝕜 (dual 𝕜 F) := continuous_linear_map.to_normed_space

instance [finite_dimensional 𝕜 E] : finite_dimensional 𝕜 (dual 𝕜 E) :=
continuous_linear_map.finite_dimensional

/-- The inclusion of a normed space in its double (topological) dual, considered
as a bounded linear map. -/
def inclusion_in_double_dual : E →L[𝕜] (dual 𝕜 (dual 𝕜 E)) :=
Expand Down
14 changes: 13 additions & 1 deletion src/analysis/normed_space/finite_dimension.lean
Expand Up @@ -6,7 +6,7 @@ Authors: Sébastien Gouëzel
import analysis.normed_space.affine_isometry
import analysis.normed_space.operator_norm
import analysis.asymptotics.asymptotic_equivalent
import linear_algebra.finite_dimensional
import linear_algebra.matrix.to_lin

/-!
# Finite dimensional normed spaces over complete fields
Expand Down Expand Up @@ -122,6 +122,18 @@ begin
exact (continuous_apply i).smul continuous_const
end

/-- The space of continuous linear maps between finite-dimensional spaces is finite-dimensional. -/
instance {𝕜 E F : Type*} [field 𝕜] [topological_space 𝕜]
[topological_space E] [add_comm_group E] [module 𝕜 E] [finite_dimensional 𝕜 E]
[topological_space F] [add_comm_group F] [module 𝕜 F] [topological_add_group F]
[has_continuous_smul 𝕜 F] [finite_dimensional 𝕜 F] :
finite_dimensional 𝕜 (E →L[𝕜] F) :=
begin
haveI : is_noetherian 𝕜 (E →ₗ[𝕜] F) := is_noetherian.iff_fg.mpr (by apply_instance),
let I : (E →L[𝕜] F) →ₗ[𝕜] (E →ₗ[𝕜] F) := continuous_linear_map.coe_lm 𝕜,
exact module.finite.of_injective I continuous_linear_map.coe_injective
end

section complete_field

variables {𝕜 : Type u} [nondiscrete_normed_field 𝕜]
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/quaternion.lean
Expand Up @@ -49,7 +49,7 @@ inner_product_space.of_core
smul_left := λ x y r, by simp [inner_def] }

lemma norm_sq_eq_norm_sq (a : ℍ) : norm_sq a = ∥a∥ * ∥a∥ :=
by rw [← inner_self, real_inner_self_eq_norm_sq]
by rw [← inner_self, real_inner_self_eq_norm_mul_norm]

instance : norm_one_class ℍ :=
by rw [norm_eq_sqrt_real_inner, inner_self, norm_sq.map_one, real.sqrt_one]⟩
Expand Down
12 changes: 6 additions & 6 deletions src/geometry/euclidean/basic.lean
Expand Up @@ -156,7 +156,7 @@ end
@[simp] lemma angle_self {x : V} (hx : x ≠ 0) : angle x x = 0 :=
begin
unfold angle,
rw [←real_inner_self_eq_norm_sq, div_self (λ h, hx (inner_self_eq_zero.1 h)),
rw [←real_inner_self_eq_norm_mul_norm, div_self (λ h, hx (inner_self_eq_zero.1 h)),
real.arccos_one]
end

Expand Down Expand Up @@ -213,8 +213,8 @@ begin
←real.sqrt_mul_self (mul_nonneg (norm_nonneg x) (norm_nonneg y)),
←real.sqrt_mul' _ (mul_self_nonneg _), sq,
real.sqrt_mul_self (mul_nonneg (norm_nonneg x) (norm_nonneg y)),
real_inner_self_eq_norm_sq,
real_inner_self_eq_norm_sq],
real_inner_self_eq_norm_mul_norm,
real_inner_self_eq_norm_mul_norm],
by_cases h : (∥x∥ * ∥y∥) = 0,
{ rw [(show ∥x∥ * ∥x∥ * (∥y∥ * ∥y∥) = (∥x∥ * ∥y∥) * (∥x∥ * ∥y∥), by ring), h, mul_zero, mul_zero,
zero_sub],
Expand Down Expand Up @@ -572,7 +572,7 @@ lemma dist_affine_combination {ι : Type*} {s : finset ι} {w₁ w₂ : ι →
(w₁ - w₂) i₁ * (w₁ - w₂) i₂ * (dist (p i₁) (p i₂) * dist (p i₁) (p i₂))) / 2 :=
begin
rw [dist_eq_norm_vsub V (s.affine_combination p w₁) (s.affine_combination p w₂),
inner_self_eq_norm_sq, finset.affine_combination_vsub],
inner_self_eq_norm_mul_norm, finset.affine_combination_vsub],
have h : ∑ i in s, (w₁ - w₂) i = 0,
{ simp_rw [pi.sub_apply, finset.sum_sub_distrib, h₁, h₂, sub_self] },
exact inner_weighted_vsub p h p h
Expand Down Expand Up @@ -605,7 +605,7 @@ lemma dist_smul_vadd_sq (r : ℝ) (v : V) (p₁ p₂ : P) :
dist (r • v +ᵥ p₁) p₂ * dist (r • v +ᵥ p₁) p₂ =
⟪v, v⟫ * r * r + 2 * ⟪v, p₁ -ᵥ p₂⟫ * r + ⟪p₁ -ᵥ p₂, p₁ -ᵥ p₂⟫ :=
begin
rw [dist_eq_norm_vsub V _ p₂, ←real_inner_self_eq_norm_sq, vadd_vsub_assoc,
rw [dist_eq_norm_vsub V _ p₂, ←real_inner_self_eq_norm_mul_norm, vadd_vsub_assoc,
real_inner_add_add_self, real_inner_smul_left, real_inner_smul_left, real_inner_smul_right],
ring
end
Expand All @@ -617,7 +617,7 @@ lemma dist_smul_vadd_eq_dist {v : V} (p₁ p₂ : P) (hv : v ≠ 0) (r : ℝ) :
begin
conv_lhs { rw [←mul_self_inj_of_nonneg dist_nonneg dist_nonneg, dist_smul_vadd_sq,
←sub_eq_zero, add_sub_assoc, dist_eq_norm_vsub V p₁ p₂,
real_inner_self_eq_norm_sq, sub_self] },
real_inner_self_eq_norm_mul_norm, sub_self] },
have hvi : ⟪v, v⟫ ≠ 0, by simpa using hv,
have hd : discrim ⟪v, v⟫ (2 * ⟪v, p₁ -ᵥ p₂⟫) 0 =
(2 * inner v (p₁ -ᵥ p₂)) * (2 * inner v (p₁ -ᵥ p₂)),
Expand Down
4 changes: 2 additions & 2 deletions src/geometry/euclidean/circumcenter.lean
Expand Up @@ -842,8 +842,8 @@ begin
dist_sq_eq_dist_orthogonal_projection_sq_add_dist_orthogonal_projection_sq p₂ h],
simp only [h₂', dist_comm p₂, add_sub_cancel', simplex.dist_circumcenter_eq_circumradius] },
rw [←hd₂, hp₁, hp₂, dist_eq_norm_vsub V _ s.circumcenter,
dist_eq_norm_vsub V _ s.circumcenter, vadd_vsub, vadd_vsub, ←real_inner_self_eq_norm_sq,
real_inner_self_eq_norm_sq, real_inner_smul_left, real_inner_smul_left,
dist_eq_norm_vsub V _ s.circumcenter, vadd_vsub, vadd_vsub, ←real_inner_self_eq_norm_mul_norm,
real_inner_self_eq_norm_mul_norm, real_inner_smul_left, real_inner_smul_left,
real_inner_smul_right, real_inner_smul_right, ←mul_assoc, ←mul_assoc] at hd₁,
by_cases hp : p = orthogonal_projection span_s p,
{ rw [hp₁, hp₂, ←hp],
Expand Down

0 comments on commit dfa7363

Please sign in to comment.