The trouble with your proof that 2=1 is you haven't actually broken maths, you've made a mistake.
In one step you've divided by (a-b). But your initial assertion is that a=b. If a=b then a-b = 0. So you've divided by 0.
And you can't divide by 0 in maths, the answer is actually undefined. There's a very good explanation why here:
So yeah, any proof where you're dividing by 0 is breaking the rules of maths and thus invalid.