Lemma iscomp_consensus_rel_same_SW2NE {X : hSet} (b : interlaced_prebilattice X) : iscomprelrelfun2 (eqrel_same_SW2NE b) (eqrel_same_SW2NE b) (consensus b). Proof. intros x y w z H1 H2. use (isantisymm_Lle (klattice b) (join _ (consensus _ x w) (consensus _ y z)) ((consensus _ (consensus _ x w) (consensus _ y z)))). - rewrite (isassoc_consensus _ x w (consensus _ y z)), (iscomm_consensus _ y z), <- (isassoc_consensus _ w z y), (iscomm_consensus _ (consensus _ w z) y), <- (isassoc_consensus _ x y (consensus _ w z)). use Lmin_le_case. -- rewrite <- H1. use (double_interlacing_join_k (Lmin_le_l _ x w) (Lmin_le_r _ z y)). -- rewrite <- H2. use (double_interlacing_join_k (Lmin_le_r _ x w) (Lmin_le_l _ z y)). - use (bottom_interlacing_join_k (Lmin_le_l _ (consensus _ x w) (consensus _ y z)) (Lmin_le_r _ (consensus _ x w) (consensus _ y z))). Defined.
Require Import UniMath.OrderTheory.Prebilattice.Prebilattice. Require Import UniMath.OrderTheory.Prebilattice.Interlaced. Require Import UniMath.OrderTheory.Prebilattice.PrebilatticeDisplayedCat. Require Import UniMath.MoreFoundations.Equivalences. Require Import UniMath.Foundations.Sets. Require Import UniMath.Algebra.BinaryOperations. Require Import UniMath.OrderTheory.Lattice.Lattice. Require Import UniMath.OrderTheory.Lattice.Bounded. Require Import UniMath.CategoryTheory.Core.Prelude.