I am trying to prove the following formula using only natural deduction system: $$\vdash (A \supset (A \supset B)) \supset (A \supset B),$$ and this, according to natural deduction rules leads to $$A \supset (A \supset B) \vdash A \supset B,$$ and then $$A \supset (A \supset B),A \vdash B.$$
It seems obvious, but I cannot find the matching rule to get the identity. Would you give me some hints please?
You want to prove a conditional. So assume the antecedent and aim for the consequent, which is $(A \to B)$.
The consequent is another conditional. So again, you assume the antecedent $A$ as another temporary assumption and aim for the new consequent $C$.
Setting out the resulting obvious proof Fitch-style we get ...
$\quad\quad|\quad (A \to (A \to B))\\ \quad\quad|\quad\quad|\quad A\\ \quad\quad|\quad\quad|\quad (A \to B)\\ \quad\quad|\quad\quad|\quad B\\ \quad\quad|\quad (A \to B)\\ ((A \to (A \to B)) \to (A \to B)) $
Annotating the steps here can be left as an exercise.