Documentation

CslibFrontier.Computability.Circuit.Frontier.TensorNetwork.NativeChild

The native child networks of an active call #

An active call of the contraction recursion of [OAI26k] (§D.4.5–§D.4.7, pp. 62–64) on a network of vertex descriptors evaluates, for each node t, each interpolation value ζ, each exponent tuple β and each group g, the child network of group g. This file builds that child natively as a network of descriptors (NativeChild.nativeChild), from the parent, the native packing of its edges (Cslib.PacketPacking.nativePacking) and (t, ζ, β, g), and proves that it has the contraction of the child of the mode splitting at the node (TensorNetwork.callSplitting).

The child. Its vertices are numbered as in ChildNumbering.childVertexEquiv and its edges as in ChildNumbering.childEdgeEquiv:

The modes of the node are listed packet-major (NativeChild.modeList): the mode (q, y, b) is at q · 2 ^ (i + 1) · p_t + y · p_t + b, so the dense exponents of packet q are a slice of β, and β stands for the mode tuple BudgetTuples.ofList (modeList …) β.

Correctness (NativeChild.contraction_nativeChild). Over O = ℤ_(2)[U] / (f) the parent is the network DescribedNetwork.toNetwork with the lifts of its entries, and its packing is the native packing, which is PacketPacking.packing of its edges (PacketPacking.nativePacking_eq), moved to the ends of the parent (NativeChild.parentPacking). Along reductionLift, the entries of the native child in A_{p_t} give the contraction of the child of callSplitting at the lift of ζ and the mode tuple of β: the retained vertices by ModeSplitting.child_tensor_inl_eq_tensor and the packets by TensorNetwork.map_val_entry_child_inr, assembled by DescribedNetwork.contraction_eq_of_ports. The native child is again rows-first, with its retained vertices as rows (NativeChild.isRowsFirstBipartite_nativeChild).

Main definitions #

Main results #

References #

Moving a packing to other ends #

def Cslib.PacketPacking.Packing.relabel {E : Type u_1} {R : Type u_2} {C : Type u_3} {R' : Type u_4} {C' : Type u_5} {rowOf : E → R} {colOf : E → C} {a r : ℕ} (P : Packing rowOf colOf a r) (rowOf' : E → R') (colOf' : E → C') (ρ : R' → Fin a → Fin r) (κ : C' → Fin a → Fin r) (hρ : ∀ (e : E), ρ (rowOf' e) = P.rowLabel (rowOf e)) (hκ : ∀ (e : E), κ (colOf' e) = P.colLabel (colOf e)) :
Packing rowOf' colOf' a r

A packing moved to other ends of the edges: the same packets, slots and symbols, with the labels of the new ends read through ρ and κ, which agree with the old labels at the ends of every edge.

The native child #

The groups of the vertices in coordinate i: digit i of the row word of a row (v < r), and of the column word of a column.

def Cslib.Circuits.Frontier.NativeChild.portEdges (groups : List ℕ) (g : ℕ) (ends : List (ℕ × ℕ)) (sel : ℕ × ℕ → ℕ) :

The parent edges whose end sel is in group g, in order: the row ports of group g for sel = Prod.fst, its column ports for sel = Prod.snd.

def Cslib.Circuits.Frontier.NativeChild.portRank (groups : List ℕ) (g : ℕ) (ends : List (ℕ × ℕ)) (sel : ℕ × ℕ → ℕ) (e : ℕ) :

The position of the edge e among the parent edges whose end sel is in group g.

def Cslib.Circuits.Frontier.NativeChild.childEdgeOf (r : ℕ) (groups : List ℕ) (g : ℕ) (ends : List (ℕ × ℕ)) (v e : ℕ) :

The child edge of the parent port e of the vertex v: for a row, its position among the row ports of group g; for a column, the number of row ports plus its position among the column ports.

The parent edge of the child edge j: the j-th row port of group g, or the (j - R)-th column port for R row ports.

