I am typesetting class notes in TeXstudio for myself. Although I have typeset formulas before using LaTeX code, it's my first time putting a whole LaTeX document together, so I suppose some of the errors might be due to my preamble? Also, I'm pretty sure I don't need most of the packages for the example shown below, but I think I need them for my whole document.
1) My main problem is that the spacing between similar "code" is not consistent. For example, the spacing between my theorems and proofs are not the same everywhere. Also, the two parts where I wrote "... of the equation yields:"; the spacing between that text and the \[ \] are not the same in both cases.
(I know the proofs are incomplete and have repetitive lines, but I just cut most of it out to avoid having too much text for this question.)
2) My other problem is when I add \renewenvironment{proof}{\textit{\textbf {Proof:}}} to the preamble to modify the "Proof" text to bold and italics, all my QED blacksquare symbols no longer show up.
My code is:

\documentclass[11pt]{book}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\graphicspath{{images/}}
\usepackage{tikz}
\usetikzlibrary{shapes,snakes}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage[english]{babel}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{hyperref}
\usepackage{commath}
\usepackage{mathtools}
\usepackage{array}
\usepackage{cancel}
\usepackage{xcolor}
\usepackage[top=1in, bottom=0.75in, left=0.65in, right=0.65in]{geometry}
\usepackage{boiboites}
\usepackage{xkeyval}
\usepackage{mdframed}
\usepackage{lipsum}
\renewcommand\qedsymbol{$\blacksquare$}
\renewcommand*{\CancelColor}{\color{red}}
\newboxedtheorem[boxcolor=blue, background=blue!5, titlebackground=blue,
titleboxcolor = black]{theo}{Theorem}{subsection}
%\renewenvironment{proof}{\textit{\textbf {Proof:}}}
\hypersetup{
colorlinks=true,
linkcolor=blue,
filecolor=magenta,
urlcolor=cyan,
pdftitle={Sharelatex Example},
bookmarks=true
}
\title{Probability}
\begin{document}
\frontmatter
\maketitle
\tableofcontents
\mainmatter
\chapter{Introductory Material}
\section{Useful Results}
\begin{theo}[\textbf{Multinomial Theorem}]
Let \(m\ge 2\), then
\[\left(x_1+x_2+\dotsb+x_m \right)^n=\sum_{\substack{ 0 \le k_1,k_2,\dotsc,k_m\le n\\ k_1+k_2+\dotsb+k_m=n}}\frac{n!}{k_1!k_2!\dotsm k_m!}x_1^{k_1}x_2^{k_2}\dotsm x_m^{k_m} \]
\end{theo}
\begin{proof}
We will proceed by induction.
\\
\\
\underline{Base case}: \(m=2\)\\
The left side of the equation yields:
\[\left(x_1+x_2 \right)^n\]
\underline{Inductive Step}: Need to show that the formula works for \(m=\ell+1\)
\\
\\
Thus, the left side of the equation yields:
\begin{align*}
\left(x_1+x_2+\dotsb+x_{\ell}+x_{\ell+1} \right)^n & = \left( \left(x_1+x_2+\dotsb+x_{\ell} \right)+x_{\ell+1} \right)^n\\
&= \sum_{r=0}^n{n\choose r}x_{\ell+1}^r \left(x_1+x_2+\dotsb+x_{\ell} \right)^{n-r}\\
&= \sum_{r=0}^n{n\choose r}x_{\ell+1}^r \left(x_1+x_2+\dotsb+x_{\ell} \right)^{n-r}\\
&= \sum_{r=0}^n{n\choose r}x_{\ell+1}^r \left(x_1+x_2+\dotsb+x_{\ell} \right)^{n-r}\\
&= \sum_{r=0}^n{n\choose r}x_{\ell+1}^r \left(x_1+x_2+\dotsb+x_{\ell} \right)^{n-r} \qedhere
\end{align*}
\end{proof}
\begin{theo}[\textbf{Vandermonde's Identity}]
Let \(m,n,r\) be positive integers, then
\[\sum_{i=0}^r{m\choose i}{n \choose r-j}={m+n \choose r}\]
\end{theo}
\begin{proof}
Now, using the binomial theorem, we observe:
\begin{align*}
\sum_{r=0}^{m+n}{m+n \choose r}x^r
&= \left(1+x \right)^{m+n} \\
&=\left(1+x\right)^m\left(1+x\right)^n \qedhere
\end{align*}
\end{proof}
\end{document}
I have posted a link of the PDF output here: http://docdroid.net/llt4 if you need to see it quickly (with added commentary and blue, red and green arrows illustrating my spacing problems).
boiboites.sty? In answer to the second question, perhaps try using only\renewcommand{\proofname}{\textbf{Proof:}}... – Werner Nov 21 '14 at 06:35I did modify it very slightly to make the boxed theorems rectangular and blue all-around though. I don't think the issue is with those cosmetic changes.
I tried your line for the proof. The squares are back, but "Proof" is still in the default un-bold, italics style. It didn't seem to have done anything for some reason?
– user84226 Nov 21 '14 at 07:10\\ \\I could have guessed they were there from the question title alone. You should remove all\\that are not in tabular or math alignments. – David Carlisle Nov 21 '14 at 08:23\renewenvironmentthat specifies the end code so it picked up the blank line in your file as the definition of\end{proof}– David Carlisle Nov 21 '14 at 08:30\usepackagelist by combiningmathtoolsandamsmath(which is loaded by the former) and similarly foramssymbandamsfonts. i haven't looked intoboiboites, but the way thatamsthmdefines and uses\proofname, it shouldn't have any adverse side effects if you tried\renewcommand{\proofname}{{\normalfont\bfseries Proof}}– barbara beeton Nov 21 '14 at 14:42\abovedisplayskipand\abovedisplayshortskip. The former is inserted if there may be a horizontal overlap between the display and the text preceding it. The latter is inserted when that overlap might not happen; it's usually smaller so that you're not taking up unnecessary whitespace. By default they're defined to have lengths\abovedisplayskip=12pt plus 3pt minus 9pt \abovedisplayshortskip=0pt plus 3pt, which could be huge in some cases. – Werner Nov 21 '14 at 16:13However, I'm not too sure why the above solutions for my QED part weren't working. After a lot of endless searching, I finally came across this post: http://tex.stackexchange.com/questions/8089/changing-style-of-proof and Matt Fayers's answer worked exactly the way I needed it.
– user84226 Nov 22 '14 at 06:56