Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.Cuts.PlayMoves

The play of a plan #

A plan (Cut.Plan) says which units every move is given. The moves of a plan that obeys the rules (Cut.Plan.Ok) keep the value of the position ([Ant26], Section H.2, law moves; module Nc.G.PlayThm): the value at the beginning, where the units are those of the strings between the base parties and the weight is the product of the tables of the parties, is the sum, over the allowed outcomes of all moves, of the values of the positions in the end, where the table of a party is its table at the beginning times the tables of its roles (Cut.Plan.value_moves). Outcomes that are not allowed may be left out if every possible outcome is allowed, because impossible outcomes contribute nothing (Cut.move_zero).

The proof applies Play.value_move to one move after the other; its hypothesis is the identity of one move (Cut.Plan.value_move, from Cut.move_identity).

Main definitions #

Main results #

References #

@[simp]
theorem Cslib.Circuits.Arithmetic.Separation.Cut.Plan.new_mem_seenAt {F : Type u_1} [CommSemiring F] {A A' E U0 U1 : ℕ} {M : Moves F (A + A') E} {n : Fin A → Fin A → Fin (U0 + 1)} {o : M.Channel → Fin U1} {x : ℕ} {ν : M.Channel} {k : Fin U1} :
UnitId.new ν k ∈ seenAt n o x ↔ ↑ν.fst < x ∧ k ≤ o ν
@[simp]
theorem Cslib.Circuits.Arithmetic.Separation.Cut.Plan.init_mem_seenAt {F : Type u_1} [CommSemiring F] {A A' E U0 U1 : ℕ} {M : Moves F (A + A') E} {n : Fin A → Fin A → Fin (U0 + 1)} {o : M.Channel → Fin U1} {x : ℕ} {a b : Fin A} {k : Fin U0} :
UnitId.init a b k ∈ seenAt n o x ↔ ↑k < ↑(n a b)
theorem Cslib.Circuits.Arithmetic.Separation.Cut.Plan.mem_seenAt_end {F : Type u_1} [CommSemiring F] {A A' E U0 U1 : ℕ} {M : Moves F (A + A') E} {n : Fin A → Fin A → Fin (U0 + 1)} {o : M.Channel → Fin U1} {id : UnitId A U0 M.Channel U1} :
id ∈ seenAt n o E ↔ id.index < UnitId.count n o id

The units seen in the end are the units whose number is less than the number of units of their string.

theorem Cslib.Circuits.Arithmetic.Separation.Cut.Plan.card_filter_holds_seenAt {F : Type u_1} [CommSemiring F] {A A' E U0 U1 : ℕ} {M : Moves F (A + A') E} {n : Fin A → Fin A → Fin (U0 + 1)} {o : M.Channel → Fin U1} (x : ℕ) (p : Fin (A + A')) :
(Finset.filter (Play.Holds (UnitId.holder M.channelParty) p) (seenAt n o x)).card = (∑ a : Fin A, ∑ b : Fin A, if p = Fin.castAdd A' a ∨ p = Fin.castAdd A' b then ↑(n a b) else 0) + ∑ ν : M.Channel with ↑ν.fst < x, ∑ d : Bool, if M.channelParty ν d = p then ↑(o ν) + 1 else 0

The units seen that a party holds. The units seen before the move x (for x = E: in the end) that the party p holds are the initial units of the strings at p and, for every end at p of a channel of an earlier move, the outcome of the channel and one more unit.

theorem Cslib.Circuits.Arithmetic.Separation.Cut.Plan.mem_cur {F : Type u_1} [CommSemiring F] {A A' E U0 U1 : ℕ} {M : Moves F (A + A') E} {P : Plan M U0 U1} {n : Fin A → Fin A → Fin (U0 + 1)} {o : M.Channel → Fin U1} {x : ℕ} {id : UnitId A U0 M.Channel U1} :
id ∈ P.cur n o x ↔ id ∈ seenAt n o x ∧ ∀ (z : M.Slot), ↑z.fst < x → id ∉ P.given n o z
theorem Cslib.Circuits.Arithmetic.Separation.Cut.Plan.mem_ids {F : Type u_1} [CommSemiring F] {A A' E U0 U1 : ℕ} {M : Moves F (A + A') E} {P : Plan M U0 U1} {n : Fin A → Fin A → Fin (U0 + 1)} {o : M.Channel → Fin U1} {z : M.Slot} {id : UnitId A U0 M.Channel U1} :
id ∈ P.ids n o z ↔ id ∈ P.given n o z
theorem Cslib.Circuits.Arithmetic.Separation.Cut.Plan.length_ids {F : Type u_1} [CommSemiring F] {A A' E U0 U1 : ℕ} {M : Moves F (A + A') E} {P : Plan M U0 U1} {n : Fin A → Fin A → Fin (U0 + 1)} {o : M.Channel → Fin U1} {z : M.Slot} :
(P.ids n o z).length = (P.given n o z).card
def Cslib.Circuits.Arithmetic.Separation.Cut.Plan.givenAt {F : Type u_1} [CommSemiring F] {A A' E U0 U1 : ℕ} {M : Moves F (A + A') E} (P : Plan M U0 U1) (n : Fin A → Fin A → Fin (U0 + 1)) (o : M.Channel → Fin U1) (x : Fin E) :
Finset (UnitId A U0 M.Channel U1)

