proposition: Lemma prev_stn {n : nat} (i : ⟦ n ⟧%stn) (p : i > 0) : ∑ j : ⟦ n ⟧%stn, S j = i.
proof: Proof. destruct (prev_nat i p) as [j Sj_i]. use tpair. - exists j. refine (istransnatlth _ _ _ (natgthsnn j) _ ). rewrite Sj_i. apply (pr2 i). - exact Sj_i. Defined.
imports: UniMath.Foundations.All UniMath.MoreFoundations.All UniMath.Combinatorics.Maybe UniMath.Combinatorics.StandardFiniteSets UniMath.Algebra.Domains_and_Fields UniMath.Algebra.RigsAndRings