AFTD Auto-Formalizing Theoretical Domains

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.
Verified
08 Oct 2026
Axioms
none listed
Built on 5

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
See it in the graphDiscuss this resultChallenge it