The units given in the move x.

@[simp]
theorem Cslib.Circuits.Arithmetic.Separation.Cut.Plan.mem_givenAt {F : Type u_1} [CommSemiring F] {A A' E U0 U1 : ℕ} {M : Moves F (A + A') E} {P : Plan M U0 U1} {n : Fin A → Fin A → Fin (U0 + 1)} {o : M.Channel → Fin U1} {x : Fin E} {id : UnitId A U0 M.Channel U1} :
id ∈ P.givenAt n o x ↔ ∃ (e : (M.law x).Slot), id ∈ P.given n o ⟨x, e⟩
theorem Cslib.Circuits.Arithmetic.Separation.Cut.Plan.seenAt_succ {F : Type u_1} [CommSemiring F] {A A' E U0 U1 : ℕ} {M : Moves F (A + A') E} {n : Fin A → Fin A → Fin (U0 + 1)} {o : M.Channel → Fin U1} (x : Fin E) :
seenAt n o (↑x + 1) = seenAt n o ↑x ∪ newUnits M x o

The units seen after the move x are those seen before it and its new units.

theorem Cslib.Circuits.Arithmetic.Separation.Cut.Plan.cur_succ {F : Type u_1} [CommSemiring F] {A A' E U0 U1 cap : ℕ} {M : Moves F (A + A') E} {P : Plan M U0 U1} {n : Fin A → Fin A → Fin (U0 + 1)} {o : M.Channel → Fin U1} (hP : P.Ok cap) (x : Fin E) :
P.cur n o (↑x + 1) = P.cur n o ↑x \ P.givenAt n o x ∪ newUnits M x o

The current units after the move x: the units given in the move are taken away, and its new units are added.

theorem Cslib.Circuits.Arithmetic.Separation.Cut.Plan.value_move {F : Type u_1} [CommSemiring F] {A A' E U0 U1 ub cap : ℕ} {M : Moves F (A + A') E} {P : Plan M U0 U1} {n : Fin A → Fin A → Fin (U0 + 1)} {o : M.Channel → Fin U1} [(n : Fin A → Fin A → Fin (U0 + 1)) → (o : M.Channel → Fin U1) → (x : Fin E) → Decidable (P.Good n o x)] (hP : P.Ok cap) (hub : 0 < ub) (hgood : ∀ (n : Fin A → Fin A → Fin (U0 + 1)) (o : M.Channel → Fin U1) (x : Fin E), P.Possible n o ub x → P.Good n o x) {m : Fin E → ℕ} (hm : ∀ (x : Fin E), (M.law x).LengthLE (m x)) (hU1 : ∀ (x : Fin E), cap * (m x + (M.law x).labelLength) + 1 ≤ U1) (x : Fin E) {y : Fin (A + A') → UnitId A U0 M.Channel U1 → UnitContent ub} (hy : y ∈ Play.contents (UnitId.holder M.channelParty) none (seenAt n o ↑x)) (hne : ∀ (a : Fin (A + A')), ∀ id ∈ seenAt n o ↑x, Play.Holds (UnitId.holder M.channelParty) a id → y a id ≠ none) :
(if Play.Agree (UnitId.holder M.channelParty) (P.givenAt n o x) y then 1 else 0) = ∑ oo : (M.law x).Channel → Fin U1, ∑ z ∈ Play.common none (newUnits M x (M.setOutcome o x oo)), if P.Good n (M.setOutcome o x oo) x then ∏ p : (M.law x).Role, roleTableAt P n (M.setOutcome o x oo) ⟨x, p⟩ (Play.extend (UnitId.holder M.channelParty) (newUnits M x (M.setOutcome o x oo)) y z (M.party x p)) else 0