The context of the packet q in the child of group g at the node t of valuation i and the interpolation value ζ: the precision p_t and p_t exponents per tile, 2 ^ a slots, 2 ^ (i + 1) tiles, and the symbols of q in coordinate i against g.

The dense exponents of the packet q: its slice of the packet-major list β.

@[reducible, inline]

The default vertex: no ports and the default packet descriptor.

The native child of group g at the node t of valuation i, the interpolation value ζ, the precision p_t and the packet-major exponents β, of the rows-first parent D with r rows and the native packing pk of its edges: the vertices of group g with their descriptors and renumbered ports, then one packet vertex per packet.

The number of rows of the native child: the number of vertices of group g.

The modes of a node #

The packet-major numbering of the modes (q, y, b): q · T p + y · p + b.

The modes of a node, packet-major.

The weights of the modes, packet-major: the mode (q, y, b) has weight b + 1.

theorem Cslib.Circuits.Frontier.NativeChild.modeEquiv_apply_val {P T p : ℕ} (Z : Fin P × Fin T × Fin p) :
↑((modeEquiv P T p) Z) = ↑Z.1 * (T * p) + (↑Z.2.1 * p + ↑Z.2.2)
theorem Cslib.Circuits.Frontier.NativeChild.val_modeEquiv_symm_snd_snd {P T p : ℕ} (j : Fin (P * (T * p))) :
↑((modeEquiv P T p).symm j).2.2 = ↑j % p

The last coordinate of a mode is its number modulo p.

theorem Cslib.Circuits.Frontier.NativeChild.map_modeList_weight (P T p : ℕ) :
List.map (fun (Z : Fin P × Fin T × Fin p) => ↑Z.2.2 + 1) (modeList P T p) = modeWeights P T p

The weights listed along the modes are modeWeights.

theorem Cslib.Circuits.Frontier.NativeChild.getD_betaSlice {P i pt : ℕ} (β : List ℕ) (q : Fin P) (Z : Fin (2 ^ (i + 1)) × Fin pt) :
(betaSlice i pt β ↑q).getD (↑(finProdFinEquiv Z)) 0 = BudgetTuples.ofList (modeList P (2 ^ (i + 1)) pt) β (q, Z)

The slice of a packet reads the mode tuple of β: entry b + p y of the slice of q is the exponent of the mode (q, y, b).

The native lists in a numbered network #

theorem Cslib.Circuits.Frontier.NativeChild.getD_ofFn_group {m k s : ℕ} (src tgt : Fin m → Fin k) (group : Fin k → Fin s) (sel : ℕ × ℕ → ℕ) (endF : Fin m → Fin k) (hsel : ∀ (e : Fin m), sel (↑(src e), ↑(tgt e)) = ↑(endF e)) (e : Fin m) :
(List.ofFn fun (v : Fin k) => ↑(group v)).getD (sel ((List.ofFn fun (e : Fin m) => (↑(src e), ↑(tgt e))).getD ↑e (0, 0))) 0 = ↑(group (endF e))

Reading the group of an end of an edge from the lists.

theorem Cslib.Circuits.Frontier.NativeChild.portEdges_eq {m k s : ℕ} (src tgt : Fin m → Fin k) (group : Fin k → Fin s) (g : Fin s) (sel : ℕ × ℕ → ℕ) (endF : Fin m → Fin k) (hsel : ∀ (e : Fin m), sel (↑(src e), ↑(tgt e)) = ↑(endF e)) :
portEdges (List.ofFn fun (v : Fin k) => ↑(group v)) (↑g) (List.ofFn fun (e : Fin m) => (↑(src e), ↑(tgt e))) sel = List.map Fin.val (ChildNumbering.members fun (e : Fin m) => group (endF e) = g)

The native ports of group g at the end sel are its members, in order.

