NLA-lib Explorer

NLAlib.Ops.map_whileIter

Library · theorem

NLAlib.Ops.map_whileIter {σ σ' : Type} {g : σ → σ'} {test : ℕ → σ → Option (Bool × σ)}
  {body : ℕ → σ → Option σ} {test' : ℕ → σ' → Option (Bool × σ')} {body' : ℕ → σ' → Option σ'}
  (ht : ∀ (i : ℕ) (a : σ), Option.map (Prod.map id g) (test i a) = test' i (g a))
  (hb : ∀ (i : ℕ) (a : σ), Option.map g (body i a) = body' i (g a)) (r i : ℕ) (s : σ) :
  Option.map (Prod.map id g) (Ops.whileIter test body r i s) = Ops.whileIter test' body' r i (g s)

Full source on GitHub

Import NLAlib.Ops.Exec.