Synchronous One-Error Gossip with Correction #
Basics #
Here we define: agents, values, distributions, calls, sequents.
We use n for the number of agents.
Equations
Instances For
We allow writing just the agent a for the value ⟨a, true⟩.
Equations
- Error.instCoeAgentValue = { coe := fun (a : Error.Agent) => (a, true) }
We write ‾a for the value ⟨a, false⟩.
Equations
- Error.«term‾_» = Lean.ParserDescr.node `Error.«term‾_» 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "‾") (Lean.ParserDescr.cat `term 1023))
Instances For
An initial secret distribution, each agent only has their own value.
Equations
- Error.Dist = (Error.Agent → Bool)
Instances For
In the given distribution, invert the value for this agent i
Equations
- Error.Dist.switch x✝¹ x✝ = fun (a : Error.Agent) => if a = x✝¹ then !x✝ a else x✝ a
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
(Def 2) A sequence is a list of calls. For easy pattern matching this is in reverse order: the newest call is the first element.
Equations
Instances For
Syntax #
(Def 3) Logical language
- Top
{n : ℕ}
: Form
True constant
- Con
{n : ℕ}
: Form → Form → Form
Conjunction
- Neg
{n : ℕ}
: Form → Form
Negation
- Has
{n : ℕ}
(a : Agent)
: Value → Form
Has a (b, k)means agentahas valuekof agentb. - K
{n : ℕ}
(a : Agent)
(φ : Form)
: Form
K a φmeans agentaknows thatφis true.
Instances For
Roles #
What is the Role of i in this call?
Equations
- Error.roleOfIn i ⌜a b⌝ = if i = a then Error.Role.Caller else if i = b then Error.Role.Callee else Error.Role.Other
- Error.roleOfIn i ⌜a^err b⌝ = if i = a then Error.Role.Caller else if i = b then Error.Role.Callee else Error.Role.Other
- Error.roleOfIn i ⌜a b^err⌝ = if i = a then Error.Role.Caller else if i = b then Error.Role.Callee else Error.Role.Other
Instances For
Who is the other agent than i in this call? If i is not in the call, return caller.
Equations
Instances For
Sequences with at most one transmission error #
This sequence contains no transmission errors.
Equations
- Error.errFree [] = True
- Error.errFree (⌜caller callee⌝ :: rest) = Error.errFree rest
- Error.errFree (⌜caller^err callee⌝ :: tail) = False
- Error.errFree (⌜caller callee^err⌝ :: tail) = False
Instances For
This sequence contains at most one transmission error.
Equations
- Error.maxOne [] = True
- Error.maxOne (⌜caller callee⌝ :: rest) = Error.maxOne rest
- Error.maxOne (⌜caller^err callee⌝ :: tail) = Error.errFree tail
- Error.maxOne (⌜caller callee^err⌝ :: tail) = Error.errFree tail
Instances For
If o proves that C :: σ has at most one error then we use the
short notation ⁻o for the prove that σ has at most one error.
Equations
- Error.«term⁻_» = Lean.ParserDescr.node `Error.«term⁻_» 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "⁻") (Lean.ParserDescr.cat `term 1023))
Instances For
Sequence with at most one error.
Equations
Instances For
Subsequence relation: σ⊑τ means that τ extends σ.
Because sequences are lists with the newest call first we define this as List.IsSuffix σ τ.
Equations
- Error.«term_⊑_» = Lean.ParserDescr.trailingNode `Error.«term_⊑_» 1022 1023 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "⊑") (Lean.ParserDescr.cat `term 1023))
Instances For
Equations
- Error.instCoeOSequenceSequence = { coe := Subtype.val }
Equations
- σ.length = List.length ↑σ
Instances For
Semantics #
(Def 4) Semantics of call. What values does this agent have after this sequence?
Equations
Instances For
Right after sequence σ, what values will caller and callee contribute to the call?
Equations
Instances For
(Def 5) Observation relation. This is synchronous.
Equations
Instances For
(Def 6) Semantics.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Notation and Abbreviations #
Equations
- Error.«term¬'_» = Lean.ParserDescr.node `Error.«term¬'_» 70 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ¬'") (Lean.ParserDescr.cat `term 70))
Instances For
Equations
- Error.«term_⋀_» = Lean.ParserDescr.trailingNode `Error.«term_⋀_» 60 61 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⋀ ") (Lean.ParserDescr.cat `term 60))
Instances For
Equations
- Error.«term_⋁_» = Lean.ParserDescr.trailingNode `Error.«term_⋁_» 1022 1023 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⋁ ") (Lean.ParserDescr.cat `term 1023))
Instances For
Equations
- Error.«term_⟹_» = Lean.ParserDescr.trailingNode `Error.«term_⟹_» 1022 1023 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "⟹") (Lean.ParserDescr.cat `term 1023))
Instances For
Equations
- Error.«term_⇔_» = Lean.ParserDescr.trailingNode `Error.«term_⇔_» 1022 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⇔ ") (Lean.ParserDescr.cat `term 1022))
Instances For
We write v @ a to say that agent a has value v.
Equations
- Error.«term_@_» = Lean.ParserDescr.trailingNode `Error.«term_@_» 1022 1022 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "@") (Lean.ParserDescr.cat `term 1023))
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Error.«term⊨_» = Lean.ParserDescr.node `Error.«term⊨_» 100 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "⊨ ") (Lean.ParserDescr.cat `term 100))
Instances For
The observation relation is an equivalence #
Equations
- One or more equations did not get rendered due to their size.
Instances For
The observation relation equiv $∼_a$ is an equivalence relation.
Properties of the Semantics #
Examples #
Correct belief need not imply knowledge: given ini 2, after an initial call
ab agent a correclty believes b, but a does not know the secret of b, because a
also considers it possible that the call was a b^b instead.