Lemma stnsum_eq {n : nat} (f g: ⟦n⟧ -> nat) : f ~ g -> stnsum f = stnsum g. Proof. intros h. induction n as [|n IH]. - apply idpath. - rewrite 2? stnsum_step. induction (h lastelement). apply (maponpaths (λ i, i + f lastelement)). apply IH. intro x. apply h. Defined.
Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. Require Import UniMath.MoreFoundations.NegativePropositions.