\documentclass{article} \usepackage{amsfonts, amsthm} \usepackage{hyperref} \newtheorem{theorem}{Theorem} \newtheorem{custominner}{Theorem} \newenvironment{custom}[1]{% \renewcommand\thecustominner{#1}% \custominner }{\endcustominner} \begin{document} \begin{theorem}[Sum of Geometric Series] Let $(a_i)_{i \geq 0}$ be a geometric sequence with common ratio $r \neq 1$. Then for some $n \in \mathbb{N}$, $$\sum_{i=0}^n a_i = \frac{a_0(1 - r^{n+1})}{1 - r}.$$ \end{theorem} \begin{proof} \href{Geometric.lean}{Common.Sequence.Geometric.sum\_recursive\_closed} \end{proof} \end{document}