Is the following metric? I just start my intro to topology class.
By definition: A set $X$ is a metric space if it is associated with a distance function (metric) $d:X \times X \mapsto \mathbb{R}_+$ such that


*

*$d(p,q)>0$ if $p\neq q$; $d(p,p)=0$;

*$d(p,q)=d(q,p)$

*$d(p,q)\leq d(p,r)+d(r,q)$, for any $r\in X$.


Question: Consider $X \subseteq \mathbb{R}^2$, determine if they make $X$ a metric space, with $x=(x_1,x_2)$ and $y=(y_1,y_2)$.


*

*$d(x,y)=6$ if $x_1 \neq y_1$ and $x_2 \neq y_2$ and $d(x,y)=0$, o/w.


[Removed wrong solution] Please see comments. Thank you all.
Can anyone verify whether my work is correct? If not, what is the counter example? I'm having hard time to picturize these two functions. Although it's not required by this course, I am just curious how would a "real" proof look like.
 A: Your post asks what a proof would look like, so I’ll give an example proof of the following:

Let $d:\mathbb R^2\to\mathbb R$ satisfy $d(x,y)=0$ if $x=y$ and $1$ otherwise. Then $d$ is a distance function.

Proof: To prove this, we show that each property of a metric holds for $d$.
Firstly, we need $d(x,y)\geq0,$ with equality iff $x=y$. By definition, $d$ only takes on the values $0$ or $1$ so it is non-negative. Also by definition, it takes on the value $0$ exactly when $x=y$, so it is positive definite.
Secondly, we need $d(x,y)=d(y,x)$. If $x=y$, then $d(x,y)=d(x,x)=0=d(y,y)=d(y,x)$ and we are done. If $x\neq y$, then $d(x,y)=1=d(y,x)$ immediately from the definition.
Thirdly, we need the triangle inequality to hold. Suppose it didn’t, so that $d(x,z)>d(x,y)+d(y,z)$. If $x\neq y$, then we would have $d(x,z)>1+d(y,z)$. But $d$ is bounded above by $1$ and below by $0$, so this is impossible. Therefore, if there is a violation, $x=y$. Likewise, we find that $y=z$. Therefore $x=y=z$. But then both sides of the inequality are zero, so there is no violation. Thus there are no possible inputs that violate the triangle inequality, so it is true.
Therefore all three properties of a metric hold for $d$, and we conclude.
——-
All of these could be done less verbosely, but your example functions are pretty trivial and I’ve always felt it best to err on the side of being overly expressive with trivial statements than under-expressive.
I was overly harsh in my comment about your purported proof, but I do want to draw your attention to your purported proof of 1.iii. You didn’t actually write anything here other than the statement that needs to be proven. In this example, you actually just rewrote the conclusion.
Your proof of 1.i and 1.ii don’t suffer from that problem, but they do lack the second case which needs to be examined. They also lacks the crucial “...if... then...” (maybe the colon is supposed to represent this?)
I stand by my claim in the comments: proofs written entirely in formal language are usually bad form and should be strongly discouraged in novices. Proofs are arguments, and should be written to be compelling, interesting, and eloquent, just like arguments.
You’ll notice that not only did I use a lot of English words, I also structured my proof with an introduction and a conclusion, just like you might an essay. This is highly desirable. In fact, virtually all advice for writing a good argumentative paper applies to writing a good mathematics proof.
