proposition: Lemma try_catch_exc : forall E Err R exc (k :void -> itree (exceptE Err +' E) R) (kcatch : Err -> itree (exceptE Err +' E) R), try_catch (Vis (inl1 (Throw exc)) k ) kcatch ≅ kcatch exc.
proof: Proof. intros. unfold try_catch. unfold iter, Iter_Kleisli, Basics.iter, MonadIter_itree. rewrite unfold_iter. cbn. unfold ITree.map. rewrite bind_bind. setoid_rewrite bind_ret_l. rewrite bind_ret_r. reflexivity. Qed.
imports: Coq(Morphisms) ExtLib(Structures.Monad) Paco(paco) ITree(ITree ITreeFacts Events.Exception)