Definition reverse_zig_zag_of_length {C : category} {n : ℕ} {x y : C} (gs : zig_zag_of_length n x y) : zig_zag_of_length n y x. Proof. revert x y gs. induction n as [ | n IHn ]. - intros x y gs. exact (z_iso_inv gs). - intros x y gs. induction gs as [ z gs ]. induction gs as [ g gs ]. induction g as [ g | g ]. + exact (post_cons_right_zig_zag_of_length (IHn _ _ gs) g). + exact (post_cons_left_zig_zag_of_length (IHn _ _ gs) g). Defined.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.CategoryTheory.Core.Categories. Require Import UniMath.CategoryTheory.Core.Isos. Require Import UniMath.CategoryTheory.Core.Functors. Require Import UniMath.CategoryTheory.Groupoids.