ternary_single_point_repair
Given an explicit natural number n, a finite set H : Finset (Fin n → ZMod 3), a point p : Fin n → ZMod 3, and an offset vector ε : Fin n → ZMod 3, the single-point repair of H at p by ε is the finite set (Finset) of vectors obtained by erasing p from H and taking the union with the image over all i : Fin n of Function.update p i (p i + ε i).
Statement
def ternary_single_point_repair (n : ℕ) (H : Finset (Fin n → ZMod 3)) (p : Fin n → ZMod 3) (ε : Fin n → ZMod 3) : Finset (Fin n → ZMod 3)- Defined in
- arXiv:2610.32789, Section 3.1
- Verified
- 30 Oct 2026
- Axioms
- none listed
- Used by 2
- ternary_single_point_repair_is_minimal_line_coverFor every explicit integer n ≥ 3, every vector a : Fin n → ZMod 3 with all coordinates nonzero, every scalar b : ZMod 3, every point p in…
- ternary_single_point_repair_cardFor every explicit integer n ≥ 1, every vector a : Fin n → ZMod 3 with all coordinates nonzero, every scalar b : ZMod 3, every point p in…
Read back from the Lean
Definition ternary_single_point_repair takes:
- a natural number n,
- a finite set H of functions from Fin n to ZMod 3,
- a function p : Fin n → ZMod 3, and
- a function ε : Fin n → ZMod 3.
It returns the finite set of functions from Fin n to ZMod 3 formed by the union of:
1. H with p erased (H.erase p), and
2. the set of all functions obtained from p by updating coordinate i to p i + ε i, as i ranges over all elements of Fin n (the image of Finset.univ under fun i => Function.update p i (p i + ε i)).
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
/-- Single-point repair of H at p by replacing p with p + epsilon_i * e_i for each coordinate. -/ def ternary_single_point_repair (n : ℕ) (H : Finset (Fin n → ZMod 3)) (p : Fin n → ZMod 3) (ε : Fin n → ZMod 3) : Finset (Fin n → ZMod 3) := (H.erase p) ∪ (Finset.image (fun i => Function.update p i (p i + ε i)) Finset.univ)