Documentation

CslibFrontier.Computability.Circuit.Frontier.TensorNetwork.NativeCall

Correctness of one native active call #

An active call of the native contraction recursion of [OAI26k] (§D.4.4–§D.4.7, pp. 60–64) on a rows-first network of descriptors stores, for each node index k of positive multiplicity and each interpolation point i, a value in A_{p_t}, and recovers its own value with native tapered recovery (NativeRecovery.recover). This file proves the call correct from the correctness of its stored values (NativeCall.val_recover_eq_contraction): if each stored value is, in A_{p_t}, the sum over the exponent tuples of the products over the groups of the contractions of the native children (NativeChild.nativeChild), then the recovered value is the contraction of the network in A_p.

The proof is carried over O = ℤ_(2)[U] / (f) with the canonical lifts of the entries (DescribedNetwork.toNetwork, GaloisRingArith.liftO), as in §D.4.1 (p. 58). The values at the nodes are the lifts of the stored lists, so

The call's precision p_t of the node of valuation i is nodePrecision p h a M i, and the shift Δ only needs (a + 1) ∑_t q_t ≤ Δ.

Main results #

References #

The node index of a node: t + 2 ^ a.

theorem Cslib.Circuits.Frontier.NativeCall.prod_map_range {M : Type u_1} [CommMonoid M] (F : ℕ → M) (n : ℕ) :
(List.map F (List.range n)).prod = ∏ g : Fin n, F ↑g

A product over a range as a list is a product over Fin.

theorem Cslib.Circuits.Frontier.NativeCall.val_recover_eq_contraction {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 u h p Δ : ℕ} (hu : 1 ≤ u) (huM : u ≤ D.numEdges) (hua : u ≤ a) (hh : 3 * D.numEdges ≤ h * u) (hh' : h * u ≤ 3 * D.numEdges + u) (hK : 64 ^ a ≤ D.numEdges) (hΔ : (a + 1) * ∑ t ∈ recoveryNodes a, taperMult u h t ≤ Δ) (ζl : List (List ℕ)) (hζ : Pairwise fun (i j : Fin ζl.length) => IsUnit (GaloisRingArith.liftO hirr (ζl.getD ↑i []) - GaloisRingArith.liftO hirr (ζl.getD ↑j []))) (hn : D.numEdges * (2 * 2 ^ a - 1) < ζl.length) (W : List (List (List ℕ))) (hW : ∀ k < 2 ^ (a + 1), k ≠ 2 ^ a → 0 < NativeRecovery.mult a u h k → ∀ i < ζl.length, GaloisRingArith.val (ContractionSchedule.nodePrecision p h a D.numEdges (padicValInt 2 (NativeRecovery.node a k))) fl ((W.getD k []).getD i []) = (List.map (fun (β : List ℕ) => (List.map (fun (g : ℕ) => DescribedNetwork.contraction (fun (d : VertexDesc T) (bs : List Bool) => GaloisRingArith.val (ContractionSchedule.nodePrecision p h a D.numEdges (padicValInt 2 (NativeRecovery.node a k))) fl (VertexDesc.entry ev d bs)) (NativeChild.nativeChild fl a (padicValInt 2 (NativeRecovery.node a k)) (ContractionSchedule.nodePrecision p h a D.numEdges (padicValInt 2 (NativeRecovery.node a k))) (NativeRecovery.node a k) (ζl.getD i []) r D (NativeChild.nativeParentPacking r a D) β g)) (List.range 64)).prod) (BudgetTuples.budgetTuples (NativeChild.modeWeights (NativeChild.nativeParentPacking r a D).2.1 (2 ^ (padicValInt 2 (NativeRecovery.node a k) + 1)) (ContractionSchedule.nodePrecision p h a D.numEdges (padicValInt 2 (NativeRecovery.node a k)))) (ContractionSchedule.nodePrecision p h a D.numEdges (padicValInt 2 (NativeRecovery.node a k))))).sum) :

One native active call is correct when its stored values are ([OAI26k], §D.4.4–§D.4.7). Let D be a rows-first network of descriptors with M edges, and let (a, u, h) meet the hypotheses of Lemma D.5 (1 ≤ u ≤ M, u ≤ a, 3 M ≤ h u ≤ 3 M + u), with 64 ^ a ≤ M and (a + 1) ∑_t q_t ≤ Δ. Let the interpolation values ζl have lifts with unit differences, and more than M (2 L - 1) of them. Suppose that at every node index k of positive multiplicity, with the node t = k - 2 ^ a of valuation i and precision p_t, each stored value W[k][i'] is, in A_{p_t}, the sum over the exponent lists of the packet-major modes of the products over the 64 groups of the contractions in A_{p_t} of the native children. Then native recovery returns the contraction of D in A_p.