Documentation

CslibFrontier.Computability.Circuit.Frontier.TensorNetwork.VertexDesc

Descriptors of the vertices of the recursion's networks #

The networks of the contraction recursion of [OAI26k] (§D.4.6–§D.4.7, pp. 63–64) have two kinds of vertices. The vertices of the input network keep their original descriptions, and they survive into every child of their group with the same ports. The packet vertices created at a call are described by "its packet data, the tuple β, the interpolation value, and the creation precision" (p. 63), and from then on they also survive into the children of their group. A vertex descriptor (VertexDesc T) is therefore a root descriptor of type T or a packet descriptor (NativePacket.PacketDesc), and a retained vertex keeps its descriptor.

VertexDesc.entry ev evaluates a descriptor at the bits on its ports: the root's entry procedure ev, which returns a coefficient list, or the native packet entry at the packet's creation precision. A network of the recursion reads the entries at its own precision (p, fl) (GaloisRingArith.val p fl), so a vertex is read at every precision through the canonical lift of its coefficient list: a retained packet vertex created at a lower precision is read at the higher one as the same element of O = ℤ_(2)[U] / (f). Explicit tables are the root descriptors T = List ℕ with the entry procedure tableEntry, which returns the table entry as a constant. From a native certificate ce of the entry procedure, one native machine evaluates every descriptor (VertexDesc.entryCertificate ce): time K (m + 2) ^ L Z ^ K + E and space K Z ^ K + ES, for m target modes and L row ports of a packet (none for a root), Z polynomial in the input and the reduced coefficient lists, and E and ES the time and space of ce on a root (VertexDesc.entryCertificate_le). It is the evaluator of direct summation over networks of descriptors at coefficient lists (DescribedNetwork.contractionCertificate at SumOps.galois). The entry procedure of tables has a polynomial native certificate (tableEntryCertificate).

Main definitions #

Main results #

References #

The entry procedure of tables: the table entry at the bits on the ports, as a constant coefficient list.

@[reducible, inline]

The descriptor of a vertex of a network of the contraction recursion: the descriptor of a vertex of the input network (inl), or the descriptor of a packet vertex (inr).

The entry of a vertex at the bits on its ports: the entry procedure ev of the input network, or the native packet entry at the packet's creation precision.

@[reducible, inline]

The encoding of a descriptor: a tag, then the root descriptor or the packet descriptor.

The number of target modes of a descriptor: those of its packet, and none for a root.

The number of row ports of a descriptor at the bits on its ports: those of its packet, and none for a root.

The reduced coefficient lists of the creation precision of a descriptor are at most Rv bits long; no condition for a root.

Values #

@[simp]
theorem Cslib.Circuits.Frontier.VertexDesc.entry_inl {T : Type} (ev : T → List Bool → List ℕ) (t : T) (bs : List Bool) :
entry ev (Sum.inl t) bs = ev t bs

A table entry is read as a constant at every precision.

theorem Cslib.Circuits.Frontier.VertexDesc.map_val_entry_inr {T : Type} {S : Type u_1} [CommRing S] (ev : T → List Bool → List ℕ) (d : NativePacket.PacketDesc) (bs : List Bool) (ψ : GaloisRingArith.Ring d.1.p d.1.fl →+* S) {n : ℕ} (hn : 2 ^ n = 0) (κ : ↥(Rat.padicValuation 2).integer →+* S) (hL : d.1.L = 2 ^ d.1.a) (hia : d.1.i < d.1.a) (htiles : d.1.tiles = 2 ^ (d.1.i + 1)) (ht : d.1.t ∈ cauchyGrid (2 ^ d.1.a)) (hti : 2 ^ d.1.i ∣ d.1.t) (hti' : ¬2 ^ (d.1.i + 1) ∣ d.1.t) (hports : ∀ x ∈ d.2.1, x.2 < 2 ^ d.1.a) :
ψ (GaloisRingArith.val d.1.p d.1.fl (entry ev (Sum.inr d) bs)) = TensorNetwork.packetEntry κ (ψ (GaloisRingArith.val d.1.p d.1.fl d.1.ζ)) d.1.a d.1.i d.1.t d.1.e₁ d.1.e₂ d.1.differ (fun (Z : Fin (2 ^ (d.1.i + 1)) × Fin d.1.nb) => d.2.2.getD (↑(finProdFinEquiv Z)) 0) (NativePacket.sidePorts d.2.1 bs true) (NativePacket.sidePorts d.2.1 bs false)

A packet entry in every ring receiving A_p. Let the context of a packet descriptor have L = 2 ^ a slots, a digit i < a, 2 ^ (i + 1) tiles and a grid point t of cauchyGrid (2 ^ a) divisible by 2 ^ i and not by 2 ^ (i + 1), and let the slots of its ports lie below 2 ^ a. Along a ring map ψ from A_p, at the precision p of the packet, to a ring in which 2 is nilpotent, the entry of the descriptor at the bits on its ports is packetEntry at any ring map κ : ℤ_(2) → S, the image of the interpolation value, the dense exponents, and the row and column ports read from the bits.

A packet entry is a reduced coefficient list at the packet's precision.

The native evaluator #

The input of the root's entry procedure from a descriptor's bits and its root descriptor.

One native machine for the entries of all descriptors, from a native certificate ce of the entry procedure ev of the root descriptors: ce for a root, and the native packet evaluator (NativePacket.vertexCertificate) for a packet.

theorem Cslib.Circuits.Frontier.VertexDesc.entryCertificate_le {T : Type} {encT : T ↪ List Bool} {ev : T → List Bool → List ℕ} (ce : GenericRAM.NativeCertificate (fun (q : T × List Bool) => ev q.1 q.2) (Turing.MultiTapeTM.encPair encT Turing.MultiTapeTM.encBits) (Turing.MultiTapeTM.encList Turing.MultiTapeTM.encNat)) :
∃ (K : ℕ), ∀ (q : VertexDesc T × List Bool) (Rv E ES : ℕ), ReducedLE Rv q.1 → (∀ (t : T), q.1 = Sum.inl t → ce.time (t, q.2) ≤ E ∧ ce.space (t, q.2) ≤ ES) → (entryCertificate ce).time q ≤ K * (q.1.modes + 2) ^ q.1.rowPorts q.2 * (((Turing.MultiTapeTM.encPair (enc encT) Turing.MultiTapeTM.encBits) q).length + q.1.modes + Rv + 2) ^ K + E ∧ (entryCertificate ce).space q ≤ K * (((Turing.MultiTapeTM.encPair (enc encT) Turing.MultiTapeTM.encBits) q).length + q.1.modes + Rv + 2) ^ K + ES

The resources of the native evaluator of descriptors. For a native certificate ce of the entry procedure of the roots, there is K such that on a descriptor and bits of total length n, with m target modes and L row ports (0 and 0 for a root), if the reduced coefficient lists of a packet's precision are at most Rv bits long and ce takes time at most E and space at most ES on a root and the bits, then with Z = n + m + Rv + 2 the time is at most K (m + 2) ^ L Z ^ K + E and the space at most K Z ^ K + ES.

Tables #

The certificate of the entry procedure of tables is polynomial.