Logically negating a function