Section Correctness.
(* The first parameter of [bisimilar] is unnecessary for this development. The return type is heterogeneous, the singleton type [F 1] on one side and [unit] on the other, hence we instantiate the parameter with the trivial relation. *)
Definition TT {A B}: A -> B -> Prop  := fun _ _ => True.
Hint Unfold TT.
Definition equivalent (s:stmt) (t:asm 1 1) : Prop :=
bisimilar TT (denote_imp s) (denote_asm t f0).
Inductive RI : (unit + unit) -> (unit + unit + unit) -> Prop :=
| RI_inl : RI (inl tt) (inl (inl tt))
| RI_inr : RI (inr tt) (inr tt).
Definition to_itree' {E A} (f : ktree_fin E 1 A) : itree E (fin A) := f f0.

Lemma fold_to_itree' {E} (f : ktree_fin E 1 1) : f f0 = to_itree' f.