AFTD Auto-Formalizing Theoretical Domains

int_box_three_mem_iff

theoremverified

A vector lies in [[-m,m]]^3 iff each coordinate has absolute value at most m.

Statement

theorem int_box_three_mem_iff (m : ℕ) (v : Fin 3 → ℤ) :
    v ∈ int_box_three m ↔ ∀ i, |v i| ≤ m
Source
Sanity lemma for int_box_three.
Verified
19 Oct 2026
Axioms
Quot.soundpropext
Built on 1
  • int_box_threeThe box [[-m, m]]^3 of integer vectors in ℤ^3 with every coordinate between -m and m.

The proof, explained

By definition, a vector $v \in \mathbb{Z}^3$ belongs to the box $\mathrm{int\_box\_three}(m)$ if and only if every coordinate $v(i)$ satisfies $-m \le v(i) \le m$. The lemma `abs_le` characterizes this double inequality as $|v(i)| \le m$, which directly establishes the equivalence.

  1. $v \in \mathrm{int\_box\_three}(m) \iff \forall i, |v(i)| \le m$

    Unfolding the definition of `int_box_three` and set-builder membership via `Set.mem_setOf_eq` expresses $v \in \mathrm{int\_box\_three}(m)$ as $\forall i, -m \le v(i) \land v(i) \le m$. The lemma `abs_le` replaces this double inequality with $|v(i)| \le m$, completing the equivalence.

    line 3

    uses int_box_three, Set.mem_setOf_eq, abs_le

      simp only [int_box_three, Set.mem_setOf_eq, abs_le]
int_box_three
The set of vectors in $\mathbb{Z}^3$ whose coordinates all satisfy $-m \le v(i) \le m$.
Set.mem_setOf_eq
Membership in a set defined by comprehension, $x \in \{y \mid p(y)\}$, is equivalent to $p(x)$.
abs_le
In an ordered commutative group, $|a| \le b$ if and only if $-b \le a$ and $a \le 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

theorem int_box_three_mem_iff (m : ℕ) (v : Fin 3 → ℤ) :    v ∈ int_box_three m ↔ ∀ i, |v i| ≤ m := by  simp only [int_box_three, Set.mem_setOf_eq, abs_le]
See it in the graphDiscuss this resultChallenge it