proposition: Fact local_rewrite2 {a b c}: swap >>> assoc_r >>> bimap (id_ _) swap ⩯ assoc_l_ a b c >>> bimap swap (id_ _) >>> assoc_r.
proof: Proof. symmetry. apply fwd_eqn; intros h Eq. do 2 apply (cat_eq2_r (bimap (id_ _) swap)) in Eq. rewrite cat_assoc, bimap_cat, swap_involutive, cat_id_l, bimap_id, cat_id_r in Eq. rewrite 2 (cat_assoc assoc_l) in Eq. rewrite <- swap_assoc_r in Eq. rewrite <- 2 (cat_assoc assoc_l) in Eq. rewrite assoc_l_mono, cat_id_l in Eq. assumption. Qed.
imports: Coq(Setoid Morphisms) ITree.Basics(CategoryOps CategoryTheory)