Abstract
This paper presents a machine verification of a real number theory where real numbers are constructed using concepts related to filters. The theory encompasses a special filter, namely the non-principal arithmetical ultrafilter whose existence can be proven with the Continuum Hypothesis, to establish several non-standard number sets: *N, *Z and *Q. The set of real numbers, , is subsequently obtained by the equivalence classification of a specific subset of *Q. The entire theory is thoroughly formalized, with each detail verified to ensure rigor and precision. The verification is implemented using the Coq proof assistant and is grounded in the Morse–Kelley axiomatic set theory. This work contributes a new selection of foundational material for the formalization of mathematical theories.
Keywords:
formal verification; Coq; real numbers; non-standard numbers; Morse–Kelley axiomatic set theory; non-principal arithmetical ultrafilter; Continuum Hypothesis MSC:
68V20; 03H05
1. Introduction
This paper is dedicated to implementing the mechanized proof (also known as formalization or formal/machine verification) of a specific real number theory, which was first mentioned by Wang in [1], then introduced in one of his monographs [2] published in 2018. This mathematical theory employs a special filter, named the “non-principal arithmetical ultrafilter” [3], to facilitate the construction of real numbers. In this paper, we refer to it as the “filter-method construction for real numbers” (FMCR). The proof is implemented in the Coq proof assistant (The Coq proof assistant was renamed “Rocq Prover” in 2025, see https://rocq-prover.org, accessed on 19 August 2025), an interactive theorem-proving tool, and is based on Morse–Kelley axiomatic set theory (MK) [4].
Mechanized theorem proving refers to the formal verification of mathematical theorems or computer software and hardware systems using computers through formal methods [5]. “The word ‘formal’ indicates the use of formal languages to write assertions, define objects, and specify constraints. It also indicates the use of formal semantics, that is, accounts of the meaning of a syntactic expression, which can be used to specify the desired behavior of a system or the properties of an object sought” [6]. Mechanized theorem proving can be divided into interactive theorem proving (ITP) and automated theorem proving (ATP). And the former is likely to be more desirable to formalize most non-trivial theorems in mathematics or computer system correctness [5,7].
ITP emerged in the 1960s [8], and interactive theorem-proving tools are also known as proof assistants. “ITP involves the use of proof assistants to construct formal proofs of mathematical claims using the axioms and rules of a formal foundation that is implemented by the system. The user of such an assistant generally has a proof in mind and works interactively with the system to transform it into a formal derivation. Proofs are presented to the system using a specialized proof language, much like a programming language. The proof assistants process the input, complains about the parts it cannot understand, keeps track of goals and proof obligations, and responds to queries, say, about definitions and theorems in the background libraries. Most importantly, every inference is checked for correctness using a small, trusted body of code, known as the kernel or trusted computing base” [6]. With the continuous advancement of computer science and technology, various theorem-proving tools such as Coq [9,10], Isabelle/HOL [11], HOL Light [12], Mizar [13], and Lean [14] have emerged. ITP has also gradually gained recognition and attention in the academic community.
The formal verification of mathematical theorems is the practice of using a rigorously structured formal language, often within proof assistants on a computer, to describe mathematical definitions and theorems. These definitions and theorems are then proven using a corresponding proof language, ultimately resulting in the establishment of a formal mathematical library that encompasses mathematical definitions, theorems and their formal proofs [6,15,16]. To date, many core theorems of mathematics have been formally verified in various proof assistants, such as the prime number theorem [17], the four color theorem [18], the Jordan curve theorem [19], Gödel’s first and second incompleteness theorems [20], the Cartan fixed-point theorems [21], and the central limit theorem [22]. In November 2008, the Notices of the American Mathematical Society devoted a special issue to the topic of interactive theorem proving, which provides an overview of the state of the field at the time [15]. In 2013, Georges Gonthier and thirteen co-authors announced the culmination of a six-year project that resulted in the verification of the Feit–Thompson odd order theorem [23]. In 2015, the formal verification of the Kepler conjecture was completed under the leadership of Thomas Hales [24]. In December 2023, the project initiated by Terence Tao to formalize the proof of the Polynomial Freiman–Rusza Conjecture also succeeded [25]. These achievements contribute to the growing influence of mechanized proving of mathematical theorems in the academic community. The renowned mathematician and computer scientist Freek Wiedijk believes that the ongoing formalization of mathematics is a mathematical revolution [26]. “With the help of computational proof assistants, formal verification could become the new standard for rigor in mathematics” [15].
As far as real number theory is concerned, in the initial stage of its formulation, methods can be broadly categorized into two approaches: the Dedekind cut method introduced by Dedekind and the Cauchy sequence method proposed by Cantor, both of which have become well established in mathematical discourse. These two enduring and classic theories continue to be widely accepted and applied in contemporary mathematical research. Nevertheless, it appears that human curiosity concerning the real numbers is not quite quenched with just these two constructions and there are still new methods of constructing real numbers proposed up to the 21th century [27]. Meanwhile, fueled by applications in automated (mechanized) theorem proving and verification, where one must represent the real numbers in a computer, nuances of the differences between various constructions of the reals become very pronounced [27]. As a result, the formal verification of these theories on real numbers represents both a profound exploration of the fundamental theories of mathematics and a significant enrichment of the foundational materials required for the formalization of mathematical theorems. This enrichment, in turn, offers a broader array of choices for future formalization efforts. Therefore, the formalization of FMCR serves as not only a comprehensive and rigorous verification of the theory itself but also a means to provide further starting points and possibilities for future formalization work.
FMCR employs a special filter, the non-principal arithmetical ultrafilter (NPAUF), to construct real numbers. Filter and ultrafilter are mathematical concepts that can be derived from topology. In [28,29], we, respectively, presented the formalization of filter-related theories and the existence of NPAUF in Coq. This paper will further introduce the Coq formalization of the entire process of constructing real numbers using NPAUF.
Compared to classical real number theories, FMCR possesses several distinctive features:
1. The construction involves the non-standard extension of number systems. With the use of NPAUF, the set of natural numbers can be extended to the non-standard natural number set *N, which is a useful non-standard model that has simple construction and superior properties [1]. *N includes some special elements at infinity that can be named infinity natural numbers. Infinity numbers are greater than all natural numbers (infinitely large) but follow the general arithmetic properties (addition, multiplication, order, etc.) of natural numbers. Following the idea of equivalence classification, *N can be further extended to the non-standard integer set *Z inclusive of infinity integers, and the non-standard rational number set *Q, which encompasses both infinity and infinitesimal numbers (numbers that are infinitely small). The structure of real numbers is then obtained by equivalently classifying a specific subset of *Q.
2. The establishment of this method requires additional set theory hypotheses as premises, for the existence of NPAUF has not been proven within general axiomatic set theories [2,30]. In [29], we implemented the Coq formalization of the proof provided by Wang in [2,30] that the Continuum Hypothesis (CH) implies the existence of NPAUF. Therefore, in order to formalize FMCR, CH actually needs to be acknowledged as a precondition or axiom. CH is consistent and compatible with the general axiomatic set theories, and can be safely employed [31,32].
3. This method could potentially be extended to establish the foundation of non-standard analysis—non-standard real numbers, also known as hyper-reals. Robinson once quoted Gödel’s statements in the preface of his masterpiece Nonstandard Analysis [33]: “There are good reasons to believe that non-standard analysis, in some version or other, will be the analysis of the future”. The majority of literature on non-standard analysis typically utilizes the ultrapower method to provide a model for hyper-reals [33,34,35]. Although FMCR does not directly construct hyper-reals, the construction process involves some non-standard number sets: *N, *Z and *Q. The underlying concepts involving NPAUF might serve as an alternative to the ultrapower method for hyper-real construction. As mentioned in [28,29], our long-term goal is to formalize the non-standard analysis.
Following the previous work in [28,29], we choose the Coq proof assistant to implement the formal verification, and the formal system of Morse–Kelley axiomatic set theory (MK) in Coq [36,37] as the basis for the work in this paper. Indeed, set theory is the foundation of modern mathematics, and axiomatic set theories, developed to address Russell’s Paradox, can undoubtedly serve as the basis for highly rigorous formal verification of mathematical theorems. Furthermore, MK recognizes a broader range of mathematical objects than just “sets”, called “classes”, making it a proper extension of Zermelo–Fraenkel axiomatic set theory (with the Axiom of Choice) (ZFC) and relatively more convenient to utilize in the formalization process [28,29,36,37].
The mathematical descriptions of definitions and theorems used in this paper are mainly taken from textbooks [2,4,30] ([4] contributes to the part of MK and [2,30] to the filters and FMCR). The entire Coq code is available at https://github.com/1DGW/formal-verification-of-the-filter-method-construction-for-real-numbers, accessed on 19 August 2025.
The paper is organized as follows: Section 2 presents the relevant preliminary knowledge required for this paper; Section 3 presents the formalization of the construction of the sets *N, *Z and *Q; Section 4 presents the formalization of real number set and the verification of elementary properties of real numbers; Section 5 gives the conclusion and further perspectives.
2. Preliminary Knowledge
In this section, we outline some fundamental usages of Coq tailored to our work, and present basic formalization results required for FMCR.
2.1. About Coq
The process of formalizing a mathematical theory can be roughly divided into two parts: one is to describe definitions and theorems using a formal language, which is like a “translation process” from a natural language; and the other entails gradually discharging proof goals using formal proof tactics in an interactive environment in order to ensure the correctness of the described content. Due to significant differences in logic, syntax, and semantics between natural and formal languages, accurately translating a natural language into a logically rigorous formal language becomes the most crucial step in the formalization process.
In Coq, there are several commands that can be used to describe mathematical definitions such as “Definition”, “Inductive”, “Fixpoint”, etc. Each of them has different roles, and “Definition” is sufficient for our system.
The description of a definition is written “Definition c : A := t.” For this definition to be accepted, it is necessary that t is well typed in the current environment and context, that the type of c is A, and that c does not clash with the name of another global variable. The Coq system has a type-inference mechanism that can determine the type of t; thus, the definition sometimes can be simply written “Definition c := t.”
From the mathematical perspective, c can be regarded as the name of a definition and t the specific content of it. For example, to define the square of a natural number n, the definition is described as:
where “fun” is the key word used to write anonymous programming functions in Coq. Here, it takes a natural number n and returns its square . To make the code concise, the definition is often written:
In this form, n can be regarded as the parameter of this definition, and the type “nat” of n can be determined by the Coq system and thus can be defaulted.
Additionally, to simplify the expressions, we can introduce notations for definitions:
The command “Declare Scope” declares the scope “scope_nat” where the notation is interpreted. All notations in scope_nat can be interpreted when the scope is open with the command “Open Scope”. “Delimit Scope” links the delimiting key “nat” to scope_nat, which helps to interpret the notations in scope_nat when the scope is close or to distinguish those identical notations but in different scopes. For example, “(3 2)%nat” still can be interpreted as the square of the natural number 3 even if “3 2” would represent a different definition in another scope, or scope_nat would be close.
The “Theorem” command is used to state that one wants to prove a theorem, indicating the name of this theorem and its statement. For example, to prove the logic proposition “For every proposition , ”, we can write:
where “prop_trans” represents the name of this theorem, and “->”, right-associative, can serve as “⟹”. Followed by Theorem, proofs start with the “Proof” command and end with “Qed”. Between Proof and Qed, proof tactics need to be written to discharge all proof goals and make the code able to run and pass successfully. For the example above, the complete formal verification is as follows:
The tactic “intros” is used to introduce the premises (i.e., the parameters P, Q, R and the premises (P -> Q), (Q -> R) and P) to the proof environment as hypotheses. The tactic “auto” is a built-in automated tactic in Coq, designed to solve simple proof goals.
Table 1 lists some fundamental tactics with their semantics. For additional tactics and detailed usage, refer to [9,10].
Table 1.
Fundamental proof tactics in Coq.
As previously mentioned, the critical step of the formalization process is the formal description of definitions and theorems. Therefore, this paper focuses on formal descriptions of definitions and theorems, and in Section 4.3 we present brief semantic explanations of formal proofs (tactics) through the verification of Archimedean property and completeness of real numbers. Readers can run the code we provide to verify the correctness of the descriptions and proofs.
Besides Theorem, there are many other synonymous commands, such as “Lemma”, “Corollary”, “Proposition”, “Property” and “Fact”, that can be interchangeably used as needed.
In some cases, we may need to declare a proposition that is temporarily unprovable or a mathematical object that is temporarily unconstructible, such as in the description of axioms. In such situations, the commands “Axiom” or “Parameter” are used. Their usage is similar to Theorem, but the contents declared by these two commands do not require proofs and can be invoked directly.
At this point, the understanding for Coq is sufficient to comprehend the content of the following sections. For more details on Coq usage, refer to [9,10].
2.2. About MK
Our team has finished the formalization of Morse–Kelley axiomatic set theory (MK) [36,37], and the entire code has been included in the Coq official contribution repository, indexed at https://coq.inria.fr/coq-package-index, accessed on 19 August 2025. Here, we summarize its important content as preparatory knowledge.
MK is grounded in Classical Logic [4], whereas the Coq system adopts Intuitionistic Logic [9]. Therefore, the Law of Excluded Middle needs to be assumed:
MK acknowledges “classes” (which are more numerous than sets) as fundamental objects. That is to say, every mathematical object (ordered pair, function, integer, etc.) is a class, and only those classes belonging to some other ones are defined as sets. The non-set classes are named “proper classes”. The term “class” does not appear in any axiom, it is a term that is directly recognized without definition. In Coq, the term “class” is declared as a new type “Class”, using the command “Parameter”.
There are two primitive constants in addition to the term “class”. The first is “∈”, which is read “is a member of” or “belongs to”. This means that one mathematical object (class) can be an element of another. The second is denoted “” and is read “the class of all such that ⋯”. It is the classifier and represents a class consisting of classes that satisfy a specific property. For example, “” represents the class that consists of all members not belonging to y. The constant “∈” is described as “In” and “” as “Classifier”.
The type of “In” is actually “Class -> Class -> Prop”, indicating that it takes two classes as input and produces a proposition. For instance, given classes x and y, “x ∈ y” represents the proposition that x belongs to y.
The type of “Classifier” is slightly more intricate. In its type “(Class -> Prop) -> Class”, the first “Class” corresponds to the first placeholder in the classifier constant, intended to be filled by a variable representing a member of the classifier. The “Prop” corresponds to the second placeholder, meant for a proposition (whether correct or not). The last “Class” indicates that the classifier is indeed a class, but we do not know if there are members in it. Taken together, “(Class -> Prop)” implies that the proposition in the second placeholder takes the variable from the first as a parameter. Thus, in the notation “\{ P \}”, the type of “P”, which represents a proposition with a parameter, is precisely “Class -> Prop”.
The constants “class”, “∈” and “” form the basic structure of MK, through which all the axioms, definitions and theorems in MK can be described.
The definition of “set” is one of the most crucial definitions in MK, it constrains the concept of set to avoid Russell’s Paradox, excluding certain classes that are deemed “too large” (e.g., , ) [4,36,37].
Definition 1 (Set).
x is a set if and only if for some y, .
MK inherits most elementary concepts and operations concerning sets (e.g., intersection, union, complement, pairs) from naive set theory and extends them to all classes. For example, in MK represents the intersection of classes x and y, either of which could be a set or not. Nevertheless, most objects discussed in this paper can be proven sets; if there are no specific instructions, we will directly use the term “set” rather than “class” to describe them.
The table presented in Appendix A lists partial definitions and mathematical meanings in MK along with their formalization in Coq, which will be frequently used in later sections. For more details about MK, refer to [4,36,37]; or access Coq-related source code of MK from https://github.com/1DGW/Formalization-of-Morse-Kelley-axiomatic-set-theory, accessed on 19 August 2025.
2.3. About Filters
The study of filters needs to be conducted within the context of set theories, so MK is an appropriate foundation to formalize the related concepts. The earliest concept related to filter is ultrafilter, which was apparently enunciated first by Frigyes Riesz in an address [38] in 1909 that unfortunately did not receive at the time the attention it deserved [39]. The concept of a filter, more concise and abstract, was introduced after the ultrafilter in [40,41] by Henri Paul Cartan in 1937 and subsequently adopted by Bourbaki in their book General Topology [42].
The ultrafilter can be classified as principal ultrafilter and non-principal ultrafilter (also called free ultrafilter), and the former is relatively straightforward to construct and formalize.
Definition 2 (Principal Ultrafilter).
For every , the following set
denoted as , is an ultrafilter over A. Each , corresponding to the element a of A, is called a principal ultrafilter over A.
consists of all subsets of A that include the element a; it can be regarded as the sum of all properties of a in A. Formalizing this definition requires two steps: the first is to construct the set , and the second is to verify that is indeed an ultrafilter.
The formal definition of requires two parameters A and a. And the formal proposition “Fa_P2_b” declared by the command “Property” indicates that when A is a set (Ensemble A) and a belongs to A (a ∈ A), is an ultrafilter over A.
The construction of a non-principal ultrafilter is not as succinct or direct, and proving its existence usually requires a theorem called the Filter Extension Principle (FEP) [2,30], which is a conclusion derivable from the Axiom of Choice (AC) and named the Ultrafilter Theorem in [43].
Theorem 1 (Filter Extension Principle).
Let F be a filter over A, then there exists an ultrafilter G over A such that .
FEP asserts that every filter can be extended to an ultrafilter, with the use of which a non-principal ultrafilter can be extended from a specific filter called Fréchet Filter (denoted ) [2,30]. The proof of FEP requires AC, so it is actually a non-constructive proof. In other words, a non-principal ultrafilter cannot be directly constructed but can only be formalized in the form of a proposition or theorem:
where “Ensemble A” and “∼ Finite A” represents that A is an infinite set and “∃ F0, free_ultraFilter F0 A” indicates the existence of a non-principal ultrafilter over A. The non-principal ultrafilter is also called the free ultrafilter, and “free_ultraFilter” is an invocation of its formalization.
In 1979, Daguenet-Teissier noticed a special ultrafilter in [44] with a specific property [1]. Subsequently, drawing from this research, Wang observed that non-principal ultrafilters with this property can be used to establish arithmetic models, including a real number model, with simple structures and superior properties [1]. Consequently, Wang refers to ultrafilters with this property as the “arithmetical ultrafilter (AUF)” and non-principal ones as the “non-principal arithmetical ultrafilter (NPAUF)” [3].
Definition 3 (Arithmetical Ultrafilter).
For every ultrafilter F over an infinite set A, F is an arithmetical ultrafilter if and only if:
The formal definition consists of three assumptions: “∼ Finite A” indicates that A is an infinite set, “F ∈ ( A)” indicates that F is an ultrafilter over A as “( A)” represents the set consisting of all the ultrafilters over set A, and the last assumption rules that for each function f and g, implies that f and g are F-equivalent, where is formally denoted as “f⟨F∣A⟩” because the parameter “A” cannot be omitted in code.
It is straightforward to prove that every principal ultrafilter is an AUF [2], but the existence of a non-principal AUF (NPAUF) is challenging to prove within the framework of general set theories. In one of Wang’s publications [30], he introduces various methods to prove the existence of NPAUF using different set theory hypotheses independent of ZFC. Among them, we chose the Continuum Hypothesis (CH) as the precondition to formally verify the existence of NPAUF, which ensures the safety and consistency of our formal system because CH is also consistent with MK [29,31,32].
Figure 1 presents the relationships among the filters involved in our formalization. As shown in the figure, an ultrafilter is also called a maximal filter; a non-principal ultrafilter is also called a free ultrafilter, so the principal ultrafilter is equivalent to the non-free ultrafilter. With the use of FEP, every filter can be extended to an ultrafilter and the Fréchet Filter to a non-principal ultrafilter. And every principal ultrafilter can be proven to be an AUF but the proof of the existence of NPAUF relies on CH.
Figure 1.
Relationships among filters.
Appendix B shows the fundamental definitions and mathematical meanings about filters along with their formalization in Coq. For details on filter theories, refer to [2,30,43]; for details about our formalization of filters, refer to [28,29] or review the Coq code.
3. Construction of , and
3.1. Construction of
The construction of depends on the existence of an NPAUF, so first a specific NPAUF must be chosen. Since NPAUF cannot be constructed directly, we use the command “Parameter” to introduce it.
The content stated in the above code has been formally verified in [29]. The first line defines a global variable F0 of type Class, which is equivalent to acknowledging an unproven class in mathematics, since in MK, all mathematical objects are classes. The second line further specifies that is an NPAUF over (the set of natural numbers in MK), where “Arithmetical_ultraFilter F0 ” indicates that is an AUF, and “∀ m, F0 <> (F m)” indicates that is not equal to any principal ultrafilters over , thus making an NPAUF.
The set is then constructed as follows:
where indicates that f is a function whose domain is and range is contained in , and (). The Coq formalization is aligned with the mathematical description:
It can be proven that for every ultrafilter F and a function f, is still an ultrafilter, and is called a transformation of F under f [29,30]. Therefore, is the set consisting of all transformations from and each element of is at least an ultrafilter (of course, it could also be an AUF or an NPAUF).
is a non-standard extension of due to the existence of a proper subset of isomorphic to , and all elements outside this subset are infinity numbers. To present this isomorphism process, the order and operations on should be formalized first.
Definition 4 (Order on *N).
For each , and , , then the order of u and v is defined as follows:
The order on is a total order, meaning that for any , it satisfies:
(1) Irreflexivity: ,
(2) Transitivity: ,
(3) Trichotomy: .
In the code, “Connect” is the formalization of the MK concept that is equivalent to the concept of trichotomy [4,36].
Definition 5 (Addition on *N).
For each , and , , then the sum of u and v is defined as follows:
where represents the addition of functions in , .
In the formalization, the addition of u and v is defined in the form of “∩({⋯})”. This is because mathematically, if the set constructed by the classifier is a singleton , then is exactly equal to the unique element a. Here, the unique element is the result of .
The formalization of multiplication follows the same process as addition, simply by replacing the addition operation with multiplication. Furthermore, the order, addition and multiplication on satisfy the basic arithmetic properties (commutativity, associativity, distributivity, etc.) of the natural numbers, which has also been formalized.
The subset isomorphic to is defined as:
so consists of all the principal ultrafilters over .
Here “F n” represents the principal ultrafilter corresponding to n which is an element of .
Since every element of corresponds to a principal ultrafilter, the elements in are in one-to-one correspondence with the elements in . The two sets are isomorphic.
Proposition 1 ( and are isomorphic).
The function is a 1-1 function (bijective function) whose domain is and range is , and for each , preserves order and operations:
- (1)
- .
- (2)
- Order Preservation: .
- (3)
- Addition Preservation: .
- (4)
- Multiplication Preservation: .
where 0 and 1 are, respectively, defined by the empty set ∅ and the singleton in MK.
To formalize this proposition, the function should be described first:
Then, to verify the properties that satisfies:
In the code, “m ∈ n” indicates that m is less than n, because in MK the order on is exactly defined as the relation “∈”. And “(m + n)%” means that should be interpreted as the addition on , and ([m] + [n])%n’ as the addition on .
Now can be deemed as a set of natural numbers as well because of the isomorphism. Moreover, it can be verified that is a non-standard extension of , namely a non-standard extension of natural number set.
From the first line, it can be observed that is a proper subset of , and the second line shows that the elements outside are all greater than those in . The expression “t ∈ (N’ ∼ N’_N)” is the formalization of the mathematical expression , which means that t belongs to but not in . The elements in can be called “infinity natural numbers”, because they are greater than all the general natural numbers (they are infinitely large).
Therefore, is actually a non-standard natural number set and its structure can be intuitively depicted as:
where represents an infinity natural number.
3.2. Extension from to
The extension from to adopts the idea of equivalence classification and the relevant definitions and theorems should be formalized.
Definition 6 (Equivalence Relation).
For each set a, let R be a subset of ; R is called an equivalence relation over a if it satisfies:
(1) Reflexivity: .
(2) Symmetry: , if then .
(3) Transitivity: , if and then , where (Cartesian Product) and stands for , namely satisfies R-relation.
A trivial example of equivalence relation is identity relation. Because for every a and its members x and y, it obviously satisfies (reflexivity), if then (symmetry), and if and then (transitivity). The identity relation over a can be set as .
Definition 7 (Equivalence Class).
Let R be an equivalence relation over a; for each x in a, the set
is called the equivalence class represented by x with respect to the R-relation, denoted .
To formalize this definition, three parameters are required: the first one serves as the representation x of this equivalence class, the second the equivalence relation R and the last the set a.
Definition 8 (Quotient Set).
Let R be an equivalence relation over a, the quotient set of a is:
A quotient set consists of all equivalence classes with respect to R; it is the result of equivalently classifying the elements of a.
The construction of actually equivalently classifies the elements of , and a specific equivalence relation over must be set first:
where and indicate the addition on .
The expression “N’ × N’” represents (); it is the formalization of the Cartesian Product of . To simplify the formalization code, we introduce the notation “\[ u \]” for the equivalence class with respect to .
According to the equivalence relation, we can observe many equivalent elements in . For example, , , , ⋯, , ⋯ are equivalent; ,,, "EF, , ⋯ are equivalent; and so are ,,, ⋯, , ⋯, where represents an infinity natural number. In a planar dot array composed of elements in , we can connect equivalent points with straight lines and thus obtain Figure 2.
Figure 2.
Equivalence classification of elements in .
In Figure 2, every oblique line represents an equivalence class of , and intuitively the order of these oblique lines on the horizontal axis forms a new number “sequence” (this “sequence” is extended to infinity numbers) and the lines extended by dashed lines extend this “sequence” to a range of negative numbers. Then, the set consisting of all these oblique lines, namely the quotient set of with respect to , is exactly .
The suffix “%eqr” indicates that the notation “/” should be interpreted as the quotient set operation.
In the similar ways following , the order, addition and multiplication on can be formalized:
The order and operation properties of are also shared by . In addition, has an extra property: for every element , there exists a unique element v such that ; namely, every element of has a corresponding negative element.
The symbol “∃!” above represents the unique existence of v, namely for each that satisfies , must be equal to v. And “Z’0” is the formalization of 0 (the zero element) in ; it is equal to the equivalence class where is the principal ultrafilter corresponding to 0 ().
has an important proper subset:
consists of the equivalence classes whose elements are all from , and is the finite section of . This implies that is also the finite section of , making suitable to serve as a set of general integers. And every member of is greater (for the positive ones) or smaller (for the negative ones) than all the elements in .
Therefore, the elements in are either positive infinity or negative infinity; they can be called the “infinity integers”. is a non-standard extension of the integer set.
In addition, just as is isomorphic to , is isomorphic to the following subset of :
namely, there exists a 1-1 function between and that preserves order and operations. consists of the non-negative elements of .
Now the structure of can be intuitively depicted as:
where represents an infinity integer.
where represents an infinity integer.3.3. Extension from to
Similar to the process from to , is also obtained by equivalence classification, and the equivalence relation is defined on :
where *Z0 is the 0 element in , formalized as “Z’0”.
The definition “Z’_De” in the code gives a shorter symbol, making the formal description more convenient. The notation of the equivalence class with respect to is the same as that with respect to , but distinguished by scope.
According to the definition of , for two equivalence classes and , means , which aligns with the general understanding of . Thus, each equivalence class can be interpreted as the fraction , and essentially generates fractions.
Figure 3 presents the classification process of .
Figure 3.
Equivalence classification of elements in *.
In the planar dot array composed of elements in , every line connecting equivalent points represents an equivalence class of , and certainly the lines are dense, which means that there always exists such a line between any two and the inverse elements such as are contained. The set consisting of all these lines, namely the quotient set of with respect to , is exactly .
It is possible to define the order and operations on in the same way as the usual definitions for fractions, and it can be verified that the elements in satisfy all the arithmetic properties of the rational numbers.
But different from the general rational numbers, introduces not only the infinity numbers but also the infinitesimal numbers. To clarify this point, the elements of can be divided into two categories.
Elements of one category, called finitely large elements of , constitute a crucial subset of :
is called the Archimedes Subset of because every element u satisfies the Archimedean Property:
where is the subset isomorphic to and , representing the natural number set; and denotes the absolute value of u.
It can be observed that the absolute value of every element in is always smaller than a certain natural number, which means that all elements in are measurable or finitely large. Thus, the elements of the other category belong to ; they are greater than all natural numbers (infinitely large), called infinity numbers.
To implement the formalization of , the formalization of and the concept of absolute value are required. The latter can be straightforwardly formalized as a function:
The formal definition “Q’_Abs” defines a function that takes an element u in and outputs three different value dependent on the order relation of u and 0 (formalized by “Q’0”), which aligns with the usual understanding of the absolute value. The notation “| u |” then represents the expression “(Q’_Abs)[u]”, the value of u under the function.
The formalization of is a little more complicated, for there are no instructions provided for the specific construction of in [2]. Inspired by the isomorphism introduced in previous sections, one feasible method is to construct a subset isomorphic to , and the isomorphism function is formally described as:
Here, “” is the formalization of the isomorphism function between and ; namely, the domain of is , the range is and preserves the order and operations on and . “1” represents the isomorphism function between and , and “2” represents that between and (the subset of isomorphic to ). Therefore, the composition of the three functions, denoted as , can be verified to be an isomorphism function whose domain is and the range is contained in .
Then, is formally defined as the range of , after which the set can also be formalized.
Another important subset of is the set of infinitesimal numbers, denoted as . Intuitively, an infinitesimal number is an inverse element of an infinity number (i.e., where ). For each non-zero natural number k, an infinitesimal number should be smaller than .
where Q0 and Q1, respectively, are the zero element 0 and identity element 1 in , formalized as “Q’0” and “Q’1”.
Obviously, the zero element 0 is an infinitesimal number, but there are non-zero elements in , meaning that the singleton can be proven a proper subset of . And should be a subset of because infinitesimal numbers are also finitely large.
Besides the sets introduced above, also has some other important subsets: that is isomorphic to , that is isomorphic to , that is isomorphic to and can serve as a set of integers, and that can serve as a set of rational numbers. And undoubtedly , and are all subsets of because their elements are finitely large and measurable. Here, we directly present their formalization.
The formal expression “Z’0” and “Z’1”, respectively, represent the zero element 0 and the identity element 1 in , and “Q’0” represents 0 in .
Therefore, actually has a structure much more complicated than usual the rational number set and even than the real number set. Including both infinity and infinitesimal numbers, is a non-standard extension of the rational number set. Figure 4 shows the structures involved from to .
Figure 4.
The process from to *Q.
4. Real Number Set
4.1. From to
Now it is sufficient to perform equivalence classification on to obtain the real number set , and the equivalence relation is defined as:
The formal proposition “R_Q’_is_equRelation” verifies that is an equivalence relation on , and the equivalence class with respect to is also denoted by the notation “\[ u \]”.
Then, the real number set is defined as the quotient set of :
It is obvious that is obtained by equivalence classification of a single set, whereas and are obtained by classifying the Cartesian Product of two sets. This means that the elements in are all equivalence classes, each of which can be represented by a single element from . That is to say, each can be denoted as where a is the representation of u and an element in . Thus, the order and operations on can be directly defined according to those on ( is a subset of ).
In addition, since the natural number set is contained in , the natural number set contained in can be defined as the set consisting of equivalence classes represented by members from . And the same idea applies to the integer set and the rational number set .
Clearly, is isomorphic to , and consequently is also isomorphic to (since is isomorphic to ). Moreover, is isomorphic to , and is isomorphic to .
Figure 5 shows the structures from to .
Figure 5.
The process from *Q to .
4.2. What Are Real Numbers?
Although the set has been constructed, it needs to be clarified how to ensure that is indeed the set of real numbers required in mathematical analysis.
Firstly, concerning the order and operations, the elements in R satisfies the following properties:
- (I)
- Properties of Addition
- (1)
- .
- (2)
- existence of negative element: .
- (3)
- associative law: .
- (4)
- commutative law: .
- (II)
- Properties of Multiplication
- (1)
- .
- (2)
- existence of inverse element: .
- (3)
- associative law: .
- (4)
- commutative law: .
- (I,II)
- Connection between Addition and Multiplication
- (1)
- distributive law: .
- (III)
- Properties of Order
- (1)
- .
- (2)
- reflexivity: .
- (3)
- transitivity: .
- (4)
- trichotomy: .
- (I,III)
- Connection between Addition and Order: .
- (II,III)
- Connection between Multiplication and Order: , where .
In the above code, “R0” and “R1”, respectively, represent the zero and identity element in the set .
These are all the elementary properties of real numbers familiar to us all, and a structure satisfying the above properties is called an ordered field in mathematics.
However, merely satisfying the properties of ordered fields is not sufficient to constitute the set of real numbers. In the process of FMCR, several sets can be verified ordered fields, such as , , , . But only can serve as the real number set because possesses both of two additional properties:
- Archimedean Property:
- Completeness (there are numerous equivalent statements of the Archimedean property and completeness [45,46], and the formulations here are quoted from [2]): A monotonically increasing and bounded sequence must possess a supremum (least upper bound).
A structure satisfying the ordered field properties, the Archimedean property and completeness constitutes a complete ordered field, and can serve as a real number set [46]. What mathematical analysis needs is exactly the complete ordered field.
4.3. Formally Proving the Archimedean Property and Completeness
Obtained from the equivalence classification of which is exactly defined by the Archimedean property, logically satisfies the Archimedean property.
The expression “|r|” here indicates the absolute value of the real number r; it is formalized as the value of a function.
The key to proving the Archimedean property lies in addressing the case where , since for , one only needs to consider (which is greater than 0). As for the case where , the theorem can be easily verified: .
Therefore, we use the tactic “assert” to introduce the following assertion to the proof environment as a hypothesis.
The statements asserted by this tactic need to be proven. The proof code is typically enclosed in curly braces “{” and “}”, after which the asserted content can be utilized as a hypothesis within the proof environment.
We briefly introduce the manual proof of this assertion:
Proof.
For , let where ; thus, there exists an such that . By the definition of the order on , holds, which implies and . Consequently, we have and . □
Now we can present a relatively complete machine proof of the Archimedean property.
For brevity, the machine proof details of the assertion at { … } are omitted here, with corresponding manual proof presented above. The verification approach for the remaining code is as follows:
4 Introduce and as hypotheses into the proof environment.
5 Split the proof into three cases by trichotomy: , and . The case is already covered by the previous assertion in line 3.
6–8 (case ) Let ; then, and . We can rewrite as in the proof goal, making it align with the assertion in line 3.
9 (case ) Directly specify the constant 0 (R0 in code), which satisfies and .
The Archimedean property means the measurability of numbers, and does not satisfy this property because of the infinity numbers. Thus, cannot serve as the real number set.
As for the completeness, the concept of sequence needs to be described first. A sequence of is exactly a function whose domain is the natural number set and range is contained in . Up to now, we have seen several sets that can serve as the natural number set: , , and . Considering its concise set structure, we choose as the foundation of a formal definition of sequence.
In addition, the concepts of monotonicity and supremum also need to be formalized precisely. The monotonicity illustrates that if then the value of a sequence f should satisfy .
In MK, the order relation on is exactly the “∈” relation, so the expression “m ∈ n” exactly means that m is smaller than n. Supremum also can be called the least upper bound; it can be formalized with the use of two formal definitions.
The first definition states that r is an upper bound of f if r is equal to or greater than all values of f. And the second definition illustrates that if r is the supremum of f, r should be an upper bound of f and each number smaller than r cannot be an upper bound of f, which makes r the smallest among all the upper bounds of f.
Then, the completeness can be formally proven:
The overall approach of the machine verification is as follows (here, we also omit the proofs of assertions made by the tactic “assert”, and some details of proven conclusions such as “R_Seq_Property2”, “R_RatSeq”, etc., are not elaborated):
4–5 Introduce the premises to the proof context as hypotheses and restructure them.
6 “R_Seq_Property2” is a previously established result stating that any monotonically increasing sequence f can be divided into two cases:
- (i)
- f becomes constant after some term, or
- (ii)
- there exists a strictly increasing subsequence of f.
Here, we apply this result to split the proof into two parts: lines 7–16 for case (i), and lines 17–45 for case (ii).
7–16 (case i) Let the constant value in case (i) be , and the term be x. Thus, for each , we have . Obviously, is the least upper bound of sequence f, where lines 9–13 prove that is an upper bound of f and lines 14–16 prove that is the smallest one among all the upper bounds of f.
17–45 (case ii) Let the strictly increasing subsequence of f be h; then, we can construct a rational sequence k such that
where is the successor of n. Then, it can be proven that k has a least upper bound, denoted a (the assertion in line 35). Furthermore, a can be proven the least upper bound of h (the assertion in line 36) and f (proofs in lines 38–45).
It should be noted that in the proof of case (ii), the construction of the rational sequence k is particularly crucial as it necessitates the use of the Axiom of Choice (AC), which is often overlooked in manual proofs.
In line 24, we firstly use the tactic “set” (which is used to introduce local definitions during proof construction) to define a set
denoted “A n” in code. For each , consists of all the (infinitely many) rational numbers between and , but we only need to choose a single element of .
Then, in line 25, we invoke AC (AxiomIX in code), which introduces a choice function c into the proof environment such that for each set x, holds. In other words, the choice function c can select a specific element for every set. Consequently, for every , holds, according to which we can define the rational number sequence
as formally defined in line 27.
Lines 28–33 verify that k is a strictly increasing rational sequence, and for each , and hold.
Among the various sets (, , , , , etc.) constructed previously, only possesses completeness, making it capable of serving as the real number set.
At last, as one of the classical examples, the real number can be verified to be an irrational number.
5. Conclusions and Outlook
5.1. Non-Standard Extension of Number Systems
The process of FMCR is accomplished in several steps: extending the natural number set to the non-standard natural number set through an NPAUF; extending to the non-standard integer set and the non-standard rational number set through the idea of equivalence classification; then, classifying the Archimedean subset to obtain the real number set . Therefore, this is a method of obtaining the real numbers by performing non-standard extensions of the number systems, and the most crucial step is the extension from to , which directly introduces the infinity numbers. Additionally, to prove the existence of NPAUF, the Continuum Hypothesis (CH) is utilized.
Inspired by the process from to , we believe that this process can be applied to the existing real number set , thereby obtaining the set of non-standard real numbers , also known as the hyper-real numbers [33,35]. Specifically, in the formalization of :
If the expression “ran(f) ⊂ ” is replaced with “ran(f) ⊂ ”, then this set should become the hyper-real number set. Note that, as presented in Section 3.1, “F0” would still be the specific NPAUF introduced by the command “Parameter”.
Thus, we have:
where indicates that f is a function whose domain is and range is contained in , and ().
The order and operations on can be defined by analogy with those on . For hyper-real numbers ∈ , if and , we can define:
Similar to the construction of , we can construct the standard part of :
where represents the principal ultrafilter corresponding to the real number r. Consisting of all the principal ultrafilters over , is the standard real number set contained in ; it can be formally described as:
where “F r” (see Definition 2 in Section 2.3) is the formalization of the principal ultrafilter over .
Given that every real number r uniquely corresponds to a principal ultrafilter , the real number set is isomorphic to , and the latter is also a concrete model of the real number set. This aligns with the isomorphism between and , both of which are models of the natural number set, as introduced in Section 3.1.
In , there exist positive numbers smaller than every positive real number—these are precisely the infinitesimals.
For example, let , where () is the image of under the isomorphism between and . Thus, we have and . And for each , holds. Here, we introduce a manual proof demonstrating that is an infinitesimal:
Proof.
Firstly, we have , where is the zero element (i.e., the principal ultrafilter corresponding to 0) in and is the NPAUF introduced above.
Then, for each positive , . Since is in fact a decreasing sequence, there exists such that holds, namely . Because is a non-principal ultrafilter, holds. Then, according to the properties of non-principal ultrafilters (see Definitions 3 and 5 in [29]), we have , namely and , which implies that is a positive infinitesimal (smaller than all positive real numbers but greater than zero). □
In the above proof, the equivalences and must be derived from the definition of the arithmetical ultrafilter. And according to this proof, we can verify the following formal theorem in Coq to demonstrate the existence of infinitesimals in .
where “F R0” represents the principal ultrafilter (i.e., the zero element in ).
As briefly discussed above, NPAUF enables the construction of a hyper-real number model where each element (hyper-real number) is represented by an arithmetical ultrafilter. This achieves methodological consistency with the filter-method construction of real numbers presented in this paper.
To advance further, we plan to implement the formalization of hyper-real numbers and even non-standard analysis using NPAUF. This could be a meaningful attempt and piece of research. On the one hand, from the mathematical perspective, hyper-real numbers are the foundation of non-standard analysis, which unfortunately is still not widely understood. Machine proof may become a new pathway for people to learn about this theory. On the other hand, the application of NPAUF unifies the construction of the real and hyper-real numbers, which is also of positive significance for mathematical research.
5.2. Notes on the Implementation
This work is grounded in the Coq formalization of the Morse–Kelley axiomatic set theory (MK) [4,36,37], and paves the way for the formal verification of non-standard analysis. The contribution is the Coq verification for proofs of the filter-method construction of real numbers (FMCR) introduced in [1,2].
The formalization of FMCR comprises 9 (.v)files and approximately 13,000 lines of Coq code (excluding MK and filter formalization). It is self-contained and does not rely on any official libraries of Coq. All code has been successfully executed in the Coq IDE (integrated development environment). Figure 6 shows the dependency of our Coq development, where each ellipse represents a (.v)file.
Figure 6.
The dependency graph of our Coq development (.v)files.
The MK part (red ellipses) and filter part (blue ellipses) are our previous works [28,29,36,37] that this paper is based on, and the part of green ellipses for FMCR is our development presented in this paper. The gray ellipses represent some required auxiliary formalization, the contents of which are not meticulously reflected in the manual proofs but necessary for the machine verification. In particular, in the file existence_of_NPAUF.v, the existence of non-principal arithmetical ultrafilters is formally verified with the use of the Continuum Hypothesis [29]. This guarantees that FMCR itself is logically sound and consistent with MK. Readers can verify the details in our Coq code.
The mechanized proof of mathematical theorems undoubtedly can strengthen the rigor of theories. To verify the correctness of a theory, people do not need to understand the tedious and complicated proofs, but only to check if the formal descriptions of relevant definitions and theorems are right. And if the code is executed successfully, the proof is correct. In addition, the formalization can also help people study and comprehend the theories, since every detail of the proofs must be verified in a computer. As the famous saying in the programming community goes: “Talk is cheap, show me the code!” It should be believed that computer-assisted verification may become a new trend in mathematical research [6,15,26,47,48].
Author Contributions
Conceptualization, G.D. and W.Y.; methodology, G.D.; software, G.D.; validation, G.D. and W.Y.; formal analysis, G.D.; investigation, G.D.; resources, G.D.; data curation, G.D.; writing—original draft preparation, G.D.; writing—review and editing, G.D.; visualization, G.D.; supervision, W.Y.; project administration, G.D. and W.Y.; funding acquisition, W.Y. All authors have read and agreed to the published version of the manuscript.
Funding
This research was supported by the National Natural Science Foundation of China (Grant Nos. 62476028 and 61936008).
Data Availability Statement
The entire Coq formalization code of FMCR in this research is available at https://github.com/1DGW/formal-verification-of-the-filter-method-construction-for-real-numbers, accessed on 19 August 2025.
Conflicts of Interest
The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.
Abbreviations
The following abbreviations are used in this manuscript:
| AC | Axiom of Choice |
| AUF | arithmetical ultrafilter |
| CH | Continuum Hypothesis |
| FEP | Filter Extension Principle |
| FMCR | the filter-method construction for reals |
| IDE | integrated development environment |
| MK | Morse–Kelley axiomatic set theory |
| NPAUF | non-principal arithmetical ultrafilter |
| ZFC | Zermelo–Fraenkel axiomatic set theory with AC |
Appendix A. Partial Definitions and Notations of MK
| Mathematical Meaning | Mathematical Symbol |
| Definition in Coq 1 | Notation in Coq |
| union of x and y | |
| Union x y := \{ z, z ∈ x \/ z ∈ y \} | x ∪ y |
| intersection of x and y | |
| Intersection x y := \{ z, z ∈ x /\ z ∈ y \} | x ∩ y |
| complement of x | |
| Complement x := \{ y, y ∉ x \} | ¬x |
| difference of x and y; complement of y relative to x | |
| Setminus x y := x ∩ (¬ y) | x ∼ y |
| void class; empty set | ∅; 0 |
| := \{ x, x <> x \} | |
| universe, the class including all sets | |
| := \{ x, x = x \} | |
| class of the intersection of the members of x | |
| Element_I x := \{ z, ∀ y, y ∈ x -> z ∈ y \} | ∩x |
| class of the union of the members of x | |
| Element_U x := \{ z, ∃ y, z ∈ y /\ y ∈ x \} | ∪x |
| x is a subclass of y; x is contained in y | ; |
| Included x y := ∀ z, z ∈ x -> z ∈ y | x ⊂ y |
| power class of x | |
| PowerClass x := \{ y, y ⊂ x \} | pow(x) |
| singleton class of x | |
| Singleton x := \{ z, x ∈ -> z = x \} | [x] |
| unordered pair of x and y | |
| Unordered x y := [x] ∪ [y] | [x|y] |
| ordered pair of x and y | |
| Ordered x y := [[x]|[x|y]] | [x,y] |
| the first coordinate of z | 1stcoord z |
| First z := z | – |
| the second coordinate of z | 2stcoord z |
| Second z := (z)∪(z) ∼ (z) | – |
| r is a relation iff its members are ordered pairs | – |
| Relation r := ∀ z, z ∈ r -> ∃ x y, z = [x,y] | – |
| composition of r and s | |
| Composition r s := \{\ x z, ∃ y, [x,y] ∈ s /\ [y,z] ∈ r \}\ 2 | r ∘ s |
| relation inverse to r | |
| Inverse r := \{\ x y, [y,x] ∈ r \}\ | |
| f is a function | – |
| Function f := Relation f /\ (∀ x y z, [x,y] ∈ f -> [x,z] ∈ f -> y = z) | – |
| domain of the class f | domain f |
| Domain f := \{ x, ∃ y, [x,y] ∈ f \} | dom(f) |
| range of the class f | range f |
| Range f := \{ y, ∃ x, [x,y] ∈ f \} | ran(f) |
| value of f at x or image of x under f | |
| Value f x := ∩(\{ y, [x,y] ∈ f \}) | f[x] |
| f is a 1-1 function (bijective function) | – |
| Function1_1 f := Function f /\ Function () | – |
| class consisting of functions whose domain is x and range is contained in y | |
| Exponent y x := \{ f, Function f /\ dom(f) = x /\ ran(f) ⊂ y \} | – |
| cartesian product of x and y | |
| Cartesian x y := \{\ u v, u ∈ x /\ v ∈ y \}\ | x × y |
| restriction of f to x | |
| Restriction f x := f ∩ (x ) | f|(x) |
| x is r-related to y or x r-precedes y | |
| Rrelation x r y := [x,y] ∈ r | – |
| r connects x (trichotomy) | – |
| Connect r x := ∀ u v, u ∈ x -> v ∈ x | – |
| -> (Rrelation u r v) \/ (Rrelation v r u) \/ (u = v) | |
| x is full (each member of a member of x is a member of x) | – |
| Full x := ∀ m, m ∈ x -> m ⊂ x | – |
| E is the ∈-relation | E |
| E := \{\ x y, x ∈ y \}\ | E |
| x is an ordinal | – |
| Ordinal x := Connect E x /\ Full x | – |
| class consisting of all ordinal numbers 3 | R |
| R := \{ x, Ordinal x \} | R |
| x is an ordinal number if and only if | – |
| Ordinal_Number x := x ∈ R | – |
| successor of x | ; |
| PlusOne x := x ∪ [x] | – |
| there exists a 1-1 function between x and y; | |
| x is equivalent (equipotent) to y; x and y are equipollent | |
| Equivalent x y := ∃ f, Function1_1 f /\ dom(f) = x /\ ran(f) = y | x ≈ y |
| x is a cardinal number | – |
| Cardinal_Number x := Ordinal_Number x /\ (∀ y, y ∈ R -> y ∈ x -> ∼ (x ≈ y)) | – |
| class consisting of all cardinal numbers | C |
| C := \{ x, Cardinal_Number x \} | C |
| cardinality function that maps a set to its cardinality | P |
| P := \{\ x y, x ≈ y /\ y ∈ C \}\ | P |
| set of non-negative integers (i.e., set of natural numbers) | |
| := \{ x, Integer x \} | |
| x is finite | – |
| Finite x := P[x] | – |
| 1 All definitions are defined with the command “Definition”. 2 The notation “ \{\ ⋯ \}\ ” is denoted for the classifiers whose members are ordered pairs: Notation "\{\ P \}\" := (\{ z, ∃ x y, z = [x,y] /\ P x y \})(at level 0), where the type of P is “Class -> Class -> Prop”. 3 R is an ordinal but not an ordinal number. | |
Appendix B. Partial Definitions and Notations About Filters
| Mathematical Meaning | Mathematical Symbol |
| Definition in Coq | Notation in Coq |
| B is a filter base over A | – |
| FilterBase B A := B <> /\ B ⊂ pow(A) /\ ∉ B | – |
| /\ (∀ a b, a ∈ B -> b ∈ B -> (a ∩ b) ∈ B) | |
| F is a filter over A | – |
| Filter F A := F ⊂ pow(A) /\ ∉ F /\ A ∈ F | – |
| /\ (∀ a b, a ∈ F -> b ∈ F -> (a ∩ b) ∈ F) | |
| /\ (∀ a b, a ⊂ b -> b ⊂ A -> a ∈ F -> b ∈ F) | |
| F is an ultrafilter over A | – |
| ultraFilter F A := Filter F A | – |
| /\ (∀ a, a ⊂ A -> a ∈ F \/ (A ∼ a) ∈ F) | |
| F is a maximal ultrafilter over A | – |
| maxFilter F A := Filter F A | – |
| /\ (∀ G, Filter G A -> F ⊂ G -> G = F) | |
| the principal ultrafilter corresponding to the element a of A | |
| F A a := \{ u, u ⊂ A /\ a ∈ u \} | denoted as “F A a” or “F a” when A is replaced by |
| F is a free ultrafilter (non-principal ultrafilter) over A | – |
| free_ultraFilter F A := ultraFilter F A | – |
| /\ (∀ a, a ⊂ A -> Finite a -> a ∉ F) | |
| Fréchet Filter over A | |
| Definition F A := \{ a, a ⊂ A /\ Finite (A ∼ a) \} | – |
| (ultrafilter space on A, the set consisting of all ultrafilters over A) | denoted as “” when A is replaced by |
| A := \{ u, ultraFilter u A \} | |
| (the image set of f at A) | |
| ImageSet f A := \{ u, ∃ m, u = f[m] /\ m ∈ A \} | f⌈A⌋ |
| (the preimage set of f at A) | |
| PreimageSet f A := \{ u, u ∈ dom(f) /\ f[u] ∈ A \} | ⌈A⌋ |
| (transformation of ultrafilter F under function f) | f⟨F|B⟩ ; denoted as “f⟨F⟩” when B is replaced by |
| Transform F f B := \{ u, u ⊂ B /\ ⌈u⌋ ∈ F \} | |
| , functions f and g are F-equivalent | |
| AlmostEqual f g A B F := Function f /\ Function g | – |
| /\ dom(f) = A /\ dom(g) = A /\ ran(f) ⊂ B /\ ran(g) ⊂ B | |
| /\ F ∈ ( A) /\ \{ u, u ∈ A /\ f[u] = g[u] \} ∈ F | |
| F is an arithmetical ultrafilter over A | |
| Arithmetical_ultraFilter F A := ∼ Finite A /\ F ∈ ( A) | – |
| /\ (∀ f g, Function f -> Function g | |
| -> dom(f) = A -> dom(g) = A -> ran(f) ⊂ A -> ran(g) ⊂ A | |
| -> f⟨F∣A⟩ = g⟨F∣A⟩ -> AlmostEqual f g A A F) |
References
- Wang, F. On a special kind of points in stone-cˇech compactification βω. J. China Univ. Sci. Technol. 1998, 28, 567–570. [Google Scholar]
- Wang, F. Mathematical Foundations, 2nd ed.; Higher Education Press: Beijing, China, 2018. (In Chinese) [Google Scholar]
- Wang, F. A result on arithmetical ultrafilters. J. China Univ. Sci. Technol. 2000, 30, 517–522. [Google Scholar]
- Kelley, J.L. General Topology; Springer: New York, NY, USA, 1955. [Google Scholar]
- Jiang, N.; Li, Q.; Wang, L.; Zhang, X.; He, Y. Overview on mechanized theorem proving. J. Softw. 2020, 31, 82–112. (In Chinese) [Google Scholar] [CrossRef]
- Avigad, J. The machenization of mathematics. Not. Am. Math. Soc. 2018, 65, 681–690. [Google Scholar]
- Harrison, J.; Urban, J.; Wiedijk, F. History of interactive theorem proving. In Handbook of the History of Logic; North-Holland: Amsterdam, The Netherlands, 2014; Volume 9, pp. 135–214. [Google Scholar] [CrossRef] [Scilit]
- Wang, H. Toward mechanical mathematics. IBM J. Res. Dev. 1960, 4, 2–22. [Google Scholar] [CrossRef] [Scilit]
- Bertot, Y.; Castéran, P. Interactive Theorem Proving and Program Development–Coq’Art: The Calculus of Interactive Constructions; Springer: Berlin/Heidelberg, Germany, 2004. [Google Scholar]
- The Reference Manual of the Rocq Prover, v: 9.0.0. Available online: https://rocq-prover.org/doc/V9.0.0/refman (accessed on 15 June 2025).
- Nipow, T.; Paulson, L.C.; Wenzel, M. Isabelle/HOL: A Proof Assistant for Higher-Order Logic; Lecture Notes in Computer Science (LNCS); Springer: Berlin/Heidelberg, Germany, 2002; Volume 2283. [Google Scholar] [CrossRef] [Scilit]
- The HOL Light Theorem Prover. Available online: https://hol-light.github.io/ (accessed on 15 June 2025).
- Bancerek, G.; Bylinski, C.; Grabowski, A.; Korniłowicz, A.; Matuszewski, R.; Naumowicz, A.; Pak, K.; Urban, J. Mizar: State-of-the-art and Beyond. In Proceedings of the 8th International Conference on Intelligent Computer Mathematics (CICM 2015), Washington, DC, USA, 13–17 July 2015; pp. 261–279. [Google Scholar] [CrossRef] [Scilit]
- Moura, L.; Ullrich, S. The Lean 4 theorem prover and programming language. In Proceedings of the 28th International Conference on Automated Deduction (CADE 2021), Virtual Event, 12–15 July 2021; pp. 625–635. [Google Scholar] [CrossRef] [Scilit]
- Avigad, J.; Harrison, J. Formally verified mathematics. Commun. ACM 2014, 57, 66–75. [Google Scholar] [CrossRef] [Scilit]
- Beeson, M. The mechanization of mathematics. In Alan Turing: Life and Legacy of a Great Thinker; Teuscher, C., Ed.; Springer: Berlin/Heidelberg, Germany, 2004; pp. 77–134. [Google Scholar] [CrossRef] [Scilit]
- Avigad, J.; Donnelly, K.; Gray, D.; Raff, P. A formally verified proof of the prime number theorem. ACM Trans. Comput. Log. 2007, 9, 2-es. [Google Scholar] [CrossRef] [Scilit]
- Gonthier, G. Formal proof–the Four Color Theorem. Not. Am. Math. Soc. 2008, 55, 1382–1393. [Google Scholar]
- Hales, T. The Jordan curve theorem, formally and informally. Am. Math. Mon. 2007, 114, 882–894. [Google Scholar] [CrossRef] [Scilit]
- Paulson, L. A machine-assisted proof of Gödel’s incompleteness theorems for the theory of hreditarily finite sets. Rev. Symb. Log. 2014, 7, 484–498. [Google Scholar] [CrossRef] [Scilit]
- Ciolli, G.; Gentili, G. Maggesi, M. A certified proof of the Cartan Fixed Point Theorems. J. Autom. Reason. 2011, 47, 319–336. [Google Scholar] [CrossRef] [Scilit]
- Avigad, J.; Hölzl, J.; Serafin, L. A formally verified proof of the Central Limit Theorem. J. Autom. Reason. 2017, 59, 389–423. [Google Scholar] [CrossRef] [Scilit]
- Gonthier, G.; Asperti, A.; Avigad, J.; Bertot, Y.; Cohen, C.; Garillot, F.; Roux, S.L.; Mahboubi, A.; O’Connor, R.; Pasca, I.; et al. A machine-checked proof of the Odd Order Theorem. In Proceedings of the 4th International Conference on Interactive Theorem Proving (ITP 2013), Rennes, France, 22–26 July 2013; pp. 163–179. [Google Scholar] [CrossRef] [Scilit]
- Hales, T.; Adams, M.; Bauer, G.; Dang, T.D.; Harrison, J.; Hoang, L.T.; Kaliszyk, C.; Magron, V.; Mclaughlin, S.; Nguyen, Q.T.; et al. A formal proof of the Kepler Conjecture. arXiv 2015, arXiv:1501.02155. [Google Scholar] [CrossRef] [Scilit]
- Formalizing the Proof of PFR in Lean4 Using Blueprint: A Short Tour. Available online: https://terrytao.wordpress.com/2023/11/18/formalizing-the-proof-of-pfr-in-lean4-using-blueprint-a-short-tour/ (accessed on 15 June 2025).
- Wiedijk, F. Formal proof – getting started. Not. Am. Math. Soc. 2008, 55, 1408–1414. [Google Scholar]
- Weiss, I. Survey article: The real numbers—A survey of constructions. J. Math. 2015, 45, 737–762. [Google Scholar] [CrossRef] [Scilit]
- Dou, G.; Yu, W. Formalization of the Filter Extension Principle (FEP) in Coq. In Proceedings of the 6th Conference on Intelligent Networked Things (CINT 2024), Xi’an, China, 18 May 2024; pp. 95–106. [Google Scholar] [CrossRef] [Scilit]
- Dou, G.; Chen, S.; Yu, W.; Zhang, R. The Continuum Hypothesis Implies the Existence of Non-principal Arithmetical Ultrafilters—A Coq Formal Verification. In Proceedings of the 25th International Conference on Formal Engineering Methods (ICFEM 2024), Hiroshima, Japan, 2–6 December 2024; pp. 257–277. [Google Scholar] [CrossRef] [Scilit]
- Wang, F. Arithmetical Ultrafilters: End-Extenstions of N in βN; University of Science and Technology of China Press: Hefei, China, 2016. (In Chinese) [Google Scholar]
- Bell, J.L. Set Theory: Boolean-Valued Models and Independence Proofs (Oxford Logic Guides 47), 3rd ed.; Clarendon Press: Oxford, UK, 2005. [Google Scholar]
- Cohen, P.J. Set Theory and the Continuum Hypothesis; W.A.Benjamin, Inc.: New York, NY, USA, 1966. [Google Scholar]
- Robinson, A. Non-Standard Analysis, revised ed.; North Holland Publishing Company: Amsterdam, The Netherlands, 1974. [Google Scholar]
- Hewitt, E. Rings of real-valued continuous functions. I. Trans. Am. Math. Soc. 1948, 64, 45–99. [Google Scholar] [CrossRef]
- Jin, R. Nonstandard analysis and its applications. Sci. Sin. Math. 2016, 46, 371–408. (In Chinese) [Google Scholar] [CrossRef] [Scilit]
- Sun, T.; Yu, W. A formal system of axiomatic set theory in Coq. IEEE Access 2020, 8, 21510–21523. [Google Scholar] [CrossRef] [Scilit]
- Yu, W.; Sun, T.; Fu, Y. A Machine Proof System for Axiomatic Set Theory; Science Press: Beijing, China, 2020. (In Chinese) [Google Scholar]
- Riesz, F. Stetigkeitsbegriff und abstrakte Mengenlehre; Atti del IV Congresso Internazionale del Matematici; Castelnuovo, G., Ed.; Tipografia della R. Accademia dei Lincei: Rome, Italy, 1909; Volume 2, pp. 18–24. [Google Scholar]
- Comfort, W.W.; Negrepontis, S. The Theory of Ultrafilters; Springer: Berlin/Heidelberg, Germany, 1974. [Google Scholar]
- Cartan, H.P. Théorie des filtres. Comptes Rendus Hebdomadaires des Séances de L’Académie des Sciences 1937, 205, 595–598. [Google Scholar]
- Cartan, H.P. Filtres et ultrafilters. Comptes Rendus Hebdomadaires des Séances de L’Académie des Sciences 1937, 205, 777–779. [Google Scholar]
- Bourbaki, N. Elements of Mathematics: General Topology: Chapters 1–4; Springer: Berlin/Heidelberg, Germany, 1995. [Google Scholar]
- Thomsa, J.J. The Axiom of Choice; North-Holland Publishing Company: Amsterdam, The Netherlands, 1973. [Google Scholar]
- Daguenet-Teissier, M. Ultrafilters à la Facon de Ramsey. Trans. Am. Math. Soc. 1979, 250, 91–120. [Google Scholar]
- Fu, Y.; Yu, W. Formalization of the equivalence among completeness theorems of real number in Coq. Mathematics 2021, 9, 38. [Google Scholar] [CrossRef] [Scilit]
- Zorich, V.A. Mathematical Analysis, 7th expanded version; MCCME Publ.: Moscow, Russia, 2015. [Google Scholar]
- de Bruijn, N.G. Checking mathematics with computer assistance. Not. Am. Math. Soc. 1991, 38, 8–15. [Google Scholar]
- Simpson, C. Computer theorem proving in mathematics. Lett. Math. Phys. 2004, 69, 287–315. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).







































































