linear_algebra.quadratic_form.complex
⟷
Mathlib.LinearAlgebra.QuadraticForm.Complex
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)
(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)
(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)
(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)
(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)
(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)
(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
@@ -3,7 +3,7 @@ Copyright (c) 2020 Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen, Kexing Ying, Eric Wieser
-/
-import LinearAlgebra.QuadraticForm.Isometry
+import LinearAlgebra.QuadraticForm.IsometryEquiv
import Analysis.SpecialFunctions.Pow.Complex
#align_import linear_algebra.quadratic_form.complex from "leanprover-community/mathlib"@"c20927220ef87bb4962ba08bf6da2ce3cf50a6dd"
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -81,7 +81,7 @@ noncomputable def isometryEquivSumSquaresUnits [DecidableEq ι] (w : ι → Unit
have hw1 : (fun i => if (w i : ℂ) = 0 then 0 else 1 : ι → ℂ) = 1 := by ext i : 1;
exact dif_neg (w i).NeZero
have := isometry_sum_squares (coe ∘ w)
- rw [hw1] at this
+ rw [hw1] at this
exact this
#align quadratic_form.isometry_sum_squares_units QuadraticForm.isometryEquivSumSquaresUnits
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2020 Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen, Kexing Ying, Eric Wieser
-/
-import Mathbin.LinearAlgebra.QuadraticForm.Isometry
-import Mathbin.Analysis.SpecialFunctions.Pow.Complex
+import LinearAlgebra.QuadraticForm.Isometry
+import Analysis.SpecialFunctions.Pow.Complex
#align_import linear_algebra.quadratic_form.complex from "leanprover-community/mathlib"@"c20927220ef87bb4962ba08bf6da2ce3cf50a6dd"
mathlib commit https://github.com/leanprover-community/mathlib/commit/48a058d7e39a80ed56858505719a0b2197900999
@@ -28,11 +28,11 @@ open Finset
variable {ι : Type _} [Fintype ι]
-#print QuadraticForm.isometrySumSquares /-
+#print QuadraticForm.isometryEquivSumSquares /-
/-- The isometry between a weighted sum of squares on the complex numbers and the
sum of squares, i.e. `weighted_sum_squares` with weights 1 or 0. -/
-noncomputable def isometrySumSquares [DecidableEq ι] (w' : ι → ℂ) :
- Isometry (weightedSumSquares ℂ w')
+noncomputable def isometryEquivSumSquares [DecidableEq ι] (w' : ι → ℂ) :
+ IsometryEquiv (weightedSumSquares ℂ w')
(weightedSumSquares ℂ (fun i => if w' i = 0 then 0 else 1 : ι → ℂ)) :=
by
let w i := if h : w' i = 0 then (1 : Units ℂ) else Units.mk0 (w' i) h
@@ -41,7 +41,7 @@ noncomputable def isometrySumSquares [DecidableEq ι] (w' : ι → ℂ) :
intro i hi
exact (w i).NeZero ((Complex.cpow_eq_zero_iff _ _).1 hi).1
convert
- (weighted_sum_squares ℂ w').isometryBasisRepr
+ (weighted_sum_squares ℂ w').isometryEquivBasisRepr
((Pi.basisFun ℂ ι).units_smul fun i => (isUnit_iff_ne_zero.2 <| hw' i).Unit)
ext1 v
erw [basis_repr_apply, weighted_sum_squares_apply, weighted_sum_squares_apply]
@@ -69,21 +69,21 @@ noncomputable def isometrySumSquares [DecidableEq ι] (w' : ι → ℂ) :
ring
rw [← Complex.cpow_add _ _ (w j).NeZero, show -(1 / 2 : ℂ) + -(1 / 2) = -1 by simp [← two_mul],
Complex.cpow_neg_one, inv_mul_cancel (w j).NeZero, one_mul]
-#align quadratic_form.isometry_sum_squares QuadraticForm.isometrySumSquares
+#align quadratic_form.isometry_sum_squares QuadraticForm.isometryEquivSumSquares
-/
-#print QuadraticForm.isometrySumSquaresUnits /-
+#print QuadraticForm.isometryEquivSumSquaresUnits /-
/-- The isometry between a weighted sum of squares on the complex numbers and the
sum of squares, i.e. `weighted_sum_squares` with weight `λ i : ι, 1`. -/
-noncomputable def isometrySumSquaresUnits [DecidableEq ι] (w : ι → Units ℂ) :
- Isometry (weightedSumSquares ℂ w) (weightedSumSquares ℂ (1 : ι → ℂ)) :=
+noncomputable def isometryEquivSumSquaresUnits [DecidableEq ι] (w : ι → Units ℂ) :
+ IsometryEquiv (weightedSumSquares ℂ w) (weightedSumSquares ℂ (1 : ι → ℂ)) :=
by
have hw1 : (fun i => if (w i : ℂ) = 0 then 0 else 1 : ι → ℂ) = 1 := by ext i : 1;
exact dif_neg (w i).NeZero
have := isometry_sum_squares (coe ∘ w)
rw [hw1] at this
exact this
-#align quadratic_form.isometry_sum_squares_units QuadraticForm.isometrySumSquaresUnits
+#align quadratic_form.isometry_sum_squares_units QuadraticForm.isometryEquivSumSquaresUnits
-/
#print QuadraticForm.equivalent_sum_squares /-
@@ -93,7 +93,7 @@ theorem equivalent_sum_squares {M : Type _} [AddCommGroup M] [Module ℂ M] [Fin
(Q : QuadraticForm ℂ M) (hQ : (associated Q).Nondegenerate) :
Equivalent Q (weightedSumSquares ℂ (1 : Fin (FiniteDimensional.finrank ℂ M) → ℂ)) :=
let ⟨w, ⟨hw₁⟩⟩ := Q.equivalent_weightedSumSquares_units_of_nondegenerate' hQ
- ⟨hw₁.trans (isometrySumSquaresUnits w)⟩
+ ⟨hw₁.trans (isometryEquivSumSquaresUnits w)⟩
#align quadratic_form.equivalent_sum_squares QuadraticForm.equivalent_sum_squares
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2020 Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen, Kexing Ying, Eric Wieser
-
-! This file was ported from Lean 3 source module linear_algebra.quadratic_form.complex
-! leanprover-community/mathlib commit c20927220ef87bb4962ba08bf6da2ce3cf50a6dd
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.LinearAlgebra.QuadraticForm.Isometry
import Mathbin.Analysis.SpecialFunctions.Pow.Complex
+#align_import linear_algebra.quadratic_form.complex from "leanprover-community/mathlib"@"c20927220ef87bb4962ba08bf6da2ce3cf50a6dd"
+
/-!
# Quadratic forms over the complex numbers
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -31,6 +31,7 @@ open Finset
variable {ι : Type _} [Fintype ι]
+#print QuadraticForm.isometrySumSquares /-
/-- The isometry between a weighted sum of squares on the complex numbers and the
sum of squares, i.e. `weighted_sum_squares` with weights 1 or 0. -/
noncomputable def isometrySumSquares [DecidableEq ι] (w' : ι → ℂ) :
@@ -72,7 +73,9 @@ noncomputable def isometrySumSquares [DecidableEq ι] (w' : ι → ℂ) :
rw [← Complex.cpow_add _ _ (w j).NeZero, show -(1 / 2 : ℂ) + -(1 / 2) = -1 by simp [← two_mul],
Complex.cpow_neg_one, inv_mul_cancel (w j).NeZero, one_mul]
#align quadratic_form.isometry_sum_squares QuadraticForm.isometrySumSquares
+-/
+#print QuadraticForm.isometrySumSquaresUnits /-
/-- The isometry between a weighted sum of squares on the complex numbers and the
sum of squares, i.e. `weighted_sum_squares` with weight `λ i : ι, 1`. -/
noncomputable def isometrySumSquaresUnits [DecidableEq ι] (w : ι → Units ℂ) :
@@ -84,7 +87,9 @@ noncomputable def isometrySumSquaresUnits [DecidableEq ι] (w : ι → Units ℂ
rw [hw1] at this
exact this
#align quadratic_form.isometry_sum_squares_units QuadraticForm.isometrySumSquaresUnits
+-/
+#print QuadraticForm.equivalent_sum_squares /-
/-- A nondegenerate quadratic form on the complex numbers is equivalent to
the sum of squares, i.e. `weighted_sum_squares` with weight `λ i : ι, 1`. -/
theorem equivalent_sum_squares {M : Type _} [AddCommGroup M] [Module ℂ M] [FiniteDimensional ℂ M]
@@ -93,13 +98,16 @@ theorem equivalent_sum_squares {M : Type _} [AddCommGroup M] [Module ℂ M] [Fin
let ⟨w, ⟨hw₁⟩⟩ := Q.equivalent_weightedSumSquares_units_of_nondegenerate' hQ
⟨hw₁.trans (isometrySumSquaresUnits w)⟩
#align quadratic_form.equivalent_sum_squares QuadraticForm.equivalent_sum_squares
+-/
+#print QuadraticForm.complex_equivalent /-
/-- All nondegenerate quadratic forms on the complex numbers are equivalent. -/
theorem complex_equivalent {M : Type _} [AddCommGroup M] [Module ℂ M] [FiniteDimensional ℂ M]
(Q₁ Q₂ : QuadraticForm ℂ M) (hQ₁ : (associated Q₁).Nondegenerate)
(hQ₂ : (associated Q₂).Nondegenerate) : Equivalent Q₁ Q₂ :=
(Q₁.equivalent_sum_squares hQ₁).trans (Q₂.equivalent_sum_squares hQ₂).symm
#align quadratic_form.complex_equivalent QuadraticForm.complex_equivalent
+-/
end QuadraticForm
mathlib commit https://github.com/leanprover-community/mathlib/commit/31c24aa72e7b3e5ed97a8412470e904f82b81004
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen, Kexing Ying, Eric Wieser
! This file was ported from Lean 3 source module linear_algebra.quadratic_form.complex
-! leanprover-community/mathlib commit 0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
+! leanprover-community/mathlib commit c20927220ef87bb4962ba08bf6da2ce3cf50a6dd
! 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.SpecialFunctions.Pow.Complex
/-!
# Quadratic forms over the complex numbers
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
`equivalent_sum_squares`: A nondegenerate quadratic form over the complex numbers is equivalent to
a sum of squares.
mathlib commit https://github.com/leanprover-community/mathlib/commit/13361559d66b84f80b6d5a1c4a26aa5054766725
@@ -84,19 +84,19 @@ noncomputable def isometrySumSquaresUnits [DecidableEq ι] (w : ι → Units ℂ
/-- A nondegenerate quadratic form on the complex numbers is equivalent to
the sum of squares, i.e. `weighted_sum_squares` with weight `λ i : ι, 1`. -/
-theorem equivalentSumSquares {M : Type _} [AddCommGroup M] [Module ℂ M] [FiniteDimensional ℂ M]
+theorem equivalent_sum_squares {M : Type _} [AddCommGroup M] [Module ℂ M] [FiniteDimensional ℂ M]
(Q : QuadraticForm ℂ M) (hQ : (associated Q).Nondegenerate) :
Equivalent Q (weightedSumSquares ℂ (1 : Fin (FiniteDimensional.finrank ℂ M) → ℂ)) :=
let ⟨w, ⟨hw₁⟩⟩ := Q.equivalent_weightedSumSquares_units_of_nondegenerate' hQ
⟨hw₁.trans (isometrySumSquaresUnits w)⟩
-#align quadratic_form.equivalent_sum_squares QuadraticForm.equivalentSumSquares
+#align quadratic_form.equivalent_sum_squares QuadraticForm.equivalent_sum_squares
/-- All nondegenerate quadratic forms on the complex numbers are equivalent. -/
-theorem complexEquivalent {M : Type _} [AddCommGroup M] [Module ℂ M] [FiniteDimensional ℂ M]
+theorem complex_equivalent {M : Type _} [AddCommGroup M] [Module ℂ M] [FiniteDimensional ℂ M]
(Q₁ Q₂ : QuadraticForm ℂ M) (hQ₁ : (associated Q₁).Nondegenerate)
(hQ₂ : (associated Q₂).Nondegenerate) : Equivalent Q₁ Q₂ :=
- (Q₁.equivalentSumSquares hQ₁).trans (Q₂.equivalentSumSquares hQ₂).symm
-#align quadratic_form.complex_equivalent QuadraticForm.complexEquivalent
+ (Q₁.equivalent_sum_squares hQ₁).trans (Q₂.equivalent_sum_squares hQ₂).symm
+#align quadratic_form.complex_equivalent QuadraticForm.complex_equivalent
end QuadraticForm
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -39,7 +39,8 @@ noncomputable def isometrySumSquares [DecidableEq ι] (w' : ι → ℂ) :
by
intro i hi
exact (w i).NeZero ((Complex.cpow_eq_zero_iff _ _).1 hi).1
- convert(weighted_sum_squares ℂ w').isometryBasisRepr
+ convert
+ (weighted_sum_squares ℂ w').isometryBasisRepr
((Pi.basisFun ℂ ι).units_smul fun i => (isUnit_iff_ne_zero.2 <| hw' i).Unit)
ext1 v
erw [basis_repr_apply, weighted_sum_squares_apply, weighted_sum_squares_apply]
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -77,7 +77,7 @@ noncomputable def isometrySumSquaresUnits [DecidableEq ι] (w : ι → Units ℂ
have hw1 : (fun i => if (w i : ℂ) = 0 then 0 else 1 : ι → ℂ) = 1 := by ext i : 1;
exact dif_neg (w i).NeZero
have := isometry_sum_squares (coe ∘ w)
- rw [hw1] at this
+ rw [hw1] at this
exact this
#align quadratic_form.isometry_sum_squares_units QuadraticForm.isometrySumSquaresUnits
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -22,7 +22,7 @@ a sum of squares.
namespace QuadraticForm
-open BigOperators
+open scoped BigOperators
open Finset
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -55,8 +55,7 @@ noncomputable def isometrySumSquares [DecidableEq ι] (w' : ι → ℂ) :
rw [Pi.basisFun_apply, LinearMap.stdBasis_apply, Pi.smul_apply, Pi.smul_apply,
Function.update_noteq hij.symm, Pi.zero_apply, smul_eq_mul, smul_eq_mul,
MulZeroClass.mul_zero, MulZeroClass.mul_zero]
- intro hj'
- exact False.elim (hj' hj)
+ intro hj'; exact False.elim (hj' hj)
simp_rw [Basis.unitsSMul_apply]
erw [hsum, smul_eq_mul]
split_ifs
@@ -64,9 +63,7 @@ noncomputable def isometrySumSquares [DecidableEq ι] (w' : ι → ℂ) :
have hww' : w' j = w j := by simp only [w, dif_neg h, Units.val_mk0]
simp only [hww', one_mul]
change v j * v j = ↑(w j) * (v j * ↑(w j) ^ (-(1 / 2 : ℂ)) * (v j * ↑(w j) ^ (-(1 / 2 : ℂ))))
- suffices v j * v j = w j ^ (-(1 / 2 : ℂ)) * w j ^ (-(1 / 2 : ℂ)) * w j * v j * v j
- by
- rw [this]
+ suffices v j * v j = w j ^ (-(1 / 2 : ℂ)) * w j ^ (-(1 / 2 : ℂ)) * w j * v j * v j by rw [this];
ring
rw [← Complex.cpow_add _ _ (w j).NeZero, show -(1 / 2 : ℂ) + -(1 / 2) = -1 by simp [← two_mul],
Complex.cpow_neg_one, inv_mul_cancel (w j).NeZero, one_mul]
@@ -77,9 +74,7 @@ sum of squares, i.e. `weighted_sum_squares` with weight `λ i : ι, 1`. -/
noncomputable def isometrySumSquaresUnits [DecidableEq ι] (w : ι → Units ℂ) :
Isometry (weightedSumSquares ℂ w) (weightedSumSquares ℂ (1 : ι → ℂ)) :=
by
- have hw1 : (fun i => if (w i : ℂ) = 0 then 0 else 1 : ι → ℂ) = 1 :=
- by
- ext i : 1
+ have hw1 : (fun i => if (w i : ℂ) = 0 then 0 else 1 : ι → ℂ) = 1 := by ext i : 1;
exact dif_neg (w i).NeZero
have := isometry_sum_squares (coe ∘ w)
rw [hw1] at this
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -4,12 +4,12 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen, Kexing Ying, Eric Wieser
! This file was ported from Lean 3 source module linear_algebra.quadratic_form.complex
-! leanprover-community/mathlib commit 32b08ef840dd25ca2e47e035c5da03ce16d2dc3c
+! leanprover-community/mathlib commit 0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.LinearAlgebra.QuadraticForm.Isometry
-import Mathbin.Analysis.SpecialFunctions.Pow
+import Mathbin.Analysis.SpecialFunctions.Pow.Complex
/-!
# Quadratic forms over the complex numbers
mathlib commit https://github.com/leanprover-community/mathlib/commit/fa78268d4d77cb2b2fbc89f0527e2e7807763780
@@ -57,7 +57,7 @@ noncomputable def isometrySumSquares [DecidableEq ι] (w' : ι → ℂ) :
MulZeroClass.mul_zero, MulZeroClass.mul_zero]
intro hj'
exact False.elim (hj' hj)
- simp_rw [Basis.unitsSmul_apply]
+ simp_rw [Basis.unitsSMul_apply]
erw [hsum, smul_eq_mul]
split_ifs
· simp only [h, zero_smul, MulZeroClass.zero_mul]
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce7e9d53d4bbc38065db3b595cd5bd73c323bc1d
@@ -39,8 +39,7 @@ noncomputable def isometrySumSquares [DecidableEq ι] (w' : ι → ℂ) :
by
intro i hi
exact (w i).NeZero ((Complex.cpow_eq_zero_iff _ _).1 hi).1
- convert
- (weighted_sum_squares ℂ w').isometryBasisRepr
+ convert(weighted_sum_squares ℂ w').isometryBasisRepr
((Pi.basisFun ℂ ι).units_smul fun i => (isUnit_iff_ne_zero.2 <| hw' i).Unit)
ext1 v
erw [basis_repr_apply, weighted_sum_squares_apply, weighted_sum_squares_apply]
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -54,13 +54,14 @@ noncomputable def isometrySumSquares [DecidableEq ι] (w' : ι → ℂ) :
smul_eq_mul, smul_eq_mul, mul_one]
intro i _ hij
rw [Pi.basisFun_apply, LinearMap.stdBasis_apply, Pi.smul_apply, Pi.smul_apply,
- Function.update_noteq hij.symm, Pi.zero_apply, smul_eq_mul, smul_eq_mul, mul_zero, mul_zero]
+ Function.update_noteq hij.symm, Pi.zero_apply, smul_eq_mul, smul_eq_mul,
+ MulZeroClass.mul_zero, MulZeroClass.mul_zero]
intro hj'
exact False.elim (hj' hj)
simp_rw [Basis.unitsSmul_apply]
erw [hsum, smul_eq_mul]
split_ifs
- · simp only [h, zero_smul, zero_mul]
+ · simp only [h, zero_smul, MulZeroClass.zero_mul]
have hww' : w' j = w j := by simp only [w, dif_neg h, Units.val_mk0]
simp only [hww', one_mul]
change v j * v j = ↑(w j) * (v j * ↑(w j) ^ (-(1 / 2 : ℂ)) * (v j * ↑(w j) ^ (-(1 / 2 : ℂ))))
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -54,7 +54,7 @@ noncomputable def isometryEquivSumSquares (w' : ι → ℂ) :
erw [hsum, smul_eq_mul]
split_ifs with h
· simp only [h, zero_smul, zero_mul]
- have hww' : w' j = w j := by simp only [dif_neg h, Units.val_mk0]
+ have hww' : w' j = w j := by simp only [w, dif_neg h, Units.val_mk0]
simp (config := {zeta := false}) only [one_mul, Units.val_mk0, smul_eq_mul]
rw [hww']
suffices v j * v j = w j ^ (-(1 / 2 : ℂ)) * w j ^ (-(1 / 2 : ℂ)) * w j * v j * v j by
BilinForm
with a scalar valued bi LinearMap
(#10238)
Following on from #10097, which converted the companion of a quadratic form with a bilinear map, this PR replaces a number of results about quadratic forms and bilinear forms with results about quadratic forms and scalar valued bilinear maps. The long term aim is to be able to consider quadratic maps.
The main change is to LinearAlgebra/QuadraticForm/Basic
, but this necessitates changes throughout LinearAlgebra/QuadraticForm/
. Minor changes are also required elsewhere:
LinearAlgebra/CliffordAlgebra/
LinearAlgebra/Matrix/PosDef
LinearAlgebra/SesquilinearForm
Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Christopher Hoskin <christopher.hoskin@overleaf.com>
@@ -73,7 +73,7 @@ noncomputable def isometryEquivSumSquaresUnits (w : ι → Units ℂ) :
/-- A nondegenerate quadratic form on the complex numbers is equivalent to
the sum of squares, i.e. `weightedSumSquares` with weight `fun (i : ι) => 1`. -/
theorem equivalent_sum_squares {M : Type*} [AddCommGroup M] [Module ℂ M] [FiniteDimensional ℂ M]
- (Q : QuadraticForm ℂ M) (hQ : (associated (R := ℂ) Q).Nondegenerate) :
+ (Q : QuadraticForm ℂ M) (hQ : (associated (R := ℂ) Q).SeparatingLeft) :
Equivalent Q (weightedSumSquares ℂ (1 : Fin (FiniteDimensional.finrank ℂ M) → ℂ)) :=
let ⟨w, ⟨hw₁⟩⟩ := Q.equivalent_weightedSumSquares_units_of_nondegenerate' hQ
⟨hw₁.trans (isometryEquivSumSquaresUnits w)⟩
@@ -81,8 +81,8 @@ theorem equivalent_sum_squares {M : Type*} [AddCommGroup M] [Module ℂ M] [Fini
/-- All nondegenerate quadratic forms on the complex numbers are equivalent. -/
theorem complex_equivalent {M : Type*} [AddCommGroup M] [Module ℂ M] [FiniteDimensional ℂ M]
- (Q₁ Q₂ : QuadraticForm ℂ M) (hQ₁ : (associated (R := ℂ) Q₁).Nondegenerate)
- (hQ₂ : (associated (R := ℂ) Q₂).Nondegenerate) : Equivalent Q₁ Q₂ :=
+ (Q₁ Q₂ : QuadraticForm ℂ M) (hQ₁ : (associated (R := ℂ) Q₁).SeparatingLeft)
+ (hQ₂ : (associated (R := ℂ) Q₂).SeparatingLeft) : Equivalent Q₁ Q₂ :=
(Q₁.equivalent_sum_squares hQ₁).trans (Q₂.equivalent_sum_squares hQ₂).symm
#align quadratic_form.complex_equivalent QuadraticForm.complex_equivalent
@@ -27,7 +27,7 @@ variable {ι : Type*} [Fintype ι]
/-- The isometry between a weighted sum of squares on the complex numbers and the
sum of squares, i.e. `weightedSumSquares` with weights 1 or 0. -/
-noncomputable def isometryEquivSumSquares [DecidableEq ι] (w' : ι → ℂ) :
+noncomputable def isometryEquivSumSquares (w' : ι → ℂ) :
IsometryEquiv (weightedSumSquares ℂ w')
(weightedSumSquares ℂ (fun i => if w' i = 0 then 0 else 1 : ι → ℂ)) := by
let w i := if h : w' i = 0 then (1 : Units ℂ) else Units.mk0 (w' i) h
@@ -41,6 +41,7 @@ noncomputable def isometryEquivSumSquares [DecidableEq ι] (w' : ι → ℂ) :
refine' sum_congr rfl fun j hj => _
have hsum : (∑ i : ι, v i • ((isUnit_iff_ne_zero.2 <| hw' i).unit : ℂ) • (Pi.basisFun ℂ ι) i) j =
v j • w j ^ (-(1 / 2 : ℂ)) := by
+ classical
rw [Finset.sum_apply, sum_eq_single j, Pi.basisFun_apply, IsUnit.unit_spec,
LinearMap.stdBasis_apply, Pi.smul_apply, Pi.smul_apply, Function.update_same, smul_eq_mul,
smul_eq_mul, smul_eq_mul, mul_one]
@@ -64,7 +65,7 @@ noncomputable def isometryEquivSumSquares [DecidableEq ι] (w' : ι → ℂ) :
/-- The isometry between a weighted sum of squares on the complex numbers and the
sum of squares, i.e. `weightedSumSquares` with weight `fun (i : ι) => 1`. -/
-noncomputable def isometryEquivSumSquaresUnits [DecidableEq ι] (w : ι → Units ℂ) :
+noncomputable def isometryEquivSumSquaresUnits (w : ι → Units ℂ) :
IsometryEquiv (weightedSumSquares ℂ w) (weightedSumSquares ℂ (1 : ι → ℂ)) := by
simpa using isometryEquivSumSquares ((↑) ∘ w)
#align quadratic_form.isometry_sum_squares_units QuadraticForm.isometryEquivSumSquaresUnits
This incorporates changes from
nightly-testing
are unexciting: we need to fully qualify a few names)They can all be closed when this is merged.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -54,7 +54,7 @@ noncomputable def isometryEquivSumSquares [DecidableEq ι] (w' : ι → ℂ) :
split_ifs with h
· simp only [h, zero_smul, zero_mul]
have hww' : w' j = w j := by simp only [dif_neg h, Units.val_mk0]
- simp only [one_mul, Units.val_mk0, smul_eq_mul]
+ simp (config := {zeta := false}) only [one_mul, Units.val_mk0, smul_eq_mul]
rw [hww']
suffices v j * v j = w j ^ (-(1 / 2 : ℂ)) * w j ^ (-(1 / 2 : ℂ)) * w j * v j * v j by
rw [this]; ring
As discussed on Zulip, this generalization seems nonsensical as currently implemented.
There are sensible ways to make this generalization, but they are much larger refactors, and in the meantime the current generalization is useless anyway.
@@ -72,7 +72,7 @@ noncomputable def isometryEquivSumSquaresUnits [DecidableEq ι] (w : ι → Unit
/-- A nondegenerate quadratic form on the complex numbers is equivalent to
the sum of squares, i.e. `weightedSumSquares` with weight `fun (i : ι) => 1`. -/
theorem equivalent_sum_squares {M : Type*} [AddCommGroup M] [Module ℂ M] [FiniteDimensional ℂ M]
- (Q : QuadraticForm ℂ M) (hQ : (associated (R₁ := ℂ) Q).Nondegenerate) :
+ (Q : QuadraticForm ℂ M) (hQ : (associated (R := ℂ) Q).Nondegenerate) :
Equivalent Q (weightedSumSquares ℂ (1 : Fin (FiniteDimensional.finrank ℂ M) → ℂ)) :=
let ⟨w, ⟨hw₁⟩⟩ := Q.equivalent_weightedSumSquares_units_of_nondegenerate' hQ
⟨hw₁.trans (isometryEquivSumSquaresUnits w)⟩
@@ -80,8 +80,8 @@ theorem equivalent_sum_squares {M : Type*} [AddCommGroup M] [Module ℂ M] [Fini
/-- All nondegenerate quadratic forms on the complex numbers are equivalent. -/
theorem complex_equivalent {M : Type*} [AddCommGroup M] [Module ℂ M] [FiniteDimensional ℂ M]
- (Q₁ Q₂ : QuadraticForm ℂ M) (hQ₁ : (associated (R₁ := ℂ) Q₁).Nondegenerate)
- (hQ₂ : (associated (R₁ := ℂ) Q₂).Nondegenerate) : Equivalent Q₁ Q₂ :=
+ (Q₁ Q₂ : QuadraticForm ℂ M) (hQ₁ : (associated (R := ℂ) Q₁).Nondegenerate)
+ (hQ₂ : (associated (R := ℂ) Q₂).Nondegenerate) : Equivalent Q₁ Q₂ :=
(Q₁.equivalent_sum_squares hQ₁).trans (Q₂.equivalent_sum_squares hQ₂).symm
#align quadratic_form.complex_equivalent QuadraticForm.complex_equivalent
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).
@@ -47,12 +47,12 @@ noncomputable def isometryEquivSumSquares [DecidableEq ι] (w' : ι → ℂ) :
intro i _ hij
rw [Pi.basisFun_apply, LinearMap.stdBasis_apply, Pi.smul_apply, Pi.smul_apply,
Function.update_noteq hij.symm, Pi.zero_apply, smul_eq_mul, smul_eq_mul,
- MulZeroClass.mul_zero, MulZeroClass.mul_zero]
+ mul_zero, mul_zero]
intro hj'; exact False.elim (hj' hj)
simp_rw [Basis.unitsSMul_apply]
erw [hsum, smul_eq_mul]
split_ifs with h
- · simp only [h, zero_smul, MulZeroClass.zero_mul]
+ · simp only [h, zero_smul, zero_mul]
have hww' : w' j = w j := by simp only [dif_neg h, Units.val_mk0]
simp only [one_mul, Units.val_mk0, smul_eq_mul]
rw [hww']
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -23,7 +23,7 @@ open scoped BigOperators
open Finset
-variable {ι : Type _} [Fintype ι]
+variable {ι : Type*} [Fintype ι]
/-- The isometry between a weighted sum of squares on the complex numbers and the
sum of squares, i.e. `weightedSumSquares` with weights 1 or 0. -/
@@ -71,7 +71,7 @@ noncomputable def isometryEquivSumSquaresUnits [DecidableEq ι] (w : ι → Unit
/-- A nondegenerate quadratic form on the complex numbers is equivalent to
the sum of squares, i.e. `weightedSumSquares` with weight `fun (i : ι) => 1`. -/
-theorem equivalent_sum_squares {M : Type _} [AddCommGroup M] [Module ℂ M] [FiniteDimensional ℂ M]
+theorem equivalent_sum_squares {M : Type*} [AddCommGroup M] [Module ℂ M] [FiniteDimensional ℂ M]
(Q : QuadraticForm ℂ M) (hQ : (associated (R₁ := ℂ) Q).Nondegenerate) :
Equivalent Q (weightedSumSquares ℂ (1 : Fin (FiniteDimensional.finrank ℂ M) → ℂ)) :=
let ⟨w, ⟨hw₁⟩⟩ := Q.equivalent_weightedSumSquares_units_of_nondegenerate' hQ
@@ -79,7 +79,7 @@ theorem equivalent_sum_squares {M : Type _} [AddCommGroup M] [Module ℂ M] [Fin
#align quadratic_form.equivalent_sum_squares QuadraticForm.equivalent_sum_squares
/-- All nondegenerate quadratic forms on the complex numbers are equivalent. -/
-theorem complex_equivalent {M : Type _} [AddCommGroup M] [Module ℂ M] [FiniteDimensional ℂ M]
+theorem complex_equivalent {M : Type*} [AddCommGroup M] [Module ℂ M] [FiniteDimensional ℂ M]
(Q₁ Q₂ : QuadraticForm ℂ M) (hQ₁ : (associated (R₁ := ℂ) Q₁).Nondegenerate)
(hQ₂ : (associated (R₁ := ℂ) Q₂).Nondegenerate) : Equivalent Q₁ Q₂ :=
(Q₁.equivalent_sum_squares hQ₁).trans (Q₂.equivalent_sum_squares hQ₂).symm
Isometry
to IsometryEquiv
(#6305)
This is consistent with LinearIsometryEquiv
vs LinearIsometry
. The motivation is to make room for QuadraticForm.Isometry
as the homomorphism.
@@ -3,7 +3,7 @@ Copyright (c) 2020 Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen, Kexing Ying, Eric Wieser
-/
-import Mathlib.LinearAlgebra.QuadraticForm.Isometry
+import Mathlib.LinearAlgebra.QuadraticForm.IsometryEquiv
import Mathlib.Analysis.SpecialFunctions.Pow.Complex
#align_import linear_algebra.quadratic_form.complex from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
@@ -27,14 +27,14 @@ variable {ι : Type _} [Fintype ι]
/-- The isometry between a weighted sum of squares on the complex numbers and the
sum of squares, i.e. `weightedSumSquares` with weights 1 or 0. -/
-noncomputable def isometrySumSquares [DecidableEq ι] (w' : ι → ℂ) :
- Isometry (weightedSumSquares ℂ w')
+noncomputable def isometryEquivSumSquares [DecidableEq ι] (w' : ι → ℂ) :
+ IsometryEquiv (weightedSumSquares ℂ w')
(weightedSumSquares ℂ (fun i => if w' i = 0 then 0 else 1 : ι → ℂ)) := by
let w i := if h : w' i = 0 then (1 : Units ℂ) else Units.mk0 (w' i) h
have hw' : ∀ i : ι, (w i : ℂ) ^ (-(1 / 2 : ℂ)) ≠ 0 := by
intro i hi
exact (w i).ne_zero ((Complex.cpow_eq_zero_iff _ _).1 hi).1
- convert (weightedSumSquares ℂ w').isometryBasisRepr
+ convert (weightedSumSquares ℂ w').isometryEquivBasisRepr
((Pi.basisFun ℂ ι).unitsSMul fun i => (isUnit_iff_ne_zero.2 <| hw' i).unit)
ext1 v
erw [basisRepr_apply, weightedSumSquares_apply, weightedSumSquares_apply]
@@ -60,14 +60,14 @@ noncomputable def isometrySumSquares [DecidableEq ι] (w' : ι → ℂ) :
rw [this]; ring
rw [← Complex.cpow_add _ _ (w j).ne_zero, show -(1 / 2 : ℂ) + -(1 / 2) = -1 by simp [← two_mul],
Complex.cpow_neg_one, inv_mul_cancel (w j).ne_zero, one_mul]
-#align quadratic_form.isometry_sum_squares QuadraticForm.isometrySumSquares
+#align quadratic_form.isometry_sum_squares QuadraticForm.isometryEquivSumSquares
/-- The isometry between a weighted sum of squares on the complex numbers and the
sum of squares, i.e. `weightedSumSquares` with weight `fun (i : ι) => 1`. -/
-noncomputable def isometrySumSquaresUnits [DecidableEq ι] (w : ι → Units ℂ) :
- Isometry (weightedSumSquares ℂ w) (weightedSumSquares ℂ (1 : ι → ℂ)) := by
- simpa using isometrySumSquares ((↑) ∘ w)
-#align quadratic_form.isometry_sum_squares_units QuadraticForm.isometrySumSquaresUnits
+noncomputable def isometryEquivSumSquaresUnits [DecidableEq ι] (w : ι → Units ℂ) :
+ IsometryEquiv (weightedSumSquares ℂ w) (weightedSumSquares ℂ (1 : ι → ℂ)) := by
+ simpa using isometryEquivSumSquares ((↑) ∘ w)
+#align quadratic_form.isometry_sum_squares_units QuadraticForm.isometryEquivSumSquaresUnits
/-- A nondegenerate quadratic form on the complex numbers is equivalent to
the sum of squares, i.e. `weightedSumSquares` with weight `fun (i : ι) => 1`. -/
@@ -75,7 +75,7 @@ theorem equivalent_sum_squares {M : Type _} [AddCommGroup M] [Module ℂ M] [Fin
(Q : QuadraticForm ℂ M) (hQ : (associated (R₁ := ℂ) Q).Nondegenerate) :
Equivalent Q (weightedSumSquares ℂ (1 : Fin (FiniteDimensional.finrank ℂ M) → ℂ)) :=
let ⟨w, ⟨hw₁⟩⟩ := Q.equivalent_weightedSumSquares_units_of_nondegenerate' hQ
- ⟨hw₁.trans (isometrySumSquaresUnits w)⟩
+ ⟨hw₁.trans (isometryEquivSumSquaresUnits w)⟩
#align quadratic_form.equivalent_sum_squares QuadraticForm.equivalent_sum_squares
/-- All nondegenerate quadratic forms on the complex numbers are equivalent. -/
@@ -2,15 +2,12 @@
Copyright (c) 2020 Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen, Kexing Ying, Eric Wieser
-
-! This file was ported from Lean 3 source module linear_algebra.quadratic_form.complex
-! leanprover-community/mathlib commit 0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.LinearAlgebra.QuadraticForm.Isometry
import Mathlib.Analysis.SpecialFunctions.Pow.Complex
+#align_import linear_algebra.quadratic_form.complex from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
+
/-!
# Quadratic forms over the complex numbers
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