If you ever need to manipulate a domain you didn't create programmatically, use the utility functions provided in odoo.osv.expression. Especially, is_leaf, normalize_domain, AND, and OR will allow you to combine domains exactly the way Odoo does it. Don't do this yourself, because there are many corner cases you have to take into account and it's very probable that you'll overlook one.
For the standard application of domains, see the Search views recipe.