Internal Utility functions #
Definition of alive Token Ids
Equations
- One or more equations did not get rendered due to their size.
Instances For
Get alive token keys
Equations
- MUList.InternalUtils.alive_keys s = List.filterMap (fun (x : Option (Tokens.Elem.TokenD (MUList.State.Elemt MUList.State.Key α))) => do let x ← x x.data.key) s
Instances For
def
MUList.InternalUtils.all_alive_tids
{α : Type}
(s : State.ListST α)
(f : Tokens.Elem.TokenD (State.Elemt State.Key α) × Nat → Bool)
(k : Nat := 0)
:
Forall alive tokens
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
MUList.InternalUtils.alive_after_burn
{α : Type}
{s s' : State.ListST α}
{t : Tokens.Elem.TId}
{k : State.Key}
(Hs : Tokens.State.Tokens.burn t s = some s')
(HKey : State.ListST.get_key t s = some k)
:
All alive Invariant utils #
def
MUList.InternalUtils.find_token?
{α : Type}
(s : State.ListST α)
(P : Tokens.Elem.TokenD (State.Elemt State.Key α) → Bool)
:
Finds first token holding P
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
MUList.InternalUtils.find_token_eq_none
{α : Type}
{s : State.ListST α}
{P : Tokens.Elem.TokenD (State.Elemt State.Key α) → Bool}
:
find_token? s P = none ↔ ∀ (p : Tokens.Elem.TId),
match Tokens.State.Tokens.get p s with
| some tkn => ¬P tkn = true
| none => True
theorem
MUList.InternalUtils.find_token_eq_some_iff
{α : Type}
{s : State.ListST α}
{P : Tokens.Elem.TokenD (State.Elemt State.Key α) → Bool}
{t : Tokens.Elem.TokenD (State.Elemt State.Key α)}
:
def
MUList.InternalUtils.find_tokenSome?
{α β : Type}
(s : State.ListST α)
(P : Tokens.Elem.TokenD (State.Elemt State.Key α) → Option β)
:
Option β
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
MUList.InternalUtils.find_key_update
{α : Type}
{s s' : State.ListST α}
{tid : Tokens.Elem.TId}
{d : α}
(HStep : Relation.Rel s (State.Actions.ModifyData tid d) s')
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.