File: Mathlib/LinearAlgebra/Vandermonde.lean

full_name: Matrix.vandermonde
code: /-- `vandermonde v` is the square matrix with `i`th row equal to `1, v i, v i ^ 2, v i ^ 3, ...`.
-/
def vandermonde {n : ℕ} (v : Fin n → R) : Matrix (Fin n) (Fin n) R 
goal: Matrix (Fin n) (Fin n) R

full_name: Matrix.vandermonde_apply
code: @[simp]
theorem vandermonde_apply {n : ℕ} (v : Fin n → R) (i j) : vandermonde v i j = v i ^ (j : ℕ) 
goal: Matrix.vandermonde v i j = v i ^ ↑j

full_name: Matrix.vandermonde_cons
code: @[simp]
theorem vandermonde_cons {n : ℕ} (v0 : R) (v : Fin n → R) :
    vandermonde (Fin.cons v0 v : Fin n.succ → R) =
      Fin.cons (fun (j : Fin n.succ) => v0 ^ (j : ℕ)) fun i => Fin.cons 1
      fun j => v i * vandermonde v i j 
goal: Matrix.vandermonde (Fin.cons v0 v) =
  Fin.cons (fun j => v0 ^ ↑j) fun i => Fin.cons 1 fun j => v i * Matrix.vandermonde v i j

full_name: Matrix.vandermonde_succ
code: theorem vandermonde_succ {n : ℕ} (v : Fin n.succ → R) :
    vandermonde v =
      Fin.cons (fun (j : Fin n.succ) => v 0 ^ (j : ℕ)) fun i =>
        Fin.cons 1 fun j => v i.succ * vandermonde (Fin.tail v) i j 
goal: Matrix.vandermonde v =
  Fin.cons (fun j => v 0 ^ ↑j) fun i => Fin.cons 1 fun j => v i.succ * Matrix.vandermonde (Fin.tail v) i j

full_name: Matrix.vandermonde_mul_vandermonde_transpose
code: theorem vandermonde_mul_vandermonde_transpose {n : ℕ} (v w : Fin n → R) (i j) :
    (vandermonde v * (vandermonde w)ᵀ) i j = ∑ k : Fin n, (v i * w j) ^ (k : ℕ) 
goal: (Matrix.vandermonde v * (Matrix.vandermonde w)ᵀ) i j = ∑ k : Fin n, (v i * w j) ^ ↑k

full_name: Matrix.vandermonde_transpose_mul_vandermonde
code: theorem vandermonde_transpose_mul_vandermonde {n : ℕ} (v : Fin n → R) (i j) :
    ((vandermonde v)ᵀ * vandermonde v) i j = ∑ k : Fin n, v k ^ (i + j : ℕ) 
goal: ((Matrix.vandermonde v)ᵀ * Matrix.vandermonde v) i j = ∑ k : Fin n, v k ^ (↑i + ↑j)

full_name: Matrix.det_vandermonde
code: theorem det_vandermonde {n : ℕ} (v : Fin n → R) :
    det (vandermonde v) = ∏ i : Fin n, ∏ j ∈ Ioi i, (v j - v i) 
goal: (Matrix.vandermonde v).det = ∏ i : Fin n, ∏ j ∈ Finset.Ioi i, (v j - v i)

full_name: Matrix.det_vandermonde_eq_zero_iff
code: theorem det_vandermonde_eq_zero_iff [IsDomain R] {n : ℕ} {v : Fin n → R} :
    det (vandermonde v) = 0 ↔ ∃ i j : Fin n, v i = v j ∧ i ≠ j 
goal: (Matrix.vandermonde v).det = 0 ↔ ∃ i j, v i = v j ∧ i ≠ j

full_name: Matrix.det_vandermonde_ne_zero_iff
code: theorem det_vandermonde_ne_zero_iff [IsDomain R] {n : ℕ} {v : Fin n → R} :
    det (vandermonde v) ≠ 0 ↔ Function.Injective v 
goal: (Matrix.vandermonde v).det ≠ 0 ↔ Function.Injective v

full_name: Matrix.det_vandermonde_add
code: @[simp]
theorem det_vandermonde_add {n : ℕ} (v : Fin n → R) (a : R) :
    (Matrix.vandermonde fun i ↦ v i + a).det = (Matrix.vandermonde v).det 
goal: (Matrix.vandermonde fun i => v i + a).det = (Matrix.vandermonde v).det

full_name: Matrix.det_vandermonde_sub
code: @[simp]
theorem det_vandermonde_sub {n : ℕ} (v : Fin n → R) (a : R) :
    (Matrix.vandermonde fun i ↦ v i - a).det = (Matrix.vandermonde v).det 
goal: (Matrix.vandermonde fun i => v i - a).det = (Matrix.vandermonde v).det

full_name: Matrix.eq_zero_of_forall_index_sum_pow_mul_eq_zero
code: theorem eq_zero_of_forall_index_sum_pow_mul_eq_zero {R : Type*} [CommRing R] [IsDomain R] {n : ℕ}
    {f v : Fin n → R} (hf : Function.Injective f)
    (hfv : ∀ j, (∑ i : Fin n, f j ^ (i : ℕ) * v i) = 0) : v = 0 
goal: v = 0

full_name: Matrix.eq_zero_of_forall_index_sum_mul_pow_eq_zero
code: theorem eq_zero_of_forall_index_sum_mul_pow_eq_zero {R : Type*} [CommRing R] [IsDomain R] {n : ℕ}
    {f v : Fin n → R} (hf : Function.Injective f) (hfv : ∀ j, (∑ i, v i * f j ^ (i : ℕ)) = 0) :
    v = 0 
goal: v = 0

full_name: Matrix.eq_zero_of_forall_pow_sum_mul_pow_eq_zero
code: theorem eq_zero_of_forall_pow_sum_mul_pow_eq_zero {R : Type*} [CommRing R] [IsDomain R] {n : ℕ}
    {f v : Fin n → R} (hf : Function.Injective f)
    (hfv : ∀ i : Fin n, (∑ j : Fin n, v j * f j ^ (i : ℕ)) = 0) : v = 0 
goal: v = 0

full_name: Matrix.eval_matrixOfPolynomials_eq_vandermonde_mul_matrixOfPolynomials
code: theorem eval_matrixOfPolynomials_eq_vandermonde_mul_matrixOfPolynomials {n : ℕ}
    (v : Fin n → R) (p : Fin n → R[X]) (h_deg : ∀ i, (p i).natDegree ≤ i) :
    Matrix.of (fun i j => ((p j).eval (v i))) =
    (Matrix.vandermonde v) * (Matrix.of (fun (i j : Fin n) => (p j).coeff i)) 
goal: (Matrix.of fun i j => Polynomial.eval (v i) (p j)) = Matrix.vandermonde v * Matrix.of fun i j => (p j).coeff ↑i

full_name: Matrix.det_eval_matrixOfPolynomials_eq_det_vandermonde
code: theorem det_eval_matrixOfPolynomials_eq_det_vandermonde {n : ℕ} (v : Fin n → R) (p : Fin n → R[X])
    (h_deg : ∀ i, (p i).natDegree = i) (h_monic : ∀ i, Monic <| p i) :
    (Matrix.vandermonde v).det = (Matrix.of (fun i j => ((p j).eval (v i)))).det 
goal: (Matrix.vandermonde v).det = (Matrix.of fun i j => Polynomial.eval (v i) (p j)).det