All proofs
Project-declaredLean 4.33.0-rc1 · mathlib@169c26b52a38

Recv Msg comm

Cslib.FLP.Algorithm.recvMsg_comm

Plain-language statement

If m1 and m2 are both inflight and they have different destinations, then receiving them in either order produces the same end state.

Exact Lean statement

theorem recvMsg_comm {m1 m2 : Message P M} {s : State P M S}
    (hd : m1.dest ≠ m2.dest) (h1 : m1 ∈ s.msgs) (h2 : m2 ∈ s.msgs) :
    m2 ∈ (a.recvMsg m1 s).msgs ∧ m1 ∈ (a.recvMsg m2 s).msgs ∧
    a.recvMsg m2 (a.recvMsg m1 s) = a.recvMsg m1 (a.recvMsg m2 s)

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem recvMsg_comm {m1 m2 : Message P M} {s : State P M S}    (hd : m1.dest  m2.dest) (h1 : m1  s.msgs) (h2 : m2  s.msgs) :    m2  (a.recvMsg m1 s).msgs  m1  (a.recvMsg m2 s).msgs     a.recvMsg m2 (a.recvMsg m1 s) = a.recvMsg m1 (a.recvMsg m2 s) := by  rw [State.mk.injEq]  split_ands  · grind [Algorithm.recvMsg, mem_erase_of_ne]  · grind [Algorithm.recvMsg, mem_erase_of_ne]  · have he1 (x) : (s.msgs.erase m1 + x).erase m2 = (s.msgs.erase m1).erase m2 + x := by      grind [erase_add_left_pos, mem_erase_of_ne]    have he2 (x) : (s.msgs.erase m2 + x).erase m1 = (s.msgs.erase m1).erase m2 + x := by      grind [erase_add_left_pos, mem_erase_of_ne, erase_comm]    simp [Algorithm.recvMsg, hd, hd.symm, he1, he2, add_assoc]    grind [add_comm]  · ext p    by_cases h_p1 : p = m1.dest <;> by_cases h_p2 : p = m2.dest <;>      simp [Algorithm.recvMsg, h_p1, h_p2, hd, hd.symm]
Project
Lean Computer Science Library
License
Apache-2.0
Commit
f36649cff2c9
Source
Cslib/Computability/Distributed/FLP/Algorithm.lean:182-198

Reuse this declaration

Bring the exact result into your workflow

The import identifies the source module. Your project still needs the pinned package dependency shown on this page.

What this badge means

This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.

Continue in this project

Related declarations

Project-declaredLean 4.33.0-rc1

Unique minimal

Cslib.Automata.DA.FinAcc.unique_minimal

Plain-language statement

The minimal DFA M accepting the language l is unique up to unique isomorphism.

computer sciencecomputabilityprogram semantics

Source project: Lean Computer Science Library

Person-level attribution pending.

View proof record
Project-declaredLean 4.33.0-rc1

Buchi Family cover

Cslib.Automata.NA.Buchi.buchiFamily_cover

Project documentation

na.buchiFamily is a cover if na has only finitely many states. This theorem uses the Ramsey theorem for infinite graphs and does not depend on any details of na.BuchiCongruence other than that it is of finite index.

computer sciencecomputabilityprogram semantics

Source project: Lean Computer Science Library

Person-level attribution pending.

View proof record