Section EquivalenceUpToTaus.
Context {E : Type -> Type} {R : Type}.
(** The standard [itree] equivalence: "Equivalence Up To Taus", or _weak bisimulation_. *)
Definition eutt : itree E R -> itree E R -> Prop :=
ITree.Eq.Eq.eutt eq.
Infix "≈" := eutt (at level 40).
(** [eutt] is an equivalence relation. *)
Global Instance Equivalence_eutt : Equivalence eutt.
Hint Rewrite @interp_ret : itree.
Hint Rewrite @interp_vis : itree.
Hint Rewrite @interp_trigger : itree.
Hint Rewrite @interp_bind : itree.
(** **** Simple recursion: [rec] *)
(** [rec body] is equivalent to [interp (recursive body)], where [recursive] is defined as follows. *)
Definition recursive {E A B} (f : A -> itree (callE A B +' E) B)
: (callE A B +' E) ~> itree E
:= case_ (calling' (rec f)) ITree.trigger.

Lemma interp_recursive_call
: forall {E A B} (f : A -> itree (callE A B +' E) B) (x : A),
interp (recursive f) (call x)
≈ rec f x.