think i've got factor() and prune() working cooperatively enough to remove trig identities ...