Documentation

CslibFrontier.Computability.Circuit.Local

Local labelling rounds #

A labelling assigns a value to every wire of a circuit, and a round S computes a new labelling from an old one. A round is local when the new value of each wire depends only on the old values of lower-numbered wires, as for one round of evaluation on an ordered topology. Wire numbers are those of Cslib.Circuits.Wire.toNat.

Iterating a local round n + s times, once per wire, reaches its unique fixed labelling from any start. Garbling schemes use this to compute labels by iteration and to identify the result with a labelling given in closed form.

Main definitions #

Main results #

def Cslib.Circuits.IsLocal {n s : ℕ} {α : Type u_1} (S : (Wire n s → α) → Wire n s → α) :

A labelling round is local when the new label of a wire depends only on the labels of lower-numbered wires.

theorem Cslib.Circuits.IsLocal.iterate_succ {n s : ℕ} {α : Type u_1} {S : (Wire n s → α) → Wire n s → α} (hS : IsLocal S) (B : Wire n s → α) (t : ℕ) (w : Wire n s) :
w.toNat < t → S^[t + 1] B w = S^[t] B w
theorem Cslib.Circuits.IsLocal.isFixed_iterate {n s : ℕ} {α : Type u_1} {S : (Wire n s → α) → Wire n s → α} (hS : IsLocal S) (B : Wire n s → α) :
S (S^[n + s] B) = S^[n + s] B

Iterating a local round n + s times reaches a labelling it fixes.

theorem Cslib.Circuits.IsLocal.iterate_eq_of_isFixed {n s : ℕ} {α : Type u_1} {S : (Wire n s → α) → Wire n s → α} (hS : IsLocal S) (B : Wire n s → α) {A : Wire n s → α} (hA : S A = A) :
S^[n + s] B = A

Every labelling fixed by a local round is its n + s-fold iterate from any start.

theorem Cslib.Circuits.IsLocal.eq_of_isFixed {n s : ℕ} {α : Type u_1} {S : (Wire n s → α) → Wire n s → α} (hS : IsLocal S) {A B : Wire n s → α} (hA : S A = A) (hB : S B = B) :
A = B

A local round fixes at most one labelling.