2

I'm trying to prove that $f(\{x_1,\cdots,x_n\}) = x_1^2 + \cdots + x_n^2$ is injective (here each $x_i \in \mathbb N_{\geq 1}$). I'm quite confident that $f(x,y) = x^2 + y^2$ is injective (I don't know how to show that explicitly) however I'm sure there is a way to extend it from there. Perhaps there is an argument using geometry or algebra that I am not aware of?

What I'm really trying to do is to show that there exists some injection from the set of all finite subsets of ℕ to ℕ. I thought of taking the sum of the squares of each subset should do the trick, but I just need to show that it's injective (my gut says it is)

Ted Shifrin
  • 125,228
A.Z
  • 375
  • 2
    Your parenthetic remark that $x_i>0$ for all $i$ is crucial. But, nevertheless, don't be so confident. What happens if you switch $x$ and $y$? – Ted Shifrin Jan 13 '24 at 20:21
  • Right, I guess I should clarify. What I'm really trying to do is to show that there exists some injection from the set of all finite subsets of $\mathbb N$ to $\mathbb N$. I thought of taking the sum of the squares of each subset should do the trick, but I just need to show that it's injective (my gut says it is). So I guess to answer your question, the order of $x$ and $y$ don't matter. – A.Z Jan 13 '24 at 20:23
  • this won't work unfortunately. Moreover, you'd be using different functions for subsets of different length so you'd need to work harder to make the argument correct – FShrike Jan 13 '24 at 20:31
  • 1
    I would add this comment as context in your question. Namely, $f$ is a function that maps finite subsets of $\Bbb{N}{\geq1}$ to $\Bbb{N}{\geq1}$ – soggycornflakes Jan 13 '24 at 20:31
  • @FShrike Do you have a specific counterexample? I don't see anything wrong in defining a function that sums over the squares of the elements of a specific subset? – A.Z Jan 13 '24 at 20:34
  • 4
    $1^2+8^2 = 4^2+7^2 = 65$. More examples here: https://math.stackexchange.com/a/2068128/42969 – Martin R Jan 13 '24 at 20:35
  • @MartinR Thanks for that! – A.Z Jan 13 '24 at 20:41
  • @azuwaterloo My point is, you ultimately want to show there is an injection $X\to\Bbb N$ where $X$ is the set of finite subsets. That is one function. If you go for a piecewise definition, $S\mapsto f_n(S)$ where $n=|S|$ and $f_n$ is some special function for the sets of cardinality $n$, not only would you need to check that $f_n$ is injective but also that $f_n(x)=f_m(y)$ can never occur. I.e. you have to work harder – FShrike Jan 13 '24 at 20:47
  • Did you see my answer? It provides an answer to the question. It also immediately includes your remark that $f_n(x) = f_m(y)$ cannot occur (since the fundamental theorem of arithmetic says that a two equa prime factorizations are necessarily of equal length) – soggycornflakes Jan 13 '24 at 20:52
  • @FShrike Thanks for the insight. "@"soggycornflakes Yes I did. – A.Z Jan 13 '24 at 21:06

1 Answers1

5

Considering your comment, you are trying to prove there exists an injection that sends a finite subset of $\Bbb{N}_{\geq1}$ to an element of $\Bbb{N}_{\geq1}$.

We can simply take $$ f: \{n_1,\ldots,n_k\} \mapsto p_1^{n_{(1)}}p_2^{n_{(2)}}\ldots p_k^{n_{(k)}} $$ where $p_1,\ldots,p_k$ are the first $k$ primes and we order our subset such that $n_{(1)} < n_{(2)} < \ldots < n_{(k)}$ (i.e., $n_{(i)}$ is the i-th smallest number in the set).

By the fundamental theorem of arithmetic, this function is injective.

soggycornflakes
  • 1,111
  • 3
  • 10
  • Your function isn't well-defined unless you first order your subset. – Ted Shifrin Jan 13 '24 at 20:35
  • Aha, you're correct. I'll delete my answer. – soggycornflakes Jan 13 '24 at 20:36
  • Nah. Don't delete! Just make it right. – Ted Shifrin Jan 13 '24 at 20:37
  • Oh I overthought it, I thought it was fundamentally wrong but I misinterpreted your comment lol – soggycornflakes Jan 13 '24 at 20:38
  • Right. But I would not introduce the extra notation; I would just declare that I'd ordered the subset to start with. – Ted Shifrin Jan 13 '24 at 20:41
  • For me the notation is fairly intuitive since I have seen it used many times in statistics for example. – soggycornflakes Jan 13 '24 at 20:43
  • Sorry for the delay, yeah that works. (A little sad that my idea wasn't quite there though) – A.Z Jan 13 '24 at 21:04
  • An injection specifically has to do with some sort of uniqueness. And when dealing with uniqueness over natural numbers, an immediate thought should be: prime factorization – soggycornflakes Jan 13 '24 at 21:13
  • Huh, good to know. Thanks! – A.Z Jan 13 '24 at 21:15
  • Out of curiosity, can we order any countable subset of $\mathbb N$ the same way we would for a finite subset? – A.Z Jan 13 '24 at 23:46
  • Sure, why not? Any subset of $\Bbb{N}$ has a minimal element. – soggycornflakes Jan 14 '24 at 00:00
  • @soggycornflakes Alright makes sense. So now lets say were trying to prove that the set of all subsets of $\mathbb N$ is uncountable. We know that the set of all infinite strings $X = {(x^{(1)}, x^{(2)},\dots,x^{(k)},\dots) : x^{(k)} \in {0,1}, \forall k \geq 1}$ is uncountable, and it seems like there is a natural injection in both ways. What to do you think? – A.Z Jan 14 '24 at 13:55
  • Yes, if it is known or given that $X$ is uncountable, finding an injection in both ways proves equinumerosity by Cantor-Bernstein-Shroeder. I assume you have both injections? – soggycornflakes Jan 14 '24 at 14:40
  • Yeah, its a bit pedantic: So I'm going to refer to the set of all subsets of $\mathbb N$ as $\mathcal F$. For an injection from $\mathcal F$ to $X$, for a given subset $A \in \mathcal F$, we can let its image be the string which has $1$ at each position given by the elements of $A$, of course this is after ordering $A$. For an injection from $X$ to $\mathcal F$, given a $x\ in X$, we can construct a countable subset of $\mathbb N$ by constructing a set whose elements correspond the positions where we have a $1$ in the string $x$. – A.Z Jan 14 '24 at 15:20
  • Yes, that's right. You could shorten your argument by saying we identify a subset $A$ of $\Bbb{N}$ with a string $(x^{(1)}, \ldots)$ in $X$ by saying $x^{(n)} = 1 \iff n \in A$. – soggycornflakes Jan 14 '24 at 15:33