We have to prove that if a graph $G$ with $n$ nodes is connected and has exactly $n-1$ edges then it is a tree.
Proof: By contradiction. Assume $G$ is not a tree and thus it must have at least one cycle. Removing an edge $e$ from a cycle we get $G'$ which is connected and has $n-2$ edges. As $G'$ is connected, degree of each node is at least $1$. Therefore sum of degrees of all nodes is at least $n$. Hence:
$2(n-2) \ge n$ which is not true for $n \le 3$ and we reach a contradiction.
Will this proof be considered correct? I am confused because if we take $n \ge 4$ then it will fail.
EDIT:
Proof(2): By induction. $P(n):=$ If $G$ is a graph with $n$ nodes and has exactly $n-1$ edges then it is a tree.
Base case: For $n=1$, we have a graph with $1$ node and $0$ edges which is a tree by definition.
Consider a graph $G$ with $n$ nodes and $n-1$ edges, it is a tree by inductive hypothesis. Add a vertex $v$ and an edge $e$ to $G$ such that $e$ connects $v$ and a leaf node $u$ in $G$. This graph we obtain has $n+1$ nodes and $n$ edges and is still connected and doesn't have a cycle and thus is a tree.
Is this correct?