somewhere I wrote a guide to translating boolean algebra into filters but I can't find the link now.
De Morgan's law generally saves the day!
((tag[A] or tag[B]) and (tag[1] or tag[2] or tag[3] or tag[4])) <=> !(!tag[A] and !tag[b]) or !(tag[1] and tag[2] and tag[3] and tag[4])
which in filter language translates to:
[all[]]-[!tag[A]!tag[B]]-[!tag[1]!tag[2]!tag[3]!tag[4]]
digital logic can be magic