trineq function

Trinary Inequality