The Inverse of a function with logic operators How would one be able to tell whether or not a function has an Inverse? I've got  a question in my discrete mathematics/ combinatorics class that asks whether or not the following function has an Inverse and if so give the Inverse.

{(p, q) | q =¬p} 

where p and q are elements of the set {T,  F}  where T is tautology and F is contradiction. 

I know for regular xy functions, it has an Inverse if it is one to one and also how to find the Inverse.  But how would I apply that knowledge to this question?
The above is an injective function so that means it has an Inverse but will that be p= ¬q?


Yup. We have $f(T)=F, f(F)=T$ so $f^{-1}(F)=T, f^{-1}(T)=F$, which means that $f^{-1}(q)=\lnot q$. In this case $f^{-1}=f$: they're the same function.