(** * 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_mon {E R1 R2} RR RR' (b1 b2 b1' b2': bool)
(LEb1: b1 -> b1')
(LEb2: b2 -> b2')
(LERR: RR <2= RR'):
@eqit E R1 R2 RR b1 b2 <2= eqit RR' b1' b2'.