Suppose a student says : "if 17 is even, then 2 is not a divisor of 17".
Surely his teacher would tell him he is wrong, saying that when a number is even, this number has 2 as divisor. The teacher would correct with " if 17 were even, then 2 would be a divisor of 17". In other words, the student's claim contradicts the general rule : " For all number x, if x is even , then x has 2 as divisor." So, if 17 is even...
But, since the sentence uttered by the student is a conditional with a false antecedent, this sentence ( the whole conditional) is true ; in virtue of " ex falso sequitur quodlibet" ( from a false proposition, anything follows).
My question is : what is wrong in the student's claim?
Can this hypothetical case be clarified by saying that
(1) the student's sentence is materially true
(2) the teacher is right in saying that the sentence is false in case it is understood as asserting a consequence relation ( logical consequence) between the antecedent and the consequent?
Or , am I wrong in saying that " if 17 is even , then 2 is not a divisor of 17 " contradicts ( or is incompatible with) " For all number x, if x is even, then x is divisible by 2" ?
First of all, the fact that a material implication is considered true as soon as its antecedent is false, is not the same as ex falso sequitur quodlibet, which says that any statement follows from a contradiction.
But yes, if you interpret the student's claim as a material conditional, then technically the student's claim is considered true. It would be just as true as "If I live in London, then I live in Germany" ... interpreted as a material conditional this is considered true because I don't live in London.
Still, the teacher would say the student is wrong, and offer the correction exactly as you indicated. This is because in practice, the use of mathematics is such that under normal circumstances, when the student makes a statement like this, the student is expected to have used the definition of what it means for a number to be even, rather than that the student is making some kind of smart-aleck claim trying to exploit the paradox of the material implication.
Indeed, note that the teacher does not say that the student's claim is false, but rather that the student did something wrong: the student wrongly applied the definition of even-ness. Thus, the teacher says: "No no, you did that wrong: if 17 is even, then 2 is a divisor of 17".