Give a natural deduction proof of $\varphi\vdash\top$, where $\varphi$ is any formula As in the title, the question is

Give a natural deduction proof of $\varphi\vdash\top$, where $\varphi$ is any formula.

Could I do this proof by deriving  $\varphi \rightarrow \top$ with $ \rightarrow$-introduction rule which says that if you can derive a formula $\psi$ from a formula $\varphi$, then $\varphi \rightarrow \psi$ is true. So, with this derivation I will use $\varphi$  as an assumption and derive from $\varphi$, or am I thinking wrong? I prefer hints before solution!
 A: HINT
I'll give you an answer in Hilbert-style, and I suggest you to try to convert it into Natural Deduction.
A quite "ubiquitous" axiom in Hilbert-style propositional logic is :

$\vdash \psi \rightarrow (\varphi \rightarrow \psi)$.

Thus, if we can prove $\vdash \psi$, we can use modus ponens (i.e. $\rightarrow$-elimination) to conclude with :

$\vdash \varphi \rightarrow \psi$.

The lesson is : 


if we have proved a formula $\psi$, we can always add a "premise" $\varphi$ whatever to assert $\vdash \varphi \rightarrow \psi$.


Thus, the question suggests the following strategy : we have to prove : $\vdash \top$ and then use it as $\psi$ above.

Proof
i) $\varphi$ --- assumed
ii) $\bot$ --- assumed
iii) $\bot \vdash \bot$ --- from ii)
iv) $\vdash \bot \rightarrow \bot$ --- from iii) by $\rightarrow$-intro
v) $\vdash \lnot \bot$ --- by def of $\lnot$
vi) $\vdash \top$ --- abbreviation.
Thus, from i) and vi) :


$\varphi \vdash \top$.


A: Here is one way that might be proven using explosion (X), negation introduction (¬I), contradiction introduction (⊥I) and conditional introduction (→I). 
To implement this in this proof checker I let $\top$ be the same as $\neg \bot$ and  $P$ is any formula corresponding to $\psi$ in the question.

A shorter proof also works using negation introduction (¬I) and conditional introduction (⊥I):


Kevin Klement's JavaScript/PHP Fitch-style natural deduction proof editor and checker http://proofs.openlogicproject.org/
P. D. Magnus, Tim Button with additions by J. Robert Loftis remixed and revised by Aaron Thomas-Bolduc, Richard Zach, forallx Calgary Remix: An Introduction to Formal Logic, Winter 2018. http://forallx.openlogicproject.org/
