provide proof that excluded middle can not be proved or disproved in coq
- User
provide proof that excluded middle can not be proved or disproved in coq
- Assistant
provide proof that excluded middle can not be proved or disproved in coq
Proof that the Law of Excluded Middle Cannot Be Proved or Disproved in Coq
Introduction
The Law of Excluded Middle (LEM) is a classical logical principle stating that for any proposition ( P ), either ( P ) is true or its negation ( \neg P ) is true:
[ \forall P, ; P \lor \neg P ]
In classical logic, LEM is accepted as an axiom and plays a crucial role in proofs, especially those involving indirect arguments or proof by contradiction. However, in constructive logic, which underpins systems like Coq, the acceptance of LEM is more nuanced.
Coq is based on the Calculus of Inductive Constructions (CIC), a type theory that embodies constructive logic. In constructive logic, a proof of a proposition must provide explicit evidence or a construction, and mere non-contradiction is insufficient for establishing truth. Consequently, certain classical principles like LEM are not universally accepted unless they can be constructively justified.
The goal of this explanation is to show that within Coq's foundational system, the Law of Excluded Middle cannot be proved nor disproved, demonstrating its independence from the axioms of Coq's type theory.
Why the Law of Excluded Middle Cannot Be Proved in Coq
Constructive Logic Avoids Non-Constructive Proofs
In constructive logic, a proof of ( P \lor \neg P ) requires a construction that either:
The key is that for arbitrary ( P ), especially those that are undecidable or not concretely specified, we lack a method to constructively provide such proofs.
Lack of Decision Procedure for Arbitrary Propositions
Coq does not have a built-in mechanism to decide the truth value of all propositions. For many propositions, especially those involving infinite structures or undecidable problems, neither ( P ) nor ( \neg P ) can be constructively demonstrated within the system.
Absence of a General Proof for All Propositions
While for specific, decidable propositions, one might prove ( P \lor \neg P ), there is no general proof that applies to all propositions in Coq. Any attempt to prove LEM generally would require a universal method to decide any proposition, which is impossible within Coq's constructive framework.
Consistency with Constructive Type Theory
The constructive type theory of Coq is designed to avoid non-constructive principles unless explicitly introduced. Since LEM is non-constructive (it asserts the existence of a truth value without providing a constructive proof), it cannot be derived from the constructive axioms of Coq.
Why the Law of Excluded Middle Cannot Be Disproved in Coq
Consistency of Classical Logic with Constructive Logic
Adding LEM to Coq's logic extends it from constructive logic to classical logic. Classical logic is known to be consistent if constructive logic is consistent. Therefore, introducing LEM does not lead to any contradictions within the system.
No Contradictions Arise from Assuming LEM
If it were possible to disprove LEM in Coq, it would mean that assuming LEM leads to a contradiction. However, since classical logic (which includes LEM) is consistent relative to constructive logic, no such contradiction arises.
Inability to Prove ( \neg (\forall P, P \lor \neg P) )
To disprove LEM, one would need to prove ( \neg (\forall P, P \lor \neg P) ). However, Coq cannot construct such a proof because it would require demonstrating that there exists some proposition for which neither ( P ) nor ( \neg P ) holds, which contradicts the logic's law of non-contradiction.
Existence of Models Where LEM Holds
There are models of Coq's type theory where LEM holds (classical models) and models where it does not (intuitionistic models). The existence of both types of models indicates that LEM is independent of the axioms: it cannot be disproven because there is no inconsistency in assuming it.
Conclusion
The Law of Excluded Middle is independent of the axioms of Coq's constructive type theory because:
It Cannot Be Proved: Constructive logic avoids non-constructive principles like LEM unless they can be specifically justified for particular cases. There is no general, constructive proof of LEM within Coq because it would require a decision procedure for all propositions, which is impossible in the system's framework.
It Cannot Be Disproved: Since assuming LEM does not lead to contradictions within Coq's logic, and because classical logic is consistent if constructive logic is consistent, there is no proof of ( \neg (\forall P, P \lor \neg P) ) within Coq.
Therefore, the Law of Excluded Middle remains an axiom that can be independently added to Coq if one wishes to work within classical logic. Without explicitly adopting it as an axiom, Coq operates under constructive logic principles where LEM is unprovable but also undisprovable. This independence highlights the foundational differences between constructive and classical logic systems and underscores the flexibility of Coq in allowing users to choose the logical framework appropriate for their proofs.
Implications for Proof Development in Coq
Working Without LEM: When developing proofs in Coq without assuming LEM, one must provide constructive evidence for all assertions. Proofs by contradiction or reliance on non-constructive principles are generally avoided or require reworking into constructive forms.
Introducing Classical Reasoning: If a proof necessitates classical reasoning, LEM (or specific instances of it) can be introduced as an assumption or axiom using Coq's ability to add axioms. This shifts the working logic to a classical one for the scope of that proof.
Selective Use of Decidability: For propositions known to be decidable, one can often prove ( P \lor \neg P ) constructively by providing an algorithm or method to decide ( P ). This allows for the use of LEM in specific contexts without adopting it universally.
References for Further Reading
Coq Reference Manual: Explore the sections on logic and foundations to understand how Coq handles logical principles.
Type Theory and Functional Programming by Simon Thompson: Provides an introduction to type theory and its relation to logic.
Constructivism in Mathematics by A. S. Troelstra and D. van Dalen: Offers an in-depth look at constructive logic and mathematics.
Logic in Computer Science by Michael Huth and Mark Ryan: Covers both classical and constructive logics in the context of computer science applications.
By understanding the limitations and capabilities of Coq regarding the Law of Excluded Middle, users can better navigate the development of proofs within either constructive or classical logical frameworks.
Not yet included in a published release.