# Why the Q.E.D. symbol show after the sentence end and can't show right aligned (as picture below)?

\documentclass[twoside,11pt]{book}
\usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm,papersize={15.5cm,23.5cm}]{geometry}
\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}.}
\renewcommand{\thesubsection}{\arabic{chapter}.\arabic{section}.\arabic{subsection}.}
\usepackage{amsthm}
\newtheorem{definition}{Definition}[section]
\newtheorem{theorem}{Theorem}[section]
\renewcommand{\thetheorem}{\thesection\arabic{theorem}}
\renewenvironment{proof}{{\noindent\bfseries Proof.}}{\qedsymbol}
\renewcommand{\qedsymbol}{\rule{1ex}{1ex}}

\begin{document}
\chapter{ABC}
blablabla
\section{ONE}
\begin{theorem}
dddd
\end{theorem}
\begin{proof}
It is clear.
\end{proof}
\end{document}


I want the text Proof is bold. So I write:

\renewenvironment{proof}{{\noindent\bfseries Proof.}}{\qedsymbol}


Now, I want to Q.E.D. symbol is black square, so I write

\renewcommand{\qedsymbol}{\rule{1ex}{1ex}}


Why the Q.E.D. symbol show after the sentence end and can't show right aligned (as picture below)? How to make it?

I want:

• \renewenvironment{proof}{{\noindent\bfseries Proof.}}{\qedsymbol} has completely removed all the definition of the proof environment and its placement of the header and of the qed symbol, the end code just dumps the symbol as if you had written \qedsymbol at the end of the text. Apr 3 at 14:13
• Why are you redefining proof to begin with? If it's just in order to get “Proof” in boldface, there are much better methods: see tex.stackexchange.com/a/251251/4427 Apr 3 at 14:34

My suggestion is to use https://tex.stackexchange.com/a/251251/4427 with also a redefinition of \qedsymbol.

\documentclass{article}

\usepackage{amsthm}
\usepackage{xpatch}

\providecommand{\proofnamefont}{\itshape}% the default
\xpatchcmd{\proof}{\itshape}{\normalfont\proofnamefont}{}{}

\renewcommand{\qedsymbol}{\rule{1ex}{1ex}}

\begin{document}

\begin{proof}
Obvious, isn't it?
\end{proof}

\end{document}


From your MWE, came to understand that you need the Proof name in Bold face and the qedsymbol should be in solid black square, for that no need to redefine the proof environment, you can modify the \proofname and \qedsymbol as you wish, and the modified MWE is:

\documentclass[twoside,11pt]{book}
\usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm,papersize={15.5cm,23.5cm}]{geometry}
\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}.}
\renewcommand{\thesubsection}{\arabic{chapter}.\arabic{section}.\arabic{subsection}.}
\usepackage{amsthm}
\newtheorem{definition}{Definition}[section]
\newtheorem{theorem}{Theorem}[section]
\renewcommand{\thetheorem}{\thesection\arabic{theorem}}
%\renewenvironment{proof}{{\noindent\bfseries Proof.}}{\qedsymbol}
\renewcommand{\proofname}{\upshape\textbf{Proof}}
\renewcommand{\qedsymbol}{\rule{1ex}{1ex}}

\begin{document}
\chapter{ABC}
blablabla
\section{ONE}
\begin{theorem}
dddd
\end{theorem}
\begin{proof}
It is clear.
\end{proof}
\end{document}


And the output is:

You can redefine the \proofname and \qedsymbol as folows. It's not necessary to create a black square by the rule command since there is a \blacksquare command in the amssymb package which could produce a black square as the same size as the (white) square.

\documentclass[twoside,11pt]{book}
\usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm,papersize={15.5cm,23.5cm}]{geometry}
\renewcommand{\thechapter}{\Roman{chapter}}
\renewcommand{\thesection}{\arabic{chapter}.\arabic{section}.}
\renewcommand{\thesubsection}{\arabic{chapter}.\arabic{section}.\arabic{subsection}.}
\usepackage{amsthm}
\newtheorem{definition}{Definition}[section]
\newtheorem{theorem}{Theorem}[section]
\renewcommand{\thetheorem}{\thesection\arabic{theorem}}

\renewcommand{\proofname}{\upshape\bfseries Proof}
\usepackage{amssymb}
\renewcommand{\qedsymbol}{\ensuremath\blacksquare}

\begin{document}
\chapter{ABC}
blablabla
\section{ONE}
\begin{theorem}
dddd
\end{theorem}
\begin{proof}
It is clear.
\end{proof}
\end{document}


And the output is as follows.

By the way, the chapter numbers should not be roman since the prefixes in section numbers are arabic. Also, it's not necessary to add dots after section numbers since there are no dots after chapter numbers.