Appearance
自然语言
我说的这句话是假话
集合论
Russell's paradox
if
if
Thus, such set doesn't exist.
停机问题
The halting problem is undecidable because assuming a solution leads to a logical contradiction, as shown by Alan Turing in 1936. Here’s a brief proof sketch:
Assume there exists a program (or Turing machine)
H(P, I)that can decide whether any programPhalts when given inputI. It outputs "halts" or "does not halt".Using
H, construct a new programDthat takes a programPas input and does the following:- Call
H(P, P)to determine whetherPhalts when given itself as input. - If
Hsays "halts", thenDgoes into an infinite loop (does not halt). - If
Hsays "does not halt", thenDimmediately halts.
- Call
Now ask: what happens when
Dis run with itself as input, i.e.,D(D)?- If
D(D)halts, thenH(D, D)would say "halts", causingDto loop forever — contradiction. - If
D(D)does not halt, thenH(D, D)would say "does not halt", causingDto halt — contradiction.
- If
Therefore, the program H cannot exist. No universal halting decider is possible.
A Graph to help you understand
flowchart TD
A[Assume H(P, I) exists<br>decides if P halts on I] --> B[Construct D(P):<br>1. Run H(P, P)<br>2. If H says 'halts' → loop forever<br>3. If H says 'does not halt' → halt]
B --> C[Run D(D)]
C --> D{H(D, D) result?}
D -- "halts" --> E[D loops forever<br>Contradiction]
D -- "does not halt" --> F[D halts<br>Contradiction]
E --> G[Therefore H cannot exist]
F --> G
Curry’s Paradox (self-referential implication)
Consider the sentence: “If this sentence is true, then Santa Claus exists.”
Let
- Assume
is true. Then gives (by modus ponens). - Thus
holds (we assumed and derived ). - But
is , so is true. - Therefore
is true — any statement can be proved.
Cantor’s Diagonal Argument ( Valid in )
Proves that the set of all infinite binary sequences is uncountable.
- List all sequences
. - Construct a new sequence where the
-th bit is the opposite of the -th bit of . - This new sequence differs from every listed sequence, contradicting the assumption that the list was complete.