Problems with extra vertical space and centering

I have this generic "proof" concerning injections below and would like the vertical dots to be centered. I tried \begin{centering} but of course this adds vertical space above and below the dots which I would like to avoid. My MWE below uses \centering and I admit I may be using it incorrectly. When I attemtped this before with that centering command it worked fine except that it centered the entire proof.

I just want to center the vertical dots and nothing more with no extra spaces above and below those dots. Thanks!!!

\documentclass[12 pt]{article}
\usepackage[left=1.65cm,right=1.65cm,top=2.50cm,bottom=2.75cm]{geometry}
\usepackage{amsmath,amssymb,amscd,amsbsy,array,color}
\usepackage{fancyhdr,framed,latexsym,multicol,pstricks,slashed,xcolor}
\usepackage{picture}
\usepackage{indentfirst}
\usepackage{enumitem}

\usepackage[amsmath,framed,thmmarks]{ntheorem}

\theoremstyle{nonumberplain}
\theoremsymbol{\rule{1ex}{1ex}}
\def\theoremframecommand{%

\title{Analysis}
\author{Philip Dykes}

\begin{document}

\maketitle

\begin{center}
\textsc{Contrapositive Proof that $f: X \to Y$ is injective.}\\
\begin{minipage}{8cm}
\begin{proof}
Suppose $x,y \in X$ and $x \ne y$.\\
{\centering{$\quad \quad \quad \vdots$}} \\
Hence $f(x) \ne f(y)$.\\
$\therefore f: X \to Y$ is injective.
\end{proof}
\end{minipage}
\end{center}

\end{document}

• \begin{centering} is \begingroup\centering and would not add any vertical space (perhaps you meant \begin{center} ?) Dec 19 '16 at 17:21

centering is a paragraph setting, with the values at the end of the paragraph being use

            {\centering{$\quad \quad \quad \vdots$}} \\


there is no paragraph end there so \centering has gone out of scope by the time the paragraph ends

You could use

...\\
\makebox[\linewidth]{$\vdots$}\\
...


for example.

• Thank you so very much David that works beautifully and exactly what I was looking for!!! I wish you and all here a very Merry Christmas and Happy Holidays!!! Dec 19 '16 at 17:45