Definition finstructontotal2 {X : UU} (P : X -> UU) (sx : finstruct X) (fs : ∏ x : X, finstruct (P x)) : finstruct (∑ (x : X), P x) := make_finstruct _ (nelstructontotal2 P (λ x : X, finstruct_cardinality (fs x)) sx (λ x : X, fs x)).
Require Import UniMath.MoreFoundations.Tactics. Require Import UniMath.MoreFoundations.DecidablePropositions. Require Import UniMath.MoreFoundations.NegativePropositions. Require Import UniMath.MoreFoundations.Subtypes.