The identity of one move of a plan. For contents y of the units seen before the move x whose copies at their holders are present, the condition that the two copies of every unit given in the move agree is the sum, over the allowed outcomes of the move and over the common contents of its new units, of the product of the tables of its roles. Every possible outcome is allowed, the strings of the law of a move have at most m x bits, and the strings on its channels have at most U1 units.

theorem Cslib.Circuits.Arithmetic.Separation.Cut.Plan.value_moves {F : Type u_1} [CommSemiring F] {A A' E U0 U1 ub cap : ℕ} {M : Moves F (A + A') E} {P : Plan M U0 U1} [(n : Fin A → Fin A → Fin (U0 + 1)) → (o : M.Channel → Fin U1) → (x : Fin E) → Decidable (P.Good n o x)] (hP : P.Ok cap) (hub : 0 < ub) (hgood : ∀ (n : Fin A → Fin A → Fin (U0 + 1)) (o : M.Channel → Fin U1) (x : Fin E), P.Possible n o ub x → P.Good n o x) {m : Fin E → ℕ} (hm : ∀ (x : Fin E), (M.law x).LengthLE (m x)) (hU1 : ∀ (x : Fin E), cap * (m x + (M.law x).labelLength) + 1 ≤ U1) (n : Fin A → Fin A → Fin (U0 + 1)) (init : Fin (A + A') → (UnitId A U0 M.Channel U1 → UnitContent ub) → F) (hloc : ∀ (a : Fin (A + A')) (y y' : UnitId A U0 M.Channel U1 → UnitContent ub), (∀ (b c : Fin A) (k : Fin U0), y (UnitId.init b c k) = y' (UnitId.init b c k)) → init a y = init a y') (hinit : ∀ (a : Fin (A + A')) (y : UnitId A U0 M.Channel U1 → UnitContent ub), init a y ≠ 0 → ∀ id ∈ initialUnits n, Play.Holds (UnitId.holder M.channelParty) a id → y id ≠ none) :
(Play.value (UnitId.holder M.channelParty) none (initialUnits n) (initialUnits n) fun (y : Fin (A + A') → UnitId A U0 M.Channel U1 → Option (BitString ub)) => ∏ a : Fin (A + A'), init a (y a)) = ∑ o : M.Channel → Fin U1, if ∀ (x : Fin E), P.Good n o x then Play.value (UnitId.holder M.channelParty) none (seenAt n o E) (P.cur n o E) fun (y : Fin (A + A') → UnitId A U0 M.Channel U1 → Option (BitString ub)) => ∏ a : Fin (A + A'), partyTable P n o (init a) a (y a) else 0

The moves of a plan keep the value. The value of the position at the beginning, with the units of the strings between the base parties and the tables init of the parties, is the sum, over the allowed outcomes of all moves, of the values of the positions in the end, where the table of a party is its table at the beginning times the tables of its roles. The plan obeys the rules, every possible outcome is allowed, the strings of the law of a move have at most m x bits, and the strings on its channels have at most U1 units. The tables at the beginning read the initial units only, and vanish unless the initial units that the party holds are present.