Tensor resultant , Newton traces, and tensor differential operators
DefinitionHararySachs_Hyper_TensorPhiFix integers and , and put . Let be a commutative ring and let be an arbitrary (not necessarily symmetric) tensor whose entries are indexed by a row and an ordered tuple .
- The system.
zcoordis the -th form of the system ,
a form of degree in whose coefficients are polynomials in .
2. The rescaled characteristic polynomial. phiPoly is
obtained by substituting the coefficients of these forms into a resultant res of forms of degree in variables.
3. Newton traces. For a polynomial , newtonTr is the sequence with and
When it is the unique sequence with for all , that is, .
4. Tensor differential operators. On polynomials in an auxiliary matrix of indeterminates , tfhat is the operator
and tapplyAll applies for .
5. The power tensor. vTensor is the tensor with entries in . Its system is .
These definitions extend the platform's coord, charPoly, fhat and applyAll from hypergraph adjacency tensors to arbitrary tensors. For the adjacency tensor of a hypergraph, tfhat and tapplyAll coincide definitionally with fhat and applyAll. They are used to state the Morozov–Shakirov identity for arbitrary tensors. This includes the power tensor of a matrix , where the identity reduces to .
Formalization Note A tensor is a function Fin n → (Fin (k - 1) → Fin n) → R. The indeterminate is MvPolynomial.X (i, j) in AuxPoly n. newtonTr is defined by well-founded recursion for every polynomial; the characterization above holds when .
import Mathlib
import Definitions.Def_HararySachs_Hyper_CharPoly
import Definitions.Def_HararySachs_Hyper_Operators
namespace HararySachs.Hyper
/-- The `j`-th equation `x_j^{k-1} - z · Σ_t A j t · x_{t 0} ⋯ x_{t (k-2)}` of the system
`x^{[k-1]} - z · A x^{k-1}`, for an arbitrary (not necessarily symmetric) tensor `A`
with entries in a commutative ring `R`; the coefficients are polynomials in `z`. -/
noncomputable def zcoord {R : Type*} [CommRing R] {n k : ℕ}
(A : Fin n → (Fin (k - 1) → Fin n) → R) (j : Fin n) :
MvPolynomial (Fin n) (Polynomial R) :=
MvPolynomial.monomial (Finsupp.single j (k - 1)) 1 -
∑ t : Fin (k - 1) → Fin n,
MvPolynomial.monomial
((Finset.univ : Finset (Fin (k - 1))).sum (fun a => Finsupp.single (t a) 1))
(Polynomial.C (A j t) * Polynomial.X)
/-- `Φ_A(z) = Res(x^{[k-1]} - z · A x^{k-1})`, a polynomial in `z`. -/
noncomputable def phiPoly {R : Type*} [CommRing R] {n k : ℕ}
(A : Fin n → (Fin (k - 1) → Fin n) → R)
(res : MvPolynomial (ResVar n (fun _ => k - 1)) ℤ) : Polynomial R :=
MvPolynomial.aeval (fun v : ResVar n (fun _ => k - 1) =>
MvPolynomial.coeff v.2.1 (zcoord (k := k) A v.1))
(MvPolynomial.map (Int.castRingHom (Polynomial R)) res)
/-- The Newton traces of a polynomial `Φ` with `Φ(0) = 1`: the unique sequence with
`d · Φ_d = - Σ_{j=1}^{d} τ_j · Φ_{d-j}` for `d ≥ 1` (so `log Φ = - Σ τ_d z^d / d`). -/
noncomputable def newtonTr {R : Type*} [CommRing R] (Φ : Polynomial R) : ℕ → R
| 0 => 0
| d + 1 => -(((d + 1 : ℕ) : R) * Φ.coeff (d + 1)) -
∑ j : Fin (d + 1), newtonTr Φ j * Φ.coeff (d + 1 - j)
decreasing_by all_goals (simp_wf; exact Nat.lt_succ_iff.mp j.isLt)
/-- The differential operator `f_i(∂/∂V_{i,·})` attached to row `i` of a tensor `A`
(the tensor version of `fhat`). -/
noncomputable def tfhat {n k : ℕ} (A : Fin n → (Fin (k - 1) → Fin n) → ℚ)
(i : Fin n) (p : AuxPoly n) : AuxPoly n :=
∑ t : Fin (k - 1) → Fin n,
A i t • (List.ofFn t).foldr (fun j q => MvPolynomial.pderiv (i, j) q) p
/-- `∏_i f_i(∂)^{a_i}` (the tensor version of `applyAll`). -/
noncomputable def tapplyAll {n k d : ℕ} (A : Fin n → (Fin (k - 1) → Fin n) → ℚ)
(a : Fin n → Fin (d + 1)) (p : AuxPoly n) : AuxPoly n :=
(List.ofFn (fun i : Fin n => i)).foldl
(fun q i => ((tfhat (k := k) A i)^[(a i).val]) q) p
/-- The tensor of the system `x_i^{k-1} = ((V x)_i)^{k-1}`, with entries in the
polynomial ring in the matrix entries `V_{ij}`. -/
noncomputable def vTensor (n k : ℕ) : Fin n → (Fin (k - 1) → Fin n) → AuxPoly n :=
fun i t => ∏ s, MvPolynomial.X (i, t s)
end HararySachs.Hyper