File: Mathlib/LinearAlgebra/QuadraticForm/Real.lean

full_name: QuadraticForm.isometryEquivSignWeightedSumSquares
code: /-- The isometry between a weighted sum of squares with weights `u` on the
(non-zero) real numbers and the weighted sum of squares with weights `sign ∘ u`. -/
noncomputable def isometryEquivSignWeightedSumSquares (w : ι → ℝ) :
    IsometryEquiv (weightedSumSquares ℝ w)
      (weightedSumSquares ℝ (fun i ↦ (sign (w i) : ℝ))) 
goal: (QuadraticMap.weightedSumSquares ℝ w).IsometryEquiv (QuadraticMap.weightedSumSquares ℝ fun i => ↑(SignType.sign (w i)))

full_name: QuadraticForm.equivalent_sign_ne_zero_weighted_sum_squared
code: /-- **Sylvester's law of inertia**: A nondegenerate real quadratic form is equivalent to a weighted
sum of squares with the weights being ±1, `SignType` version. -/
theorem equivalent_sign_ne_zero_weighted_sum_squared {M : Type*} [AddCommGroup M] [Module ℝ M]
    [FiniteDimensional ℝ M] (Q : QuadraticForm ℝ M) (hQ : (associated (R := ℝ) Q).SeparatingLeft) :
    ∃ w : Fin (FiniteDimensional.finrank ℝ M) → SignType,
      (∀ i, w i ≠ 0) ∧ Equivalent Q (weightedSumSquares ℝ fun i ↦ (w i : ℝ)) 
goal: ∃ w,
  (∀ (i : Fin (FiniteDimensional.finrank ℝ M)), w i ≠ 0) ∧
    QuadraticMap.Equivalent Q (QuadraticMap.weightedSumSquares ℝ fun i => ↑(w i))

full_name: QuadraticForm.equivalent_one_neg_one_weighted_sum_squared
code: /-- **Sylvester's law of inertia**: A nondegenerate real quadratic form is equivalent to a weighted
sum of squares with the weights being ±1. -/
theorem equivalent_one_neg_one_weighted_sum_squared {M : Type*} [AddCommGroup M] [Module ℝ M]
    [FiniteDimensional ℝ M] (Q : QuadraticForm ℝ M) (hQ : (associated (R := ℝ) Q).SeparatingLeft) :
    ∃ w : Fin (FiniteDimensional.finrank ℝ M) → ℝ,
      (∀ i, w i = -1 ∨ w i = 1) ∧ Equivalent Q (weightedSumSquares ℝ w) 
goal: ∃ w,
  (∀ (i : Fin (FiniteDimensional.finrank ℝ M)), w i = -1 ∨ w i = 1) ∧
    QuadraticMap.Equivalent Q (QuadraticMap.weightedSumSquares ℝ w)

full_name: QuadraticForm.equivalent_signType_weighted_sum_squared
code: /-- **Sylvester's law of inertia**: A real quadratic form is equivalent to a weighted
sum of squares with the weights being ±1 or 0, `SignType` version. -/
theorem equivalent_signType_weighted_sum_squared {M : Type*} [AddCommGroup M] [Module ℝ M]
    [FiniteDimensional ℝ M] (Q : QuadraticForm ℝ M) :
    ∃ w : Fin (FiniteDimensional.finrank ℝ M) → SignType,
      Equivalent Q (weightedSumSquares ℝ fun i ↦ (w i : ℝ)) 
goal: ∃ w, QuadraticMap.Equivalent Q (QuadraticMap.weightedSumSquares ℝ fun i => ↑(w i))

full_name: QuadraticForm.equivalent_one_zero_neg_one_weighted_sum_squared
code: /-- **Sylvester's law of inertia**: A real quadratic form is equivalent to a weighted
sum of squares with the weights being ±1 or 0. -/
theorem equivalent_one_zero_neg_one_weighted_sum_squared {M : Type*} [AddCommGroup M] [Module ℝ M]
    [FiniteDimensional ℝ M] (Q : QuadraticForm ℝ M) :
    ∃ w : Fin (FiniteDimensional.finrank ℝ M) → ℝ,
      (∀ i, w i = -1 ∨ w i = 0 ∨ w i = 1) ∧ Equivalent Q (weightedSumSquares ℝ w) 
goal: ∃ w,
  (∀ (i : Fin (FiniteDimensional.finrank ℝ M)), w i = -1 ∨ w i = 0 ∨ w i = 1) ∧
    QuadraticMap.Equivalent Q (QuadraticMap.weightedSumSquares ℝ w)