fact: Definition iterater_aux (n : nat) (rec : Box RChain n) : RChain n := fun op val => MkParser (fun _ mlen ts => Category.bind (runParser op mlen ts) (fun sop => let sopltn := Nat.le_trans _ _ _ (small sop) mlen in let op' := lt_lower sopltn op in let val' := lt_lower sopltn val in Category.bind (runParser (call rec sopltn op' val') (Nat.le_refl _) (leftovers sop)) (fun res => pure (lt_lift (small sop) (Success.map (value sop) res))))).
imports: Coq(PeanoNat) parseque(Category Induction Sized NEList Success EqDec)