The Marica-Schonheim inequality states that the number of distinct dif
ferences of the form A\B, with A, B taken from a given finite family A
of sets is at least \A\. We prove that equality occurs essentially if
and only if A is the product of an ideal and a filter. We also prove
an infinite Version of the theorem, conjectured (in weaker form) by Da
ykin and Lovasz. Finally, we note that a generalization (due to Ahlswe
de and Daykin) of the inequality which considers two families A and B
holds under a weaker assumption on the relation between A and B.