analysis.inner_product_space.of_norm
β·
Mathlib.Analysis.InnerProductSpace.OfNorm
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -296,7 +296,7 @@ private theorem int_prop (n : β€) : InnerProp E (n : π) :=
by
intro x y
rw [β n.sign_mul_nat_abs]
- simp only [Int.cast_ofNat, map_natCast, map_intCast, Int.cast_mul, map_mul, mul_smul]
+ simp only [Int.cast_natCast, map_natCast, map_intCast, Int.cast_mul, map_mul, mul_smul]
obtain hn | rfl | hn := lt_trichotomy n 0
Β· rw [Int.sign_eq_neg_one_of_neg hn, inner_prop_neg_one ((n.nat_abs : π) β’ x), Nat]
simp only [map_neg, neg_mul, one_mul, mul_eq_mul_left_iff, true_or_iff, Int.natAbs_eq_zero,
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -56,11 +56,11 @@ inner product space, Hilbert space, norm
-/
-open IsROrC
+open RCLike
open scoped ComplexConjugate
-variable {π : Type _} [IsROrC π] (E : Type _) [NormedAddCommGroup E]
+variable {π : Type _} [RCLike π] (E : Type _) [NormedAddCommGroup E]
#print InnerProductSpaceable /-
/-- Predicate for the parallelogram identity to hold in a normed group. This is a scalar-less
@@ -144,9 +144,9 @@ theorem inner_.norm_sq (x : E) : βxβ ^ 2 = re (inner_ π x x) :=
have hβ : norm_sq (4 : π) = 16 :=
by
have : ((4 : β) : π) = (4 : π) := by simp only [of_real_one, of_real_bit0]
- rw [β this, norm_sq_eq_def', IsROrC.norm_of_nonneg (by norm_num : (0 : β) β€ 4)]
+ rw [β this, norm_sq_eq_def', RCLike.norm_of_nonneg (by norm_num : (0 : β) β€ 4)]
norm_num
- have hβ : βx + xβ = 2 * βxβ := by rw [β two_smul π, norm_smul, IsROrC.norm_two]
+ have hβ : βx + xβ = 2 * βxβ := by rw [β two_smul π, norm_smul, RCLike.norm_two]
simp only [inner, hβ, hβ, one_im, bit0_zero, add_zero, norm_zero, I_re, of_real_im, map_add,
bit0_im, zero_div, MulZeroClass.zero_mul, AddMonoidHom.map_neg, of_real_re, map_sub, sub_zero,
inv_re, one_re, inv_im, bit0_re, mul_re, MulZeroClass.mul_zero, sub_self, neg_zero,
@@ -160,7 +160,7 @@ theorem inner_.conj_symm (x y : E) : conj (inner_ π y x) = inner_ π x y :=
by
simp only [inner_]
have h4 : conj (4β»ΒΉ : π) = 4β»ΒΉ := by
- rw [IsROrC.conj_inv, β of_real_one, β of_real_bit0, β of_real_bit0, conj_of_real]
+ rw [RCLike.conj_inv, β of_real_one, β of_real_bit0, β of_real_bit0, conj_of_real]
rw [map_mul, h4]
congr 1
simp only [map_sub, map_add, algebra_map_eq_of_real, β of_real_mul, conj_of_real, map_mul, conj_I]
@@ -314,11 +314,11 @@ private theorem rat_prop (r : β) : InnerProp E (r : π) :=
intro x y
have : (r.denom : π) β 0 :=
by
- haveI : CharZero π := IsROrC.charZero_isROrC
+ haveI : CharZero π := RCLike.charZero_rclike
exact_mod_cast r.pos.ne'
rw [β r.num_div_denom, β mul_right_inj' this, β Nat r.denom _ y, smul_smul, Rat.cast_div]
- simp only [map_natCast, Rat.cast_coe_nat, map_intCast, Rat.cast_coe_int, map_divβ]
- rw [β mul_assoc, mul_div_cancel' _ this, int_prop _ x, map_intCast]
+ simp only [map_natCast, Rat.cast_natCast, map_intCast, Rat.cast_intCast, map_divβ]
+ rw [β mul_assoc, mul_div_cancelβ _ this, int_prop _ x, map_intCast]
private theorem real_prop (r : β) : InnerProp E (r : π) :=
by
@@ -328,7 +328,7 @@ private theorem real_prop (r : β) : InnerProp E (r : π) :=
refine' rat.dense_embedding_coe_real.dense.equalizer _ _ (funext fun X => _)
Β· exact (continuous_of_real.smul continuous_const).inner_ continuous_const
Β· exact (continuous_conj.comp continuous_of_real).mul continuous_const
- Β· simp only [Function.comp_apply, IsROrC.ofReal_ratCast, rat_prop _ _]
+ Β· simp only [Function.comp_apply, RCLike.ofReal_ratCast, rat_prop _ _]
private theorem I_prop : InnerProp E (i : π) :=
by
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2020 Heather Macbeth. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Heather Macbeth
-/
-import Mathbin.Topology.Algebra.Algebra
-import Mathbin.Analysis.InnerProductSpace.Basic
+import Topology.Algebra.Algebra
+import Analysis.InnerProductSpace.Basic
#align_import analysis.inner_product_space.of_norm from "leanprover-community/mathlib"@"2fe465deb81bcd7ccafa065bb686888a82f15372"
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -137,8 +137,8 @@ theorem Continuous.inner_ {f g : β β E} (hf : Continuous f) (hg : Continuous
#align inner_product_spaceable.continuous.inner_ Continuous.inner_
-/
-#print InnerProductSpaceable.Inner_.norm_sq /-
-theorem Inner_.norm_sq (x : E) : βxβ ^ 2 = re (inner_ π x x) :=
+#print InnerProductSpaceable.inner_.norm_sq /-
+theorem inner_.norm_sq (x : E) : βxβ ^ 2 = re (inner_ π x x) :=
by
simp only [inner_]
have hβ : norm_sq (4 : π) = 16 :=
@@ -152,11 +152,11 @@ theorem Inner_.norm_sq (x : E) : βxβ ^ 2 = re (inner_ π x x) :=
inv_re, one_re, inv_im, bit0_re, mul_re, MulZeroClass.mul_zero, sub_self, neg_zero,
algebra_map_eq_of_real]
ring
-#align inner_product_spaceable.inner_.norm_sq InnerProductSpaceable.Inner_.norm_sq
+#align inner_product_spaceable.inner_.norm_sq InnerProductSpaceable.inner_.norm_sq
-/
-#print InnerProductSpaceable.Inner_.conj_symm /-
-theorem Inner_.conj_symm (x y : E) : conj (inner_ π y x) = inner_ π x y :=
+#print InnerProductSpaceable.inner_.conj_symm /-
+theorem inner_.conj_symm (x y : E) : conj (inner_ π y x) = inner_ π x y :=
by
simp only [inner_]
have h4 : conj (4β»ΒΉ : π) = 4β»ΒΉ := by
@@ -179,7 +179,7 @@ theorem Inner_.conj_symm (x y : E) : conj (inner_ π y x) = inner_ π x y :=
Β· rw [smul_add, smul_smul, I_mul_I_of_nonzero hI, neg_one_smul, β neg_add_eq_sub]
rw [hβ, hβ, β sub_add_eq_add_sub]
simp only [neg_mul, sub_eq_add_neg, neg_neg]
-#align inner_product_spaceable.inner_.conj_symm InnerProductSpaceable.Inner_.conj_symm
+#align inner_product_spaceable.inner_.conj_symm InnerProductSpaceable.inner_.conj_symm
-/
variable [InnerProductSpaceable E]
@@ -385,8 +385,8 @@ parallelogram identity can be given a compatible inner product. Do
`inner_product_space π E`. -/
theorem nonempty_innerProductSpace : Nonempty (InnerProductSpace π E) :=
β¨{ inner := inner_ π
- norm_sq_eq_inner := Inner_.norm_sq
- conj_symm := Inner_.conj_symm
+ norm_sq_eq_inner := inner_.norm_sq
+ conj_symm := inner_.conj_symm
add_left := add_left
smul_left := fun _ _ _ => innerProp _ _ _ }β©
#align nonempty_inner_product_space nonempty_innerProductSpace
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2020 Heather Macbeth. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Heather Macbeth
-
-! This file was ported from Lean 3 source module analysis.inner_product_space.of_norm
-! leanprover-community/mathlib commit 2fe465deb81bcd7ccafa065bb686888a82f15372
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Topology.Algebra.Algebra
import Mathbin.Analysis.InnerProductSpace.Basic
+#align_import analysis.inner_product_space.of_norm from "leanprover-community/mathlib"@"2fe465deb81bcd7ccafa065bb686888a82f15372"
+
/-!
# Inner product space derived from a norm
mathlib commit https://github.com/leanprover-community/mathlib/commit/2fe465deb81bcd7ccafa065bb686888a82f15372
@@ -65,6 +65,7 @@ open scoped ComplexConjugate
variable {π : Type _} [IsROrC π] (E : Type _) [NormedAddCommGroup E]
+#print InnerProductSpaceable /-
/-- Predicate for the parallelogram identity to hold in a normed group. This is a scalar-less
version of `inner_product_space`. If you have an `inner_product_spaceable` assumption, you can
locally upgrade that to `inner_product_space π E` using `casesI nonempty_inner_product_space π E`.
@@ -73,19 +74,24 @@ class InnerProductSpaceable : Prop where
parallelogram_identity :
β x y : E, βx + yβ * βx + yβ + βx - yβ * βx - yβ = 2 * (βxβ * βxβ + βyβ * βyβ)
#align inner_product_spaceable InnerProductSpaceable
+-/
variable (π) {E}
-theorem InnerProductSpace.to_innerProductSpaceable [InnerProductSpace π E] :
+#print InnerProductSpace.toInnerProductSpaceable /-
+theorem InnerProductSpace.toInnerProductSpaceable [InnerProductSpace π E] :
InnerProductSpaceable E :=
β¨parallelogram_law_with_norm πβ©
-#align inner_product_space.to_inner_product_spaceable InnerProductSpace.to_innerProductSpaceable
+#align inner_product_space.to_inner_product_spaceable InnerProductSpace.toInnerProductSpaceable
+-/
+#print InnerProductSpace.toInnerProductSpaceable_ofReal /-
-- See note [lower instance priority]
-instance (priority := 100) InnerProductSpace.to_innerProductSpaceable_of_real
+instance (priority := 100) InnerProductSpace.toInnerProductSpaceable_ofReal
[InnerProductSpace β E] : InnerProductSpaceable E :=
β¨parallelogram_law_with_norm ββ©
-#align inner_product_space.to_inner_product_spaceable_of_real InnerProductSpace.to_innerProductSpaceable_of_real
+#align inner_product_space.to_inner_product_spaceable_of_real InnerProductSpace.toInnerProductSpaceable_ofReal
+-/
variable [NormedSpace π E]
@@ -102,12 +108,15 @@ namespace InnerProductSpaceable
variable {π} (E)
+#print InnerProductSpaceable.innerProp /-
/-- Auxiliary definition for the `add_left` property -/
private def innerProp (r : π) : Prop :=
β x y : E, inner_ π (r β’ x) y = conj r * inner_ π x y
+-/
variable {E}
+#print InnerProductSpaceable.innerProp_neg_one /-
theorem innerProp_neg_one : InnerProp E ((-1 : β€) : π) :=
by
intro x y
@@ -123,11 +132,15 @@ theorem innerProp_neg_one : InnerProp E ((-1 : β€) : π) :=
rw [hβ, hβ, hβ, hβ]
ring
#align inner_product_spaceable.inner_prop_neg_one InnerProductSpaceable.innerProp_neg_one
+-/
+#print Continuous.inner_ /-
theorem Continuous.inner_ {f g : β β E} (hf : Continuous f) (hg : Continuous g) :
Continuous fun x => inner_ π (f x) (g x) := by unfold inner_; continuity
-#align inner_product_spaceable.continuous.inner_ InnerProductSpaceable.Continuous.inner_
+#align inner_product_spaceable.continuous.inner_ Continuous.inner_
+-/
+#print InnerProductSpaceable.Inner_.norm_sq /-
theorem Inner_.norm_sq (x : E) : βxβ ^ 2 = re (inner_ π x x) :=
by
simp only [inner_]
@@ -143,7 +156,9 @@ theorem Inner_.norm_sq (x : E) : βxβ ^ 2 = re (inner_ π x x) :=
algebra_map_eq_of_real]
ring
#align inner_product_spaceable.inner_.norm_sq InnerProductSpaceable.Inner_.norm_sq
+-/
+#print InnerProductSpaceable.Inner_.conj_symm /-
theorem Inner_.conj_symm (x y : E) : conj (inner_ π y x) = inner_ π x y :=
by
simp only [inner_]
@@ -168,6 +183,7 @@ theorem Inner_.conj_symm (x y : E) : conj (inner_ π y x) = inner_ π x y :=
rw [hβ, hβ, β sub_add_eq_add_sub]
simp only [neg_mul, sub_eq_add_neg, neg_neg]
#align inner_product_spaceable.inner_.conj_symm InnerProductSpaceable.Inner_.conj_symm
+-/
variable [InnerProductSpaceable E]
@@ -248,6 +264,7 @@ private theorem add_left_aux8 (y z : E) :
have hβ := parallelogram_identity ((I : π) β’ y - z) z
convert hβ using 4 <;> Β· try simp only [two_smul, smul_add]; abel
+#print InnerProductSpaceable.add_left /-
theorem add_left (x y z : E) : inner_ π (x + y) z = inner_ π x z + inner_ π y z :=
by
simp only [inner_, β mul_add]
@@ -261,7 +278,9 @@ theorem add_left (x y z : E) : inner_ π (x + y) z = inner_ π x z + inner_
simp only [map_sub, map_mul, map_add, div_eq_mul_inv]
ring
#align inner_product_spaceable.add_left InnerProductSpaceable.add_left
+-/
+#print InnerProductSpaceable.nat /-
theorem nat (n : β) (x y : E) : inner_ π ((n : π) β’ x) y = (n : π) * inner_ π x y :=
by
induction' n with n ih
@@ -271,6 +290,7 @@ theorem nat (n : β) (x y : E) : inner_ π ((n : π) β’ x) y = (n : π)
Β· simp only [Nat.cast_succ, add_smul, one_smul]
rw [add_left, ih, add_mul, one_mul]
#align inner_product_spaceable.nat InnerProductSpaceable.nat
+-/
private theorem nat_prop (r : β) : InnerProp E (r : π) := fun x y => by simp only [map_natCast];
exact Nat r x y
@@ -331,17 +351,20 @@ private theorem I_prop : InnerProp E (i : π) :=
rw [β neg_mul_eq_neg_mul, β neg_mul_eq_neg_mul]
abel
+#print InnerProductSpaceable.innerProp /-
theorem innerProp (r : π) : InnerProp E r := by
intro x y
rw [β re_add_im r, add_smul, add_left, real_prop _ x, β smul_smul, real_prop _ _ y, I_prop,
map_add, map_mul, conj_of_real, conj_of_real, conj_I]
ring
#align inner_product_spaceable.inner_prop InnerProductSpaceable.innerProp
+-/
end InnerProductSpaceable
open InnerProductSpaceable
+#print InnerProductSpace.ofNorm /-
/-- **FrΓ©chetβvon NeumannβJordan Theorem**. A normed space `E` whose norm satisfies the
parallelogram identity can be given a compatible inner product. -/
noncomputable def InnerProductSpace.ofNorm
@@ -354,9 +377,11 @@ noncomputable def InnerProductSpace.ofNorm
add_left
smul_left := fun _ _ _ => inner_prop _ _ _ }
#align inner_product_space.of_norm InnerProductSpace.ofNorm
+-/
variable (π E) [InnerProductSpaceable E]
+#print nonempty_innerProductSpace /-
/-- **FrΓ©chetβvon NeumannβJordan Theorem**. A normed space `E` whose norm satisfies the
parallelogram identity can be given a compatible inner product. Do
`casesI nonempty_inner_product_space π E` to locally upgrade `inner_product_spaceable E` to
@@ -368,12 +393,15 @@ theorem nonempty_innerProductSpace : Nonempty (InnerProductSpace π E) :=
add_left := add_left
smul_left := fun _ _ _ => innerProp _ _ _ }β©
#align nonempty_inner_product_space nonempty_innerProductSpace
+-/
variable {π E} [NormedSpace β E]
+#print InnerProductSpaceable.to_uniformConvexSpace /-
-- TODO: Replace `inner_product_space.to_uniform_convex_space`
-- See note [lower instance priority]
instance (priority := 100) InnerProductSpaceable.to_uniformConvexSpace : UniformConvexSpace E := by
cases nonempty_innerProductSpace β E; infer_instance
#align inner_product_spaceable.to_uniform_convex_space InnerProductSpaceable.to_uniformConvexSpace
+-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/2fe465deb81bcd7ccafa065bb686888a82f15372
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Heather Macbeth
! This file was ported from Lean 3 source module analysis.inner_product_space.of_norm
-! leanprover-community/mathlib commit baa88307f3e699fa7054ef04ec79fa4f056169cb
+! leanprover-community/mathlib commit 2fe465deb81bcd7ccafa065bb686888a82f15372
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -14,6 +14,9 @@ import Mathbin.Analysis.InnerProductSpace.Basic
/-!
# Inner product space derived from a norm
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
This file defines an `inner_product_space` instance from a norm that respects the
parallellogram identity. The parallelogram identity is a way to express the inner product of `x` and
`y` in terms of the norms of `x`, `y`, `x + y`, `x - y`.
mathlib commit https://github.com/leanprover-community/mathlib/commit/d608fc5d4e69d4cc21885913fb573a88b0deb521
OfNat
and Nat.cast
lemmas (#11861)
This renames
Int.cast_ofNat
to Int.cast_natCast
Int.int_cast_ofNat
to Int.cast_ofNat
I think the history here is that this lemma was previously about Int.ofNat
, before we globally fixed the simp-normal form to be Nat.cast
.
Since the Int.cast_ofNat
name is repurposed, it can't be deprecated. Int.int_cast_ofNat
is such a wonky name that it was probably never used.
@@ -255,7 +255,7 @@ private theorem nat_prop (r : β) : innerProp' E (r : π) := fun x y => by
private theorem int_prop (n : β€) : innerProp' E (n : π) := by
intro x y
rw [β n.sign_mul_natAbs]
- simp only [Int.cast_ofNat, map_natCast, map_intCast, Int.cast_mul, map_mul, mul_smul]
+ simp only [Int.cast_natCast, map_natCast, map_intCast, Int.cast_mul, map_mul, mul_smul]
obtain hn | rfl | hn := lt_trichotomy n 0
Β· rw [Int.sign_eq_neg_one_of_neg hn, innerProp_neg_one ((n.natAbs : π) β’ x), nat]
simp only [map_neg, neg_mul, one_mul, mul_eq_mul_left_iff, true_or_iff, Int.natAbs_eq_zero,
IsROrC
to RCLike
(#10819)
IsROrC
contains data, which goes against the expectation that classes prefixed with Is
are prop-valued. People have been complaining about this on and off, so this PR renames IsROrC
to RCLike
.
@@ -53,11 +53,11 @@ inner product space, Hilbert space, norm
-/
-open IsROrC
+open RCLike
open scoped ComplexConjugate
-variable {π : Type*} [IsROrC π] (E : Type*) [NormedAddCommGroup E]
+variable {π : Type*} [RCLike π] (E : Type*) [NormedAddCommGroup E]
/-- Predicate for the parallelogram identity to hold in a normed group. This is a scalar-less
version of `InnerProductSpace`. If you have an `InnerProductSpaceable` assumption, you can
@@ -126,11 +126,11 @@ theorem _root_.Continuous.inner_ {f g : β β E} (hf : Continuous f) (hg : Con
theorem inner_.norm_sq (x : E) : βxβ ^ 2 = re (inner_ π x x) := by
simp only [inner_]
- have hβ : IsROrC.normSq (4 : π) = 16 := by
+ have hβ : RCLike.normSq (4 : π) = 16 := by
have : ((4 : β) : π) = (4 : π) := by norm_cast
- rw [β this, normSq_eq_def', IsROrC.norm_of_nonneg (by norm_num : (0 : β) β€ 4)]
+ rw [β this, normSq_eq_def', RCLike.norm_of_nonneg (by norm_num : (0 : β) β€ 4)]
norm_num
- have hβ : βx + xβ = 2 * βxβ := by rw [β two_smul π, norm_smul, IsROrC.norm_two]
+ have hβ : βx + xβ = 2 * βxβ := by rw [β two_smul π, norm_smul, RCLike.norm_two]
simp only [hβ, hβ, algebraMap_eq_ofReal, sub_self, norm_zero, mul_re, inv_re, ofNat_re, map_sub,
map_add, ofReal_re, ofNat_im, ofReal_im, mul_im, I_re, inv_im]
ring
@@ -270,7 +270,7 @@ private theorem int_prop (n : β€) : innerProp' E (n : π) := by
private theorem rat_prop (r : β) : innerProp' E (r : π) := by
intro x y
have : (r.den : π) β 0 := by
- haveI : CharZero π := IsROrC.charZero_isROrC
+ haveI : CharZero π := RCLike.charZero_rclike
exact mod_cast r.pos.ne'
rw [β r.num_div_den, β mul_right_inj' this, β nat r.den _ y, smul_smul, Rat.cast_div]
simp only [map_natCast, Rat.cast_natCast, map_intCast, Rat.cast_intCast, map_divβ]
@@ -283,7 +283,7 @@ private theorem real_prop (r : β) : innerProp' E (r : π) := by
refine' Rat.denseEmbedding_coe_real.dense.equalizer _ _ (funext fun X => _)
Β· exact (continuous_ofReal.smul continuous_const).inner_ continuous_const
Β· exact (continuous_conj.comp continuous_ofReal).mul continuous_const
- Β· simp only [Function.comp_apply, IsROrC.ofReal_ratCast, rat_prop _ _]
+ Β· simp only [Function.comp_apply, RCLike.ofReal_ratCast, rat_prop _ _]
private theorem I_prop : innerProp' E (I : π) := by
by_cases hI : (I : π) = 0
mul
-div
cancellation lemmas (#11530)
Lemma names around cancellation of multiplication and division are a mess.
This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero
lemma name, the Group
lemma, the AddGroup
lemma name).
| Statement | New name | Old name | |
@@ -274,7 +274,7 @@ private theorem rat_prop (r : β) : innerProp' E (r : π) := by
exact mod_cast r.pos.ne'
rw [β r.num_div_den, β mul_right_inj' this, β nat r.den _ y, smul_smul, Rat.cast_div]
simp only [map_natCast, Rat.cast_natCast, map_intCast, Rat.cast_intCast, map_divβ]
- rw [β mul_assoc, mul_div_cancel' _ this, int_prop _ x, map_intCast]
+ rw [β mul_assoc, mul_div_cancelβ _ this, int_prop _ x, map_intCast]
private theorem real_prop (r : β) : innerProp' E (r : π) := by
intro x y
@@ -273,7 +273,7 @@ private theorem rat_prop (r : β) : innerProp' E (r : π) := by
haveI : CharZero π := IsROrC.charZero_isROrC
exact mod_cast r.pos.ne'
rw [β r.num_div_den, β mul_right_inj' this, β nat r.den _ y, smul_smul, Rat.cast_div]
- simp only [map_natCast, Rat.cast_coe_nat, map_intCast, Rat.cast_coe_int, map_divβ]
+ simp only [map_natCast, Rat.cast_natCast, map_intCast, Rat.cast_intCast, map_divβ]
rw [β mul_assoc, mul_div_cancel' _ this, int_prop _ x, map_intCast]
private theorem real_prop (r : β) : innerProp' E (r : π) := by
Empty lines were removed by executing the following Python script twice
import os
import re
# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
for filename in files:
if filename.endswith('.lean'):
file_path = os.path.join(dir_path, filename)
# Open the file and read its contents
with open(file_path, 'r') as file:
content = file.read()
# Use a regular expression to replace sequences of "variable" lines separated by empty lines
# with sequences without empty lines
modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)
# Write the modified content back to the file
with open(file_path, 'w') as file:
file.write(modified_content)
@@ -327,7 +327,6 @@ noncomputable def InnerProductSpace.ofNorm
#align inner_product_space.of_norm InnerProductSpace.ofNorm
variable (E)
-
variable [InnerProductSpaceable E]
/-- **FrΓ©chetβvon NeumannβJordan Theorem**. A normed space `E` whose norm satisfies the
@@ -343,7 +342,6 @@ theorem nonempty_innerProductSpace : Nonempty (InnerProductSpace π E) :=
#align nonempty_inner_product_space nonempty_innerProductSpace
variable {π E}
-
variable [NormedSpace β E]
-- TODO: Replace `InnerProductSpace.toUniformConvexSpace`
exact_mod_cast
tactic with mod_cast
elaborator where possible (#8404)
We still have the exact_mod_cast
tactic, used in a few places, which somehow (?) works a little bit harder to prevent the expected type influencing the elaboration of the term. I would like to get to the bottom of this, and it will be easier once the only usages of exact_mod_cast
are the ones that don't work using the term elaborator by itself.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -271,7 +271,7 @@ private theorem rat_prop (r : β) : innerProp' E (r : π) := by
intro x y
have : (r.den : π) β 0 := by
haveI : CharZero π := IsROrC.charZero_isROrC
- exact_mod_cast r.pos.ne'
+ exact mod_cast r.pos.ne'
rw [β r.num_div_den, β mul_right_inj' this, β nat r.den _ y, smul_smul, Rat.cast_div]
simp only [map_natCast, Rat.cast_coe_nat, map_intCast, Rat.cast_coe_int, map_divβ]
rw [β mul_assoc, mul_div_cancel' _ this, int_prop _ x, map_intCast]
MulZeroClass.
in mul_zero
/zero_mul
(#6682)
Search&replace MulZeroClass.mul_zero
-> mul_zero
, MulZeroClass.zero_mul
-> zero_mul
.
These were introduced by Mathport, as the full name of mul_zero
is actually MulZeroClass.mul_zero
(it's exported with the short name).
@@ -144,7 +144,7 @@ theorem inner_.conj_symm (x y : E) : conj (inner_ π y x) = inner_ π x y :=
simp only [map_sub, map_add, algebraMap_eq_ofReal, β ofReal_mul, conj_ofReal, map_mul, conj_I]
rw [add_comm y x, norm_sub_rev]
by_cases hI : (I : π) = 0
- Β· simp only [hI, neg_zero, MulZeroClass.zero_mul]
+ Β· simp only [hI, neg_zero, zero_mul]
-- Porting note: this replaces `norm_I_of_ne_zero` which does not exist in Lean 4
have : β(I : π)β = 1 := by
rw [β mul_self_inj_of_nonneg (norm_nonneg I) zero_le_one, one_mul, β norm_mul,
@@ -243,8 +243,8 @@ theorem add_left (x y z : E) : inner_ π (x + y) z = inner_ π x z + inner_
theorem nat (n : β) (x y : E) : inner_ π ((n : π) β’ x) y = (n : π) * inner_ π x y := by
induction' n with n ih
- Β· simp only [inner_, Nat.zero_eq, zero_sub, Nat.cast_zero, MulZeroClass.zero_mul,
- eq_self_iff_true, zero_smul, zero_add, MulZeroClass.mul_zero, sub_self, norm_neg, smul_zero]
+ Β· simp only [inner_, Nat.zero_eq, zero_sub, Nat.cast_zero, zero_mul,
+ eq_self_iff_true, zero_smul, zero_add, mul_zero, sub_self, norm_neg, smul_zero]
Β· simp only [Nat.cast_succ, add_smul, one_smul]
rw [add_left, ih, add_mul, one_mul]
#align inner_product_spaceable.nat InnerProductSpaceable.nat
@@ -260,8 +260,8 @@ private theorem int_prop (n : β€) : innerProp' E (n : π) := by
Β· rw [Int.sign_eq_neg_one_of_neg hn, innerProp_neg_one ((n.natAbs : π) β’ x), nat]
simp only [map_neg, neg_mul, one_mul, mul_eq_mul_left_iff, true_or_iff, Int.natAbs_eq_zero,
eq_self_iff_true, Int.cast_one, map_one, neg_inj, Nat.cast_eq_zero, Int.cast_neg]
- Β· simp only [inner_, Int.cast_zero, zero_sub, Nat.cast_zero, MulZeroClass.zero_mul,
- eq_self_iff_true, Int.sign_zero, zero_smul, zero_add, MulZeroClass.mul_zero, smul_zero,
+ Β· simp only [inner_, Int.cast_zero, zero_sub, Nat.cast_zero, zero_mul,
+ eq_self_iff_true, Int.sign_zero, zero_smul, zero_add, mul_zero, smul_zero,
sub_self, norm_neg, Int.natAbs_zero]
Β· rw [Int.sign_eq_one_of_pos hn]
simp only [one_mul, mul_eq_mul_left_iff, true_or_iff, Int.natAbs_eq_zero, eq_self_iff_true,
@@ -219,14 +219,14 @@ private theorem add_left_aux7 (y z : E) :
2 * (β(I : π) β’ y + zβ * β(I : π) β’ y + zβ + βzβ * βzβ) - β(I : π) β’ yβ * β(I : π) β’ yβ := by
apply eq_sub_of_add_eq
have hβ := parallelogram_identity ((I : π) β’ y + z) z
- convert hβ using 4 <;> Β· try simp only [two_smul, smul_add]; abel
+ convert hβ using 4 <;> Β· (try simp only [two_smul, smul_add]); abel
private theorem add_left_aux8 (y z : E) :
β(I : π) β’ y - 2 β’ zβ * β(I : π) β’ y - 2 β’ zβ =
2 * (β(I : π) β’ y - zβ * β(I : π) β’ y - zβ + βzβ * βzβ) - β(I : π) β’ yβ * β(I : π) β’ yβ := by
apply eq_sub_of_add_eq'
have hβ := parallelogram_identity ((I : π) β’ y - z) z
- convert hβ using 4 <;> Β· try simp only [two_smul, smul_add]; abel
+ convert hβ using 4 <;> Β· (try simp only [two_smul, smul_add]); abel
theorem add_left (x y z : E) : inner_ π (x + y) z = inner_ π x z + inner_ π y z := by
simp only [inner_, β mul_add]
@@ -30,7 +30,7 @@ and use the parallelogram identity
$$βx + yβ^2 + βx - yβ^2 = 2 (βxβ^2 + βyβ^2)$$
-to prove it is an inner product, i.e., that it is conjugate-symmetric (`Inner_.conj_symm`) and
+to prove it is an inner product, i.e., that it is conjugate-symmetric (`inner_.conj_symm`) and
linear in the first argument. `add_left` is proved by judicious application of the parallelogram
identity followed by tedious arithmetic. `smul_left` is proved step by step, first noting that
$\langle Ξ» x, y \rangle = Ξ» \langle x, y \rangle$ for $Ξ» β β$, $Ξ» = -1$, hence $Ξ» β β€$ and $Ξ» β β$
@@ -124,7 +124,7 @@ theorem _root_.Continuous.inner_ {f g : β β E} (hf : Continuous f) (hg : Con
continuity
#align inner_product_spaceable.continuous.inner_ Continuous.inner_
-theorem Inner_.norm_sq (x : E) : βxβ ^ 2 = re (inner_ π x x) := by
+theorem inner_.norm_sq (x : E) : βxβ ^ 2 = re (inner_ π x x) := by
simp only [inner_]
have hβ : IsROrC.normSq (4 : π) = 16 := by
have : ((4 : β) : π) = (4 : π) := by norm_cast
@@ -134,9 +134,9 @@ theorem Inner_.norm_sq (x : E) : βxβ ^ 2 = re (inner_ π x x) := by
simp only [hβ, hβ, algebraMap_eq_ofReal, sub_self, norm_zero, mul_re, inv_re, ofNat_re, map_sub,
map_add, ofReal_re, ofNat_im, ofReal_im, mul_im, I_re, inv_im]
ring
-#align inner_product_spaceable.inner_.norm_sq InnerProductSpaceable.Inner_.norm_sq
+#align inner_product_spaceable.inner_.norm_sq InnerProductSpaceable.inner_.norm_sq
-theorem Inner_.conj_symm (x y : E) : conj (inner_ π y x) = inner_ π x y := by
+theorem inner_.conj_symm (x y : E) : conj (inner_ π y x) = inner_ π x y := by
simp only [inner_]
have h4 : conj (4β»ΒΉ : π) = 4β»ΒΉ := by norm_num
rw [map_mul, h4]
@@ -159,7 +159,7 @@ theorem Inner_.conj_symm (x y : E) : conj (inner_ π y x) = inner_ π x y :=
Β· rw [smul_add, smul_smul, I_mul_I_of_nonzero hI, neg_one_smul, β neg_add_eq_sub]
rw [hβ, hβ, β sub_add_eq_add_sub]
simp only [neg_mul, sub_eq_add_neg, neg_neg]
-#align inner_product_spaceable.inner_.conj_symm InnerProductSpaceable.Inner_.conj_symm
+#align inner_product_spaceable.inner_.conj_symm InnerProductSpaceable.inner_.conj_symm
variable [InnerProductSpaceable E]
@@ -320,8 +320,8 @@ noncomputable def InnerProductSpace.ofNorm
InnerProductSpace π E :=
haveI : InnerProductSpaceable E := β¨hβ©
{ inner := inner_ π
- norm_sq_eq_inner := Inner_.norm_sq
- conj_symm := Inner_.conj_symm
+ norm_sq_eq_inner := inner_.norm_sq
+ conj_symm := inner_.conj_symm
add_left := InnerProductSpaceable.add_left
smul_left := fun _ _ _ => innerProp _ _ _ }
#align inner_product_space.of_norm InnerProductSpace.ofNorm
@@ -336,8 +336,8 @@ parallelogram identity can be given a compatible inner product. Do
`InnerProductSpace π E`. -/
theorem nonempty_innerProductSpace : Nonempty (InnerProductSpace π E) :=
β¨{ inner := inner_ π
- norm_sq_eq_inner := Inner_.norm_sq
- conj_symm := Inner_.conj_symm
+ norm_sq_eq_inner := inner_.norm_sq
+ conj_symm := inner_.conj_symm
add_left := add_left
smul_left := fun _ _ _ => innerProp _ _ _ }β©
#align nonempty_inner_product_space nonempty_innerProductSpace
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -57,7 +57,7 @@ open IsROrC
open scoped ComplexConjugate
-variable {π : Type _} [IsROrC π] (E : Type _) [NormedAddCommGroup E]
+variable {π : Type*} [IsROrC π] (E : Type*) [NormedAddCommGroup E]
/-- Predicate for the parallelogram identity to hold in a normed group. This is a scalar-less
version of `InnerProductSpace`. If you have an `InnerProductSpaceable` assumption, you can
@@ -2,15 +2,12 @@
Copyright (c) 2020 Heather Macbeth. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Heather Macbeth
-
-! This file was ported from Lean 3 source module analysis.inner_product_space.of_norm
-! leanprover-community/mathlib commit baa88307f3e699fa7054ef04ec79fa4f056169cb
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Topology.Algebra.Algebra
import Mathlib.Analysis.InnerProductSpace.Basic
+#align_import analysis.inner_product_space.of_norm from "leanprover-community/mathlib"@"baa88307f3e699fa7054ef04ec79fa4f056169cb"
+
/-!
# Inner product space derived from a norm
The unported dependencies are
algebra.order.module
init.core
linear_algebra.free_module.finite.rank
algebra.order.monoid.cancel.defs
algebra.abs
algebra.group_power.lemmas
init.data.list.basic
linear_algebra.free_module.rank
algebra.order.monoid.cancel.basic
init.data.list.default
topology.subset_properties
init.logic
The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file