1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
//! # Improved Halting Problem
//!
//! This module is based on [hooo].
//!
//! ### Background
//!
//! The Improved Halting Problem is an attempt to change perspective of the Halting problem
//! to something more practical which can not be defeated by a simple counter-example.
//! The idea has been floating around in the AdvancedResearch forum for a couple years,
//! but since Elaine M. Landry (Ph.D.) is advancing towards an "as-if mathematics"
//! (e.g. [this lecture](https://www.youtube.com/watch?v=XRKHSlFvq4Q&t=17s))
//! we will try to make some progress in this direction before Landry's position gets misunderstood.
//!
//! It seems Landry is on the right track, but the current view in AdvancedResearch is that
//! regression of relative consistency proofs might be caused by a technicality
//! about modal fixed points (use of point free predicates of one argument),
//! thus Landry's motivation for developing "as-if mathematics" is not yet convincing.
//! It can also be that the current view of AdvancedResearch is wrong.
//!
//! However, "as-if mathematics" as an idea might be a weaker position implied by
//! Inside and Outside theories. Therefore, the current view of AdvancedResearch is stronger
//! and we would like to solve possible issues about misinterpreting "as-if mathematics".
//!
//! ### Introduction
//!
//! The standard Halting Problem can be thought of as an axiom of excluded middle:
//!
//! ```text
//! (a ⋁ ¬a)^true
//! ```
//!
//! Where `a` means "program A terminates".
//!
//! The problem with the standard Halting Problem is that by using the solver as oracle in
//! some program A, A can decide to not terminate if the solver says A terminates,
//! and if the solver says A does not terminate, then A terminates.
//! Therefore, solving the standard Halting Problem is undecidable.
//!
//! The Improved Halting Problem rephrases the problem such that there is no axiom of excluded
//! middle, but instead the solver has a stonger meta-property that it can detect paradoxes
//! caused by its own counter-factual scenario where it says a program terminates:
//!
//! ```text
//! (a^true ⋁ false^(a^true))^true
//! ```
//!
//! So, either the solver can prove a program halts without making any assumptions,
//! or it can detect a paradox. It is easy to show that ([neg_to_para]):
//!
//! ```text
//! (¬a => false^(a^true))^true
//! ```
//!
//! This means, if the program does not halt, then the solver returns `false`.
use *;
use *;
/// Improved Halting, implemented by Halting proposition of programs.
/// `¬a => false^(a^true)`.