Formal definition of vacuous implication What is the formal definition of an implication that is vacuous? For example, the Riemann Hypothesis implies Fermat's Last Theorem, because any statement implies a true statement. However, most mathematicians would call that implication vacuous. It is this notion of vacuous implication that I want to make precise. Is there a precise definition of vacuous implication in the mathematical literature?
 A: It is important to distinguish the idea of vacuous truth from the principle of ex falso quodlibet (or, much rarer but better to say, ex absurdo [sequitur] quodlibet) and category mistakes. I shall look into the question along primary points I find closely relevant in plain terms; in fact, the subject of vacuous statements has a wealth of ramifications and a rich history progressing from the Aristotelian theories of predicables to the contemporary type theories.
A category mistake occurs when an attribution $F$ to a term is made violating the ontological or semantical category of the term, for example, ascribing a property to something mental actually proper for physical things (in ordinary understanding of language), for example, "her intellect is toroid". We may say that $F$ is impredicable for $x$ in such cases. Otherwise, if proper attribution is made, we say that $F$ is predicable for $x$. Hence, an $F$ is impredicable for $x$ in a domain of discourse, neither $F$ nor non-$F$ (denoted by $\bar{F}$) is predicable: $$\neg\exists x(Fx\vee\bar{F}x)$$
If $F$ is predicable for $x$, then
$$\exists x(Fx\vee\bar{F}x)$$ holds.
A category mistake occurs when an $F$ impredicable for $x$ is ascribed to $x$. The statement expressing the category mistake is vacuous, for there is nothing to exemplify it or serve as a counter-instance to it. A widespread convention is to take category mistake statements as vacuously false; there is a view that they lack truth-value, for they are held to be nonsensical. However, that overlooks the requirement that, in logic, we cannot leave a statement in an argument text dangling. Having indeterminate truth-conditions is a reason to assign falsity.
As for vacuously true statements, there is no problem of category mistake, only, they are denotationally vacuous. Consider Newton's first law of motion (I borrow the example from An Introduction to Metaphysics by J. W. Carroll and N. Markosian, Cambridge University Press 2010, p. 89). In simplistic terms, the law is vacuously true, because there are no inertial bodies as described in the universe; every body is under the effect of some force. The logical form of the law is
$$\forall x(Fx\rightarrow Gx)$$
In order to falsify the law, the following sentence must be satisfied:
$$\exists x(Fx\wedge\neg Gx)$$
Since there is no instantiation of $Fx$, the sentence expressing the law is vacuously satisfied.
As an another illustration, here is a sample from a working mathematician (Abstract Algebra by I. N. Herstein, 3rd edition, Prentice-Hall 1996, pp. 80-81; the emphasis is mine):

Theorem 2.6.4 (Cauchy). If $G$ is a finite abelian group of order $\mid G\mid$ and $p$ is a prime that divides  $\mid G\mid$, then $G$ has
an element of order $p$.
Proof. Before getting involved with the proof, we point out to the reader that the theorem is true for any finite group. We shall prove
it in the general case later, with a proof that will be much more
beautiful than the one we are about to give for the special, abelian
case.
We proceed by induction on  $\mid G\mid$. What does this mean
precisely? We shall assume the theorem to be true for all abelian
groups of order less than  $\mid G\mid$ and show that this forces the
theorem to be true for $G$. If  $\mid G\mid$ = $1$, there is no such $p$
and the theorem is vacuously true. So we have a starting point for our
induction.

We observe that the convention of admitting such vacuous statements as true significantly enhances our power of generalisation and helps a clearer view of matters (many degenerate cases also can be subsumed as elements of vacuous truth).
Though we distinguish falsities/contradictions, category mistakes and vacuous truths in natural language and mathematical practice, in formal languages, the distinctions are partially or entirely collapsed.
In propositional calculus, the truth-table of material implication reflects vacuous truth, albeit conflated with falsity. It is dubious that we can do further, for it is not in the "design ideas" of propositional calculus to express such distinctions and its semantics is arranged accordingly.
In first-order predicate logic, the divergence between the universal quantification seeking falsifying instance and existential quantification seeking verifying instance actually reflects the notion of vacuous truth.
A second-order predicate logic may be invoked to formulate the predicability/impredicability issues. Caution is needed in that case: The system can become liable to the paradoxes, specifically, the one known as "impredicable paradox" whose main theme is self-application like Russell's paradox; not to digress too much, I refer you to Logic and Philosophy: A Modern Introduction by A. Hausman et al. (13th edition, Hackett Publishing 2021, pp. 300-302) for a detailed exposition.
Another point that should be taken into account is that classically we do not use an independent definition of falsity; we take as falsity is non-truth. Non-classical approaches may be needed to settle things clearly.
I believe the question is interesting indeed and deserves pursuing, at least, philosophically.
A: The principle of vacuous truth can be stated as follows:
For any logical propositions $A$ and $B$, we have: $\neg A \implies [A\implies B]$.
Note that we cannot infer from this that $B$ is true, or that $B$ is false since $A$ is assumed to be false.
