Documentation

CslibFrontier.Computability.Circuit.Frontier.TensorNetwork.PacketEntry

Entries of the child networks #

The child networks of an active call of the contraction algorithm of [OAI26k] are kept implicit: a packet vertex has up to 2 L ports, so its table would have 2 ^ (2 L) entries. The source evaluates an entry by expanding the product of the at most L affine row factors of the packet, enumerating the choices of a local term or a mode in each factor, keeping those with the required exponents, and multiplying by the powers of the substituted modes (§D.4.6, p. 63). This file gives that evaluation as an explicit formula on the data of the packet and proves that it is the entry of the child network of TensorNetwork.cauchyModeSplitting.

Coefficient extraction along a list (TensorNetwork.listCoeff). For a list of factors, each a function T : Option M → R (the local term at none and the coefficient of the mode Z at some Z), and exponents γ on the modes of a finite set F, the coefficient of ∏ Z ^ γ Z in ∏ (T none + ∑ Z ∈ F, T (some Z) Z) is computed recursively: the first factor contributes its local term, or one of the modes still needed. This is the coefficient of a block (TensorNetwork.ModeSplitting.blockCoeff_eq_listCoeff) for any mode splitting, with the rows of the block in any order.

Packet entries (TensorNetwork.packetEntry). For the Cauchy modes of an active node, the entry of the packet vertex of the child of group g at the packet q depends only on:

The local form of a row is a sum of kernel values over the column ports set to one (TensorNetwork.packetLocalForm), a mode coefficient is the geometric expansion term (D.12) (TensorNetwork.packetModeCoeff), and a mode value is a sum of powers j ^ b over the column ports of its tile set to one (TensorNetwork.packetModeValue). The main result (TensorNetwork.packetTensor_cauchyModeSplitting, and for the child itself TensorNetwork.child_tensor_inr_cauchyModeSplitting) is that this formula is the packet tensor. A retained vertex keeps its tensor (TensorNetwork.ModeSplitting.child_tensor_inl).

The formula commutes with ring homomorphisms (TensorNetwork.map_packetEntry) when 2 is nilpotent, so an evaluation in one coefficient ring, such as the coefficient lists of (ℤ / 2 ^ p)[U] / (f), gives the entry in every ring it maps to, such as the quotients of the recursion.

This file also supplies the field lemmas of TensorNetwork.cauchyModeSplitting beyond its sides, groups and packets (TensorNetwork.cauchyModeSplitting_localPart, TensorNetwork.cauchyModeSplitting_coeff, TensorNetwork.cauchyModeSplitting_form and the mode packets, sources and targets), through import all, since the definition is not exposed.

Main definitions #

Main results #

References #

The remaining fields of the Cauchy mode splitting #

