Skip to main content
added 10 characters in body; edited body; deleted 10 characters in body
Source Link
Andrej Bauer
  • 48.8k
  • 11
  • 131
  • 239

Here is Goldstern's answer, transcribed to constructive mathematics.

In constructive mathematics we do not speak of "recursive" but rather decidable subsets of $\mathbb{N}$. (Recall that a subset $X \subseteq Y$ is decidable if $\forall y \in Y. y \in X \lor y \not\in X$.) Also, your assumption that $A \neq \emptyset$ should be replaced with "$A$ is inhabited", i.e., $\exists n \in A . \top$, or else one is forced to use Markov principle unecessarily.

Let us also observe that an inhabited decidable subset $A \subseteq \mathbb{N}$ has a minimal element. Indeed, given $k \in A$, we may find the least $j \leq k$ such that $j \in A$ by simply checking all of them.

Suppose then that $A$ is a decidable inhabited subset of $\mathbb{N}$. We wish to enumerate the elements of $A$ in a non-decreasing order. Because $A$ is inhabited and decidable it has a minimal element $k \in A$. Now simply define an enumeration $e : \mathbb{N} \to A$ by $$e(n) = \max \lbrace i \in A \mid i \leq \max(n,k) \rbrace.$$ The maximum in the definition of $e$ exists because it is over a finite decidableinhabited subset of $\mathbb{N}$. Clearly, $e(n) \in A$ for all $n$, and $e$ enumerates all of $A$ because $e(m) = m$ when $m \in A$.

Here is Goldstern's answer, transcribed to constructive mathematics.

In constructive mathematics we do not speak of "recursive" but rather decidable subsets of $\mathbb{N}$. (Recall that a subset $X \subseteq Y$ is decidable if $\forall y \in Y. y \in X \lor y \not\in X$.) Also, your assumption that $A \neq \emptyset$ should be replaced with "$A$ is inhabited", i.e., $\exists n \in A . \top$, or else one is forced to use Markov principle unecessarily.

Let us also observe that an inhabited decidable subset $A \subseteq \mathbb{N}$ has a minimal element. Indeed, given $k \in A$, we may find the least $j \leq k$ such that $j \in A$ by simply checking all of them.

Suppose then that $A$ is a decidable inhabited subset of $\mathbb{N}$. We wish to enumerate the elements of $A$ in a non-decreasing order. Because $A$ is inhabited and decidable it has a minimal element $k \in A$. Now simply define an enumeration $e : \mathbb{N} \to A$ by $$e(n) = \max \lbrace i \in A \mid i \leq \max(n,k) \rbrace.$$ The maximum in the definition of $e$ exists because it is over a finite decidable subset of $\mathbb{N}$. Clearly, $e(n) \in A$ for all $n$, and $e$ enumerates all of $A$ because $e(m) = m$ when $m \in A$.

Here is Goldstern's answer, transcribed to constructive mathematics.

In constructive mathematics we do not speak of "recursive" but rather decidable subsets of $\mathbb{N}$. (Recall that a subset $X \subseteq Y$ is decidable if $\forall y \in Y. y \in X \lor y \not\in X$.) Also, your assumption that $A \neq \emptyset$ should be replaced with "$A$ is inhabited", i.e., $\exists n \in A . \top$, or else one is forced to use Markov principle unecessarily.

Let us also observe that an inhabited decidable subset $A \subseteq \mathbb{N}$ has a minimal element. Indeed, given $k \in A$, we may find the least $j \leq k$ such that $j \in A$ by simply checking all of them.

Suppose then that $A$ is a decidable inhabited subset of $\mathbb{N}$. We wish to enumerate the elements of $A$ in a non-decreasing order. Because $A$ is inhabited and decidable it has a minimal element $k \in A$. Now simply define an enumeration $e : \mathbb{N} \to A$ by $$e(n) = \max \lbrace i \in A \mid i \leq \max(n,k) \rbrace.$$ The maximum in the definition of $e$ exists because it is over a finite inhabited subset of $\mathbb{N}$. Clearly, $e(n) \in A$ for all $n$, and $e$ enumerates all of $A$ because $e(m) = m$ when $m \in A$.

added 106 characters in body
Source Link
Andrej Bauer
  • 48.8k
  • 11
  • 131
  • 239

Here is Goldstern's answer, transcribed to constructive mathematics.

In constructive mathematics we do not speak of "recursive" but rather decidable subsets of $\mathbb{N}$. (Recall that a subset $X \subseteq Y$ is decidable if $\forall y \in Y. y \in X \lor y \not\in X$.) Also, your assumption that $A \neq \emptyset$ should be replaced with "$A$ is inhabited", i.e., $\exists n \in A . \top$, or else one is forced to use Markov principle unecessarily.

