# Metric for sequences proof

Suppose $$X = \{\{x_n\}_{n \in \mathbb{N}} : x_n \in \mathbb{R}$$ $$\forall n\geq 1\}$$. Prove that $$d: X \times X \rightarrow \mathbb{R}$$ such that $$d(\{x_n\}_{n \in \mathbb{N}}, \{y_n\}_{n \in \mathbb{N}}) = \sum_{n = 1}^{\infty} 2^{-n}\frac{|x_n - y_n|}{1 + |x_n - y_n|}$$ is a metric on $$X$$.

My attempt:

I was given the hint that I should check each of the following: (1) a function $$f(x) = \frac{x}{x+1}$$ is montone increasing, (2) the triangle inequality applies to $$\frac{|x_n - y_n|}{(1 + |x_n - y_n|)}$$ and (3) the metric itself satisfies the inequality.

(1) $$f$$ is monotone increasing:

If $$x \geq 0$$, $$f'(x) = \frac{1}{(1 + x)^2} > 0$$.

So $$f$$ is increasing.

(2) Triangle inequality applies:

We have $$|x_n-y_n|≤|x_n-z_n|+|z_n-y_n|$$ and so

$$\frac {|x_n-y_n|}{1+|x_n-y_n|}≤ \frac {|x_n-z_n|+|z_n-y_n|}{1+|x_n-z_n|+|z_n-y_n|}=\frac {|x_n-z_n|}{1+|x_n-z_n|+|z_n-y_n|} + \frac {|z_n-y_n|}{1+|x_n-z_n|+|z_n-y_n|}≤\frac{|x_n-z_n|}{1+|x_n-z_n|}+\frac {|z_n-y_n|}{1+|z_n-y_n|}$$

Therefore $$\frac{|x_n - z_n|}{1 + |x_n - z_n|}+\frac{|z_n-y_n|}{1 + |z_n-y_n|} \geq \frac{|x_n-y_n|}{1 + |x_n-y_n|}$$.

(3) Metric satisfies triangle inequality:

We know $$\frac{|x_n - z_n|}{1 + |x_n - z_n|}+\frac{|z_n-y_n|}{1 + |z_n-y_n|} \geq \frac{|x_n-y_n|}{1 + |x_n-y_n|}$$. So

$$2^{-n}(\frac{|x_n - z_n|}{1 + |x_n - z_n|}+\frac{|z_n-y_n|}{1 + |z_n-y_n|}) \geq 2^{-n}\frac{|x_n-y_n|}{1 + |x_n-y_n|}$$

and

$$\sum_{n = 1}^{\infty} 2^{-n}(\frac{|x_n - z_n|}{1 + |x_n - z_n|}+\frac{|z_n-y_n|}{1 + |z_n-y_n|}) \geq \sum_{n = 1}^{\infty} 2^{-n}\frac{|x_n-y_n|}{1 + |x_n-y_n|}$$

QED.

First of all, is this correct? If so, is that it? Is that sufficient to show that $$d$$ is a metric on $$X$$? Although I understood how to prove the hints, I still am not sure how these hints actually show that $$d$$ is a metric on $$X$$, presuming they are sufficient to show this. Any insight is much appreciated.

The definition of a metric $$d$$ has 3 requirements for all points $$x, y \in X$$.

1. $$d(x, y)=0 \iff x=y$$
2. $$d(x, y)=d(y, x)$$
3. triangle inequality.

You've proved the last requirement successfully, now all you need to do is prove the first two (this is quite straight forward).

• Actually nevermind that last comment. Thank you! Mar 12 at 2:58
• Sorry, don't you also need to show that $d(x, y) \geq 0$? How would one go about doing that in this case? @jMdA Mar 12 at 3:02
• No, that's a consequence of the triangle inequality and symmetry $2d(x,y) = d(x, y)+d(y,x)\geq d(x, x)=0$.
– jMdA
Mar 12 at 3:04
• One last thing. When showing the $\implies$ direction in the first one, is this correct: $d(\{x_n\}, \{y_n \}) = 0 \implies \sum_{n = 1}^{\infty} 2^{-n}\frac{|x_n - y_n|}{1 + |x_n - y_n|} = 0 \implies \lim_{n \rightarrow \infty} 2^{-n} \frac{|x_n - y_n|}{1 + |x_n - y_n|} = 0 \implies \frac{|x_n - y_n|}{1 + |x_n - y_n|} = 0 \implies x_n = y_n$ Mar 12 at 3:16
• Not exactly, you have to use that it is a sum of non-negative numbers that sums to zero, therefore each of the terms has to be zero. The limit isn't enough for each of the terms to be zero.
– jMdA
Mar 12 at 3:35
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 25, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "https://math.stackexchange.com/questions/4058586/metric-for-sequences-proof", "fetch_time": 1631851698000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2021-39/segments/1631780054023.35/warc/CC-MAIN-20210917024943-20210917054943-00332.warc.gz", "warc_record_offset": 422159553, "warc_record_length": 38373, "token_count": 1283, "char_count": 3133, "score": 4.125, "int_score": 4, "crawl": "CC-MAIN-2021-39", "snapshot_type": "latest", "language": "en", "language_score": 0.6026073098182678, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00020-of-00064.parquet"}