I encountered this problem while reading Terence Horgan's Essays on Paradoxes.According to David Lewis,
the counterfactual condition if P then Q is true iff either: 1. There are no possible worlds that P is true; 2. Some P-world at which Q is true is more similar, overall, to w than is any P-world at which Q is not true.
So I wonder if the false condition in mathematics is the same as the first condition of the counterfactual condition listed above?
In a nutshell, the issue is with the truth-functional definition of the conditional $\to$ :
When applied to statements like e.g. :
we are not satisfied to consider them TRUE, obly because we know that the antecedent is FALSE.
See Counterfactual Theories of Causation for more details :