Tensor-network contraction
- Integer-valued factored tensor networks
- Contraction of factored tensor networks
- Bounds for contraction of factored tensor networks
- Equivalent presentations of finite tensor networks
- Tensor-instance alphabet padding
- Finite rectangular-grid tensor evaluation
- Finite row networks for grid tensors
- Bounds for finite grid row networks
- Transposition of finite grid tensor evaluations
- State padding preserves tensor-network values
TheoremGrid value expanded over kernel choices#✓fully proved
TensorNetwork.gridValue_eq_sum_choices
If every active rectangle kernel is a finite sum, the grid value is the sum over one kernel
choice for each active rectangle. Raw rectangle indices outside gridRectangles retain the
original kernel, which does not affect gridValue.
theorem gridValue_eq_sum_choices [Fintype ρ] [LinearOrder ρ]
[Fintype γ] [LinearOrder γ] [DecidableEq A]
{κ : {ω // ω ∈ gridRectangles ρ γ} → Type*}
(labels diagonalLabels : Finset A) (R : Instance (ρ × γ) A)
(G : ((ρ × ρ) × (γ × γ)) → A → A → A → A → ℤ)
(choices : (ω : {ω // ω ∈ gridRectangles ρ γ}) → Finset (κ ω))
(K : (ω : {ω // ω ∈ gridRectangles ρ γ}) → κ ω → A → A → A → A → ℤ)
(hG : ∀ (ω : {ω // ω ∈ gridRectangles ρ γ}) x y u v,
G ω x y u v = ∑ k ∈ choices ω, K ω k x y u v) :
gridValue labels diagonalLabels R G =
∑ choice ∈ Fintype.piFinset choices,
gridValue labels diagonalLabels R fun ω =>
if hω : ω ∈ gridRectangles ρ γ then K ⟨ω, hω⟩ (choice ⟨ω, hω⟩) else G ω
def gridRectangles (ρ γ : Type*) [Fintype ρ] [LinearOrder ρ]
[Fintype γ] [LinearOrder γ] : Finset ((ρ × ρ) × (γ × γ)) :=
orderedPairs ρ ×ˢ orderedPairs γ
MathlibExt/Combinatorics/TensorNetwork/Grid.lean:41
abbrev Instance (J A : Type*) := J → (J → A) → ℤ
MathlibExt/Combinatorics/TensorNetwork/Basic.lean:67
def gridValue [Fintype ρ] [LinearOrder ρ] [Fintype γ] [LinearOrder γ]
[DecidableEq A] (labels diagonalLabels : Finset A) (R : Instance (ρ × γ) A)
(G : ((ρ × ρ) × (γ × γ)) → A → A → A → A → ℤ) : ℤ :=
∑ ℓ ∈ gridLabelings labels diagonalLabels,
(∏ w, R w (ℓ w)) *
((∏ a, ∏ q ∈ orderedPairs γ,
if ℓ (a, q.1) (a, q.2) = ℓ (a, q.2) (a, q.1) then 1 else 0) *
(∏ i, ∏ p ∈ orderedPairs ρ,
if ℓ (p.1, i) (p.2, i) = ℓ (p.2, i) (p.1, i) then 1 else 0) *
∏ ω ∈ gridRectangles ρ γ, rectangleApply (G ω) ℓ ω)
MathlibExt/Combinatorics/TensorNetwork/Grid.lean:89
TheoremEntry bound for a converted tensor instance#✓fully proved
TensorNetwork.Factored.abs_toInstance_le
A converted tensor entry is a sum of at most 2 ^ P terms, each containing one weight and
Fintype.card J - 1 off-diagonal factors.
theorem abs_toInstance_le [Fintype J] [LinearOrder J] [DecidableEq A]
(N : Factored J σ τ) (D : J → J → Finset A) (dec : J → J → A → τ)
{P B : ℕ} (h : N.Sized P B) (a : J) (theta : J → A) :
|N.toInstance D dec a theta| ≤ 2 ^ (P + B * Fintype.card J)
structure Factored (J σ τ : Type*) where
/-- The finite set of states allowed at each vertex. -/
S : J → Finset σ
/-- The integer weight of a state at a vertex. -/
W : J → σ → ℤ
/-- The finite label set stored in increasing vertex order. -/
Θ : J → J → Finset τ
/-- The factor contributed on one vertex's side of an edge label. -/
f : J → J → σ → τ → ℤ
/-- The directed capacity table; the bare structure does not require symmetry. -/
c : J → J → ℕ
MathlibExt/Combinatorics/TensorNetwork/Basic.lean:84
2 fully proved
Loading dependency explorer…
The dependency explorer needs JavaScript and its graph data.