Fixpoint nsum (n:Nat) {struct n} : seq n Nat -> Nat :=
match n return (seq n Nat -> Nat) with
|O => fun x:seq 0 Nat => 0
|S m => fun x:seq (S m) Nat => (head x) + (nsum m (Seqtl x)) end.

Lemma samecardB:forall(E F:Setoid)(M:MAP F E) (S:surjective M)(I:injective M)(n:Nat)(C:has_n_elements n F), has_n_elements n E.