Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.Cuts.Play

Positions of the play and one move #

The cutting argument of [Ant26] (Appendices H.2 and J; module Nc.Cut.Play) rewrites the value of a computation as a sum over what is written on units that are shared by parties. Every unit u has two ends, at the parties h u false and h u true, and each end carries a copy of the unit. Contents y : A → U → W give the copy y a u of the unit u at the party a; copies of units that have not been seen, or at parties that do not hold them, are empty (a fixed e : W).

The value of a position (Play.value) is the sum, over all contents of the units seen so far, of a joint weight, restricted to the contents in which the two copies of every current unit agree. For a weight that is a product of tables of the parties and with all seen units current, this is the contraction of a tensor network with a party at each vertex and a unit on each edge; here some seen units are no longer current, so their two copies are summed independently, and the weight need not be a product.

A move (Play.value_move) takes some current units away and replaces the condition that their copies agree by a sum, over outcomes, of tables that also read new units.

Main definitions #

Main results #

References #

def Cslib.Circuits.Arithmetic.Separation.Play.Holds {A : Type u_2} {U : Type u_3} (h : U → Bool → A) (a : A) (u : U) :

The party a holds the unit u: it is at one of the two ends of u.

Instances For
    @[instance_reducible]
    instance Cslib.Circuits.Arithmetic.Separation.Play.instDecidableHoldsOfDecidableEq {A : Type u_2} {U : Type u_3} [DecidableEq A] (h : U → Bool → A) (a : A) (u : U) :
    theorem Cslib.Circuits.Arithmetic.Separation.Play.holds_end {A : Type u_2} {U : Type u_3} (h : U → Bool → A) (u : U) (d : Bool) :
    Holds h (h u d) u
    def Cslib.Circuits.Arithmetic.Separation.Play.Agree {A : Type u_2} {U : Type u_3} {W : Type u_4} (h : U → Bool → A) (Cur : Finset U) (y : A → U → W) :

    The copies of all units in Cur agree.

    Instances For
      @[instance_reducible]
      instance Cslib.Circuits.Arithmetic.Separation.Play.instDecidableAgreeOfDecidableEq {A : Type u_2} {U : Type u_3} {W : Type u_4} [DecidableEq W] (h : U → Bool → A) (Cur : Finset U) (y : A → U → W) :
      Decidable (Agree h Cur y)
      theorem Cslib.Circuits.Arithmetic.Separation.Play.agree_union {A : Type u_2} {U : Type u_3} {W : Type u_4} [DecidableEq U] {h : U → Bool → A} {S T : Finset U} {y : A → U → W} :
      Agree h (S ∪ T) y ↔ Agree h S y ∧ Agree h T y
      theorem Cslib.Circuits.Arithmetic.Separation.Play.Agree.mono {A : Type u_2} {U : Type u_3} {W : Type u_4} {h : U → Bool → A} {S T : Finset U} {y : A → U → W} (hST : S ⊆ T) (hy : Agree h T y) :
      Agree h S y
      def Cslib.Circuits.Arithmetic.Separation.Play.contents {A : Type u_2} {U : Type u_3} {W : Type u_4} [Fintype A] [DecidableEq A] [Fintype U] [DecidableEq U] [Fintype W] [DecidableEq W] (h : U → Bool → A) (e : W) (Seen : Finset U) :
      Finset (A → U → W)

      The contents in which only the copies of seen units at their holders are not empty.

      def Cslib.Circuits.Arithmetic.Separation.Play.common {U : Type u_3} {W : Type u_4} [Fintype U] [DecidableEq U] [Fintype W] [DecidableEq W] (e : W) (New : Finset U) :
      Finset (U → W)

      Common contents of units: empty outside New.

      @[simp]
      theorem Cslib.Circuits.Arithmetic.Separation.Play.mem_contents {A : Type u_2} {U : Type u_3} {W : Type u_4} [Fintype A] [DecidableEq A] [Fintype U] [DecidableEq U] [Fintype W] [DecidableEq W] {h : U → Bool → A} {e : W} {Seen : Finset U} {y : A → U → W} :
      y ∈ contents h e Seen ↔ ∀ (a : A) (u : U), ¬(u ∈ Seen ∧ Holds h a u) → y a u = e
      @[simp]
      theorem Cslib.Circuits.Arithmetic.Separation.Play.mem_common {U : Type u_3} {W : Type u_4} [Fintype U] [DecidableEq U] [Fintype W] [DecidableEq W] {e : W} {New : Finset U} {z : U → W} :
      z ∈ common e New ↔ ∀ u ∉ New, z u = e
      @[simp]
      theorem Cslib.Circuits.Arithmetic.Separation.Play.common_empty {U : Type u_3} {W : Type u_4} [Fintype U] [DecidableEq U] [Fintype W] [DecidableEq W] (e : W) :
      common e ∅ = {fun (x : U) => e}

      Without units, the only common contents are empty.

      def Cslib.Circuits.Arithmetic.Separation.Play.extend {A : Type u_2} {U : Type u_3} {W : Type u_4} [DecidableEq A] [DecidableEq U] (h : U → Bool → A) (New : Finset U) (y : A → U → W) (z : U → W) :
      A → U → W

      Write common contents z of the units in New into the copies of their holders.

      theorem Cslib.Circuits.Arithmetic.Separation.Play.extend_of_holds {A : Type u_2} {U : Type u_3} {W : Type u_4} [DecidableEq A] [DecidableEq U] {h : U → Bool → A} {New : Finset U} {y : A → U → W} {z : U → W} {a : A} {u : U} (hu : u ∈ New) (ha : Holds h a u) :
      extend h New y z a u = z u
      theorem Cslib.Circuits.Arithmetic.Separation.Play.extend_of_notMem {A : Type u_2} {U : Type u_3} {W : Type u_4} [DecidableEq A] [DecidableEq U] {h : U → Bool → A} {New : Finset U} {y : A → U → W} {z : U → W} {a : A} {u : U} (hu : u ∉ New) :
      extend h New y z a u = y a u
      @[simp]
      theorem Cslib.Circuits.Arithmetic.Separation.Play.extend_empty {A : Type u_2} {U : Type u_3} {W : Type u_4} [DecidableEq A] [DecidableEq U] (h : U → Bool → A) (y : A → U → W) (z : U → W) :
      extend h ∅ y z = y

      Writing no units changes nothing.

      theorem Cslib.Circuits.Arithmetic.Separation.Play.agree_extend {A : Type u_2} {U : Type u_3} {W : Type u_4} [DecidableEq A] [DecidableEq U] {h : U → Bool → A} {New S : Finset U} (hd : Disjoint S New) (y : A → U → W) (z : U → W) :
      Agree h S (extend h New y z) ↔ Agree h S y

      Writing new units does not change whether the copies of other units agree.

      def Cslib.Circuits.Arithmetic.Separation.Play.value {F : Type u_1} {A : Type u_2} {U : Type u_3} {W : Type u_4} [Fintype A] [DecidableEq A] [Fintype U] [DecidableEq U] [Fintype W] [DecidableEq W] [AddCommMonoid F] (h : U → Bool → A) (e : W) (Seen Cur : Finset U) (E : (A → U → W) → F) :
      F

      The value of a position: the sum of the joint weight E over the contents of the seen units in which the two copies of every current unit agree.

      theorem Cslib.Circuits.Arithmetic.Separation.Play.value_eq_sum_filter {F : Type u_1} {A : Type u_2} {U : Type u_3} {W : Type u_4} [Fintype A] [DecidableEq A] [Fintype U] [DecidableEq U] [Fintype W] [DecidableEq W] [AddCommMonoid F] (h : U → Bool → A) (e : W) (Seen Cur : Finset U) (E : (A → U → W) → F) :
      value h e Seen Cur E = ∑ y ∈ contents h e Seen with Agree h Cur y, E y
      theorem Cslib.Circuits.Arithmetic.Separation.Play.sum_contents_union {F : Type u_1} {A : Type u_2} {U : Type u_3} {W : Type u_4} [Fintype A] [DecidableEq A] [Fintype U] [DecidableEq U] [Fintype W] [DecidableEq W] [AddCommMonoid F] (h : U → Bool → A) (e : W) {Seen New : Finset U} (hd : Disjoint Seen New) (f : (A → U → W) → F) :
      (∑ y ∈ contents h e (Seen ∪ New), if Agree h New y then f y else 0) = ∑ y ∈ contents h e Seen, ∑ z ∈ common e New, f (extend h New y z)

      Contents of the units in Seen ∪ New in which the copies of the new units agree are contents of the units in Seen together with common contents of the new units.

      theorem Cslib.Circuits.Arithmetic.Separation.Play.value_move {F : Type u_1} {A : Type u_2} {U : Type u_3} {W : Type u_4} {O : Type u_5} [Fintype A] [DecidableEq A] [Fintype U] [DecidableEq U] [Fintype W] [DecidableEq W] [Semiring F] [Fintype O] (h : U → Bool → A) (e : W) {Seen Cur Out : Finset U} (hOut : Out ⊆ Cur) (hCur : Cur ⊆ Seen) (New : O → Finset U) (hNew : ∀ (o : O), Disjoint Seen (New o)) (E : (A → U → W) → F) (hE : ∀ (o : O) (y : A → U → W) (z : U → W), E (extend h (New o) y z) = E y) (C : O → (A → U → W) → F) (hC : ∀ y ∈ contents h e Seen, E y ≠ 0 → (if Agree h Out y then 1 else 0) = ∑ o : O, ∑ z ∈ common e (New o), C o (extend h (New o) y z)) :
      value h e Seen Cur E = ∑ o : O, value h e (Seen ∪ New o) (Cur \ Out ∪ New o) fun (y : A → U → W) => E y * C o y

      One move. Some current units Out are taken away. If, wherever the weight E is not zero, the condition that their copies agree is a sum over outcomes o and over common contents of new units of tables C o, then the value of the position is the sum over the outcomes of the values of the positions with the units Out replaced by the new ones and the weight multiplied by the table.