# Plan to Fix Notation Inconsistencies and Typos in `submission.md`

This document outlines the specific changes required to harmonize the mathematical notation across the main text and appendices of `submission.md`, as well as fixing several typographical errors in the LaTeX formulas.

## 1. Fix Typos in the Main Text

- **Acceptance Ratio Fraction**: The fraction is malformed.
  - *Location*: Section "Hamiltonian Monte Carlo"
  - *Old*: `\frac{\pi{\theta^{\star}}{\theta^{\dagger}}`
  - *New*: `\frac{\pi(\theta^{\star})}{\pi(\theta^{\dagger})}`

- **Potential Energy Gradient**: Mixing of $\theta$ and $q$ variables.
  - *Location*: Section "Hamiltonian Monte Carlo"
  - *Old*: `\nabla_{\theta}=\frac{\partial V}{\partial q}`
  - *New*: `\nabla_{\theta}=\frac{\partial V}{\partial \theta}`

- **Missing Backslash in Fraction**:
  - *Location*: Section "Methods"
  - *Old*: `frac{\partial x^{i-1}}{\partial \theta^{i-1}}`
  - *New*: `\frac{\partial x^{i-1}}{\partial \theta^{i-1}}`

- **Missing Backslash in Dagger Symbol**:
  - *Location*: Section "Hamiltonian Monte Carlo"
  - *Old*: `\theta^{\star} \sim N(\theta^{dagger}, \Sigma)`
  - *New*: `\theta^{\star} \sim N(\theta^{\dagger}, \Sigma)`

- **Misspelled Ellipsis**:
  - *Location*: Section "Hamiltonian Monte Carlo"
  - *Old*: `\elipsis`
  - *New*: `\dots`

- **Missing Inverse Sign Minus**:
  - *Location*: Section "Embedded root-finding"
  - *Old*: `x_{i+1} = x_i - J_{x_i}{-1} g(x_i, \theta)`
  - *New*: `x_{i+1} = x_i - J_{x_i}^{-1} g(x_i, \theta)`

## 2. Harmonize Appendix 1 with Main Text

- **Momentum Variable**: Change $p$ to $\kappa$.
  - *Main Text Usage*: $\kappa$
  - *Changes in Appendix 1*:
    - `initial momentum $p_0$` $\rightarrow$ `initial momentum $\kappa_0$`
    - `$p_{\text{mo}} \leftarrow p - \frac{\epsilon}{2} \nabla_{\theta} U$` $\rightarrow$ `$\kappa_{\text{mo}} \leftarrow \kappa - \frac{\epsilon}{2} \nabla_{\theta} V$`
    - `$\theta_{+} \leftarrow \theta + \epsilon p_{\text{mo}}$` $\rightarrow$ `$\theta_{+} \leftarrow \theta + \epsilon \kappa_{\text{mo}}$`
    - `$p_{+} \leftarrow p_{\text{mo}} - \frac{\epsilon}{2} \nabla_{\theta} U_{+}$` $\rightarrow$ `$\kappa_{+} \leftarrow \kappa_{\text{mo}} - \frac{\epsilon}{2} \nabla_{\theta} V_{+}$`
    - Update return statements containing $p_0$, $p$, and $p_+$ to use $\kappa_0$, $\kappa$, and $\kappa_+$.

- **Potential Energy Variable**: Change $U$ to $V$.
  - *Main Text Usage*: $V(\theta)$
  - *Changes in Appendix 1*:
    - Replace all instances of $U$ (e.g., $U_0$, $U_+$, $U$, $\nabla_{\theta} U$) with $V$ (e.g., $V_0$, $V_+$, $V$, $\nabla_{\theta} V$).

- **Initial Guess Variable**: Change $x_{\text{guess}}$ to $x_0$.
  - *Main Text Usage*: $x_0$ (e.g., $x_0^i$)
  - *Changes in Appendix 1*:
    - Replace `$x_{\text{guess}}$` with `$x_0$`.

## 3. Harmonize Appendix 2 with Main Text

- **Root-Finding Function**: Change $f$ to $g$ in the mathematical notation (keeping $f$ in the Python code examples is fine).
  - *Main Text Usage*: $g(x, \theta) = \bar{0}$
  - *Changes in Appendix 2*:
    - `$\operatorname{jac}_{x}f(x_{prev}, \theta_{prev})$` $\rightarrow$ `$\operatorname{jac}_{x}g(x^{i-1}, \theta^{i-1})$`
    - `$\operatorname{jac}_{\theta}f(x_{prev}, \theta_{prev})$` $\rightarrow$ `$\operatorname{jac}_{\theta}g(x^{i-1}, \theta^{i-1})$`

- **Trajectory Step Indexing**: Change `prev` and `next` subscripts to superscript indices.
  - *Main Text Usage*: $\theta^{i-1}$, $\theta^{i}$, $x^{i-1}$
  - *Changes in Appendix 2*:
    - $x_{prev}$ $\rightarrow$ $x^{i-1}$
    - $\theta_{prev}$ $\rightarrow$ $\theta^{i-1}$
    - $\theta_{next}$ $\rightarrow$ $\theta^{i}$
    - $\Delta\theta=(\theta_{next}-\theta_{prev})$ $\rightarrow$ $\Delta\theta=(\theta^{i}-\theta^{i-1})$
    - Update the function definition equation: `\text{guess-implicit}(x^{i-1}, \theta^{i-1}, \theta^{i}) = ...`