theorem Cslib.Circuits.Frontier.NativeChild.portRank_eq {m k s : ℕ} (src tgt : Fin m → Fin k) (group : Fin k → Fin s) (g : Fin s) (sel : ℕ × ℕ → ℕ) (endF : Fin m → Fin k) (hsel : ∀ (e : Fin m), sel (↑(src e), ↑(tgt e)) = ↑(endF e)) (e : Fin m) :
portRank (List.ofFn fun (v : Fin k) => ↑(group v)) (↑g) (List.ofFn fun (e : Fin m) => (↑(src e), ↑(tgt e))) sel ↑e = ChildNumbering.rank (fun (e : Fin m) => group (endF e) = g) e

The native position of a port is its position among the members.

theorem Cslib.Circuits.Frontier.NativeChild.filter_range_group {k s : ℕ} (group : Fin k → Fin s) (g : Fin s) :
List.filter (fun (v : ℕ) => decide ((List.ofFn fun (v : Fin k) => ↑(group v)).getD v 0 = ↑g)) (List.range k) = List.map Fin.val (ChildNumbering.members fun (v : Fin k) => group v = g)

The native vertices of group g are its members, in order.

theorem Cslib.Circuits.Frontier.NativeChild.childEdgeOf_src {m k s : ℕ} (src tgt : Fin m → Fin k) (group : Fin k → Fin s) (g : Fin s) {r : ℕ} (hsrc : ∀ (e : Fin m), ↑(src e) < r) (e : Fin m) (h : group (src e) = g) :
childEdgeOf r (List.ofFn fun (v : Fin k) => ↑(group v)) (↑g) (List.ofFn fun (e : Fin m) => (↑(src e), ↑(tgt e))) ↑(src e) ↑e = ↑((ChildNumbering.childEdgeEquiv src tgt group g) (Sum.inl ⟨e, h⟩))

The child edge of a row port is its number in childEdgeEquiv.

theorem Cslib.Circuits.Frontier.NativeChild.childEdgeOf_tgt {m k s : ℕ} (src tgt : Fin m → Fin k) (group : Fin k → Fin s) (g : Fin s) {r : ℕ} (htgt : ∀ (e : Fin m), r ≤ ↑(tgt e)) (e : Fin m) (h : group (tgt e) = g) :
childEdgeOf r (List.ofFn fun (v : Fin k) => ↑(group v)) (↑g) (List.ofFn fun (e : Fin m) => (↑(src e), ↑(tgt e))) ↑(tgt e) ↑e = ↑((ChildNumbering.childEdgeEquiv src tgt group g) (Sum.inr ⟨e, h⟩))

The child edge of a column port is its number in childEdgeEquiv.

