AFTD Auto-Formalizing Theoretical Domains

rotCW

def

The clockwise quarter-turn rotation on pairs of natural numbers (ℕ × ℕ) parameterized by n : ℕ maps (x, y) to (y, n - 1 - x).

Statement

def rotCW (n : ℕ) : (ℕ × ℕ) → (ℕ × ℕ)
Defined in
arXiv:2611.12329 Piercing a Chessboard with Restricted Slopes, Section 1
Verified
12 Nov 2026
Axioms
none listed
Used by 2
  • dtTraceThe trace of a descending steep (DT) path with underlying AS coordinate function a : ℤ → ℤ on the n × n chessboard is the image of asTrace…
  • as_dt_path_intersection_le_twoFor any natural number n and any coordinate functions a1 and a2 satisfying IsASPath, the intersection of asTrace n a1 and dtTrace n a2 has…

Read back from the Lean

Given a natural number $n$, rotCW n is the function from $\mathbb{N} \times \mathbb{N}$ to $\mathbb{N} \times \mathbb{N}$ that maps a pair $(x, y)$ to $(y, n - 1 - x)$, where subtraction is truncated natural number subtraction.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- Clockwise quarter-turn rotation of a pair of natural numbers on the n x n chessboard. -/
def rotCW (n : ℕ) : (ℕ × ℕ) → (ℕ × ℕ) := fun ⟨x, y⟩ => (y, n - 1 - x)
See it in the graphDiscuss this resultChallenge it