AFTD Auto-Formalizing Theoretical Domains

is_primitive_int_vec_abs

theoremverified

For an integer vector z in ℤ^n, if z is primitive (every common natural divisor of all coordinates divides 1), then its coordinatewise absolute value |z| is also primitive.

Statement

theorem is_primitive_int_vec_abs (n : ℕ) (z : Fin n → ℤ) (hz : is_primitive_int_vec n z) :
    is_primitive_int_vec n (fun i => |z i|)
Source
arXiv:2610.37711 Proposition 4.4 proof
Verified
08 Nov 2026
Axioms
Quot.soundpropext
Built on 1
  • is_primitive_int_vecAn integer vector is primitive if every natural number dividing all of its coordinates divides 1.

Read back from the Lean

For any natural number $n$ and any vector of integers $z : \mathrm{Fin}\ n \to \mathbb{Z}$, if $z$ is a primitive integer vector (meaning every natural number $d$ dividing $z(i)$ for all $i \in \mathrm{Fin}\ n$ satisfies $d \mid 1$), then the vector of componentwise absolute values $i \mapsto |z(i)|$ is also a primitive integer vector.

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

The proof, explained

To show that the coordinatewise absolute value $|z|$ is primitive, we assume that a natural number $d$ divides $|z_i|$ for every coordinate $i$, and must show $d \mid 1$. Because an integer divides an absolute value if and only if it divides the underlying integer (`dvd_abs`), $d$ also divides each coordinate $z_i$. The conclusion then follows directly from the assumption that $z$ is primitive.

  1. The coordinatewise absolute value $|z|$ is a primitive integer vector.

    Unfolding the definition of a primitive vector, assume a natural number $d$ satisfies $(d : \mathbb{Z}) \mid |z i|$ for all coordinates $i$. By `dvd_abs`, an integer divides $|z i|$ if and only if it divides $z i$, so $(d : \mathbb{Z})$ divides each coordinate of $z$. Since $z$ is primitive by assumption (`hz`), $d$ must divide $1$.

    line 3

    uses dvd_abs

        is_primitive_int_vec n (fun i => |z i|) := fun d hd => hz d fun i => (dvd_abs (d : ℤ) (z i)).mp (hd i)
dvd_abs
In an ordered ring, an element divides the absolute value of another if and only if it divides that element ($a \mid |b| \iff a \mid b$).

Written by a model (gemini-3.8-flash) from the Lean source alone (no goal states were available). Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

/-- The coordinatewise absolute value of a primitive integer vector is primitive. -/theorem is_primitive_int_vec_abs (n : ℕ) (z : Fin n → ℤ) (hz : is_primitive_int_vec n z) :    is_primitive_int_vec n (fun i => |z i|) := fun d hd => hz d fun i => (dvd_abs (d : ℤ) (z i)).mp (hd i)
See it in the graphDiscuss this resultChallenge it