Theorem (det_cauchyMatrix).Cauchy's determinant. For families \mathbf{x}, \mathbf{y} indexed by \{0, \dots, n - 1\} with \mathbf{x}_i + \mathbf{y}_j \ne 0 for all i, j, the Cauchy matrix \mathbf{C} has \det \mathbf{C} = \frac{\prod_{i < j} (\mathbf{x}_j - \mathbf{x}_i)(\mathbf{y}_j - \mathbf{y}_i)} {\prod_{i, j} (\mathbf{x}_i + \mathbf{y}_j)}\,. [HornJohnson2013, §0.9.12].
Headline (provisional)
Lean statement and details
NLAlib.det_cauchyMatrix.{u_1} {K : Type u_1} [Field K] {n : ℕ} (x y : Fin n → K)
(h : ∀ (i j : Fin n), x i + y j ≠ 0) :
(cauchyMatrix x y).det = (∏ i, ∏ j > i, (x j - x i) * (y j - y i)) / ∏ i, ∏ j, (x i + y j)
Theorem (det_cauchyMatrix_eq_vandermonde).Cauchy's determinant on finite labels. For field-valued families \mathbf{x},\mathbf{y} on the same finite index type, assume \mathbf{x}_i + \mathbf{y}_j \ne 0 for every pair. Order both families by the same enumeration and let \mathbf{V}_{\mathbf{x}},\mathbf{V}_{\mathbf{y}} be their Vandermonde matrices in this order. The determinant of the Cauchy matrix \mathbf{C} is \det \mathbf{C} = \frac{\det \mathbf{V}_{\mathbf{x}}\,\det \mathbf{V}_{\mathbf{y}}} {\prod_{i,j}(\mathbf{x}_i + \mathbf{y}_j)}\,. The formula includes repeated parameters and the empty index type. [HornJohnson2013, §0.9.12], with arbitrary finite labels. Adapted from tchen-research/NLAlib at 77514ce42a0e437d837797a063ac161f41022730.
General form: sizes are index types
Lean statement and details
NLAlib.det_cauchyMatrix_eq_vandermonde.{u_1, u_4} {K : Type u_1} [Field K] {n : Type u_4}
[Fintype n] [DecidableEq n] (e : n ≃ Fin (Fintype.card n)) (x y : n → K)
(h : ∀ (i j : n), x i + y j ≠ 0) :
(cauchyMatrix x y).det =
(vandermonde (x ∘ ⇑e.symm)).det * (vandermonde (y ∘ ⇑e.symm)).det / ∏ i, ∏ j, (x i + y j)
General form: sizes are index types. A size is carried by a finite index type: |k| is the number of elements of the index type k, and "k nonempty" means k ≥ 1.