Add logic/tests for first-n and negation ops