Cslib.FLP.ZeroFaultAlg.alg
defimported Lean
alg is the asynchronous distributed consensus algorithm described above.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Set Sum Option Multiset in variable {n : ℕ} (npos : 0 < n) in def Cslib.FLP.ZeroFaultAlg.alg : Algorithm (Fin n) M S
- Defined in
- CSLib, `Cslib.FLP.ZeroFaultAlg.alg`
- Lean proof
- By Ching-Tsun Chou, from github.com/leanprover/cslib at
3951377e5a3f(Copyright (c) 2026 Ching-Tsun Chou. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.33.0.Cslib.FLP.ZeroFaultAlg.alg← Cslib.FLP.ZeroFaultAlg.alg (Cslib/Computability/Distributed/FLP/ZeroConsensus.lean:45): verbatim
- Verified
- 08 Oct 2026
- Axioms
- none listed
- Built on 5
- Cslib.FLP.AlgorithmThe specification of a distributed algorithm for solving the consensus problem. Note that each field below can depend on a process's…
- Cslib.FLP.MessageThe type of messages that processes send to each other.
- Cslib.FLP.ZeroFaultAlg.MThe payload of a message is of type
Bool ⊕ Bool, whereinl bdenotes an input valuebandinr bdenotes a valuebsent by… - Cslib.FLP.ZeroFaultAlg.SThe local state of a process is trivial.
- Cslib.FLP.ProcStateThe type of a process's local state.
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in open Set Sum Option Multiset in variable {n : ℕ} (npos : 0 < n) in /-- `alg` is the asynchronous distributed consensus algorithm described above. -/ def Cslib.FLP.ZeroFaultAlg.alg : Algorithm (Fin n) M S where init _ := () next _ _ := () send m _ := match m.msg with | inl b => if m.dest = ⟨0, npos⟩ then Multiset.map (fun p ↦ ⟨p, inr b⟩) Finset.univ.val else 0 | inr _ => 0 out m _ := match m.msg with | inl _ => none | inr b => some b