Well, let's see...
NOT(FORALL(x): my-hat(x) -> green(x))
EXISTS(x): NOT(my-hat(x) -> green(x)) ; https://en.wikipedia.org/wiki/Universal_quantification#Negat...
EXISTS(x): NOT(NOT(my-hat(x)) OR green(x)) ; https://en.wikipedia.org/wiki/Material_implication_(rule_of_...
EXISTS(x): NOT(NOT(my-hat(x)) AND NOT(green(x)) ; https://en.wikipedia.org/wiki/De_Morgan%27s_laws
EXISTS(x): my-hat(x) AND NOT(green(x)) ; https://en.wikipedia.org/wiki/Double_negation#Elimination_an... (note that this assumes non-intuitionistic logic)
EXISTS(x): my-hat(x) ; https://en.wikipedia.org/wiki/Conjunction_elimination
So yeah, the liar must have at least one (non-green) hat.