@[simp]
theorem Cslib.Circuits.Frontier.TensorNetwork.cauchyModeSplitting_localPart {R : Type u_1} {V : Type u_2} {E : Type u_3} {G : Type u_4} {P : Type u_5} [CommRing R] [DecidableEq G] [DecidableEq P] {N : TensorNetwork R Bool V E} {group : V → G} {packet : E → P} {slot : E → ℕ} {sym : P → G × G} {i : ℕ} (side : V → Bool) (hsrc : ∀ (e : E), side (N.src e) = true) (htgt : ∀ (e : E), side (N.tgt e) = false) (horient : ∀ (e : E), (group (N.src e), group (N.tgt e)) = if (slot e).testBit i = true then (sym (packet e)).swap else sym (packet e)) {a : ℕ} (hslot : ∀ (e : E), slot e < 2 ^ a) (hia : i < a) (κ : ↥(Rat.padicValuation 2).integer →+* R) (ζ : R) {p : ℕ} (hp : 2 ^ p = 0) {t : ℤ} (ht : t ∈ cauchyGrid (2 ^ a)) (hti : 2 ^ i ∣ t) (hti' : ¬2 ^ (i + 1) ∣ t) [Fintype P] :
(cauchyModeSplitting side hsrc htgt horient hslot hia κ ζ hp ht hti hti').localPart = fun (e e' : E) => if group (N.tgt e') = group (N.src e) then cauchyValueMatrix κ ζ a t packet slot e e' else 0

The local part of the Cauchy mode splitting: the Cauchy matrix between ports of the same group.

@[simp]
theorem Cslib.Circuits.Frontier.TensorNetwork.cauchyModeSplitting_modePacket {R : Type u_1} {V : Type u_2} {E : Type u_3} {G : Type u_4} {P : Type u_5} [CommRing R] [DecidableEq G] [DecidableEq P] {N : TensorNetwork R Bool V E} {group : V → G} {packet : E → P} {slot : E → ℕ} {sym : P → G × G} {i : ℕ} (side : V → Bool) (hsrc : ∀ (e : E), side (N.src e) = true) (htgt : ∀ (e : E), side (N.tgt e) = false) (horient : ∀ (e : E), (group (N.src e), group (N.tgt e)) = if (slot e).testBit i = true then (sym (packet e)).swap else sym (packet e)) {a : ℕ} (hslot : ∀ (e : E), slot e < 2 ^ a) (hia : i < a) (κ : ↥(Rat.padicValuation 2).integer →+* R) (ζ : R) {p : ℕ} (hp : 2 ^ p = 0) {t : ℤ} (ht : t ∈ cauchyGrid (2 ^ a)) (hti : 2 ^ i ∣ t) (hti' : ¬2 ^ (i + 1) ∣ t) [Fintype P] :
(cauchyModeSplitting side hsrc htgt horient hslot hia κ ζ hp ht hti hti').modePacket = Prod.fst

The packet of the mode (q, y₀, b) is q.

@[simp]
theorem Cslib.Circuits.Frontier.TensorNetwork.cauchyModeSplitting_source {R : Type u_1} {V : Type u_2} {E : Type u_3} {G : Type u_4} {P : Type u_5} [CommRing R] [DecidableEq G] [DecidableEq P] {N : TensorNetwork R Bool V E} {group : V → G} {packet : E → P} {slot : E → ℕ} {sym : P → G × G} {i : ℕ} (side : V → Bool) (hsrc : ∀ (e : E), side (N.src e) = true) (htgt : ∀ (e : E), side (N.tgt e) = false) (horient : ∀ (e : E), (group (N.src e), group (N.tgt e)) = if (slot e).testBit i = true then (sym (packet e)).swap else sym (packet e)) {a : ℕ} (hslot : ∀ (e : E), slot e < 2 ^ a) (hia : i < a) (κ : ↥(Rat.padicValuation 2).integer →+* R) (ζ : R) {p : ℕ} (hp : 2 ^ p = 0) {t : ℤ} (ht : t ∈ cauchyGrid (2 ^ a)) (hti : 2 ^ i ∣ t) (hti' : ¬2 ^ (i + 1) ∣ t) [Fintype P] :
(cauchyModeSplitting side hsrc htgt horient hslot hia κ ζ hp ht hti hti').source = fun (Z : P × Fin (2 ^ (i + 1)) × Fin p) => if (↑Z.2.1).testBit i = true then (sym Z.1).1 else (sym Z.1).2

The source group of the mode (q, y₀, b): the group of the columns of its tile.

@[simp]
theorem Cslib.Circuits.Frontier.TensorNetwork.cauchyModeSplitting_target {R : Type u_1} {V : Type u_2} {E : Type u_3} {G : Type u_4} {P : Type u_5} [CommRing R] [DecidableEq G] [DecidableEq P] {N : TensorNetwork R Bool V E} {group : V → G} {packet : E → P} {slot : E → ℕ} {sym : P → G × G} {i : ℕ} (side : V → Bool) (hsrc : ∀ (e : E), side (N.src e) = true) (htgt : ∀ (e : E), side (N.tgt e) = false) (horient : ∀ (e : E), (group (N.src e), group (N.tgt e)) = if (slot e).testBit i = true then (sym (packet e)).swap else sym (packet e)) {a : ℕ} (hslot : ∀ (e : E), slot e < 2 ^ a) (hia : i < a) (κ : ↥(Rat.padicValuation 2).integer →+* R) (ζ : R) {p : ℕ} (hp : 2 ^ p = 0) {t : ℤ} (ht : t ∈ cauchyGrid (2 ^ a)) (hti : 2 ^ i ∣ t) (hti' : ¬2 ^ (i + 1) ∣ t) [Fintype P] :
(cauchyModeSplitting side hsrc htgt horient hslot hia κ ζ hp ht hti hti').target = fun (Z : P × Fin (2 ^ (i + 1)) × Fin p) => if (↑Z.2.1).testBit i = true then (sym Z.1).2 else (sym Z.1).1

The target group of the mode (q, y₀, b): the other group of its packet.

@[simp]
theorem Cslib.Circuits.Frontier.TensorNetwork.cauchyModeSplitting_coeff {R : Type u_1} {V : Type u_2} {E : Type u_3} {G : Type u_4} {P : Type u_5} [CommRing R] [DecidableEq G] [DecidableEq P] {N : TensorNetwork R Bool V E} {group : V → G} {packet : E → P} {slot : E → ℕ} {sym : P → G × G} {i : ℕ} (side : V → Bool) (hsrc : ∀ (e : E), side (N.src e) = true) (htgt : ∀ (e : E), side (N.tgt e) = false) (horient : ∀ (e : E), (group (N.src e), group (N.tgt e)) = if (slot e).testBit i = true then (sym (packet e)).swap else sym (packet e)) {a : ℕ} (hslot : ∀ (e : E), slot e < 2 ^ a) (hia : i < a) (κ : ↥(Rat.padicValuation 2).integer →+* R) (ζ : R) {p : ℕ} (hp : 2 ^ p = 0) {t : ℤ} (ht : t ∈ cauchyGrid (2 ^ a)) (hti : 2 ^ i ∣ t) (hti' : ¬2 ^ (i + 1) ∣ t) [Fintype P] :
(cauchyModeSplitting side hsrc htgt horient hslot hia κ ζ hp ht hti hti').coeff = cauchyModeCoeff κ ζ a i t packet slot sym

The mode coefficients are cauchyModeCoeff.

@[simp]
theorem Cslib.Circuits.Frontier.TensorNetwork.cauchyModeSplitting_form {R : Type u_1} {V : Type u_2} {E : Type u_3} {G : Type u_4} {P : Type u_5} [CommRing R] [DecidableEq G] [DecidableEq P] {N : TensorNetwork R Bool V E} {group : V → G} {packet : E → P} {slot : E → ℕ} {sym : P → G × G} {i : ℕ} (side : V → Bool) (hsrc : ∀ (e : E), side (N.src e) = true) (htgt : ∀ (e : E), side (N.tgt e) = false) (horient : ∀ (e : E), (group (N.src e), group (N.tgt e)) = if (slot e).testBit i = true then (sym (packet e)).swap else sym (packet e)) {a : ℕ} (hslot : ∀ (e : E), slot e < 2 ^ a) (hia : i < a) (κ : ↥(Rat.padicValuation 2).integer →+* R) (ζ : R) {p : ℕ} (hp : 2 ^ p = 0) {t : ℤ} (ht : t ∈ cauchyGrid (2 ^ a)) (hti : 2 ^ i ∣ t) (hti' : ¬2 ^ (i + 1) ∣ t) [Fintype P] :
(cauchyModeSplitting side hsrc htgt horient hslot hia κ ζ hp ht hti hti').form = cauchyModeForm R i packet slot sym

The mode forms are cauchyModeForm.

Coefficient extraction along a list #

def Cslib.Circuits.Frontier.TensorNetwork.listCoeff {R : Type u_1} {M : Type u_2} [CommRing R] [DecidableEq M] (F : Finset M) :
List (Option M → R) → (M → ℕ) → R

Coefficient extraction along a list of factors. Each factor is a function T : Option M → R, standing for T none + ∑ Z ∈ F, T (some Z) Z. The value at the exponents γ is the coefficient of ∏ Z ∈ F, Z ^ γ Z in the product of the factors: the first factor contributes its local term T none, or the coefficient of a mode Z with γ Z ≠ 0, lowering γ Z by one, and the empty product has the coefficient 1 at zero exponents.

@[simp]
theorem Cslib.Circuits.Frontier.TensorNetwork.listCoeff_nil {R : Type u_1} {M : Type u_2} [CommRing R] [DecidableEq M] (F : Finset M) (γ : M → ℕ) :
listCoeff F [] γ = if ∀ Z ∈ F, γ Z = 0 then 1 else 0
theorem Cslib.Circuits.Frontier.TensorNetwork.listCoeff_cons {R : Type u_1} {M : Type u_2} [CommRing R] [DecidableEq M] (F : Finset M) (T : Option M → R) (ts : List (Option M → R)) (γ : M → ℕ) :
listCoeff F (T :: ts) γ = T none * listCoeff F ts γ + ∑ Z ∈ F, if γ Z = 0 then 0 else T (some Z) * listCoeff F ts (Function.update γ Z (γ Z - 1))
theorem Cslib.Circuits.Frontier.TensorNetwork.sum_eq_listCoeff {R : Type u_1} {M : Type u_2} [CommRing R] [DecidableEq M] [Fintype M] (F : Finset M) (n : ℕ) (T : Fin n → Option M → R) (γ : M → ℕ) :
(∑ φ : Fin n → Option M, if (∀ (j : Fin n) (Z : M), φ j = some Z → Z ∈ F) ∧ ∀ Z ∈ F, {j : Fin n | φ j = some Z}.card = γ Z then ∏ j : Fin n, T j (φ j) else 0) = listCoeff F (List.ofFn T) γ

The recursion sums over all choices. For factors T j indexed by Fin n, the sum over the ways φ to pick in each factor its local term or a mode of F, each mode Z picked γ Z times, of the product of the picked terms is listCoeff.

theorem Cslib.Circuits.Frontier.TensorNetwork.listCoeff_map {R : Type u_1} {M : Type u_2} [CommRing R] [DecidableEq M] {M' : Type u_3} [DecidableEq M'] (f : M' ↪ M) (F : Finset M') (ts : List (Option M → R)) (γ : M → ℕ) :
listCoeff (Finset.map f F) ts γ = listCoeff F (List.map (fun (T : Option M → R) => T ∘ Option.map ⇑f) ts) (γ ∘ ⇑f)

listCoeff along the image of an injective map of modes.

Block coefficients by the recursion #

theorem Cslib.Circuits.Frontier.TensorNetwork.ModeSplitting.blockCoeff_eq_listCoeff {R : Type u_1} {V : Type u_2} {E : Type u_3} {G : Type u_4} {P : Type u_5} {M : Type u_6} [CommRing R] [Fintype M] {N : TensorNetwork R Bool V E} {W : Matrix E E R} (S : N.ModeSplitting W G P M) [Fintype E] [DecidableEq E] [DecidableEq P] [DecidableEq G] [DecidableEq M] (k : P × G) (β : M → ℕ) (Y X : E → Bool) {l : List E} (hl : l.Nodup) (hmem : ∀ (e : E), e ∈ l ↔ S.rowBlock e = k) :
S.blockCoeff k β Y X = listCoeff {Z : M | S.targetBlock Z = k} (List.map (fun (e : E) => S.choiceTerm Y X e) l) β

Block coefficients by the recursion. For a list l of the row ports of the block k, without repetition and in any order, the coefficient of a mode monomial in the product of the affine factors of the block is listCoeff along the terms of the rows of l.

theorem Cslib.Circuits.Frontier.TensorNetwork.ModeSplitting.child_tensor_inl {R : Type u_1} {V : Type u_2} {E : Type u_3} {G : Type u_4} {P : Type u_5} {M : Type u_6} [CommRing R] [Fintype M] {N : TensorNetwork R Bool V E} {W : Matrix E E R} (S : N.ModeSplitting W G P M) [Fintype E] [DecidableEq E] [DecidableEq P] [DecidableEq G] [DecidableEq M] [DecidableEq V] (β : M → ℕ) (g : G) (v : { v : V // S.group v = g }) (y : { e : E // S.group (N.src e) = g } ⊕ { e : E // S.group (N.tgt e) = g } → Bool) :
(S.child β g).tensor (Sum.inl v) y = if S.side ↑v = true then N.tensor ↑v fun (e : E) => if h : N.src e = ↑v then y (Sum.inl ⟨e, ⋯⟩) else false else N.tensor ↑v fun (e : E) => if h : N.tgt e = ↑v then y (Sum.inr ⟨e, ⋯⟩) else false

A retained vertex of a child keeps its tensor, reading the row bits on its edges when it is a row and the column bits when it is a column.

theorem Cslib.Circuits.Frontier.TensorNetwork.ModeSplitting.child_tensor_inr {R : Type u_1} {V : Type u_2} {E : Type u_3} {G : Type u_4} {P : Type u_5} {M : Type u_6} [CommRing R] [Fintype M] {N : TensorNetwork R Bool V E} {W : Matrix E E R} (S : N.ModeSplitting W G P M) [Fintype E] [DecidableEq E] [DecidableEq P] [DecidableEq G] [DecidableEq M] [DecidableEq V] (β : M → ℕ) (g : G) (q : P) (y : { e : E // S.group (N.src e) = g } ⊕ { e : E // S.group (N.tgt e) = g } → Bool) :
(S.child β g).tensor (Sum.inr q) y = S.packetTensor β q g (fun (e : E) => if h : S.group (N.src e) = g then y (Sum.inl ⟨e, h⟩) else false) fun (e : E) => if h : S.group (N.tgt e) = g then y (Sum.inr ⟨e, h⟩) else false

A packet vertex of a child has the packet tensor at the bits of its ports.

Packet entries #

noncomputable def Cslib.Circuits.Frontier.TensorNetwork.packetLocalForm {R : Type u_1} [CommRing R] (κ : ↥(Rat.padicValuation 2).integer →+* R) (ζ : R) (a : ℕ) (t : ℤ) (cols : List (ℕ × Bool)) (x : ℕ) :
R

The local form of a row port in slot x of a packet: the sum of the kernel values W_{y - x}(T) over its column ports (y, X_y) set to one.

noncomputable def Cslib.Circuits.Frontier.TensorNetwork.packetModeCoeff {R : Type u_1} [CommRing R] (κ : ↥(Rat.padicValuation 2).integer →+* R) (ζ : R) (a i : ℕ) (t : ℤ) (differ : Bool) {p : ℕ} (x : ℕ) (Z : Fin (2 ^ (i + 1)) × Fin p) :
R

The coefficient of the mode (y₀, b) of a packet in the form of a row port in slot x: when the two symbols of the packet differ and digit i of x is that of y₀, the term W_{y₀ - x}(T) ρ ^ b of the geometric expansion (D.12); otherwise zero.

def Cslib.Circuits.Frontier.TensorNetwork.packetModeValue (R : Type u_1) [CommRing R] (i : ℕ) (differ : Bool) {p : ℕ} (cols : List (ℕ × Bool)) (Z : Fin (2 ^ (i + 1)) × Fin p) :
R

The value L_Z(X) of the mode Z = (y₀, b) of a packet on its column ports: when the two symbols of the packet differ, the sum of j ^ b over the column ports in slots y = y₀ + 2 ^ (i + 1) j set to one.

noncomputable def Cslib.Circuits.Frontier.TensorNetwork.packetRowTerm {R : Type u_1} [CommRing R] (κ : ↥(Rat.padicValuation 2).integer →+* R) (ζ : R) (a i : ℕ) (t : ℤ) (differ : Bool) {p : ℕ} (cols : List (ℕ × Bool)) (r : ℕ × Bool) :
Option (Fin (2 ^ (i + 1)) × Fin p) → R

The terms of the affine factor of a row port (x, Y_x) of a packet: its local term at none, and the coefficient of the mode Z at some Z.

Whether the modes of the tile y₀ of a packet target the group g, given whether the two symbols of the packet are g: the target is the second symbol when digit i of y₀ is 1.

Whether the modes of the tile y₀ of a packet have the source g: the source is the first symbol when digit i of y₀ is 1.

noncomputable def Cslib.Circuits.Frontier.TensorNetwork.packetEntry {R : Type u_1} [CommRing R] (κ : ↥(Rat.padicValuation 2).integer →+* R) (ζ : R) (a i : ℕ) (t : ℤ) {p : ℕ} (e₁ e₂ differ : Bool) (β : Fin (2 ^ (i + 1)) × Fin p → ℕ) (rows cols : List (ℕ × Bool)) :
R

The entry of a packet vertex of a child (§D.4.6, p. 63). The packet has row ports rows and column ports cols, each a slot and a bit; e₁ and e₂ say whether the two symbols of the packet are the group of the child, and differ whether they differ; β gives the exponents of the modes (y₀, b) of the packet. The entry is the coefficient, at the exponents of the modes targeting the group, of the product of the affine row factors, times the powers of the values of the modes with the group as source.

Packet entries under ring homomorphisms #

theorem Cslib.Circuits.Frontier.TensorNetwork.map_kernelValue {R : Type u_1} {S : Type u_2} [CommRing R] [CommRing S] (ψ : R →+* S) (κ : ↥(Rat.padicValuation 2).integer →+* R) (ζ : R) (a : ℕ) (t d : ℤ) :
ψ (kernelValue κ ζ a t d) = kernelValue (ψ.comp κ) (ψ ζ) a t d

Kernel values commute with ring homomorphisms.

theorem Cslib.Circuits.Frontier.TensorNetwork.map_crossRatio {R : Type u_1} {S : Type u_2} [CommRing R] [CommRing S] (ψ : R →+* S) {n : ℕ} (hn : 2 ^ n = 0) {a i : ℕ} (hia : i ≤ a) {t d₀ : ℤ} (hcross : ¬2 ^ (i + 1) ∣ t - d₀) (ζ : R) :
ψ (crossRatio a i t d₀ ζ) = crossRatio a i t d₀ (ψ ζ)

Cross ratios commute with ring homomorphisms when 2 is nilpotent and 2 ^ (i + 1) ∤ t - d₀ with i ≤ a, so that the inverted element is a unit.

theorem Cslib.Circuits.Frontier.TensorNetwork.map_packetModeCoeff {R : Type u_1} {S : Type u_2} [CommRing R] [CommRing S] (ψ : R →+* S) {n : ℕ} (hn : 2 ^ n = 0) (κ : ↥(Rat.padicValuation 2).integer →+* R) (ζ : R) {a i : ℕ} (hia : i ≤ a) {t : ℤ} (hti : 2 ^ i ∣ t) (hti' : ¬2 ^ (i + 1) ∣ t) (differ : Bool) {p : ℕ} (x : ℕ) (Z : Fin (2 ^ (i + 1)) × Fin p) :
ψ (packetModeCoeff κ ζ a i t differ x Z) = packetModeCoeff (ψ.comp κ) (ψ ζ) a i t differ x Z

Mode coefficients commute with ring homomorphisms when 2 is nilpotent, at a grid point t of valuation i ≤ a.

theorem Cslib.Circuits.Frontier.TensorNetwork.map_packetLocalForm {R : Type u_1} {S : Type u_2} [CommRing R] [CommRing S] (ψ : R →+* S) (κ : ↥(Rat.padicValuation 2).integer →+* R) (ζ : R) (a : ℕ) (t : ℤ) (cols : List (ℕ × Bool)) (x : ℕ) :
ψ (packetLocalForm κ ζ a t cols x) = packetLocalForm (ψ.comp κ) (ψ ζ) a t cols x

Local forms commute with ring homomorphisms.

theorem Cslib.Circuits.Frontier.TensorNetwork.map_packetModeValue {R : Type u_1} {S : Type u_2} [CommRing R] [CommRing S] (ψ : R →+* S) (i : ℕ) (differ : Bool) {p : ℕ} (cols : List (ℕ × Bool)) (Z : Fin (2 ^ (i + 1)) × Fin p) :
ψ (packetModeValue R i differ cols Z) = packetModeValue S i differ cols Z

Mode values commute with ring homomorphisms.

theorem Cslib.Circuits.Frontier.TensorNetwork.map_listCoeff {R : Type u_1} {S : Type u_2} [CommRing R] [CommRing S] {M : Type u_3} [DecidableEq M] (ψ : R →+* S) (F : Finset M) (ts : List (Option M → R)) (γ : M → ℕ) :
ψ (listCoeff F ts γ) = listCoeff F (List.map (fun (T : Option M → R) => ⇑ψ ∘ T) ts) γ

listCoeff commutes with ring homomorphisms.

theorem Cslib.Circuits.Frontier.TensorNetwork.map_packetEntry {R : Type u_1} {S : Type u_2} [CommRing R] [CommRing S] (ψ : R →+* S) {n : ℕ} (hn : 2 ^ n = 0) (κ : ↥(Rat.padicValuation 2).integer →+* R) (ζ : R) {a i : ℕ} (hia : i ≤ a) {t : ℤ} (hti : 2 ^ i ∣ t) (hti' : ¬2 ^ (i + 1) ∣ t) {p : ℕ} (e₁ e₂ differ : Bool) (β : Fin (2 ^ (i + 1)) × Fin p → ℕ) (rows cols : List (ℕ × Bool)) :
ψ (packetEntry κ ζ a i t e₁ e₂ differ β rows cols) = packetEntry (ψ.comp κ) (ψ ζ) a i t e₁ e₂ differ β rows cols

Packet entries commute with ring homomorphisms when 2 is nilpotent, at a grid point t of valuation i ≤ a. So a packet entry evaluated in one coefficient ring gives the entry in every ring it maps to.

The packet entries of the Cauchy children #

theorem Cslib.Circuits.Frontier.TensorNetwork.packetTensor_cauchyModeSplitting {R : Type u_1} {V : Type u_2} {E : Type u_3} {G : Type u_4} {P : Type u_5} [CommRing R] [Fintype E] [DecidableEq E] [Fintype P] [DecidableEq G] [DecidableEq P] {N : TensorNetwork R Bool V E} {group : V → G} {packet : E → P} {slot : E → ℕ} {sym : P → G × G} {i : ℕ} (side : V → Bool) (hsrc : ∀ (e : E), side (N.src e) = true) (htgt : ∀ (e : E), side (N.tgt e) = false) (horient : ∀ (e : E), (group (N.src e), group (N.tgt e)) = if (slot e).testBit i = true then (sym (packet e)).swap else sym (packet e)) {a : ℕ} (hslot : ∀ (e : E), slot e < 2 ^ a) (hia : i < a) (κ : ↥(Rat.padicValuation 2).integer →+* R) (ζ : R) {p : ℕ} (hp : 2 ^ p = 0) {t : ℤ} (ht : t ∈ cauchyGrid (2 ^ a)) (hti : 2 ^ i ∣ t) (hti' : ¬2 ^ (i + 1) ∣ t) (β : P × Fin (2 ^ (i + 1)) × Fin p → ℕ) (q : P) (g : G) (Y X : E → Bool) {rows cols : List E} (hrows : rows.Nodup) (hrows' : ∀ (e : E), e ∈ rows ↔ packet e = q ∧ group (N.src e) = g) (hcols : cols.Nodup) (hcols' : ∀ (e : E), e ∈ cols ↔ packet e = q ∧ group (N.tgt e) = g) :
(cauchyModeSplitting side hsrc htgt horient hslot hia κ ζ hp ht hti hti').packetTensor β q g Y X = packetEntry κ ζ a i t (decide ((sym q).1 = g)) (decide ((sym q).2 = g)) (decide ((sym q).1 ≠ (sym q).2)) (fun (Z : Fin (2 ^ (i + 1)) × Fin p) => β (q, Z)) (List.map (fun (e : E) => (slot e, Y e)) rows) (List.map (fun (e : E) => (slot e, X e)) cols)

The packet tensors of the Cauchy children. For lists rows and cols of the row and column ports of the packet q in the group g, without repetition and in any order, the packet tensor of cauchyModeSplitting is packetEntry at their slots and bits.

theorem Cslib.Circuits.Frontier.TensorNetwork.child_tensor_inr_cauchyModeSplitting {R : Type u_1} {V : Type u_2} {E : Type u_3} {G : Type u_4} {P : Type u_5} [CommRing R] [Fintype E] [DecidableEq E] [Fintype P] [DecidableEq G] [DecidableEq P] {N : TensorNetwork R Bool V E} {group : V → G} {packet : E → P} {slot : E → ℕ} {sym : P → G × G} {i : ℕ} (side : V → Bool) (hsrc : ∀ (e : E), side (N.src e) = true) (htgt : ∀ (e : E), side (N.tgt e) = false) (horient : ∀ (e : E), (group (N.src e), group (N.tgt e)) = if (slot e).testBit i = true then (sym (packet e)).swap else sym (packet e)) {a : ℕ} (hslot : ∀ (e : E), slot e < 2 ^ a) (hia : i < a) (κ : ↥(Rat.padicValuation 2).integer →+* R) (ζ : R) {p : ℕ} (hp : 2 ^ p = 0) {t : ℤ} (ht : t ∈ cauchyGrid (2 ^ a)) (hti : 2 ^ i ∣ t) (hti' : ¬2 ^ (i + 1) ∣ t) [DecidableEq V] (β : P × Fin (2 ^ (i + 1)) × Fin p → ℕ) (g : G) (q : P) (y : { e : E // (cauchyModeSplitting side hsrc htgt horient hslot hia κ ζ hp ht hti hti').group (N.src e) = g } ⊕ { e : E // (cauchyModeSplitting side hsrc htgt horient hslot hia κ ζ hp ht hti hti').group (N.tgt e) = g } → Bool) {rows cols : List E} (hrows : rows.Nodup) (hrows' : ∀ (e : E), e ∈ rows ↔ packet e = q ∧ group (N.src e) = g) (hcols : cols.Nodup) (hcols' : ∀ (e : E), e ∈ cols ↔ packet e = q ∧ group (N.tgt e) = g) :
((cauchyModeSplitting side hsrc htgt horient hslot hia κ ζ hp ht hti hti').child β g).tensor (Sum.inr q) y = packetEntry κ ζ a i t (decide ((sym q).1 = g)) (decide ((sym q).2 = g)) (decide ((sym q).1 ≠ (sym q).2)) (fun (Z : Fin (2 ^ (i + 1)) × Fin p) => β (q, Z)) (List.map (fun (e : E) => (slot e, if h : (cauchyModeSplitting side hsrc htgt horient hslot hia κ ζ hp ht hti hti').group (N.src e) = g then y (Sum.inl ⟨e, h⟩) else false)) rows) (List.map (fun (e : E) => (slot e, if h : (cauchyModeSplitting side hsrc htgt horient hslot hia κ ζ hp ht hti hti').group (N.tgt e) = g then y (Sum.inr ⟨e, h⟩) else false)) cols)

The packet entries of the Cauchy children (§D.4.6, p. 63): the entry of the packet vertex q of the child of group g at the bits y on its ports is packetEntry at the slots and bits of its row ports and column ports, listed without repetition and in any order.