Is the statement $P \longrightarrow Q$ vacuously true or undefined when $P$ is false but $Q$ is undefined? I know that $P \longrightarrow Q$ is vacuously true if $P$ is false. I wonder is it still true when $Q$ is an undefined or ill-formed statement.
For example, is this statement vacuously true, or is it just ill-formed?
$$
1=0 \longrightarrow \frac{1}{0} = 0
$$
On the other hand, is this statement vacuously true?
$$
\frac{1}{0} = 0 \longrightarrow 1=0
$$
I begin to wonder this when I am reviewing the mathematical induction. It says that for a property $P(n)$ pertaining to all natural numbers, if $P(0)$ and $P(n) \longrightarrow P(n+1)$, then $P$ is always true.
For a property $P$ that is undefined for $0$, I see that people often refer $P(0)$ as vacuously true when applying mathematical induction. I think that this is not the case.
An example:

Prove that for a set $X$ that contains $n$ real numbers, there exists a real number $M$ such that $\forall x \in X, x \leq M$


Proof: Use induction on $n$. When $n = 0$, then case is vacuously true (or meaningless). Then the basic case becomes when $n=1$. Then let $x$ be the only element in $X$, and let $M$ be $x$ itself, then on this case the statement is true. Now suppose that for $k \in \mathbb{N}$, the statement is already true. When $X$ contains $k+1$ elements, we use $X$ as $(X\setminus\{a\}) \cup \{a\}$. The set $X\setminus\{a\}$ has $k$ elements, and we denote the number as $M$. $a$ either $\geq$ or $<$ $M$. On the former case, let $M'=a$, and on the latter case, let $M'=M$. Then $M'$ is the number we want. We can now close the induction.

 A: Being undefined/nonsensical/meaningless is different from vacuously true, and your textbook's attempt to conflate the two is poor practice.
Being undefined is infectious.  Any statement, part of which is undefined, is itself undefined.  For example: $\frac{1}{0}$ is an undefined notation, so equation $\frac{1}{0}=1$ has no well-defined truth value.  $\frac{1}{0}=1$ is undefined, so $${\frac{1}{0}=1}\to{0=1}$$ is too.
A statement that is vacuously true is a statement that is true by convention.  Almost always, this means a statement that depends on a variable, but for which there are no valid values for that variable.  For example, the statement "any $x$ such that $x\cdot0=1$ satisfies $x=1$" is vacuously true, because there are no such $x$.
There's no a priori reason to define such statements to be true, except that it makes a lot of proofs easier.  For example: consider the statement "Given an integer $y$, let $x$ be a positive integer less than $y$.  Any prime factor of $x$ is less than $y$ too."  When $y=5$, this statement is true (exercise!).  When $y=-5$, this statement is still true; there are no such $x$, and our vacuousness convention steps in.  This means that any proof of our statement doesn't have to worry about whether $y$ is positive.
In the example you cite from your textbook, when $n=0$, the claim is that "There exists a real number $M$ such that, for any $x\in X$ (where $|X|=0$), we have $x<M$."  There are no such $x$, so our vacuousness convention makes the claim true.
A: In answer to the question in this query's title, I would say that it is (vacuously) true.  This is because
$P \rightarrow Q$ is logically equivalent to 
$[E_1] \;$ (Not $P$) or $Q$.
I was taught that $E_1$ was automatically true whenever $P$ was false.
However, my teaching may have contained the (unspoken) assumption that $E_1$ only has meaning when $Q$ is a statement that is either true or false.
If, in contrast, $Q$ is a meaningless statement that is neither true nor false, (and assuming that $P$ is false), then it is unclear to me whether $E_1$ is meaningful.
An example of a (meaningless) statement that is neither true nor false is: 
37 is bigger than an orange.
A: The principle of vacuous truth states that for any logical propositions $A$ and $B$ (whether they are true or false), we have the tautology:

$A \implies (\neg A \implies B)$

Here is the truth table:

If $A$ is true (lines 1 and 2), then the implication $\neg A \implies B$ (column 5) is vacuously true whether $B$ is true or false (lines 1 and 2 resp.).
Here is a formal proof using a form of natural deduction:

