It’s probably not useful but considering our input as a nostr event (let’s call it A)
Our not function should give us a new event: (A!) using ! as a replacement for the not operator, such that (A!)! = A
So within nostr event syntax, a not function could be something that adds a “not” tag on the event, that references another event( going to be A!) that has a not tag back to the original event. The not function returns the event referenced with the not tag.
So now whenever we call the not function for A it returns A! And when we call it for A! we get A.
Not sure if we could get to other gates with a similar approach, and sorry if there’s a flaw in this thinking this is just thoughts in my head that I’m blurting out online 😅