function supp(A)
   set(A.filter(|x| A(x)>0))
end

extend(Map,{
   function subeq(A;B)
      A.filter(|x| A(x)>0).all(|x| A(x)<=(B(x) else 0))
   end,

   function card(A;)
      A.sum(A)
   end,

   function cap(A;B)
      M = {}
      for x in A|B
         m = min(A(x) else 0, B(x) else 0)
         if m>0
            M[x] = m
         end
      end
      return M
   end,

   function cup(A;B)
      M = {}
      for x in A|B
         m = max(A(x) else 0, B(x) else 0)
         if m>0
            M[x] = m
         end
      end
      return M
   end,

   function plus(A;B)
      M = {}
      for x in A|B
         s = (A(x) else 0)+(B(x) else 0)
         if s>0
            M[x] = s
         end
      end
      return M
   end,

   function disjoint(A;B)
      (A|B).all(|x| min(A(x) else 0,B(x) else 0)==0)
   end
})