good_slopes_affine_coordinates
def
Coordinates in the affine basis determined by three points, using the inverse of their two-by-two difference matrix.
Statement
def good_slopes_affine_coordinates {K : Type*} [Field K] (u v w z : K × K) : K × K
- Source
- Affine normalization for the finite-field direction argument in OP-1027.
- Verified
- 15 Nov 2026
- Axioms
- none listed
- Used by 2
- good_slopes_affine_coordinates_formThe original slope form equals the affine-basis constant plus the two basis-direction coefficients times the affine coordinates.
- good_slopes_affine_coordinates_anchorsThe affine-coordinate map sends the three noncollinear basis points to (0,0), (1,0), and (0,1).
Lean source view module on GitHub
def good_slopes_affine_coordinates {K : Type*} [Field K] (u v w z : K × K) : K × K := let dxv := v.1-u.1 let dyv := v.2-u.2 let dxw := w.1-u.1 let dyw := w.2-u.2 let det := dxv*dyw-dxw*dyv ((dyw*(z.1-u.1)-dxw*(z.2-u.2))/det, (dxv*(z.2-u.2)-dyv*(z.1-u.1))/det)