Documentation

CommunicationComplexity.Deterministic.Subprotocol

inductive CommunicationComplexity.Deterministic.Protocol.IsSubprotocol {X : Type u_1} {Y : Type u_2} {α : Type u_3} :
Protocol X Y αProtocol X Y αProp

IsSubprotocol s p means s is a (rooted) subtree of protocol p.

Instances For
    theorem CommunicationComplexity.Deterministic.Protocol.IsSubprotocol.trans {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s t u : Protocol X Y α} (h1 : s.IsSubprotocol t) (h2 : t.IsSubprotocol u) :

    Transitivity of subprotocol embeddings.

    Protocol-level version of R&Y Lemma 1.8: if a protocol has more than 1 leaf there is a subprotocol with a reasonable number of leaves.

    inductive CommunicationComplexity.Deterministic.Protocol.SubprotocolPath {X : Type u_1} {Y : Type u_2} {α : Type u_3} :
    Protocol X Y αProtocol X Y αType (max (max u_1 u_2) u_3)

    Type-valued witness for a subtree embedding, used for data-carrying recursion. It is a witness that s is a subprotocol of p containing the choices from the root of p to the root of s.

    Instances For

      Every SubprotocolPath induces an IsSubprotocol proof.

      Equations
      • =
      Instances For

        If s is a subprotocol of p, then there is a path from the root of p to the root of s.

        noncomputable def CommunicationComplexity.Deterministic.Protocol.choosePath {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.IsSubprotocol p) :

        Classical choice of a witness (a SubprotocolPath) from a proof that something is a Subprotocol.

        Equations
        Instances For

          A SubprotocolPath won't have any more leaves than its parent.

          def CommunicationComplexity.Deterministic.Protocol.reachXPath {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.SubprotocolPath p) :
          Set X

          Alice-side predicate set for the inputs that reach a chosen subprotocol path.

          Equations
          Instances For
            def CommunicationComplexity.Deterministic.Protocol.reachYPath {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.SubprotocolPath p) :
            Set Y

            Bob-side predicate set for the inputs that reach a chosen subprotocol path.

            Equations
            Instances For
              def CommunicationComplexity.Deterministic.Protocol.reachesPath {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.SubprotocolPath p) (x : X) (y : Y) :

              A Prop which states that inputs x : X and y : Y will get you to a particular SubprotocolPath of p.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                def CommunicationComplexity.Deterministic.Protocol.reachX {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.IsSubprotocol p) :
                Set X

                The set of Alice's inputs that reach any subprotocol path to the given subprotocol.

                Equations
                Instances For
                  def CommunicationComplexity.Deterministic.Protocol.reachY {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.IsSubprotocol p) :
                  Set Y

                  The set of Bob's inputs that reach any subprotocol path to the given subprotocol.

                  Equations
                  Instances For
                    def CommunicationComplexity.Deterministic.Protocol.reaches {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.IsSubprotocol p) (x : X) (y : Y) :

                    A Prop which states that on input x : X and y : Y the protocol p reaches the subprotocol s.

                    Equations
                    Instances For
                      theorem CommunicationComplexity.Deterministic.Protocol.subprotocol_run_eq_of_reachesPath {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.SubprotocolPath p) {x : X} {y : Y} (hxy : reachesPath hsp x y) :
                      p.run x y = s.run x y

                      If on input x,y the protocol reaches subprotocolpath s of p, then running s and running p produce the same output.

                      theorem CommunicationComplexity.Deterministic.Protocol.subprotocol_run_eq_of_reaches {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.IsSubprotocol p) {x : X} {y : Y} (hxy : reaches hsp x y) :
                      p.run x y = s.run x y

                      If on input x,y the protocol reaches subprotocol s of p, then running s and running p produce the same output.

                      def CommunicationComplexity.Deterministic.Protocol.erasePath {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.SubprotocolPath p) :
                      Protocol X Y α

                      Gives you a protocol which is just p with the subprotocol s collapsed to a single leaf, and the value at that leaf is the leftmost leaf of s.

                      We need subprotocolpath because we need to find s, and that's how we do it.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        After we erase s from p, the resulting protocol has p.numLeaves - s.numLeaves + 1 leaves.

                        theorem CommunicationComplexity.Deterministic.Protocol.erasePath_run_outside {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.SubprotocolPath p) {x : X} {y : Y} (hxy : ¬reachesPath hsp x y) :
                        (erasePath hsp).run x y = p.run x y

                        If the input doesn't reach a subprotocolpath s, then running p on that input is the same as running p with s erased.

                        theorem CommunicationComplexity.Deterministic.Protocol.erase_numLeaves {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.IsSubprotocol p) :
                        theorem CommunicationComplexity.Deterministic.Protocol.erase_run_outside {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.IsSubprotocol p) {x : X} {y : Y} (hxy : ¬reaches hsp x y) :
                        (erase hsp).run x y = p.run x y
                        def CommunicationComplexity.Deterministic.Protocol.deletePath {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.SubprotocolPath p) :
                        Option (Protocol X Y α)

                        Delete a selected subtree by splicing; returns none only at the root case.

                        Equations
                        Instances For
                          theorem CommunicationComplexity.Deterministic.Protocol.deletePath_exists_of_lt {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.SubprotocolPath p) (hlt : s.numLeaves < p.numLeaves) :
                          (q : Protocol X Y α), deletePath hsp = some q
                          noncomputable def CommunicationComplexity.Deterministic.Protocol.prunePath {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.SubprotocolPath p) (hlt : s.numLeaves < p.numLeaves) :
                          Protocol X Y α
                          Equations
                          Instances For
                            theorem CommunicationComplexity.Deterministic.Protocol.prunePath_spec {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.SubprotocolPath p) (hlt : s.numLeaves < p.numLeaves) :
                            deletePath hsp = some (prunePath hsp hlt)
                            theorem CommunicationComplexity.Deterministic.Protocol.eq_of_deletePath_none {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.SubprotocolPath p) (hnone : deletePath hsp = none) :
                            s = p
                            theorem CommunicationComplexity.Deterministic.Protocol.deletePath_numLeaves_of_some {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.SubprotocolPath p) {q : Protocol X Y α} (hq : deletePath hsp = some q) :
                            theorem CommunicationComplexity.Deterministic.Protocol.reachesPath_of_deletePath_none {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.SubprotocolPath p) (hnone : deletePath hsp = none) (x : X) (y : Y) :
                            reachesPath hsp x y
                            theorem CommunicationComplexity.Deterministic.Protocol.deletePath_run_outside_of_some {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.SubprotocolPath p) {q : Protocol X Y α} (hq : deletePath hsp = some q) {x : X} {y : Y} (hxy : ¬reachesPath hsp x y) :
                            q.run x y = p.run x y
                            theorem CommunicationComplexity.Deterministic.Protocol.prunePath_run_outside_of_lt {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.SubprotocolPath p) (hlt : s.numLeaves < p.numLeaves) {x : X} {y : Y} (hxy : ¬reachesPath hsp x y) :
                            (prunePath hsp hlt).run x y = p.run x y
                            theorem CommunicationComplexity.Deterministic.Protocol.prune_numLeaves_of_lt {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.IsSubprotocol p) (hlt : s.numLeaves < p.numLeaves) :
                            theorem CommunicationComplexity.Deterministic.Protocol.prune_run_outside_of_lt {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.IsSubprotocol p) (hlt : s.numLeaves < p.numLeaves) {x : X} {y : Y} (hxy : ¬reaches hsp x y) :
                            (prune hsp hlt).run x y = p.run x y
                            noncomputable def CommunicationComplexity.Deterministic.Protocol.testSubprotocol {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.IsSubprotocol p) (qIn qOut : Protocol X Y α) :
                            Protocol X Y α
                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              @[simp]
                              theorem CommunicationComplexity.Deterministic.Protocol.testSubprotocol_complexity {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p : Protocol X Y α} (hsp : s.IsSubprotocol p) (qIn qOut : Protocol X Y α) :
                              theorem CommunicationComplexity.Deterministic.Protocol.testSubprotocol_run_inside {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p qIn qOut : Protocol X Y α} (hsp : s.IsSubprotocol p) {x : X} {y : Y} (hxy : reaches hsp x y) :
                              (testSubprotocol hsp qIn qOut).run x y = qIn.run x y
                              theorem CommunicationComplexity.Deterministic.Protocol.testSubprotocol_run_outside {X : Type u_1} {Y : Type u_2} {α : Type u_3} {s p qIn qOut : Protocol X Y α} (hsp : s.IsSubprotocol p) {x : X} {y : Y} (hxy : ¬reaches hsp x y) :
                              (testSubprotocol hsp qIn qOut).run x y = qOut.run x y