In relation to this question.
What do you do when a == true and b == false? This must be Before down voting believe it or not but there's nothing to find on this.
So:
{% if a == true and b == false %}
do stuff
{% endif %}
You should say that this should work but that isn't:
{% if (a == true) and (b == false) %}
do stuff
{% endif %}
UPDATE2 This works because one is true and two is false
{% if variant.stock.track == true %}
{% if variant.stock.on_stock == false %}
({{ 'Out of stock' | t }}){% else %} ({{ 'In stock' | t }})
{% endif %}
{% endif %}