## Code Screenshot: Formal Mathematical Lemmas
### Overview
The image displays a screenshot of a code editor window (dark theme, macOS-style traffic light buttons in the top-left) containing two formal lemma definitions written in a dependently-typed proof language, likely Lean 4 or a similar system. The code is syntax-highlighted. The content is purely textual and mathematical; there are no charts, graphs, or diagrams with data trends.
### Components/Axes
* **Window Frame:** A dark gray rounded rectangle with a subtle drop shadow, set against a light gray-blue background.
* **Window Controls:** Three colored circles (red, yellow, green) in the top-left corner, typical of a macOS window.
* **Code Content:** Two distinct blocks of code, each defining a `lemma`. The text uses a monospaced font with syntax highlighting:
* Keywords (`lemma`, `by`) are in a pink/red color.
* Type names (`Type*`, `MeasureSpace`, `Fin`, `Equiv.Perm`) are in green.
* Variables and identifiers are in white/light gray.
* The proof term `rfl` is in blue.
* Mathematical symbols (`ℕ`, `→`, `∀`, `↦`, `:=`) are rendered as part of the code.
### Detailed Analysis / Content Details
The image contains two complete lemma statements and their proofs.
**Lemma 1: `multiDist_copy`**
* **Declaration:** `lemma multiDist_copy {m:ℕ} {Ω : Fin m → Type*} {Ω' : Fin m → Type*}`
* **Hypotheses:**
* `(hΩ : (i : Fin m) → MeasureSpace (Ω i))`
* `(hΩ': (i : Fin m) → MeasureSpace (Ω' i)) (X : (i : Fin m) → (Ω i) → G)`
* `(X' : (i : Fin m) → (Ω' i) → G)`
* `(hident: ∀ i, IdentDistrib (X i) (X' i) (hΩ i).volume (hΩ' i).volume) :`
* **Conclusion:** `D[X ; hΩ] = D[X' ; hΩ']`
* **Proof:** `:= by rfl`
**Lemma 2: `multiDist_of_perm`**
* **Declaration:** `lemma multiDist_of_perm {m:ℕ} {Ω : Fin m → Type*}`
* **Hypotheses:**
* `(hΩ : (i : Fin m) → MeasureSpace (Ω i))`
* `(X : (i : Fin m) → (Ω i) → G) (φ : Equiv.Perm (Fin m)) :`
* **Conclusion:** `D[X ; hΩ] = D[fun i ↦ X (φ i); fun i ↦ hΩ (φ i)]`
* **Proof:** `:= by rfl`
### Key Observations
1. **Formal Proof Context:** The code is from a formal verification or proof assistant environment. The `:= by rfl` tactic indicates both lemmas are proven by reflexivity, meaning the equality is definitionally true.
2. **Mathematical Subject:** The lemmas concern measure theory and probability. Key concepts include:
* `MeasureSpace`: A space equipped with a measure.
* `IdentDistrib`: A predicate stating two random variables have identical distributions.
* `D[... ; ...]`: Likely denotes a multi-dimensional distribution or a divergence measure (e.g., differential entropy, KL divergence) constructed from a family of random variables `X` over product spaces defined by `Ω`.
* `Equiv.Perm (Fin m)`: A permutation on a finite set of `m` elements.
3. **Lemma Purpose:**
* `multiDist_copy`: Asserts that the quantity `D` is invariant if each random variable `X i` is replaced by an identically distributed copy `X' i` (with respect to their respective measure spaces).
* `multiDist_of_perm`: Asserts that `D` is invariant under a simultaneous permutation of the indices of both the random variables `X` and the measure spaces `hΩ`.
### Interpretation
This image captures a snippet of formalized mathematics, specifically within the realm of measure-theoretic probability. The lemmas establish foundational invariance properties for a mathematical object `D` defined over a collection of random variables.
* **What it demonstrates:** The code proves that the object `D` depends only on the *joint distribution* of the family of random variables `(X i)`, not on the specific underlying probability spaces `(Ω i, hΩ i)` or their labeling order. The first lemma (`multiDist_copy`) shows invariance under replacing variables with identically distributed ones. The second (`multiDist_of_perm`) shows invariance under relabeling the components via a permutation.
* **Why it matters:** Such properties are crucial for ensuring that a defined quantity (like a multi-information measure, a divergence, or an entropy) is well-defined on the space of distributions and not an artifact of a particular representation. The use of a proof assistant guarantees these properties hold with mathematical rigor.
* **Notable aspect:** The proofs are trivial (`rfl`), suggesting that the definition of `D` is constructed in such a way that these equalities hold by definition or by very basic properties of the underlying constructs (like `IdentDistrib`). The real work likely lies in the definitions that precede these lemmas, which are not shown.