TITLE: How do we know that we'll never prove a contradiction in Math
QUESTION [10 upvotes]: I know that we can prove a contradiction in naive set theory.
Let D be a set of all sets that don't contain itself. Say D does not contain D. Then D contains D. That means D contains itself. A contradiction. Hence, D contains D. But that means D doesn't contain itself. That means D doesn't contain D again. But we presume D contains D. So another contradiction. Because either D contains itself and D does not contain itself is false, we're pretty much stuck.
So, set theory is pretty much upgraded to kingdom come to prevent this so called contradiction. I am still unsure how after so much upgrade the contradiction is gone.
How do we know that there will be no contradiction for group or other theory? How do I know if that from some axioms like commutative, associative, have identity, etc. suddenly I found out that A is a group and not a group or something like that.
Note: The problem with one contradiction is if you can proof one you can proof anything.
Say I want to proof 1=0. Say 1 is not 0. Now, let Z be a set of all sets that doesn't contain it self. Yada yada yada... Contradiction. Hence, 1=0. The sun also rises in the west (at least for the last 300 years)

REPLY [7 votes]: I think the existing answers miss something important, namely that every time mathematics encounters an apparent contradiction, we change or otherwise sharpen our ideas in order to neutralize that contradiction. In particular, our ideas about the following things change:

What constitutes a valid proof.
What counts as a valid definition.
Which objects can be said to exist.

So how do we know that we'll never find a contradiction in Math? Because we keep on changing Math in order to avoid the contradictions.
Let me speculate a bit. I think that since so much of mathematics has been successfully applied to predict and understand the real world, this essentially proves that there is a hard core of mathematics that is consistent and coherent. It simply couldn't coherently explain the world if it didn't have this hard core. But we don't know a priori which ideas belong to this hard core and which don't, which is one reason (perhaps not the main reason) why our foundational ideas are destined to continue evolving.