While this submission is a draft, it cannot be used by other submissions.

Leader election on a three-cycle

Lax755887.LeaderElection · concepts/Lax755887/LeaderElection.lean · lax-755887

definition

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Definition

    A protocol selects a unique position. Equivariance means that rotating the input rotates the output by the same amount. A uniform input cannot support both properties.

    Concept map
    1 concept; 2 descendants hidden
    100%
    Proven claimOpen claimDefinitionThis conceptRelated conceptA → B: B builds on A

    Lean source view on GitHub

    1import Mathlib
    2
    3/-!
    4---
    5title: Leader election on a three-cycle
    6type: definition
    7---
    8A protocol selects a unique position. Equivariance means that rotating the input rotates the output by the same amount. A uniform input cannot support both properties.
    9-/
    10
    11namespace Lax755887.LeaderElection
    12
    13abbrev State := Fin 3 → Bool
    14
    15def next (i : Fin 3) : Fin 3 := ⟨(i.val + 1) % 3, Nat.mod_lt _ (by decide)⟩
    16def rotate (s : State) : State := fun i => s (next i)
    17def UniqueLeader (run : State → State) : Prop := ∀ s, ∃! i, run s i = true
    18def Equivariant (run : State → State) : Prop := ∀ s, run (rotate s) = rotate (run s)
    19
    20structure Protocol where
    21 run : State → State
    22 elects : UniqueLeader run
    23
    24end Lax755887.LeaderElection
    25

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…