(** * Strong bisimulation *)
(** Because [itree] is a coinductive type, the naive [eq] relation is too strong: most pairs of "morally equivalent" programs cannot be proved equal in the [eq] sense. [[ (* Not provable *)
Goal (cofix spin := Tau spin) = Tau (cofix spin := Tau spin).
Goal (cofix spin := Tau spin) = (cofix spin2 := Tau (Tau spin2)).
]]
As an alternative, we define a weaker, coinductive notion of equivalence,
[eqit], which can be intuitively thought of as a form of extensional
equality. We shall rely extensively on setoid rewriting.
*)
(* begin hide *)
Program
Setoid
Morphisms
RelationClasses.
Core.ITreeDefinition.
From ITree Require Export
Eq.Shallow.
Local Open Scope itree.
(* TODO: Send to paco *)
Global Instance Symmetric_bot2 (A : Type) : @Symmetric A bot2.

Lemma eqit_flip {E R1 R2} (RR : R1 -> R2 -> Prop) b1 b2:
forall (u : itree E R1) (v : itree E R2),
eqit (flip RR) b2 b1 v u -> eqit RR b1 b2 u v.