Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.Cuts.Contract

Contraction of tables with code words #

Roles are joined by channels; a channel has two ends (h ν false, h ν true), as the units of the play have two holders (Play.Holds). Every role has a table G p i g that depends on an index i and on data g ν : S i ν on each of its channels. Suppose the data on a channel, together with the index, are written as a code word in a common alphabet Z, injectively. Then a role can be given the code words of its channels instead (Cut.codeTable), and summing the product of these tables over the code words on all channels gives the sum, over one index for all roles and over the data on all channels, of the product of the tables (Cut.sum_prod_codeTable), provided that the channels connect the roles.

This is how the moves of the cutting argument of [Ant26] (module Nc.G.Contract) replace the strings of a law by units.

Main definitions #

Main results #

References #

def Cslib.Circuits.Arithmetic.Separation.Cut.codeTable {F : Type u_1} [CommSemiring F] {Ro : Type u_2} {Cn : Type u_3} {ι : Type u_4} [DecidableEq Ro] [Fintype Cn] [DecidableEq Cn] [Fintype ι] {S : ι → Cn → Type u_5} [(i : ι) → (ν : Cn) → Fintype (S i ν)] {Z : Type u_6} [DecidableEq Z] (h : Cn → Bool → Ro) (code : (ν : Cn) → (i : ι) → S i ν → Z) (p : Ro) (G : (i : ι) → ((ν : { ν : Cn // Play.Holds h p ν }) → S i ↑ν) → F) (z : Cn → Z) :
F

The table of a role with code words on its channels: the sum of the table over the indices and the data whose code words are the given ones.

theorem Cslib.Circuits.Arithmetic.Separation.Cut.codeTable_eq_sum_sigma {F : Type u_1} [CommSemiring F] {Ro : Type u_2} {Cn : Type u_3} {ι : Type u_4} [DecidableEq Ro] [Fintype Cn] [DecidableEq Cn] [Fintype ι] {S : ι → Cn → Type u_5} [(i : ι) → (ν : Cn) → Fintype (S i ν)] {Z : Type u_6} [DecidableEq Z] (h : Cn → Bool → Ro) (code : (ν : Cn) → (i : ι) → S i ν → Z) (p : Ro) (G : (i : ι) → ((ν : { ν : Cn // Play.Holds h p ν }) → S i ↑ν) → F) (z : Cn → Z) :
codeTable h code p G z = ∑ q : (i : ι) × ((ν : { ν : Cn // Play.Holds h p ν }) → S i ↑ν), if ∀ (ν : { ν : Cn // Play.Holds h p ν }), code (↑ν) q.fst (q.snd ν) = z ↑ν then G q.fst q.snd else 0
theorem Cslib.Circuits.Arithmetic.Separation.Cut.codeTable_congr {F : Type u_1} [CommSemiring F] {Ro : Type u_2} {Cn : Type u_3} {ι : Type u_4} [DecidableEq Ro] [Fintype Cn] [DecidableEq Cn] [Fintype ι] {S : ι → Cn → Type u_5} [(i : ι) → (ν : Cn) → Fintype (S i ν)] {Z : Type u_6} [DecidableEq Z] (h : Cn → Bool → Ro) (code : (ν : Cn) → (i : ι) → S i ν → Z) {p : Ro} {G : (i : ι) → ((ν : { ν : Cn // Play.Holds h p ν }) → S i ↑ν) → F} {z z' : Cn → Z} (hz : ∀ (ν : Cn), Play.Holds h p ν → z ν = z' ν) :
codeTable h code p G z = codeTable h code p G z'

Only the code words on the channels of the role matter.

theorem Cslib.Circuits.Arithmetic.Separation.Cut.sum_prod_codeTable {F : Type u_1} [CommSemiring F] {Ro : Type u_2} {Cn : Type u_3} {ι : Type u_4} [DecidableEq Ro] [Fintype Cn] [DecidableEq Cn] [Fintype ι] {S : ι → Cn → Type u_5} [(i : ι) → (ν : Cn) → Fintype (S i ν)] {Z : Type u_6} [DecidableEq Z] {h : Cn → Bool → Ro} {code : (ν : Cn) → (i : ι) → S i ν → Z} [Fintype Ro] [Nonempty Ro] [Fintype Z] (hcode : ∀ (ν : Cn), Function.Injective fun (q : (i : ι) × S i ν) => code ν q.fst q.snd) (hconn : ∀ (f : Ro → ι), (∀ (ν : Cn), f (h ν false) = f (h ν true)) → ∀ (p q : Ro), f p = f q) (G : (p : Ro) → (i : ι) → ((ν : { ν : Cn // Play.Holds h p ν }) → S i ↑ν) → F) :
∑ z : Cn → Z, ∏ p : Ro, codeTable h code p (G p) z = ∑ i : ι, ∑ g : (ν : Cn) → S i ν, ∏ p : Ro, G p i fun (ν : { ν : Cn // Play.Holds h p ν }) => g ↑ν

Contraction. Tables with code words, summed over the code words on all channels, give the sum, over one index and over the data on all channels, of the products of the tables. The code words determine the index and the data, and indices that agree along all channels are equal.