Documentation

Gossip.Basic

@[reducible, inline]
abbrev GossipState (n : ) :
Equations
Instances For
    @[reducible, inline]
    abbrev Call (n : ) :
    Equations
    Instances For
      Equations
      Instances For
        def isExpert {n : } (s : GossipState n) (i : Fin n) :
        Equations
        Instances For
          def allKnow {n : } (s : GossipState n) (i : Fin n) :

          All other agents know the secret of this one.

          Equations
          Instances For
            def allExpert {n : } (s : GossipState n) :
            Equations
            Instances For
              def makeCall {n : } (s : GossipState n) :
              Equations
              Instances For
                Equations
                def makeCalls {n : } (s : GossipState n) (cs : List (Call n)) :
                Equations
                Instances For
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Equations
                  Instances For
                    def moreGossip {n : } (s1 s2 : GossipState n) :
                    Equations
                    Instances For
                      def addAgent {n : } (s : GossipState n) :
                      Equations
                      Instances For
                        instance instCoeCallSucc {n : } :
                        Coe (Call n) (Call n.succ)

                        A call among the n agents is also a call among the n+1 agents.

                        Equations
                        Equations
                        Instances For
                          def contains {n : } (σ : List (Call n)) (a : Fin n) :
                          Equations
                          Instances For
                            theorem expertMakesExpert {n : } {s : GossipState n} {i j : Fin n} :
                            isExpert s iisExpert (makeCall s (i, j)) j
                            theorem makeCalls_cons {n : } (s : GossipState n) (c : Call n) (cs : List (Call n)) :
                            makeCalls s (c :: cs) = makeCalls (makeCall s c) cs
                            theorem makeCalls_snoc {n : } (s : GossipState n) (cs : List (Call n)) (c : Call n) :
                            makeCalls s (cs ++ [c]) = makeCall (makeCalls s cs) c
                            theorem makeCall_increases_gossip {n : } (s1 s2 : GossipState n) (c : Call n) :
                            moreGossip s1 s2moreGossip (makeCall s1 c) (makeCall s2 c)
                            theorem makeCallsIncreasesGossip {n : } (s1 s2 : GossipState n) (cs : List (Call n)) :
                            moreGossip s1 s2moreGossip (makeCalls s1 cs) (makeCalls s2 cs)
                            theorem makeCallMakesGossip {n : } (s : GossipState n) (c : Call n) :
                            theorem callsIncreaseGossip {n : } (s : GossipState n) (cs : List (Call n)) :
                            theorem addAgentExpertOld {n : } {s : GossipState n} {i : Fin n} :
                            isExpert s i ∀ (j : Fin n), addAgent s i.castSucc j.castSucc