## Code Snippets: Proof Assistant Examples
### Overview
The image presents a collection of code snippets, likely from different proof assistants or formal verification systems. Each snippet demonstrates a specific lemma or theorem, along with the proof strategy used to establish its validity. The snippets are grouped under headings indicating the project or library they belong to.
### Components/Axes
The image is divided into six sections, each representing a different project or library:
1. **PFR** (top-left)
2. **SciLean** (middle-left)
3. **Coxeter** (bottom-left)
4. **MiniF2F** (top-right)
5. **Formal Book** (bottom-right)
Each section contains:
* A lemma or theorem declaration, including its name and type signature.
* A proof script, indicating the steps taken to prove the lemma or theorem.
* Highlighted terms, likely indicating key definitions or tactics used in the proof.
### Detailed Analysis or Content Details
**1. PFR (top-left)**
* **Lemma:** `condRho_of_translate`
* **Declaration:** `lemma condRho_of_translate {Ω S : Type*} [MeasureSpace Ω] (X : Ω → G) (Y : Ω → S) (A : Finset G) (s:G): condRho (fun w → X w + s) Y A = condRho X Y A := by`
* **Proof:** `simp only [condRho, rho_of_translate]`
* **Interpretation:** This lemma likely relates to conditional expectations or Radon-Nikodym derivatives in measure theory. The proof simplifies the expression using the definitions of `condRho` and `rho_of_translate`.
**2. SciLean (middle-left)**
* **Theorem:** `re_float`
* **Declaration:** `theorem re_float (a : Float) : RCLike.re a = a := by`
* **Proof:** `exact RCLike.re_eq_self_of_le le_rfl`
* **Interpretation:** This theorem states that the real part of a floating-point number `a` is equal to `a` itself. The proof uses the `RCLike.re_eq_self_of_le le_rfl` lemma, which likely establishes this property based on the ordering of real numbers.
**3. Coxeter (bottom-left)**
* **Lemma:** `invmap.of_eq`
* **Declaration:** `lemma invmap.of_eq {S:Set G} [CoxeterSystem G S] {s :S} : invmap S s = s := by`
* **Proof:**
* `simp [CoxeterSystem.Presentation.invmap]`
* `unfold CoxeterSystem.toMatrix`
* `apply CoxeterSystem.monoidLift.mapLift.of`
* **Interpretation:** This lemma states that the inverse map of an element `s` in a Coxeter system `S` is equal to `s` itself. The proof involves simplifying using the definition of `invmap`, unfolding the definition of `toMatrix`, and applying a lemma related to monoid lifting.
**4. MiniF2F (top-right)**
* **Theorem:** `induction_12dvd4expnp1p20`
* **Declaration:** `theorem induction_12dvd4expnp1p20 (n: N): 12 | 4^(n+1) + 20 := by`
* **Proof:**
* `norm_num`
* `induction' n with n hn`
* `simp`
* `omega`
* **Interpretation:** This theorem states that 12 divides 4^(n+1) + 20 for all natural numbers `n`. The proof uses induction, simplification, and the `omega` tactic, which likely performs arithmetic reasoning.
* **Theorem:** `amc12a_2002_p6`
* **Declaration:** `theorem amc12a_2002_p6 (n: N) (h₀: 0 < n): ∃ m, (m > n ∧ ∃ p, m * p ≤ m + p) := by`
* **Proof:**
* `lift n to N+ using h₀`
* `cases' n with n`
* `exact (_, lt_add_of_pos_right zero_lt_one, 1, by simp)`
* **Interpretation:** This theorem states that for any natural number `n` greater than 0, there exists an `m` such that `m` is greater than `n` and there exists a `p` such that `m * p` is less than or equal to `m + p`. The proof lifts `n` to the positive natural numbers, performs a case split, and uses a lemma related to the addition of positive numbers.
**5. Formal Book (bottom-right)**
* **Theorem:** `wedderburn`
* **Declaration:** `theorem wedderburn (h: Fintype R): IsField R := by`
* **Proof:** `apply Field.toIsField`
* **Interpretation:** This theorem states that if `R` is a finite type, then `R` is a field. The proof applies the `Field.toIsField` lemma, which likely establishes this property based on the finiteness of `R`.
### Key Observations
* The code snippets demonstrate a variety of proof techniques, including simplification, induction, case splitting, and application of existing lemmas.
* The highlighted terms indicate key definitions or tactics used in the proofs.
* The snippets cover a range of mathematical topics, including measure theory, real analysis, Coxeter systems, number theory, and field theory.
### Interpretation
The image provides a glimpse into the world of formal verification and proof assistants. It showcases how mathematical theorems and lemmas can be expressed and proven using code. The different projects and libraries represented in the image likely aim to formalize and verify various areas of mathematics. The use of proof assistants allows for rigorous and machine-checkable proofs, ensuring the correctness of mathematical results.