I stumbled upon this logic question in a math class recently.
My teacher told us that a statement that is not tested/is empty is true. For example, that if I stated that: "if the team A wins the game, I am gonna buy you a coke", and then team B goes on and wins the game, the statement would be true, independent of me buying a coke. Could anybody elaborate how this can be the case, and why?
It came up as an explanation to why the the empty-set is both an open and a closed set.

The short answer is, this is true because we have adopted that resolution by convention, because, for all its faults, doing so comes closest to resembling the intuitive notion of 'if-then' while having a definite logical value in all mathematical situations. To see what I am getting at, consider the following 'truth table':
This illustrates the truth about our intuitive notion of 'if-then' - When A is true, B has to be true, and when A is false we don't care. But mathematical logic doesn't allow 'we don't care', so we have to replace the '*'-s with definite truth-values. Then the question becomes: how do we do so and still match our intuition? There are clearly four possible resolutions:
If we choose (1) to mean 'if-then', we are saying 'if A is true then B is true' means 'A and B are both true', and we are also implying 'if B is true then A is true'. But this is clearly not what we want: When we have both 'A-->B' and 'C-->B', this would be saying 'A, B, and C' are all true together'; this doesn't work because sometimes we need A and C to be mutually-exclusive (typical example: a number-theory proof-by-cases, where A means 'n is even' and C means 'n is odd'). A similar problem occurs if we choose (2), which says 'A and B are both true -or- both false'. If we choose (3) to mean 'if-then' we are saying 'if A is true then B is true' means merely 'B is true' - REGARDLESS of A. Clearly that also doesn't work - generally we want B to depend on A somehow. So all that is left is (4).