theorem Cslib.Circuits.Frontier.NativeChild.parentEdge_childEdgeEquiv {m k s : ℕ} (src tgt : Fin m → Fin k) (group : Fin k → Fin s) (g : Fin s) (c : ChildNumbering.ChildEdge src tgt group g) :
parentEdge (List.ofFn fun (v : Fin k) => ↑(group v)) (↑g) (List.ofFn fun (e : Fin m) => (↑(src e), ↑(tgt e))) ↑((ChildNumbering.childEdgeEquiv src tgt group g) c) = Sum.elim (fun (e : { e : Fin m // group (src e) = g }) => ↑↑e) (fun (e : { e : Fin m // group (tgt e) = g }) => ↑↑e) c

The parent edge of a numbered child edge.

theorem Cslib.Circuits.Frontier.NativeChild.lt_length_portEdges_iff {m k s : ℕ} (src tgt : Fin m → Fin k) (group : Fin k → Fin s) (g : Fin s) (c : ChildNumbering.ChildEdge src tgt group g) :
↑((ChildNumbering.childEdgeEquiv src tgt group g) c) < (portEdges (List.ofFn fun (v : Fin k) => ↑(group v)) (↑g) (List.ofFn fun (e : Fin m) => (↑(src e), ↑(tgt e))) Prod.fst).length ↔ Sum.isLeft c = true

A numbered child edge is a row port exactly when its number is below the number of row ports.

theorem Cslib.Circuits.Frontier.NativeChild.map_filterMap_of_isSome {α : Type u_1} {β : Type u_2} {γ : Type u_3} (f : α → Option β) (y : β → γ) (d : γ) (l : List α) (h : ∀ x ∈ l, (f x).isSome = true) :
List.map y (List.filterMap f l) = List.map (fun (x : α) => (Option.map y (f x)).getD d) l

A filter-map that keeps every entry is a map.

The parent over O #

@[reducible, inline]

The valuation ring O = ℤ_(2)[U] / (f) of f = monicOf fl.

The parent over O: the network of the descriptors with the lifts of their entries.

The sides of the parent: the first r vertices are the rows.

The row of an edge, among the rows.

The column of an edge, among the columns.

The native packing of the parent: nativePacking of its (row, column) edges, with r rows, k - r columns, packets of 2 ^ a slots and 64 symbols.

The (row, column) edges of the parent.

The packing of the parent over O: PacketPacking.packing of its (row, column) edges, moved to the ends of the parent.

The native packing of the parent is its packing over O when 64 ^ a is at most the number of edges: the words of its labels, its number of packets, and the packet and slot of each edge.

theorem Cslib.Circuits.Frontier.NativeChild.groupsOf_eq {T : Type} {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) {a i : ℕ} (hK : 64 ^ a ≤ D.numEdges) (hia : i < a) :

The native groups of the parent in coordinate i < a are the groups of the packing.

The mode splitting at a node of the parent over O: callSplitting of the parent with its packing, at the node t, the precision p, and the lift of the interpolation value ζ.

theorem Cslib.Circuits.Frontier.NativeChild.parentSplitting_side {T : Type} {fl : List ℕ} (hirr : Irreducible (Polynomial.map (Int.castRingHom (ZMod 2)) (GaloisRingArith.monicOf fl))) {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) (ev : T → List Bool → List ℕ) {a p u h : ℕ} (hua : u ≤ a) {t : ℤ} (ht : t ∈ recoveryNodes a) (hq : 0 < taperMult u h t) (ζ : List ℕ) :
(parentSplitting hirr hD ev a p u h hua ht hq ζ).side = parentSide r

The rows of the splitting are the first r vertices.

theorem Cslib.Circuits.Frontier.NativeChild.parentSplitting_group {T : Type} {fl : List ℕ} (hirr : Irreducible (Polynomial.map (Int.castRingHom (ZMod 2)) (GaloisRingArith.monicOf fl))) {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) (ev : T → List Bool → List ℕ) {a p u h : ℕ} (hua : u ≤ a) {t : ℤ} (ht : t ∈ recoveryNodes a) (hq : 0 < taperMult u h t) (ζ : List ℕ) :
(parentSplitting hirr hD ev a p u h hua ht hq ζ).group = packingGroup (parentSide r) (parentPacking hD a) ⟨padicValInt 2 t, ⋯⟩

The groups of the splitting are the groups of the packing in coordinate v₂(t).

theorem Cslib.Circuits.Frontier.NativeChild.parentSplitting_packet {T : Type} {fl : List ℕ} (hirr : Irreducible (Polynomial.map (Int.castRingHom (ZMod 2)) (GaloisRingArith.monicOf fl))) {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) (ev : T → List Bool → List ℕ) {a p u h : ℕ} (hua : u ≤ a) {t : ℤ} (ht : t ∈ recoveryNodes a) (hq : 0 < taperMult u h t) (ζ : List ℕ) :
(parentSplitting hirr hD ev a p u h hua ht hq ζ).packet = (parentPacking hD a).packet

The packets of the splitting are the packets of the packing.

The ports of a retained vertex: its parent ports, each as its child edge.

theorem Cslib.Circuits.Frontier.NativeChild.retainedPort_spec {T : Type} {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) (group : Fin D.vertices.length → Fin 64) (g : Fin 64) (v : { v : Fin D.vertices.length // group v = g }) {j : ℕ} (hj : j ∈ D.vertices[↑↑v].1) :

A parent port of a retained vertex is a child edge, numbered by childEdgeOf.

The ports of the packet vertex q: the child edges of packet q, in increasing order of their numbers.

The ports of the numbered child vertices: the renumbered parent ports of a retained vertex, and the child edges of a packet.

def Cslib.Circuits.Frontier.NativeChild.numberedDesc {T : Type} {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) {P : ℕ} (group : Fin D.vertices.length → Fin 64) (packet : Fin D.numEdges → Fin P) (slot : Fin D.numEdges → ℕ) (g : Fin 64) (fl : List ℕ) (a i pt : ℕ) (t : ℤ) (ζ β : List ℕ) :

The descriptors of the numbered child vertices: the parent descriptor of a retained vertex, and the packet descriptor of a packet.

theorem Cslib.Circuits.Frontier.NativeChild.map_filterMap_retainedPort {T : Type} {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) (group : Fin D.vertices.length → Fin 64) (g : Fin 64) {γ : Type u_1} (v : { v : Fin D.vertices.length // group v = g }) (y : ChildNumbering.ChildEdge (DescribedNetwork.srcFin hD) (DescribedNetwork.tgtFin hD) group g → γ) (d : γ) :
List.map y (List.filterMap (retainedPort hD group g v) D.vertices[↑↑v].1) = List.map (fun (j : ℕ) => (Option.map y (retainedPort hD group g v j)).getD d) D.vertices[↑↑v].1

Mapping over the retained ports of v reads each parent port through retainedPort.

theorem Cslib.Circuits.Frontier.NativeChild.getD_map_retainedPort {T : Type} {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) (group : Fin D.vertices.length → Fin 64) (g : Fin 64) (v : { v : Fin D.vertices.length // group v = g }) {j : ℕ} (hj : j ∈ D.vertices[↑↑v].1) (y : ChildNumbering.ChildEdge (DescribedNetwork.srcFin hD) (DescribedNetwork.tgtFin hD) group g → Bool) :
(Option.map y (retainedPort hD group g v j)).getD false = if parentSide r ↑v = true then if hg : group (DescribedNetwork.srcFin hD ⟨j, ⋯⟩) = g then y (Sum.inl ⟨⟨j, ⋯⟩, hg⟩) else false else if hg : group (DescribedNetwork.tgtFin hD ⟨j, ⋯⟩) = g then y (Sum.inr ⟨⟨j, ⋯⟩, hg⟩) else false

The bit that a retained vertex reads at a parent port.

theorem Cslib.Circuits.Frontier.NativeChild.map_numberedPorts_inl {T : Type} {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) {P : ℕ} (group : Fin D.vertices.length → Fin 64) (packet : Fin D.numEdges → Fin P) (g : Fin 64) (v : { v : Fin D.vertices.length // group v = g }) (y : ChildNumbering.ChildEdge (DescribedNetwork.srcFin hD) (DescribedNetwork.tgtFin hD) group g → Bool) :
List.map y (numberedPorts hD group packet g (Sum.inl v)) = List.map (fun (j : ℕ) => (List.ofFn fun (j : Fin D.numEdges) => if parentSide r ↑v = true then if hg : group (DescribedNetwork.srcFin hD j) = g then y (Sum.inl ⟨j, hg⟩) else false else if hg : group (DescribedNetwork.tgtFin hD j) = g then y (Sum.inr ⟨j, hg⟩) else false).getD j false) D.vertices[↑↑v].1

Mapping a bit assignment over the numbered ports of a retained vertex reads each parent port.

theorem Cslib.Circuits.Frontier.NativeChild.mem_packetPorts {T : Type} {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) {P : ℕ} (group : Fin D.vertices.length → Fin 64) (packet : Fin D.numEdges → Fin P) (g : Fin 64) (q : Fin P) (c : ChildNumbering.ChildEdge (DescribedNetwork.srcFin hD) (DescribedNetwork.tgtFin hD) group g) :
c ∈ packetPorts hD group packet g q ↔ packet (Sum.elim Subtype.val Subtype.val c) = q

The ports of a packet are its child edges.

theorem Cslib.Circuits.Frontier.NativeChild.nodup_packetPorts {T : Type} {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) {P : ℕ} (group : Fin D.vertices.length → Fin 64) (packet : Fin D.numEdges → Fin P) (g : Fin 64) (q : Fin P) :
(packetPorts hD group packet g q).Nodup

The ports of a packet are distinct.

theorem Cslib.Circuits.Frontier.NativeChild.nativeChild_eq {T : Type} {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) {P : ℕ} (group : Fin D.vertices.length → Fin 64) (packet : Fin D.numEdges → Fin P) (slot : Fin D.numEdges → ℕ) (g : Fin 64) (fl : List ℕ) (a i pt : ℕ) (t : ℤ) (ζ β : List ℕ) (pk : (List (List ℕ) × List (List ℕ)) × ℕ × List (ℕ × ℕ)) (hgroups : groupsOf r i D.vertices.length pk.1 = List.ofFn fun (v : Fin D.vertices.length) => ↑(group v)) (hpk1 : pk.2.1 = P) (hpk2 : pk.2.2 = List.ofFn fun (e : Fin D.numEdges) => (↑(packet e), slot e)) :
nativeChild fl a i pt t ζ r D pk β ↑g = { numEdges := (ChildNumbering.members fun (e : Fin D.numEdges) => group (DescribedNetwork.srcFin hD e) = g).length + (ChildNumbering.members fun (e : Fin D.numEdges) => group (DescribedNetwork.tgtFin hD e) = g).length, vertices := List.ofFn fun (c : Fin ((ChildNumbering.members fun (v : Fin D.vertices.length) => group v = g).length + P)) => (List.map (fun (e : ChildNumbering.ChildEdge (DescribedNetwork.srcFin hD) (DescribedNetwork.tgtFin hD) group g) => ↑((ChildNumbering.childEdgeEquiv (DescribedNetwork.srcFin hD) (DescribedNetwork.tgtFin hD) group g) e)) (numberedPorts hD group packet g ((ChildNumbering.childVertexEquiv group g).symm c)), numberedDesc hD group packet slot g fl a i pt t ζ β ((ChildNumbering.childVertexEquiv group g).symm c)) }

The native child is the numbered child: with the groups, packets and slots of the native packing given by functions, the native child lists the numbered child vertices with their numbered ports and descriptors.

The ports of a retained vertex are its child edges.

theorem Cslib.Circuits.Frontier.NativeChild.val_of_retainedPort_eq_some {T : Type} {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) (group : Fin D.vertices.length → Fin 64) (g : Fin 64) {x : { v : Fin D.vertices.length // group v = g }} {j : ℕ} {c : ChildNumbering.ChildEdge (DescribedNetwork.srcFin hD) (DescribedNetwork.tgtFin hD) group g} (h : retainedPort hD group g x j = some c) :
Sum.elim (fun (e : { e : Fin D.numEdges // group (DescribedNetwork.srcFin hD e) = g }) => ↑↑e) (fun (e : { e : Fin D.numEdges // group (DescribedNetwork.tgtFin hD e) = g }) => ↑↑e) c = j

A retained port names its parent edge.

The ports of a vertex of a rows-first network are distinct.

The numbered ports of a child vertex are its child edges, without repetition.

theorem Cslib.Circuits.Frontier.NativeChild.nodup_numberedPorts {T : Type} {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) {P : ℕ} (group : Fin D.vertices.length → Fin 64) (packet : Fin D.numEdges → Fin P) (g : Fin 64) (v : ChildNumbering.ChildVertex group g P) :
(numberedPorts hD group packet g v).Nodup
theorem Cslib.Circuits.Frontier.NativeChild.isRowsFirstBipartite_ofFn_iff {T T' : Type} {k l r : ℕ} (F : Fin k → List ℕ × T) (F' : Fin k → List ℕ × T') (h : ∀ (x : Fin k), (F x).1.Perm (F' x).1) :
{ numEdges := l, vertices := List.ofFn F }.IsRowsFirstBipartite r ↔ { numEdges := l, vertices := List.ofFn F' }.IsRowsFirstBipartite r

Being rows-first depends only on the multisets of ports.

theorem Cslib.Circuits.Frontier.NativeChild.isRowsFirstBipartite_nativeChild {T : Type} {fl : List ℕ} {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) {a i : ℕ} (hK : 64 ^ a ≤ D.numEdges) (hia : i < a) (pt : ℕ) (t : ℤ) (ζ β : List ℕ) (g : Fin 64) :
(nativeChild fl a i pt t ζ r D (nativeParentPacking r a D) β ↑g).IsRowsFirstBipartite (childRows r i D (nativeParentPacking r a D) ↑g)

The native child is rows-first, with its retained vertices as its rows.

theorem Cslib.Circuits.Frontier.NativeChild.entry_numbered_inl {T : Type} {fl : List ℕ} (hirr : Irreducible (Polynomial.map (Int.castRingHom (ZMod 2)) (GaloisRingArith.monicOf fl))) {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) (ev : T → List Bool → List ℕ) {a p u h : ℕ} (hua : u ≤ a) {t : ℤ} (ht : t ∈ recoveryNodes a) (hq : 0 < taperMult u h t) (ζ β : List ℕ) (g : Fin 64) (v : { v : Fin D.vertices.length // (parentSplitting hirr hD ev a p u h hua ht hq ζ).group v = g }) (y : ChildNumbering.ChildEdge (DescribedNetwork.srcFin hD) (DescribedNetwork.tgtFin hD) (parentSplitting hirr hD ev a p u h hua ht hq ζ).group g → Bool) :
(reductionLift ⋯ hirr (ContractionSchedule.nodePrecision p h a (Fintype.card (Fin D.numEdges)) (padicValInt 2 t))) (GaloisRingArith.val (ContractionSchedule.nodePrecision p h a (Fintype.card (Fin D.numEdges)) (padicValInt 2 t)) fl (VertexDesc.entry ev (numberedDesc hD (parentSplitting hirr hD ev a p u h hua ht hq ζ).group (parentSplitting hirr hD ev a p u h hua ht hq ζ).packet (fun (e : Fin D.numEdges) => ↑((parentPacking hD a).slot e)) g fl a (padicValInt 2 t) (ContractionSchedule.nodePrecision p h a (Fintype.card (Fin D.numEdges)) (padicValInt 2 t)) t ζ β (Sum.inl v)) (List.map y (numberedPorts hD (parentSplitting hirr hD ev a p u h hua ht hq ζ).group (parentSplitting hirr hD ev a p u h hua ht hq ζ).packet g (Sum.inl v))))) = ((parentSplitting hirr hD ev a p u h hua ht hq ζ).child (BudgetTuples.ofList (modeList (parentPacking hD a).numPackets (2 ^ (padicValInt 2 t + 1)) (ContractionSchedule.nodePrecision p h a (Fintype.card (Fin D.numEdges)) (padicValInt 2 t))) β) g).tensor (Sum.inl v) y

The entries of the retained vertices of the numbered child are the tensors of the child.

theorem Cslib.Circuits.Frontier.NativeChild.entry_numbered_inr {T : Type} {fl : List ℕ} (hirr : Irreducible (Polynomial.map (Int.castRingHom (ZMod 2)) (GaloisRingArith.monicOf fl))) {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) (ev : T → List Bool → List ℕ) {a p u h : ℕ} (hua : u ≤ a) {t : ℤ} (ht : t ∈ recoveryNodes a) (hq : 0 < taperMult u h t) (ζ β : List ℕ) (g : Fin 64) (q : Fin (parentPacking hD a).numPackets) (y : ChildNumbering.ChildEdge (DescribedNetwork.srcFin hD) (DescribedNetwork.tgtFin hD) (parentSplitting hirr hD ev a p u h hua ht hq ζ).group g → Bool) :
(reductionLift ⋯ hirr (ContractionSchedule.nodePrecision p h a (Fintype.card (Fin D.numEdges)) (padicValInt 2 t))) (GaloisRingArith.val (ContractionSchedule.nodePrecision p h a (Fintype.card (Fin D.numEdges)) (padicValInt 2 t)) fl (VertexDesc.entry ev (numberedDesc hD (parentSplitting hirr hD ev a p u h hua ht hq ζ).group (parentSplitting hirr hD ev a p u h hua ht hq ζ).packet (fun (e : Fin D.numEdges) => ↑((parentPacking hD a).slot e)) g fl a (padicValInt 2 t) (ContractionSchedule.nodePrecision p h a (Fintype.card (Fin D.numEdges)) (padicValInt 2 t)) t ζ β (Sum.inr q)) (List.map y (numberedPorts hD (parentSplitting hirr hD ev a p u h hua ht hq ζ).group (parentSplitting hirr hD ev a p u h hua ht hq ζ).packet g (Sum.inr q))))) = ((parentSplitting hirr hD ev a p u h hua ht hq ζ).child (BudgetTuples.ofList (modeList (parentPacking hD a).numPackets (2 ^ (padicValInt 2 t + 1)) (ContractionSchedule.nodePrecision p h a (Fintype.card (Fin D.numEdges)) (padicValInt 2 t))) β) g).tensor (Sum.inr q) y

The entries of the packet vertices of the numbered child are the tensors of the child.

The native child has the contraction of the child ([OAI26k], §D.4.6). For a rows-first parent with 64 ^ a at most its number of edges, a node t of positive multiplicity with u ≤ a, an interpolation value ζ, packet-major exponents β and a group g, the native child at the precision p_t of the node, with the entries of its descriptors in A_{p_t} mapped along reductionLift to O / (2 ^ {p_t}), has the contraction of the child of group g of the mode splitting at t (parentSplitting) at the mode tuple of β.

The descriptors of the native children #

theorem Cslib.Circuits.Frontier.NativeChild.desc_of_mem_nativeChild {T : Type} {D : DescribedNetwork (VertexDesc T)} {r : ℕ} (hD : D.IsRowsFirstBipartite r) {fl : List ℕ} {a i : ℕ} (hK : 64 ^ a ≤ D.numEdges) (hia : i < a) (pt : ℕ) (t : ℤ) (ζ β : List ℕ) (g : Fin 64) {v : List ℕ × VertexDesc T} (hv : v ∈ (nativeChild fl a i pt t ζ r D (nativeParentPacking r a D) β ↑g).vertices) :
(∃ w ∈ D.vertices, v.2 = w.2) ∨ ∃ (q : ℕ) (tags : List (Bool × ℕ)), v.2 = Sum.inr (packetCtx fl a i pt t ζ (↑g) q, tags, betaSlice i pt β q) ∧ (∀ y ∈ tags, y.2 < 2 ^ a) ∧ (List.map (fun (x : Bool × ℕ) => x.2) (List.filter (fun (x : Bool × ℕ) => x.1) tags)).Nodup

The descriptors of the native child. A vertex of the native child of a rows-first parent with at least 64 ^ a edges keeps the descriptor of a parent vertex, or is the packet q, with the packet context of q, the slice of β at q, and tags whose slots are below 2 ^ a and distinct among its row ports.

theorem Cslib.Circuits.Frontier.NativeChild.exists_mem_of_mem_nativeChild_inl {T : Type} {D : DescribedNetwork (VertexDesc T)} {r : ℕ} {fl : List ℕ} {a i pt : ℕ} {τ : ℤ} {ζ : List ℕ} {pk : (List (List ℕ) × List (List ℕ)) × ℕ × List (ℕ × ℕ)} {β : List ℕ} {g : ℕ} {v : List ℕ × VertexDesc T} (hv : v ∈ (nativeChild fl a i pt τ ζ r D pk β g).vertices) {t : T} (ht : v.2 = Sum.inl t) :
∃ u ∈ D.vertices, u.2 = Sum.inl t ∧ u.1.length = v.1.length

A kept vertex of the native child keeps its descriptor and its number of ports: every root descriptor of the native child is the descriptor of a parent vertex with as many ports.