Laws for state interpretation #
Exact computation rules for ITree.interpState and ITree.runState.
State operations take one silent step, ordinary ITree steps are preserved,
and external events remain visible.
@[simp]
theorem ITree.interpState_pure {σ : Type uσ} {E : PFunctor.{uEA, uσ}} {α : Type uα} (s : σ) (r : α) :
@[simp]
theorem ITree.interpState_step {σ : Type uσ} {E : PFunctor.{uEA, uσ}} {α : Type uα} (s : σ) (t : ITree (StateE σ + E) α) :
@[simp]
theorem ITree.interpState_get {σ : Type uσ} {E : PFunctor.{uEA, uσ}} {α : Type uα} (s : σ) (k : σ → ITree (StateE σ + E) α) :
@[simp]
theorem ITree.interpState_put {σ : Type uσ} {E : PFunctor.{uEA, uσ}} {α : Type uα} (s s' : σ) (k : PUnit.{uσ + 1} → ITree (StateE σ + E) α) :
@[simp]
theorem ITree.interpState_query_external {σ : Type uσ} {E : PFunctor.{uEA, uσ}} {α : Type uα} (s : σ) (e : E.A) (k : E.B e → ITree (StateE σ + E) α) :
@[simp]
theorem ITree.runState_eq_interpState {σ : Type uσ} {E : PFunctor.{uEA, uσ}} {α : Type uα} (t : ITree (StateE σ + E) α) (s : σ) :