Documentation

CslibFrontier.Computability.Circuit.Arithmetic.Separation.TowerPlan.StartLoads

The tower plan: loads of relays, and the loads after the start #

The load of a target in the tower plan of [Ant26] (proof of Theorem H.2; modules Nc.Tow.Load2 and Nc.Tow.Load0) is the number of initial units with that target plus the alive units of the channels of the relays and of the law moves with that target (load_eq_sum). A relay uses at most the load of its input, and each of its channels carries at most the units of the relay. Following the targets of the channels backwards, the relays of the route of a batch of initial units use at most the size of the batch (moveCount_start_le), and the relays of the way of an edge through the next level use at most the units on the edge, and none if the type of the edge is not the chosen one (moveCount_middle_le). The routes use every edge of the level 0 at most Uu times, which bounds the loads after the start (load_start_le).

Main definitions #

Main results #

References #

Loads by channels #

noncomputable def Cslib.Circuits.Arithmetic.Separation.TowerPlan.relayAlive {F : Type u_1} [CommSemiring F] {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {ch : Fin A ↪ T.X 0} {FL : VertexLaws F T} (lhat : ℕ) (n : Fin A → Fin A → ℕ) (o : MoveChannel R ch FL → ℕ) (x : Relay T m A) (d : Bool) :

The alive units of the channel d of the relay x, and 0 if x is not a move of the plan.

theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.relayAlive_of_occurs {F : Type u_1} [CommSemiring F] {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {ch : Fin A ↪ T.X 0} {FL : VertexLaws F T} {lhat : ℕ} {n : Fin A → Fin A → ℕ} {o : MoveChannel R ch FL → ℕ} {x : Relay T m A} (hx : Relay.Occurs R ch x) (d : Bool) :
relayAlive lhat n o x d = alive lhat n o ⟨Move.relay x hx, d⟩

The alive units of a channel of a relay of the plan.

theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.relayAlive_of_not_occurs {F : Type u_1} [CommSemiring F] {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {ch : Fin A ↪ T.X 0} {FL : VertexLaws F T} {lhat : ℕ} {n : Fin A → Fin A → ℕ} {o : MoveChannel R ch FL → ℕ} {x : Relay T m A} (hx : ¬Relay.Occurs R ch x) (d : Bool) :
relayAlive lhat n o x d = 0

A relay that is not a move of the plan has no alive units.

theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.load_eq_sum {F : Type u_1} [CommSemiring F] {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {ch : Fin A ↪ T.X 0} {FL : VertexLaws F T} {lhat : ℕ} {n : Fin A → Fin A → ℕ} {o : MoveChannel R ch FL → ℕ} (τ : Target T m A) :
load lhat n o τ = (initialLoad R ch lhat n τ + ∑ x : Relay T m A, ∑ d : Bool, if Relay.target R ch x d = τ then relayAlive lhat n o x d else 0) + ∑ l : VertexMove FL, ∑ c : (Move.vertex l).law.Channel, if (Move.vertex l).target c = τ then alive lhat n o ⟨Move.vertex l, c⟩ else 0

The load of a target, by the initial units, the relays and the law moves.

theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.load_eq_relay {F : Type u_1} [CommSemiring F] {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {ch : Fin A ↪ T.X 0} {FL : VertexLaws F T} {lhat : ℕ} {n : Fin A → Fin A → ℕ} {o : MoveChannel R ch FL → ℕ} {τ : Target T m A} (hτ : ∀ (l : VertexMove FL) (c : (Move.vertex l).law.Channel), (Move.vertex l).target c ≠ τ) :
load lhat n o τ = initialLoad R ch lhat n τ + ∑ x : Relay T m A, ∑ d : Bool, if Relay.target R ch x d = τ then relayAlive lhat n o x d else 0

The load of a target that no law move gives, by the initial units and the relays.

theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.load_le_relayAlive {F : Type u_1} [CommSemiring F] {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {ch : Fin A ↪ T.X 0} {FL : VertexLaws F T} {lhat : ℕ} {n : Fin A → Fin A → ℕ} {o : MoveChannel R ch FL → ℕ} {τ : Target T m A} (hτ : ∀ (l : VertexMove FL) (c : (Move.vertex l).law.Channel), (Move.vertex l).target c ≠ τ) (y : Relay T m A) (dy : Bool) (hy : ∀ (x : Relay T m A) (d : Bool), Relay.target R ch x d = τ → relayAlive lhat n o x d ≠ 0 → x = y ∧ d = dy) :
load lhat n o τ ≤ initialLoad R ch lhat n τ + relayAlive lhat n o y dy

A load that the relays give through one channel only.

Relays #

theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.alive_le_moveCount {F : Type u_1} [CommSemiring F] {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {ch : Fin A ↪ T.X 0} {FL : VertexLaws F T} {lhat : ℕ} {n : Fin A → Fin A → ℕ} {o : MoveChannel R ch FL → ℕ} (x : Relay T m A) (hx : Relay.Occurs R ch x) (d : Bool) :
alive lhat n o ⟨Move.relay x hx, d⟩ ≤ moveCount lhat n o (Move.relay x hx)

A channel of a relay carries at most the units of the relay.

theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.moveCount_relay_le {F : Type u_1} [CommSemiring F] {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {ch : Fin A ↪ T.X 0} {FL : VertexLaws F T} {lhat : ℕ} {n : Fin A → Fin A → ℕ} {o : MoveChannel R ch FL → ℕ} (x : Relay T m A) (hx : Relay.Occurs R ch x) :
moveCount lhat n o (Move.relay x hx) ≤ load lhat n o x.input

A relay uses at most the load of its input.

@[simp]
theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.stepTarget_ne_relay {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {c c' γ : T.X 0} {s : ℕ} {y : Relay T m A} :

The units on a step of a route are done or lie on an edge of the level 0.

@[simp]
theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.stepTarget_ne_segment {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {c c' γ : T.X 0} {s : ℕ} {j : Fin J} {i : Fin h} {ω : T.V (↑j + 1) i} {q : Sym2 T.Fl} :
stepTarget R c c' γ s ≠ Target.segment j i ω q

The units on a step of a route are not end segments.

@[simp]
theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.stepTarget_ne_edge_succ {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {c c' γ : T.X 0} {s : ℕ} {j : Fin J} {e : T.Ed (↑j + 1)} :
stepTarget R c c' γ s ≠ Target.edge j.succ e

The units on a step of a route do not lie on an edge of a later level.

theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.Relay.of_target_eq_relay_middle {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {ch : Fin A ↪ T.X 0} {x : Relay T m A} {d : Bool} {j : Fin J} {e : T.Ed ↑j} {s : Fin 4} (hx : target R ch x d = Target.relay (middle j e s)) :
d = true ∧ (s = 1 ∧ x = middle j e 0 ∨ s = 2 ∧ (x = middle j e 0 ∧ T.hostOf (T.ty e) (T.e0 e) = T.π (T.e0 e) ∨ x = middle j e 1) ∨ s = 3 ∧ x = middle j e 2)

The relays that give units to a step of the way of an edge through the next level: the first step to the second, or to the third if the host of the first end of the edge is its image; the second step to the third, and the third to the fourth.

Initial units #

noncomputable def Cslib.Circuits.Arithmetic.Separation.TowerPlan.batchSize {h b D J r A : ℕ} {T : CoveringTower.Tower h b D J r} (ch : Fin A ↪ T.X 0) (lhat : ℕ) (n : Fin A → Fin A → ℕ) (a c : Fin A) (γ : T.X 0) :

The number of initial units from a to c that are led through the chamber γ; there are none if a base party has too many units.

theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.batchSize_le {h b D J r A : ℕ} {T : CoveringTower.Tower h b D J r} {ch : Fin A ↪ T.X 0} {lhat : ℕ} {n : Fin A → Fin A → ℕ} (a c : Fin A) (γ : T.X 0) :
batchSize ch lhat n a c γ ≤ n a c / Fintype.card (T.X 0) + 1

The batches have equal sizes up to one.

theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.time_initialTarget_le {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {ch : Fin A ↪ T.X 0} {a c : Fin A} {k : ℕ} (hd : initialTarget R ch a c k ≠ Target.done) :
(initialTarget R ch a c k).time ≤ 2 * m

The initial units are done, or their target is made by the end of the start.

theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.initialLoad_eq_zero {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {ch : Fin A ↪ T.X 0} {lhat : ℕ} {n : Fin A → Fin A → ℕ} {τ : Target T m A} (hd : τ ≠ Target.done) (hτ : 2 * m < τ.time) :
initialLoad R ch lhat n τ = 0

No initial units have a target that is made after the start.

The relays of a route #

theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.moveCount_start_le {F : Type u_1} [CommSemiring F] {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {ch : Fin A ↪ T.X 0} {FL : VertexLaws F T} {lhat : ℕ} {n : Fin A → Fin A → ℕ} {o : MoveChannel R ch FL → ℕ} {a c : Fin A} {γ : T.X 0} {s : Fin (2 * m)} (hx : Relay.Occurs R ch (Relay.start a c γ s)) :
moveCount lhat n o (Move.relay (Relay.start a c γ s) hx) ≤ batchSize ch lhat n a c γ

The relays of a route use at most the units of its batch.

The way of an edge through the next level #

theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.moveCount_middle_le {F : Type u_1} [CommSemiring F] {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {ch : Fin A ↪ T.X 0} {FL : VertexLaws F T} {lhat : ℕ} {n : Fin A → Fin A → ℕ} {o : MoveChannel R ch FL → ℕ} {j : Fin J} {e : T.Ed ↑j} {s : Fin 4} (hx : Relay.Occurs R ch (Relay.middle j e s)) :
moveCount lhat n o (Move.relay (Relay.middle j e s) hx) ≤ if T.IsChosenType (edgeLoads (load lhat n o) ↑j) (T.ty e) then load lhat n o (Target.edge j.castSucc e) else 0

The relays of the way of an edge through the next level use at most the units on the edge, and none if the type of the edge is not the chosen one.

theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.relayAlive_middle_le {F : Type u_1} [CommSemiring F] {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {ch : Fin A ↪ T.X 0} {FL : VertexLaws F T} {lhat : ℕ} {n : Fin A → Fin A → ℕ} {o : MoveChannel R ch FL → ℕ} (j : Fin J) (e : T.Ed ↑j) (s : Fin 4) (d : Bool) :
relayAlive lhat n o (Relay.middle j e s) d ≤ if T.IsChosenType (edgeLoads (load lhat n o) ↑j) (T.ty e) then edgeLoads (load lhat n o) (↑j) e else 0

The channels of the relays of the way of an edge carry at most the units on the edge, and none if the type of the edge is not the chosen one.

theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.relayAlive_inner_le {F : Type u_1} [CommSemiring F] {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {ch : Fin A ↪ T.X 0} {FL : VertexLaws F T} {lhat : ℕ} {n : Fin A → Fin A → ℕ} {o : MoveChannel R ch FL → ℕ} (j : Fin J) (i : Fin h) (e : T.Ed ↑j) (d : Bool) :
relayAlive lhat n o (Relay.inner j i e) d ≤ if T.IsChosenType (edgeLoads (load lhat n o) ↑j) i then edgeLoads (load lhat n o) (↑j) e else 0

The channels of an inner relay carry at most the units on its edge, and none if its type is not the chosen one.

theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.relayAlive_final_le {F : Type u_1} [CommSemiring F] {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {ch : Fin A ↪ T.X 0} {FL : VertexLaws F T} {lhat : ℕ} {n : Fin A → Fin A → ℕ} {o : MoveChannel R ch FL → ℕ} (e : T.Ed J) (d : Bool) :
relayAlive lhat n o (Relay.final e) d ≤ edgeLoads (load lhat n o) J e

The channels of a relay after the last stage carry at most the units on its edge.

The loads after the start #

theorem Cslib.Circuits.Arithmetic.Separation.TowerPlan.load_start_le {F : Type u_1} [CommSemiring F] {h b D J r m Uu A : ℕ} {T : CoveringTower.Tower h b D J r} {R : CoveringTower.Routes T m Uu} {ch : Fin A ↪ T.X 0} {FL : VertexLaws F T} {lhat : ℕ} {n : Fin A → Fin A → ℕ} {o : MoveChannel R ch FL → ℕ} (e : T.Ed 0) :
load lhat n o (Target.edge 0 e) ≤ Uu * (lhat / Fintype.card (T.X 0) + 2 * A)

The loads after the start ([Ant26], Theorem H.2, proof, "Start", pp. 46–47): an edge of the level 0 carries at most Uu * (lhat / |X 0| + 2 * A) alive units, where every base party has at most lhat initial units (otherwise there are none) and the routes use every edge at most Uu times.