## Screenshot: Functional Programming Theorem Proofs
### Overview
The image shows a code editor interface displaying two formal theorem proofs written in a functional programming language (likely Coq or Lean). The text uses syntax highlighting with multiple colors, and the editor has standard macOS window controls (red, yellow, green circles) in the top-left corner.
### Components/Axes
- **Window Controls**: Red (close), yellow (minimize), green (maximize) circles in the top-left corner.
- **Text Content**:
- **Theorem 1**: `theorem mathd_algebra_148`
- Hypotheses:
- `h0 : ∀ x, f x = c * x^3 - 9 * x + 3`
- `h1 : f 2 = 9`
- Definitions:
- `c = 3 := by`
- `linarith [h0 2]`
- **Theorem 2**: `theorem amc12a_2016_p3`
- Hypotheses:
- `h0 : ∀ x, ∀ y, (y ≠ 0 → f x y = x - y * Int.floor(x / y))`
- Calculations:
- `f (3 / 8) (-(2 / 5)) = -(1 / 40) := by`
- Tactics:
- `norm_num [h0]`
- `field_simp`
- `norm_cast`
### Detailed Analysis
1. **Theorem 1 (`mathd_algebra_148`)**:
- Defines a cubic polynomial `f x = c * x^3 - 9 * x + 3` with `c = 3`.
- Proves `f 2 = 9` using linear arithmetic (`linarith`) with hypothesis `h0`.
2. **Theorem 2 (`amc12a_2016_p3`)**:
- Defines a function `f` with a conditional: `f x y = x - y * Int.floor(x / y)` when `y ≠ 0`.
- Computes `f (3/8) (-2/5)` and proves the result equals `-1/40` using:
- Normalization (`norm_num`)
- Field simplification (`field_simp`)
- Type casting (`norm_cast`)
### Key Observations
- **Color Coding**:
- Blue: Keywords (`theorem`, `by`, `linarith`, `field_simp`)
- Red: Hypotheses (`h0`, `h1`) and function arguments (`3/8`, `-2/5`)
- Green: Operators (`*`, `-`, `/`, `=`) and constants (`3`, `9`)
- Yellow: Function definitions (`f x y = ...`)
- **Syntax Highlighting**: Distinguishes between types, variables, operators, and tactics.
- **Tactics**: Explicit proof strategies (`linarith`, `norm_num`, `field_simp`) indicate automated theorem proving.
### Interpretation
This code demonstrates formal verification of mathematical properties using a proof assistant. The theorems:
1. Prove a cubic polynomial evaluates to a specific value at `x = 2`.
2. Verify a piecewise function's behavior under division, leveraging integer flooring and field properties.
The use of `linarith` suggests the first theorem relies on linear arithmetic reasoning, while the second theorem combines normalization, field axioms, and type casting to handle rational numbers and integer operations. The structured proof approach (`hypotheses → definitions → tactics`) reflects formal methods for ensuring mathematical correctness in computational systems.