AFTD Auto-Formalizing Theoretical Domains

good_slopes_affine_coordinates_anchors

theoremverified

The affine-coordinate map sends the three noncollinear basis points to (0,0), (1,0), and (0,1).

Statement

theorem good_slopes_affine_coordinates_anchors {K : Type*} [Field K]
    (u v w : K × K)
    (hd : (v.1-u.1)*(w.2-u.2)-(w.1-u.1)*(v.2-u.2) ≠ 0) :
    good_slopes_affine_coordinates u v w u = (0,0) ∧
    good_slopes_affine_coordinates u v w v = (1,0) ∧
    good_slopes_affine_coordinates u v w w = (0,1)
Source
Affine normalization for the finite-field direction argument in OP-1027.
Verified
15 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1

The proof, explained

The theorem states that the affine coordinate map determined by three noncollinear points u, v, w maps u to (0, 0), v to (1, 0), and w to (0, 1). The proof splits the conjunction into three independent checks, one for each anchor point. In each case, pair equality is reduced to the two components via Prod.ext, and the coordinate formulas are unfolded. Because the determinant denominator is nonzero by hypothesis hd, div_eq_iff clears denominators, and the resulting polynomial identities are resolved by ring arithmetic.

  1. The affine coordinate map sends the origin anchor point u to (0, 0).

    We split the three-part conjunction to verify the point u first. To show good_slopes_affine_coordinates u v w u = (0, 0), we apply Prod.ext to decompose equality of pairs into equality of each component. Unfolding the definition of good_slopes_affine_coordinates at z = u, the coordinate numerators contain the differences u.1 - u.1 and u.2 - u.2. Because the determinant denominator is nonzero by hypothesis hd, div_eq_iff converts each fraction equality num / det = 0 into num = 0 * det, which is verified by ring arithmetic.

    lines 10–11

    uses Prod.ext, div_eq_iff

      constructor
      · apply Prod.ext <;> dsimp [good_slopes_affine_coordinates] <;> apply (div_eq_iff hd).2 <;> ring
  2. The affine coordinate map sends the first basis anchor point v to (1, 0).

    We split the remaining conjunction to address the point v. Applying Prod.ext reduces the equality to showing that the first coordinate is 1 and the second coordinate is 0. Unfolding good_slopes_affine_coordinates at z = v, the first numerator is (w.2 - u.2) * (v.1 - u.1) - (w.1 - u.1) * (v.2 - u.2), which equals the determinant, while the second numerator simplifies to (v.1 - u.1) * (v.2 - u.2) - (v.2 - u.2) * (v.1 - u.1) = 0. Since the determinant is nonzero by hd, div_eq_iff clears denominators, and ring arithmetic confirms both polynomial identities.

    lines 12–13

    uses Prod.ext, div_eq_iff

      constructor
      · apply Prod.ext <;> dsimp [good_slopes_affine_coordinates] <;> apply (div_eq_iff hd).2 <;> ring
  3. The affine coordinate map sends the second basis anchor point w to (0, 1).

    For the final point w, we again apply Prod.ext to reduce to componentwise equality. Unfolding good_slopes_affine_coordinates at z = w, the first numerator simplifies to 0 and the second numerator evaluates to the determinant. Since hd ensures the denominator is nonzero, div_eq_iff clears fractions to num = 0 * det and num = 1 * det, respectively, which ring arithmetic verifies.

    line 14

    uses Prod.ext, div_eq_iff

      · apply Prod.ext <;> dsimp [good_slopes_affine_coordinates] <;> apply (div_eq_iff hd).2 <;> ring
Prod.ext
Two ordered pairs are equal if their first components are equal and their second components are equal.
div_eq_iff
For elements a, b, c in a field (or division ring) with b ≠ 0, the quotient a / b equals c if and only if a = c * b.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

set_option maxHeartbeats 5000000set_option maxRecDepth 10000theorem good_slopes_affine_coordinates_anchors {K : Type*} [Field K]    (u v w : K × K)    (hd : (v.1-u.1)*(w.2-u.2)-(w.1-u.1)*(v.2-u.2) ≠ 0) :    good_slopes_affine_coordinates u v w u = (0,0) ∧    good_slopes_affine_coordinates u v w v = (1,0) ∧    good_slopes_affine_coordinates u v w w = (0,1) := by  constructor  · apply Prod.ext <;> dsimp [good_slopes_affine_coordinates] <;> apply (div_eq_iff hd).2 <;> ring  constructor  · apply Prod.ext <;> dsimp [good_slopes_affine_coordinates] <;> apply (div_eq_iff hd).2 <;> ring  · apply Prod.ext <;> dsimp [good_slopes_affine_coordinates] <;> apply (div_eq_iff hd).2 <;> ring
See it in the graphDiscuss this resultChallenge it