Let us also observe that an inhabited decidable subset $A \subseteq \mathbb{N}$ has a minimal element. Indeed, given $k \in A$, we may find the least $j \leq k$ such that $j \in A$ by simply checking all of them.

Suppose then that $A$ is a decidable inhabited subset of $\mathbb{N}$. We wish to enumerate the elements of $A$ in a non-decreasing order. Because $A$ is inhabited and decidable it has a minimal element $k \in A$. Now simply define an enumeration $e : \mathbb{N} \to A$ by $$e(n) = \max \lbrace i \in A \mid i \leq \max(n,k) \rbrace.$$ The maximum in the definition of $e$ exists because it is over a finite decidable subset of $\mathbb{N}$. Clearly, $e(n) \in A$ for all $n$, and $e$ enumerates all of $A$ because $e(m) = m$ when $m \in A$.

Here is Goldstern's answer, transcribed to constructive mathematics.

In constructive mathematics we do not speak of "recursive" but rather decidable subsets of $\mathbb{N}$. (Recall that a subset $X \subseteq Y$ is decidable if $\forall y \in Y. y \in X \lor y \not\in X$.) Also, your assumption that $A \neq \emptyset$ should be replaced with "$A$ is inhabited", i.e., $\exists n \in A . \top$, or else one is forced to use Markov principle unecessarily.

Let us also observe that an inhabited decidable subset $A \subseteq \mathbb{N}$ has a minimal element. Indeed, given $k \in A$, we may find the least $j \leq k$ such that $j \in A$ by simply checking all of them.

Suppose then that $A$ is a decidable inhabited subset of $\mathbb{N}$. We wish to enumerate the elements of $A$ in a non-decreasing order. Because $A$ is inhabited and decidable it has a minimal element $k \in A$. Now simply define an enumeration $e : \mathbb{N} \to A$ by $$e(n) = \max \lbrace i \in A \mid i \leq \max(n,k) \rbrace.$$ Clearly, $e(n) \in A$ for all $n$, and $e$ enumerates all of $A$ because $e(m) = m$ when $m \in A$.

Here is Goldstern's answer, transcribed to constructive mathematics.

In constructive mathematics we do not speak of "recursive" but rather decidable subsets of $\mathbb{N}$. (Recall that a subset $X \subseteq Y$ is decidable if $\forall y \in Y. y \in X \lor y \not\in X$.) Also, your assumption that $A \neq \emptyset$ should be replaced with "$A$ is inhabited", i.e., $\exists n \in A . \top$, or else one is forced to use Markov principle unecessarily.

Let us also observe that an inhabited decidable subset $A \subseteq \mathbb{N}$ has a minimal element. Indeed, given $k \in A$, we may find the least $j \leq k$ such that $j \in A$ by simply checking all of them.

Suppose then that $A$ is a decidable inhabited subset of $\mathbb{N}$. We wish to enumerate the elements of $A$ in a non-decreasing order. Because $A$ is inhabited and decidable it has a minimal element $k \in A$. Now simply define an enumeration $e : \mathbb{N} \to A$ by $$e(n) = \max \lbrace i \in A \mid i \leq \max(n,k) \rbrace.$$ The maximum in the definition of $e$ exists because it is over a finite decidable subset of $\mathbb{N}$. Clearly, $e(n) \in A$ for all $n$, and $e$ enumerates all of $A$ because $e(m) = m$ when $m \in A$.

Answered what was actually asked.; added 383 characters in body
Source Link
Andrej Bauer
  • 48.8k
  • 11
  • 131
  • 239

I am going toHere is Goldstern's answer twice. Once as if your use of the word "constructive" meant "computable", and once as if it actually meant "constructive" in the sense of "constructive mathematics"transcribed to constructive mathematics.

First answer: Suppose there were a computable method $c$ of transforming (codes of) computable enumerations In constructive mathematics we do not speak of non-empty sets to non-decreasing computable enumerations"recursive" but rather decidable subsets of non-empty sets. Then we can solve the Halting oracle as follows. Given any Turing machine $T$, consider the sequence $e : \mathbb{N} \to \mathbb{N}$ defined by $$e(n) = \begin{cases} 1 & \text{$T$ does not halt at step $n$} \\\\ 0 & \text{$T$ halts at step $n$} \end{cases}$$ The map$\mathbb{N}$. $e$ enumerates the set(Recall that a subset $\{0,1\}$ or$X \subseteq Y$ is decidable if $\{1\}$$\forall y \in Y. y \in X \lor y \not\in X$.) Also, depending on whetheryour assumption that $T$ halts$A \neq \emptyset$ should be replaced with "$A$ is inhabited", i. By assumptione., $c$ transforms$\exists n \in A . \top$, or else one is forced to use Markov principle unecessarily.

