Manuscript Offprint
arXiv:2610.39354Construction and formal verification of a special topology on {\mathbb{Z}}^{n}: characterization of connected subsets
CONSTRUCTION AND FORMAL VERIFICATION OF A SPECIAL TOPOLOGY ON : CHARACTERIZATION OF CONNECTED SUBSETS
IGNACIO VEGA-PÁEZ
ABSTRACT. We examine whether the integers admit a topology whose connected subsets are precisely the sets of consecutive integers. The main result gives a construction for every integer lattice , ; the answer for is then obtained as a corollary. We prove that the neighborhoods determined by the parity of the sum of the coordinates form a basis and that topological connectedness agrees exactly with accessibility by finite paths of unit lattice steps. We also present a deductive audit and the correspondence between this argument and a verification in Lean 4 and Mathlib, including the empty set and the independent formal characterization of integer intervals. The construction and mathematical result originate in Problem 5712, proposed by Dan Marcus and solved in 1970 by the Cleveland State University group; the present article contributes a detailed exposition and a report on formal verification.
Is it possible to endow the set of integers with a topology in which the connected subsets are precisely the sets of consecutive integers?
Its natural generalization replaces the integer line by and consecutiveness by the existence of a finite path of adjacent points. The question appeared as Problem 5712 in The American Mathematical Monthly. It was proposed by Dan Marcus, and its solution is attributed to the Cleveland State University Problem Solving Group, with Frank Wyse as adviser [1]. The associated topology is commonly known as the Marcus–Wyse topology.
Our purpose is not to claim a new solution to the historical question, but to state it precisely, supply all the necessary logical steps, and describe its subsequent formal verification in Lean 4/Mathlib. The main statement is first formulated for ; the result for Z is then deduced as a special case.
Date: October 27, 2026.
2020 Mathematics Subject Classification. 54A05, 54D05, 05C40, 03B35.
Key words and phrases. Marcus–Wyse topology, integer lattice, connectedness, adjacency, formal proof, Lean 4, Mathlib.
Corresponding author: Ignacio Vega-Páez, ignaciovp633@gmail.com.
IGNACIO VEGA-PÁEZ
2. DEFINITIONS AND MAIN THEOREM
Let and set . For and in , define unit adjacency by
Equivalently, x and y differ by one in exactly one coordinate and agree in all the others. Define also
For and , write and say that and are accessible within if there are and such that
A one-point path is allowed when . We call consecutive in the lattice if every pair of its points is accessible in this way. The condition holds vacuously for .
For each , define
Theorem 1 (Construction and characterization of the topology on ). For every integer , the family
is a basis for a topology on . In this topology, is the smallest open neighborhood of . Moreover, for every , connectedness is understood in the subspace topology, and
The equivalence includes .
3. MATHEMATICAL PROOF OF THE MAIN THEOREM
Lemma 2 (Symmetry of adjacency and reversal of parity). If , then , and and have opposite parities.
Proof. Symmetry follows from . For every one has . Consequently,
Thus and have different parities.
A family of subsets of is a basis for a topology if and, whenever and , some satisfies . The open sets in the generated topology are precisely the unions of elements of .
A subset C of a topological space is connected if it cannot be written as the union of two disjoint, nonempty subsets that are open in the subspace topology on C. Under this definition, the empty set is connected.
Remark 3 (Interpretation of parity). The map
classifies lattice points as even or odd . By Lemma 2, implies . This explains definition (4) without introducing further hypotheses.
Proposition 4 (Basis and minimal open neighborhoods). The family satisfies the basis axioms. Its generated topology is
Every is open and is contained in every open set containing x.
Proof. The family on the right-hand side of (6) is a topology: both and satisfy the condition, which is preserved under arbitrary unions and finite intersections.
We first prove that every is open. If is odd, then , and for its only point we have . If is even and , there are two possibilities. If , then . If , definition (4) yields ; by Lemma 2, is odd and . Thus satisfies the openness condition (6) in every case.
Since for every , the family covers . Moreover, if , the openness of and under condition (6) implies and , hence
The basis intersection axiom follows. Moreover, if satisfies (6), then , since for every . Conversely, every union of members of satisfies (6), by the openness of each already established. Hence the topology generated by is exactly .
To establish minimality, suppose . If is even, necessarily , so ; if is odd, then . Therefore whenever . Since any open set containing is a union of members of , there is some with . The preceding inclusion gives , as required.
Lemma 5 (Accessibility classes). Fix . Accessibility as defined in (3) is an equivalence relation on . If is one of its equivalence classes, both and are open in the subspace topology on .
Proof. Reflexivity follows from the one-point path; symmetry follows by reversing a path and using symmetry of ; transitivity follows by concatenating two paths sharing an endpoint.
Let be an accessibility class. To show that is open in the subspace topology, fix . If , then either or ; in either case and are accessible within , so . Consequently,
Each is open in the subspace topology on . Since and (7) holds, we obtain
Hence A is open in C. The same argument applies to every other accessibility class, and their union is . Thus is also open in C.
IGNACIO VEGA-PÁEZ
Proof of Theorem 1. Proposition 4 establishes the basis and the minimality of the open neighborhoods.
First implication. Suppose is connected. If , the accessibility condition is vacuous. Otherwise choose and let be its accessibility class. By Lemma 5, the disjoint subsets and are relatively open and cover . Since , connectedness forces . Thus , so every pair of points in can be joined by a finite path within .
Second implication. Suppose every pair of points of can be joined by a path within . If were disconnected, there would be disjoint, nonempty, relatively open sets and such that . Choose and . By assumption, there is a path contained in . Let be the least index for which . Such an index exists since , and since . By minimality of and the disjoint partition , we have
By Lemma 2, exactly one endpoint of this edge has even coordinate sum. Let be that endpoint and the other. Definition (4) implies . If , relative openness of and minimality of force , whence , contradicting . If , interchanging and gives the same contradiction. Therefore no separation of exists, and is connected.
For , both properties hold: it cannot be separated into two nonempty relatively open sets, and there is no pair of points that must be connected. This proves (5).
4. SPECIAL CASE: A TOPOLOGY ON THE INTEGERS
Recall that is an integer interval, or a set of consecutive integers, if
This includes the empty set, singletons, finite intervals, and infinite intervals.
Corollary 6 (Answer to the question on the integers). For Z, consider the family
There is a topology with basis such that, for every ,
C is connected in is an integer interval.
In particular, the answer to the original question is affirmative.
Proof. For , adjacency (1) becomes , and (4) agrees exactly with (9). Theorem 1 states that is connected if and only if every pair of its points can be joined by a sequence of integers in whose successive absolute differences are one.
If satisfies (8) and belong to , the sequence is such a path lying entirely in . For , a one-point path suffices; for , reverse the order.
Conversely, assume the path property, and let with . Take a path in with . Choose the first index such that . It exists because , and since . We have and ; therefore . Thus , proving (8). The empty and singleton cases are immediate.
5. METHODOLOGY OF FORMAL VERIFICATION IN LEAN 4
5.1. Correspondence of mathematical objects. The reported verification was implemented in Lean 4 with the Mathlib mathematical library [3, 2]. The lattice was represented by the function type Fin . On this type, LatticeAdj (equation (1)) and LatticeEven (the parity of (2)) were defined.
The topology was encoded using the openness condition (6), expressed as stability of an open set under neighbors of a point with even coordinate sum. Its equivalence with the family was formally justified through the statements
basic_is_open, open_iff_contains_basic,
basic_intersection_property.
To model paths inside C, adjacency was restricted to pairs of points both belonging to C, and named EdgeIn. For this relation, the equivalence closure Relation.EqvGen was used. Its equivalence to the reflexive-transitive closure Relation.ReflTransGen, for a symmetric relation, was verified through the lemma
eqvGen_iff_finite_walk.
To verify Corollary 6 explicitly, IntegerAdj was defined for the relation . Integer parity was encoded as IntegerEven, and order convexity (8) was represented by IsIntegerInterval. The basic neighborhoods in (9) were verified by the theorems
integer_basic_even, integer_basic_odd.
5.2. Connectedness of the empty set. It is essential to distinguish IsConnected, which in Mathlib requires a set to be nonempty, from IsPreconnected, which expresses the absence of a separation into nonempty relatively open sets and permits the empty set [4]. The latter notion was used to preserve the quantification of the main theorem over all subsets C.
5.3. Verification sequence. The work was divided into four logical levels:
-
The topology axioms, basic neighborhoods, their openness, and the basis property were formalized.
-
Both implications relating connectedness to paths were proved for an abstract symmetric relation that reverses parity along adjacent points. This stage decomposes the argument into accessibility classes, relatively open sets, and propagation along a path.
-
The result was specialized to , deriving symmetry and parity reversal directly from (1). Thus the abstract assumptions are not additional hypotheses in the lattice formulation.
-
The characterization on Z was formalized separately. Both implications between order convexity and accessibility by paths of unit steps were proved, as was the equivalence between order convexity and topological connectedness.
The results corresponding to the main theorem and the corollary appear in the source file, respectively, as
lattice_preconnected_iff_consecutive,
integer_preconnected_iff_interval.
Their mathematical statements are, respectively, the equivalence (5) and the characterization in Corollary 6. The compilation with Lean 4.36.0-rc1 and Mathlib completed with exit status zero, no errors or warnings, and without sorry, admit, or new axiom declarations in the proof.
IGNACIO VEGA-PÁEZ
TABLE 1. Mathematical proof obligations and formalized lemmas.
| Mathematical obligation | Verification in Lean |
|---|---|
| Symmetry of and parity reversal | latticeAdj_symm, latticeAdj_flips_parity |
| Basis and minimal neighborhood | basic_is_open, basic_le_open, basic_intersection_property |
| Finite path and accessibility relation | eqvGen_iff_finite_walk |
| Relatively open classes | pathClass_saturated, expand_inter_eq |
| Connectedness implies paths | preconnected_implies_consecutive |
| Paths imply connectedness | consecutive_implies_preconnected |
| Complete theorem on | lattice_preconnected_iff_consecutive |
| Basic neighborhoods at even and odd integers | integer_basic_even, integer_basic_odd |
| Integer intervals imply unit-step paths | integer_interval_implies_consecutive |
| Unit-step paths imply integer intervals | integer_consecutive_implies_interval |
| Complete corollary on | integer_preconnected_iff_interval |
5.4. Correspondence audit. The audit distinguishes formal correctness from historical fidelity: Lean checks the statement and its inferences under the formalized definitions, whereas attribution and presentation choices are checked against the published formulation of Problem 5712.
6. DISCUSSION AND CONCLUSIONS
Theorem 1 constructively solves the problem in all dimensions . Parity selects centers whose neighborhoods include unit lattice steps, while points of opposite parity have singleton neighborhoods. This asymmetry of neighborhoods yields an exact correspondence between the impossibility of separating a subset topologically and the possibility of traversing it by a finite sequence of internal adjacencies.
Corollary 6 recovers the original question on . Its characterization of connected subsets includes finite, infinite, and singleton intervals, as well as the empty set. In addition to the verification of the general theorem on , Lean now directly certifies the equivalence between connectedness and order convexity on , together with the formulas for the basic neighborhoods of even and odd integers. These proofs cover both implications and correctly handle the empty set. No experiments on finite subsets or second formalization in another proof assistant were used.
The topological construction and the affirmative answer are historical results associated with the Marcus–Wyse problem. The contribution of this work is to present the generalization as the main theorem, derive the one-dimensional case rigorously, and document the correspondence between the mathematical proofs and their Lean 4 verification.
REFERENCES
[1] D. Marcus (proposer); Cleveland State University Problem Solving Group, F. Wyse (adviser), A special topology for the integers, solution to Problem 5712, The American Mathematical Monthly 77 (1970), no. 10, p. 1119.
[2] Lean Prover Community, Lean 4, official documentation and repository, https://lean-lang.org/.
[3] Mathlib Community, Mathlib: Mathematical library for Lean 4, source repository, https://github.com/leanprover-community/mathlib4.
[4] Mathlib Community, Mathlib.Topology.Connected.Basic, documentation for IsPreconnected and IsConnected, https://leanprover-community.github.io/mathlib4_docs/Mathlib/Topology/Connected/Basic.html.
CENTRO DE INVESTIGACIÓN Y DE ESTUDIOS AVANZADOS DEL INSTITUTO POLITÉCNICO NACIONAL (CINVESTAV-IPN), MEXICO CITY, MEXICO
Email address: ignaciovp633@gmail.com