Let $A$ be an alphabet of size $|A|:=q\in\Bbb Z^+$ and let $n,d\in \Bbb Z^+$ be positive integers. We denote by $A_q(n,d)$ the largest value of $M$ such that a $q$-ary $(n,M,d)$-code $C\subseteq A^n$ exists. That is, $$A_q(n,d):=\max\{M\in \Bbb N: \exists\ (n,M,d)\text{-code } C\subseteq A^n \text{ over } A \} \in \Bbb N.$$
I am struggling to understand something which seems to be very easy. Take $q\geq 2$. We want to show that $$A_q(n,1)=q^n.$$ We are searching for the maximum $M$ such that a $q$-ary $(n,M,1)$-code $C$ exists.
We take our code to be $C:=A^n$, that is the set of all words of length $n\in \Bbb Z^+$. So $M=|C|=q^n$.
Now we have to show that $\mathrm{d}(C)=1$. Hill's book says that since the codewords of $C$ are distinct, it is $\mathrm{d}(C)\geq 1$.
My question how do we conclude that $\mathrm{d}(C)=1$ and not $\mathrm{d}(C)>1$?
Sorry if the question is trivial, I am a little bit confused.
$d(C) = 1$ is actually trivial.
This means the minimal distance between codewords is $1$.
Your code is $C:= A^n$.
Since $|A|\geq 2$, there are at least different two codewords $c,c'$, and then $d(c,c') \geq 1$.
However, the minimum is trivially attained. Let $c\in C=A^n$ be any codeword. Change $c$ in one position and write the newly obtained word as $a \in A^n = C$. Then clearly $d(a,c) = 1$ and thus $d(a,c) \leq 1$.
Combining both inequalities, we get $d(C) = 1$.