Lemma dualelement_lt_trans_2 {m n k q: nat} (p1 : n < k ) (p2 : n < q) (p3 : k < q) (lt_dual : m < dualelement (n,, p1)) : (m < (dualelement (n,, p2))). Proof. rewrite dualelement_defs_eq; unfold dualelement'. refine (istransnatlth _ _ _ _ _). {exact lt_dual. } rewrite dualelement_defs_eq. simpl; do 2 rewrite natminusminus. apply natlthandminusl; try assumption. refine (natlehlthtrans _ _ _ _ _); try assumption. 2: { exact p3. } rewrite natpluscomm. apply natlthtolehp1. exact p1; assumption. Defined.
Require Import UniMath.Foundations.All. Require Import UniMath.MoreFoundations.All. Require Import UniMath.Combinatorics.Maybe. Require Import UniMath.Combinatorics.StandardFiniteSets. Require Import UniMath.Algebra.Domains_and_Fields. Require Import UniMath.Algebra.RigsAndRings.