Let us also observe that an inhabited decidable subset $e$ into$A \subseteq \mathbb{N}$ has a non-decreasing enumerationminimal element. Indeed, given $e'$ which enumerates$k \in A$, we may find the same set as $e$. Ifleast $e'(0) = 0$ then$j \leq k$ such that $T$ halts, otherwise it does not$j \in A$ by simply checking all of them.

Second answer: In constructive mathematics we can just drop the adjetive "computable" from "computable enumeration". Suppose for every enumeration $e : \mathbb{N} \to \mathbb{N}$ there existed another enumeration which listed the same elements in non-decreasing order. We can derive from this the non-constructive principlethen that LPO as follows. Consider$A$ is a mapdecidable inhabited subset of $f : \mathbb{N} \to \{0,1\}$$\mathbb{N}$. We are supposedwish to decide whetherenumerate the elements of $\exists n \in \mathbb{N} . f(n) = 0$. By assumption there is$A$ in a non-decreasing maporder. Because $e' : \mathbb{N} \to \mathbb{N}$ which$A$ is inhabited and decidable it has the same image asa minimal element $f$$k \in A$. WeNow simply look atdefine an enumeration $e'(0)$ to tell whether$e : \mathbb{N} \to A$ by $$e(n) = \max \lbrace i \in A \mid i \leq \max(n,k) \rbrace.$$ Clearly, $f$ attains$e(n) \in A$ for all $0$$n$, and $e$ enumerates all of $A$ because $e(m) = m$ when $m \in A$.

I am going to answer twice. Once as if your use of the word "constructive" meant "computable", and once as if it actually meant "constructive" in the sense of "constructive mathematics".

First answer: Suppose there were a computable method $c$ of transforming (codes of) computable enumerations of non-empty sets to non-decreasing computable enumerations of non-empty sets. Then we can solve the Halting oracle as follows. Given any Turing machine $T$, consider the sequence $e : \mathbb{N} \to \mathbb{N}$ defined by $$e(n) = \begin{cases} 1 & \text{$T$ does not halt at step $n$} \\\\ 0 & \text{$T$ halts at step $n$} \end{cases}$$ The map $e$ enumerates the set $\{0,1\}$ or $\{1\}$, depending on whether $T$ halts. By assumption $c$ transforms $e$ into a non-decreasing enumeration $e'$ which enumerates the same set as $e$. If $e'(0) = 0$ then $T$ halts, otherwise it does not.

Second answer: In constructive mathematics we can just drop the adjetive "computable" from "computable enumeration". Suppose for every enumeration $e : \mathbb{N} \to \mathbb{N}$ there existed another enumeration which listed the same elements in non-decreasing order. We can derive from this the non-constructive principle LPO as follows. Consider a map $f : \mathbb{N} \to \{0,1\}$. We are supposed to decide whether $\exists n \in \mathbb{N} . f(n) = 0$. By assumption there is a non-decreasing map $e' : \mathbb{N} \to \mathbb{N}$ which has the same image as $f$. We simply look at $e'(0)$ to tell whether $f$ attains $0$.

Here is Goldstern's answer, transcribed to constructive mathematics.

In constructive mathematics we do not speak of "recursive" but rather decidable subsets of $\mathbb{N}$. (Recall that a subset $X \subseteq Y$ is decidable if $\forall y \in Y. y \in X \lor y \not\in X$.) Also, your assumption that $A \neq \emptyset$ should be replaced with "$A$ is inhabited", i.e., $\exists n \in A . \top$, or else one is forced to use Markov principle unecessarily.

Let us also observe that an inhabited decidable subset $A \subseteq \mathbb{N}$ has a minimal element. Indeed, given $k \in A$, we may find the least $j \leq k$ such that $j \in A$ by simply checking all of them.

Suppose then that $A$ is a decidable inhabited subset of $\mathbb{N}$. We wish to enumerate the elements of $A$ in a non-decreasing order. Because $A$ is inhabited and decidable it has a minimal element $k \in A$. Now simply define an enumeration $e : \mathbb{N} \to A$ by $$e(n) = \max \lbrace i \in A \mid i \leq \max(n,k) \rbrace.$$ Clearly, $e(n) \in A$ for all $n$, and $e$ enumerates all of $A$ because $e(m) = m$ when $m \in A$.

Source Link
Andrej Bauer
  • 48.8k
  • 11
  • 131
  • 239
Loading