I am reading a text, and I have a question regarding the logical structure of the following proof.
$(1)$: $1\in X$ and $(2):$ If $k\in X$ for all $k<n$, then $n\in X$.
When we prove well-ordering $\implies$ mathematical induction by contradiction, what are we negating?
From my understanding, we have the logical structure of this proof as $p \implies q$, where $p$ denotes the well-ordering principle and $q$ denotes mathematical induction. Now, to derive a contradiction, we negate $p$ and show that $\neg p \implies (\neg c \land c)$, whatever $c$ happens to be.
I am confused as to how this proof jumps to supposing that "$X$ is a subset of $\mathbb{N}$ satisfying both $(1)$ and $(2)$", doesn't $(1),(2)$ belong to $q$, which is a part of what we need to show as implied from $p$?

Remember that the implication $$ p\to q $$ is logically equivalent to $$ \neg(p\wedge\neg q).\tag{1} $$ This is intuitive since the implication says that if the hypothesis $p$ is true then the conclusion $q$ should also be true, that is, it must NOT be the case that we have $p$ and NOT $q$.
Hence proving $p\to q$ by contradiction amounts to show $(1)$, that is, that $p\wedge \neg q$ is contradictory.
So, in the proof, they assume that $p$ is true, that is, that the well-ordering principle is true, AND that the principle of mathematical induction is NOT true. More precisely, if the latter principle is formulated like this: $$ \text{"If $X$ is a subset of $\mathbb{N}$ satisfying $(1)$ and $(2)$, then $X=\mathbb{N}$"},\tag{2} $$
then, once we take an arbitrary $X$ satisfying the hypothesis, we suppose that the consequence $X=\mathbb{N}$ is false, that is, that $X$ is a subset of $\mathbb{N}$ but that it is not equal to it (in other words, that it is a proper subset). Notice that $(2)$ is also of the form $r\to s$ and that it's negation is $\neg(\neg(r\wedge\neg s))$ which is logically equivalent to $r\wedge\neg s$.