Download formal/SovereignApollo/CommState.lean from Snapkitty/sovereign-apollo: direct link, hf CLI and curl.
- Browser
- Download file 552 Bytes
-
https://huggingface.co/Snapkitty/sovereign-apollo/resolve/main/formal/SovereignApollo/CommState.lean
- Command line
-
hf download hf://Snapkitty/sovereign-apollo/formal/SovereignApollo/CommState.lean
-
curl -L -o CommState.lean https://huggingface.co/Snapkitty/sovereign-apollo/resolve/main/formal/SovereignApollo/CommState.lean
552 Bytes
| import SovereignApollo.State | |
| inductive CommsState where | |
| | Acquire | Lock | Data | Drop | |
| deriving DecidableEq, Repr | |
| def commsTransition : CommsState → CommsState → Prop | |
| | .Acquire, .Lock => True | |
| | .Lock, .Data => True | |
| | .Data, .Drop => True | |
| | .Drop, .Acquire => True | |
| | s, t => s = t -- stutter allowed | |
| theorem comms_no_skip_acquire_to_data : ¬ commsTransition .Acquire .Data := by | |
| simp [commsTransition] | |
| theorem comms_reflexive (s : CommsState) : commsTransition s s := by | |
| cases s <;> simp [commsTransition] | |