1. <theory> In domain theory, the sum A + B of two domains contains all elements of both domains, modified to indicate which part of the union they come from, plus a new bottom element. There are two constructor functions associated with the sum:
inA : A -> A+B inB : B -> A+B inA(a) = (0,a) inB(b) = (1,b)and a disassembly operation:
case d of {isA(x) -> E1; isB(x) -> E2}This can be generalised to arbitrary numbers of domains.
See also smash sum, disjoint union.
2. <tool> A Unix utility to calculate a 16 bit checksum of the data in a file. It also displays the size of the file, either in kilobytes or in 512-byte blocks. The checksum may differ on machines with 16 bit and 32 bit ints.
Unix manual page: sum(1V).
(16 Mar 1995)