Closed ajaypillay closed 1 year ago
Example 48 states:
an arbitrary negative integer $i$ appears at position $2i$. Formally, we can define a one-to-one function $f:\mathbb{Z}\to\mathbb{N}$ as follows:
an arbitrary negative integer $i$ appears at position $2i$.
Formally, we can define a one-to-one function $f:\mathbb{Z}\to\mathbb{N}$ as follows:
$$ f(i) = \begin{cases} 2i-1 & \text{if } i > 0 \ 2i & \text{otherwise.} \end{cases} $$
The position when $i$ is non-positive should be $|2i|$ or $2(-i)$.
an arbitrary non-positive integer $i$ appears at position $|2i|$. Formally, we can define a one-to-one function $f:\mathbb{Z}\to\mathbb{N}$ as follows:
an arbitrary non-positive integer $i$ appears at position $|2i|$.
$$ f(i) = \begin{cases} 2i-1 & \text{if } i > 0 \ |2i| & \text{otherwise.} \end{cases} $$
I think either $2(-i)$ or $|2i|$ work fine, though I think it's probably easier to parse if it's $|2i|$.
(credit: @606 in Piazza for W23)
Fixed by @cpeikert in b7e6f5c.
Current language
Example 48 states:
$$ f(i) = \begin{cases} 2i-1 & \text{if } i > 0 \ 2i & \text{otherwise.} \end{cases} $$
Problem
The position when $i$ is non-positive should be $|2i|$ or $2(-i)$.
Proposed language
$$ f(i) = \begin{cases} 2i-1 & \text{if } i > 0 \ |2i| & \text{otherwise.} \end{cases} $$
I think either $2(-i)$ or $|2i|$ work fine, though I think it's probably easier to parse if it's $|2i|$.
(credit: @606 in Piazza for W23)