I read over this post Why is the principle of explosion accepted in constructive mathematics? and still have some thoughts/questions.
One of the answers mentions that a formula is constructively valid when there is a witness for that formula. So, when we say there is a witness for the formula $\bot \to A$, we mean that there is a function from the set of witnesses for $\bot$ to the set of witnesses for $A$. This seems to be circular at the meta-level; in order to justify “if $x$ is a member of the empty set, then $\varphi(x)$,” one needs the Principle of Explosion. A similar charge of circularity can be made against using Disjunctive Syllogism as a justification for the constructiveness of Explosion.
Ultimately, I’m not a skeptic about Explosion, but I don’t exactly see how it is constructively valid. I know that Proof of Negation is constructively valid since it amounts to a version of conditional proof. If explosion is just an assumption of Intuitionistic Logic, that makes sense, but it seems a bit arbitrary to say that constructive proof definitely includes explosion. It seems like one could just assume the Law of the Excluded Middle as an axiom, and then everything in Classical Logic would be “constructively” provable, assuming LEM were considered constructive, as is the case with Explosion.
Is there a reason beyond pure logic that Intuitionistic logic is considered the stepping-stone into constructive logic, as opposed to something like Minimal Logic?
I'll give an example of how in the proof assistant Coq, which implements an intuitionistic logic, it is possible to explicitly construct a function from an empty type to any other type.
First, let me give a couple other examples to give an idea of the syntax that will be involved. The cartesian product type is defined as something like:
Now, to write a function using a value of such a type, you use a
matchexpression such as:Similarly, a "disjoint union" type is defined as something like:
This represents what in many programming languages would be called a "tagged union". For an example of a
matchexpression on such a value:In parallel with these examples, we can construct an empty type which has no constructors, and therefore no possible way to create an element of that type:
And for a
matchexpression using this type:This follows the pattern of the first two examples, where an
Inductivetype with $n$ constructors requires $n$ branches in the match expression.In terms of program execution, the
errorfunction can never actually be called, since it is impossible to construct any argumenteto the function. Therefore, any branch of a program which has a call to theerrorfunction must be unreachable. Nevertheless, theerrorfunction can end up being useful in filling in those branches of the program, in such a way that the overall program still type-checks.Coq also uses the Curry-Howard correspondence for logic, where a proposition is treated as a type, whose elements are proofs of the proposition. Under this correspondence, the
prodtype corresponds to conjunction of propositions $P \land Q$; thesumtype corresponds to disjunction of propositions $P \lor Q$; and theEmpty_typetype corresponds to the false proposition $\bot$. And then thefirstfunction corresponds to a proof that $P \land Q \rightarrow P$ is a tautology; thecasefunction corresponds to a proof of $P \lor Q \rightarrow [(P \rightarrow R) \rightarrow [(Q \rightarrow R) \rightarrow R]]$; and theerrorfunction corresponds to a proof of $\bot \rightarrow P$.