FORMALIZED MATHEMATICS Volume 9, Number 2, 2001 University of Białystok

Lim-Inf Convergence^{1}

Bartłomiej Skorulski University of Białystok

Summary. This work continues the formalization of [7]. Theorems from Chapter III, Section 3, pp. 158–159 are proved.

MML Identifier: WAYBEL28.

The articles [5], [6], [10], [1], [15], [11], [17], [16], [12], [14], [8], [3], [4], [9], [2], and [13] provide the notation and terminology for this paper.

One can prove the following propositions:

(1) For every complete lattice L and for every net N in L holds inf N lim inf N.

(2) Let L be a complete lattice, N be a net in L, and x be an element of L. Suppose that for every subnet M of N holds x = lim inf M. Then x = lim inf N and for every subnet M of N holds x inf M.

(3) Let L be a complete lattice, N be a net in L, and x be an element of L. Suppose N ∈ NetUniv(L). Suppose that for every subnet M of N such that M ∈ NetUniv(L) holds x = lim inf M. Then x = lim inf N and for every subnet M of N such that M ∈ NetUniv(L) holds x inf M.

Let N be a non empty relational structure and let f be a map from N into N. We say that f is greater or equal to id if and only if:

(Def. 1) For every element j of the carrier of N holds j f(j). We now state three propositions:

(4) For every reflexive non empty relational structure N holds id_{N} is greater or equal to id.

(5) Let N be a directed non empty relational structure and x, y be elements of N. Then there exists an element z of N such that x z and y z.

(6) For every directed non empty relational structure N holds there exists a map from N into N which is greater or equal to id.

1This work has been supported by KBN Grant 8 T11C 018 12.

Let N be a directed non empty relational structure. One can verify that there exists a map from N into N which is greater or equal to id.

Let N be a reflexive non empty relational structure. Observe that there exists a map from N into N which is greater or equal to id.

Let L be a non empty 1-sorted structure, let N be a non empty net structure over L, and let f be a map from N into N. The functor N · f yielding a strict non empty net structure over L is defined by the conditions (Def. 2).

(Def. 2)(i) The relational structure of N · f = the relational structure of N, and (ii) the mapping of N · f = (the mapping of N) · f. The following propositions are true:

(7) Let L be a non empty 1-sorted structure, N be a non empty net structure over L, and f be a map from N into N. Then the carrier of N · f = the carrier of N.

(8) Let L be a non empty 1-sorted structure, N be a non empty net structure over L, and f be a map from N into N. Then N · f = ⟨the carrier of N, the internal relation of N, (the mapping of N) · f⟩.

(9) Let L be a non empty 1-sorted structure, N be a transitive directed non empty relational structure, and f be a function from the carrier of N into the carrier of L. Then ⟨the carrier of N, the internal relation of N, f⟩ is a net in L.

Let L be a non empty 1-sorted structure, let N be a transitive directed non empty relational structure, and let f be a function from the carrier of N into the carrier of L. Note that ⟨the carrier of N, the internal relation of N, f⟩ is transitive directed and non empty.

We now state the proposition

(10) Let L be a non empty 1-sorted structure, N be a net in L, and p be a

map from N into N. Then N · p is a net in L. Let L be a non empty 1-sorted structure, let N be a net in L, and let p be

a map from N into N. Note that N · p is transitive and directed.

Next we state two propositions:

(11) Let L be a non empty 1-sorted structure, N be a net in L, and p be a map from N into N. If N ∈ NetUniv(L), then N · p ∈ NetUniv(L).

(12) Let L be a non empty 1-sorted structure and N, M be nets in L. Suppose the net structure of N = the net structure of M. Then M is a subnet of N.

Let L be a non empty 1-sorted structure and let N be a net in L. Note that there exists a subnet of N which is strict.

The following proposition is true

(13) Let L be a non empty 1-sorted structure, N be a net in L, and p be a greater or equal to id map from N into N. Then N · p is a subnet of N.

Let L be a non empty 1-sorted structure, let N be a net in L, and let p be a greater or equal to id map from N into N. Then N · p is a strict subnet of N.

One can prove the following two propositions:

(14) Let L be a complete lattice, N be a net in L, and x be an element of L. Suppose N ∈ NetUniv(L). Suppose x = lim inf N and for every subnet M of N such that M ∈ NetUniv(L) holds x inf M. Then x = lim inf N and for every greater or equal to id map p from N into N holds x inf(N · p).

(15) Let L be a complete lattice, N be a net in L, and x be an element of L. Suppose x = lim inf N and for every greater or equal to id map p from N into N holds x inf(N · p). Let M be a subnet of N. Then x = lim inf M.

Let L be a non empty relational structure. The lim inf convergence of L is a convergence class of L and is defined by the condition (Def. 3).

(Def. 3) Let N be a net in L. Suppose N ∈ NetUniv(L). Let x be an element of the carrier of L. Then ⟨⟨N, x⟩⟩∈ the lim inf convergence of L if and only if for every subnet M of N holds x = lim inf M.

We now state two propositions:

(16) Let L be a complete lattice, N be a net in L, and x be an element of L. Suppose N ∈ NetUniv(L). Then ⟨⟨N, x⟩⟩∈ the lim inf convergence of L if and only if for every subnet M of N such that M ∈ NetUniv(L) holds x = lim inf M.

(17) Let L be a non empty relational structure, N be a constant net in L, and M be a subnet of N. Then M is constant and the value of N = the value of M.

Let L be a non empty relational structure. The functor ξ(L) yielding a family of subsets of L is defined as follows:

(Def. 4) ξ(L) = the topology of ConvergenceSpace(the lim inf convergence of L).

The following propositions are true:

(18) For every complete lattice L holds the lim inf convergence of L has (CONSTANTS) property.

(19) For every non empty relational structure L holds the lim inf convergence of L has (SUBNETS) property.

(20) For every continuous complete lattice L holds the lim inf convergence of L has (DIVERGENCE) property.

(21) Let L be a non empty relational structure and N, x be sets. If ⟨⟨N, x⟩⟩∈ the lim inf convergence of L, then N ∈ NetUniv(L).

(22) Let L be a non empty 1-sorted structure and C_{1}, C_{2} be convergence classes of L. If C_{1} ⊆ C_{2}, then the topology of ConvergenceSpace(C_{2}) ⊆ the topology of ConvergenceSpace(C_{1}).

240 bartłomiej skorulski

(23) Let L be a non empty reflexive relational structure. Then the lim inf convergence of L ⊆ the Scott convergence of L.

(24) For all sets X, Y such that X ⊆ Y holds X ∈ the universe of Y.

(25) Let L be a non empty transitive reflexive relational structure and D be a directed non empty subset of L. Then NetStr(D) ∈ NetUniv(L).

(26) For every complete lattice L and for every directed non empty subset D of L and for every subnet M of NetStr(D) holds lim inf M = supD.

(27) Let L be a non empty complete lattice and D be a directed non empty subset of L. Then ⟨⟨NetStr(D), supD⟩⟩∈ the lim inf convergence of L.

(28) For every complete lattice L and for every subset U_{1} of L such that U_{1} ∈ ξ(L) holds U_{1} is property(S).

(29) For every non empty reflexive relational structure L and for every subset A of L such that A ∈ σ(L) holds A ∈ ξ(L).

(30) For every complete lattice L and for every subset A of L such that A is upper holds if A ∈ ξ(L), then A ∈ σ(L).

(31) Let L be a complete lattice and A be a subset of L. Suppose A is lower. Then − A ∈ ξ(L) if and only if A is closed under directed sups.

References

[1] Grzegorz Bancerek. Complete lattices. Formalized Mathematics, 2(5):719–725, 1991.

[2] Grzegorz Bancerek. Bounds in posets and relational substructures. Formalized Mathematics, 6(1):81–91, 1997.

[3] Grzegorz Bancerek. Directed sets, nets, ideals, filters, and maps. Formalized Mathematics, 6(1):93–107, 1997.

[4] Grzegorz Bancerek. The “way-below” relation. Formalized Mathematics, 6(1):169–176, 1997.

[5] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[6] Czesław Byliński. Functions from a set to a set. Formalized Mathematics, 1(1):153–164, 1990.

[7] G. Gierz, K.H. Hofmann, K. Keimel, J.D. Lawson, M. Mislove, and D.S. Scott. A Compendium of Continuous Lattices. Springer-Verlag, Berlin, Heidelberg, New York, 1980.

[8] Adam Grabowski. Scott-continuous functions. Formalized Mathematics, 7(1):13–18, 1998.

[9] Artur Korniłowicz. On the topological properties of meet-continuous lattices. Formalized Mathematics, 6(2):269–277, 1997.

[10] Michał Muzalewski. Categories of groups. Formalized Mathematics, 2(4):563–571, 1991.

[11] Beata Padlewska and Agata Darmochwał. Topological spaces and continuous functions. Formalized Mathematics, 1(1):223–230, 1990.

[12] Andrzej Trybulec. Tarski Grothendieck set theory. Formalized Mathematics, 1(1):9–11, 1990.

[13] Andrzej Trybulec. Moore-Smith convergence. Formalized Mathematics, 6(2):213–225, 1997.

[14] Andrzej Trybulec. Scott topology. Formalized Mathematics, 6(2):311–319, 1997.

[15] Wojciech A. Trybulec. Partially ordered sets. Formalized Mathematics, 1(2):313–319, 1990.

[16] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[17] Edmund Woronowicz. Relations defined on sets. Formalized Mathematics, 1(1):181–186, 1990.

The Characterization of the Continuity of Topologies^{1}

Grzegorz Bancerek University of Białystok

Adam Naumowicz University of Białystok

Summary. Formalization of [14, pp. 128–130], chapter II, section 4 (4.10, 4.11).

MML Identifier: WAYBEL29.

The terminology and notation used here are introduced in the following articles: [27], [23], [13], [10], [9], [21], [1], [30], [28], [24], [32], [22], [25], [31], [26], [12], [34], [29], [17], [15], [20], [6], [8], [3], [4], [33], [19], [7], [2], [16], [18], [5], and [11].

1. Preliminaries

The following propositions are true:

(1) Let S, T be non empty relational structures and f be a map from S into T. Suppose f is one-to-one and onto. Then f · f^{−1} = id_{T} and f^{−1} · f = id_{S} and f^{−1} is one-to-one and onto.

(2) Let X, Y be non empty sets, Z be a non empty relational structure, S be a non empty relational substructure of Z^{[: X, Y :]}, T be a non empty relational substructure of (Z^{Y})^{X}, and f be a map from S into T. If f is currying, one-to-one, and onto, then f^{−1} is uncurrying.

(3) Let X, Y be non empty sets, Z be a non empty relational structure, S be a non empty relational substructure of Z^{[: X, Y :]}, T be a non empty relational substructure of (Z^{Y})^{X}, and f be a map from T into S. If f is uncurrying, one-to-one, and onto, then f^{−1} is currying.

1This work has been supported by KBN Grant 8 T11C 018 12.

(4) Let X, Y be non empty sets, Z be a non empty poset, S be a non empty full relational substructure of Z^{[: X, Y :]}, T be a non empty full relational substructure of (Z^{Y})^{X}, and f be a map from S into T. If f is currying, one-to-one, and onto, then f is isomorphic.

(5) Let X, Y be non empty sets, Z be a non empty poset, T be a non empty full relational substructure of Z^{[: X, Y :]}, S be a non empty full relational substructure of (Z^{Y})^{X}, and f be a map from S into T. If f is uncurrying, one-to-one, and onto, then f is isomorphic.

(6) Let S_{1}, S_{2}, T_{1}, T_{2} be relational structures. Suppose that

(i) the relational structure of S_{1} = the relational structure of S_{2}, and (ii) the relational structure of T_{1} = the relational structure of T_{2}.

Let f be a map from S_{1} into T_{1}. Suppose f is isomorphic. Let g be a map from S_{2} into T_{2}. If g = f, then g is isomorphic.

(7) Let R, S, T be relational structures and f be a map from R into S. Suppose f is isomorphic. Let g be a map from S into T. Suppose g is isomorphic. Let h be a map from R into T. If h = g·f, then h is isomorphic.

(8) Let T be an up-complete Scott non empty top-poset and S be a subset of T. Then S is closed if and only if S is directly closed and lower.

(9) Let S, T be up-complete Scott non empty top-posets and f be a map from S into T. If f is directed-sups-preserving, then f is continuous.

(10) Let X, Y, X_{1}, Y_{1} be topological spaces. Suppose that (i) the topological structure of X = the topological structure of X_{1}, and (ii) the topological structure of Y = the topological structure of Y_{1}.

Then [: X, Y :] = [: X_{1}, Y_{1} :].

(11) Let X be a non empty topological space, L be a Scott up-complete non empty top-poset, and F be a non empty directed subset of [X → L]. Then ⨆_{(L^{the carrier of X})} F is a continuous map from X into L.

(12) Let X be a non empty topological space and L be a Scott up-complete non empty top-poset. Then [X → L] is a directed-sups-inheriting relational substructure of L^{the carrier of X}.

(13) Let S_{1}, S_{2} be topological structures. Suppose the topological structure of S_{1} = the topological structure of S_{2}. Let T_{1}, T_{2} be non empty FRstructures. If the FR-structure of T_{1} = the FR-structure of T_{2}, then [S_{1} → T_{1}] = [S_{2} → T_{2}].

One can check that every complete continuous top-lattice which is Scott is also injective and T_{0}.

One can check that there exists a top-lattice which is Scott, continuous, and complete.

Let X be a non empty topological space and let L be a Scott up-complete non empty top-poset. Note that [X → L] is up-complete.

One can prove the following propositions:

(14) Let I be a non empty set and J be a poset-yielding nonempty many sorted set indexed by I. Suppose that for every element i of I holds J(i) is up-complete. Then I -prod_{POS} J is up-complete.

(15) Let I be a non empty set and J be a poset-yielding nonempty reflexiveyielding many sorted set indexed by I. Suppose that for every element i of I holds J(i) is up-complete and lower-bounded. Let x, y be elements of ∏ J. Then x ≪ y if and only if the following conditions are satisfied:

(i) for every element i of I holds x(i) ≪ y(i), and (ii) there exists a finite subset K of I such that for every element i of I

such that i ∉ K holds x(i) = ⊥_{J(i)}. Let X be a set and let L be a lower-bounded non empty reflexive antisym-

metric relational structure. Observe that L^{X} is lower-bounded.

Let X be a non empty topological space and let L be a lower-bounded non empty top-poset. Note that [X → L] is lower-bounded.

Let L be an up-complete non empty poset. Note that every topological augmentation of L is up-complete and every topological augmentation of L which is Scott is also correct.

The following proposition is true

(16) Let S be an up-complete antisymmetric non empty reflexive relational structure and T be a non empty reflexive relational structure. Suppose the relational structure of S = the relational structure of T. Let A be a subset of S and C be a subset of T. If A = C and A is inaccessible, then C is inaccessible.

Let L be an up-complete non empty poset. Observe that there exists a topological augmentation of L which is strict and Scott.

We now state two propositions:

(17) Let L be an up-complete non empty poset and S_{1}, S_{2} be Scott topological augmentations of L. Then the topology of S_{1} = the topology of S_{2}.

(18) Let S_{1}, S_{2} be up-complete antisymmetric non empty reflexive FRstructures. Suppose the FR-structure of S_{1} = the FR-structure of S_{2} and S_{1} is Scott. Then S_{2} is Scott.

Let L be an up-complete non empty poset. (Def. 1) ΣL is a strict Scott topological augmentation of L.

We now state two propositions:

(19) For every Scott up-complete non empty top-poset S holds ΣS = the FR-structure of S.

(20) Let L_{1}, L_{2} be up-complete non empty posets. Suppose the relational structure of L_{1} = the relational structure of L_{2}. Then ΣL_{1} = ΣL_{2}.

Let S, T be up-complete non empty posets and let f be a map from S into T. The functor Σf yielding a map from ΣS into ΣT is defined as follows:

(Def. 2) Σf = f.

Let S, T be up-complete non empty posets and let f be a directed-sups-preserving map from S into T. Observe that Σf is continuous.

One can prove the following propositions:

(21) Let S, T be up-complete non empty posets and f be a map from S into T. Then f is isomorphic if and only if Σf is isomorphic.

(22) For every non empty topological space X and for every Scott complete

top-lattice S holds [X → S] = [X → S]. Let X, Y be non empty topological spaces. The functor Θ(X, Y) yielding a

map from ⟨the topology of [: X, Y :], ⊆⟩ into [X → Σ⟨the topology of Y, ⊆⟩] is defined as follows:

(Def. 3) For every open subset W of [: X, Y :] holds (Θ(X, Y))(W) = Θ_{the carrier of X}(W).

2. Some Natural Isomorphisms

Let X be a non empty topological space. The functor α(X) yielding a map from [X → the Sierpiński space] into ⟨the topology of X, ⊆⟩ is defined as follows:

(Def. 4) For every continuous map g from X into the Sierpiński space holds

(α(X))(g) = g^{−1} ({1}). One can prove the following proposition

(23) For every non empty topological space X and for every open subset V

of X holds (α(X))^{−1} (V) = χ_{V,the carrier of X}. Let X be a non empty topological space. Note that α(X) is isomorphic. Let X be a non empty topological space. One can verify that (α(X))^{−1} is

isomorphic.

Let S be an injective T_{0}-space. One can verify that ΩS is Scott. Let X be a non empty topological space. One can check that [X → the

Sierpiński space] is complete.

Next we state the proposition

(24) Ω(the Sierpiński space) = Σ2_{⊆}^{1} .

Let M be a non empty set and let S be an injective T_{0}-space. One can verify that M -prod_{TOP}(M ⟼→ S) is injective.

The following two propositions are true:

(25) For every non empty set M and for every complete continuous lattice L holds Ω(M -prod_{TOP}(M ⟼→ ΣL)) = ΣM -prod_{POS}(M ⟼→ L).

(26) For every non empty set M and for every injective T_{0}-space T holds

Ω(M -prod_{TOP}(M ⟼→ T)) = ΣM -prod_{POS}(M ⟼→ ΩT). Let M be a non empty set and let X, Y be non empty topological spaces. The

functor commute(X, M, Y) yielding a map from [X → M -prod_{TOP}(M ⟼→ Y)] into ([X → Y])^{M} is defined by:

(Def. 5) For every continuous map f from X into M -prod_{TOP}(M ⟼→ Y) holds

(commute(X, M, Y))(f) = commute(f). Let M be a non empty set and let X, Y be non empty topological spaces.

Note that commute(X, M, Y) is one-to-one and onto.

Let M be a non empty set and let X be a non empty topological space. Note that commute(X, M, the Sierpiński space) is isomorphic.

Next we state the proposition

(27) Let X, Y be non empty topological spaces, S be a Scott topological augmentation of ⟨the topology of Y, ⊆⟩, and f_{1}, f_{2} be elements of [X → S]. If f_{1} f_{2}, then G_{f_{1}} ⊆ G_{f_{2}}.

3. The Poset of Open Sets

The following propositions are true:

(28) Let Y be a T_{0}-space. Then the following statements are equivalent

(i) for every non empty topological space X and for every Scott continuous complete top-lattice L and for every Scott topological augmentation T of [Y → L] there exists a map f from [X → T] into [[: X, Y :] → L] and there exists a map g from [[: X, Y :] → L] into [X → T] such that f is uncurrying, one-to-one, and onto and g is currying, one-to-one, and onto,

(ii) for every non empty topological space X and for every Scott continuous complete top-lattice L and for every Scott topological augmentation T of [Y → L] there exists a map f from [X → T] into [[: X, Y :] → L] and there exists a map g from [[: X, Y :] → L] into [X → T] such that f is uncurrying and isomorphic and g is currying and isomorphic.

(29) Let Y be a T_{0}-space. Then ⟨the topology of Y, ⊆⟩ is continuous if and only if for every non empty topological space X holds Θ(X, Y) is isomorphic.

(30) Let Y be a T_{0}-space. Then ⟨the topology of Y, ⊆⟩ is continuous if and only if for every non empty topological space X and for every continuous map f from X into Σ⟨the topology of Y, ⊆⟩ holds G_{f} is an open subset of [: X, Y :].

(31) Let Y be a T_{0}-space. Then ⟨the topology of Y, ⊆⟩ is continuous if and only if {⟨⟨W, y⟩⟩; W ranges over open subsets of Y, y ranges over elements of Y: y ∈ W } is an open subset of [: Σ⟨the topology of Y, ⊆⟩, Y :].

(32) Let Y be a T_{0}-space. Then ⟨the topology of Y, ⊆⟩ is continuous if and only if for every element y of Y and for every open neighbourhood V of y there exists an open subset H of Σ⟨the topology of Y, ⊆⟩ such that V ∈ H and ⋂ H is a neighbourhood of y.

4. The Poset of Scott Open Sets

One can prove the following propositions:

(33) Let R_{1}, R_{2}, R_{3} be non empty relational structures and f_{1} be a map from R_{1} into R_{3}. Suppose f_{1} is isomorphic. Let f_{2} be a map from R_{2} into R_{3}. Suppose f_{2} = f_{1} and f_{2} is isomorphic. Then the relational structure of R_{1} = the relational structure of R_{2}.

(34) Let L be a complete lattice. Then ⟨σ(L), ⊆⟩ is continuous if and only if for every complete lattice S holds σ([: S, L:]) = the topology of [: ΣS, ΣL:].

(35) Let L be a complete lattice. Then the following statements are equivalent

(i) for every complete lattice S holds σ([: S, L:]) = the topology of [: ΣS, ΣL:],

(ii) for every complete lattice S holds the topological structure of Σ[: S,

L:] = [: ΣS, ΣL:].

(36) Let L be a complete lattice. Then for every complete lattice S holds σ([: S, L:]) = the topology of [: ΣS, ΣL:] if and only if for every complete lattice S holds Σ[: S, L:] = Ω[: ΣS, ΣL:].

(37) Let L be a complete lattice. Then ⟨σ(L), ⊆⟩ is continuous if and only if for every complete lattice S holds Σ[: S, L:] = Ω[: ΣS, ΣL:].

References

[1] Grzegorz Bancerek. Complete lattices. Formalized Mathematics, 2(5):719–725, 1991.

[2] Grzegorz Bancerek. Bounds in posets and relational substructures. Formalized Mathematics, 6(1):81–91, 1997.

[3] Grzegorz Bancerek. Directed sets, nets, ideals, filters, and maps. Formalized Mathematics, 6(1):93–107, 1997.

[4] Grzegorz Bancerek. The “way-below” relation. Formalized Mathematics, 6(1):169–176, 1997.

[5] Grzegorz Bancerek. Bases and refinements of topologies. Formalized Mathematics, 7(1):35–43, 1998.

[6] Grzegorz Bancerek. Continuous lattices of maps between T_{0} spaces. Formalized Mathematics, 9(1):111–117, 2001.

[7] Grzegorz Bancerek. Retracts and inheritance. Formalized Mathematics, 9(1):77–85, 2001.

[8] Grzegorz Bancerek and Adam Naumowicz. Function spaces in the category of directed suprema preserving maps. Formalized Mathematics, 9(1):171–177, 2001.

[9] Czesław Byliński. Basic functions and operations on functions. Formalized Mathematics, 1(1):245–254, 1990.

[10] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

the characterization of the continuity of … 247

[11] Czesław Byliński. Some basic properties of sets. Formalized Mathematics, 1(1):47–53, 1990.

[12] Agata Darmochwał. Families of subsets, subspaces and mappings in topological spaces. Formalized Mathematics, 1(2):257–261, 1990.

[13] Agata Darmochwał. Finite sets. Formalized Mathematics, 1(1):165–167, 1990.

[14] G. Gierz, K.H. Hofmann, K. Keimel, J.D. Lawson, M. Mislove, and D.S. Scott. A Compendium of Continuous Lattices. Springer-Verlag, Berlin, Heidelberg, New York, 1980.

[15] Adam Grabowski. Scott-continuous functions. Part II. Formalized Mathematics, 9(1):5– 11, 2001.

[16] Adam Grabowski and Robert Milewski. Boolean posets, posets under inclusion and products of relational structures. Formalized Mathematics, 6(1):117–121, 1997.

[17] Jarosław Gryko. Injective spaces. Formalized Mathematics, 7(1):57–62, 1998.

[18] Artur Korniłowicz. Cartesian products of relations and relational structures. Formalized Mathematics, 6(1):145–152, 1997.

[19] Artur Korniłowicz. On the topological properties of meet-continuous lattices. Formalized Mathematics, 6(2):269–277, 1997.

[20] Artur Korniłowicz and Jarosław Gryko. Injective spaces. Part II. Formalized Mathematics, 9(1):41–47, 2001.

[21] Michał Muzalewski. Categories of groups. Formalized Mathematics, 2(4):563–571, 1991.

[22] Beata Padlewska. Families of sets. Formalized Mathematics, 1(1):147–152, 1990.

[23] Beata Padlewska. Locally connected spaces. Formalized Mathematics, 2(1):93–96, 1991.

[24] Beata Padlewska and Agata Darmochwał. Topological spaces and continuous functions. Formalized Mathematics, 1(1):223–230, 1990.

[25] Yozo Toda. The formalization of simple graphs. Formalized Mathematics, 5(1):137–144, 1996.

[26] Andrzej Trybulec. Tarski Grothendieck set theory. Formalized Mathematics, 1(1):9–11, 1990.

[27] Andrzej Trybulec. A Borsuk theorem on homotopy types. Formalized Mathematics, 2(4):535–545, 1991.

[28] Andrzej Trybulec. Many-sorted sets. Formalized Mathematics, 4(1):15–22, 1993.

[29] Andrzej Trybulec. Scott topology. Formalized Mathematics, 6(2):311–319, 1997.

[30] Wojciech A. Trybulec. Partially ordered sets. Formalized Mathematics, 1(2):313–319, 1990.

[31] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[32] Edmund Woronowicz. Relations and their basic properties. Formalized Mathematics, 1(1):73–83, 1990.

[33] Mariusz Żynel. The equational characterization of continuous lattices. Formalized Mathematics, 6(2):199–205, 1997.

[34] Mariusz Żynel and Adam Guzowski. T_{0} topological spaces. Formalized Mathematics, 5(1):75–77, 1996.

248 grzegorz bancerek and adam naumowicz

Meet Continuous Lattices Revisited^{1}

Artur Korniłowicz University of Białystok

Summary. This work is a continuation of formalization of [10]. Theorems from Chapter III, Section 2, pp. 153–156 are proved.

MML Identifier: WAYBEL30.

The articles [25], [20], [8], [9], [1], [23], [18], [24], [19], [26], [22], [6], [3], [7], [14], [4], [17], [15], [16], [2], [11], [12], [13], [21], and [5] provide the terminology and notation for this paper.

The following two propositions are true:

(1) For every set x and for every non empty set D holds x∩⋃ D = ⋃{x∩d : d ranges over elements of D}.

(2) Let R be a non empty reflexive transitive relational structure and D be a non empty directed subset of ⟨Ids(R), ⊆⟩. Then ⋃ D is an ideal of R.

Let R be a non empty reflexive transitive relational structure. Observe that ⟨Ids(R), ⊆⟩ is up-complete.

We now state two propositions:

(3) Let R be a non empty reflexive transitive relational structure and D be a non empty directed subset of ⟨Ids(R), ⊆⟩. Then supD = ⋃ D.

(4) Let R be a semilattice, D be a non empty directed subset of ⟨Ids(R), ⊆⟩, and x be an element of ⟨Ids(R), ⊆⟩. Then sup({x} ⊓ D) = ⋃{x ∩ d : d ranges over elements of D}.

Let R be a semilattice. Observe that ⟨Ids(R), ⊆⟩ satisfies MC. Let R be a non empty trivial relational structure. Note that every topological

augmentation of R is trivial.

Next we state three propositions:

1This work has been supported by KBN Grant 8 T11C 018 12.

(5) Let S be a Scott complete top-lattice, T be a complete lattice, and A be a Scott topological augmentation of T. Suppose the relational structure of S = the relational structure of T. Then the FR-structure of A = the FR-structure of S.

(6) Let N be a Lawson complete top-lattice, T be a complete lattice, and A be a Lawson correct topological augmentation of T. Suppose the relational structure of N = the relational structure of T. Then the FR-structure of A = the FR-structure of N.

(7) Let N be a Lawson complete top-lattice, S be a Scott topological augmentation of N, A be a subset of N, and J be a subset of S. If A = J and J is closed, then A is closed.

Let A be a complete lattice. Observe that λ(A) is non empty. Let S be a Scott complete top-lattice. Observe that ⟨σ(S), ⊆⟩ is complete

and non trivial.

Let N be a Lawson complete top-lattice. Observe that ⟨σ(N), ⊆⟩ is complete and non trivial and ⟨λ(N), ⊆⟩ is complete and non trivial.

The following propositions are true:

(8) Let T be a non empty reflexive relational structure. Then σ(T) ⊆ {W \ ↑F; W ranges over subsets of T, F ranges over subsets of T: W ∈ σ(T) ∧ F is finite}.

(9) For every Lawson complete top-lattice N holds λ(N) = the topology of N.

(10) For every Lawson complete top-lattice N holds σ(N) ⊆ λ(N).

(11) Let M, N be complete lattices. Suppose the relational structure of M = the relational structure of N. Then λ(M) = λ(N).

(12) For every Lawson complete top-lattice N and for every subset X of N

holds X ∈ λ(N) iff X is open. Let us note that every reflexive non empty FR-structure which is trivial and

topological space-like is also Scott.

Let us observe that every complete top-lattice which is trivial is also Lawson. Let us note that there exists a complete top-lattice which is strict, continu-

ous, lower-bounded, meet-continuous, and Scott.

One can verify that there exists a complete top-lattice which is strict, continuous, compact, Hausdorff, and Lawson.

Next we state the proposition

(13) Let N be a meet-continuous lattice and A be a subset of N. If A has the

property (S), then ↑A has the property (S). Let N be a meet-continuous lattice and let A be a property(S) subset of N.

Note that ↑A is property(S).

We now state several propositions:

(14) Let N be a meet-continuous Lawson complete top-lattice, S be a Scott topological augmentation of N, and A be a subset of N. If A ∈ λ(N), then ↑A ∈ σ(S).

(15) Let N be a meet-continuous Lawson complete top-lattice, S be a Scott topological augmentation of N, A be a subset of N, and J be a subset of S. If A = J, then if A is open, then ↑J is open.

(16) Let N be a meet-continuous Lawson complete top-lattice, S be a Scott topological augmentation of N, x be a point of S, y be a point of N, and J be a basis of y. If x = y, then {↑A; A ranges over subsets of N: A ∈ J} is a basis of x.

(17) Let N be a meet-continuous Lawson complete top-lattice, S be a Scott topological augmentation of N, X be an upper subset of N, and Y be a subset of S. If X = Y, then IntX = IntY.

(18) Let N be a meet-continuous Lawson complete top-lattice, S be a Scott topological augmentation of N, X be a lower subset of N, and Y be a subset of S. If X = Y, then \overline{X} = \overline{Y} .

(19) Let M, N be complete lattices, L_{1} be a Lawson correct topological augmentation of M, and L_{2} be a Lawson correct topological augmentation of N. Suppose ⟨σ(N), ⊆⟩ is continuous. Then the topology of [: L_{1}, (L_{2} qua topological space) :] = λ([: M, N :]).

(20) Let M, N be complete lattices, P be a Lawson correct topological augmentation of [: M, N :], Q be a Lawson correct topological augmentation of M, and R be a Lawson correct topological augmentation of N. Suppose ⟨σ(N), ⊆⟩ is continuous. Then the topological structure of P = [: Q, (R qua topological space) :].

(21) For every meet-continuous Lawson complete top-lattice N and for every

element x of N holds x ⊓ □ is continuous. Let N be a meet-continuous Lawson complete top-lattice and let x be an

element of N. Observe that x ⊓ □ is continuous.

One can prove the following propositions:

(22) For every meet-continuous Lawson complete top-lattice N such that ⟨σ(N), ⊆⟩ is continuous holds N satisfies conditions of topological semilattice.

(23) Let N be a meet-continuous Lawson complete top-lattice. Suppose ⟨σ(N), ⊆⟩ is continuous. Then N is Hausdorff if and only if for every subset X of [: N, (N qua topological space) :] such that X = the internal relation of N holds X is closed.

Let N be a non empty reflexive relational structure and let X be a subset of the carrier of N. The functor X^{0} yields a subset of N and is defined by:

(Def. 1) X^{0} = {u; u ranges over elements of N: ⋀_{D: non empty directed subset of N} (u

supD ⇒ X ∩ D ≠ ∅)}. Let N be a non empty reflexive antisymmetric relational structure and let

X be an empty subset of the carrier of N. One can check that X^{0} is empty.

One can prove the following propositions:

(24) For every non empty reflexive relational structure N and for all subsets A, J of N such that A ⊆ J holds A^{0} ⊆ J^{0}.

(25) For every non empty reflexive relational structure N and for every element x of N holds ↑x^{0} = ↑↑x.

(26) For every Scott top-lattice N and for every upper subset X of N holds IntX ⊆ X^{0}.

(27) For every non empty reflexive relational structure N and for all subsets X, Y of N holds X^{0} ∪ Y^{0} ⊆ X ∪ Y^{0}.

(28) For every meet-continuous lattice N and for all upper subsets X, Y of N holds X^{0} ∪ Y^{0} = X ∪ Y^{0}.

(29) Let S be a meet-continuous Scott top-lattice and F be a finite subset of S. Then Int↑F ⊆ ⋃{↑↑x; x ranges over elements of S: x ∈ F }.

(30) Let N be a Lawson complete top-lattice. Then N is continuous if and

only if N is meet-continuous and Hausdorff. Let us note that every complete top-lattice which is continuous and Lawson is

also Hausdorff and every complete top-lattice which is meet-continuous, Lawson, and Hausdorff is also continuous.

Let N be a non empty FR-structure. We say that N has small semilattices if and only if the condition (Def. 2) is satisfied.

(Def. 2) Let x be a point of N. Then there exists a generalized basis J of x such

that for every subset A of N if A ∈ J, then sub(A) is meet-inheriting. We say that N has compact semilattices if and only if the condition (Def. 3) is satisfied.

(Def. 3) Let x be a point of N. Then there exists a generalized basis J of x such that for every subset A of N if A ∈ J, then sub(A) is meet-inheriting and A is compact.

We say that N has open semilattices if and only if the condition (Def. 4) is satisfied.

(Def. 4) Let x be a point of N. Then there exists a basis J of x such that for

every subset A of N if A ∈ J, then sub(A) is meet-inheriting. One can verify the following observations:

∗ every non empty topological space-like FR-structure which has open semilattices has also small semilattices,

∗ every non empty topological space-like FR-structure which has compact semilattices has also small semilattices, ∗ every non empty FR-structure which is anti-discrete has small semilattices and open semilattices, and

∗ every non empty FR-structure which is reflexive, trivial, and topological space-like has compact semilattices.

Let us mention that there exists a top-lattice which is strict, trivial, and lower.

We now state several propositions:

(31) Let N be top-poset with g.l.b.’s satisfying conditions of topological semilattice and C be a subset of N. If sub(C) is meet-inheriting, then sub(\overline{C}) is meet-inheriting.

(32) Let N be a meet-continuous Lawson complete top-lattice and S be a Scott topological augmentation of N. Then for every point x of S there exists a basis J of x such that for every subset W of S such that W ∈ J holds W is a filter of S if and only if N has open semilattices.

(33) Let N be a Lawson complete top-lattice, S be a Scott topological augmentation of N, and x be an element of N. Then {inf A; A ranges over subsets of S: x ∈ A ∧ A ∈ σ(S)} ⊆ {inf J; J ranges over subsets of N: x ∈ J ∧ J ∈ λ(N)}.

(34) Let N be a meet-continuous Lawson complete top-lattice, S be a Scott topological augmentation of N, and x be an element of N. Then {inf A; A ranges over subsets of S: x ∈ A ∧ A ∈ σ(S)} = {inf J; J ranges over subsets of N: x ∈ J ∧ J ∈ λ(N)}.

(35) Let N be a meet-continuous Lawson complete top-lattice. Then N is continuous if and only if N has open semilattices and ⟨σ(N), ⊆⟩ is continuous.

One can check that every Lawson complete top-lattice which is continuous has open semilattices.

Let N be a continuous Lawson complete top-lattice. One can check that ⟨σ(N), ⊆⟩ is continuous.

We now state several propositions:

(36) Every continuous Lawson complete top-lattice is compact and Hausdorff and has open semilattices and satisfies conditions of topological semilattice.

(37) Every Hausdorff Lawson complete top-lattice with open semilattices satisfying conditions of topological semilattice has compact semilattices.

(38) Let N be a meet-continuous Hausdorff Lawson complete top-lattice and x be an element of N. Then x = ⨆_{N}{inf V; V ranges over subsets of N: x ∈ V ∧ V ∈ λ(N)}.

(39) Let N be a meet-continuous Lawson complete top-lattice. Then N is continuous if and only if for every element x of N holds x = ⨆_{N}{inf V; V 254 artur korniłowicz

ranges over subsets of N: x ∈ V ∧ V ∈ λ(N)}.

(40) Let N be a meet-continuous Lawson complete top-lattice. Then N is algebraic if and only if N has open semilattices and ⟨σ(N), ⊆⟩ is algebraic.

Let N be a meet-continuous algebraic Lawson complete top-lattice. Note that ⟨σ(N), ⊆⟩ is algebraic.

References

[1] Grzegorz Bancerek. Complete lattices. Formalized Mathematics, 2(5):719–725, 1991.

[2] Grzegorz Bancerek. Bounds in posets and relational substructures. Formalized Mathematics, 6(1):81–91, 1997.

[3] Grzegorz Bancerek. Directed sets, nets, ideals, filters, and maps. Formalized Mathematics, 6(1):93–107, 1997.

[4] Grzegorz Bancerek. The “way-below” relation. Formalized Mathematics, 6(1):169–176, 1997.

[5] Grzegorz Bancerek. Bases and refinements of topologies. Formalized Mathematics, 7(1):35–43, 1998.

[6] Grzegorz Bancerek. The Lawson topology. Formalized Mathematics, 7(2):163–168, 1998.

[7] Czesław Byliński. Galois connections. Formalized Mathematics, 6(1):131–143, 1997.

[8] Agata Darmochwał. Compact spaces. Formalized Mathematics, 1(2):383–386, 1990.

[9] Agata Darmochwał. Finite sets. Formalized Mathematics, 1(1):165–167, 1990.

[10] G. Gierz, K.H. Hofmann, K. Keimel, J.D. Lawson, M. Mislove, and D.S. Scott. A Compendium of Continuous Lattices. Springer-Verlag, Berlin, Heidelberg, New York, 1980.

[11] Adam Grabowski and Robert Milewski. Boolean posets, posets under inclusion and products of relational structures. Formalized Mathematics, 6(1):117–121, 1997.

[12] Artur Korniłowicz. Cartesian products of relations and relational structures. Formalized Mathematics, 6(1):145–152, 1997.

[13] Artur Korniłowicz. Definitions and properties of the join and meet of subsets. Formalized Mathematics, 6(1):153–158, 1997.

[14] Artur Korniłowicz. Meet–continuous lattices. Formalized Mathematics, 6(1):159–167, 1997.

[15] Artur Korniłowicz. On the topological properties of meet-continuous lattices. Formalized Mathematics, 6(2):269–277, 1997.

[16] Artur Korniłowicz. Introduction to meet-continuous topological lattices. Formalized Mathematics, 7(2):279–283, 1998.

[17] Robert Milewski. Algebraic lattices. Formalized Mathematics, 6(2):249–254, 1997.

[18] Beata Padlewska and Agata Darmochwał. Topological spaces and continuous functions. Formalized Mathematics, 1(1):223–230, 1990.

[19] Andrzej Trybulec. Tarski Grothendieck set theory. Formalized Mathematics, 1(1):9–11, 1990.

[20] Andrzej Trybulec. A Borsuk theorem on homotopy types. Formalized Mathematics, 2(4):535–545, 1991.

[21] Andrzej Trybulec. Baire spaces, Sober spaces. Formalized Mathematics, 6(2):289–294, 1997.

[22] Andrzej Trybulec. Scott topology. Formalized Mathematics, 6(2):311–319, 1997.

[23] Wojciech A. Trybulec. Partially ordered sets. Formalized Mathematics, 1(2):313–319, 1990.

[24] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[25] Zinaida Trybulec and Halina Święczkowska. Boolean properties of sets. Formalized Mathematics, 1(1):17–23, 1990.

[26] Mirosław Wysocki and Agata Darmochwał. Subsets of topological spaces. Formalized Mathematics, 1(1):231–237, 1990.

Weights of Continuous Lattices^{1}

Robert Milewski University of Białystok

Summary. This work is a continuation of formalization of [13]. Theorems from Chapter III, Section 4, pp. 170–171 are proved.

MML Identifier: WAYBEL31.

The papers [25], [20], [1], [9], [12], [10], [22], [3], [15], [2], [23], [19], [26], [24], [27], [21], [8], [18], [5], [11], [6], [17], [16], [4], [14], and [7] provide the terminology and notation for this paper.

In this article we present several logical schemes. The scheme UparrowUnion deals with a relational structure A and a unary predicate P, and states that:

Let S be a family of subsets of the carrier of A. If S = {X; X ranges over subsets of A : P[X]}, then ↑⋃ S = ⋃{↑X; X ranges over subsets of A : P[X]}

for all values of the parameters.

The scheme DownarrowUnion deals with a relational structure A and a unary predicate P, and states that:

Let S be a family of subsets of the carrier of A. If S = {X; X ranges over subsets of A : P[X]}, then ↓⋃ S = ⋃{↓X; X ranges over subsets of A : P[X]}

for all values of the parameters.

Let L_{1} be a lower-bounded continuous sup-semilattice and let B_{1} be a CLbasis of L_{1} with bottom. One can verify that ⟨Ids(sub(B_{1})), ⊆⟩ is algebraic.

Let L_{1} be a continuous sup-semilattice. The functor CLweightL_{1} yields a cardinal number and is defined as follows:

(Def. 1) CLweightL_{1} = ⋂\{\overline{\overline{B_{1}}} : B_{1} ranges over CLbasis of L_{1} with bottom\}. We now state a number of propositions:

1This work has been supported by KBN Grant 8 T11C 018 12.

(1) For every topological structure T and for every basis b of T holds weightT ⊆ \overline{\overline{b}}.

(2) For every topological structure T there exists a basis b of T such that \overline{\overline{b}} = weightT.

(3) For every continuous sup-semilattice L_{1} and for every CLbasis B_{1} of L_{1} with bottom holds CLweightL_{1} ⊆ \overline{\overline{B_{1}}} .

(4) For every continuous sup-semilattice L_{1} there exists a CLbasis B_{1} of L_{1} with bottom such that \overline{\overline{B_{1}}} = CLweightL_{1}.

(5) For every algebraic lower-bounded lattice L_{1} holds CLweightL_{1} = \overline{\overline{the carrier of CompactSublatt(L_{1})}}.

(6) Let T be a non empty topological space and L_{1} be a continuous supsemilattice. If ⟨the topology of T, ⊆⟩ = L_{1}, then every CLbasis of L_{1} with bottom is a basis of T.

(7) Let T be a non empty topological space and L_{1} be a continuous lowerbounded lattice. Suppose ⟨the topology of T, ⊆⟩ = L_{1}. Let B_{1} be a basis of T and B_{2} be a subset of L_{1}. If B_{1} = B_{2}, then finsups(B_{2}) is a CLbasis of L_{1} with bottom.

(8) Let T be a T_{0} non empty topological space and L_{1} be a continuous lower-bounded sup-semilattice. If ⟨the topology of T, ⊆⟩ = L_{1}, then if T is infinite, then weightT = CLweightL_{1}.

(9) Let T be a T_{0} non empty topological space and L_{1} be a continuous supsemilattice. Suppose ⟨the topology of T, ⊆⟩ = L_{1}. Then \overline{\overline{the carrier of T}} ⊆ \overline{\overline{the carrier of L_{1}}} .

(10) For every T_{0} non empty topological space T such that T is finite holds weightT = \overline{\overline{the carrier of T}} .

(11) Let T be a topological structure and L_{1} be a continuous lower-bounded lattice. Suppose ⟨the topology of T, ⊆⟩ = L_{1} and T is finite. Then CLweightL_{1} = \overline{\overline{the carrier of L_{1}}} .

(12) Let L_{1} be a continuous lower-bounded sup-semilattice, T_{1} be a Scott topological augmentation of L_{1}, T_{2} be a Lawson correct topological augmentation of L_{1}, and B_{2} be a basis of T_{2}. Then {↑V; V ranges over subsets of T_{2}: V ∈ B_{2}} is a basis of T_{1}.

(13) For all finite sets X, Y such that X ⊆ Y and \overline{\overline{X}} = \overline{\overline{Y}} holds X = Y.

(14) For every up-complete non empty poset L_{1} such that L_{1} is finite and for every element x of L_{1} holds x ∈ compactbelow(x).

(15) Every finite lattice is arithmetic.

One can check that every lattice which is finite is also arithmetic. One can verify that there exists a relational structure which is trivial, reflexive, transitive, antisymmetric, lower-bounded, non empty, finite, and strict and has l.u.b.’s and g.l.b.’s.

One can prove the following proposition

(16) Let L_{1} be a finite lattice and B_{1} be a CLbasis of L_{1} with bottom. Then

\overline{\overline{B_{1}}} = CLweightL_{1} if and only if B_{1} = the carrier of CompactSublatt(L_{1}). Let L_{1} be a non empty reflexive relational structure, let A be a subset of the

carrier of L_{1}, and let a be an element of L_{1}. The functor Way Up(a, A) yields a subset of L_{1} and is defined as follows:

(Def. 2) Way Up(a, A) = ↑↑a \ ↑A.

Next we state a number of propositions:

(17) For every non empty reflexive relational structure L_{1} and for every element a of L_{1} holds Way Up(a, ∅_{(L_{1})}) = ↑↑a.

(18) For every non empty poset L_{1} and for every subset A of L_{1} and for every element a of L_{1} such that a ∈ ↑A holds Way Up(a, A) = ∅.

(19) For every non empty finite reflexive transitive relational structure L_{1} holds Ids(L_{1}) is finite.

(20) For every continuous lower-bounded sup-semilattice L_{1} such that L_{1} is infinite holds every CLbasis of L_{1} with bottom is infinite.

(21) For every set d and for every finite sequence p and for every natural number i such that i ∈ domp holds (⟨d⟩^{⌢} p)(i + 1) = p(i).

(22) For every finite sequence p and for every set x holds (⟨x⟩^{⌢} p)_{↾1} = p.

(23) For every complete non empty poset L_{1} and for every element x of L_{1} such that x is compact holds x = inf ↑↑x.

(24) Let L_{1} be a continuous lower-bounded sup-semilattice. Suppose L_{1} is infinite. Let B_{1} be a CLbasis of L_{1} with bottom. Then {Way Up(a, A); a ranges over elements of L_{1}, A ranges over finite subsets \overline{\overline{of L_{1}: a ∈ B_{1} ∧ A ⊆ B_{1}\}}} ⊆ \overline{\overline{B_{1}}} .

(25) For every Lawson complete top-lattice T and for every finite subset X of T holds − ↑X is open and − ↓X is open.

(26) Let L_{1} be a continuous lower-bounded sup-semilattice, T be a Lawson correct topological augmentation of L_{1}, and B_{1} be a CLbasis of L_{1} with bottom. Then {Way Up(a, A); a ranges over elements of L_{1}, A ranges over finite subsets of L_{1}: a ∈ B_{1} ∧ A ⊆ B_{1}} is a basis of T.

(27) Let L_{1} be a continuous lower-bounded sup-semilattice, T be a Scott topological augmentation of L_{1}, and b be a basis of T. Then {↑↑inf u; u ranges over subsets of T: u ∈ b} is a basis of T.

(28) Let L_{1} be a continuous lower-bounded sup-semilattice, T be a Scott topological augmentation of L_{1}, and B_{1} be a basis of T. If B_{1} is infinite, then {inf u; u ranges over subsets of T: u ∈ B_{1}} is infinite.

258 robert milewski

(29) Let L_{1} be a continuous lower-bounded sup-semilattice and T be a Scott topological augmentation of L_{1}. Then CLweightL_{1} = weightT.

(30) Let L_{1} be a continuous lower-bounded sup-semilattice and T be a Lawson correct topological augmentation of L_{1}. Then CLweightL_{1} = weightT.

(31) Let L_{1}, L_{2} be non empty relational structures. Suppose L_{1} and L_{2} are isomorphic. Then \overline{\overline{the carrier of L_{1}}} = \overline{\overline{the carrier of L_{2}}} .

(32) Let L_{1} be a continuous lower-bounded sup-semilattice and B_{1} be a CLbasis of L_{1} with bottom. If \overline{\overline{B_{1}}} = CLweightL_{1}, then CLweightL_{1} = CLweight⟨Ids(sub(B_{1})), ⊆⟩.

Let L_{1} be a continuous lower-bounded sup-semilattice. Note that ⟨σ(L_{1}), ⊆⟩ is continuous and has l.u.b.’s.

Next we state two propositions:

(33) For every continuous lower-bounded sup-semilattice L_{1} holds CLweightL_{1} ⊆ CLweight⟨σ(L_{1}), ⊆⟩.

(34) For every continuous lower-bounded sup-semilattice L_{1} such that L_{1} is infinite holds CLweightL_{1} = CLweight⟨σ(L_{1}), ⊆⟩.

References

[1] Grzegorz Bancerek. Cardinal numbers. Formalized Mathematics, 1(2):377–382, 1990.

[2] Grzegorz Bancerek. The fundamental properties of natural numbers. Formalized Mathematics, 1(1):41–46, 1990.

[3] Grzegorz Bancerek. Complete lattices. Formalized Mathematics, 2(5):719–725, 1991.

[4] Grzegorz Bancerek. Bounds in posets and relational substructures. Formalized Mathematics, 6(1):81–91, 1997.

[5] Grzegorz Bancerek. Directed sets, nets, ideals, filters, and maps. Formalized Mathematics, 6(1):93–107, 1997.

[6] Grzegorz Bancerek. The “way-below” relation. Formalized Mathematics, 6(1):169–176, 1997.

[7] Grzegorz Bancerek. Bases and refinements of topologies. Formalized Mathematics, 7(1):35–43, 1998.

[8] Grzegorz Bancerek. The Lawson topology. Formalized Mathematics, 7(2):163–168, 1998.

[9] Grzegorz Bancerek and Krzysztof Hryniewiecki. Segments of natural numbers and finite sequences. Formalized Mathematics, 1(1):107–114, 1990.

[10] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[11] Czesław Byliński. Galois connections. Formalized Mathematics, 6(1):131–143, 1997.

[12] Agata Darmochwał. Finite sets. Formalized Mathematics, 1(1):165–167, 1990.

[13] G. Gierz, K.H. Hofmann, K. Keimel, J.D. Lawson, M. Mislove, and D.S. Scott. A Compendium of Continuous Lattices. Springer-Verlag, Berlin, Heidelberg, New York, 1980.

[14] Adam Grabowski and Robert Milewski. Boolean posets, posets under inclusion and products of relational structures. Formalized Mathematics, 6(1):117–121, 1997.

[15] Katarzyna Jankowska. Transpose matrices and groups of permutations. Formalized Mathematics, 2(5):711–717, 1991.

[16] Artur Korniłowicz. On the topological properties of meet-continuous lattices. Formalized Mathematics, 6(2):269–277, 1997.

[17] Robert Milewski. Algebraic lattices. Formalized Mathematics, 6(2):249–254, 1997.

[18] Robert Milewski. Bases of continuous lattices. Formalized Mathematics, 7(2):285–294, 1998.

[19] Beata Padlewska and Agata Darmochwał. Topological spaces and continuous functions. Formalized Mathematics, 1(1):223–230, 1990.

weights of continuous lattices 259

[20] Alexander Yu. Shibakov and Andrzej Trybulec. The Cantor set. Formalized Mathematics, 5(2):233–236, 1996.

[21] Andrzej Trybulec. Scott topology. Formalized Mathematics, 6(2):311–319, 1997.

[22] Wojciech A. Trybulec. Groups. Formalized Mathematics, 1(5):821–827, 1990.

[23] Wojciech A. Trybulec. Partially ordered sets. Formalized Mathematics, 1(2):313–319, 1990.

[24] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[25] Zinaida Trybulec and Halina Święczkowska. Boolean properties of sets. Formalized Mathematics, 1(1):17–23, 1990.

[26] Edmund Woronowicz. Relations and their basic properties. Formalized Mathematics, 1(1):73–83, 1990.

[27] Mariusz Żynel and Adam Guzowski. T_{0} topological spaces. Formalized Mathematics, 5(1):75–77, 1996.

260 robert milewski

Representation Theorem for Finite Distributive Lattices

Marek Dudzicz University of Białystok

Summary. In the article the representation theorem for finite distributive lattice as rings of sets is presented. Auxiliary concepts are introduced. Namely, the concept of the height of an element, the maximal element in a chain, immediate predecessor of an element and ring of sets. Besides the schemes of induction in finite lattice is proved.

MML Identifier: LATTICE7.

The notation and terminology used here are introduced in the following papers: [7], [1], [8], [6], [9], [3], [4], [2], and [5].

1. Induction in a Finite Lattice

Let L be a 1-sorted structure and let A, B be subsets of L. Let us observe that A ⊆ B if and only if:

(Def. 1) For every element x of L such that x ∈ A holds x ∈ B.

Let L be a lattice. Note that there exists a chain of L which is non empty. Let L be a lattice and let x, y be elements of L. Let us assume that x y.

A non empty chain of L is called a chain of x, y if: (Def. 2) x ∈ it and y ∈ it and for every element z of L such that z ∈ it holds

x z and z y. The following proposition is true

(1) For every lattice L and for all elements x, y of L such that x y holds {x, y} is a chain of x, y.

Let L be a finite lattice and let x be an element of L. The functor heightx yields a natural number and is defined as follows:

(Def. 3) There exists a chain A of ⊥_{L}, x such that heightx = cardA and for

every chain A of ⊥_{L}, x holds cardA heightx. Next we state several propositions:

(2) For every finite lattice L and for all elements a, b of L such that a < b holds heighta < heightb.

(3) Let L be a finite lattice, C be a chain of L, and x, y be elements of L. If x ∈ C and y ∈ C, then x < y iff heightx < heighty.

(4) Let L be a finite lattice, C be a chain of L, and x, y be elements of L. If x ∈ C and y ∈ C, then x = y iff heightx = heighty.

(5) Let L be a finite lattice, C be a chain of L, and x, y be elements of L. If x ∈ C and y ∈ C, then x y iff heightx heighty.

(6) For every finite lattice L and for every element x of L holds heightx = 1 iff x = ⊥_{L}.

(7) For every non empty finite lattice L and for every element x of L holds heightx 1.

The scheme LattInd deals with a finite lattice A and a unary predicate P, and states that:

For every element x of A holds P[x] provided the following requirement is met:

• For every element x of A such that for every element b of A such that b < x holds P[b] holds P[x].

2. Join Irreducible Elements in a Finite Distributive Lattice

Let us mention that there exists a lattice which is distributive and finite. Let L be a lattice and let x, y be elements of L. The predicate x <_{1} y is

defined as follows: (Def. 4) x < y and it is not true that there exists an element z of L such that

x < z and z < y. One can prove the following proposition

(8) Let L be a finite lattice and X be a non empty subset of L. Then there exists an element x of L such that x ∈ X and for every element y of L such that y ∈ X holds x ≮ y.

Let L be a finite lattice and let A be a non empty chain of L. The functor maxA yielding an element of L is defined by:

(Def. 5) For every element x of L such that x ∈ A holds x maxA and maxA ∈ A.

The following proposition is true

(9) For every finite lattice L and for every element y of L such that y ≠ ⊥_{L} there exists an element x of L such that x <_{1} y.

Let L be a lattice. The functor Join-IRRL yielding a subset of L is defined by:

(Def. 6) Join-IRRL = {a; a ranges over elements of L: a ≠ ⊥_{L} ∧

⋀_{b,c: element of L} (a = b ⊔ c ⇒ a = b ∨ a = c)}. One can prove the following three propositions:

(10) Let L be a lattice and x be an element of L. Then x ∈ Join-IRRL if and

only if the following conditions are satisfied:

(i) x ≠ ⊥_{L}, and (ii) for all elements b, c of L such that x = b ⊔ c holds x = b or x = c.

(11) Let L be a finite distributive lattice and x be an element of L. Suppose x ∈ Join-IRRL. Then there exists an element z of L such that z < x and for every element y of L such that y < x holds y z.

(12) For every distributive finite lattice L and for every element x of L holds sup(↓x ∩ Join-IRRL) = x.

3. Representation Theorem

Let P be a relational structure. The functor LOWERP yields a non empty set and is defined as follows:

(Def. 7) LOWERP = {X; X ranges over subsets of P: X is lower}.

The following two propositions are true:

(13) Let L be a distributive finite lattice. Then there exists a map r from L into ⟨LOWERsub(Join-IRRL), ⊆⟩ such that r is isomorphic and for every element a of L holds r(a) = ↓a ∩ Join-IRRL.

(14) For every distributive finite lattice L holds L and ⟨LOWERsub(Join-IRRL),

⊆⟩ are isomorphic. Ring of sets is defined by:

(Def. 8) It includes lattice of it.

Let us note that there exists a ring of sets which is non empty. Let X be a non empty ring of sets. One can verify that ⟨X, ⊆⟩ is distributive

and has l.u.b.’s and g.l.b.’s.

One can prove the following propositions:

(15) For every finite lattice L holds LOWERsub(Join-IRRL) is a ring of sets.

(16) Let L be a finite lattice. Then L is distributive if and only if there exists a non empty ring of sets X such that L and ⟨X, ⊆⟩ are isomorphic.

264 marek dudzicz

References

[1] Grzegorz Bancerek. Complete lattices. Formalized Mathematics, 2(5):719–725, 1991.

[2] Grzegorz Bancerek. Bounds in posets and relational substructures. Formalized Mathematics, 6(1):81–91, 1997.

[3] Grzegorz Bancerek. Directed sets, nets, ideals, filters, and maps. Formalized Mathematics, 6(1):93–107, 1997.

[4] Czesław Byliński. Galois connections. Formalized Mathematics, 6(1):131–143, 1997.

[5] Adam Grabowski and Robert Milewski. Boolean posets, posets under inclusion and products of relational structures. Formalized Mathematics, 6(1):117–121, 1997.

[6] Beata Padlewska and Agata Darmochwał. Topological spaces and continuous functions. Formalized Mathematics, 1(1):223–230, 1990.

[7] Wojciech A. Trybulec. Groups. Formalized Mathematics, 1(5):821–827, 1990.

[8] Wojciech A. Trybulec. Partially ordered sets. Formalized Mathematics, 1(2):313–319, 1990.

[9] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

The Field of Complex Numbers

Anna Justyna Milewska University of Białystok

Summary. This article contains the definition and many facts about the field of complex numbers.

MML Identifier: COMPLFLD.

The articles [4], [1], [2], [5], [6], and [3] provide the terminology and notation for this paper.

The following propositions are true:

(1) 1_{ℂ} ≠ 0_{ℂ}.

(2) For all elements x_{1}, y_{1}, x_{2}, y_{2} of ℝ holds (x_{1} + y_{1}i) + (x_{2} + y_{2}i) = (x_{1} + x_{2}) + (y_{1} + y_{2})i.

The strict double loop structure ℂ_{F} is defined by the conditions (Def. 1). (Def. 1)(i) The carrier of ℂ_{F} = ℂ,

(ii) the addition of ℂ_{F} = +_{ℂ}, (iii) the multiplication of ℂ_{F} = ·_{ℂ}, (iv) the unity of ℂ_{F} = 1_{ℂ}, and

(v) the zero of ℂ_{F} = 0_{ℂ}. Let us observe that ℂ_{F} is non empty. Let us observe that ℂ_{F} is add-associative right zeroed right complementable

Abelian commutative associative left unital right unital distributive field-like and non degenerated.

We now state several propositions:

(3) For all elements x_{1}, y_{1} of the carrier of ℂ_{F} and for all elements x_{2}, y_{2} of ℂ such that x_{1} = x_{2} and y_{1} = y_{2} holds x_{1} + y_{1} = x_{2} + y_{2}.

(4) For every element x_{1} of the carrier of ℂ_{F} and for every element x_{2} of ℂ such that x_{1} = x_{2} holds − x_{1} = − x_{2}.

(5) For all elements x_{1}, y_{1} of the carrier of ℂ_{F} and for all elements x_{2}, y_{2} of ℂ such that x_{1} = x_{2} and y_{1} = y_{2} holds x_{1} − y_{1} = x_{2} − y_{2}.

(6) For all elements x_{1}, y_{1} of the carrier of ℂ_{F} and for all elements x_{2}, y_{2} of ℂ such that x_{1} = x_{2} and y_{1} = y_{2} holds x_{1} · y_{1} = x_{2} · y_{2}.

(7) For every element x_{1} of the carrier of ℂ_{F} and for every element x_{2} of ℂ such that x_{1} = x_{2} and x_{1} ≠ 0_{ℂ_{F}} holds x_{1}^{−1} = x_{2}^{−1} .

(8) Let x_{1}, y_{1} be elements of the carrier of ℂ_{F} and x_{2}, y_{2} be elements of ℂ. If x_{1} = x_{2} and y_{1} = y_{2} and y_{1} ≠ 0_{ℂ_{F}}, then \frac{x_{1}}{y_{1}} = \frac{x_{2}}{y_{2}} .

(9) 0_{ℂ_{F}} = 0_{ℂ}.

(10) 1_{ℂ_{F}} = 1_{ℂ}.

(11) 1_{ℂ_{F}} + 1_{ℂ_{F}} ≠ 0_{ℂ_{F}}.

Let z be an element of the carrier of ℂ_{F}. The functor z^{∗} yielding an element of ℂ_{F} is defined by:

(Def. 2) There exists an element z′ of ℂ such that z = z′ and z^{∗} = z^{′∗}.

Let z be an element of the carrier of ℂ_{F}. The functor |z| yielding an element of ℝ is defined by:

(Def. 3) There exists an element z′ of ℂ such that z = z′ and |z| = |z′|.

We now state the proposition

(12) For every element x_{1} of the carrier of ℂ_{F} and for every element x_{2} of ℂ

such that x_{1} = x_{2} holds x_{1}^{∗} = x_{2}^{∗}. In the sequel z, z_{1}, z_{2}, z_{3}, z_{4} denote elements of the carrier of ℂ_{F}. One can prove the following propositions:

(13) z_{1} + (z_{2} + z_{3}) = (z_{1} + z_{2}) + z_{3}.

(14) (The zero of ℂ_{F}) + z = z and z + the zero of ℂ_{F} = z.

(15) z_{1} · (z_{2} · z_{3}) = (z_{1} · z_{2}) · z_{3}.

(16) z · (z_{1} + z_{2}) = z · z_{1} + z · z_{2} and (z_{1} + z_{2}) · z = z_{1} · z + z_{2} · z.

(17) (The zero of ℂ_{F}) · z = the zero of ℂ_{F} and z · the zero of ℂ_{F} = the zero of ℂ_{F}.

(18) (The unity of ℂ_{F}) · z = z and z · the unity of ℂ_{F} = z.

(19) − the zero of ℂ_{F} = the zero of ℂ_{F}.

(20) If − z = the zero of ℂ_{F}, then z = the zero of ℂ_{F}.

(21) z + − z = the zero of ℂ_{F} and − z + z = the zero of ℂ_{F}.

(22) If z_{1} + z_{2} = the zero of ℂ_{F}, then z_{2} = − z_{1} and z_{1} = − z_{2}.

(23) − − z = z.

(24) If − z_{1} = − z_{2}, then z_{1} = z_{2}.

(25) If z_{1} + z = z_{2} + z or z_{1} + z = z + z_{2}, then z_{1} = z_{2}.

(26) − (z_{1} + z_{2}) = − z_{1} + − z_{2}.

(27) (− z_{1}) · z_{2} = − z_{1} · z_{2}and z_{1} · − z_{2} = − z_{1} · z_{2}.

(28) (− z_{1}) · − z_{2} = z_{1} · z_{2}.

(29) − z = (− the unity of ℂ_{F}) · z.

(30) z_{1} − z_{2} = z_{1} + − z_{2}.

(31) If z_{1} − z_{2} = the zero of ℂ_{F}, then z_{1} = z_{2}.

(32) z − z = the zero of ℂ_{F}.

(33) z − the zero of ℂ_{F} = z.

(34) (The zero of ℂ_{F}) − z = − z.

(35) z_{1} − − z_{2} = z_{1} + z_{2}.

(36) − (z_{1} − z_{2}) = − z_{1} + z_{2}.

(37) − (z_{1} − z_{2}) = z_{2} − z_{1}.

(38) z_{1} + (z_{2} − z_{3}) = (z_{1} + z_{2}) − z_{3}.

(39) z_{1} − (z_{2} − z_{3}) = (z_{1} − z_{2}) + z_{3}.

(40) z_{1} − z_{2} − z_{3} = z_{1} − (z_{2} + z_{3}).

(41) z_{1} = (z_{1} + z) − z.

(42) z_{1} = (z_{1} − z) + z.

(43) z · (z_{1} − z_{2}) = z · z_{1} − z · z_{2} and (z_{1} − z_{2}) · z = z_{1} · z − z_{2} · z.

(44) If z ≠ the zero of ℂ_{F}, then z · z^{−1} = the unity of ℂ_{F} and z^{−1} · z = the unity of ℂ_{F}.

(45) If z_{1} · z_{2} = the zero of ℂ_{F}, then z_{1} = the zero of ℂ_{F} or z_{2} = the zero of ℂ_{F}.

(46) If z ≠ the zero of ℂ_{F}, then z^{−1} ≠ the zero of ℂ_{F}.

(47) If z_{1} ≠ the zero of ℂ_{F} and z_{2} ≠ the zero of ℂ_{F} and z_{1}^{−1} = z_{2}^{−1} , then z_{1} = z_{2}.

(48) If z_{2} ≠ the zero of ℂ_{F} and if z_{1} · z_{2} = the unity of ℂ_{F} or z_{2} · z_{1} = the unity of ℂ_{F}, then z_{1} = z_{2}^{−1} .

(49) If z_{2} ≠ the zero of ℂ_{F} and if z_{1} ·z_{2} = z_{3} or z_{2} ·z_{1} = z_{3}, then z_{1} = z_{3} ·z_{2}^{−1} and z_{1} = z_{2}^{−1} · z_{3}.

(50) (The unity of ℂ_{F})^{−1} = the unity of ℂ_{F}.

(51) If z_{1} ≠ the zero of ℂ_{F} and z_{2} ≠ the zero of ℂ_{F}, then (z_{1} · z_{2})^{−1} = z_{1}^{−1} · z_{2}^{−1} .

(52) If z ≠ the zero of ℂ_{F}, then (z^{−1} )^{−1} = z.

(53) If z ≠ the zero of ℂ_{F}, then (− z)^{−1} = − z^{−1} .

(54) If z ≠ the zero of ℂ_{F} and if z_{1} · z = z_{2} · z or z_{1} · z = z · z_{2}, then z_{1} = z_{2}.

(55) If z_{1} ≠ the zero of ℂ_{F} and z_{2} ≠ the zero of ℂ_{F}, then z_{1}^{−1} + z_{2}^{−1} = (z_{1} + z_{2}) · (z_{1} · z_{2})^{−1} .

(56) If z_{1} ≠ the zero of ℂ_{F} and z_{2} ≠ the zero of ℂ_{F}, then z_{1}^{−1} − z_{2}^{−1} = (z_{2} − z_{1}) · (z_{1} · z_{2})^{−1} .

(57) If z_{2} ≠ the zero of ℂ_{F}, then \frac{z_{1}}{z_{2}} = z_{1} · z_{2}^{−1} .

(58) If z ≠ the zero of ℂ_{F}, then z^{−1} = \frac{the unity of ℂ_{F}}{z} .

(59) \frac{z}{the unity of ℂ_{F}} = z.

(60) If z ≠ the zero of ℂ_{F}, then \frac{z}{z} = the unity of ℂ_{F}.

(61) If z ≠ the zero of ℂ_{F}, then \frac{the zero of ℂ_{F}}{z} = the zero of ℂ_{F}.

(62) If z_{2} ≠ the zero of ℂ_{F} and \frac{z_{1}}{z_{2}} = the zero of ℂ_{F}, then z_{1} = the zero of ℂ_{F}.

(63) If z_{2} ≠ the zero of ℂ_{F} and z_{4} ≠ the zero of ℂ_{F}, then \frac{z_{1}}{z_{2}} · \frac{z_{3}}{z_{4}} = \frac{z_{1}·z_{3}}{z_{2}·z_{4}}.

(64) If z_{2} ≠ the zero of ℂ_{F}, then z · \frac{z_{1}}{z_{2}} = \frac{z·z_{1}}{z_{2}}.

(65) If z_{2} ≠ the zero of ℂ_{F} and \frac{z_{1}}{z_{2}} = the unity of ℂ_{F}, then z_{1} = z_{2}.

(66) If z ≠ the zero of ℂ_{F}, then z_{1} = \frac{z_{1}·z}{z}.

(67) If z_{1} ≠ the zero of ℂ_{F} and z_{2} ≠ the zero of ℂ_{F}, then (\frac{z_{1}}{z_{2}} )^{−1} = \frac{z_{2}}{z_{1}} .

(68) If z_{1} ≠ the zero of ℂ_{F} and z_{2} ≠ the zero of ℂ_{F}, then \begin{matrix}z_{1} & ^{−1} \\ z_{2} & ^{−1} \end{matrix} = \frac{z_{2}}{z_{1}} .

(69) If z_{2} ≠ the zero of ℂ_{F}, then \frac{z_{1}}{z_{2}^{−1}} = z_{1} · z_{2}.

(70) If z_{1} ≠ the zero of ℂ_{F} and z_{2} ≠ the zero of ℂ_{F}, then \frac{z_{1}^{−1}}{z_{2}} = (z_{1} · z_{2})^{−1} .

(71) If z_{1} ≠ the zero of ℂ_{F} and z_{2} ≠ the zero of ℂ_{F}, then z_{1}^{−1} · \frac{z}{z_{2}} = \frac{z}{z_{1}·z_{2}}.

(72) If z ≠ the zero of ℂ_{F} and z_{2} ≠ the zero of ℂ_{F}, then \frac{z_{1}}{z_{2}} = \frac{z_{1}·z}{z_{2}·z} and \frac{z_{1}}{z_{2}} = \frac{z·z_{1}}{z·z_{2}}.

(73) If z_{2} ≠ the zero of ℂ_{F} and z_{3} ≠ the zero of ℂ_{F}, then \frac{z_{1}}{z_{2}·z_{3}} = ^{\frac{\frac{z_{1}}{z_{2}}}{z_{3}}} .

(74) If z_{2} ≠ the zero of ℂ_{F} and z_{3} ≠ the zero of ℂ_{F}, then \frac{z_{1}·z_{3}}{z_{2}} = _{\frac{z_{1}}{\frac{z_{2}}{z_{3}}}} .

(75) If z_{2} ≠ the zero of ℂ_{F} and z_{3} ≠ the zero of ℂ_{F} and z_{4} ≠ the zero of ℂ_{F}, then \frac{\frac{z_{1}}{z_{2}}}{\frac{z_{3}}{z_{4}}} = \frac{z_{1}·z_{4}}{z_{2}·z_{3}}.

(76) If z_{2} ≠ the zero of ℂ_{F} and z_{4} ≠ the zero of ℂ_{F}, then \frac{z_{1}}{z_{2}} + \frac{z_{3}}{z_{4}} = \frac{z_{1}·z_{4}+z_{3}·z_{2}}{z_{2}·z_{4}}.

(77) If z ≠ the zero of ℂ_{F}, then \frac{z_{1}}{z} + \frac{z_{2}}{z} = \frac{z_{1}+z_{2}}{z} .

(78) If z_{2} ≠ the zero of ℂ_{F}, then − \frac{z_{1}}{z_{2}} = \frac{− z_{1}}{z_{2}} and − \frac{z_{1}}{z_{2}} = \frac{z_{1}}{− z_{2}} .

(79) If z_{2} ≠ the zero of ℂ_{F}, then \frac{z_{1}}{z_{2}} = \begin{matrix}− & z_{1} \\ − & z_{2} \end{matrix} .

(80) If z_{2} ≠ the zero of ℂ_{F} and z_{4} ≠ the zero of ℂ_{F}, then \frac{z_{1}}{z_{2}} − \frac{z_{3}}{z_{4}} = \frac{z_{1}·z_{4}−z_{3}·z_{2}}{z_{2}·z_{4}}.

(81) If z ≠ the zero of ℂ_{F}, then \frac{z_{1}}{z} − \frac{z_{2}}{z} = \frac{z_{1}−z_{2}}{z} .

(82) If z_{2} ≠ the zero of ℂ_{F} and if z_{1} · z_{2} = z_{3} or z_{2} · z_{1} = z_{3}, then z_{1} = \frac{z_{3}}{z_{2}} .

(83) (the zero of ℂ_{F})^{∗} = the zero of ℂ_{F}.

(84) If z^{∗} = the zero of ℂ_{F}, then z = the zero of ℂ_{F}.

(85) (the unity of ℂ_{F})^{∗} = the unity of ℂ_{F}.

(86) (z^{∗})^{∗} = z.

(87) (z_{1} + z_{2})^{∗} = z_{1}^{∗} + z_{2}^{∗}.

(88) (− z)^{∗} = − z^{∗}.

(89) (z_{1} − z_{2})^{∗} = z_{1}^{∗} − z_{2}^{∗}.

(90) (z_{1} · z_{2})^{∗}= z_{1}^{∗} · z_{2}^{∗}.

(91) If z ≠ the zero of ℂ_{F}, then (z^{−1} )^{∗} = (z^{∗})^{−1} .

(92) If z_{2} ≠ the zero of ℂ_{F}, then (\frac{z_{1}}{z_{2}} )^{∗} = \begin{matrix}z_{1} & ^{∗} \\ z_{2} & ^{∗} \end{matrix} .

(93) |the zero of ℂ_{F}| = 0.

(94) If |z| = 0, then z = the zero of ℂ_{F}.

(95) 0 |z|.

(96) z ≠ the zero of ℂ_{F} iff 0 < |z|.

(97) |the unity of ℂ_{F}| = 1.

(98) |− z| = |z|.

(99) |z^{∗}| = |z|.

(100) |z_{1} + z_{2}| |z_{1}| + |z_{2}|.

(101) |z_{1} − z_{2}| |z_{1}| + |z_{2}|.

(102) |z_{1}| − |z_{2}| |z_{1} + z_{2}|.

(103) |z_{1}| − |z_{2}| |z_{1} − z_{2}|.

(104) |z_{1} − z_{2}| = |z_{2} − z_{1}|.

(105) |z_{1} − z_{2}| = 0 iff z_{1} = z_{2}.

(106) z_{1} ≠ z_{2} iff 0 < |z_{1} − z_{2}|.

(107) |z_{1} − z_{2}| |z_{1} − z| + |z − z_{2}|.

(108) ||z_{1}| − |z_{2}|| |z_{1} − z_{2}|.

(109) |z_{1} · z_{2}| = |z_{1}| · |z_{2}|.

(110) If z ≠ the zero of ℂ_{F}, then |z^{−1} | = |z|^{−1} .

(111) If z_{2} ≠ the zero of ℂ_{F}, then \frac{|z_{1}|}{|z_{2}|} = |\frac{z_{1}}{z_{2}} |.

(112) |z · z| = |z · z^{∗}|.

References

[1] Czesław Byliński. The complex numbers. Formalized Mathematics, 1(3):507–513, 1990.

[2] Krzysztof Hryniewiecki. Basic properties of real numbers. Formalized Mathematics, 1(1):35–40, 1990.

[3] Eugeniusz Kusak, Wojciech Leończuk, and Michał Muzalewski. Abelian groups, fields and vector spaces. Formalized Mathematics, 1(2):335–342, 1990.

[4] Jan Popiołek. Some properties of functions modul and signum. Formalized Mathematics, 1(2):263–264, 1990.

[5] Wojciech A. Trybulec. Vectors in real linear space. Formalized Mathematics, 1(2):291–296, 1990.

[6] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

270 anna justyna milewska

Integrability of Bounded Total Functions

Noboru Endou Shinshu University

Nagano Katsumi Wasaki Shinshu University Nagano Yasunari Shidama Shinshu University Nagano

Summary. All these results have been obtained by Darboux’s theorem in our previous article [7]. In addition, we have proved the first mean value theorem to Riemann integral.

MML Identifier: INTEGRA4.

The articles [15], [1], [2], [3], [6], [8], [4], [5], [9], [18], [12], [14], [13], [11], [10], [17], and [16] provide the notation and terminology for this paper.

1. Basic Integrable Functions and First Mean Value Theorem

For simplicity, we use the following convention: i, n denote natural numbers, a, r, x, y denote real numbers, A denotes a closed-interval subset of ℝ, C denotes a non empty set, and X denotes a set.

We now state several propositions:

(1) For every element D of divsA such that vol(A) = 0 holds lenD = 1.

(2) χ_{A,A} is integrable on A and integralχ_{A,A} = vol(A).

(3) For every partial function f from A to ℝ and for every r holds f is total and rngf = {r} iff f = r χ_{A,A}.

(4) Let f be a partial function from A to ℝ and given r. If f is total and rngf = {r}, then f is integrable on A and integralf = r · vol(A).

(5) For every r there exists a partial function f from A to ℝ such that f is total and rngf = {r} and f is bounded on A.

(6) Let f be a partial function from A to ℝ and D be an element of divsA. If vol(A) = 0, then f is integrable on A and integralf = 0.

(7) Let f be a partial function from A to ℝ. Suppose f is total and bounded on A and f is integrable on A. Then there exists a such that inf rngf a and a suprngf and integralf = a · vol(A).

2. Integrability of Bounded Total Functions

We now state three propositions:

(8) Let f be a partial function from A to ℝ and T be a DivSequence of A. Suppose f is total and bounded on A and δ_{T} is convergent and lim(δ_{T}) = 0. Then lower sum(f, T) is convergent and limlower sum(f, T) = lower integralf.

(9) Let f be a partial function from A to ℝ and T be a DivSequence of A. Suppose f is total and bounded on A and δ_{T} is convergent and lim(δ_{T}) = 0. Then upper sum(f, T) is convergent and limupper sum(f, T) = upper integralf.

(10) Let f be a partial function from A to ℝ. Suppose f is total and bounded

on A. Then f is upper integrable on A and f is lower integrable on A. Let A be a closed-interval subset of ℝ, let I_{1} be an element of divsA, and

let us consider n. We say that I_{1} divides into equal n if and only if: (Def. 1) lenI_{1} = n and for every i such that i ∈ domI_{1} holds I_{1}(i) = inf A +

\frac{vol(A)}{len I_{1}} · i. Next we state a number of propositions:

(11) There exists a DivSequence T of A such that δ_{T} is convergent and lim(δ_{T}) = 0.

(12) Let f be a partial function from A to ℝ. Suppose f is total and bounded on A. Then f is integrable on A if and only if for every DivSequence T of A such that δ_{T} is convergent and lim(δ_{T}) = 0 holds limupper sum(f, T)− limlower sum(f, T) = 0.

(13) For every partial function f from C to ℝ such that f is total holds max_{+}(f) is total and max_{−} (f) is total.

(14) For every partial function f from C to ℝ such that f is upper bounded on X holds max_{+}(f) is upper bounded on X.

(15) For every partial function f from C to ℝ holds max_{+}(f) is lower bounded on X.

(16) For every partial function f from C to ℝ such that f is lower bounded on X holds max_{−} (f) is upper bounded on X.

(17) For every partial function f from C to ℝ holds max_{−} (f) is lower bounded on X.

(18) For every partial function f from A to ℝ such that f is upper bounded on A holds rng(f↾X) is upper bounded.

(19) For every partial function f from A to ℝ such that f is lower bounded on A holds rng(f↾X) is lower bounded.

(20) Let f be a partial function from A to ℝ. Suppose f is total and bounded on A and f is integrable on A. Then max_{+}(f) is integrable on A.

(21) For every partial function f from C to ℝ holds max_{−} (f) = max_{+}(− f).

(22) Let f be a partial function from A to ℝ. Suppose f is total and bounded on A and f is integrable on A. Then max_{−} (f) is integrable on A.

(23) Let f be a partial function from A to ℝ. Suppose f is total and bounded on A and f is integrable on A. Then |f| is integrable on A and | integralf| integral|f|.

(24) Let f be a partial function from A to ℝ. Suppose f is bounded on A and total and for all x, y such that x ∈ A and y ∈ A holds |f(x) − f(y)| a. Then suprngf − inf rngf a.

(25) Let f, g be partial functions from A to ℝ. Suppose that (i) f is bounded on A, (ii) g is bounded on A, (iii) f is total, (iv) g is total,

(v) a 0, and (vi) for all x, y such that x ∈ A and y ∈ A holds |g(x) − g(y)| a · |f(x) −

f(y)|. Then suprngg − inf rngg a · (suprngf − inf rngf).

(26) Let f, g, h be partial functions from A to ℝ. Suppose that f is bounded on A and g is bounded on A and h is bounded on A and f is total and g is total and h is total and a 0 and for all x, y such that x ∈ A and y ∈ A holds |h(x) − h(y)| a · (|f(x) − f(y)| + |g(x) − g(y)|). Then suprngh − inf rngh a · ((suprngf − inf rngf) + (suprngg − inf rngg)).

(27) Let f, g be partial functions from A to ℝ. Suppose that (i) f is total and bounded on A, (ii) f is integrable on A, (iii) g is total and bounded on A, (iv) a > 0, and

(v) for all x, y such that x ∈ A and y ∈ A holds |g(x) − g(y)| a · |f(x) − f(y)|. Then g is integrable on A.

(28) Let f, g, h be partial functions from A to ℝ. Suppose that f is total and bounded on A and f is integrable on A and g is total and bounded on A and g is integrable on A and h is total and bounded on A and 274 noboru endou et al.

a > 0 and for all x, y such that x ∈ A and y ∈ A holds |h(x) − h(y)| a · (|f(x) − f(y)| + |g(x) − g(y)|). Then h is integrable on A.

(29) Let f, g be partial functions from A to ℝ. Suppose that (i) f is total and bounded on A, (ii) f is integrable on A, (iii) g is total and bounded on A, and (iv) g is integrable on A.

Then f g is integrable on A.

(30) Let f be a partial function from A to ℝ. Suppose f is total and bounded on A and f is integrable on A and 0 ∉ rngf and \frac{1}{f} is bounded on A. Then \frac{1}{f} is integrable on A.

References

[1] Grzegorz Bancerek and Krzysztof Hryniewiecki. Segments of natural numbers and finite sequences. Formalized Mathematics, 1(1):107–114, 1990.

[2] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[3] Czesław Byliński. Functions from a set to a set. Formalized Mathematics, 1(1):153–164, 1990.

[4] Czesław Byliński. Partial functions. Formalized Mathematics, 1(2):357–367, 1990.

[5] Czesław Byliński and Piotr Rudnicki. Bounding boxes for compact sets in E^{2}. Formalized Mathematics, 6(3):427–440, 1997.

[6] Noboru Endou and Artur Korniłowicz. The definition of the Riemann definite integral and some related lemmas. Formalized Mathematics, 8(1):93–102, 1999.

[7] Noboru Endou, Katsumi Wasaki, and Yasunari Shidama. Darboux’s theorem. Formalized Mathematics, 9(1):197–200, 2001.

[8] Noboru Endou, Katsumi Wasaki, and Yasunari Shidama. Scalar multiple of Riemann definite integral. Formalized Mathematics, 9(1):191–196, 2001.

[9] Krzysztof Hryniewiecki. Basic properties of real numbers. Formalized Mathematics, 1(1):35–40, 1990.

[10] Jarosław Kotowicz. Convergent real sequences. Upper and lower bound of sets of real numbers. Formalized Mathematics, 1(3):477–481, 1990.

[11] Jarosław Kotowicz. Convergent sequences and the limit of sequences. Formalized Mathematics, 1(2):273–275, 1990.

[12] Jarosław Kotowicz. Partial functions from a domain to the set of real numbers. Formalized Mathematics, 1(4):703–709, 1990.

[13] Jarosław Kotowicz. Real sequences and basic operations on them. Formalized Mathematics, 1(2):269–272, 1990.

[14] Jarosław Kotowicz and Yuji Sakai. Properties of partial functions from a domain to the set of real numbers. Formalized Mathematics, 3(2):279–288, 1992.

[15] Jan Popiołek. Some properties of functions modul and signum. Formalized Mathematics, 1(2):263–264, 1990.

[16] Andrzej Trybulec. Tarski Grothendieck set theory. Formalized Mathematics, 1(1):9–11, 1990.

[17] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[18] Edmund Woronowicz. Relations defined on sets. Formalized Mathematics, 1(1):181–186, 1990.

Received February 1, 2000

High-Speed Algorithms for RSA Cryptograms

Yasushi Fuwa Shinshu University Nagano Yoshinori Fujisawa Shinshu University Nagano

Summary. In this article, we propose a new high-speed processing method for encoding and decoding the RSA cryptogram that is a kind of public-key cryptogram. This cryptogram is not only used for encrypting data, but also for such purposes as authentication. However, the encoding and decoding processes take a long time because they require a great deal of calculations. As a result, this cryptogram is not suited for practical use. Until now, we proposed a highspeed algorithm of addition using radix-2^{k} signed-digit numbers and clarified correctness of it ([5]). In this article, we defined two new operations for a highspeed coding and encoding processes on public-key cryptograms based on radix-2^{k} signed-digit (SD) numbers. One is calculation of (a∗b) mod c (a, b, c are natural numbers). Another one is calculation of (a^{b}) mod c (a, b, c are natural numbers). Their calculations are realized repetition of addition. We propose a high-speed algorithm of their calculations using proposed addition algorithm and clarify the correctness of them. In the first section, we prepared some useful theorems for natural numbers and integers and so on. In the second section, we proved some properties of addition operation using a radix-2^{k} SD numbers. In the third section, we defined some functions on the relation between a finite sequence of k-SD and a finite sequence of ℕ and proved some properties about them. In the fourth section, algorithm of calculation of (a ∗ b) mod c based on radix-2^{k} SD numbers is proposed and its correctness is clarified. In the last section, algorithm of calculation of (a^{b}) mod c based on radix-2^{k} SD numbers is proposed and we clarified its correctness.

MML Identifier: RADIX 2.

The notation and terminology used in this paper are introduced in the following articles: [8], [6], [2], [3], [4], [9], [1], [5], [10], and [7].

1. Some Useful Theorems

In this paper k is a natural number. The following propositions are true:

(1) For every natural number a holds a mod 1 = 0.

(2) Let a, b be integers and n be a natural number. If n > 0, then ((amodn)+ (bmodn))modn = (a+(bmodn))modn and ((amodn)+(bmodn))modn = ((a mod n) + b) mod n.

(3) For all integers a, b and for every natural number n such that n > 0 holds a · b modn = a · (b modn) modn and a · b modn = (a modn) · b modn.

(4) For all natural numbers a, b, i such that 1 i and 0 < b holds (a mod b_{ℕ}^{i}) ÷ b_{ℕ}^{i− ′1} = (a ÷ b_{ℕ}^{i− ′1}) mod b.

(5) For all natural numbers i, n such that i ∈ Segn holds i + 1 ∈ Seg(n + 1).

2. Properties of Addition Operation Using Radix-2^{k} Signed-Digit Numbers

One can prove the following propositions:

(6) For every natural number k holds Radixk > 0.

(7) For every tuple x of 1 and k −SD holds SDDecx = DigA(x, 1).

(8) For every integer x holds SD Add Data(x, k) + SD Add Carryx · Radixk = x.

(9) Let n be a natural number, x be a tuple of n + 1 and k −SD , and x_{1} be a tuple of n and k −SD . Suppose that for every natural number i such that i ∈ Segn holds x(i) = x_{1}(i). Then ∑ DigitSDx = ∑((DigitSDx_{1})^{⌢} ⟨SubDigit(x, n + 1, k)⟩).

(10) Let n be a natural number, x be a tuple of n+1 and k −SD , and x_{1} be a tuple of n and k −SD . Suppose that for every natural number i such that i ∈ Segn holds x(i) = x_{1}(i). Then SDDecx_{1} + ((Radixk)_{ℕ}^{n}) · DigA(x, n + 1) = SDDecx.

(11) Let n be a natural number. Suppose n 1. Let x, y be tuples of n and k −SD . If k 2, then SDDecx′+′y + SD Add CarryDigA(x, n) + DigA(y, n) · (Radixk)_{ℕ}^{n} = SDDecx + SDDecy.

3. Definitions on the Relation Between a Finite Sequence of k-SD and a Finite Sequence of ℕ and Some Properties about them

Let i, k, n be natural numbers and let x be a tuple of n and ℕ. The functor SubDigit2(x, i, k) yielding an element of ℕ is defined by:

(Def. 1) SubDigit2(x, i, k) = ((Radixk)_{ℕ}^{i− ′1}) · x(i).

Let n, k be natural numbers and let x be a tuple of n and ℕ. The functor DigitSD2(x, k) yields a tuple of n and ℕ and is defined as follows:

(Def. 2) For every natural number i such that i ∈ Segn holds π_{i} DigitSD2(x, k) =

SubDigit2(x, i, k). Let n, k be natural numbers and let x be a tuple of n and ℕ. The functor

SDDec2(x, k) yielding a natural number is defined as follows: (Def. 3) SDDec2(x, k) = ∑ DigitSD2(x, k).

Let i, k, x be natural numbers. The functor DigitDC2(x, i, k) yields a natural number and is defined as follows:

(Def. 4) DigitDC2(x, i, k) = (x mod (Radixk)_{ℕ}^{i}) ÷ (Radixk)_{ℕ}^{i− ′1}.

Let k, n, x be natural numbers. The functor DecSD2(x, n, k) yielding a tuple of n and ℕ is defined by:

(Def. 5) For every natural number i such that i ∈ Segn holds

(DecSD2(x, n, k))(i) = DigitDC2(x, i, k). The following propositions are true:

(12) Let n, k be natural numbers, x be a tuple of n and ℕ, and y be a tuple of n and k −SD . If x = y, then DigitSD2(x, k) = DigitSDy.

(13) Let n, k be natural numbers, x be a tuple of n and ℕ, and y be a tuple of n and k −SD . If x = y, then SDDec2(x, k) = SDDecy.

(14) For all natural numbers x, n, k holds DecSD2(x, n, k) = DecSD(x, n, k).

(15) Let n be a natural number. Suppose n 1. Let m, k be natural numbers. If m is represented by n, k, then m = SDDec2(DecSD2(m, n, k), k).

4. A High-Speed Algorithm of Calculation of (a ∗ b) mod b Based on Radix-2^{k} Signed-Digit Numbers and its Correctness

Let q be an integer, let f, j, k, n be natural numbers, and let c be a tuple of n and k −SD . The functor Table1(q, c, f, j) yielding an integer is defined as follows:

(Def. 6) Table1(q, c, f, j) = q · DigA(c, j) mod f.

Let q be an integer, let k, f, n be natural numbers, and let c be a tuple of n and k −SD . Let us assume that n 1. The functor Mul mod(q, c, f, k) yielding a tuple of n and ℤ is defined by the conditions (Def. 7).

(Def. 7)(i) (Mul mod(q, c, f, k))(1) = Table1(q, c, f, n), and

(ii) for every natural number i such that 1 i and i n − 1 there exist integers I_{1}, I_{2} such that I_{1} = (Mul mod(q, c, f, k))(i) and I_{2} = (Mul mod(q, c, f, k))(i + 1) and I_{2} = (Radixk · I_{1} + Table1(q, c, f, n − ′ i)) mod f.

One can prove the following proposition

(16) Let n be a natural number. Suppose n 1. Let q be an integer and i_{1}, f, k be natural numbers. Suppose i_{1} is represented by n, k and f > 0. Let c be a tuple of n and k −SD . If c = DecSD(i_{1}, n, k), then (Mul mod(q, c, f, k))(n) = q · i_{1} mod f.

5. A High-Speed Algorithm of Calculation of (a^{b}) mod b Based on a Radix-2^{k} Signed-Digit Numbers and its Correctness

Let n, f, j, m be natural numbers and let e be a tuple of n and ℕ. The functor Table2(m, e, f, j) yielding a natural number is defined as follows:

(Def. 8) Table2(m, e, f, j) = (m_{ℕ}^{π_{j}e}) mod f.

Let k, f, m, n be natural numbers and let e be a tuple of n and ℕ. Let us assume that n 1. The functor Pow mod(m, e, f, k) yields a tuple of n and ℕ and is defined by the conditions (Def. 9).

(Def. 9)(i) (Pow mod(m, e, f, k))(1) = Table2(m, e, f, n), and

(ii) for every natural number i such that 1 i and i n − 1 there exist natural numbers i_{2}, i_{3} such that i_{2} = (Pow mod(m, e, f, k))(i) and i_{3} = (Pow mod(m, e, f, k))(i+1) and i_{3} = ((i_{2}_{ℕ}^{Radix k})modf)·Table2(m, e, f, n− ′ i) mod f.

One can prove the following proposition

(17) Let n be a natural number. Suppose n 1. Let m, k, f, i_{4} be natural numbers. Suppose i_{4} is represented by n, k and f > 0. Let e be a tuple of n and ℕ. If e = DecSD2(i_{4}, n, k), then (Pow mod(m, e, f, k))(n) = (m_{ℕ}^{i_{4}})mod f.

References

[1] Grzegorz Bancerek. The fundamental properties of natural numbers. Formalized Mathematics, 1(1):41–46, 1990.

[2] Grzegorz Bancerek and Krzysztof Hryniewiecki. Segments of natural numbers and finite sequences. Formalized Mathematics, 1(1):107–114, 1990.

high-speed algorithms for rsa cryptograms 279

[3] Czesław Byliński. Finite sequences and tuples of elements of a non-empty sets. Formalized Mathematics, 1(3):529–536, 1990.

[4] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[5] Yoshinori Fujisawa and Yasushi Fuwa. Definitions of radix-2^{k} signed-digit number and its adder algorithm. Formalized Mathematics, 9(1):71–75, 2001.

[6] Yoshinori Fujisawa, Yasushi Fuwa, and Hidetaka Shimizu. Euler’s Theorem and small Fermat’s Theorem. Formalized Mathematics, 7(1):123–126, 1998.

[7] Andrzej Kondracki. The Chinese Remainder Theorem. Formalized Mathematics, 6(4):573–577, 1997.

[8] Takaya Nishiyama and Yasuho Mizuhara. Binary arithmetics. Formalized Mathematics, 4(1):83–86, 1993.

[9] Michał J. Trybulec. Integers. Formalized Mathematics, 1(3):501–505, 1990.

[10] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

Received February 1, 2000 280 yasushi fuwa and yoshinori fujisawa

Definition of Integrability for Partial Functions from ℝ to ℝ and Integrability for

Continuous Functions

Noboru Endou Shinshu University

Nagano Katsumi Wasaki Shinshu University Nagano Yasunari Shidama Shinshu University Nagano

Summary. In this article, we defined the Riemann definite integral of partial function from ℝ to ℝ. Then we have proved the integrability for the continuous function and differentiable function. Moreover, we have proved an elementary theorem of calculus.

MML Identifier: INTEGRA5.

The articles [12], [13], [1], [2], [6], [3], [5], [14], [7], [16], [9], [10], [4], [11], [8], and [15] provide the notation and terminology for this paper.

1. Some Useful Properties of Finite Sequence

For simplicity, we adopt the following convention: i denotes a natural number, a, b, r_{1}, r_{2} denote real numbers, A denotes a closed-interval subset of ℝ, C denotes a non empty set, and X denotes a set.

One can prove the following propositions:

(1) Let F, F_{1}, F_{2} be finite sequences of elements of ℝ and given r_{1}, r_{2}. If F_{1} = ⟨r_{1}⟩^{⌢} F or F_{1} = F ^{⌢} ⟨r_{1}⟩ and if F_{2} = ⟨r_{2}⟩^{⌢} F or F_{2} = F ^{⌢} ⟨r_{2}⟩, then ∑(F_{1} − F_{2}) = r_{1} − r_{2}.

(2) Let F_{1}, F_{2} be finite sequences of elements of ℝ. If lenF_{1} = lenF_{2}, then len(F_{1} + F_{2}) = lenF_{1} and len(F_{1} − F_{2}) = lenF_{1} and ∑(F_{1} + F_{2}) = ∑ F_{1} + ∑ F_{2} and ∑(F_{1} − F_{2}) = ∑ F_{1} − ∑ F_{2}.

(3) Let F_{1}, F_{2} be finite sequences of elements of ℝ. If lenF_{1} = lenF_{2} and for every i such that i ∈ domF_{1} holds F_{1}(i) F_{2}(i), then ∑ F_{1} ∑ F_{2}.

2. Integrability for Partial Function of ℝ, ℝ

Let C be a non empty subset of ℝ and let f be a partial function from ℝ to ℝ. The functor f ↾ C yielding a partial function from C to ℝ is defined as follows:

(Def. 1) f ↾ C = f↾C.

Next we state two propositions:

(4) For all partial functions f, g from ℝ to ℝ and for every non empty subset C of ℝ holds (f ↾ C) (g ↾ C) = (f g) ↾ C.

(5) For all partial functions f, g from ℝ to ℝ and for every non empty subset C of ℝ holds (f + g) ↾ C = f ↾ C + g ↾ C.

Let A be a closed-interval subset of ℝ and let f be a partial function from ℝ to ℝ. We say that f is integrable on A if and only if:

(Def. 2) f ↾ A is integrable on A.

Let A be a closed-interval subset of ℝ and let f be a partial function from ℝ to ℝ. The functor ∫_{A} f(x)dx yields a real number and is defined by:

(Def. 3) ∫_{A} f(x)dx = integralf ↾ A.

The following propositions are true:

(6) For every partial function f from ℝ to ℝ such that A ⊆ domf holds f ↾ A is total.

(7) For every partial function f from ℝ to ℝ such that f is upper bounded on A holds f ↾ A is upper bounded on A.

(8) For every partial function f from ℝ to ℝ such that f is lower bounded on A holds f ↾ A is lower bounded on A.

(9) For every partial function f from ℝ to ℝ such that f is bounded on A holds f ↾ A is bounded on A.

3. Integrability for Continuous Function

The following propositions are true:

(10) For every partial function f from ℝ to ℝ such that f is continuous on A holds f is bounded on A.

(11) For every partial function f from ℝ to ℝ such that f is continuous on A holds f is integrable on A.

(12) Let f be a partial function from ℝ to ℝ and D be an element of divsA. Suppose A ⊆ X and f is differentiable on X and f′_{↾X} is bounded on A. Then lower sum(f′_{↾X} ↾ A, D) f(supA) − f(inf A) and f(supA) − f(inf A) upper sum(f′_{↾X} ↾ A, D).

(13) Let f be a partial function from ℝ to ℝ. Suppose A ⊆ X and f is differentiable on X and f′_{↾X} is integrable on A and f′_{↾X} is bounded on A.

Then ∫_{A} f′_{↾X}(x)dx = f(supA) − f(inf A).

(14) For every partial function f from ℝ to ℝ such that f is non-decreasing on A and A ⊆ domf holds rng(f↾A) is bounded.

(15) Let f be a partial function from ℝ to ℝ. If f is non-decreasing on A and A ⊆ domf, then inf rng(f↾A) = f(inf A) and suprng(f↾A) = f(supA).

(16) For every partial function f from ℝ to ℝ such that f is monotone on A and A ⊆ domf holds f is integrable on A.

(17) Let f be a partial function from ℝ to ℝ and A, B be closed-interval subsets of ℝ. If f is continuous on A and B ⊆ A, then f is integrable on B.

(18) Let f be a partial function from ℝ to ℝ, A, B, C be closed-interval subsets of ℝ, and given X. Suppose A ⊆ X and f is differentiable on X and f′_{↾X} is continuous on A and inf A = inf B and supB = inf C and

supC = supA. Then B ⊆ A and C ⊆ A and ∫_{A} f′_{↾X}(x)dx = ∫_{B} f′_{↾X}(x)dx+

∫_{C} f′_{↾X}(x)dx.

Let a, b be elements of ℝ. Let us assume that a b. The functor [′a, b′] yields a closed-interval subset of ℝ and is defined as follows:

(Def. 4) [′a, b′] = [a, b].

Let a, b be elements of ℝ and let f be a partial function from ℝ to ℝ. The

functor ∫_{a}^{b} f(x)dx yields a real number and is defined by:

(Def. 5) ∫_{a}^{b} f(x)dx = \{ \begin{matrix}∫_{[′a,b′]} f(x)dx, if a b, \\ − ∫_{[′b,a′]} f(x)dx, otherwise. \end{matrix}

We now state three propositions:

(19) Let f be a partial function from ℝ to ℝ, A be a closed-interval subset of

ℝ, and given a, b. If A = [a, b], then ∫_{A} f(x)dx = ∫_{a}^{b} f(x)dx.

(20) Let f be a partial function from ℝ to ℝ, A be a closed-interval subset of 284 noboru endou et al.

ℝ, and given a, b. If A = [b, a], then − ∫_{A} f(x)dx = ∫_{a}^{b} f(x)dx.

(21) Let f, g be partial functions from ℝ to ℝ and X be an open subset of ℝ. Suppose that f is differentiable on X and g is differentiable on X and A ⊆ X and f′_{↾X} is integrable on A and f′_{↾X} is bounded on A and

g′_{↾X} is integrable on A and g′_{↾X} is bounded on A. Then ∫_{A} f′_{↾X} g(x)dx =

f(supA) · g(supA) − f(inf A) · g(inf A) − ∫_{A} f g′_{↾X}(x)dx.

References

[1] Grzegorz Bancerek and Krzysztof Hryniewiecki. Segments of natural numbers and finite sequences. Formalized Mathematics, 1(1):107–114, 1990.

[2] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[3] Czesław Byliński. Partial functions. Formalized Mathematics, 1(2):357–367, 1990.

[4] Czesław Byliński. The sum and product of finite sequences of real numbers. Formalized Mathematics, 1(4):661–668, 1990.

[5] Czesław Byliński and Piotr Rudnicki. Bounding boxes for compact sets in E^{2}. Formalized Mathematics, 6(3):427–440, 1997.

[6] Noboru Endou and Artur Korniłowicz. The definition of the Riemann definite integral and some related lemmas. Formalized Mathematics, 8(1):93–102, 1999.

[7] Krzysztof Hryniewiecki. Basic properties of real numbers. Formalized Mathematics, 1(1):35–40, 1990.

[8] Jarosław Kotowicz. Convergent real sequences. Upper and lower bound of sets of real numbers. Formalized Mathematics, 1(3):477–481, 1990.

[9] Jarosław Kotowicz. Partial functions from a domain to the set of real numbers. Formalized Mathematics, 1(4):703–709, 1990.

[10] Jarosław Kotowicz. Properties of real functions. Formalized Mathematics, 1(4):781–786, 1990.

[11] Jarosław Kotowicz. Real sequences and basic operations on them. Formalized Mathematics, 1(2):269–272, 1990.

[12] Konrad Raczkowski and Paweł Sadowski. Real function continuity. Formalized Mathematics, 1(4):787–791, 1990.

[13] Konrad Raczkowski and Paweł Sadowski. Real function differentiability. Formalized Mathematics, 1(4):797–801, 1990.

[14] Konrad Raczkowski and Paweł Sadowski. Topological properties of subsets in real numbers. Formalized Mathematics, 1(4):777–780, 1990.

[15] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[16] Edmund Woronowicz. Relations defined on sets. Formalized Mathematics, 1(1):181–186, 1990.

Received March 23, 2000

Introduction to Several Concepts of Convexity and Semicontinuity for Function

from ℝ to ℝ

Noboru Endou Shinshu University

Nagano Katsumi Wasaki Shinshu University Nagano Yasunari Shidama Shinshu University Nagano

Summary. This article is an introduction to convex analysis. In the beginning, we have defined the concept of strictly convexity and proved some basic properties between convexity and strictly convexity. Moreover, we have defined concepts of other convexity and semicontinuity, and proved their basic properties.

MML Identifier: RFUNCT 4.

The papers [12], [3], [1], [4], [5], [9], [6], [13], [8], [16], [17], [11], [7], [10], [14], [15], and [2] provide the notation and terminology for this paper.

1. Some Useful Properties of n-Tuples on ℝ

We adopt the following convention: a, b, r, s, x_{0}, x are real numbers, f, g are partial functions from ℝ to ℝ, and X, Y are sets.

The following propositions are true:

(1) max(a, b) min(a, b).

(2) Let n be a natural number, R_{1}, R_{2} be elements of ℝ^{n}, and r_{1}, r_{2} be real numbers. Then R_{1} ^{⌢} ⟨r_{1}⟩ • R_{2} ^{⌢} ⟨r_{2}⟩ = (R_{1} • R_{2})^{⌢} ⟨r_{1} · r_{2}⟩.

(3) Let n be a natural number and R be an element of ℝ^{n}. Suppose ∑ R = 0 and for every natural number i such that i ∈ domR holds 0 R(i). Let i be a natural number. If i ∈ domR, then R(i) = 0.

(4) Let n be a natural number and R be an element of ℝ^{n}. Suppose that for every natural number i such that i ∈ domR holds 0 = R(i). Then R = n ↦ (0 qua real number).

(5) For every natural number n and for every element R of ℝ^{n} holds n ↦ (0 qua real number) •R = n ↦ (0 qua real number).

2. Convex and Strictly Convex Functions

Let us consider f, X. We say that f is strictly convex on X if and only if the conditions (Def. 1) are satisfied.

(Def. 1)(i) X ⊆ domf, and

(ii) for every real number p such that 0 < p and p < 1 and for all real numbers r, s such that r ∈ X and s ∈ X and p · r + (1 − p) · s ∈ X and r ≠ s holds f(p · r + (1 − p) · s) < p · f(r) + (1 − p) · f(s).

We now state a number of propositions:

(6) If f is strictly convex on X, then f is convex on X.

(7) Let a, b be real numbers and f be a partial function from ℝ to ℝ. Then f is strictly convex on [a, b] if and only if the following conditions are satisfied:

(i) [a, b] ⊆ domf, and (ii) for every real number p such that 0 < p and p < 1 and for all real

numbers r, s such that r ∈ [a, b] and s ∈ [a, b] and r ≠ s holds f(p · r + (1 − p) · s) < p · f(r) + (1 − p) · f(s).

(8) Let X be a set and f be a partial function from ℝ to ℝ. Then f is convex on X if and only if the following conditions are satisfied:

(i) X ⊆ domf, and (ii) for all real numbers a, b, c such that a ∈ X and b ∈ X and c ∈ X and

a < b and b < c holds f(b) \frac{c−b}{c−a} · f(a) + \frac{b−a}{c−a} · f(c).

(9) Let X be a set and f be a partial function from ℝ to ℝ. Then f is strictly convex on X if and only if the following conditions are satisfied:

(i) X ⊆ domf, and (ii) for all real numbers a, b, c such that a ∈ X and b ∈ X and c ∈ X and

a < b and b < c holds f(b) < \frac{c−b}{c−a} · f(a) + \frac{b−a}{c−a} · f(c).

(10) If f is strictly convex on X and Y ⊆ X, then f is strictly convex on Y.

(11) f is strictly convex on X iff f − r is strictly convex on X.

(12) If 0 < r, then f is strictly convex on X iff r f is strictly convex on X.

(13) If f is strictly convex on X and g is strictly convex on X, then f + g is strictly convex on X.

(14) If f is strictly convex on X and g is convex on X, then f + g is strictly convex on X.

(15) Suppose f is strictly convex on X but g is strictly convex on X but a > 0 and b 0 or a 0 and b > 0. Then a f + b g is strictly convex on X.

(16) f is convex on X if and only if the following conditions are satisfied: (i) X ⊆ domf, and (ii) for all a, b, r such that a ∈ X and b ∈ X and r ∈ X and a < r and

r < b holds \frac{f(r)−f(a)}{r−a} \frac{f(b)−f(a)}{b−a} and \frac{f(b)−f(a)}{b−a} \frac{f(b)−f(r)}{b−r} .

(17) f is strictly convex on X if and only if the following conditions are

satisfied:

(i) X ⊆ domf, and (ii) for all a, b, r such that a ∈ X and b ∈ X and r ∈ X and a < r and

r < b holds \frac{f(r)−f(a)}{r−a} < \frac{f(b)−f(a)}{b−a} and \frac{f(b)−f(a)}{b−a} < \frac{f(b)−f(r)}{b−r} .

(18) Let f be a partial function from ℝ to ℝ. Suppose f is total. Then for every natural number n and for all elements P, E, F of ℝ^{n} such that ∑ P = 1 and for every natural number i such that i ∈ domP holds P (i) 0 and F (i) = f(E(i)) holds f(∑(P • E)) ∑(P • F) if and only if f is convex on ℝ.

(19) Let f be a partial function from ℝ to ℝ, I be an interval, and a be a real number. Suppose there exist real numbers x_{1}, x_{2} such that x_{1} ∈ I and x_{2} ∈ I and x_{1} < a and a < x_{2} and f is convex on I. Then f is continuous in a.

3. Definitions of Several Convexity and Semicontinuity Concepts

Let us consider f, X. We say that f is quasiconvex on X if and only if the conditions (Def. 2) are satisfied.

(Def. 2)(i) X ⊆ domf, and

(ii) for every real number p such that 0 < p and p < 1 and for all real numbers r, s such that r ∈ X and s ∈ X and p · r + (1 − p) · s ∈ X holds f(p · r + (1 − p) · s) max(f(r), f(s)).

Let us consider f, X. We say that f is strictly quasiconvex on X if and only if the conditions (Def. 3) are satisfied.

(Def. 3)(i) X ⊆ domf, and

(ii) for every real number p such that 0 < p and p < 1 and for all real numbers r, s such that r ∈ X and s ∈ X and p · r + (1 − p) · s ∈ X and f(r) ≠ f(s) holds f(p · r + (1 − p) · s) < max(f(r), f(s)).

Let us consider f, X. We say that f is strongly quasiconvex on X if and only if the conditions (Def. 4) are satisfied.

(Def. 4)(i) X ⊆ domf, and

(ii) for every real number p such that 0 < p and p < 1 and for all real numbers r, s such that r ∈ X and s ∈ X and p · r + (1 − p) · s ∈ X and r ≠ s holds f(p · r + (1 − p) · s) < max(f(r), f(s)).

Let us consider f, x_{0}. We say that f is upper semicontinuous in x_{0} if and only if:

(Def. 5) x_{0} ∈ domf and for every r such that 0 < r there exists s such that 0 < s

and for every x such that x ∈ domf and |x−x_{0}| < s holds f(x_{0})−f(x) < r. Let us consider f, X. We say that f is upper semicontinuous on X if and

only if: (Def. 6) X ⊆ domf and for every x_{0} such that x_{0} ∈ X holds f↾X is upper

semicontinuous in x_{0}. Let us consider f, x_{0}. We say that f is lower semicontinuous in x_{0} if and

only if: (Def. 7) x_{0} ∈ domf and for every r such that 0 < r there exists s such that 0 < s

and for every x such that x ∈ domf and |x−x_{0}| < s holds f(x)−f(x_{0}) < r. Let us consider f, X. We say that f is lower semicontinuous on X if and

only if: (Def. 8) X ⊆ domf and for every x_{0} such that x_{0} ∈ X holds f↾X is lower

semicontinuous in x_{0}. The following propositions are true:

(20) Let given x_{0}, f. Then f is upper semicontinuous in x_{0} and f is lower semicontinuous in x_{0} if and only if f is continuous in x_{0}.

(21) Let given X, f. Then f is upper semicontinuous on X and f is lower semicontinuous on X if and only if f is continuous on X.

(22) For all X, f such that f is strictly convex on X holds f is strongly quasiconvex on X.

(23) For all X, f such that f is strongly quasiconvex on X holds f is quasiconvex on X.

(24) For all X, f such that f is convex on X holds f is strictly quasiconvex on X.

(25) For all X, f such that f is strongly quasiconvex on X holds f is strictly quasiconvex on X.

(26) Let given X, f. Suppose f is strictly quasiconvex on X and f is one-to-one. Then f is strongly quasiconvex on X.

References

[1] Grzegorz Bancerek and Krzysztof Hryniewiecki. Segments of natural numbers and finite sequences. Formalized Mathematics, 1(1):107–114, 1990.

introduction to several concepts of … 289

[2] Józef Białas. Infimum and supremum of the set of real numbers. Measure theory. Formalized Mathematics, 2(1):163–171, 1991.

[3] Czesław Byliński. Binary operations applied to finite sequences. Formalized Mathematics, 1(4):643–649, 1990.

[4] Czesław Byliński. Finite sequences and tuples of elements of a non-empty sets. Formalized Mathematics, 1(3):529–536, 1990.

[5] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[6] Czesław Byliński. Partial functions. Formalized Mathematics, 1(2):357–367, 1990.

[7] Czesław Byliński. The sum and product of finite sequences of real numbers. Formalized Mathematics, 1(4):661–668, 1990.

[8] Krzysztof Hryniewiecki. Basic properties of real numbers. Formalized Mathematics, 1(1):35–40, 1990.

[9] Białas Józef. Properties of the intervals of real numbers. Formalized Mathematics, 3(2):263–269, 1992.

[10] Jarosław Kotowicz. Real sequences and basic operations on them. Formalized Mathematics, 1(2):269–272, 1990.

[11] Jarosław Kotowicz and Yuji Sakai. Properties of partial functions from a domain to the set of real numbers. Formalized Mathematics, 3(2):279–288, 1992.

[12] Konrad Raczkowski and Paweł Sadowski. Real function continuity. Formalized Mathematics, 1(4):787–791, 1990.

[13] Konrad Raczkowski and Paweł Sadowski. Topological properties of subsets in real numbers. Formalized Mathematics, 1(4):777–780, 1990.

[14] Andrzej Trybulec and Czesław Byliński. Some properties of real numbers. Formalized Mathematics, 1(3):445–449, 1990.

[15] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[16] Edmund Woronowicz. Relations and their basic properties. Formalized Mathematics, 1(1):73–83, 1990.

[17] Edmund Woronowicz. Relations defined on sets. Formalized Mathematics, 1(1):181–186, 1990.

Received March 23, 2000 290 noboru endou et al.

Standard Ordering of Instruction Locations

Andrzej Trybulec University of Białystok

Piotr Rudnicki University of Alberta

Artur Korniłowicz University of Białystok

MML Identifier: AMISTD 1.

The notation and terminology used in this paper have been introduced in the following articles: [11], [15], [12], [18], [1], [3], [14], [4], [16], [6], [7], [8], [9], [2], [10], [5], [19], [20], [13], and [17].

1. Preliminaries

We use the following convention: x, X are sets, D is a non empty set, and k, m, n are natural numbers.

The following two propositions are true:

(1) For every real number r holds max{r} = r.

(2) max{n} = n. One can verify that there exists a finite sequence which is non trivial. The following proposition is true

(3) For every trivial finite sequence f of elements of D holds f is empty or there exists an element x of D such that f = ⟨x⟩.

Let x, y be sets. Note that ⟨⟨x, y⟩⟩ is non empty. Let us observe that every binary relation has non empty elements. One can prove the following proposition

(4) id_{X} is bijective. Let A be a finite set and let B be a set. Observe that A ⟼→ B is finite. Let x, y be sets. One can check that x⟼→ . y is trivial.

2. Restricted Concatenation

Let f_{1} be a non empty finite sequence and let f_{2} be a finite sequence. Observe that f_{1} ⌢⌢ f_{2} is non empty.

The following propositions are true:

(5) Let f_{1} be a non empty finite sequence of elements of D and f_{2} be a finite sequence of elements of D. Then (f_{1} ⌢⌢ f_{2})_{1} = (f_{1})_{1}.

(6) Let f_{1} be a finite sequence of elements of D and f_{2} be a non trivial finite sequence of elements of D. Then (f_{1} ⌢⌢ f_{2})_{len(f_{1}⌢⌢f_{2})} = (f_{2})_{len f_{2}}.

(7) For every finite sequence f holds f ⌢⌢ ε = f.

(8) For every finite sequence f holds f ⌢⌢ ⟨x⟩ = f.

(9) For all finite sequences f_{1}, f_{2} of elements of D such that 1 n and n lenf_{1} holds (f_{1} ⌢⌢ f_{2})_{n} = (f_{1})_{n}.

(10) For all finite sequences f_{1}, f_{2} of elements of D such that 1 n and n < lenf_{2} holds (f_{1} ⌢⌢ f_{2})_{len f_{1}+n} = (f_{2})_{n+1}.

3. Ami-Struct

For simplicity, we adopt the following convention: N is a set with non empty elements, S is a von Neumann definite AMI over N, i is an instruction of S, l, l_{1}, l_{2}, l_{3} are instruction-locations of S, and s is a state of S.

We now state the proposition

(11) Let S be a definite AMI over N, I be an instruction of S, and s be a state of S. Then s+·((the instruction locations of S) ⟼→ I) is a state of S.

Let N be a set and let S be an AMI over N. Observe that every finite partial state of S which is empty is also programmed.

Let N be a set and let S be an AMI over N. One can check that there exists a finite partial state of S which is empty.

Let N be a set with non empty elements and let S be a von Neumann definite AMI over N. Note that there exists a finite partial state of S which is non empty, trivial, and programmed.

Let N be a set with non empty elements, let S be an AMI over N, let i be an instruction of S, and let s be a state of S. One can verify that (the execution of S)(i)(s) is function-like and relation-like.

Let N be a set and let S be an AMI over N. (Def. 1) An element of the instruction codes of S is said to be an instruction type

of S.

Let N be a set, let S be an AMI over N, and let I be an element of the instructions of S. The functor InsCode(I) yields an instruction type of S and is defined by:

(Def. 2) InsCode(I) = I_{1}.

Let N be a set with non empty elements and let S be a steady-programmed von Neumann definite AMI over N. Observe that there exists a finite partial state of S which is non empty, trivial, autonomic, and programmed.

One can prove the following propositions:

(12) Let S be a steady-programmed von Neumann definite AMI over N, i_{1} be an instruction-location of S, and I be an instruction of S. Then i_{1}⟼→ . I is autonomic.

(13) Every steady-programmed von Neumann definite AMI over N is pro-

grammable. Let N be a set with non empty elements. One can check that every von Neu-

mann definite AMI over N which is steady-programmed is also programmable.

Let N be a set with non empty elements, let S be an AMI over N, and let T be an instruction type of S. We say that T is jump-only if and only if the condition (Def. 3) is satisfied.

(Def. 3) Let s be a state of S, o be an object of S, and I be an instruction of S.

If InsCode(I) = T and o ≠ IC_{S}, then (Exec(I, s))(o) = s(o). Let N be a set with non empty elements, let S be an AMI over N, and let

I be an instruction of S. We say that I is jump-only if and only if: (Def. 4) InsCode(I) is jump-only.

Let us consider N, S, i, l. The functor NIC(i, l) yielding a subset of the instruction locations of S is defined by:

(Def. 5) NIC(i, l) = {IC_{Following (s)} : IC_{s} = l ∧ s(l) = i}.

Let N be a set with non empty elements, let S be a realistic von Neumann definite AMI over N, let i be an instruction of S, and let l be an instructionlocation of S. Note that NIC(i, l) is non empty.

Let us consider N, S, i. The functor JUMP(i) yields a subset of the instruction locations of S and is defined by:

(Def. 6) JUMP(i) = ⋂{NIC(i, l)}.

Let us consider N, S, l. The functor SUCC(l) yielding a subset of the instruction locations of S is defined by:

(Def. 7) SUCC(l) = ⋃{NIC(i, l) \ JUMP(i)}.

One can prove the following propositions:

(14) Let S be a von Neumann definite AMI over N and i be an instruction of S. Suppose the instruction locations of S are non trivial and for every instruction-location l of S holds NIC(i, l) = {l}. Then JUMP(i) is empty.

(15) Let S be a realistic von Neumann definite AMI over N, i_{1} be an instruction-location of S, and i be an instruction of S. If i is halting, then NIC(i, i_{1}) = {i_{1}}.

4. Ordering of Instruction Locations

Let us consider N, S, l_{1}, l_{2}. The predicate l_{1} l_{2} is defined by the condition (Def. 8).

(Def. 8) There exists a non empty finite sequence f of elements of the instruction locations of S such that f_{1} = l_{1} and f_{len f} = l_{2} and for every n such that 1 n and n < lenf holds f_{n+1} ∈ SUCC(f_{n}).

Let us note that the predicate l_{1} l_{2} is reflexive.

Next we state the proposition

(16) If l_{1} l_{2} and l_{2} l_{3}, then l_{1} l_{3}.

Let us consider N, S. We say that S is InsLoc-antisymmetric if and only if: (Def. 9) For all l_{1}, l_{2} such that l_{1} l_{2} and l_{2} l_{1} holds l_{1} = l_{2}.

Let us consider N, S. We say that S is standard if and only if the condition (Def. 10) is satisfied.

(Def. 10) There exists a function f from ℕ into the instruction locations of S such that f is bijective and for all natural numbers m, n holds m n iff f(m) f(n).

One can prove the following three propositions:

(17) Let S be a von Neumann definite AMI over N and f_{1}, f_{2} be functions

from ℕ into the instruction locations of S. Suppose that

(i) f_{1} is bijective, (ii) for all natural numbers m, n holds m n iff f_{1}(m) f_{1}(n), (iii) f_{2} is bijective, and (iv) for all natural numbers m, n holds m n iff f_{2}(m) f_{2}(n).

Then f_{1} = f_{2}.

(18) Let S be a von Neumann definite AMI over N and f be a function from ℕ into the instruction locations of S. Suppose f is bijective. Then the following statements are equivalent

(i) for all natural numbers m, n holds m n iff f(m) f(n), (ii) for every natural number k holds f(k + 1) ∈ SUCC(f(k)) and for every

natural number j such that f(j) ∈ SUCC(f(k)) holds k j.

(19) Let S be a von Neumann definite AMI over N. Then S is standard if and only if there exists a function f from ℕ into the instruction locations of S such that f is bijective and for every natural number k holds f(k + 1) ∈ SUCC(f(k)) and for every natural number j such that f(j) ∈ SUCC(f(k)) holds k j.

5. Standard Trivial Computer

Let N be a set with non empty elements. The functor STC(N) yielding a strict AMI over N is defined by the conditions (Def. 11).

(Def. 11) The objects of STC(N) = ℕ ∪ {ℕ} and the instruction counter of STC(N) = ℕ and the instruction locations of STC(N) = ℕ and the instruction codes of STC(N) = {0, 1} and the instructions of STC(N) = {⟨⟨0, 0⟩⟩, ⟨⟨1, 0⟩⟩} and the object kind of STC(N) = (ℕ ⟼→ {⟨⟨1, 0⟩⟩, ⟨⟨0, 0⟩⟩})+·({ℕ} ⟼→ ℕ) and there exists a function f from ∏ (the object kind of STC(N)) into ∏ (the object kind of STC(N)) such that for every element s of ∏ (the object kind of STC(N)) holds f(s) = s+·({ℕ} ⟼→ succs(ℕ)) and the execution of STC(N) = ({⟨⟨1, 0⟩⟩} ⟼→ f)+·({⟨⟨0, 0⟩⟩} ⟼→ id_{∏ (the object kind of STC(N))}).

Let N be a set with non empty elements. Note that the instruction locations of STC(N) is infinite.

Let N be a set with non empty elements. Observe that STC(N) is von Neumann definite realistic steady-programmed and data-oriented.

Next we state several propositions:

(20) For every instruction i of STC(N) such that InsCode(i) = 0 holds i is halting.

(21) For every instruction i of STC(N) such that InsCode(i) = 1 holds i is non halting.

(22) For every instruction i of STC(N) holds InsCode(i) = 1 or InsCode(i) = 0.

(23) Every instruction of STC(N) is jump-only.

(24) For every instruction-location l of STC(N) such that l = k holds

SUCC(l) = {k, k + 1}. Let N be a set with non empty elements. Observe that STC(N) is standard. Let N be a set with non empty elements. Observe that STC(N) is halting. Let N be a set with non empty elements. One can check that there exists a

von Neumann definite AMI over N which is standard, halting, realistic, steadyprogrammed, and programmable.

Let N be a set with non empty elements, let S be a standard von Neumann definite AMI over N, and let k be a natural number. The functor il_{S}(k) yields an instruction-location of S and is defined by the condition (Def. 12).

(Def. 12) There exists a function f from ℕ into the instruction locations of S such that f is bijective and for all natural numbers m, n holds m n iff f(m) f(n) and il_{S}(k) = f(k).

We now state two propositions:

(25) Let S be a standard von Neumann definite AMI over N and k_{1}, k_{2} be natural numbers. If il_{S}(k_{1}) = il_{S}(k_{2}), then k_{1} = k_{2}.

(26) Let S be a standard von Neumann definite AMI over N and l be an instruction-location of S. Then there exists a natural number k such that l = il_{S}(k).

Let N be a set with non empty elements, let S be a standard von Neumann definite AMI over N, and let l be an instruction-location of S. The functor locnum(l) yields a natural number and is defined as follows:

(Def. 13) il_{S}(locnum(l)) = l.

One can prove the following propositions:

(27) Let S be a standard von Neumann definite AMI over N and l_{1}, l_{2} be instruction-locations of S. If locnum(l_{1}) = locnum(l_{2}), then l_{1} = l_{2}.

(28) Let S be a standard von Neumann definite AMI over N and k_{1}, k_{2} be natural numbers. Then il_{S}(k_{1}) il_{S}(k_{2}) if and only if k_{1} k_{2}.

(29) Let S be a standard von Neumann definite AMI over N and l_{1}, l_{2} be instruction-locations of S. Then locnum(l_{1}) locnum(l_{2}) if and only if l_{1} l_{2}.

(30) If S is standard, then S is InsLoc-antisymmetric.

Let us consider N. Observe that every von Neumann definite AMI over N which is standard is also InsLoc-antisymmetric.

Let N be a set with non empty elements, let S be a standard von Neumann definite AMI over N, let f be an instruction-location of S, and let k be a natural number. The functor f + k yielding an instruction-location of S is defined by:

(Def. 14) f + k = il_{S}(locnum(f) + k).

Next we state three propositions:

(31) For every standard von Neumann definite AMI S over N and for every instruction-location f of S holds f + 0 = f.

(32) Let S be a standard von Neumann definite AMI over N and f, g be instruction-locations of S. If f + k = g + k, then f = g.

(33) For every standard von Neumann definite AMI S over N and for every

instruction-location f of S holds locnum(f) + k = locnum(f + k). Let N be a set with non empty elements, let S be a standard von Neumann

definite AMI over N, and let f be an instruction-location of S. The functor NextLocf yields an instruction-location of S and is defined as follows:

(Def. 15) NextLocf = f + 1.

The following propositions are true:

(34) For every standard von Neumann definite AMI S over N and for every instruction-location f of S holds NextLocf = il_{S}(locnum(f) + 1).

(35) For every standard von Neumann definite AMI S over N and for every instruction-location f of S holds f ≠ NextLocf.

(36) Let S be a standard von Neumann definite AMI over N and f, g be instruction-locations of S. If NextLocf = NextLocg, then f = g.

(37) il_{STC(N)}(k) = k.

(38) For every instruction i of STC(N) and for every state s of STC(N) such that InsCode(i) = 1 holds (Exec(i, s))(IC_{STC(N)}) = NextLocIC_{s}.

(39) For every instruction-location l of STC(N) and for every instruction i of STC(N) such that InsCode(i) = 1 holds NIC(i, l) = {NextLocl}.

(40) For every instruction-location l of STC(N) holds SUCC(l) =

{l, NextLocl}. Let N be a set with non empty elements, let S be a standard von Neumann

definite AMI over N, and let i be an instruction of S. We say that i is sequential if and only if:

(Def. 16) For every state s of S holds (Exec(i, s))(IC_{S}) = NextLocIC_{s}.

The following propositions are true:

(41) Let S be a standard realistic von Neumann definite AMI over N, i_{1} be an instruction-location of S, and i be an instruction of S. If i is sequential, then NIC(i, i_{1}) = {NextLoci_{1}}.

(42) Let S be a realistic standard von Neumann definite AMI over N and i

be an instruction of S. If i is sequential, then i is non halting. Let us consider N and let S be a realistic standard von Neumann definite

AMI over N. Observe that every instruction of S which is sequential is also non halting and every instruction of S which is halting is also non sequential.

One can prove the following proposition

(43) Let S be a standard von Neumann definite AMI over N and i be an instruction of S. If JUMP(i) is non empty, then i is non sequential.

6. Closedness of Finite Partial States

Let N be a set with non empty elements, let S be a von Neumann definite AMI over N, and let F be a finite partial state of S. We say that F is closed if and only if:

(Def. 17) For every instruction-location l of S such that l ∈ domF holds NIC(π_{l}F, l) ⊆ domF.

We say that F is really-closed if and only if: (Def. 18) For every state s of S such that F ⊆ s and IC_{s} ∈ domF and for every

natural number k holds IC_{(Computation (s))(k)} ∈ domF. Let N be a set with non empty elements, let S be a standard von Neumann

definite AMI over N, and let F be a finite partial state of S. We say that F is para-closed if and only if:

(Def. 19) For every state s of S such that F ⊆ s and IC_{s} = il_{S}(0) and for every

natural number k holds IC_{(Computation (s))(k)} ∈ domF. The following propositions are true:

(44) Let S be a standard steady-programmed von Neumann definite AMI over N and F be a finite partial state of S. If F is really-closed and il_{S}(0) ∈ domF, then F is para-closed.

(45) Let S be a von Neumann definite steady-programmed AMI over N and

F be a finite partial state of S. If F is closed, then F is really-closed. Let N be a set with non empty elements and let S be a von Neumann definite

steady-programmed AMI over N. One can verify that every finite partial state of S which is closed is also really-closed.

We now state the proposition

(46) For every standard realistic halting von Neumann definite AMI S over

N holds il_{S}(0)⟼→ . halt_{S} is closed. Let N be a set with non empty elements, let S be a von Neumann definite

AMI over N, and let F be a finite partial state of S. We say that F is lower if and only if the condition (Def. 20) is satisfied.

(Def. 20) Let l be an instruction-location of S. Suppose l ∈ domF. Let m be an

instruction-location of S. If m l, then m ∈ domF. The following proposition is true

(47) For every von Neumann definite AMI S over N holds every empty finite

partial state of S is lower. Let N be a set with non empty elements and let S be a von Neumann definite

AMI over N. Observe that every finite partial state of S which is empty is also lower.

The following proposition is true

(48) For every standard von Neumann definite AMI S over N and for every

instruction i of S holds il_{S}(0)⟼→ . i is lower. Let N be a set with non empty elements and let S be a standard von

Neumann definite AMI over N. Note that there exists a finite partial state of S which is lower, non empty, trivial, and programmed.

We now state two propositions:

(49) Let S be a standard von Neumann definite AMI over N and F be a lower non empty programmed finite partial state of S. Then il_{S}(0) ∈ domF.

(50) Let N be a set with non empty elements, S be a standard von Neumann definite AMI over N, and P be a lower programmed finite partial state of S. Then m < cardP if and only if il_{S}(m) ∈ domP.

Let N be a set with non empty elements, let S be a standard von Neumann definite AMI over N, and let F be a non empty programmed finite partial state of S. The functor LastLocF yields an instruction-location of S and is defined by the condition (Def. 21).

(Def. 21) There exists a finite non empty subset M of ℕ such that M = {locnum(l); l ranges over elements of the instruction locations of S: l ∈ domF } and LastLocF = il_{S}(maxM).

We now state several propositions:

(51) Let S be a standard von Neumann definite AMI over N and F be a non empty programmed finite partial state of S. Then LastLocF ∈ domF.

(52) Let S be a standard von Neumann definite AMI over N and F, G be non empty programmed finite partial states of S. If F ⊆ G, then LastLocF LastLocG.

(53) Let S be a standard von Neumann definite AMI over N, F be a non empty programmed finite partial state of S, and l be an instructionlocation of S. If l ∈ domF, then l LastLocF.

(54) Let S be a standard von Neumann definite AMI over N, F be a lower non empty programmed finite partial state of S, and G be a non empty programmed finite partial state of S. If F ⊆ G and LastLocF = LastLocG, then F = G.

(55) Let N be a set with non empty elements, S be a standard von Neumann definite AMI over N, and F be a lower non empty programmed finite partial state of S. Then LastLocF = il_{S}(cardF − ′1).

Let N be a set with non empty elements and let S be a standard steadyprogrammed von Neumann definite AMI over N. Note that every finite partial state of S which is really-closed, lower, non empty, and programmed is also para-closed.

Let N be a set with non empty elements, let S be a standard halting von Neumann definite AMI over N, and let F be a non empty programmed finite partial state of S. We say that F is halt-ending if and only if:

(Def. 22) F (LastLocF) = halt_{S}.

We say that F is unique-halt if and only if: (Def. 23) For every instruction-location f of S such that F (f) = halt_{S} and f ∈

domF holds f = LastLocF.

300 andrzej trybulec et al.

Let N be a set with non empty elements and let S be a standard halting von Neumann definite AMI over N. One can check that there exists a lower non empty programmed finite partial state of S which is halt-ending, unique-halt, and trivial.

Let N be a set with non empty elements and let S be a standard halting realistic von Neumann definite AMI over N. One can check that there exists a finite partial state of S which is trivial, closed, lower, non empty, and programmed.

Let N be a set with non empty elements and let S be a standard halting realistic von Neumann definite AMI over N. Observe that there exists a lower non empty programmed finite partial state of S which is halt-ending, uniquehalt, trivial, and closed.

Let N be a set with non empty elements and let S be a standard halting realistic steady-programmed von Neumann definite AMI over N. Observe that there exists a lower non empty programmed finite partial state of S which is halt-ending, unique-halt, autonomic, trivial, and closed.

Let N be a set with non empty elements and let S be a standard halting von Neumann definite AMI over N.

(Def. 24) A halt-ending unique-halt lower non empty programmed finite partial

state of S is said to be a pre-Macro of S. Let N be a set with non empty elements and let S be a standard realistic

halting von Neumann definite AMI over N. One can verify that there exists a pre-Macro of S which is closed.

References

[1] Grzegorz Bancerek. Cardinal numbers. Formalized Mathematics, 1(2):377–382, 1990.

[2] Grzegorz Bancerek. The fundamental properties of natural numbers. Formalized Mathematics, 1(1):41–46, 1990.

[3] Grzegorz Bancerek. König’s theorem. Formalized Mathematics, 1(3):589–593, 1990.

[4] Grzegorz Bancerek and Krzysztof Hryniewiecki. Segments of natural numbers and finite sequences. Formalized Mathematics, 1(1):107–114, 1990.

[5] Józef Białas. Group and field definitions. Formalized Mathematics, 1(3):433–439, 1990.

[6] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[7] Czesław Byliński. Functions from a set to a set. Formalized Mathematics, 1(1):153–164, 1990.

[8] Czesław Byliński. The modification of a function by a function and the iteration of the composition of a function. Formalized Mathematics, 1(3):521–527, 1990.

[9] Yatsuka Nakamura and Piotr Rudnicki. Vertex sequences induced by chains. Formalized Mathematics, 5(3):297–304, 1996.

[10] Yatsuka Nakamura, Piotr Rudnicki, Andrzej Trybulec, and Pauline N. Kawamoto. Preliminaries to circuits, I. Formalized Mathematics, 5(2):167–172, 1996.

[11] Yatsuka Nakamura and Andrzej Trybulec. A mathematical model of CPU. Formalized Mathematics, 3(2):151–160, 1992.

[12] Takaya Nishiyama and Yasuho Mizuhara. Binary arithmetics. Formalized Mathematics, 4(1):83–86, 1993.

[13] Yozo Toda. The formalization of simple graphs. Formalized Mathematics, 5(1):137–144,

standard ordering of instruction locations 301

[14] Andrzej Trybulec. Domains and their Cartesian products. Formalized Mathematics, 1(1):115–122, 1990.

[15] Andrzej Trybulec and Yatsuka Nakamura. Some remarks on the simple concrete model of computer. Formalized Mathematics, 4(1):51–56, 1993.

[16] Wojciech A. Trybulec. Pigeon hole principle. Formalized Mathematics, 1(3):575–579, 1990.

[17] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[18] Zinaida Trybulec and Halina Święczkowska. Boolean properties of sets. Formalized Mathematics, 1(1):17–23, 1990.

[19] Edmund Woronowicz. Relations and their basic properties. Formalized Mathematics, 1(1):73–83, 1990.

[20] Edmund Woronowicz. Relations defined on sets. Formalized Mathematics, 1(1):181–186, 1990.

302 andrzej trybulec et al.

On the Composition of Macro Instructions of Standard Computers

Artur Korniłowicz University of Białystok

MML Identifier: AMISTD 2.

The terminology and notation used in this paper are introduced in the following papers: [18], [11], [17], [12], [20], [1], [3], [14], [4], [8], [15], [5], [6], [2], [10], [9], [21], [13], [19], [16], and [7].

1. Preliminaries

We follow the rules: k, m are natural numbers, x, X are sets, and N is a set with non empty elements.

Let f be a function and let g be a non empty function. One can verify that f+·g is non empty and g+·f is non empty.

Let f, g be finite functions. Note that f+·g is finite.

Next we state two propositions:

(1) For all functions f, g holds domf ≈ domg iff f ≈ g.

(2) For all finite functions f, g such that domf ∩ domg = ∅ holds card(f+·g) = cardf + cardg.

Let f be a function and let A be a set. Note that f \ A is function-like and relation-like.

One can prove the following two propositions:

(3) For all functions f, g such that x ∈ domf \domg holds (f \g)(x) = f(x).

(4) For every non empty finite set F holds cardF − 1 = cardF − ′1.

2. Product Like Sets

Let S be a functional set. The functor ∏_{S} yields a function and is defined as follows:

(Def. 1)(i) For every set x holds x ∈ dom∏_{S} iff for every function f such that f ∈ S holds x ∈ domf and for every set i such that i ∈ dom∏_{S} holds ∏_{S}(i) = π_{i}S if S is non empty,

(ii) ∏_{S} = ∅, otherwise. The following two propositions are true:

(5) For every non empty functional set S holds dom∏_{S} = ⋂{domf : f ranges over elements of S}.

(6) For every non empty functional set S and for every set i such that i ∈ dom∏_{S} holds ∏_{S}(i) = {f(i) : f ranges over elements of S}.

Let S be a set. We say that S is product-like if and only if: (Def. 2) There exists a function f such that S = ∏ f.

Let f be a function. One can check that ∏ f is product-like. Let us mention that every set which is product-like is also functional and

has common domain.

Let us observe that there exists a set which is product-like and non empty. The following four propositions are true:

(7) For every functional set S with common domain holds dom∏_{S} = DOM(S).

(8) For every functional set S and for every set i such that i ∈ dom∏_{S} holds ∏_{S}(i) = π_{i}S.

(9) For every functional set S with common domain holds S ⊆ ∏ ∏_{S} .

(10) For every non empty product-like set S holds S = ∏ ∏_{S} .

Let D be a set. Observe that every set of finite sequences of D is functional. Let i be a natural number and let D be a set. One can check that D^{i} has

common domain.

Let i be a natural number and let D be a set. Note that D^{i} is product-like.

3. Properties of AMI-Struct

One can prove the following propositions:

(11) Let N be a set, S be an AMI over N, and F be a finite partial state of S. Then F \ X is a finite partial state of S.

(12) Let S be a von Neumann definite AMI over N and F be a programmed finite partial state of S. Then F \ X is a programmed finite partial state of S.

Let N be a set with non empty elements, let S be a von Neumann definite AMI over N, let i_{1}, i_{2} be instruction-locations of S, and let I_{1}, I_{2} be elements of the instructions of S. Then [i_{1} ⟼→ I_{1}, i_{2} ⟼→ I_{2}] is a finite partial state of S.

Let N be a set with non empty elements and let S be a halting AMI over N. Observe that there exists an instruction of S which is halting.

We now state three propositions:

(13) Let S be a standard von Neumann definite AMI over N, F be a lower programmed finite partial state of S, and G be a programmed finite partial state of S. If domF = domG, then G is lower.

(14) Let S be a standard von Neumann definite AMI over N, F be a lower programmed finite partial state of S, and f be an instruction-location of S. If f ∈ domF, then locnum(f) < cardF.

(15) Let S be a standard von Neumann definite AMI over N and F be a lower programmed finite partial state of S. Then domF = {il_{S}(k); k ranges over natural numbers: k < cardF }.

Let N be a set, let S be an AMI over N, and let I be an element of the instructions of S. The functor AddressPart(I) is defined by:

(Def. 3) AddressPart(I) = I_{2}.

Let N be a set, let S be an AMI over N, and let I be an element of the instructions of S. Then AddressPart(I) is a finite sequence of elements of ⋃ N ∪ the objects of S.

We now state the proposition

(16) Let N be a set, S be an AMI over N, and I, J be elements of the instructions of S. If InsCode(I) = InsCode(J) and AddressPart(I) = AddressPart(J), then I = J.

Let N be a set and let S be an AMI over N. We say that S is homogeneous if and only if:

(Def. 4) For all instructions I, J of S such that InsCode(I) = InsCode(J) holds

domAddressPart(I) = domAddressPart(J). The following proposition is true

(17) For every instruction I of STC(N) holds AddressPart(I) = 0. Let N be a set, let S be an AMI over N, and let T be an instruction type

of S. The functor AddressPartsT is defined by: (Def. 5) AddressPartsT = {AddressPart(I); I ranges over instructions of S:

InsCode(I) = T }. Let N be a set, let S be an AMI over N, and let T be an instruction type

of S. One can check that AddressPartsT is functional.

Let N be a set with non empty elements, let S be a von Neumann definite AMI over N, and let I be an instruction of S. We say that I is explicit-jump-instruction if and only if the condition (Def. 6) is satisfied.

(Def. 6) Let f be a set. Suppose f ∈ JUMP(I). Then there exists a set k such that k ∈ domAddressPart(I) and f = (AddressPart(I))(k) and ∏_{AddressParts InsCode (I)}(k) = the instruction locations of S.

We say that I has ins-loc-in-jump if and only if the condition (Def. 7) is satisfied. (Def. 7) Let f be a set. Given a set k such that k ∈ domAddressPart(I) and

f = (AddressPart(I))(k) and ∏_{AddressParts InsCode (I)}(k) = the instruction locations of S. Then f ∈ JUMP(I).

Let N be a set with non empty elements and let S be a von Neumann definite AMI over N. We say that S is explicit-jump-instruction if and only if:

(Def. 8) Every instruction of S is explicit-jump-instruction.

We say that S has ins-loc-in-jump if and only if: (Def. 9) Every instruction of S has ins-loc-in-jump.

Let N be a set and let S be an AMI over N. We say that S has non trivial instruction locations if and only if:

(Def. 10) The instruction locations of S are non trivial.

Let N be a set with non empty elements. Note that every von Neumann definite AMI over N which is standard has non trivial instruction locations.

Let N be a set with non empty elements. One can verify that there exists a von Neumann definite AMI over N which is standard.

Let N be a set with non empty elements and let S be an AMI over N with non trivial instruction locations. Observe that the instruction locations of S is non trivial.

The following proposition is true

(18) Let S be a standard von Neumann definite AMI over N and I be an instruction of S. If for every instruction-location f of S holds NIC(I, f) = {NextLocf}, then JUMP(I) is empty.

Let N be a set with non empty elements and let I be an instruction of STC(N). Observe that JUMP(I) is empty.

Let N be a set and let S be an AMI over N. We say that S is regular if and only if:

(Def. 11) For every instruction type T of S holds AddressPartsT is product-like.

Next we state the proposition

(19) For every instruction type T of STC(N) holds AddressPartsT = {0}. Let N be a set with non empty elements. Observe that STC(N) is homoge-

neous explicit-jump-instruction and regular and has ins-loc-in-jump.

Let N be a set with non empty elements. Note that there exists a von Neumann definite AMI over N which is standard, halting, realistic, steadyprogrammed, programmable, explicit-jump-instruction, homogeneous, and regular and has non trivial instruction locations and ins-loc-in-jump.

Let N be a set with non empty elements, let S be a regular AMI over N, and let T be an instruction type of S. Observe that AddressPartsT is product-like.

Let N be a set with non empty elements, let S be a homogeneous AMI over N, and let T be an instruction type of S. Observe that AddressPartsT has common domain.

Next we state the proposition

(20) Let S be a homogeneous AMI over N, I be an instruction of S, and x be a set. Suppose x ∈ domAddressPart(I). Suppose ∏_{AddressParts InsCode (I)}(x) = the instruction locations of S. Then (AddressPart(I))(x) is an instruction-location of S.

Let N be a set with non empty elements and let S be an explicit-jump-instruction von Neumann definite AMI over N. Note that every instruction of S is explicit-jump-instruction.

Let N be a set with non empty elements and let S be a von Neumann definite AMI over N with ins-loc-in-jump. Observe that every instruction of S has ins-loc-in-jump.

The following proposition is true

(21) Let S be a realistic von Neumann definite AMI over N with non trivial instruction locations and I be an instruction of S. If I is halting, then JUMP(I) is empty.

Let N be a set with non empty elements, let S be a halting realistic von Neumann definite AMI over N with non trivial instruction locations, and let I be a halting instruction of S. One can verify that JUMP(I) is empty.

Let N be a set with non empty elements and let S be a von Neumann definite AMI over N with non trivial instruction locations. Observe that there exists a finite partial state of S which is non trivial and programmed.

Let N be a set with non empty elements and let S be a standard halting von Neumann definite AMI over N. One can verify that every non empty programmed finite partial state of S which is trivial is also unique-halt.

Let N be a set, let S be an AMI over N, and let I be an instruction of S. We say that I is instruction location free if and only if:

(Def. 12) For every set x such that x ∈ domAddressPart(I) holds

∏_{AddressParts InsCode (I)}(x) ≠ the instruction locations of S. The following propositions are true:

(22) Let S be a halting explicit-jump-instruction realistic von Neumann definite AMI over N with non trivial instruction locations and I be an instruction of S. If I is instruction location free, then JUMP(I) is empty.

(23) Let S be a realistic von Neumann definite AMI over N with ins-loc-in-jump and non trivial instruction locations and I be an instruction of S. If I is halting, then I is instruction location free.

Let N be a set with non empty elements and let S be a realistic von Neumann definite AMI over N with ins-loc-in-jump and non trivial instruction locations. Observe that every instruction of S which is halting is also instruction location free.

We now state the proposition

(24) Let S be a standard von Neumann definite AMI over N with ins-loc-in-jump and I be an instruction of S. If I is sequential, then I is instruction location free.

Let N be a set with non empty elements and let S be a standard von Neumann definite AMI over N with ins-loc-in-jump. One can check that every instruction of S which is sequential is also instruction location free.

Let N be a set with non empty elements and let S be a standard halting von Neumann definite AMI over N. The functor StopS yielding a finite partial state of S is defined by:

(Def. 13) StopS = il_{S}(0)⟼→ . halt_{S}.

Let N be a set with non empty elements and let S be a standard halting von Neumann definite AMI over N. Note that StopS is lower non empty programmed and trivial.

Let N be a set with non empty elements and let S be a standard realistic halting von Neumann definite AMI over N. One can check that StopS is closed.

Let N be a set with non empty elements and let S be a standard halting steady-programmed von Neumann definite AMI over N. Note that StopS is autonomic.

We now state three propositions:

(25) For every standard halting von Neumann definite AMI S over N holds cardStopS = 1.

(26) Let S be a standard halting von Neumann definite AMI over N and F be a pre-Macro of S. If cardF = 1, then F = StopS.

(27) For every standard halting von Neumann definite AMI S over N holds

LastLocStopS = il_{S}(0). Let N be a set with non empty elements and let S be a standard halting von

Neumann definite AMI over N. Note that StopS is halt-ending and unique-halt.

Let N be a set with non empty elements and let S be a standard halting von Neumann definite AMI over N. Then StopS is a pre-Macro of S.

4. On the Composition of Macro Instructions

Let N be a set with non empty elements, let S be a homogeneous regular standard von Neumann definite AMI over N, let I be an element of the instructions of S, and let k be a natural number. The functor IncAddr(I, k) yielding an instruction of S is defined by the conditions (Def. 14).

(Def. 14)(i) InsCode(IncAddr(I, k)) = InsCode(I), (ii) domAddressPart(IncAddr(I, k)) = domAddressPart(I), and (iii) for every set n such that n ∈ domAddressPart(I) holds if

∏_{AddressParts InsCode (I)}(n) = the instruction locations of S, then there exists an instruction-location f of S such that f = (AddressPart(I))(n) and (AddressPart(IncAddr(I, k)))(n) = il_{S}(k + locnum(f)) and if ∏_{AddressParts InsCode (I)}(n) ≠ the instruction locations of S, then (AddressPart(IncAddr(I, k)))(n) = (AddressPart(I))(n).

Next we state three propositions:

(28) Let S be a homogeneous regular standard von Neumann definite AMI over N and I be an element of the instructions of S. Then IncAddr(I, 0) = I.

(29) Let S be a homogeneous regular standard von Neumann definite AMI over N and I be an instruction of S. If I is instruction location free, then IncAddr(I, k) = I.

(30) Let S be a halting standard realistic homogeneous regular von Neumann definite AMI over N with ins-loc-in-jump. Then IncAddr(halt_{S}, k) = halt_{S}.

Let N be a set with non empty elements, let S be a halting standard realistic homogeneous regular von Neumann definite AMI over N with ins-loc-in-jump, let I be a halting instruction of S, and let k be a natural number. Observe that IncAddr(I, k) is halting.

We now state several propositions:

(31) Let S be a homogeneous regular standard von Neumann definite AMI over N and I be an instruction of S. Then AddressPartsInsCode(I) = AddressPartsInsCode(IncAddr(I, k)).

(32) Let S be a homogeneous regular standard von Neumann definite AMI over N and I, J be instructions of S. Given a natural number k such that IncAddr(I, k) = IncAddr(J, k). Suppose ∏_{AddressParts InsCode (I)}(x) = the instruction locations of S. Then ∏_{AddressParts InsCode (J)}(x) = the instruction locations of S.

(33) Let S be a homogeneous regular standard von Neumann definite AMI over N and I, J be instructions of S. Given a natural number k such that IncAddr(I, k) = IncAddr(J, k). Suppose ∏_{AddressParts InsCode (I)}(x) ≠ the instruction locations of S. Then ∏_{AddressParts InsCode (J)}(x) ≠ the instruction locations of S.

(34) Let S be a homogeneous regular standard von Neumann definite AMI over N and I, J be instructions of S. If there exists a natural number k such that IncAddr(I, k) = IncAddr(J, k), then I = J.

(35) Let S be a homogeneous regular standard halting realistic von Neumann definite AMI over N with ins-loc-in-jump and I be an instruction of S. If IncAddr(I, k) = halt_{S}, then I = halt_{S}.

(36) Let S be a homogeneous regular standard halting realistic von Neumann definite AMI over N with ins-loc-in-jump and I be an instruction of S. If I is sequential, then IncAddr(I, k) is sequential.

(37) Let S be a homogeneous regular standard von Neumann definite AMI over N and I be an instruction of S. Then IncAddr(IncAddr(I, k), m) = IncAddr(I, k + m).

Let N be a set with non empty elements, let S be a homogeneous regular standard von Neumann definite AMI over N, let p be a programmed finite partial state of S, and let k be a natural number. The functor IncAddr(p, k) yields a finite partial state of S and is defined as follows:

(Def. 15) domIncAddr(p, k) = domp and for every natural number m such that

il_{S}(m) ∈ domp holds (IncAddr(p, k))(il_{S}(m)) = IncAddr(π_{il_{S}(m)}p, k). Let N be a set with non empty elements, let S be a homogeneous regular

standard von Neumann definite AMI over N, let F be a programmed finite partial state of S, and let k be a natural number. One can check that IncAddr(F, k) is programmed.

Let N be a set with non empty elements, let S be a homogeneous regular standard von Neumann definite AMI over N, let F be an empty programmed finite partial state of S, and let k be a natural number. One can verify that IncAddr(F, k) is empty.

Let N be a set with non empty elements, let S be a homogeneous regular standard von Neumann definite AMI over N, let F be a non empty programmed finite partial state of S, and let k be a natural number. One can verify that IncAddr(F, k) is non empty.

Let N be a set with non empty elements, let S be a homogeneous regular standard von Neumann definite AMI over N, let F be a lower programmed finite partial state of S, and let k be a natural number. One can verify that IncAddr(F, k) is lower.

The following propositions are true:

(38) Let S be a homogeneous regular standard von Neumann definite AMI over N and F be a programmed finite partial state of S. Then IncAddr(F, 0) = F.

(39) Let S be a homogeneous regular standard von Neumann definite AMI over N and F be a lower programmed finite partial state of S. Then IncAddr(IncAddr(F, k), m) = IncAddr(F, k + m).

Let N be a set with non empty elements, let S be a standard von Neumann definite AMI over N, let p be a finite partial state of S, and let k be a natural number. The functor Shift(p, k) yielding a finite partial state of S is defined by the conditions (Def. 16).

(Def. 16)(i) domShift(p, k) = {il_{S}(m + k); m ranges over natural numbers:

il_{S}(m) ∈ domp}, and (ii) for every natural number m such that il_{S}(m) ∈ domp holds

(Shift(p, k))(il_{S}(m + k)) = p(il_{S}(m)). Let N be a set with non empty elements, let S be a standard von Neumann

definite AMI over N, let F be a finite partial state of S, and let k be a natural number. Note that Shift(F, k) is programmed.

Let N be a set with non empty elements, let S be a standard von Neumann definite AMI over N, let F be an empty finite partial state of S, and let k be a natural number. One can check that Shift(F, k) is empty.

Let N be a set with non empty elements, let S be a standard von Neumann definite AMI over N, let F be a non empty programmed finite partial state of S, and let k be a natural number. One can check that Shift(F, k) is non empty.

We now state four propositions:

(40) Let S be a standard von Neumann definite AMI over N and F be a programmed finite partial state of S. Then Shift(F, 0) = F.

(41) Let S be a standard von Neumann definite AMI over N, F be a finite partial state of S, and k be a natural number. If k > 0, then il_{S}(0) ∉ domShift(F, k).

(42) Let S be a standard von Neumann definite AMI over N and F be a finite partial state of S. Then Shift(Shift(F, m), k) = Shift(F, m + k).

(43) Let S be a standard von Neumann definite AMI over N and F be a programmed finite partial state of S. Then domF ≈ domShift(F, k).

Let N be a set with non empty elements, let S be a homogeneous regular standard von Neumann definite AMI over N, and let I be an instruction of S. We say that I is IC-good if and only if:

(Def. 17) For every natural number k and for all states s_{1}, s_{2} of S such that s_{2} =

s_{1}+·(IC_{S}⟼→ . (IC_{(s_{1})} + k)) holds IC_{Exec(I,s_{1})} + k = IC_{Exec(IncAddr (I,k),s_{2})}. Let N be a set with non empty elements and let S be a homogeneous regular

standard von Neumann definite AMI over N. We say that S is IC-good if and only if:

(Def. 18) Every instruction of S is IC-good.

Let N be a set with non empty elements, let S be an AMI over N, and let I be an instruction of S. We say that I is Exec-preserving if and only if the condition (Def. 19) is satisfied.

(Def. 19) Let s_{1}, s_{2} be states of S. Suppose s_{1} and s_{2} are equal outside the instruction locations of S. Then Exec(I, s_{1}) and Exec(I, s_{2}) are equal outside the instruction locations of S.

Let N be a set with non empty elements and let S be an AMI over N. We say that S is Exec-preserving if and only if:

(Def. 20) Every instruction of S is Exec-preserving.

One can prove the following proposition

(44) Let S be a homogeneous regular standard von Neumann definite AMI over N with ins-loc-in-jump and I be an instruction of S. If I is sequential, then I is IC-good.

Let N be a set with non empty elements and let S be a homogeneous regular standard von Neumann definite AMI over N with ins-loc-in-jump. Observe that every instruction of S which is sequential is also IC-good.

The following proposition is true

(45) Let S be a homogeneous regular standard realistic von Neumann definite AMI over N with ins-loc-in-jump and I be an instruction of S. If I is halting, then I is IC-good.

Let N be a set with non empty elements and let S be a homogeneous regular standard realistic von Neumann definite AMI over N with ins-loc-in-jump. Note that every instruction of S which is halting is also IC-good.

The following proposition is true

(46) For every AMI S over N and for every instruction I of S such that I is

halting holds I is Exec-preserving. Let N be a set with non empty elements and let S be an AMI over N.

Observe that every instruction of S which is halting is also Exec-preserving.

Let N be a set with non empty elements. One can verify that STC(N) is IC-good and Exec-preserving.

Let N be a set with non empty elements. One can check that there exists a homogeneous regular standard von Neumann definite AMI over N which is halting, realistic, steady-programmed, programmable, explicit-jump-instruction, IC-good, and Exec-preserving and has ins-loc-in-jump and non trivial instruction locations.

Let N be a set with non empty elements and let S be an IC-good homogeneous regular standard von Neumann definite AMI over N. Note that every instruction of S is IC-good.

Let N be a set with non empty elements and let S be an Exec-preserving AMI over N. Note that every instruction of S is Exec-preserving.

Let N be a set with non empty elements, let S be a standard von Neumann definite AMI over N, and let F be a non empty programmed finite partial state of S. The functor CutLastLocF yielding a finite partial state of S is defined by:

(Def. 21) CutLastLocF = F \ (LastLocF ⟼→ . F (LastLocF)).

The following propositions are true:

(47) Let S be a standard von Neumann definite AMI over N and F be a non empty programmed finite partial state of S. Then domCutLastLocF = domF \ {LastLocF }.

(48) Let S be a standard von Neumann definite AMI over N and F be a non empty programmed finite partial state of S. Then domF = domCutLastLocF ∪ {LastLocF }.

Let N be a set with non empty elements, let S be a standard von Neumann definite AMI over N, and let F be a non empty trivial programmed finite partial state of S. Note that CutLastLocF is empty.

Let N be a set with non empty elements, let S be a standard von Neumann definite AMI over N, and let F be a non empty programmed finite partial state of S. Observe that CutLastLocF is programmed.

Let N be a set with non empty elements, let S be a standard von Neumann definite AMI over N, and let F be a lower non empty programmed finite partial state of S. Note that CutLastLocF is lower.

We now state three propositions:

(49) Let S be a standard von Neumann definite AMI over N and F be a non empty programmed finite partial state of S. Then cardCutLastLocF = cardF − 1.

(50) Let S be a homogeneous regular standard von Neumann definite AMI over N, F be a lower non empty programmed finite partial state of S, and G be a non empty programmed finite partial state of S. Then domCutLastLocF ∩ domShift(IncAddr(G, cardF − ′1), cardF − ′1) = ∅.

(51) Let S be a standard halting von Neumann definite AMI over N, F be a unique-halt lower non empty programmed finite partial state of S, and I be an instruction-location of S. If I ∈ domCutLastLocF, then (CutLastLocF)(I) ≠ halt_{S}.

Let N be a set with non empty elements, let S be a homogeneous regular standard von Neumann definite AMI over N, and let F, G be non empty programmed finite partial states of S. The functor F; G yields a finite partial state of S and is defined by:

(Def. 22) F; G = CutLastLocF +·Shift(IncAddr(G, cardF − ′1), cardF − ′1).

Let N be a set with non empty elements, let S be a homogeneous regular standard von Neumann definite AMI over N, and let F, G be non empty programmed finite partial states of S. Note that F; G is non empty and programmed.

We now state the proposition

(52) Let S be a homogeneous regular standard von Neumann definite AMI over N and F, G be lower non empty programmed finite partial states of S. Then card(F; G) = (cardF + cardG) − 1 and card(F; G) = (cardF + cardG) − ′1.

Let N be a set with non empty elements, let S be a homogeneous regular standard von Neumann definite AMI over N, and let F, G be lower non empty programmed finite partial states of S. Observe that F; G is lower.

We now state four propositions:

(53) Let S be a homogeneous regular standard von Neumann definite AMI over N and F, G be lower non empty programmed finite partial states of S. Then domF ⊆ dom(F; G).

(54) Let S be a homogeneous regular standard von Neumann definite AMI over N and F, G be lower non empty programmed finite partial states of S. Then CutLastLocF ⊆ CutLastLocF; G.

(55) Let S be a homogeneous regular standard von Neumann definite AMI over N and F, G be lower non empty programmed finite partial states of S. Then (F; G)(LastLocF) = (IncAddr(G, cardF − ′1))(il_{S}(0)).

(56) Let S be a homogeneous regular standard von Neumann definite AMI over N, F, G be lower non empty programmed finite partial states of S, and f be an instruction-location of S. If locnum(f) < cardF − 1, then (IncAddr(F, cardF − ′1))(f) = (IncAddr(F; G, cardF − ′1))(f).

Let N be a set with non empty elements, let S be a homogeneous regular standard realistic halting steady-programmed von Neumann definite AMI over N with ins-loc-in-jump, and let F, G be halt-ending lower non empty programmed finite partial states of S. Observe that F; G is halt-ending.

Let N be a set with non empty elements, let S be a homogeneous regular standard realistic halting steady-programmed von Neumann definite AMI over N with ins-loc-in-jump, and let F, G be halt-ending unique-halt lower non empty programmed finite partial states of S. Observe that F; G is unique-halt.

Let N be a set with non empty elements, let S be a homogeneous regular standard realistic halting steady-programmed von Neumann definite AMI over N with ins-loc-in-jump, and let F, G be pre-Macros of S. Then F; G is a pre-Macro of S.

Let N be a set with non empty elements, let S be a realistic halting steadyprogrammed IC-good Exec-preserving homogeneous regular standard von Neumann definite AMI over N, and let F, G be closed lower non empty programmed finite partial states of S. Observe that F; G is closed.

We now state several propositions:

on the composition of macro instructions of … 315

(57) Let S be a homogeneous regular standard halting realistic von Neumann definite AMI over N with ins-loc-in-jump. Then IncAddr(StopS, k) = StopS.

(58) For every standard halting von Neumann definite AMI S over N holds Shift(StopS, k) = il_{S}(k)⟼→ . halt_{S}.

(59) Let S be a homogeneous regular standard halting realistic von Neumann definite AMI over N with ins-loc-in-jump and F be a pre-Macro of S. Then F; StopS = F.

(60) Let S be a homogeneous regular standard halting von Neumann definite AMI over N and F be a pre-Macro of S. Then StopS; F = F.

(61) Let S be a homogeneous regular standard realistic halting steadyprogrammed von Neumann definite AMI over N with ins-loc-in-jump and F, G, H be pre-Macros of S. Then (F; G); H = F; (G; H).

References

[1] Grzegorz Bancerek. Cardinal numbers. Formalized Mathematics, 1(2):377–382, 1990.

[2] Grzegorz Bancerek. The fundamental properties of natural numbers. Formalized Mathematics, 1(1):41–46, 1990.

[3] Grzegorz Bancerek. König’s theorem. Formalized Mathematics, 1(3):589–593, 1990.

[4] Grzegorz Bancerek and Krzysztof Hryniewiecki. Segments of natural numbers and finite sequences. Formalized Mathematics, 1(1):107–114, 1990.

[5] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[6] Czesław Byliński. The modification of a function by a function and the iteration of the composition of a function. Formalized Mathematics, 1(3):521–527, 1990.

[7] Czesław Byliński. Some basic properties of sets. Formalized Mathematics, 1(1):47–53, 1990.

[8] Agata Darmochwał. Finite sets. Formalized Mathematics, 1(1):165–167, 1990.

[9] Krzysztof Hryniewiecki. Basic properties of real numbers. Formalized Mathematics, 1(1):35–40, 1990.

[10] Beata Madras. Products of many sorted algebras. Formalized Mathematics, 5(1):55–60, 1996.

[11] Yatsuka Nakamura and Andrzej Trybulec. A mathematical model of CPU. Formalized Mathematics, 3(2):151–160, 1992.

[12] Takaya Nishiyama and Yasuho Mizuhara. Binary arithmetics. Formalized Mathematics, 4(1):83–86, 1993.

[13] Beata Padlewska. Families of sets. Formalized Mathematics, 1(1):147–152, 1990.

[14] Andrzej Trybulec. Domains and their Cartesian products. Formalized Mathematics, 1(1):115–122, 1990.

[15] Andrzej Trybulec. Function domains and Frænkel operator. Formalized Mathematics, 1(3):495–500, 1990.

[16] Andrzej Trybulec. Tarski Grothendieck set theory. Formalized Mathematics, 1(1):9–11, 1990.

[17] Andrzej Trybulec and Yatsuka Nakamura. Some remarks on the simple concrete model of computer. Formalized Mathematics, 4(1):51–56, 1993.

[18] Andrzej Trybulec, Piotr Rudnicki, and Artur Korniłowicz. Standard ordering of instruction locations. Formalized Mathematics, 9(2):291–301, 2001.

[19] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[20] Zinaida Trybulec and Halina Święczkowska. Boolean properties of sets. Formalized Mathematics, 1(1):17–23, 1990.

316 artur korniłowicz

[21] Edmund Woronowicz. Relations and their basic properties. Formalized Mathematics,

1(1):73–83, 1990.

Received April 14, 2000

The Properties of Instructions of SCM over Ring

Artur Korniłowicz University of Białystok

MML Identifier: SCMRING3.

The papers [16], [9], [11], [12], [15], [19], [2], [3], [5], [6], [4], [1], [20], [21], [17], [8], [7], [13], [18], [14], and [10] provide the terminology and notation for this paper.

For simplicity, we adopt the following convention: R denotes a good ring, r denotes an element of the carrier of R, a, b denote Data-Locations of R, i_{1}, i_{2}, i_{3} denote instruction-locations of SCM (R), I denotes an instruction of SCM (R), s_{1}, s_{2} denote states of SCM (R), T denotes an instruction type of SCM (R), and k denotes a natural number.

Let us note that ℤ is infinite.

One can verify that INT.Ring is infinite and good.

Let us mention that there exists a 1-sorted structure which is strict and infinite.

Let us mention that there exists a ring which is strict, infinite, and good.

We now state the proposition

(1) ObjectKind(a) = the carrier of R.

Let R be a good ring, let l_{1}, l_{2} be Data-Locations of R, and let a, b be elements of R. Then [l_{1} ⟼→ a, l_{2} ⟼→ b] is a finite partial state of SCM (R).

We now state a number of propositions:

(2) a ∉ the instruction locations of SCM (R).

(3) a ≠ IC_{SCM (R)}.

(4) Data-Loc_{SCM} ≠ the instruction locations of SCM (R).

(5) For every object o of SCM (R) holds o = IC_{SCM (R)} or o ∈ the instruction locations of SCM (R) or o is a Data-Location of R.

(6) If i_{2} ≠ i_{3}, then Next(i_{2}) ≠ Next(i_{3}).

(7) If s_{1} and s_{2} are equal outside the instruction locations of SCM (R), then s_{1}(a) = s_{2}(a).

(8) InsCode(halt_{SCM (R)}) = 0.

(9) InsCode(a:=b) = 1.

(10) InsCode(AddTo(a, b)) = 2.

(11) InsCode(SubFrom(a, b)) = 3.

(12) InsCode(MultBy(a, b)) = 4.

(13) InsCode(a:=r) = 5.

(14) InsCode(goto i_{2}) = 6.

(15) InsCode(if a = 0 goto i_{2}) = 7.

(16) If InsCode(I) = 0, then I = halt_{SCM (R)}.

(17) If InsCode(I) = 1, then there exist a, b such that I = a:=b.

(18) If InsCode(I) = 2, then there exist a, b such that I = AddTo(a, b).

(19) If InsCode(I) = 3, then there exist a, b such that I = SubFrom(a, b).

(20) If InsCode(I) = 4, then there exist a, b such that I = MultBy(a, b).

(21) If InsCode(I) = 5, then there exist a, r such that I = a:=r.

(22) If InsCode(I) = 6, then there exists i_{3} such that I = goto i_{3}.

(23) If InsCode(I) = 7, then there exist a, i_{2} such that I = if a = 0 goto i_{2}.

(24) AddressPart(halt_{SCM (R)}) = ε.

(25) AddressPart(a:=b) = ⟨a, b⟩.

(26) AddressPart(AddTo(a, b)) = ⟨a, b⟩.

(27) AddressPart(SubFrom(a, b)) = ⟨a, b⟩.

(28) AddressPart(MultBy(a, b)) = ⟨a, b⟩.

(29) AddressPart(a:=r) = ⟨a, r⟩.

(30) AddressPart(goto i_{2}) = ⟨i_{2}⟩.

(31) AddressPart(if a = 0 goto i_{2}) = ⟨i_{2}, a⟩.

(32) If T = 0, then AddressPartsT = {0}.

Let us consider R, T. Observe that AddressPartsT is non empty.

We now state a number of propositions:

(33) If T = 1, then dom∏_{AddressParts T} = {1, 2}.

(34) If T = 2, then dom∏_{AddressParts T} = {1, 2}.

(35) If T = 3, then dom∏_{AddressParts T} = {1, 2}.

(36) If T = 4, then dom∏_{AddressParts T} = {1, 2}.

(37) If T = 5, then dom∏_{AddressParts T} = {1, 2}.

(38) If T = 6, then dom∏_{AddressParts T} = {1}.

(39) If T = 7, then dom∏_{AddressParts T} = {1, 2}.

(40) ∏_{AddressParts InsCode (a:=b)}(1) = Data-Loc_{SCM}.

(41) ∏_{AddressParts InsCode (a:=b)}(2) = Data-Loc_{SCM}.

(42) ∏_{AddressParts InsCode (AddTo(a,b))}(1) = Data-Loc_{SCM}.

(43) ∏_{AddressParts InsCode (AddTo(a,b))}(2) = Data-Loc_{SCM}.

(44) ∏_{AddressParts InsCode (SubFrom (a,b))}(1) = Data-Loc_{SCM}.

(45) ∏_{AddressParts InsCode (SubFrom (a,b))}(2) = Data-Loc_{SCM}.

(46) ∏_{AddressParts InsCode (MultBy (a,b))}(1) = Data-Loc_{SCM}.

(47) ∏_{AddressParts InsCode (MultBy (a,b))}(2) = Data-Loc_{SCM}.

(48) ∏_{AddressParts InsCode (a:=r)}(1) = Data-Loc_{SCM}.

(49) ∏_{AddressParts InsCode (a:=r)}(2) = the carrier of R.

(50) ∏_{AddressParts InsCode (goto i_{2})}(1) = the instruction locations of SCM (R).

(51) ∏_{AddressParts InsCode (if a=0 goto i_{2})}(1) = the instruction locations of SCM (R).

(52) ∏_{AddressParts InsCode (if a=0 goto i_{2})}(2) = Data-Loc_{SCM}.

(53) NIC(halt_{SCM (R)}, i_{1}) = {i_{1}}.

Let us consider R. One can check that JUMP(halt_{SCM (R)}) is empty.

Next we state the proposition

(54) NIC(a:=b, i_{1}) = {Next(i_{1})}.

Let us consider R, a, b. Observe that JUMP(a:=b) is empty.

We now state the proposition

(55) NIC(AddTo(a, b), i_{1}) = {Next(i_{1})}.

Let us consider R, a, b. One can check that JUMP(AddTo(a, b)) is empty. One can prove the following proposition

(56) NIC(SubFrom(a, b), i_{1}) = {Next(i_{1})}.

Let us consider R, a, b. Note that JUMP(SubFrom(a, b)) is empty.

Next we state the proposition

(57) NIC(MultBy(a, b), i_{1}) = {Next(i_{1})}.

Let us consider R, a, b. One can verify that JUMP(MultBy(a, b)) is empty. One can prove the following proposition

(58) NIC(a:=r, i_{1}) = {Next(i_{1})}.

Let us consider R, a, r. Note that JUMP(a:=r) is empty.

The following propositions are true:

(59) NIC(goto i_{2}, i_{1}) = {i_{2}}.

(60) JUMP(goto i_{2}) = {i_{2}}.

Let us consider R, i_{2}. Note that JUMP(goto i_{2}) is non empty and trivial. We now state two propositions:

(61) i_{2} ∈ NIC(if a = 0 goto i_{2}, i_{1}) and NIC(if a = 0 goto i_{2}, i_{1}) ⊆ {i_{2}, Next(i_{1})}.

(62) JUMP(if a = 0 goto i_{2}) = {i_{2}}.

Let us consider R, a, i_{2}. Observe that JUMP(if a = 0 goto i_{2}) is non empty and trivial.

One can prove the following two propositions:

(63) SUCC(i_{1}) = {i_{1}, Next(i_{1})}.

(64) Let f be a function from ℕ into the instruction locations of SCM (R).

Suppose that for every natural number k holds f(k) = i_{k}. Then

(i) f is bijective, and (ii) for every natural number k holds f(k + 1) ∈ SUCC(f(k)) and for every

natural number j such that f(j) ∈ SUCC(f(k)) holds k j. Let us consider R. Note that SCM (R) is standard. Next we state three propositions:

(65) il_{SCM (R)}(k) = i_{k}.

(66) Next(il_{SCM (R)}(k)) = il_{SCM (R)}(k + 1).

(67) Next(i_{1}) = NextLoci_{1}.

Let R be a good ring and let k be a natural number. The functor dl_{R}(k) yields a Data-Location of R and is defined as follows:

(Def. 1) dl_{R}(k) = d_{k}. Let us consider R. Observe that InsCode(halt_{SCM (R)}) is jump-only. Let us consider R. Note that halt_{SCM (R)} is jump-only. Let us consider R, i_{2}. Note that InsCode(goto i_{2}) is jump-only. Let us consider R, i_{2}. One can check that goto i_{2} is jump-only. Let us consider R, a, i_{2}. Observe that InsCode(if a = 0 goto i_{2}) is jump-

only.

Let us consider R, a, i_{2}. Note that if a = 0 goto i_{2} is jump-only. In the sequel S denotes a non trivial good ring, p, q denote Data-Locations

of S, and w denotes an element of the carrier of S. Let us consider S, p, q. One can check that InsCode(p:=q) is non jump-only. Let us consider S, p, q. One can check that p:=q is non jump-only. Let us consider S, p, q. Observe that InsCode(AddTo(p, q)) is non jump-only. Let us consider S, p, q. Note that AddTo(p, q) is non jump-only. Let us consider S, p, q. Note that InsCode(SubFrom(p, q)) is non jump-only. Let us consider S, p, q. Note that SubFrom(p, q) is non jump-only. Let us consider S, p, q. Observe that InsCode(MultBy(p, q)) is non jump-

only.

Let us consider S, p, q. One can verify that MultBy(p, q) is non jump-only. Let us consider S, p, w. Note that InsCode(p:=w) is non jump-only. Let us consider S, p, w. Note that p:=w is non jump-only. Let us consider R, a, b. Observe that a:=b is sequential. Let us consider R, a, b. Observe that AddTo(a, b) is sequential. Let us consider R, a, b. Note that SubFrom(a, b) is sequential.

the properties of instructions of scm over … 321

Let us consider R, a, b. One can verify that MultBy(a, b) is sequential. Let us consider R, a, r. Note that a:=r is sequential. Let us consider R, i_{2}. One can check that goto i_{2} is non sequential. Let us consider R, a, i_{2}. Observe that if a = 0 goto i_{2} is non sequential. Let us consider R, i_{2}. Note that goto i_{2} is non instruction location free. Let us consider R, a, i_{2}. Note that if a = 0 goto i_{2} is non instruction loca-

tion free.

Let us consider R. One can check that SCM (R) is homogeneous and explicitjump-instruction and has ins-loc-in-jump.

Let us consider R. Observe that SCM (R) is regular. Next we state two propositions:

(68) IncAddr(goto i_{2}, k) = goto il_{SCM (R)}(locnum(i_{2}) + k).

(69) IncAddr(if a = 0 goto i_{2}, k) = if a = 0 goto il_{SCM (R)}(locnum(i_{2})+k). Let us consider R. One can check that SCM (R) is IC-good and Exec-

preserving.

References

[1] Grzegorz Bancerek. The fundamental properties of natural numbers. Formalized Mathematics, 1(1):41–46, 1990.

[2] Grzegorz Bancerek. König’s theorem. Formalized Mathematics, 1(3):589–593, 1990.

[3] Grzegorz Bancerek and Krzysztof Hryniewiecki. Segments of natural numbers and finite sequences. Formalized Mathematics, 1(1):107–114, 1990.

[4] Grzegorz Bancerek and Andrzej Trybulec. Miscellaneous facts about functions. Formalized Mathematics, 5(4):485–492, 1996.

[5] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[6] Czesław Byliński. Functions from a set to a set. Formalized Mathematics, 1(1):153–164, 1990.

[7] Artur Korniłowicz. The basic properties of SCM over ring. Formalized Mathematics, 7(2):301–305, 1998.

[8] Artur Korniłowicz. The construction of SCM over ring. Formalized Mathematics, 7(2):295–300, 1998.

[9] Artur Korniłowicz. On the composition of macro instructions of standard computers. Formalized Mathematics, 9(2):303–316, 2001.

[10] Eugeniusz Kusak, Wojciech Leończuk, and Michał Muzalewski. Abelian groups, fields and vector spaces. Formalized Mathematics, 1(2):335–342, 1990.

[11] Yatsuka Nakamura and Andrzej Trybulec. A mathematical model of CPU. Formalized Mathematics, 3(2):151–160, 1992.

[12] Yatsuka Nakamura and Andrzej Trybulec. On a mathematical model of programs. Formalized Mathematics, 3(2):241–250, 1992.

[13] Yozo Toda. The formalization of simple graphs. Formalized Mathematics, 5(1):137–144, 1996.

[14] Andrzej Trybulec. Tarski Grothendieck set theory. Formalized Mathematics, 1(1):9–11, 1990.

[15] Andrzej Trybulec and Yatsuka Nakamura. Some remarks on the simple concrete model of computer. Formalized Mathematics, 4(1):51–56, 1993.

[16] Andrzej Trybulec, Piotr Rudnicki, and Artur Korniłowicz. Standard ordering of instruction locations. Formalized Mathematics, 9(2):291–301, 2001.

[17] Wojciech A. Trybulec. Vectors in real linear space. Formalized Mathematics, 1(2):291–296, 1990.

[18] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

322 artur korniłowicz

[19] Zinaida Trybulec and Halina Święczkowska. Boolean properties of sets. Formalized Mathematics, 1(1):17–23, 1990.

[20] Edmund Woronowicz. Relations and their basic properties. Formalized Mathematics, 1(1):73–83, 1990.

[21] Edmund Woronowicz. Relations defined on sets. Formalized Mathematics, 1(1):181–186, 1990.

Basic Facts about Inaccessible and Measurable Cardinals

Josef Urban Charles University Praha

Summary. Inaccessible, strongly inaccessible and measurable cardinals are defined, and it is proved that a measurable cardinal is strongly inaccessible. Filters on sets are defined, some facts related to the section about cardinals are proved. Existence of the Ulam matrix on non-limit cardinals is proved.

MML Identifier: CARD FIL.

The notation and terminology used here are introduced in the following papers: [13], [2], [1], [5], [9], [6], [7], [3], [4], [14], [10], [12], [11], and [8].

1. Some Facts about Filters and Ideals on Sets

One can verify that there exists an ordinal number which is limit.

Let X, Y be sets. Then X \ Y is a subset of X.

We now state the proposition

(1) For every set x and for every infinite set X holds \overline{\overline{\{x\}}} < \overline{\overline{X}} .

Let X be an infinite set. Observe that \overline{\overline{X}} is infinite.

The scheme ElemProp deals with a non empty set A, a set B, and a unary predicate P, and states that:

P[B] provided the following condition is met:

• B ∈ {y; y ranges over elements of A : P[y]}.

For simplicity, we follow the rules: N is a cardinal number, M is an aleph, X is a non empty set, Y, Z, Z_{1}, Z_{2}, Y_{1}, Y_{2} are subsets of X, and S is a subset of 2^{X}.

One can prove the following proposition (2)(i) {X} is a non empty subset of 2^{X}, (ii) ∅ ∉ {X}, and (iii) for all Y_{1}, Y_{2} holds if Y_{1} ∈ {X} and Y_{2} ∈ {X}, then Y_{1} ∩ Y_{2} ∈ {X} and

if Y_{1} ∈ {X} and Y_{1} ⊆ Y_{2}, then Y_{2} ∈ {X}. Let us consider X. A non empty subset of 2^{X} is said to be a filter of X if:

(Def. 1) ∅ ∉ it and for all Y_{1}, Y_{2} holds if Y_{1} ∈ it and Y_{2} ∈ it, then Y_{1} ∩ Y_{2} ∈ it

and if Y_{1} ∈ it and Y_{1} ⊆ Y_{2}, then Y_{2} ∈ it. The following propositions are true:

(3) Let F be a set. Then F is a filter of X if and only if the following conditions are satisfied:

(i) F is a non empty subset of 2^{X}, (ii) ∅ ∉ F, and (iii) for all Y_{1}, Y_{2} holds if Y_{1} ∈ F and Y_{2} ∈ F, then Y_{1} ∩ Y_{2} ∈ F and if

Y_{1} ∈ F and Y_{1} ⊆ Y_{2}, then Y_{2} ∈ F.

(4) {X} is a filter of X. In the sequel F, F_{1}, F_{2}, U_{1} denote filters of X. The following propositions are true:

(5) X ∈ F.

(6) If Y ∈ F, then X \ Y ∉ F.

(7) Let I be a non empty subset of 2^{X}. Suppose that for every Y holds Y ∈ I iff Y^{c} ∈ F. Then X ∉ I and for all Y_{1}, Y_{2} holds if Y_{1} ∈ I and Y_{2} ∈ I, then Y_{1} ∪ Y_{2} ∈ I and if Y_{1} ∈ I and Y_{2} ⊆ Y_{1}, then Y_{2} ∈ I.

Let us consider X, S. We introduce dualS as a synonym of S^{c}. In the sequel S is a non empty subset of 2^{X}. Let us consider X, S. One can verify that S^{c} is non empty. One can prove the following two propositions:

(8) dualS = {Y : Y^{c} ∈ S}.

(9) dualS = {Y^{c} : Y ∈ S}. Let us consider X. A non empty subset of 2^{X} is said to be an ideal of X if:

(Def. 2) X ∉ it and for all Y_{1}, Y_{2} holds if Y_{1} ∈ it and Y_{2} ∈ it, then Y_{1} ∪ Y_{2} ∈ it

and if Y_{1} ∈ it and Y_{2} ⊆ Y_{1}, then Y_{2} ∈ it. Let us consider X, F. Then dualF is an ideal of X. In the sequel I is an ideal of X. Next we state two propositions:

(10) For every Y holds Y ∉ F or Y ∉ dualF and for every Y holds Y ∉ I or Y ∉ dualI.

(11) ∅ ∈ I.

Let us consider X, N, S. We say that S is multiplicative with N if and only if:

(Def. 3) For every non empty set S_{1} such that S_{1} ⊆ S and \overline{\overline{S_{1}}} < N holds ⋂ S_{1} ∈

S. Let us consider X, N, S. We say that S is additive with N if and only if:

(Def. 4) For every non empty set S_{1} such that S_{1} ⊆ S and \overline{\overline{S_{1}}} < N holds ⋃ S_{1} ∈

S. Let us consider X, N, F. We introduce F is complete with N as a synonym

of F is multiplicative with N.

Let us consider X, N, I. We introduce I is complete with N as a synonym of I is additive with N.

One can prove the following proposition

(12) If S is multiplicative with N, then dualS is additive with N.

Let us consider X, F. We say that F is uniform if and only if: (Def. 5) For every Y such that Y ∈ F holds \overline{\overline{Y}} = \overline{\overline{X}} .

We say that F is principal if and only if: (Def. 6) There exists Y such that Y ∈ F and for every Z such that Z ∈ F holds

Y ⊆ Z. We say that F is an ultrafilter if and only if:

(Def. 7) For every Y holds Y ∈ F or X \ Y ∈ F.

Let us consider X, F, Z. The functor Extend Filter(F, Z) yields a non empty subset of 2^{X} and is defined as follows:

(Def. 8) Extend Filter(F, Z) = {Y : ⋁_{Y_{2}} (Y_{2} ∈ {Y_{1} ∩ Z : Y_{1} ∈ F } ∧ Y_{2} ⊆ Y)}.

We now state two propositions:

(13) For every Z_{1} holds Z_{1} ∈ Extend Filter(F, Z) iff there exists Z_{2} such that Z_{2} ∈ F and Z_{2} ∩ Z ⊆ Z_{1}.

(14) If for every Y_{1} such that Y_{1} ∈ F holds Y_{1} ∩ Z ≠ ∅, then Z ∈ Extend Filter(F, Z) and Extend Filter(F, Z) is a filter of X and F ⊆ Extend Filter(F, Z).

In the sequel S denotes a subset of 2^{X}. Let us consider X. The functor FiltersX yielding a non empty subset of 2^{2^{X}}

is defined by: (Def. 9) FiltersX = {S : S is a filter of X}.

We now state the proposition

(15) For every set S holds S ∈ FiltersX iff S is a filter of X.

In the sequel F_{3} is a non empty subset of FiltersX. One can prove the following propositions:

(16) If for all F_{1}, F_{2} such that F_{1} ∈ F_{3} and F_{2} ∈ F_{3} holds F_{1} ⊆ F_{2} or F_{2} ⊆ F_{1}, then ⋃ F_{3} is a filter of X.

(17) For every F there exists U_{1} such that F ⊆ U_{1} and U_{1} is an ultrafilter. In the sequel X denotes an infinite set, Y denotes a subset of X, and F, U_{1}

denote filters of X.

Let us consider X. The functor Frechet FilterX yielding a filter of X is defined by:

(Def. 10) Frechet FilterX = \{Y : \overline{\overline{X \ Y}} < \overline{\overline{X}} \}.

Let us consider X. The functor Frechet IdealX yields an ideal of X and is defined as follows:

(Def. 11) Frechet IdealX = dualFrechet FilterX.

One can prove the following propositions:

(18) Y ∈ Frechet FilterX iff \overline{\overline{X \ Y}} < \overline{\overline{X}} .

(19) Y ∈ Frechet IdealX iff \overline{\overline{Y}} < \overline{\overline{X}} .

(20) If Frechet FilterX ⊆ F, then F is uniform.

(21) If U_{1} is uniform and an ultrafilter, then Frechet FilterX ⊆ U_{1}. Let us consider X. One can check that there exists a filter of X which is non

principal and an ultrafilter.

Let us consider X. One can check that every filter of X which is uniform and an ultrafilter is also non principal.

Next we state two propositions:

(22) For every an ultrafilter filter F of X and for every Y holds Y ∈ F iff Y ∉ dualF.

(23) If F is non principal and an ultrafilter and F is complete with \overline{\overline{X}}, then F is uniform.

2. Inaccessible and Measurable Cardinals, Ulam Matrix

We now state the proposition

(24) N^{+} \overline{2}^{N}.

We say that Generalized Continuum Hypothesis holds if and only if: (Def. 12) For every N holds N^{+} = \overline{2}^{N}.

Let I_{1} be an aleph. We say that I_{1} is inaccessible if and only if: (Def. 13) I_{1} is regular and limit.

We introduce I_{1} is inaccessible cardinal as a synonym of I_{1} is inaccessible. Let us note that every aleph which is inaccessible is also regular and limit. We now state the proposition

(25) ℵ_{0} is inaccessible.

Let I_{1} be an aleph. We say that I_{1} is strong limit if and only if:

(Def. 14) For every N such that N < I_{1} holds \overline{2}^{N} < I_{1}.

We introduce I_{1} is strong limit cardinal as a synonym of I_{1} is strong limit.

Next we state two propositions:

(26) ℵ_{0} is strong limit.

(27) If M is strong limit, then M is limit.

One can check that every aleph which is strong limit is also limit. Next we state the proposition

(28) If Generalized Continuum Hypothesis holds, then if M is limit, then M

is strong limit. Let I_{1} be an aleph. We say that I_{1} is strongly inaccessible if and only if:

(Def. 15) I_{1} is regular and strong limit.

We introduce I_{1} is strongly inaccessible cardinal as a synonym of I_{1} is strongly inaccessible.

Let us observe that every aleph which is strongly inaccessible is also regular and strong limit.

The following propositions are true:

(29) ℵ_{0} is strongly inaccessible.

(30) If M is strongly inaccessible, then M is inaccessible.

Let us note that every aleph which is strongly inaccessible is also inaccessible. Next we state the proposition

(31) If Generalized Continuum Hypothesis holds, then if M is inaccessible,

then M is strongly inaccessible. Let us consider M. We say that M is measurable if and only if:

(Def. 16) There exists a filter U_{1} of M such that U_{1} is complete with M and U_{1}

is non principal and an ultrafilter. We introduce M is measurable cardinal as a synonym of M is measurable.

We now state two propositions:

(32) For every limit ordinal number A and for every set X such that X ⊆ A holds if supX = A, then ⋃ X = A.

(33) If M is measurable, then M is regular.

Let us consider M. Note that M^{+} is non limit. Let us note that there exists a cardinal number which is non limit and

infinite.

Let us observe that every aleph which is non limit is also regular. Let M be a non limit cardinal number. The functor predecessorM yields a

cardinal number and is defined as follows: (Def. 17) M = (predecessorM)^{+}.

Let M be a non limit aleph. One can check that predecessorM is infinite.

Let X be a set and let N, N_{1} be cardinal numbers. An Inf Matrix of N, N_{1}, X is a function from [: N, N_{1} :] into X.

For simplicity, we follow the rules: X denotes a set, M denotes a non limit aleph, F denotes a filter of M, N_{1}, N_{2} denote elements of predecessorM, K_{1}, K_{2} denote elements of M, and T denotes an Inf Matrix of predecessorM, M, 2^{M}.

Let us consider M, T. We say that T is Ulam Matrix of M if and only if the conditions (Def. 18) are satisfied.

(Def. 18)(i) For all N_{1}, K_{1}, K_{2} such that K_{1} ≠ K_{2} holds T (N_{1}, K_{1}) ∩ T (N_{1}, K_{2})

is empty, (ii) for all K_{1}, N_{1}, N_{2} such that N_{1} ≠ N_{2} holds T (N_{1}, K_{1}) ∩ T (N_{2}, K_{1}) is

empty, (iii) for every N_{1} holds \overline{\overline{M \ ⋃\{T (N_{1}, K_{1}) : K_{1} ∈ M\}}} predecessorM, and (iv) for every K_{1} holds \overline{\overline{M \ ⋃\{T (N_{1}, K_{1}) : N_{1} ∈ predecessorM\}}}

predecessorM. The following four propositions are true:

(34) There exists T such that T is Ulam Matrix of M.

(35) Let given M and I be an ideal of M. Suppose I is complete with M and Frechet IdealM ⊆ I. Then there exists a subset S of 2^{M} such that \overline{\overline{S}} = M and for every set X_{1} such that X_{1} ∈ S holds X_{1} ∉ I and for all sets X_{1}, X_{2} such that X_{1} ∈ S and X_{2} ∈ S and X_{1} ≠ X_{2} holds X_{1} ∩ X_{2} = ∅.

(36) For every X and for every cardinal number N such that N \overline{\overline{X}} there exists a set Y such that Y ⊆ X and \overline{\overline{Y}} = N.

(37) For every M it is not true that there exists F such that F is uniform

and an ultrafilter and F is complete with M. In the sequel M is an aleph. The following four propositions are true:

(38) If M is measurable, then M is limit.

(39) If M is measurable, then M is inaccessible.

(40) If M is measurable, then M is strong limit.

(41) If M is measurable, then M is strongly inaccessible.

References

[1] Grzegorz Bancerek. Cardinal arithmetics. Formalized Mathematics, 1(3):543–547, 1990.

[2] Grzegorz Bancerek. Cardinal numbers. Formalized Mathematics, 1(2):377–382, 1990.

[3] Grzegorz Bancerek. The ordinal numbers. Formalized Mathematics, 1(1):91–96, 1990.

[4] Grzegorz Bancerek. Sequences of ordinal numbers. Formalized Mathematics, 1(2):281– 290, 1990.

[5] Grzegorz Bancerek. On powers of cardinals. Formalized Mathematics, 3(1):89–93, 1992.

[6] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

basic facts about inaccessible and … 329

[7] Czesław Byliński. Functions from a set to a set. Formalized Mathematics, 1(1):153–164, 1990.

[8] Czesław Byliński. Some basic properties of sets. Formalized Mathematics, 1(1):47–53, 1990.

[9] Agata Darmochwał. Finite sets. Formalized Mathematics, 1(1):165–167, 1990.

[10] Beata Padlewska. Families of sets. Formalized Mathematics, 1(1):147–152, 1990.

[11] Andrzej Trybulec. Tarski Grothendieck set theory. Formalized Mathematics, 1(1):9–11, 1990.

[12] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[13] Zinaida Trybulec and Halina Święczkowska. Boolean properties of sets. Formalized Mathematics, 1(1):17–23, 1990.

[14] Edmund Woronowicz. Relations defined on sets. Formalized Mathematics, 1(1):181–186, 1990.

330 josef urban

The Evaluation of Multivariate Polynomials

Christoph Schwarzweller University of Tübingen

Andrzej Trybulec University of Białystok

MML Identifier: POLYNOM2.

The notation and terminology used in this paper are introduced in the following papers: [14], [5], [25], [3], [20], [7], [8], [6], [18], [22], [1], [19], [23], [2], [17], [15], [4], [9], [26], [21], [10], [24], [16], [12], [11], and [13].

1. Preliminaries

In this article we present several logical schemes. The scheme FinRecExD2 deals with a non empty set A, an element B of A, a natural number C, and a ternary predicate P, and states that:

There exists a finite sequence p of elements of A such that lenp = C but p_{1} = B or C = 0 but for every natural number n such that 1 n and n < C holds P[n, p_{n}, p_{n+1}]

provided the parameters meet the following conditions:

• Let n be a natural number. Suppose 1 n and n < C. Let x be an element of A. Then there exists an element y of A such that P[n, x, y], and

• Let n be a natural number. Suppose 1 n and n < C. Let x, y_{1}, y_{2} be elements of A. If P[n, x, y_{1}] and P[n, x, y_{2}], then y_{1} = y_{2}.

The scheme FinRecUnD2 deals with a non empty set A, an element B of A, a natural number C, finite sequences D, E of elements of A, and a ternary predicate P, and states that:

D = E provided the parameters meet the following requirements:

• Let n be a natural number. Suppose 1 n and n < C. Let x, y_{1}, y_{2} be elements of A. If P[n, x, y_{1}] and P[n, x, y_{2}], then y_{1} = y_{2}, • lenD = C but D_{1} = B or C = 0 but for every natural number n

such that 1 n and n < C holds P[n, D_{n}, D_{n+1}], and

• lenE = C but E_{1} = B or C = 0 but for every natural number n such that 1 n and n < C holds P[n, E_{n}, E_{n+1}].

The scheme FinInd deals with natural numbers A, B and a unary predicate P, and states that:

For every natural number i such that A i and i B holds P[i] provided the following conditions are satisfied:

• P[A], and

• For every natural number j such that A j and j < B holds if P[j], then P[j + 1].

The scheme FinInd2 deals with natural numbers A, B and a unary predicate P, and states that:

For every natural number i such that A i and i B holds P[i] provided the parameters satisfy the following conditions:

• P[A], and

• Let j be a natural number. Suppose A j and j < B. Suppose that for every natural number j′ such that A j′ and j′ j holds P[j′]. Then P[j + 1].

The scheme IndFinSeq deals with a set A, a finite sequence B of elements of A, and a unary predicate P, and states that:

For every natural number i such that 1 i and i lenB holds P[B(i)]

provided the following conditions are satisfied:

• P[B(1)], and

• For every natural number i such that 1 i and i < lenB holds if P[B(i)], then P[B(i + 1)].

Let us mention that every non empty double loop structure which is commutative and right distributive is also distributive.

The following two propositions are true:

(1) Let L be an add-associative right zeroed right complementable distributive non empty double loop structure and x, y be elements of the carrier of L. Then (− x) · y = − x · y.

(2) Let L be a unital associative non trivial non empty double loop structure, a be an element of the carrier of L, and n, m be natural numbers. Then power_{L}(a, n + m) = power_{L}(a, n) · power_{L}(a, m).

Let us note that every non empty multiplicative loop structure which is well unital is also unital.

One can prove the following proposition

(3) For every well unital non empty double loop structure L holds 1_{L} = 1_{L}.

Let us note that there exists a non empty double loop structure which is Abelian, right zeroed, add-associative, right complementable, unital, well unital, distributive, commutative, associative, and non trivial.

2. About Finite Sequences and the Functor SgmX

Next we state a number of propositions:

(4) Let D be a set, p be a finite sequence of elements of D, and k be a natural number. Suppose k ∈ domp. Let i be a natural number. If 1 i and i k, then i ∈ domp.

(5) Let L be a left zeroed right zeroed non empty loop structure, p be a finite sequence of elements of the carrier of L, and i be a natural number. Suppose i ∈ domp and for every natural number i′ such that i′ ∈ domp and i′ ≠ i holds p_{i′} = 0_{L}. Then ∑ p = p_{i}.

(6) Let L be an add-associative right zeroed right complementable distributive unital non empty double loop structure and p be a finite sequence of elements of the carrier of L. If there exists a natural number i such that i ∈ domp and p_{i} = 0_{L}, then ∏ p = 0_{L}.

(7) Let L be an Abelian add-associative non empty loop structure, a be an element of the carrier of L, and p, q be finite sequences of elements of the carrier of L. Suppose that

(i) lenp = lenq, and (ii) there exists a natural number i such that i ∈ domp and q_{i} = a + p_{i} and

for every natural number i′ such that i′∈ domp and i′ ≠ i holds q_{i′} = p_{i′}. Then ∑ q = a + ∑ p.

(8) Let L be a commutative associative non empty double loop structure, a be an element of the carrier of L, and p, q be finite sequences of elements of the carrier of L. Suppose that

(i) lenp = lenq, and (ii) there exists a natural number i such that i ∈ domp and q_{i} = a · p_{i} and

for every natural number i′ such that i′∈ domp and i′ ≠ i holds q_{i′} = p_{i′}. Then ∏ q = a · ∏ p.

(9) Let X be a set, A be an empty subset of X, and R be an order in X. If R linearly orders A, then SgmX(R, A) = ε.

(10) Let X be a set, A be a finite subset of X, and R be an order in X. Suppose R linearly orders A. Let i, j be natural numbers. If i ∈ domSgmX(R, A) and j ∈ domSgmX(R, A), then if (SgmX(R, A))_{i} = (SgmX(R, A))_{j}, then i = j.

(11) Let X be a set, A be a finite subset of X, and a be an element of X. Suppose a ∉ A. Let B be a finite subset of X. Suppose B = {a}∪A. Let R be an order in X. Suppose R linearly orders B. Let k be a natural number. Suppose k ∈ domSgmX(R, B) and (SgmX(R, B))_{k} = a. Let i be a natural number. If 1 i and i k − 1, then (SgmX(R, B))_{i} = (SgmX(R, A))_{i}.

(12) Let X be a set, A be a finite subset of X, and a be an element of X. Suppose a ∉ A. Let B be a finite subset of X. Suppose B = {a} ∪ A. Let R be an order in X. Suppose R linearly orders B. Let k be a natural number. Suppose k ∈ domSgmX(R, B) and (SgmX(R, B))_{k} = a. Let i be a natural number. If k i and i lenSgmX(R, A), then (SgmX(R, B))_{i+1} = (SgmX(R, A))_{i}.

(13) Let X be a non empty set, A be a finite subset of X, and a be an element of X. Suppose a ∉ A. Let B be a finite subset of X. Suppose B = {a}∪A. Let R be an order in X. Suppose R linearly orders B. Let k be a natural number. If k + 1 ∈ domSgmX(R, B) and (SgmX(R, B))_{k+1} = a, then SgmX(R, B) = Ins(SgmX(R, A), k, a).

Let n be an ordinal number. Then ^{⊆} _{n} is an order in n.

3. Evaluation of Bags

Next we state the proposition

(14) For every set X and for every bag b of X such that supportb = ∅ holds

b = EmptyBagX. Let X be a set and let b be a bag of X. We say that b is empty if and only

if: (Def. 1) b = EmptyBagX.

Let X be a non empty set. Observe that there exists a bag of X which is non empty.

Let X be a set and let b be a bag of X. Then supportb is a finite subset of X.

Next we state the proposition

(15) For every ordinal number n and for every bag b of n holds ^{⊆} _{n} linearly

orders supportb. Let X be a set, let x be a finite sequence of elements of X, and let b be a

bag of X. Then b · x is a partial function from ℕ to ℕ.

Let n be an ordinal number, let b be a bag of n, let L be a non trivial unital non empty double loop structure, and let x be a function from n into L. The functor eval(b, x) yields an element of L and is defined by the condition (Def. 2).

(Def. 2) There exists a finite sequence y of elements of the carrier of L such that (i) leny = lenSgmX(^{⊆} _{n}, supportb) + 1, (ii) y_{1} = 1_{L}, (iii) eval(b, x) = ∏ y, and (iv) for every natural number i such that 1 < i and i leny holds y_{i} =

power_{L}((x · SgmX(^{⊆} _{n}, supportb))_{i−1} , (b · SgmX(^{⊆} _{n}, supportb))_{i−1} ). Next we state three propositions:

(16) Let n be an ordinal number, L be a non trivial unital non empty double loop structure, and x be a function from n into L. Then eval(EmptyBagn, x) = 1_{L}.

(17) Let n be an ordinal number, L be a unital non trivial non empty double loop structure, u be a set, and b be a bag of n. If supportb = {u}, then for every function x from n into L holds eval(b, x) = power_{L}(x(u), b(u)).

(18) Let n be an ordinal number, L be a right zeroed add-associative right complementable unital distributive Abelian non trivial commutative associative non empty double loop structure, b_{1}, b_{2} be bags of n, and x be a function from n into L. Then eval(b_{1} + b_{2}, x) = eval(b_{1}, x) · eval(b_{2}, x).

4. Evaluation of Polynomials

Let n be an ordinal number, let L be an add-associative right zeroed right complementable non empty loop structure, and let p, q be Polynomials of n, L. Note that p − q is finite-Support.

The following proposition is true

(19) Let L be a right zeroed add-associative right complementable unital distributive non trivial non empty double loop structure, n be an ordinal number, and p be a Polynomial of n, L. If Supportp = ∅, then p = 0 (n, L).

Let n be an ordinal number, let L be a right zeroed add-associative right complementable unital distributive non trivial non empty double loop structure, and let p be a Polynomial of n, L. Note that Supportp is finite.

Next we state the proposition

(20) Let n be an ordinal number, L be a right zeroed add-associative right complementable unital distributive non trivial non empty double loop structure, and p be a Polynomial of n, L. Then BagOrdern linearly orders Supportp.

Let n be an ordinal number and let b be an element of Bagsn. The functor b^{T} yields a bag of n and is defined as follows:

(Def. 3) b^{T} = b.

Let n be an ordinal number, let L be a right zeroed add-associative right complementable unital distributive non trivial non empty double loop structure, let p be a Polynomial of n, L, and let x be a function from n into L. The functor eval(p, x) yields an element of L and is defined by the condition (Def. 4).

(Def. 4) There exists a finite sequence y of elements of the carrier of L such that (i) leny = lenSgmX(BagOrdern, Supportp) + 1, (ii) y_{1} = 0_{L}, (iii) eval(p, x) = ∑ y, and (iv) for every natural number i such that 1 < i and i leny holds y_{i} =

(p · SgmX(BagOrdern, Supportp))_{i−1} · eval(((SgmX(BagOrdern, Supportp))_{i−1} )^{T}, x).

One can prove the following propositions:

(21) Let n be an ordinal number, L be a right zeroed add-associative right complementable unital distributive non trivial non empty double loop structure, p be a Polynomial of n, L, and b be a bag of n. If Supportp = {b}, then for every function x from n into L holds eval(p, x) = p(b) · eval(b, x).

(22) Let n be an ordinal number, L be a right zeroed add-associative right complementable unital distributive non trivial non empty double loop structure, and x be a function from n into L. Then eval(0 (n, L), x) = 0_{L}.

(23) Let n be an ordinal number, L be a right zeroed add-associative right complementable unital distributive non trivial non empty double loop structure, and x be a function from n into L. Then eval(1 (n, L), x) = 1_{L}.

(24) Let n be an ordinal number, L be a right zeroed add-associative right complementable unital distributive non trivial non empty double loop structure, p be a Polynomial of n, L, and x be a function from n into L. Then eval(− p, x) = − eval(p, x).

(25) Let n be an ordinal number, L be a right zeroed add-associative right complementable Abelian unital distributive non trivial non empty double loop structure, p, q be Polynomials of n, L, and x be a function from n into L. Then eval(p + q, x) = eval(p, x) + eval(q, x).

(26) Let n be an ordinal number, L be a right zeroed add-associative right complementable Abelian unital distributive non trivial non empty double loop structure, p, q be Polynomials of n, L, and x be a function from n into L. Then eval(p − q, x) = eval(p, x) − eval(q, x).

(27) Let n be an ordinal number, L be a right zeroed add-associative right complementable Abelian unital distributive non trivial commutative associative non empty double loop structure, p, q be Polynomials of n, L, and x be a function from n into L. Then eval(p ∗ q, x) = eval(p, x) · eval(q, x).

5. Evaluation Homomorphism

Let n be an ordinal number, let L be a right zeroed add-associative right complementable unital distributive non trivial non empty double loop structure, and let x be a function from n into L. The functor Polynom-Evaluation(n, L, x) yielding a map from Polynom-Ring(n, L) into L is defined by:

(Def. 5) For every Polynomial p of n, L holds (Polynom-Evaluation(n, L, x))(p) =

eval(p, x). Let n be an ordinal number and let L be a right zeroed Abelian add-

associative right complementable well unital distributive associative non trivial non empty double loop structure. One can check that Polynom-Ring(n, L) is well unital.

Let n be an ordinal number, let L be an Abelian right zeroed add-associative right complementable well unital distributive associative non trivial non empty double loop structure, and let x be a function from n into L.

Note that Polynom-Evaluation(n, L, x) is unity-preserving.

Let n be an ordinal number, let L be a right zeroed add-associative right complementable Abelian unital distributive non trivial non empty double loop structure, and let x be a function from n into L. One can verify that Polynom-Evaluation(n, L, x) is additive.

Let n be an ordinal number, let L be a right zeroed add-associative right complementable Abelian unital distributive non trivial commutative associative non empty double loop structure, and let x be a function from n into L. Note that Polynom-Evaluation(n, L, x) is multiplicative.

Let n be an ordinal number, let L be a right zeroed add-associative right complementable Abelian well unital distributive non trivial commutative associative non empty double loop structure, and let x be a function from n into L. One can verify that Polynom-Evaluation(n, L, x) is ring homomorphism.

References

[1] Grzegorz Bancerek. The fundamental properties of natural numbers. Formalized Mathematics, 1(1):41–46, 1990.

[2] Grzegorz Bancerek. The ordinal numbers. Formalized Mathematics, 1(1):91–96, 1990.

[3] Grzegorz Bancerek and Krzysztof Hryniewiecki. Segments of natural numbers and finite sequences. Formalized Mathematics, 1(1):107–114, 1990.

[4] Józef Białas. Group and field definitions. Formalized Mathematics, 1(3):433–439, 1990.

[5] Czesław Byliński. Binary operations. Formalized Mathematics, 1(1):175–180, 1990.

[6] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[7] Czesław Byliński. Some properties of restrictions of finite sequences. Formalized Mathematics, 5(2):241–245, 1996.

[8] Agata Darmochwał. Finite sets. Formalized Mathematics, 1(1):165–167, 1990.

[9] Krzysztof Hryniewiecki. Basic properties of real numbers. Formalized Mathematics, 1(1):35–40, 1990.

338 christoph schwarzweller and andrzej trybulec

[10] Jarosław Kotowicz. Monotone real sequences. Subsequences. Formalized Mathematics, 1(3):471–475, 1990.

[11] Eugeniusz Kusak, Wojciech Leończuk, and Michał Muzalewski. Abelian groups, fields and vector spaces. Formalized Mathematics, 1(2):335–342, 1990.

[12] Beata Madras. On the concept of the triangulation. Formalized Mathematics, 5(3):457– 462, 1996.

[13] Michał Muzalewski. Construction of rings and left-, right-, and bi-modules over a ring. Formalized Mathematics, 2(1):3–11, 1991.

[14] Michał Muzalewski and Wojciech Skaba. From loops to abelian multiplicative groups with zero. Formalized Mathematics, 1(5):833–840, 1990.

[15] Piotr Rudnicki and Andrzej Trybulec. Multivariate polynomials with arbitrary number of variables. Formalized Mathematics, 9(1):95–110, 2001.

[16] Andrzej Trybulec. Tarski Grothendieck set theory. Formalized Mathematics, 1(1):9–11, 1990.

[17] Andrzej Trybulec. Many-sorted sets. Formalized Mathematics, 4(1):15–22, 1993.

[18] Wojciech A. Trybulec. Groups. Formalized Mathematics, 1(5):821–827, 1990.

[19] Wojciech A. Trybulec. Partially ordered sets. Formalized Mathematics, 1(2):313–319, 1990.

[20] Wojciech A. Trybulec. Pigeon hole principle. Formalized Mathematics, 1(3):575–579, 1990.

[21] Wojciech A. Trybulec. Vectors in real linear space. Formalized Mathematics, 1(2):291–296, 1990.

[22] Wojciech A. Trybulec. Lattice of subgroups of a group. Frattini subgroup. Formalized Mathematics, 2(1):41–47, 1991.

[23] Wojciech A. Trybulec and Grzegorz Bancerek. Kuratowski - Zorn lemma. Formalized Mathematics, 1(2):387–393, 1990.

[24] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[25] Zinaida Trybulec and Halina Święczkowska. Boolean properties of sets. Formalized Mathematics, 1(1):17–23, 1990.

[26] Edmund Woronowicz. Relations defined on sets. Formalized Mathematics, 1(1):181–186, 1990.

The Ring of Polynomials

Robert Milewski University of Białystok

MML Identifier: POLYNOM3.

The papers [12], [16], [13], [21], [2], [3], [7], [17], [4], [5], [10], [18], [1], [14], [15], [22], [23], [19], [6], [20], [8], [11], and [9] provide the notation and terminology for this paper.

1. Preliminaries

The following four propositions are true:

(1) Let L be an add-associative right zeroed right complementable non empty loop structure and p be a finite sequence of elements of the carrier of L. If for every natural number i such that i ∈ domp holds p(i) = 0_{L}, then ∑ p = 0_{L}.

(2) Let V be an Abelian add-associative right zeroed non empty loop structure and p be a finite sequence of elements of the carrier of V. Then ∑ p = ∑ Rev(p).

(3) For every finite sequence p of elements of ℝ holds ∑ p = ∑ Rev(p).

(4) For every finite sequence p of elements of ℕ and for every natural number i such that i ∈ domp holds ∑ p p(i).

Let D be a non empty set, let i be a natural number, and let p be a finite sequence of elements of D. Then p_{↾i} is a finite sequence of elements of D.

Let D be a non empty set and let a, b be elements of D. Then ⟨a, b⟩ is an element of D^{2}.

Let D be a non empty set, let k, n be natural numbers, let p be an element of D^{k}, and let q be an element of D^{n}. Then p^{⌢} q is an element of D^{k+n}.

Let D be a non empty set and let n be a natural number. One can check that every finite sequence of elements of D^{n} is finite sequence yielding.

Let D be a non empty set, let k, n be natural numbers, let p be a finite sequence of elements of D^{k}, and let q be a finite sequence of elements of D^{n}. Then p^{⌢} q is an element of (D^{k+n})^{∗}.

In this article we present several logical schemes. The scheme NonUniqPiSeqExD deals with a non empty set A, a natural number B, and a binary predicate P, and states that:

There exists a finite sequence p of elements of A such that domp = SegB and for every natural number k such that k ∈ SegB holds P[k, π_{k}p]

provided the following condition is satisfied:

• For every natural number k such that k ∈ SegB there exists an element d of A such that P[k, d].

The scheme SeqOfSeqLambdaD deals with a non empty set A, a natural number B, a unary functor F yielding a natural number, and a binary functor G yielding an element of A, and states that:

There exists a finite sequence p of elements of A^{∗} such that

(i) lenp = B, and (ii) for every natural number k such that k ∈ SegB holds lenπ_{k}p = F(k) and for every natural number n such that n ∈ domπ_{k}p holds (π_{k}p)(n) = G(k, n)

for all values of the parameters.

2. The Lexicographic Order of Finite Sequences

Let n be a natural number and let p, q be elements of ℕ^{n}. The predicate p < q is defined by the condition (Def. 1).

(Def. 1) There exists a natural number i such that i ∈ Segn and p(i) < q(i) and

for every natural number k such that 1 k and k < i holds p(k) = q(k). Let us note that the predicate p < q is antisymmetric. We introduce q > p as a synonym of p < q.

Let n be a natural number and let p, q be elements of ℕ^{n}. The predicate p q is defined by:

(Def. 2) p < q or p = q.

Let us note that the predicate p q is reflexive. We introduce q p as a synonym of p q.

We now state three propositions:

(5) Let n be a natural number and p, q, r be elements of ℕ^{n}. Then

(i) if p < q and q < r, then p < r, and (ii) if p < q and q r or p q and q < r or p q and q r, then p r.

(6) Let n be a natural number and p, q be elements of ℕ^{n}. Suppose p ≠ q. Then there exists a natural number i such that i ∈ Segn and p(i) ≠ q(i) and for every natural number k such that 1 k and k < i holds p(k) = q(k).

(7) For every natural number n and for all elements p, q of ℕ^{n} holds p q or p > q.

Let n be a natural number. The functor TuplesOrdern yielding an order in ℕ^{n} is defined by:

(Def. 3) For all elements p, q of ℕ^{n} holds ⟨⟨p, q⟩⟩∈ TuplesOrdern iff p q. Let n be a natural number. Note that TuplesOrdern is linear-order.

3. Decomposition of Natural Numbers

Let i be a non empty natural number and let n be a natural number. The functor Decomp(n, i) yielding a finite sequence of elements of ℕ^{i} is defined by:

(Def. 4) There exists a finite subset A of ℕ^{i} such that Decomp(n, i) = SgmX(TuplesOrderi, A) and for every element p of ℕ^{i} holds p ∈ A iff ∑ p = n.

Let i be a non empty natural number and let n be a natural number. Note that Decomp(n, i) is non empty one-to-one and finite sequence yielding.

The following propositions are true:

(8) For every natural number n holds lenDecomp(n, 1) = 1.

(9) For every natural number n holds lenDecomp(n, 2) = n + 1.

(10) For every natural number n holds Decomp(n, 1) = ⟨⟨n⟩⟩.

(11) For all natural numbers i, j, n, k_{1}, k_{2} such that (Decomp(n, 2))(i) = ⟨k_{1}, n − ′k_{1}⟩ and (Decomp(n, 2))(j) = ⟨k_{2}, n − ′k_{2}⟩ holds i < j iff k_{1} < k_{2}.

(12) For all natural numbers i, n, k_{1}, k_{2} such that (Decomp(n, 2))(i) = ⟨k_{1}, n − ′k_{1}⟩ and (Decomp(n, 2))(i + 1) = ⟨k_{2}, n − ′k_{2}⟩ holds k_{2} = k_{1} + 1.

(13) For every natural number n holds (Decomp(n, 2))(1) = ⟨0, n⟩.

(14) For all natural numbers n, i such that i ∈ Seg(n + 1) holds

(Decomp(n, 2))(i) = ⟨i − ′1, (n + 1) − ′i⟩. Let L be a non empty groupoid, let p, q, r be sequences of L, and let t be a

finite sequence of elements of ℕ^{3}. The functor prodTuples(p, q, r, t) yielding an element of (the carrier of L)^{∗} is defined by:

(Def. 5) lenprodTuples(p, q, r, t) = lent and for every natural number k such that k ∈ Seglent holds (prodTuples(p, q, r, t))(k) = p(π_{1}π_{k}t) · q(π_{2}π_{k}t) · r(π_{3}π_{k}t).

One can prove the following propositions:

(15) Let L be a non empty groupoid, p, q, r be sequences of L, t be a finite sequence of elements of ℕ^{3}, P be a permutation of domt, and t_{1} be a finite sequence of elements of ℕ^{3}. If t_{1} = t·P, then prodTuples(p, q, r, t_{1}) = prodTuples(p, q, r, t) · P.

(16) For every set D and for every finite sequence f of elements of D^{∗} and for every natural number i holds \overline{\overline{f↾i}} = \overline{\overline{f}} ↾i.

(17) Let p be a finite sequence of elements of ℝ and q be a finite sequence of elements of ℕ. If p = q, then for every natural number i holds p↾i = q↾i.

(18) For every finite sequence p of elements of ℕ and for all natural numbers i, j such that i j holds ∑(p↾i) ∑(p↾j).

(19) Let p be a finite sequence of elements of ℝ and i be a natural number. If i < lenp, then p↾(i + 1) = (p↾i)^{⌢} ⟨p(i + 1)⟩.

(20) Let p be a finite sequence of elements of ℝ and i be a natural number. If i < lenp, then ∑(p↾(i + 1)) = ∑(p↾i) + p(i + 1).

(21) Let p be a finite sequence of elements of ℕ and i, j, k_{1}, k_{2} be natural numbers. Suppose i < lenp and j < lenp and p(i + 1) ≠ 0 and p(j + 1) ≠ 0 and 1 k_{1} and 1 k_{2} and k_{1} p(i + 1) and k_{2} p(j + 1) and ∑(p↾i) + k_{1} = ∑(p↾j) + k_{2}. Then i = j and k_{1} = k_{2}.

(22) Let D_{1}, D_{2} be sets, f_{1} be a finite sequence of elements of D_{1}^{∗}, f_{2} be a finite sequence of elements of D_{2}^{∗}, and i_{1}, i_{2}, j_{1}, j_{2} be natural numbers. Suppose i_{1} ∈ domf_{1} and i_{2} ∈ domf_{2} and j_{1} ∈ domf_{1}(i_{1}) and j_{2} ∈ domf_{2}(i_{2}) and \overline{\overline{f_{1}}} = \overline{\overline{f_{2}}} and ∑(\overline{\overline{f_{1}}} ↾(i_{1} − ′1)) + j_{1} = ∑(\overline{\overline{f_{2}}} ↾(i_{2} − ′1)) + j_{2}. Then i_{1} = i_{2} and j_{1} = j_{2}.

4. Polynomials

Let L be a non empty zero structure. A Polynomial of L is an algebraic sequence of L.

The following proposition is true

(23) Let L be a non empty zero structure, p be a Polynomial of L, and n be a natural number. Then n lenp if and only if the length of p is at most n.

Now we present two schemes. The scheme PolynomialLambda deals with a non empty loop structure A, a natural number B, and a unary functor F yielding an element of the carrier of A, and states that:

There exists a Polynomial p of A such that lenp B and for every natural number n such that n < B holds p(n) = F(n)

for all values of the parameters.

The scheme ExDLoopStrSeq deals with a non empty loop structure A and a unary functor F yielding an element of the carrier of A, and states that:

There exists a sequence S of A such that for every natural number n holds S(n) = F(n)

for all values of the parameters.

Let L be a non empty loop structure and let p, q be sequences of L. The functor p + q yielding a sequence of L is defined by:

(Def. 6) For every natural number n holds (p + q)(n) = p(n) + q(n).

Let L be a right zeroed non empty loop structure and let p, q be Polynomials of L. Note that p + q is finite-Support.

One can prove the following two propositions:

(24) Let L be a right zeroed non empty loop structure, p, q be Polynomials of L, and n be a natural number. Suppose the length of p is at most n and the length of q is at most n. Then the length of p + q is at most n.

(25) For every right zeroed non empty loop structure L and for all Polyno-

mials p, q of L holds support(p + q) ⊆ supportp ∪ supportq. Let L be an Abelian non empty loop structure and let p, q be sequences of

L. Let us note that the functor p + q is commutative.

One can prove the following proposition

(26) For every add-associative non empty loop structure L and for all sequ-

ences p, q, r of L holds (p + q) + r = p + (q + r). Let L be a non empty loop structure and let p be a sequence of L. The

functor − p yielding a sequence of L is defined by: (Def. 7) For every natural number n holds (− p)(n) = − p(n).

Let L be an add-associative right zeroed right complementable non empty loop structure and let p be a Polynomial of L. Observe that − p is finite-Support.

Let L be a non empty loop structure and let p, q be sequences of L. The functor p − q yields a sequence of L and is defined as follows:

(Def. 8) p − q = p + − q.

Let L be an add-associative right zeroed right complementable non empty loop structure and let p, q be Polynomials of L. Note that p−q is finite-Support.

Next we state the proposition

(27) Let L be a non empty loop structure, p, q be sequences of L, and n be

a natural number. Then (p − q)(n) = p(n) − q(n). Let L be a non empty zero structure. The functor 0. L yielding a sequence

of L is defined as follows: (Def. 9) 0. L = ℕ ⟼→ 0_{L}.

Let L be a non empty zero structure. One can check that 0. L is finite-Support.

We now state three propositions:

(28) For every non empty zero structure L and for every natural number n holds (0. L)(n) = 0_{L}.

(29) For every right zeroed non empty loop structure L and for every sequence p of L holds p + 0. L = p.

(30) Let L be an add-associative right zeroed right complementable non

empty loop structure and p be a sequence of L. Then p − p = 0. L. Let L be a non empty multiplicative loop with zero structure. The functor

1. L yielding a sequence of L is defined by: (Def. 10) 1. L = 0. L +·(0, 1_{L}).

Let L be a non empty multiplicative loop with zero structure. Observe that 1. L is finite-Support.

Next we state the proposition

(31) Let L be a non empty multiplicative loop with zero structure. Then (1. L)(0) = 1_{L} and for every natural number n such that n ≠ 0 holds (1. L)(n) = 0_{L}.

Let L be a non empty double loop structure and let p, q be sequences of L. The functor p∗q yields a sequence of L and is defined by the condition (Def. 11).

(Def. 11) Let i be a natural number. Then there exists a finite sequence r of elements of the carrier of L such that lenr = i + 1 and (p ∗ q)(i) = ∑ r and for every natural number k such that k ∈ domr holds r(k) = p(k − ′ 1) · q((i + 1) − ′k).

Let L be an add-associative right zeroed right complementable distributive non empty double loop structure and let p, q be Polynomials of L. Note that p ∗ q is finite-Support.

Next we state three propositions:

(32) Let L be an Abelian add-associative right zeroed right complementable right distributive non empty double loop structure and p, q, r be sequences of L. Then p ∗ (q + r) = p ∗ q + p ∗ r.

(33) Let L be an Abelian add-associative right zeroed right complementable left distributive non empty double loop structure and p, q, r be sequences of L. Then (p + q) ∗ r = p ∗ r + q ∗ r.

(34) Let L be an Abelian add-associative right zeroed right complementable unital associative distributive non empty double loop structure and p, q, r be sequences of L. Then (p ∗ q) ∗ r = p ∗ (q ∗ r).

Let L be an Abelian add-associative right zeroed commutative non empty double loop structure and let p, q be sequences of L. Let us observe that the functor p ∗ q is commutative.

We now state two propositions:

(35) Let L be an add-associative right zeroed right complementable right distributive non empty double loop structure and p be a sequence of L.

Then p ∗ 0. L = 0. L.

(36) Let L be an add-associative right zeroed right unital right complementable right distributive non empty double loop structure and p be a sequence of L. Then p ∗ 1. L = p.

5. The Ring of Polynomials

Let L be an add-associative right zeroed right complementable distributive non empty double loop structure. The functor Polynom-RingL yields a strict non empty double loop structure and is defined by the conditions (Def. 12).

(Def. 12)(i) For every set x holds x ∈ the carrier of Polynom-RingL iff x is a

Polynomial of L, (ii) for all elements x, y of the carrier of Polynom-RingL and for all sequ-

ences p, q of L such that x = p and y = q holds x + y = p + q, (iii) for all elements x, y of the carrier of Polynom-RingL and for all sequ-

ences p, q of L such that x = p and y = q holds x · y = p ∗ q, (iv) 0_{Polynom-Ring L} = 0. L, and

(v) 1_{Polynom-Ring L} = 1. L.

Let L be an Abelian add-associative right zeroed right complementable distributive non empty double loop structure. Observe that Polynom-RingL is Abelian.

Let L be an add-associative right zeroed right complementable distributive non empty double loop structure. One can check the following observations:

∗ Polynom-RingL is add-associative,

∗ Polynom-RingL is right zeroed, and

∗ Polynom-RingL is right complementable.

Let L be an Abelian add-associative right zeroed right complementable commutative distributive non empty double loop structure. Note that Polynom-RingL is commutative.

Let L be an Abelian add-associative right zeroed right complementable unital associative distributive non empty double loop structure. Observe that Polynom-RingL is associative.

Let L be an add-associative right zeroed right complementable right unital distributive non empty double loop structure. Observe that Polynom-RingL is right unital.

Let L be an Abelian add-associative right zeroed right complementable distributive non empty double loop structure. Note that Polynom-RingL is right distributive and Polynom-RingL is left distributive.

346 robert milewski

References

[1] Grzegorz Bancerek. The fundamental properties of natural numbers. Formalized Mathematics, 1(1):41–46, 1990.

[2] Grzegorz Bancerek and Krzysztof Hryniewiecki. Segments of natural numbers and finite sequences. Formalized Mathematics, 1(1):107–114, 1990.

[3] Czesław Byliński. Finite sequences and tuples of elements of a non-empty sets. Formalized Mathematics, 1(3):529–536, 1990.

[4] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[5] Czesław Byliński. Functions from a set to a set. Formalized Mathematics, 1(1):153–164, 1990.

[6] Czesław Byliński. The sum and product of finite sequences of real numbers. Formalized Mathematics, 1(4):661–668, 1990.

[7] Czesław Byliński. Some properties of restrictions of finite sequences. Formalized Mathematics, 5(2):241–245, 1996.

[8] Agata Darmochwał and Yatsuka Nakamura. The topological space E_{T}^{2}. Arcs, line segments and special polygonal arcs. Formalized Mathematics, 2(5):617–621, 1991.

[9] Andrzej Kondracki. The Chinese Remainder Theorem. Formalized Mathematics, 6(4):573–577, 1997.

[10] Jarosław Kotowicz and Yatsuka Nakamura. Introduction to Go-board - part I. Formalized Mathematics, 3(1):107–115, 1992.

[11] Eugeniusz Kusak, Wojciech Leończuk, and Michał Muzalewski. Abelian groups, fields and vector spaces. Formalized Mathematics, 1(2):335–342, 1990.

[12] Michał Muzalewski and Lesław W. Szczerba. Construction of finite sequences over ring and left-, right-, and bi-modules over a ring. Formalized Mathematics, 2(1):97–104, 1991.

[13] Takaya Nishiyama and Yasuho Mizuhara. Binary arithmetics. Formalized Mathematics, 4(1):83–86, 1993.

[14] Jan Popiołek. Real normed space. Formalized Mathematics, 2(1):111–115, 1991.

[15] Piotr Rudnicki and Andrzej Trybulec. Multivariate polynomials with arbitrary number of variables. Formalized Mathematics, 9(1):95–110, 2001.

[16] Wojciech Skaba and Michał Muzalewski. From double loops to fields. Formalized Mathematics, 2(1):185–191, 1991.

[17] Wojciech A. Trybulec. Binary operations on finite sequences. Formalized Mathematics, 1(5):979–981, 1990.

[18] Wojciech A. Trybulec. Groups. Formalized Mathematics, 1(5):821–827, 1990.

[19] Wojciech A. Trybulec. Vectors in real linear space. Formalized Mathematics, 1(2):291–296, 1990.

[20] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[21] Zinaida Trybulec and Halina Święczkowska. Boolean properties of sets. Formalized Mathematics, 1(1):17–23, 1990.

[22] Edmund Woronowicz. Relations and their basic properties. Formalized Mathematics, 1(1):73–83, 1990.

[23] Edmund Woronowicz. Relations defined on sets. Formalized Mathematics, 1(1):181–186, 1990.

Solving Roots of Polynomial Equations of Degree 2 and 3 with Real Coefficients

Liang Xiquan Northeast Normal University China

Summary. In this paper, we describe the definition of the first, second, and third degree algebraic equations and their properties. In Section 1, we defined the simple first-degree and second-degree (quadratic) equation and discussed the relation between the roots of each equation and their coefficients. Also, we clarified the form of the root within the range of real numbers. Furthermore, the extraction of the root using the discriminant of equation is clarified. In Section 2, we defined the third-degree (cubic) equation and clarified the relation between the three roots of this equation and its coefficient. Also, the form of these roots for various conditions is discussed. This solution is known as the Cardano solution.

MML Identifier: POLYEQ 1.

The terminology and notation used in this paper are introduced in the following articles: [4], [3], [2], [1], [5], and [6].

1. Equation of Degree 1 and 2

Let a, b, x be real numbers. The functor Poly1(a, b, x) yields a real number and is defined as follows:

(Def. 1) Poly1(a, b, x) = a · x + b. One can prove the following three propositions:

(1) For all real numbers a, b, x such that a ≠ 0 holds if Poly1(a, b, x) = 0, then x = − \frac{b}{a}.

(2) For every real number x holds Poly1(0, 0, x) = 0.

(3) For all real numbers a, b, x such that a = 0 and b ≠ 0 it is not true that there exists a real number x such that Poly1(a, b, x) = 0.

Let a, b, c, x be real numbers. The functor Poly2(a, b, c, x) yields a real number and is defined by:

(Def. 2) Poly2(a, b, c, x) = a · x^{2} + b · x + c.

One can prove the following propositions:

(4) For all real numbers a, b, c, a′, b′, c′ such that for every real number x holds Poly2(a, b, c, x) = Poly2(a′, b′, c′, x) holds a = a′ and b = b′ and c = c′.

(5) Let a, b, c be real numbers. Suppose a ≠ 0 and Δ(a, b, c) 0. Let

x be a real number. If Poly2(a, b, c, x) = 0, then x = ^{\frac{− b+\sqrt{Δ(a,b,c)}}{2·a}} or

x = ^{\frac{− b−\sqrt{Δ(a,b,c)}}{2·a}} .

(6) For all real numbers a, b, c, x such that a ≠ 0 and Δ(a, b, c) = 0 holds if Poly2(a, b, c, x) = 0, then x = − \frac{b}{2·a}.

(7) For all real numbers a, b, c such that a ≠ 0 and Δ(a, b, c) < 0 it is not true that there exists a real number x such that Poly2(a, b, c, x) = 0.

(8) For all real numbers a, b, c, x such that a = 0 and b ≠ 0 holds if for every real number x holds Poly2(a, b, c, x) = 0, then x = − \frac{c}{b}.

(9) For all real numbers a, b, c, x such that a = 0 and b = 0 and c = 0 holds Poly2(a, b, c, x) = 0.

(10) For all real numbers a, b, c such that a = 0 and b = 0 and c ≠ 0 it is not

true that there exists a real number x such that Poly2(a, b, c, x) = 0. Let a, x, x_{1}, x_{2} be real numbers. The functor Quard(a, x_{1}, x_{2}, x) yielding a

real number is defined by: (Def. 3) Quard(a, x_{1}, x_{2}, x) = a · ((x − x_{1}) · (x − x_{2})).

Next we state the proposition

(11) Let a, b, c, x, x_{1}, x_{2} be real numbers. Suppose a ≠ 0. Suppose that for every real number x holds Poly2(a, b, c, x) = Quard(a, x_{1}, x_{2}, x). Then \frac{b}{a} = − (x_{1} + x_{2}) and \frac{c}{a} = x_{1} · x_{2}.

2. Equation of Degree 3

Let a, b, c, d, x be real numbers. The functor Poly3(a, b, c, d, x) yielding a real number is defined as follows:

(Def. 4) Poly3(a, b, c, d, x) = a · x_{ℕ}^{3} + b · x^{2} + c · x + d. Next we state the proposition (12) Let a, b, c, d, a′, b′, c′, d′ be real numbers. Suppose that for every real

number x holds Poly3(a, b, c, d, x) = Poly3(a′, b′, c′, d′, x). Then a = a′and b = b′ and c = c′ and d = d′.

Let a, x, x_{1}, x_{2}, x_{3} be real numbers. The functor Tri(a, x_{1}, x_{2}, x_{3}, x) yields a real number and is defined as follows:

(Def. 5) Tri(a, x_{1}, x_{2}, x_{3}, x) = a · ((x − x_{1}) · (x − x_{2}) · (x − x_{3})).

One can prove the following propositions:

(13) Let a, b, c, d, x, x_{1}, x_{2}, x_{3} be real numbers. Suppose a ≠ 0. Suppose that for every real number x holds Poly3(a, b, c, d, x) = Tri(a, x_{1}, x_{2}, x_{3}, x). Then \frac{b}{a} = − (x_{1} + x_{2} + x_{3}) and \frac{c}{a} = x_{1} · x_{2} + x_{2} · x_{3} + x_{1} · x_{3} and \frac{d}{a} = − x_{1} · x_{2} · x_{3}.

(14) For all real numbers y, h holds (y +h)_{ℕ}^{3} = (y_{ℕ}^{3})+(3·h·y^{2} +3·h^{2} ·y)+h_{ℕ}^{3}.

(15) Let a, b, c, d, x be real numbers. Suppose a ≠ 0. Suppose Poly3(a, b, c, d, x) = 0. Let a_{1}, a_{2}, a_{3}, h, y be real numbers. Suppose y = x + \frac{b}{3·a} and h = − \frac{b}{3·a} and a_{1} = \frac{b}{a} and a_{2} = \frac{c}{a} and a_{3} = \frac{d}{a}. Then (y_{ℕ}^{3})+((3·h+a_{1})·y^{2}+(3·h^{2}+2·(a_{1}·h)+a_{2})·y)+((h_{ℕ}^{3})+a_{1}·h^{2}+(a_{2}·h+a_{3})) = 0.

(16) Let a, b, c, d, x be real numbers. Suppose a ≠ 0. Suppose Poly3(a, b, c, d, x) = 0. Let a_{1}, a_{2}, a_{3}, h, y be real numbers. Suppose y = x + \frac{b}{3·a} and h = − \frac{b}{3·a} and a_{1} = \frac{b}{a} and a_{2} = \frac{c}{a} and a_{3} = \frac{d}{a}. Then (y_{ℕ}^{3}) + 0 · y^{2} + \frac{3·a·c−b^{2}}{3·a^{2}} · y + (2 · (\frac{b}{3·a})_{ℕ}^{3} + \frac{3·a·d−b·c}{3·a^{2}}) = 0.

(17) Let a, b, c, d, y be real numbers. Suppose a ≠ 0. Suppose (y_{ℕ}^{3}) + 0 · y^{2} + \frac{3·a·c−b^{2}}{3·a^{2}} · y + (2 · (\frac{b}{3·a})_{ℕ}^{3} + \frac{3·a·d−b·c}{3·a^{2}}) = 0. Let p, q be real numbers. If p = \frac{3·a·c−b^{2}}{3·a^{2}} and q = 2 · (\frac{b}{3·a})_{ℕ}^{3} + \frac{3·a·d−b·c}{3·a^{2}}, then Poly3(1, 0, p, q, y) = 0.

(18) Let p, q, y be real numbers. Suppose Poly3(1, 0, p, q, y) = 0. Let u, v be real numbers. If y = u + v and 3 · v · u + p = 0, then (u_{ℕ}^{3}) + v_{ℕ}^{3} = − q and (u_{ℕ}^{3}) · v_{ℕ}^{3} = (− \frac{p}{3})_{ℕ}^{3}.

(19) Let p, q, y be real numbers. Suppose Poly3(1, 0, p, q, y) = 0. Let u, v be real numbers. Suppose y = u + v and 3 · v · u + p = 0. Then

(i) y = ^{3} \sqrt{− \frac{q}{2} + \sqrt{\frac{q^{2}}{4} + (\frac{p}{3})_{ℕ}^{3}}} + ^{3} \sqrt{− \frac{q}{2} − \sqrt{\frac{q^{2}}{4} + (\frac{p}{3})_{ℕ}^{3}}} , or

(ii) y = ^{3} \sqrt{− \frac{q}{2} + \sqrt{\frac{q^{2}}{4} + (\frac{p}{3})_{ℕ}^{3}}} + ^{3} \sqrt{− \frac{q}{2} + \sqrt{\frac{q^{2}}{4} + (\frac{p}{3})_{ℕ}^{3}}}, or

(iii) y = ^{3} \sqrt{− \frac{q}{2} − \sqrt{\frac{q^{2}}{4} + (\frac{p}{3})_{ℕ}^{3}}} + ^{3} \sqrt{− \frac{q}{2} − \sqrt{\frac{q^{2}}{4} + (\frac{p}{3})_{ℕ}^{3}}} .

(20) Let a, b, c, d, x be real numbers. Suppose a = 0 and b ≠ 0 and Δ(b, c, d) >

0. If Poly3(a, b, c, d, x) = 0, then x = ^{\frac{− c+\sqrt{Δ(b,c,d)}}{2·b}} or x = ^{\frac{− c−\sqrt{Δ(b,c,d)}}{2·b}} .

(21) Let a, b, c, d, p, q, x be real numbers. Suppose a ≠ 0 and b = 0 and p = \frac{c}{a} and q = \frac{d}{a}. Suppose Poly3(a, b, c, d, x) = 0. Let u, v be real numbers. Suppose x = u + v and 3 · v · u + p = 0. Then (i) x = ^{3} \sqrt{− \frac{d}{2·a}+ \sqrt{\frac{d^{2}}{4·a^{2}} + (\frac{c}{3·a})_{ℕ}^{3}}} + ^{3} \sqrt{− \frac{d}{2·a}− \sqrt{\frac{d^{2}}{4·a^{2}} + (\frac{c}{3·a})_{ℕ}^{3}}} , or

(ii) x = ^{3} \sqrt{− \frac{d}{2·a}+ \sqrt{\frac{d^{2}}{4·a^{2}} + (\frac{c}{3·a})_{ℕ}^{3}}} + ^{3} \sqrt{− \frac{d}{2·a}+ \sqrt{\frac{d^{2}}{4·a^{2}} + (\frac{c}{3·a})_{ℕ}^{3}}}, or

(iii) x = ^{3} \sqrt{− \frac{d}{2·a}− \sqrt{\frac{d^{2}}{4·a^{2}} + (\frac{c}{3·a})_{ℕ}^{3}}} + ^{3} \sqrt{− \frac{d}{2·a}− \sqrt{\frac{d^{2}}{4·a^{2}} + (\frac{c}{3·a})_{ℕ}^{3}}} .

(22) Let a, b, c, d, x be real numbers. Suppose a ≠ 0 and Δ(a, b, c) 0

and d = 0. If Poly3(a, b, c, d, x) = 0, then x = 0 or x = ^{\frac{− b+\sqrt{Δ(a,b,c)}}{2·a}} or

x = ^{\frac{− b−\sqrt{Δ(a,b,c)}}{2·a}} .

(23) Let a, b, c, d, x be real numbers. Suppose a ≠ 0 and b = 0 and \frac{c}{a} < 0 and d = 0. If Poly3(a, b, c, d, x) = 0, then x = 0 or x = \sqrt{− \frac{c}{a}} or x = − \sqrt{− \frac{c}{a}}.

(24) Let a, b, c, d, x be real numbers. Suppose a ≠ 0 and c = 0. Suppose Poly3(a, b, c, d, x) = 0. Let h be a real number. Suppose a · x + b = h and

h ≠ 0 and \frac{d}{h} < 0. Then x = \frac{h−b}{a} or x = \sqrt{− \frac{d}{h}} or x = − \sqrt{− \frac{d}{h}}.

References

[1] Krzysztof Hryniewiecki. Basic properties of real numbers. Formalized Mathematics, 1(1):35–40, 1990.

[2] Jan Popiołek. Quadratic inequalities. Formalized Mathematics, 2(4):507–509, 1991.

[3] Konrad Raczkowski. Integer and rational exponents. Formalized Mathematics, 2(1):125– 130, 1991.

[4] Konrad Raczkowski and Andrzej Nędzusiak. Real exponents and logarithms. Formalized Mathematics, 2(2):213–216, 1991.

[5] Andrzej Trybulec and Czesław Byliński. Some properties of real numbers. Formalized Mathematics, 1(3):445–449, 1990.

[6] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

The Concept of Fuzzy Set and Membership Function and Basic Properties of Fuzzy Set

Operation

Takashi Mitsuishi Shinshu University

Nagano

Noboru Endou Shinshu University Nagano Yasunari Shidama Shinshu University Nagano

Summary. This article introduces the fuzzy theory. At first, the definition of fuzzy set characterized by membership function is described. Next, definitions of empty fuzzy set and universal fuzzy set and basic operations of these fuzzy sets are shown. At last, exclusive sum and absolute difference which are special operation are introduced.

MML Identifier: FUZZY 1.

The terminology and notation used in this paper have been introduced in the following articles: [8], [1], [5], [9], [3], [4], [6], [7], and [2].

1. Definition of Membership Function and Fuzzy Set

In this paper C is a non empty set and c is an element of C. We now state the proposition

(1) rng(χ_{C,C}) ⊆ [0, 1]. Let us consider C. A partial function from C to ℝ is said to be a membership

function of C if: (Def. 1) domit = C and rngit ⊆ [0, 1].

The following proposition is true

(2) χ_{C,C} is a membership function of C.

In the sequel f, h, g, h_{1} denote membership functions of C.

Let C be a non empty set and let h be a membership function of C. A set is called a FuzzySet of C, h if:

(Def. 2) It = [: C, h^{∘}C:].

Let C be a non empty set, let h, g be membership functions of C, let A be a FuzzySet of C, h, and let B be a FuzzySet of C, g. The predicate A = B is defined as follows:

(Def. 3) For every element c of C holds h(c) = g(c).

Let C be a non empty set, let h, g be membership functions of C, let A be a FuzzySet of C, h, and let B be a FuzzySet of C, g. The predicate A ⊆ B is defined by:

(Def. 4) For every element c of C holds h(c) g(c).

In the sequel A denotes a FuzzySet of C, f, B denotes a FuzzySet of C, g, D denotes a FuzzySet of C, h, and D_{1} denotes a FuzzySet of C, h_{1}.

One can prove the following propositions:

(3) A = B iff A ⊆ B and B ⊆ A.

(4) A ⊆ A.

(5) If A ⊆ B and B ⊆ D, then A ⊆ D.

2. Intersection, Union and Complement

Let C be a non empty set and let h, g be membership functions of C. The functor min(h, g) yielding a membership function of C is defined by:

(Def. 5) For every element c of C holds (min(h, g))(c) = min(h(c), g(c)).

Let C be a non empty set and let h, g be membership functions of C. The functor max(h, g) yields a membership function of C and is defined by:

(Def. 6) For every element c of C holds (max(h, g))(c) = max(h(c), g(c)).

Let C be a non empty set and let h be a membership function of C. The functor 1-minush yielding a membership function of C is defined by:

(Def. 7) For every element c of C holds (1-minush)(c) = 1 − h(c).

Let C be a non empty set, let h, g be membership functions of C, let A be a FuzzySet of C, h, and let B be a FuzzySet of C, g. The functor A ∩ B yielding a FuzzySet of C, min(h, g) is defined as follows:

(Def. 8) A ∩ B = [: C, (min(h, g))^{∘}C:].

Let C be a non empty set, let h, g be membership functions of C, let A be a FuzzySet of C, h, and let B be a FuzzySet of C, g. The functor A ∪ B yields a FuzzySet of C, max(h, g) and is defined by:

(Def. 9) A ∪ B = [: C, (max(h, g))^{∘}C:].

Let C be a non empty set, let h be a membership function of C, and let A be a FuzzySet of C, h. The functor A^{c} yielding a FuzzySet of C, 1-minush is defined by:

(Def. 10) A^{c} = [: C, (1-minush)^{∘}C:]. We now state a number of propositions:

(6) min(h(c), g(c)) = (min(h, g))(c) and max(h(c), g(c)) = (max(h, g))(c).

(7) max(h, h) = h and min(h, h) = h and max(h, h) = min(h, h) and min(f, g) = min(g, f) and max(f, g) = max(g, f).

(8) f = g iff A = B.

(9) A ∩ A = A and A ∪ A = A.

(10) A ∩ B = B ∩ A and A ∪ B = B ∪ A.

(11) max(max(f, g), h) = max(f, max(g, h)) and min(min(f, g), h) = min(f, min(g, h)).

(12) (A ∪ B) ∪ D = A ∪ (B ∪ D).

(13) (A ∩ B) ∩ D = A ∩ (B ∩ D).

(14) max(f, min(f, g)) = f and min(f, max(f, g)) = f.

(15) A ∪ A ∩ B = A and A ∩ (A ∪ B) = A.

(16) min(f, max(g, h)) = max(min(f, g), min(f, h)) and max(f, min(g, h)) = min(max(f, g), max(f, h)).

(17) A ∪ B ∩ D = (A ∪ B) ∩ (A ∪ D) and A ∩ (B ∪ D) = A ∩ B ∪ A ∩ D.

(18) 1-minus1-minush = h.

(19) (A^{c})^{c} = A.

(20) 1-minusmax(f, g) = min(1-minusf, 1-minusg) and 1-minusmin(f, g) = max(1-minusf, 1-minusg).

(21) (A ∪ B)^{c} = A^{c} ∩ B^{c} and (A ∩ B)^{c} = A^{c} ∪ B^{c}.

3. Empty Fuzzy Set and Universal Fuzzy Set

Let C be a non empty set. A set is called an Empty FuzzySet of C if: (Def. 11) It = [: C, (χ_{∅,C})^{∘}C:].

Let C be a non empty set. A set is called a Universal FuzzySet of C if: (Def. 12) It = [: C, (χ_{C,C})^{∘}C:].

In the sequel X is a Universal FuzzySet of C and E is an Empty FuzzySet of C.

One can prove the following two propositions:

(22) rng(χ_{∅,C}) ⊆ [0, 1].

(23) χ_{∅,C} is a membership function of C.

Let C be a non empty set. The functor EMFC yields a membership function of C and is defined as follows:

(Def. 13) EMFC = χ_{∅,C}.

Let C be a non empty set. The functor UMFC yields a membership function of C and is defined as follows:

(Def. 14) UMFC = χ_{C,C}.

One can prove the following propositions:

(24) For every membership function h of C such that h = χ_{C,C} holds [: C, (χ_{C,C})^{∘}C:] is a FuzzySet of C, h.

(25) For every membership function h of C such that h = χ_{∅,C} holds [: C, (χ_{∅,C})^{∘}C:] is a FuzzySet of C, h.

(26) E is a FuzzySet of C, EMFC.

(27) X is a FuzzySet of C, UMFC.

Let C be a non empty set. We see that the Empty FuzzySet of C is a FuzzySet of C, EMFC.

Let C be a non empty set. We see that the Universal FuzzySet of C is a FuzzySet of C, UMFC.

In the sequel X denotes a Universal FuzzySet of C and E denotes an Empty FuzzySet of C.

One can prove the following propositions:

(28) Let a, b be elements of ℝ and f be a partial function from C to ℝ. Suppose rngf ⊆ [a, b] and domf ≠ ∅ and a b. Let x be an element of C. If x ∈ domf, then a f(x) and f(x) b.

(29) E ⊆ A.

(30) A ⊆ X.

(31) For every element x of C and for every membership function h of C holds (EMFC)(x) h(x) and h(x) (UMFC)(x).

(32) max(f, UMFC) = UMFC and min(f, UMFC) = f and max(f, EMFC) = f and min(f, EMFC) = EMFC.

(33) A ∪ X = X and A ∩ X = A.

(34) A ∪ E = A and A ∩ E = E.

(35) A ⊆ A ∪ B.

(36) If A ⊆ D and B ⊆ D, then A ∪ B ⊆ D.

(37) For all elements a, b, c of ℝ such that a b holds max(a, c) max(b, c).

(38) If A ⊆ B, then A ∪ D ⊆ B ∪ D.

(39) If A ⊆ B and D ⊆ D_{1}, then A ∪ D ⊆ B ∪ D_{1}.

(40) If A ⊆ B, then A ∪ B = B.

(41) A ∩ B ⊆ A.

(42) A ∩ B ⊆ A ∪ B.

(43) If D ⊆ A and D ⊆ B, then D ⊆ A ∩ B.

(44) For all elements a, b, c, d of ℝ such that a b and c d holds min(a, c) min(b, d).

(45) For all elements a, b, c of ℝ such that a b holds min(a, c) min(b, c).

(46) If A ⊆ B, then A ∩ D ⊆ B ∩ D.

(47) If A ⊆ B and D ⊆ D_{1}, then A ∩ D ⊆ B ∩ D_{1}.

(48) If A ⊆ B, then A ∩ B = A.

(49) If A ⊆ B and A ⊆ D and B ∩ D = E, then A = E.

(50) If A ∩ B ∪ A ∩ D = A, then A ⊆ B ∪ D.

(51) If A ⊆ B and B ∩ D = E, then A ∩ D = E.

(52) If A ⊆ E, then A = E.

(53) A ∪ B = E iff A = E and B = E.

(54) A = B ∪ D iff B ⊆ A and D ⊆ A and for all h_{1}, D_{1} such that B ⊆ D_{1} and D ⊆ D_{1} holds A ⊆ D_{1}.

(55) A = B ∩ D iff A ⊆ B and A ⊆ D and for all h_{1}, D_{1} such that D_{1} ⊆ B and D_{1} ⊆ D holds D_{1} ⊆ A.

(56) If A ⊆ B ∪ D and A ∩ D = E, then A ⊆ B.

(57) A ⊆ B iff B^{c} ⊆ A^{c}.

(58) If A ⊆ B^{c}, then B ⊆ A^{c}.

(59) If A^{c} ⊆ B, then B^{c} ⊆ A.

(60) (A ∪ B)^{c} ⊆ A^{c} and (A ∪ B)^{c} ⊆ B^{c}.

(61) A^{c} ⊆ (A ∩ B)^{c} and B^{c} ⊆ (A ∩ B)^{c}.

(62) 1-minusEMFC = UMFC and 1-minusUMFC = EMFC.

(63) E^{c} = X and X^{c} = E.

4. Exclusive Sum, Absolute Difference

Let C be a non empty set, let h, g be membership functions of C, let A be a FuzzySet of C, h, and let B be a FuzzySet of C, g. The functor A−. B yields a FuzzySet of C, max(min(h, 1-minusg), min(1-minush, g)) and is defined as follows:

(Def. 15) A−. B = [: C, (max(min(h, 1-minusg), min(1-minush, g)))^{∘}C:].

The following propositions are true:

(64) A−. B = A ∩ B^{c} ∪ A^{c} ∩ B.

(65) A−. B = B−. A.

(66) A−. E = A and E−. A = A.

356 takashi mitsuishi et al.

(67) A−. X = A^{c} and X−. A = A^{c}.

(68) A ∩ B ∪ B ∩ D ∪ D ∩ A = (A ∪ B) ∩ (B ∪ D) ∩ (D ∪ A).

(69) A ∩ B ∪ A^{c} ∩ B^{c} ⊆ (A−. B)^{c}.

(70) (A−. B) ∪ A ∩ B ⊆ A ∪ B.

(71) A−. A = A ∩ A^{c}.

Let C be a non empty set and let h, g be membership functions of C. The functor |h − g| yields a membership function of C and is defined as follows:

(Def. 16) For every element c of C holds |h − g|(c) = |h(c) − g(c)|. Let C be a non empty set, let h, g be membership functions of C, let A be a

FuzzySet of C, h, and let B be a FuzzySet of C, g. The functor |A − B| yielding a FuzzySet of C, |h − g| is defined by:

(Def. 17) |A − B| = [: C, |h − g|^{∘}C:].

References

[1] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[2] Czesław Byliński. Some basic properties of sets. Formalized Mathematics, 1(1):47–53, 1990.

[3] Jarosław Kotowicz. Partial functions from a domain to the set of real numbers. Formalized Mathematics, 1(4):703–709, 1990.

[4] Jarosław Kotowicz. Real sequences and basic operations on them. Formalized Mathematics, 1(2):269–272, 1990.

[5] Konrad Raczkowski and Paweł Sadowski. Topological properties of subsets in real numbers. Formalized Mathematics, 1(4):777–780, 1990.

[6] Andrzej Trybulec and Czesław Byliński. Some properties of real numbers. Formalized Mathematics, 1(3):445–449, 1990.

[7] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[8] Zinaida Trybulec and Halina Święczkowska. Boolean properties of sets. Formalized Mathematics, 1(1):17–23, 1990.

[9] Edmund Woronowicz. Relations defined on sets. Formalized Mathematics, 1(1):181–186, 1990.

Basic Properties of Fuzzy Set Operation and Membership Function

Takashi Mitsuishi Shinshu University

Nagano Katsumi Wasaki Shinshu University Nagano Yasunari Shidama Shinshu University Nagano

Summary. This article introduces the fuzzy theory. The definition of the difference set, algebraic product and algebraic sum of fuzzy set is shown. In addition, basic properties of those operations are described. Basic properties of fuzzy set are a little different from those of crisp set.

MML Identifier: FUZZY 2.

The articles [3], [1], [2], [4], and [5] provide the terminology and notation for this paper.

1. Basic Properties of Membership Function and Difference Set

For simplicity, we follow the rules: C denotes a non empty set, c denotes an element of C, f, h, g, h_{1} denote membership functions of C, A denotes a FuzzySet of C, f, B denotes a FuzzySet of C, g, D denotes a FuzzySet of C, h, D_{1} denotes a FuzzySet of C, h_{1}, X denotes a Universal FuzzySet of C, and E denotes an Empty FuzzySet of C.

We now state four propositions:

(1) For every element x of C and for every membership function h of C holds 0 h(x) and h(x) 1.

(2) For every element x of C holds (EMFC)(x) = 0 and (UMFC)(x) = 1.

(3) For every c such that f(c) h(c) holds (max(f, min(g, h)))(c) = (min(max(f, g), h))(c).

(4) If A ⊆ D, then A ∪ B ∩ D = (A ∪ B) ∩ D.

Let C be a non empty set, let f, g be membership functions of C, let A be a FuzzySet of C, f, and let B be a FuzzySet of C, g. The functor A \ B yielding a FuzzySet of C, min(f, 1-minusg) is defined as follows:

(Def. 1) A \ B = [: C, (min(f, 1-minusg))^{∘}C:]. Next we state a number of propositions:

(5) A \ B = A ∩ B^{c}.

(6) 1-minusmin(f, 1-minusg) = max(1-minusf, g).

(7) (A \ B)^{c} = A^{c} ∪ B.

(8) For every c such that f(c) g(c) holds (min(f, 1-minush))(c) (min(g, 1-minush))(c).

(9) If A ⊆ B, then A \ D ⊆ B \ D.

(10) For every c such that f(c) g(c) holds (min(h, 1-minusg))(c) (min(h, 1-minusf))(c).

(11) If A ⊆ B, then D \ B ⊆ D \ A.

(12) For every c such that f(c) g(c) and h(c) h_{1}(c) holds (min(f, 1-minush_{1}))(c) (min(g, 1-minush))(c).

(13) If A ⊆ B and D ⊆ D_{1}, then A \ D_{1} ⊆ B \ D.

(14) For every c holds (min(f, 1-minusg))(c) f(c).

(15) A \ B ⊆ A.

(16) For every c holds (min(f, 1-minusg))(c) (max(min(f, 1-minusg), min(1-minusf, g)))(c).

(17) A \ B ⊆ A−. B.

(18) A \ E = A.

(19) E \ A = E.

(20) For every c holds (min(f, 1-minusg))(c) (min(f, 1-minusmin(f, g)))(c).

(21) A \ B ⊆ A \ A ∩ B.

(22) For every c holds (max(min(f, g), min(f, 1-minusg)))(c) f(c).

(23) For every c holds (max(f, min(g, 1-minusf)))(c) (max(f, g))(c).

(24) A ∪ (B \ A) ⊆ A ∪ B.

(25) A ∩ B ∪ (A \ B) ⊆ A.

(26) min(f, 1-minusmin(g, 1-minush)) = max(min(f, 1-minusg), min(f, h)).

(27) A \ (B \ D) = (A \ B) ∪ A ∩ D.

(28) For every c holds (min(f, g))(c) (min(f, 1-minusmin(f, 1-minusg)))(c).

(29) A ∩ B ⊆ A \ (A \ B).

(30) For every c holds (min(f, 1-minusg))(c) (min(max(f, g), 1-minusg))(c).

(31) A \ B ⊆ (A ∪ B) \ B.

(32) min(f, 1-minusmax(g, h)) = min(min(f, 1-minusg), min(f, 1-minush)).

(33) A \ (B ∪ D) = (A \ B) ∩ (A \ D).

(34) min(f, 1-minusmin(g, h)) = max(min(f, 1-minusg), min(f, 1-minush)).

(35) A \ B ∩ D = (A \ B) ∪ (A \ D).

(36) min(min(f, 1-minusg), 1-minush) = min(f, 1-minusmax(g, h)).

(37) A \ B \ D = A \ (B ∪ D).

(38) For every c holds (min(max(f, g), 1-minusmin(f, g)))(c) (max(min(f, 1-minusg), min(g, 1-minusf)))(c).

(39) (A \ B) ∪ (B \ A) ⊆ (A ∪ B) \ A ∩ B.

(40) min(max(f, g), 1-minush) = max(min(f, 1-minush), min(g, 1-minush)).

(41) (A ∪ B) \ D = (A \ D) ∪ (B \ D).

(42) For every c such that (min(f, 1-minusg))(c) h(c) and (min(g, 1-minus f))(c) h(c) holds (max(min(f, 1-minusg), min(1-minusf, g)))(c) h(c).

(43) If A \ B ⊆ D and B \ A ⊆ D, then A−. B ⊆ D.

(44) A ∩ (B \ D) = A ∩ B \ D.

(45) For every c holds (min(f, min(g, 1-minush)))(c) (min(min(f, g), 1-minusmin(f, h)))(c).

(46) A ∩ (B \ D) ⊆ A ∩ B \ A ∩ D.

(47) For every c holds (min(max(f, g), 1-minusmin(f, g)))(c) (max(min(f, 1-minusg), min(1-minusf, g)))(c).

(48) A−. B ⊆ (A ∪ B) \ A ∩ B.

(49) For every c holds (max(min(f, g), 1-minusmax(f, g)))(c) (1-minusmax (min(f, 1-minusg), min(1-minusf, g)))(c).

(50) A ∩ B ∪ (A ∪ B)^{c} ⊆ (A−. B)^{c}.

(51) min(max(min(f, 1-minusg), min(1-minusf, g)), 1-minush) = max(min (f, 1-minusmax(g, h)), min(g, 1-minusmax(f, h))).

(52) (A−. B) \ D = (A \ (B ∪ D)) ∪ (B \ (A ∪ D)).

(53) For every c holds (min(f, 1-minusmax(min(g, 1-minush), min(1-minusg, h))))(c) (max(min(f, 1-minusmax(g, h)), min(min(f, g), h)))(c).

(54) (A \ (B ∪ D)) ∪ A ∩ B ∩ D ⊆ A \ (B−. D).

(55) For every c such that f(c) g(c) holds g(c)

(max(f, min(g, 1-minusf)))(c).

(56) If A ⊆ B, then A ∪ (B \ A) ⊆ B.

(57) For every c holds (max(f, g))(c) (max(max(min(f, 1-minusg), min(1-minusf, g)), min(f, g)))(c).

(58) (A−. B) ∪ A ∩ B ⊆ A ∪ B.

(59) If min(f, 1-minusg) = EMFC, then for every c holds f(c) g(c).

(60) If A \ B = E, then A ⊆ B.

(61) If min(f, g) = EMFC, then min(f, 1-minusg) = f.

(62) If A ∩ B = E, then A \ B = A.

2. Algebraic Product and Algebraic Sum

Let C be a non empty set and let h, g be membership functions of C. The functor h · g yielding a membership function of C is defined as follows:

(Def. 2) For every element c of C holds (h · g)(c) = h(c) · g(c).

Let C be a non empty set and let h, g be membership functions of C. The functor h ⊕ g yielding a membership function of C is defined as follows:

(Def. 3) For every element c of C holds (h ⊕ g)(c) = (h(c) + g(c)) − h(c) · g(c).

Let C be a non empty set, let h, g be membership functions of C, let A be a FuzzySet of C, h, and let B be a FuzzySet of C, g. The functor A · B yields a FuzzySet of C, h · g and is defined as follows:

(Def. 4) A · B = [: C, (h · g)^{∘}C:].

Let C be a non empty set, let h, g be membership functions of C, let A be a FuzzySet of C, h, and let B be a FuzzySet of C, g. The functor A ⊕ B yielding a FuzzySet of C, h ⊕ g is defined by:

(Def. 5) A ⊕ B = [: C, (h ⊕ g)^{∘}C:].

We now state a number of propositions:

(63) For every c holds (f · f)(c) f(c) and (f ⊕ f)(c) f(c).

(64) A · A ⊆ A and A ⊆ A ⊕ A.

(65) f · g = g · f and f ⊕ g = g ⊕ f.

(66) A · B = B · A and A ⊕ B = B ⊕ A.

(67) (f · g) · h = f · (g · h).

(68) (A · B) · D = A · (B · D).

(69) (f ⊕ g) ⊕ h = f ⊕ (g ⊕ h).

(70) (A ⊕ B) ⊕ D = A ⊕ (B ⊕ D).

(71) For every c holds (f · (f ⊕ g))(c) f(c) and (f ⊕ f · g)(c) f(c).

(72) A · (A ⊕ B) ⊆ A and A ⊆ A ⊕ A · B.

(73) For every c holds (f · (g ⊕ h))(c) (f · g ⊕ f · h)(c).

(74) A · (B ⊕ D) ⊆ A · B ⊕ A · D.

(75) For every c holds ((f ⊕ g) · (f ⊕ h))(c) (f ⊕ g · h)(c).

(76) (A ⊕ B) · (A ⊕ D) ⊆ A ⊕ B · D.

(77) 1-minusf · g = 1-minusf ⊕ 1-minusg.

(78) (A · B)^{c} = A^{c} ⊕ B^{c}.

(79) 1-minusf ⊕ g = 1-minusf · 1-minusg.

(80) (A ⊕ B)^{c} = A^{c} · B^{c}.

(81) f ⊕ g = 1-minus1-minusf · 1-minusg.

(82) A ⊕ B = (A^{c} · B^{c})^{c}.

(83) f · EMFC = EMFC and f · UMFC = f.

(84) A · E = E and A · X = A.

(85) f ⊕ EMFC = f and f ⊕ UMFC = UMFC.

(86) A ⊕ E = A and A ⊕ X = X.

(87) For every c holds (EMFC)(c) (f · 1-minusf)(c).

(88) For every c holds (UMFC)(c) (f ⊕ 1-minusf)(c).

(89) E ⊆ A · A^{c} and A ⊕ A^{c} ⊆ X.

(90) For every c holds (f · g)(c) (min(f, g))(c).

(91) A · B ⊆ A ∩ B.

(92) For every c holds (max(f, g))(c) (f ⊕ g)(c).

(93) A ∪ B ⊆ A ⊕ B.

(94) For all real numbers a, b, c such that 0 c holds c · max(a, b) = max(c · a, c · b) and c · min(a, b) = min(c · a, c · b).

(95) For all real numbers a, b, c holds c + max(a, b) = max(c + a, c + b) and c + min(a, b) = min(c + a, c + b).

(96) f · max(g, h) = max(f · g, f · h).

(97) f · min(g, h) = min(f · g, f · h).

(98) A · (B ∩ D) = (A · B) ∩ (A · D) and A · (B ∪ D) = A · B ∪ A · D.

(99) f ⊕ max(g, h) = max(f ⊕ g, f ⊕ h).

(100) f ⊕ min(g, h) = min(f ⊕ g, f ⊕ h).

(101) A ⊕ (B ∪ D) = (A ⊕ B) ∪ (A ⊕ D) and A ⊕ B ∩ D = (A ⊕ B) ∩ (A ⊕ D).

(102) For every c holds (max(f, g) · max(f, h))(c) (max(f, g · h))(c).

(103) For every c holds (min(f, g) · min(f, h))(c) (min(f, g · h))(c).

(104) (A ∪ B) · (A ∪ D) ⊆ A ∪ B · D and (A ∩ B) · (A ∩ D) ⊆ A ∩ (B · D).

(105) For every element c of C and for all membership functions f, g of C holds (f ⊕ g)(c) = 1 − (1 − f(c)) · (1 − g(c)).

(106) For every c holds (max(f, g ⊕ h))(c) (max(f, g) ⊕ max(f, h))(c).

(107) For every c holds (min(f, g ⊕ h))(c) (min(f, g) ⊕ min(f, h))(c).

(108) A ∪ (B ⊕ D) ⊆ (A ∪ B) ⊕ (A ∪ D) and A ∩ (B ⊕ D) ⊆ A ∩ B ⊕ A ∩ D.

References

[1] Krzysztof Hryniewiecki. Basic properties of real numbers. Formalized Mathematics, 1(1):35–40, 1990.

[2] Jarosław Kotowicz. Real sequences and basic operations on them. Formalized Mathematics, 1(2):269–272, 1990.

362 takashi mitsuishi et al.

[3] Takashi Mitsuishi, Noboru Endou, and Yasunari Shidama. The concept of fuzzy set and membership function and basic properties of fuzzy set operation. Formalized Mathematics, 9(2):351–356, 2001.

[4] Andrzej Trybulec and Czesław Byliński. Some properties of real numbers. Formalized Mathematics, 1(3):445–449, 1990.

[5] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

The Hahn Banach Theorem in the Vector Space over the Field of Complex Numbers

Anna Justyna Milewska University of Białystok

Summary. This article contains the Hahn Banach theorem in the vector space over the field of complex numbers.

MML Identifier: HAHNBAN1.

The articles [8], [7], [1], [5], [2], [6], [9], [3], [14], [10], [12], [13], [4], and [11] provide the terminology and notation for this paper.

1. Preliminaries

The following propositions are true:

(1) For every element z of ℂ holds ||z|| = |z|.

(2) For all elements x_{1}, y_{1}, x_{2}, y_{2} of ℝ holds (x_{1} + y_{1}i) · (x_{2} + y_{2}i) = (x_{1} · x_{2} − y_{1} · y_{2}) + (x_{1} · y_{2} + x_{2} · y_{1})i.

(3) For every real number r holds (r + 0i) · i = 0 + ri.

(4) For every real number r holds |r + 0i| = |r|.

(5) For every element z of ℂ such that |z| ≠ 0 holds |z| + 0i = \frac{z^{∗}}{|z|+0i} · z.

2. Some Facts on the Field of Complex Numbers

Let x, y be real numbers. The functor x + yi_{ℂ_{F}} yielding an element of ℂ_{F} is defined by:

(Def. 1) x + yi_{ℂ_{F}} = x + yi.

The element i_{ℂ_{F}} of ℂ_{F} is defined by: (Def. 2) i_{ℂ_{F}} = i.

One can prove the following propositions:

(6) i_{ℂ_{F}} = 0 + 1i and i_{ℂ_{F}} = 0 + 1i_{ℂ_{F}}.

(7) |i_{ℂ_{F}}| = 1.

(8) i_{ℂ_{F}} · i_{ℂ_{F}} = − 1_{ℂ_{F}} .

(9) (− 1_{ℂ_{F}} ) · − 1_{ℂ_{F}} = 1_{ℂ_{F}}.

(10) For all real numbers x_{1}, y_{1}, x_{2}, y_{2} holds (x_{1} + y_{1}i_{ℂ_{F}}) + (x_{2} + y_{2}i_{ℂ_{F}}) = (x_{1} + x_{2}) + (y_{1} + y_{2})i_{ℂ_{F}}.

(11) For all real numbers x_{1}, y_{1}, x_{2}, y_{2} holds (x_{1} + y_{1}i_{ℂ_{F}}) · (x_{2} + y_{2}i_{ℂ_{F}}) = (x_{1} · x_{2} − y_{1} · y_{2}) + (x_{1} · y_{2} + x_{2} · y_{1})i_{ℂ_{F}}.

(12) For every element z of the carrier of ℂ_{F} holds ||z|| = |z|.

(13) For every real number r holds |r + 0i_{ℂ_{F}}| = |r|.

(14) For every real number r holds (r + 0i_{ℂ_{F}}) · i_{ℂ_{F}} = 0 + ri_{ℂ_{F}}.

Let z be an element of the carrier of ℂ_{F}. The functor ℜ(z) yields a real number and is defined as follows:

(Def. 3) There exists an element z′ of ℂ such that z = z′ and ℜ(z) = ℜ(z′).

Let z be an element of the carrier of ℂ_{F}. The functor ℑ(z) yields a real number and is defined as follows:

(Def. 4) There exists an element z′ of ℂ such that z = z′ and ℑ(z) = ℑ(z′).

The following propositions are true:

(15) For all real numbers x, y holds ℜ(x + yi_{ℂ_{F}}) = x and ℑ(x + yi_{ℂ_{F}}) = y.

(16) For all elements x, y of the carrier of ℂ_{F} holds ℜ(x + y) = ℜ(x) + ℜ(y) and ℑ(x + y) = ℑ(x) + ℑ(y).

(17) For all elements x, y of the carrier of ℂ_{F} holds ℜ(x · y) = ℜ(x) · ℜ(y) − ℑ(x) · ℑ(y) and ℑ(x · y) = ℜ(x) · ℑ(y) + ℜ(y) · ℑ(x).

(18) For every element z of the carrier of ℂ_{F} holds ℜ(z) |z|.

(19) For every element z of the carrier of ℂ_{F} holds ℑ(z) |z|.

3. Functionals of Vector Space

Let K be a 1-sorted structure and let V be a vector space structure over K. (Def. 5) A function from the carrier of V into the carrier of K is said to be a

functional in V. Let K be a non empty loop structure, let V be a non empty vector space

structure over K, and let f, g be functionals in V. The functor f + g yielding a functional in V is defined by:

(Def. 6) For every element x of the carrier of V holds (f + g)(x) = f(x) + g(x).

Let K be a non empty loop structure, let V be a non empty vector space structure over K, and let f be a functional in V. The functor − f yielding a functional in V is defined by:

(Def. 7) For every element x of the carrier of V holds (− f)(x) = − f(x).

Let K be a non empty loop structure, let V be a non empty vector space structure over K, and let f, g be functionals in V. The functor f − g yielding a functional in V is defined by:

(Def. 8) f − g = f + − g.

Let K be a non empty groupoid, let V be a non empty vector space structure over K, let v be an element of the carrier of K, and let f be a functional in V. The functor v · f yields a functional in V and is defined by:

(Def. 9) For every element x of the carrier of V holds (v · f)(x) = v · f(x).

Let K be a non empty zero structure and let V be a vector space structure over K. The functor 0FunctionalV yields a functional in V and is defined as follows:

(Def. 10) 0FunctionalV = Ω_{V} ⟼→ 0_{K}.

Let K be a non empty loop structure, let V be a non empty vector space structure over K, and let F be a functional in V. We say that F is additive if and only if:

(Def. 11) For all vectors x, y of V holds F (x + y) = F (x) + F (y).

Let K be a non empty groupoid, let V be a non empty vector space structure over K, and let F be a functional in V. We say that F is homogeneous if and only if:

(Def. 12) For every vector x of V and for every scalar r of V holds F (r·x) = r·F (x).

Let K be a non empty zero structure, let V be a non empty vector space structure over K, and let F be a functional in V. We say that F is 0-preserving if and only if:

(Def. 13) F (0_{V}) = 0_{K}.

Let K be an add-associative right zeroed right complementable Abelian associative left unital distributive non empty double loop structure and let V be a vector space over K. Note that every functional in V which is homogeneous is also 0-preserving.

Let K be a right zeroed non empty loop structure and let V be a non empty vector space structure over K. Note that 0FunctionalV is additive.

Let K be an add-associative right zeroed right complementable right distributive non empty double loop structure and let V be a non empty vector space structure over K. Observe that 0FunctionalV is homogeneous.

Let K be a non empty zero structure and let V be a non empty vector space structure over K. Observe that 0FunctionalV is 0-preserving.

Let K be an add-associative right zeroed right complementable right distributive non empty double loop structure and let V be a non empty vector space structure over K. Observe that there exists a functional in V which is additive, homogeneous, and 0-preserving.

The following propositions are true:

(20) Let K be an Abelian non empty loop structure, V be a non empty vector space structure over K, and f, g be functionals in V. Then f + g = g + f.

(21) Let K be an add-associative non empty loop structure, V be a non empty vector space structure over K, and f, g, h be functionals in V. Then (f + g) + h = f + (g + h).

(22) Let K be a non empty zero structure, V be a non empty vector space structure over K, and x be an element of the carrier of V. Then (0FunctionalV)(x) = 0_{K}.

(23) Let K be a right zeroed non empty loop structure, V be a non empty vector space structure over K, and f be a functional in V. Then f + 0FunctionalV = f.

(24) Let K be an add-associative right zeroed right complementable non empty loop structure, V be a non empty vector space structure over K, and f be a functional in V. Then f − f = 0FunctionalV.

(25) Let K be a right distributive non empty double loop structure, V be a non empty vector space structure over K, r be an element of the carrier of K, and f, g be functionals in V. Then r · (f + g) = r · f + r · g.

(26) Let K be a left distributive non empty double loop structure, V be a non empty vector space structure over K, r, s be elements of the carrier of K, and f be a functional in V. Then (r + s) · f = r · f + s · f.

(27) Let K be an associative non empty groupoid, V be a non empty vector space structure over K, r, s be elements of the carrier of K, and f be a functional in V. Then (r · s) · f = r · (s · f).

(28) Let K be a left unital non empty double loop structure, V be a non empty vector space structure over K, and f be a functional in V. Then 1_{K} · f = f.

Let K be an Abelian add-associative right zeroed right complementable right distributive non empty double loop structure, let V be a non empty vector space structure over K, and let f, g be additive functionals in V. Observe that f + g is additive.

Let K be an Abelian add-associative right zeroed right complementable right distributive non empty double loop structure, let V be a non empty vector space structure over K, and let f be an additive functional in V. One can verify that − f is additive.

Let K be an add-associative right zeroed right complementable right distributive non empty double loop structure, let V be a non empty vector space structure over K, let v be an element of the carrier of K, and let f be an additive functional in V. Observe that v · f is additive.

Let K be an add-associative right zeroed right complementable right distributive non empty double loop structure, let V be a non empty vector space structure over K, and let f, g be homogeneous functionals in V. Observe that f + g is homogeneous.

Let K be an Abelian add-associative right zeroed right complementable right distributive non empty double loop structure, let V be a non empty vector space structure over K, and let f be a homogeneous functional in V. One can check that − f is homogeneous.

Let K be an add-associative right zeroed right complementable right distributive associative commutative non empty double loop structure, let V be a non empty vector space structure over K, let v be an element of the carrier of K, and let f be a homogeneous functional in V. Observe that v · f is homogeneous.

Let K be an add-associative right zeroed right complementable right distributive non empty double loop structure and let V be a non empty vector space structure over K. A linear functional in V is an additive homogeneous functional in V.

4. The Vector Space of Linear Functionals

Let K be an Abelian add-associative right zeroed right complementable right distributive associative commutative non empty double loop structure and let V be a non empty vector space structure over K. The functor V^{∗} yielding a non empty strict vector space structure over K is defined by the conditions (Def. 14).

(Def. 14)(i) For every set x holds x ∈ the carrier of V^{∗} iff x is a linear functional

in V, (ii) for all linear functionals f, g in V holds (the addition of V^{∗})(f, g) =

f + g, (iii) for every linear functional f in V holds (the reverse-map of V^{∗})(f) =

− f, (iv) the zero of V^{∗} = 0FunctionalV, and

(v) for every linear functional f in V and for every element x of the carrier of K holds (the left multiplication of V^{∗})(x, f) = x · f.

Let K be an Abelian add-associative right zeroed right complementable right distributive associative commutative non empty double loop structure and let V be a non empty vector space structure over K. One can check that V^{∗} is Abelian.

Let K be an Abelian add-associative right zeroed right complementable right distributive associative commutative non empty double loop structure and let V be a non empty vector space structure over K. One can verify the following observations:

∗ V^{∗} is add-associative,

∗ V^{∗} is right zeroed, and

∗ V^{∗} is right complemented.

Let K be an Abelian add-associative right zeroed right complementable left unital distributive associative commutative non empty double loop structure and let V be a non empty vector space structure over K. One can check that V^{∗} is vector space-like.

5. Semi Norm of Vector Space

Let K be a 1-sorted structure and let V be a vector space structure over K. (Def. 15) A function from the carrier of V into ℝ is said to be a RFunctional of

V. Let K be a 1-sorted structure, let V be a non empty vector space structure

over K, and let F be a RFunctional of V. We say that F is subadditive if and only if:

(Def. 16) For all vectors x, y of V holds F (x + y) F (x) + F (y).

Let K be a 1-sorted structure, let V be a non empty vector space structure over K, and let F be a RFunctional of V. We say that F is additive if and only if:

(Def. 17) For all vectors x, y of V holds F (x + y) = F (x) + F (y).

Let V be a non empty vector space structure over ℂ_{F} and let F be a RFunctional of V. We say that F is Real-homogeneous if and only if:

(Def. 18) For every vector v of V and for every real number r holds F ((r + 0i_{ℂ_{F}}) ·

v) = r · F (v). One can prove the following proposition

(29) Let V be a vector space-like non empty vector space structure over ℂ_{F} and F be a RFunctional of V. Suppose F is Real-homogeneous. Let v be a vector of V and r be a real number. Then F ((0 + ri_{ℂ_{F}}) · v) = r · F (i_{ℂ_{F}} · v).

Let V be a non empty vector space structure over ℂ_{F} and let F be a RFunctional of V. We say that F is homogeneous if and only if:

(Def. 19) For every vector v of V and for every scalar r of V holds F (r · v) =

|r| · F (v). Let K be a 1-sorted structure, let V be a vector space structure over K, and

let F be a RFunctional of V. We say that F is 0-preserving if and only if: (Def. 20) F (0_{V}) = 0.

Let K be a 1-sorted structure and let V be a non empty vector space structure over K. One can verify that every RFunctional of V which is additive is also subadditive.

Let V be a vector space over ℂ_{F}. Note that every RFunctional of V which is Real-homogeneous is also 0-preserving.

Let K be a 1-sorted structure and let V be a vector space structure over K. The functor 0RFunctionalV yielding a RFunctional of V is defined as follows:

(Def. 21) 0RFunctionalV = Ω_{V} ⟼→ 0.

Let K be a 1-sorted structure and let V be a non empty vector space structure over K. Note that 0RFunctionalV is additive and 0RFunctionalV is 0preserving.

Let V be a non empty vector space structure over ℂ_{F}. Note that 0RFunctionalV is Real-homogeneous and 0RFunctionalV is homogeneous.

Let K be a 1-sorted structure and let V be a non empty vector space structure over K. Note that there exists a RFunctional of V which is additive and 0-preserving.

Let V be a non empty vector space structure over ℂ_{F}. One can check that there exists a RFunctional of V which is additive, Real-homogeneous, and homogeneous.

Let V be a non empty vector space structure over ℂ_{F}. A Semi-Norm of V is a subadditive homogeneous RFunctional of V.

6. The Hahn Banach Theorem

Let V be a non empty vector space structure over ℂ_{F}. The functor RealVSV yielding a strict RLS structure is defined by the conditions (Def. 22).

(Def. 22)(i) The loop structure of RealVSV = the loop structure of V, and

(ii) for every real number r and for every vector v of V holds (the external

multiplication of RealVSV)(r, v) = (r + 0i_{ℂ_{F}}) · v. Let V be a non empty vector space structure over ℂ_{F}. Observe that RealVSV

is non empty.

Let V be an Abelian non empty vector space structure over ℂ_{F}. Observe that RealVSV is Abelian.

Let V be an add-associative non empty vector space structure over ℂ_{F}. One can check that RealVSV is add-associative.

Let V be a right zeroed non empty vector space structure over ℂ_{F}. Note that RealVSV is right zeroed.

Let V be a right complementable non empty vector space structure over ℂ_{F}. One can check that RealVSV is right complementable.

Let V be a vector space-like non empty vector space structure over ℂ_{F}. Note that RealVSV is real linear space-like.

One can prove the following three propositions:

(30) For every non empty vector space V over ℂ_{F} and for every subspace M of V holds RealVSM is a subspace of RealVSV.

(31) For every non empty vector space structure V over ℂ_{F} holds every RFunctional of V is a functional in RealVSV.

(32) For every non empty vector space V over ℂ_{F} holds every Semi-Norm of

V is a Banach functional in RealVSV. Let V be a non empty vector space structure over ℂ_{F} and let l be a functional

in V. The functor projRel yielding a functional in RealVSV is defined by: (Def. 23) For every element i of the carrier of V holds (projRel)(i) = ℜ(l(i)).

Let V be a non empty vector space structure over ℂ_{F} and let l be a functional in V. The functor projIml yields a functional in RealVSV and is defined as follows:

(Def. 24) For every element i of the carrier of V holds (projIml)(i) = ℑ(l(i)).

Let V be a non empty vector space structure over ℂ_{F} and let l be a functional in RealVSV. The functor l_{ℝ→ℂ} yielding a RFunctional of V is defined by:

(Def. 25) l_{ℝ→ℂ} = l.

Let V be a non empty vector space structure over ℂ_{F} and let l be a RFunctional of V. The functor l_{ℂ→ℝ} yields a functional in RealVSV and is defined by:

(Def. 26) l_{ℂ→ℝ} = l.

Let V be a non empty vector space over ℂ_{F} and let l be an additive functional in RealVSV. One can check that l_{ℝ→ℂ} is additive.

Let V be a non empty vector space over ℂ_{F} and let l be an additive RFunctional of V. Observe that l_{ℂ→ℝ} is additive.

Let V be a non empty vector space over ℂ_{F} and let l be a homogeneous functional in RealVSV. Observe that l_{ℝ→ℂ} is Real-homogeneous.

Let V be a non empty vector space over ℂ_{F} and let l be a Real-homogeneous RFunctional of V. One can verify that l_{ℂ→ℝ} is homogeneous.

Let V be a non empty vector space structure over ℂ_{F} and let l be a RFunctional of V. The functor i-shiftl yields a RFunctional of V and is defined by:

(Def. 27) For every element v of the carrier of V holds (i-shiftl)(v) = l(i_{ℂ_{F}} · v).

Let V be a non empty vector space structure over ℂ_{F} and let l be a functional in RealVSV. The functor prodReIml yielding a functional in V is defined as follows:

(Def. 28) For every element v of the carrier of V holds (prodReIml)(v) = (l_{ℝ→ℂ} )(v) + (− (i-shiftl_{ℝ→ℂ} )(v))i_{ℂ_{F}}.

the hahn banach theorem in the vector … 371

The following four propositions are true:

(33) Let V be a non empty vector space over ℂ_{F} and l be a linear functional in V. Then projRel is a linear functional in RealVSV.

(34) Let V be a non empty vector space over ℂ_{F} and l be a linear functional in V. Then projIml is a linear functional in RealVSV.

(35) Let V be a non empty vector space over ℂ_{F} and l be a linear functional in RealVSV. Then prodReIml is a linear functional in V.

(36) Let V be a non empty vector space over ℂ_{F}, p be a Semi-Norm of V, M be a subspace of V, and l be a linear functional in M. Suppose that for every vector e of M and for every vector v of V such that v = e holds |l(e)| p(v). Then there exists a linear functional L in V such that L↾the carrier of M = l and for every vector e of V holds |L(e)| p(e).

References

[1] Czesław Byliński. The complex numbers. Formalized Mathematics, 1(3):507–513, 1990.

[2] Czesław Byliński. Functions from a set to a set. Formalized Mathematics, 1(1):153–164, 1990.

[3] Krzysztof Hryniewiecki. Basic properties of real numbers. Formalized Mathematics, 1(1):35–40, 1990.

[4] Eugeniusz Kusak, Wojciech Leończuk, and Michał Muzalewski. Abelian groups, fields and vector spaces. Formalized Mathematics, 1(2):335–342, 1990.

[5] Anna Justyna Milewska. The field of complex numbers. Formalized Mathematics, 9(2):265–269, 2001.

[6] Bogdan Nowak and Andrzej Trybulec. Hahn-Banach theorem. Formalized Mathematics, 4(1):29–34, 1993.

[7] Jan Popiołek. Some properties of functions modul and signum. Formalized Mathematics, 1(2):263–264, 1990.

[8] Wojciech Skaba and Michał Muzalewski. From double loops to fields. Formalized Mathematics, 2(1):185–191, 1991.

[9] Andrzej Trybulec. Natural transformations. Discrete categories. Formalized Mathematics, 2(4):467–474, 1991.

[10] Wojciech A. Trybulec. Subspaces and cosets of subspaces in real linear space. Formalized Mathematics, 1(2):297–301, 1990.

[11] Wojciech A. Trybulec. Subspaces and cosets of subspaces in vector space. Formalized Mathematics, 1(5):865–870, 1990.

[12] Wojciech A. Trybulec. Vectors in real linear space. Formalized Mathematics, 1(2):291–296, 1990.

[13] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[14] Edmund Woronowicz. Relations defined on sets. Formalized Mathematics, 1(1):181–186, 1990.

372 anna justyna milewska

The Tichonov Theorem

Bartłomiej Skorulski University of Białystok

MML Identifier: YELLOW17.

The terminology and notation used here are introduced in the following articles: [15], [11], [1], [5], [7], [4], [3], [13], [8], [10], [16], [14], [12], [6], [9], and [2].

1. Some Properties of Products

One can prove the following propositions:

(1) For every function F and for all sets i, x_{1} and for every subset A_{1} of F (i) such that (proj(F, i))^{−1} ({x_{1}}) ∩ (proj(F, i))^{−1} (A_{1}) ≠ ∅ holds x_{1} ∈ A_{1}.

(2) For all functions F, f and for all sets i, x_{1} such that x_{1} ∈ F (i) and f ∈ ∏ F holds f +·(i, x_{1}) ∈ ∏ F.

(3) For every function F and for every set i such that i ∈ domF and ∏ F ≠ ∅ holds rngproj(F, i) = F (i).

(4) For every function F and for every set i such that i ∈ domF holds (proj(F, i))^{−1} (F (i)) = ∏ F.

(5) For all functions F, f and for all sets i, x_{1} such that x_{1} ∈ F (i) and i ∈ domF and f ∈ ∏ F holds f +·(i, x_{1}) ∈ (proj(F, i))^{−1} ({x_{1}}).

(6) Let F, f be functions, i_{1}, i_{2}, x_{2} be sets, and A_{2} be a subset of F (i_{2}). Suppose x_{2} ∈ F (i_{1}) and i_{1} ∈ domF and f ∈ ∏ F. If i_{1} ≠ i_{2}, then f ∈ (proj(F, i_{2}))^{−1} (A_{2}) iff f +·(i_{1}, x_{2}) ∈ (proj(F, i_{2}))^{−1} (A_{2}).

(7) Let F be a function, i_{1}, i_{2}, x_{2} be sets, and A_{2} be a subset of F (i_{2}). Suppose ∏ F ≠ ∅ and x_{2} ∈ F (i_{1}) and i_{1} ∈ domF and i_{2} ∈ domF and A_{2} ≠ F (i_{2}). Then (proj(F, i_{1}))^{−1} ({x_{2}}) ⊆ (proj(F, i_{2}))^{−1} (A_{2}) if and only if i_{1} = i_{2} and x_{2} ∈ A_{2}.

The scheme ElProductEx deals with a non empty set A, a topological space yielding nonempty many sorted set B indexed by A, and a binary predicate P, and states that:

There exists an element f of ∏ B such that for every element i of A holds P[f(i), i]

provided the parameters have the following property:

• For every element i of A there exists an element x of B(i) such that P[x, i].

One can prove the following propositions:

(8) Let I be a non empty set, J be a topological space yielding nonempty many sorted set indexed by I, i be an element of I, and f be an element of ∏ J. Then (proj(J, i))(f) = f(i).

(9) Let I be a non empty set, J be a topological space yielding nonempty many sorted set indexed by I, i be an element of I, x_{1} be an element of J(i), and A_{1} be a subset of J(i). If (proj(J, i))^{−1} ({x_{1}})∩(proj(J, i))^{−1} (A_{1}) ≠ ∅, then x_{1} ∈ A_{1}.

(10) Let I be a non empty set, J be a topological space yielding nonempty many sorted set indexed by I, and i be an element of I. Then (proj(J, i))^{−1} (Ω_{J(i)}) = Ω_{∏ J}.

(11) Let I be a non empty set, J be a topological space yielding nonempty many sorted set indexed by I, i be an element of I, x_{1} be an element of J(i), and f be an element of ∏ J. Then f +·(i, x_{1}) ∈ (proj(J, i))^{−1} ({x_{1}}).

(12) Let I be a non empty set, J be a topological space yielding nonempty many sorted set indexed by I, i_{1}, i_{2} be elements of I, x_{2} be an element of J(i_{1}), and A_{2} be a subset of J(i_{2}). If A_{2} ≠ Ω_{J(i_{2})}, then (proj(J, i_{1}))^{−1} ({x_{2}}) ⊆ (proj(J, i_{2}))^{−1} (A_{2}) iff i_{1} = i_{2} and x_{2} ∈ A_{2}.

(13) Let I be a non empty set, J be a topological space yielding nonempty many sorted set indexed by I, i_{1}, i_{2} be elements of I, x_{2} be an element of J(i_{1}), A_{2} be a subset of J(i_{2}), and f be an element of ∏ J. If i_{1} ≠ i_{2}, then f ∈ (proj(J, i_{2}))^{−1} (A_{2}) iff f +·(i_{1}, x_{2}) ∈ (proj(J, i_{2}))^{−1} (A_{2}).

2. Some Properties of Compact Spaces

One can prove the following three propositions:

(14) Let T be a topological structure and F be a family of subsets of T. Then F is a cover of T if and only if the carrier of T ⊆ ⋃ F.

(15) Let T be a non empty topological structure. Then T is compact if and only if for every family F of subsets of T such that F is open and Ω_{T} ⊆ ⋃ F there exists a family G of subsets of T such that G ⊆ F and Ω_{T} ⊆ ⋃ G and G is finite.

(16) Let T be a non empty topological space and B be a prebasis of T. Then T is compact if and only if for every subset F of B such that Ω_{T} ⊆ ⋃ F there exists a finite subset G of F such that Ω_{T} ⊆ ⋃ G.

3. The Tichonov Theorem

The following propositions are true:

(17) Let I be a non empty set, J be a topological space yielding nonempty many sorted set indexed by I, and A be a set. Suppose A ∈ the product prebasis for J. Then there exists an element i of I and there exists a subset A_{1} of J(i) such that A_{1} is open and (proj(J, i))^{−1} (A_{1}) = A.

(18) Let I be a non empty set, J be a topological space yielding nonempty many sorted set indexed by I, i be an element of I, x_{1} be an element of J(i), and A be a set. Suppose A ∈ the product prebasis for J and (proj(J, i))^{−1} ({x_{1}}) ⊆ A. Then A = Ω_{∏ J} or there exists a subset A_{1} of J(i) such that A_{1} ≠ Ω_{J(i)} and x_{1} ∈ A_{1} and A_{1} is open and A = (proj(J, i))^{−1} (A_{1}).

(19) Let I be a non empty set, J be a topological space yielding nonempty many sorted set indexed by I, i be an element of I, and F_{1} be a non empty family of subsets of J(i). If Ω_{J(i)} ⊆ ⋃ F_{1}, then Ω_{∏ J} ⊆ ⋃{(proj(J, i))^{−1} (A_{1}) : A_{1} ranges over elements of F_{1}}.

(20) Let I be a non empty set, J be a topological space yielding nonempty many sorted set indexed by I, i be an element of I, x_{1} be an element of J(i), and G be a subset of the product prebasis for J. Suppose (proj(J, i))^{−1} ({x_{1}}) ⊆ ⋃ G and for every set A such that A ∈ the product prebasis for J and A ∈ G holds (proj(J, i))^{−1} ({x_{1}}) ⊈ A. Then Ω_{∏ J} ⊆ ⋃ G.

(21) Let I be a non empty set, J be a topological space yielding nonempty many sorted set indexed by I, i be an element of I, and F be a subset of the product prebasis for J. Suppose that for every finite subset G of F holds Ω_{∏ J} ⊈ ⋃ G. Let x_{1} be an element of J(i) and G be a finite subset of F. Suppose (proj(J, i))^{−1} ({x_{1}}) ⊆ ⋃ G. Then there exists a set A such that A ∈ the product prebasis for J and A ∈ G and (proj(J, i))^{−1} ({x_{1}}) ⊆ A.

(22) Let I be a non empty set, J be a topological space yielding nonempty many sorted set indexed by I, i be an element of I, and F be a subset of the product prebasis for J. Suppose that for every finite subset G of F holds Ω_{∏ J} ⊈ ⋃ G. Let x_{1} be an element of J(i) and G be a finite subset of F. Suppose (proj(J, i))^{−1} ({x_{1}}) ⊆ ⋃ G. Then there exists a subset A_{1} of J(i) such that A_{1} ≠ Ω_{J(i)} and x_{1} ∈ A_{1} and (proj(J, i))^{−1} (A_{1}) ∈ G and A_{1} is open.

376 bartłomiej skorulski

(23) Let I be a non empty set, J be a topological space yielding nonempty many sorted set indexed by I, i be an element of I, and F be a subset of the product prebasis for J. Suppose for every element i of I holds J(i) is compact and for every finite subset G of F holds Ω_{∏ J} ⊈ ⋃ G. Then there exists an element x_{1} of J(i) such that for every finite subset G of F holds (proj(J, i))^{−1} ({x_{1}}) ⊈ ⋃ G.

(24) Let I be a non empty set and J be a topological space yielding nonempty many sorted set indexed by I. If for every element i of I holds J(i) is compact, then ∏ J is compact.

References

[1] Grzegorz Bancerek. König’s theorem. Formalized Mathematics, 1(3):589–593, 1990.

[2] Grzegorz Bancerek. The “way-below” relation. Formalized Mathematics, 6(1):169–176, 1997.

[3] Grzegorz Bancerek and Andrzej Trybulec. Miscellaneous facts about functions. Formalized Mathematics, 5(4):485–492, 1996.

[4] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[5] Agata Darmochwał. Compact spaces. Formalized Mathematics, 1(2):383–386, 1990.

[6] Agata Darmochwał. Families of subsets, subspaces and mappings in topological spaces. Formalized Mathematics, 1(2):257–261, 1990.

[7] Agata Darmochwał. Finite sets. Formalized Mathematics, 1(1):165–167, 1990.

[8] Mariusz Giero. More on products of many sorted algebras. Formalized Mathematics, 5(4):621–626, 1996.

[9] Jarosław Gryko. Injective spaces. Formalized Mathematics, 7(1):57–62, 1998.

[10] Beata Padlewska and Agata Darmochwał. Topological spaces and continuous functions. Formalized Mathematics, 1(1):223–230, 1990.

[11] Alexander Yu. Shibakov and Andrzej Trybulec. The Cantor set. Formalized Mathematics, 5(2):233–236, 1996.

[12] Andrzej Trybulec. Tarski Grothendieck set theory. Formalized Mathematics, 1(1):9–11, 1990.

[13] Andrzej Trybulec. Many-sorted sets. Formalized Mathematics, 4(1):15–22, 1993.

[14] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[15] Zinaida Trybulec and Halina Święczkowska. Boolean properties of sets. Formalized Mathematics, 1(1):17–23, 1990.

[16] Edmund Woronowicz. Relations and their basic properties. Formalized Mathematics, 1(1):73–83, 1990.

On the Order-consistent Topology of Complete and Uncomplete Lattices

Ewa Grądzka University of Białystok

Summary. This paper is a continuation of the formalisation of [5] pp. 108– 109. Order-consistent and upper topologies are defined. The theorem that the Scott and the upper topologies are order-consistent is proved. Remark 1.4 and example 1.5(2) are generalized for proving this theorem.

MML Identifier: WAYBEL32.

The terminology and notation used in this paper are introduced in the following papers: [8], [12], [1], [13], [9], [15], [14], [16], [11], [3], [6], [7], [2], [10], and [4].

Let T be a non empty FR-structure. We say that T is upper if and only if: (Def. 1) {− ↓x : x ranges over elements of T } is a prebasis of T.

Let us mention that there exists a top-lattice which is Scott, up-complete, and strict.

Let T be a topological space-like non empty reflexive FR-structure. We say that T is order consistent if and only if the condition (Def. 2) is satisfied.

(Def. 2) Let x be an element of T. Then (i) ↓x = \overline{\{x\}}, and (ii) for every eventually-directed net N in T such that x = supN and for

every neighbourhood V of x holds N is eventually in V. One can verify that every non empty reflexive topological space-like FR-

structure which is trivial is also upper.

Let us mention that there exists a top-lattice which is upper, trivial, upcomplete, and strict.

The following propositions are true:

(1) For every upper up-complete non empty top-poset T and for every subset A of T such that A is open holds A is upper.

(2) For every up-complete non empty top-poset T such that T is upper holds T is order consistent.

(3) Let T be a Scott up-complete non empty reflexive transitive antisymmetric FR-structure and x be an element of T. Then ↓x is directly closed and lower.

(4) Let T be a Scott up-complete non empty reflexive transitive antisymmetric FR-structure and S be a subset of T. Then S is closed if and only if S is directly closed and lower.

(5) Let T be a Scott up-complete non empty reflexive transitive antisymmetric FR-structure and x be an element of T. Then ↓x is closed.

(6) Let S be an up-complete reflexive antisymmetric non empty relational structure and T be a non empty reflexive relational structure. Suppose the relational structure of S = the relational structure of T. Let A be a subset of S and C be a subset of T. If A = C and A is inaccessible, then C is inaccessible.

(7) For every up-complete non empty reflexive transitive antisymmetric relational structure R holds there exists a topological augmentation of R which is Scott.

(8) Let R be an up-complete non empty poset and T be a topological augmentation of R. If T is Scott, then T is correct.

Let R be an up-complete non empty reflexive transitive antisymmetric relational structure. Observe that every topological augmentation of R which is Scott is also correct.

Let R be an up-complete non empty reflexive transitive antisymmetric relational structure. Note that there exists a topological augmentation of R which is Scott and correct.

The following propositions are true:

(9) Let T be a Scott up-complete non empty reflexive transitive antisymmetric FR-structure and x be an element of T. Then \overline{\{x\}} = ↓x.

(10) Every up-complete Scott non empty top-poset is order consistent.

(11) Let R be an inf-complete semilattice, Z be a net in R, and D be a subset of R. Suppose D = {⌈−⌉_{R}{Z(k); k ranges over elements of the carrier of Z: k j} : j ranges over elements of the carrier of Z}. Then D is non empty and directed.

(12) Let R be an inf-complete semilattice, S be a subset of R, and a be an element of R. If a ∈ S, then ⌈−⌉_{R}S a.

(13) For every inf-complete semilattice R and for every monotone reflexive net N in R holds lim inf N = supN.

(14) Let R be an inf-complete semilattice and S be a subset of R. Then S ∈ the topology of ConvergenceSpace(the Scott convergence of R) if and

only if S is inaccessible and upper.

(15) Let R be an inf-complete up-complete semilattice and T be a topological

augmentation of R. If the topology of T = σ(R), then T is Scott. Let R be an inf-complete up-complete semilattice. One can check that there

exists a topological augmentation of R which is strict, Scott, and correct.

One can prove the following two propositions:

(16) Let S be an up-complete inf-complete semilattice and T be a Scott topological augmentation of S. Then σ(S) = the topology of T.

(17) Every Scott up-complete non empty reflexive transitive antisymmetric

FR-structure is a T_{0}-space. Let R be an up-complete non empty reflexive transitive antisymmetric rela-

tional structure. Note that every topological augmentation of R is up-complete.

The following propositions are true:

(18) Let R be an up-complete non empty reflexive transitive antisymmetric relational structure, T be a Scott topological augmentation of R, x be an element of T, and A be an upper subset of T. If x ∉ A, then − ↓x is a neighbourhood of A.

(19) Let R be an up-complete non empty reflexive transitive antisymmetric FR-structure, T be a Scott topological augmentation of R, and S be an upper subset of T. Then there exists a family F of subsets of T such that S = ⋂ F and for every subset X of T such that X ∈ F holds X is a neighbourhood of S.

(20) Let T be a Scott up-complete non empty reflexive transitive antisymmetric FR-structure and S be a subset of T. Then S is open if and only if S is upper and property(S).

(21) Let R be an up-complete non empty reflexive transitive antisymmetric FR-structure, S be a non empty directed subset of R, and a be an element of R. If a ∈ S, then a ⨆_{R} S.

Let T be an up-complete non empty reflexive transitive antisymmetric FRstructure. One can check that every subset of T which is lower is also property(S).

One can prove the following propositions:

(22) For every finite up-complete non empty poset T holds every subset of T is inaccessible.

(23) Let R be a complete connected lattice, T be a Scott topological augmentation of R, and x be an element of T. Then − ↓x is open.

(24) Let R be a complete connected lattice, T be a Scott topological augmentation of R, and S be a subset of T. Then S is open if and only if one of the following conditions is satisfied:

(i) S = the carrier of T, or (ii) S ∈ {− ↓x : x ranges over elements of T }.

Let R be an up-complete non empty poset. One can check that there exists a correct topological augmentation of R which is order consistent.

Let us observe that there exists a top-lattice which is order consistent and complete.

The following three propositions are true:

(25) Let R be a non empty FR-structure and A be a subset of R. Suppose that for every element x of R holds ↓x = \overline{\{x\}}. If A is open, then A is upper.

(26) Let R be a non empty FR-structure and A be a subset of R. Suppose that for every element x of R holds ↓x = \overline{\{x\}}. Let A be a subset of R. If A is closed, then A is lower.

(27) For every up-complete inf-complete lattice T and for every net N in T and for every element i of N holds lim inf(N↾i) = lim inf N.

Let S be a non empty 1-sorted structure, let R be a non empty relational structure, and let f be a function from the carrier of R into the carrier of S. The functor R ∗ f yielding a strict non empty net structure over S is defined as follows:

(Def. 3) The relational structure of R ∗ f = the relational structure of R and the

mapping of R ∗ f = f. Let S be a non empty 1-sorted structure, let R be a non empty transitive

relational structure, and let f be a function from the carrier of R into the carrier of S. One can check that R ∗ f is transitive.

Let S be a non empty 1-sorted structure, let R be a non empty directed relational structure, and let f be a function from the carrier of R into the carrier of S. Note that R ∗ f is directed.

Let R be a non empty relational structure and let N be a prenet over R. The functor inf netN yields a strict prenet over R and is defined by the condition (Def. 4).

(Def. 4) There exists a map f from N into R such that (i) inf netN = N ∗ f, and (ii) for every element i of the carrier of N holds f(i) = ⌈−⌉_{R}{N(k); k ranges

over elements of the carrier of N: k i}. Let R be a non empty relational structure and let N be a net in R. One can

verify that inf netN is transitive.

Let R be a non empty relational structure and let N be a net in R. Note that inf netN is directed.

Let R be an inf-complete non empty reflexive antisymmetric relational structure and let N be a net in R. One can verify that inf netN is monotone.

Let R be an inf-complete non empty reflexive antisymmetric relational structure and let N be a net in R. One can verify that inf netN is eventually-directed.

We now state several propositions:

(28) Let R be a non empty relational structure and N be a net in R. Then rng(the mapping of inf netN) = {⌈−⌉_{R}{N(i); i ranges over elements of the carrier of N: i j} : j ranges over elements of the carrier of N}.

(29) For every up-complete inf-complete lattice R and for every net N in R holds supinf netN = lim inf N.

(30) For every up-complete inf-complete lattice R and for every net N in R and for every element i of N holds supinf netN = lim inf(N↾i).

(31) Let R be an inf-complete semilattice, N be a net in R, and V be an upper subset of R. If inf netN is eventually in V, then N is eventually in V.

(32) Let R be an inf-complete semilattice, N be a net in R, and V be a lower subset of R. If N is eventually in V, then inf netN is eventually in V.

(33) Let R be a topological space-like order consistent up-complete infcomplete non empty top-lattice, N be a net in R, and x be an element of R. If x lim inf N, then x is a cluster point of N.

(34) Let R be an order consistent up-complete inf-complete topological spacelike non empty top-lattice, N be an eventually-directed net in R, and x be an element of R. Then x lim inf N if and only if x is a cluster point of N.

Acknowledgments

I would like to thank Dr. Grzegorz Bancerek for his help in the preparation of this article.

References

[1] Grzegorz Bancerek. Complete lattices. Formalized Mathematics, 2(5):719–725, 1991.

[2] Grzegorz Bancerek. Bounds in posets and relational substructures. Formalized Mathematics, 6(1):81–91, 1997.

[3] Grzegorz Bancerek. Directed sets, nets, ideals, filters, and maps. Formalized Mathematics, 6(1):93–107, 1997.

[4] Grzegorz Bancerek. Bases and refinements of topologies. Formalized Mathematics, 7(1):35–43, 1998.

[5] G. Gierz, K.H. Hofmann, K. Keimel, J.D. Lawson, M. Mislove, and D.S. Scott. A Compendium of Continuous Lattices. Springer-Verlag, Berlin, Heidelberg, New York, 1980.

[6] Artur Korniłowicz. Meet–continuous lattices. Formalized Mathematics, 6(1):159–167, 1997.

[7] Artur Korniłowicz. On the topological properties of meet-continuous lattices. Formalized Mathematics, 6(2):269–277, 1997.

[8] Beata Padlewska. Locally connected spaces. Formalized Mathematics, 2(1):93–96, 1991.

[9] Beata Padlewska and Agata Darmochwał. Topological spaces and continuous functions. Formalized Mathematics, 1(1):223–230, 1990.

382 ewa grądzka

[10] Andrzej Trybulec. Moore-Smith convergence. Formalized Mathematics, 6(2):213–225, 1997.

[11] Andrzej Trybulec. Scott topology. Formalized Mathematics, 6(2):311–319, 1997.

[12] Wojciech A. Trybulec. Groups. Formalized Mathematics, 1(5):821–827, 1990.

[13] Wojciech A. Trybulec. Partially ordered sets. Formalized Mathematics, 1(2):313–319, 1990.

[14] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[15] Edmund Woronowicz. Relations defined on sets. Formalized Mathematics, 1(1):181–186, 1990.

[16] Mariusz Żynel and Adam Guzowski. T_{0} topological spaces. Formalized Mathematics, 5(1):75–77, 1996.

On Segre’s Product of Partial Line Spaces

Adam Naumowicz University of Białystok

Summary. In this paper the concept of partial line spaces is presented. We also construct the Segre’s product for a family of partial line spaces indexed by an arbitrary nonempty set.

MML Identifier: PENCIL 1.

The terminology and notation used in this paper have been introduced in the following articles: [16], [1], [2], [7], [14], [6], [13], [11], [9], [10], [8], [5], [17], [15], [12], [4], and [3].

1. Preliminaries

One can prove the following propositions:

(1) For all functions f, g such that ∏ f = ∏ g holds if f is non-empty, then g is non-empty.

(2) For every set X holds 2 ⊆ \overline{\overline{X}} iff there exist sets x, y such that x ∈ X and y ∈ X and x ≠ y.

(3) For every set X such that 2 ⊆ \overline{\overline{X}} and for every set x there exists a set y such that y ∈ X and x ≠ y.

(4) For every set X holds 2 ⊆ \overline{\overline{X}} iff X is non trivial.

(5) For every set X holds 3 ⊆ \overline{\overline{X}} iff there exist sets x, y, z such that x ∈ X and y ∈ X and z ∈ X and x ≠ y and x ≠ z and y ≠ z.

(6) For every set X such that 3 ⊆ \overline{\overline{X}} and for all sets x, y there exists a set z such that z ∈ X and x ≠ z and y ≠ z.

2. Partial Line Spaces

Let S be a topological structure. A block of S is an element of the topology of S.

Let S be a topological structure and let x, y be points of S. We say that x, y are collinear if and only if:

(Def. 1) x = y or there exists a block l of S such that {x, y} ⊆ l.

Let S be a topological structure and let T be a subset of the carrier of S. We say that T is closed under lines if and only if:

(Def. 2) For every block l of S such that 2 ⊆ \overline{\overline{l ∩ T}} holds l ⊆ T.

We say that T is strong if and only if: (Def. 3) For all points x, y of S such that x ∈ T and y ∈ T holds x, y are collinear.

Let S be a topological structure. We say that S is void if and only if: (Def. 4) The topology of S is empty.

We say that S is degenerated if and only if: (Def. 5) The carrier of S is a block of S.

We say that S has non trivial blocks if and only if: (Def. 6) For every block k of S holds 2 ⊆ \overline{\overline{k}}.

We say that S is identifying close blocks if and only if: (Def. 7) For all blocks k, l of S such that 2 ⊆ \overline{\overline{k ∩ l}} holds k = l.

We say that S is truly-partial if and only if: (Def. 8) There exist points x, y of S such that x, y are not collinear.

We say that S has no isolated points if and only if: (Def. 9) For every point x of S there exists a block l of S such that x ∈ l.

We say that S is connected if and only if the condition (Def. 10) is satisfied. (Def. 10) Let x, y be points of S. Then there exists a finite sequence f of elements

of the carrier of S such that

(i) x = f(1), (ii) y = f(lenf), and (iii) for every natural number i such that 1 i and i < lenf and for all

points a, b of S such that a = f(i) and b = f(i+1) holds a, b are collinear. We say that S is strongly connected if and only if the condition (Def. 11) is satisfied.

(Def. 11) Let x be a point of S and X be a subset of the carrier of S. Suppose X is closed under lines and strong. Then there exists a finite sequence f of elements of 2^{the carrier of S} such that

(i) X = f(1), (ii) x ∈ f(lenf), (iii) for every subset W of the carrier of S such that W ∈ rngf holds W is

closed under lines and strong, and (iv) for every natural number i such that 1 i and i < lenf holds 2 ⊆

\overline{\overline{f(i) ∩ f(i + 1)}} . One can prove the following propositions:

(7) Let X be a non empty set. Suppose 3 ⊆ \overline{\overline{X}} . Let S be a topological structure. Suppose the carrier of S = X and the topology of S = {L; L ranges over subsets of X: 2 = \overline{\overline{L}}\}. Then S is non empty, non void, non degenerated, non truly-partial, and identifying close blocks and has non trivial blocks and no isolated points.

(8) Let X be a non empty set. Suppose 3 ⊆ \overline{\overline{X}} . Let K be a subset of X. Suppose \overline{\overline{K}} = 2. Let S be a topological structure. Suppose the carrier of S = X and the topology of S = {L; L ranges over subsets of X: 2 = \overline{\overline{L}}\} \ \{K\}. Then S is non empty, non void, non degenerated, truly-partial, and identifying close blocks and has non trivial blocks and no isolated points.

One can verify that there exists a topological structure which is strict, non empty, non void, non degenerated, non truly-partial, and identifying close blocks and has non trivial blocks and no isolated points and there exists a topological structure which is strict, non empty, non void, non degenerated, truly-partial, and identifying close blocks and has non trivial blocks and no isolated points.

Let S be a non void topological structure. Note that the topology of S is non empty.

Let S be a topological structure with no isolated points and let x, y be points of S. Let us observe that x, y are collinear if and only if:

(Def. 12) There exists a block l of S such that {x, y} ⊆ l.

A PLS is a non empty non void non degenerated identifying close blocks topological structure with non trivial blocks.

Let F be a binary relation. We say that F is TopStruct-yielding if and only if:

(Def. 13) For every set x such that x ∈ rngF holds x is a topological structure.

Let us mention that every function which is TopStruct-yielding is also 1sorted yielding.

Let I be a set. Observe that there exists a many sorted set indexed by I which is TopStruct-yielding.

Let us note that there exists a function which is TopStruct-yielding.

Let F be a binary relation. We say that F is non-void-yielding if and only if:

(Def. 14) For every topological structure S such that S ∈ rngF holds S is non void.

Let F be a TopStruct-yielding function. Let us observe that F is non-void-yielding if and only if:

(Def. 15) For every set i such that i ∈ rngF holds i is a non void topological

structure. Let F be a binary relation. We say that F is trivial-yielding if and only if:

(Def. 16) For every set S such that S ∈ rngF holds S is trivial.

Let F be a binary relation. We say that F is non-Trivial-yielding if and only if:

(Def. 17) For every 1-sorted structure S such that S ∈ rngF holds S is non trivial.

Let us observe that every binary relation which is non-Trivial-yielding is also nonempty.

Let F be a 1-sorted yielding function. Let us observe that F is non-Trivial-yielding if and only if:

(Def. 18) For every set i such that i ∈ rngF holds i is a non trivial 1-sorted

structure. Let I be a non empty set, let A be a TopStruct-yielding many sorted set

indexed by I, and let j be an element of I. Then A(j) is a topological structure.

Let F be a binary relation. We say that F is PLS-yielding if and only if: (Def. 19) For every set x such that x ∈ rngF holds x is a PLS.

One can verify the following observations:

∗ every function which is PLS-yielding is also nonempty and TopStructyielding,

∗ every TopStruct-yielding function which is PLS-yielding is also non-void-yielding, and

∗ every TopStruct-yielding function which is PLS-yielding is also non-Trivial-yielding.

Let I be a set. One can check that there exists a many sorted set indexed by I which is PLS-yielding.

Let I be a non empty set, let A be a PLS-yielding many sorted set indexed by I, and let j be an element of I. Then A(j) is a PLS.

Let I be a set and let A be a many sorted set indexed by I. We say that A is Segre-like if and only if:

(Def. 20) There exists an element i of I such that for every element j of I such

that i ≠ j holds A(j) is non empty and trivial. Let I be a set and let A be a many sorted set indexed by I. Note that {A}

is trivial-yielding.

The following proposition is true

(9) Let I be a non empty set, A be a many sorted set indexed by I, i be an element of I, and S be a non trivial set. Then A +·(i, S) is non trivialyielding.

Let I be a non empty set and let A be a many sorted set indexed by I. Observe that {A} is Segre-like.

We now state two propositions:

(10) For every non empty set I and for every many sorted set A indexed by I and for all sets i, S holds {A} +·(i, S) is Segre-like.

(11) Let I be a non empty set, A be a nonempty 1-sorted yielding many sorted set indexed by I, and B be an element of the support of A. Then {B} is a many sorted subset indexed by the support of A.

Let I be a non empty set and let A be a nonempty 1-sorted yielding many sorted set indexed by I. One can check that there exists a many sorted subset indexed by the support of A which is Segre-like, trivial-yielding, and non-empty.

Let I be a non empty set and let A be a non-Trivial-yielding 1-sorted yielding many sorted set indexed by I. Note that there exists a many sorted subset indexed by the support of A which is Segre-like, non trivial-yielding, and nonempty.

Let I be a non empty set. Observe that there exists a many sorted set indexed by I which is Segre-like and non trivial-yielding.

Let I be a non empty set and let B be a Segre-like non trivial-yielding many sorted set indexed by I. The functor index(B) yielding an element of I is defined by:

(Def. 21) B(index(B)) is non trivial.

Next we state the proposition

(12) Let I be a non empty set, A be a Segre-like non trivial-yielding many sorted set indexed by I, and i be an element of I. If i ≠ index(A), then A(i) is non empty and trivial.

Let I be a non empty set. Note that every many sorted set indexed by I which is Segre-like and non trivial-yielding is also non-empty.

One can prove the following proposition

(13) Let I be a non empty set and A be a many sorted set indexed by I.

Then 2 ⊆ \overline{\overline{∏ A}} if and only if A is non-empty and non trivial-yielding. Let I be a non empty set and let B be a Segre-like non trivial-yielding many

sorted set indexed by I. Note that ∏ B is non trivial.

3. Segre’s Product

Let I be a non empty set and let A be a nonempty TopStruct-yielding many sorted set indexed by I. The functor Segre BlocksA yields a family of subsets of ∏ (the support of A) and is defined by the condition (Def. 22).

(Def. 22) Let x be a set. Then x ∈ Segre BlocksA if and only if there exists a Segre-like many sorted subset B indexed by the support of A such that x = ∏ B and there exists an element i of I such that B(i) is a block of A(i).

Let I be a non empty set and let A be a nonempty TopStruct-yielding many sorted set indexed by I. The functor Segre ProductA yielding a non empty topological structure is defined as follows:

(Def. 23) Segre ProductA = ⟨∏ (the support of A),Segre BlocksA⟩.

The following propositions are true:

(14) Let I be a non empty set and A be a nonempty TopStruct-yielding many sorted set indexed by I. Then every point of Segre ProductA is a many sorted set indexed by I.

(15) Let I be a non empty set and A be a nonempty TopStruct-yielding many sorted set indexed by I. If there exists an element i of I such that A(i) is non void, then Segre ProductA is non void.

(16) Let I be a non empty set and A be a nonempty TopStruct-yielding many sorted set indexed by I. Suppose that for every element i of I holds A(i) is non degenerated and there exists an element i of I such that A(i) is non void. Then Segre ProductA is non degenerated.

(17) Let I be a non empty set and A be a nonempty TopStruct-yielding many sorted set indexed by I. Suppose that for every element i of I holds A(i) has non trivial blocks and there exists an element i of I such that A(i) is non void. Then Segre ProductA has non trivial blocks.

(18) Let I be a non empty set and A be a nonempty TopStruct-yielding many sorted set indexed by I. Suppose that for every element i of I holds A(i) is identifying close blocks and has non trivial blocks and there exists an element i of I such that A(i) is non void. Then Segre ProductA is identifying close blocks.

Let I be a non empty set and let A be a PLS-yielding many sorted set indexed by I. Then Segre ProductA is a PLS.

One can prove the following propositions:

(19) Let T be a topological structure and S be a subset of the carrier of T. If S is trivial, then S is strong and closed under lines.

(20) Let S be an identifying close blocks topological structure, l be a block of S, and L be a subset of the carrier of S. If L = l, then L is closed under lines.

(21) Let S be a topological structure, l be a block of S, and L be a subset of the carrier of S. If L = l, then L is strong.

(22) For every non void topological structure S holds Ω_{S} is closed under lines.

(23) Let I be a non empty set, A be a Segre-like non trivial-yielding many sorted set indexed by I, and x, y be many sorted sets indexed by I. If x ∈ ∏ A and y ∈ ∏ A, then for every set i such that i ≠ index(A) holds x(i) = y(i).

(24) Let I be a non empty set, A be a PLS-yielding many sorted set indexed by I, and x be a set. Then x is a block of Segre ProductA if and only if there exists a Segre-like non trivial-yielding many sorted subset L indexed by the support of A such that x = ∏ L and L(index(L)) is a block of A(index(L)).

(25) Let I be a non empty set, A be a PLS-yielding many sorted set indexed by I, and P be a many sorted set indexed by I. Suppose P is a point of Segre ProductA. Let i be an element of I and p be a point of A(i). Then P +·(i, p) is a point of Segre ProductA.

(26) Let I be a non empty set and A, B be Segre-like non trivial-yielding many sorted sets indexed by I. Suppose 2 ⊆ \overline{\overline{∏ A ∩ ∏ B}} . Then index(A) = index(B) and for every set i such that i ≠ index(A) holds A(i) = B(i).

(27) Let I be a non empty set, A be a Segre-like non trivial-yielding many sorted set indexed by I, and N be a non trivial set. Then A+·(index(A), N) is Segre-like and non trivial-yielding.

(28) Let S be a non empty non void identifying close blocks topological structure with no isolated points. If S is strongly connected, then S is connected.

(29) Let I be a non empty set, A be a PLS-yielding many sorted set indexed by I, and S be a subset of the carrier of Segre ProductA. Then S is non trivial, strong, and closed under lines if and only if there exists a Segrelike non trivial-yielding many sorted subset B indexed by the support of A such that S = ∏ B and for every subset C of the carrier of A(index(B)) such that C = B(index(B)) holds C is strong and closed under lines.

References

[1] Grzegorz Bancerek. Cardinal numbers. Formalized Mathematics, 1(2):377–382, 1990.

[2] Grzegorz Bancerek. König’s theorem. Formalized Mathematics, 1(3):589–593, 1990.

[3] Grzegorz Bancerek. The reflection theorem. Formalized Mathematics, 1(5):973–977, 1990.

[4] Grzegorz Bancerek. The “way-below” relation. Formalized Mathematics, 6(1):169–176, 1997.

[5] Józef Białas. Group and field definitions. Formalized Mathematics, 1(3):433–439, 1990.

390 adam naumowicz

[6] Ewa Burakowska. Subalgebras of many sorted algebra. Lattice of subalgebras. Formalized Mathematics, 5(1):47–54, 1996.

[7] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[8] Artur Korniłowicz. Some basic properties of many sorted sets. Formalized Mathematics, 5(3):395–399, 1996.

[9] Beata Madras. Product of family of universal algebras. Formalized Mathematics, 4(1):103– 108, 1993.

[10] Beata Padlewska and Agata Darmochwał. Topological spaces and continuous functions. Formalized Mathematics, 1(1):223–230, 1990.

[11] Piotr Rudnicki and Andrzej Trybulec. Multivariate polynomials with arbitrary number of variables. Formalized Mathematics, 9(1):95–110, 2001.

[12] Andrzej Trybulec. Tarski Grothendieck set theory. Formalized Mathematics, 1(1):9–11, 1990.

[13] Andrzej Trybulec. Many-sorted sets. Formalized Mathematics, 4(1):15–22, 1993.

[14] Andrzej Trybulec. Many sorted algebras. Formalized Mathematics, 5(1):37–42, 1996.

[15] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[16] Zinaida Trybulec and Halina Święczkowska. Boolean properties of sets. Formalized Mathematics, 1(1):17–23, 1990.

[17] Edmund Woronowicz. Relations and their basic properties. Formalized Mathematics, 1(1):73–83, 1990.

The Evaluation of Polynomials

Robert Milewski University of Białystok

MML Identifier: POLYNOM4.

The articles [11], [15], [12], [3], [2], [17], [4], [18], [1], [13], [14], [9], [6], [7], [19], [16], [20], [5], [8], and [10] provide the terminology and notation for this paper.

1. Preliminaries

The following propositions are true:

(1) For every natural number n holds 0 − ′n = 0.

(2) Let D be a set, p be a finite sequence of elements of D, and i be a natural number. If i < lenp, then p↾(i + 1) = (p↾i)^{⌢} ⟨p(i + 1)⟩.

(3) Let D be a non empty set, p be a finite sequence of elements of D, and n be a natural number. If 1 n and n lenp, then p = (p↾(n − ′1))^{⌢} ⟨p(n)⟩^{⌢} (p_{⇂n}).

(4) Let L be an add-associative right zeroed right complementable non empty loop structure and n be a natural number. Then ∑(n ↦ 0_{L}) = 0_{L}.

2. About Polynomials

The following propositions are true:

(5) Let L be an add-associative right zeroed right complementable left distributive non empty double loop structure and p be a sequence of L. Then 0. L ∗ p = 0. L.

(6) For every non empty zero structure L holds len0. L = 0.

(7) For every non degenerated non empty multiplicative loop with zero structure L holds len1. L = 1.

(8) For every non empty zero structure L and for every Polynomial p of L such that lenp = 0 holds p = 0. L.

(9) Let L be a right zeroed non empty loop structure, p, q be Polynomials of L, and n be a natural number. If n lenp and n lenq, then n len(p + q).

(10) Let L be an add-associative right zeroed right complementable non empty loop structure and p, q be Polynomials of L. If lenp ≠ lenq, then len(p + q) = max(lenp, lenq).

(11) Let L be an add-associative right zeroed right complementable non empty loop structure and p be a Polynomial of L. Then len(− p) = lenp.

(12) Let L be an add-associative right zeroed right complementable non empty loop structure, p, q be Polynomials of L, and n be a natural number. If n lenp and n lenq, then n len(p − q).

(13) Let L be an add-associative right zeroed right complementable distributive commutative associative left unital field-like non empty double loop structure and p, q be Polynomials of L. If lenp > 0 and lenq > 0, then len(p ∗ q) = (lenp + lenq) − 1.

3. Leading Monomials

Let L be a non empty zero structure and let p be a Polynomial of L. The functor Leading-Monomialp yielding a sequence of L is defined as follows:

(Def. 1) (Leading-Monomialp)(lenp − ′1) = p(lenp − ′1) and for every natural

number n such that n ≠ lenp − ′1 holds (Leading-Monomialp)(n) = 0_{L}. The following proposition is true

(14) For every non empty zero structure L and for every Polynomial p of L

holds Leading-Monomialp = 0. L +·(lenp − ′1, p(lenp − ′1)). Let L be a non empty zero structure and let p be a Polynomial of L. Observe

that Leading-Monomialp is finite-Support.

We now state several propositions:

(15) For every non empty zero structure L and for every Polynomial p of L such that lenp = 0 holds Leading-Monomialp = 0. L.

(16) For every non empty zero structure L holds Leading-Monomial0. L = 0. L.

(17) For every non degenerated non empty multiplicative loop with zero structure L holds Leading-Monomial1. L = 1. L.

(18) For every non empty zero structure L and for every Polynomial p of L holds lenLeading-Monomialp = lenp.

(19) Let L be an add-associative right zeroed right complementable non empty loop structure and p be a Polynomial of L. Suppose lenp ≠ 0. Then there exists a Polynomial q of L such that lenq < lenp and p = q + Leading-Monomialp and for every natural number n such that n < lenp − 1 holds q(n) = p(n).

4. Evaluation of Polynomials

Let L be a unital non empty double loop structure, let p be a Polynomial of L, and let x be an element of the carrier of L. The functor eval(p, x) yields an element of L and is defined by the condition (Def. 2).

(Def. 2) There exists a finite sequence F of elements of the carrier of L such that eval(p, x) = ∑ F and lenF = lenp and for every natural number n such that n ∈ domF holds F (n) = p(n − ′1) · power_{L}(x, n − ′1).

Next we state several propositions:

(20) For every unital non empty double loop structure L and for every element x of the carrier of L holds eval(0. L, x) = 0_{L}.

(21) Let L be a well unital add-associative right zeroed right complementable associative non degenerated non empty double loop structure and x be an element of the carrier of L. Then eval(1. L, x) = 1_{L}.

(22) Let L be an Abelian add-associative right zeroed right complementable unital left distributive non empty double loop structure, p, q be Polynomials of L, and x be an element of the carrier of L. Then eval(p + q, x) = eval(p, x) + eval(q, x).

(23) Let L be an Abelian add-associative right zeroed right complementable unital distributive non empty double loop structure, p be a Polynomial of L, and x be an element of the carrier of L. Then eval(− p, x) = − eval(p, x).

(24) Let L be an Abelian add-associative right zeroed right complementable unital distributive non empty double loop structure, p, q be Polynomials of L, and x be an element of the carrier of L. Then eval(p − q, x) = eval(p, x) − eval(q, x).

(25) Let L be an add-associative right zeroed right complementable right zeroed distributive unital non empty double loop structure, p be a Polynomial of L, and x be an element of the carrier of L. Then eval(Leading-Monomialp, x) = p(lenp − ′1) · power_{L}(x, lenp − ′1).

(26) Let L be an add-associative right zeroed right complementable distributive commutative associative field-like left unital non degenerated non empty double loop structure, p, q be Polynomials of L, and x be an element of the carrier of L. Then eval(Leading-Monomialp ∗ q, x) = eval(Leading-Monomialp, x) · eval(q, x).

(27) Let L be a field, p, q be Polynomials of L, and x be an element of the carrier of L. Then eval(p ∗ q, x) = eval(p, x) · eval(q, x).

5. Evaluation Homomorphism

Let L be an add-associative right zeroed right complementable distributive unital non empty double loop structure and let x be an element of the carrier of L. The functor Polynom-Evaluation(L, x) yields a map from Polynom-RingL into L and is defined by:

(Def. 3) For every Polynomial p of L holds (Polynom-Evaluation(L, x))(p) =

eval(p, x). Let L be an add-associative right zeroed right complementable distribu-

tive associative well unital non degenerated non empty double loop structure and let x be an element of the carrier of L. One can verify that Polynom-Evaluation(L, x) is unity-preserving.

Let L be an Abelian add-associative right zeroed right complementable distributive unital non empty double loop structure and let x be an element of the carrier of L. One can verify that Polynom-Evaluation(L, x) is additive.

Let L be a field and let x be an element of the carrier of L. Observe that Polynom-Evaluation(L, x) is multiplicative.

Let L be a field and let x be an element of the carrier of L. Note that Polynom-Evaluation(L, x) is ring homomorphism.

References

[1] Grzegorz Bancerek. The fundamental properties of natural numbers. Formalized Mathematics, 1(1):41–46, 1990.

[2] Grzegorz Bancerek and Krzysztof Hryniewiecki. Segments of natural numbers and finite sequences. Formalized Mathematics, 1(1):107–114, 1990.

[3] Czesław Byliński. Binary operations. Formalized Mathematics, 1(1):175–180, 1990.

[4] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[5] Agata Darmochwał and Yatsuka Nakamura. The topological space E_{T}^{2}. Arcs, line segments and special polygonal arcs. Formalized Mathematics, 2(5):617–621, 1991.

[6] Krzysztof Hryniewiecki. Basic properties of real numbers. Formalized Mathematics, 1(1):35–40, 1990.

[7] Jarosław Kotowicz. Functions and finite sequences of real numbers. Formalized Mathematics, 3(2):275–278, 1992.

[8] Eugeniusz Kusak, Wojciech Leończuk, and Michał Muzalewski. Abelian groups, fields and vector spaces. Formalized Mathematics, 1(2):335–342, 1990.

[9] Robert Milewski. The ring of polynomials. Formalized Mathematics, 9(2):339–346, 2001.

[10] Michał Muzalewski. Construction of rings and left-, right-, and bi-modules over a ring. Formalized Mathematics, 2(1):3–11, 1991.

the evaluation of polynomials 395

[11] Michał Muzalewski and Lesław W. Szczerba. Construction of finite sequences over ring and left-, right-, and bi-modules over a ring. Formalized Mathematics, 2(1):97–104, 1991.

[12] Takaya Nishiyama and Yasuho Mizuhara. Binary arithmetics. Formalized Mathematics, 4(1):83–86, 1993.

[13] Jan Popiołek. Real normed space. Formalized Mathematics, 2(1):111–115, 1991.

[14] Piotr Rudnicki and Andrzej Trybulec. Multivariate polynomials with arbitrary number of variables. Formalized Mathematics, 9(1):95–110, 2001.

[15] Wojciech Skaba and Michał Muzalewski. From double loops to fields. Formalized Mathematics, 2(1):185–191, 1991.

[16] Andrzej Trybulec and Czesław Byliński. Some properties of real numbers. Formalized Mathematics, 1(3):445–449, 1990.

[17] Wojciech A. Trybulec. Binary operations on finite sequences. Formalized Mathematics, 1(5):979–981, 1990.

[18] Wojciech A. Trybulec. Groups. Formalized Mathematics, 1(5):821–827, 1990.

[19] Wojciech A. Trybulec. Vectors in real linear space. Formalized Mathematics, 1(2):291–296, 1990.

[20] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

396 robert milewski

The Construction and Computation of While-Loop Programs for SCMPDS^{1}

Jing-Chao Chen Shanghai Jiaotong University

Summary. This article defines two while-loop statements on SCMPDS, i.e. “while<0” and “while>0”, which resemble the while-statements of the common high language such as C. We previously presented a number of tricks for computing while-loop statements on SCMFSA, e.g. step-while. However, after inspecting a few realistic examples, we found that they are neither very useful nor of generalization. To cover much more computation cases of while-loop statements, we generalize the computation model of while-loop statements, based on the principle of Hoare’s axioms on the verification of programs.

MML Identifier: SCMPDS 8.

The notation and terminology used here are introduced in the following articles: [14], [15], [19], [16], [1], [3], [17], [4], [5], [20], [2], [12], [13], [22], [23], [10], [6], [9], [7], [8], [11], [21], and [18].

1. Preliminaries

In this paper x, a denote Int positions and s denotes a state of SCMPDS. We now state the proposition

(1) For every Int position a there exists a natural number i such that a = intposi.

Let t be a state of SCMPDS. The functor Dstatet yielding a state of SCMPDS is defined by the condition (Def. 1).

1This research is partially supported by the National Natural Science Foundation of China Grant No. 69873033.

(Def. 1) Let x be a set. Then (i) if x ∈ Data-Loc_{SCM}, then (Dstatet)(x) = t(x), (ii) if x ∈ the instruction locations of SCMPDS, then (Dstatet)(x) =

goto 0, and (iii) if x = IC_{SCMPDS} , then (Dstatet)(x) = inspos0. One can prove the following four propositions:

(2) For all states t_{1}, t_{2} of SCMPDS such that t_{1}↾Data-Loc_{SCM} = t_{2}↾Data-Loc_{SCM} holds Dstatet_{1} = Dstatet_{2}.

(3) For every state t of SCMPDS and for every instruction i of SCMPDS such that InsCode(i) ∈ {0, 4, 5, 6} holds Dstatet = DstateExec(i, t).

(4) (Dstates)(a) = s(a).

(5) Let a be an Int position. Then there exists a function f from ∏ (the object kind of SCMPDS) into ℕ such that for every state s of SCMPDS holds

(i) if s(a) 0, then f(s) = 0, and (ii) if s(a) > 0, then f(s) = s(a).

2. The Construction and Several Basic Properties of “while<0” Program

Let a be an Int position, let i be an integer, and let I be a Program-block. The functor while < 0(a, i, I) yielding a Program-block is defined by:

(Def. 2) while < 0(a, i, I) = ((a, i) >= 0 gotocardI +2); I; goto (− (cardI + 1)).

Let I be a shiftable Program-block, let a be an Int position, and let i be an integer. Observe that while < 0(a, i, I) is shiftable.

Let I be a No-StopCode Program-block, let a be an Int position, and let i be an integer. Note that while < 0(a, i, I) is No-StopCode.

Next we state several propositions:

(6) For every Int position a and for every integer i and for every Programblock I holds cardwhile < 0(a, i, I) = cardI + 2.

(7) Let a be an Int position, i be an integer, m be a natural number, and I be a Program-block. Then m < cardI + 2 if and only if insposm ∈ domwhile < 0(a, i, I).

(8) Let a be an Int position, i be an integer, and I be a Program-block. Then (while < 0(a, i, I))(inspos0) = (a, i) >= 0 gotocardI + 2 and (while < 0(a, i, I))(insposcardI + 1) = goto (− (cardI + 1)).

(9) Let s be a state of SCMPDS, I be a Program-block, a be an Int position, and i be an integer. If s(DataLoc(s(a), i)) 0, then while < 0(a, i, I) is closed on s and while < 0(a, i, I) is halting on s.

(10) Let s be a state of SCMPDS, I be a Program-block, a, c be Int positions, and i be an integer. If s(DataLoc(s(a), i)) 0, then IExec(while < 0(a, i, I), s) = s+·Start-At(insposcardI + 2).

(11) Let s be a state of SCMPDS, I be a Program-block, a be an Int position, and i be an integer. If s(DataLoc(s(a), i)) 0, then IC_{IExec(while<0(a,i,I),s)} = insposcardI + 2.

(12) Let s be a state of SCMPDS, I be a Program-block, a, b be Int positions, and i be an integer. If s(DataLoc(s(a), i)) 0, then (IExec(while < 0(a, i, I), s))(b) = s(b).

In this article we present several logical schemes. The scheme WhileLHalt deals with a unary functor F yielding a natural number, a state A of SCMPDS, a No-StopCode shiftable Program-block B, an Int position C, an integer D, and a unary predicate P, and states that:

F(A) = F(A) or P[A] but while < 0(C, D, B) is closed on A but while < 0(C, D, B) is halting on A

provided the following conditions are met:

• cardB > 0,

• For every state t of SCMPDS such that P[Dstatet] and F(Dstatet) = 0 holds t(DataLoc(A(C), D)) 0,

• P[DstateA], and

• Let t be a state of SCMPDS. Suppose P[Dstatet] and t(C) = A(C) and t(DataLoc(A(C), D)) < 0. Then (IExec(B, t))(C) = t(C) and B is closed on t and B is halting on t and F(DstateIExec(B, t)) < F(Dstatet) and P[DstateIExec(B, t)].

The scheme WhileLExec deals with a unary functor F yielding a natural number, a state A of SCMPDS, a No-StopCode shiftable Program-block B, an Int position C, an integer D, and a unary predicate P, and states that:

F(A) = F(A) or P[A] but IExec(while < 0(C, D, B), A) = IExec(while < 0(C, D, B), IExec(B, A))

provided the parameters meet the following conditions:

• cardB > 0,

• A(DataLoc(A(C), D)) < 0,

• For every state t of SCMPDS such that P[Dstatet] and F(Dstatet) = 0 holds t(DataLoc(A(C), D)) 0,

• P[DstateA], and

• Let t be a state of SCMPDS. Suppose P[Dstatet] and t(C) = A(C) and t(DataLoc(A(C), D)) < 0. Then (IExec(B, t))(C) = t(C) and B is closed on t and B is halting on t and F(DstateIExec(B, t)) < F(Dstatet) and P[DstateIExec(B, t)].

One can prove the following propositions:

(13) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a be an Int position, i be an integer, X be a set, and f be a function from ∏ (the object kind of SCMPDS) into ℕ. Suppose that

(i) cardI > 0, (ii) for every state t of SCMPDS such that f(Dstatet) = 0 holds

t(DataLoc(s(a), i)) 0, and (iii) for every state t of SCMPDS such that for every Int position x such

that x ∈ X holds t(x) = s(x) and t(a) = s(a) and t(DataLoc(s(a), i)) < 0 holds (IExec(I, t))(a) = t(a) and f(DstateIExec(I, t)) < f(Dstatet) and I is closed on t and halting on t and for every Int position x such that x ∈ X holds (IExec(I, t))(x) = t(x). Then while < 0(a, i, I) is closed on s and while < 0(a, i, I) is halting on s.

(14) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a be an Int position, i be an integer, X be a set, and f be a function from ∏ (the object kind of SCMPDS) into ℕ. Suppose that

(i) cardI > 0, (ii) s(DataLoc(s(a), i)) < 0, (iii) for every state t of SCMPDS such that f(Dstatet) = 0 holds

t(DataLoc(s(a), i)) 0, and (iv) for every state t of SCMPDS such that for every Int position x such

that x ∈ X holds t(x) = s(x) and t(a) = s(a) and t(DataLoc(s(a), i)) < 0 holds (IExec(I, t))(a) = t(a) and I is closed on t and halting on t and f(DstateIExec(I, t)) < f(Dstatet) and for every Int position x such that x ∈ X holds (IExec(I, t))(x) = t(x). Then IExec(while < 0(a, i, I), s) = IExec(while < 0(a, i, I), IExec(I, s)).

(15) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a be an Int position, i be an integer, and X be a set. Suppose that

(i) cardI > 0, and (ii) for every state t of SCMPDS such that for every Int position x such

that x ∈ X holds t(x) = s(x) and t(a) = s(a) and t(DataLoc(s(a), i)) < 0 holds (IExec(I, t))(a) = t(a) and (IExec(I, t))(DataLoc(s(a), i)) > t(DataLoc(s(a), i)) and I is closed on t and halting on t and for every Int position x such that x ∈ X holds (IExec(I, t))(x) = t(x). Then while < 0(a, i, I) is closed on s and while < 0(a, i, I) is halting on s.

(16) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a be an Int position, i be an integer, and X be a set. Suppose that

(i) s(DataLoc(s(a), i)) < 0, (ii) cardI > 0, and (iii) for every state t of SCMPDS such that for every Int position x such that x ∈ X holds t(x) = s(x) and t(a) = s(a) and t(DataLoc(s(a), i)) < 0 holds (IExec(I, t))(a) = t(a) and (IExec(I, t))(DataLoc(s(a), i)) > t(DataLoc(s(a), i)) and I is closed on t and halting on t and for every Int position x such that x ∈ X holds (IExec(I, t))(x) = t(x). Then IExec(while < 0(a, i, I), s) = IExec(while < 0(a, i, I), IExec(I, s)).

3. The Construction and Several Basic Properties of “while>0” Program

Let a be an Int position, let i be an integer, and let I be a Program-block. The functor while > 0(a, i, I) yields a Program-block and is defined by:

(Def. 3) while > 0(a, i, I) = ((a, i) <= 0 gotocardI +2); I; goto (− (cardI + 1)).

Let I be a shiftable Program-block, let a be an Int position, and let i be an integer. One can verify that while > 0(a, i, I) is shiftable.

Let I be a No-StopCode Program-block, let a be an Int position, and let i be an integer. Note that while > 0(a, i, I) is No-StopCode.

Next we state several propositions:

(17) For every Int position a and for every integer i and for every Programblock I holds cardwhile > 0(a, i, I) = cardI + 2.

(18) Let a be an Int position, i be an integer, m be a natural number, and I be a Program-block. Then m < cardI + 2 if and only if insposm ∈ domwhile > 0(a, i, I).

(19) Let a be an Int position, i be an integer, and I be a Program-block. Then (while > 0(a, i, I))(inspos0) = (a, i) <= 0 gotocardI + 2 and (while > 0(a, i, I))(insposcardI + 1) = goto (− (cardI + 1)).

(20) Let s be a state of SCMPDS, I be a Program-block, a be an Int position, and i be an integer. If s(DataLoc(s(a), i)) 0, then while > 0(a, i, I) is closed on s and while > 0(a, i, I) is halting on s.

(21) Let s be a state of SCMPDS, I be a Program-block, a, c be Int positions, and i be an integer. If s(DataLoc(s(a), i)) 0, then IExec(while > 0(a, i, I), s) = s+·Start-At(insposcardI + 2).

(22) Let s be a state of SCMPDS, I be a Program-block, a be an Int position, and i be an integer. If s(DataLoc(s(a), i)) 0, then IC_{IExec(while>0(a,i,I),s)} = insposcardI + 2.

(23) Let s be a state of SCMPDS, I be a Program-block, a, b be Int positions, and i be an integer. If s(DataLoc(s(a), i)) 0, then (IExec(while > 0(a, i, I), s))(b) = s(b).

Now we present two schemes. The scheme WhileGHalt deals with a unary functor F yielding a natural number, a state A of SCMPDS, a No-StopCode shiftable Program-block B, an Int position C, an integer D, and a unary predicate P, and states that:

F(A) = F(A) or P[A] but while > 0(C, D, B) is closed on A but while > 0(C, D, B) is halting on A

provided the parameters meet the following conditions:

• cardB > 0,

• For every state t of SCMPDS such that P[Dstatet] and F(Dstatet) = 0 holds t(DataLoc(A(C), D)) 0,

• P[DstateA], and

• Let t be a state of SCMPDS. Suppose P[Dstatet] and t(C) = A(C) and t(DataLoc(A(C), D)) > 0. Then (IExec(B, t))(C) = t(C) and B is closed on t and B is halting on t and F(DstateIExec(B, t)) < F(Dstatet) and P[DstateIExec(B, t)].

The scheme WhileGExec deals with a unary functor F yielding a natural number, a state A of SCMPDS, a No-StopCode shiftable Program-block B, an Int position C, an integer D, and a unary predicate P, and states that:

F(A) = F(A) or P[A] but IExec(while > 0(C, D, B), A) = IExec(while > 0(C, D, B), IExec(B, A))

provided the following conditions are satisfied:

• cardB > 0,

• A(DataLoc(A(C), D)) > 0,

• For every state t of SCMPDS such that P[Dstatet] and F(Dstatet) = 0 holds t(DataLoc(A(C), D)) 0,

• P[DstateA], and

• Let t be a state of SCMPDS. Suppose P[Dstatet] and t(C) = A(C) and t(DataLoc(A(C), D)) > 0. Then (IExec(B, t))(C) = t(C) and B is closed on t and B is halting on t and F(DstateIExec(B, t)) < F(Dstatet) and P[DstateIExec(B, t)].

One can prove the following propositions:

(24) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a be an Int position, i, c be integers, X, Y be sets, and f be a function from ∏ (the object kind of SCMPDS) into ℕ. Suppose that

(i) cardI > 0, (ii) for every state t of SCMPDS such that f(Dstatet) = 0 holds

t(DataLoc(s(a), i)) 0, (iii) for every x such that x ∈ X holds s(x) c + s(DataLoc(s(a), i)), and (iv) for every state t of SCMPDS such that for every x such that x ∈ X holds

t(x) c+t(DataLoc(s(a), i)) and for every x such that x ∈ Y holds t(x) = s(x) and t(a) = s(a) and t(DataLoc(s(a), i)) > 0 holds (IExec(I, t))(a) = t(a) and I is closed on t and halting on t and f(DstateIExec(I, t)) < f(Dstatet) and for every x such that x ∈ X holds (IExec(I, t))(x) c + (IExec(I, t))(DataLoc(s(a), i)) and for every x such that x ∈ Y holds (IExec(I, t))(x) = t(x). Then while > 0(a, i, I) is closed on s and while > 0(a, i, I) is halting on s.

(25) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a be an Int position, i, c be integers, X, Y be sets, and f be a function from ∏ (the object kind of SCMPDS) into ℕ. Suppose that

(i) s(DataLoc(s(a), i)) > 0, (ii) cardI > 0, (iii) for every state t of SCMPDS such that f(Dstatet) = 0 holds

t(DataLoc(s(a), i)) 0, (iv) for every x such that x ∈ X holds s(x) c + s(DataLoc(s(a), i)), and (v) for every state t of SCMPDS such that for every x such that x ∈ X holds

t(x) c+t(DataLoc(s(a), i)) and for every x such that x ∈ Y holds t(x) = s(x) and t(a) = s(a) and t(DataLoc(s(a), i)) > 0 holds (IExec(I, t))(a) = t(a) and I is closed on t and halting on t and f(DstateIExec(I, t)) < f(Dstatet) and for every x such that x ∈ X holds (IExec(I, t))(x) c + (IExec(I, t))(DataLoc(s(a), i)) and for every x such that x ∈ Y holds (IExec(I, t))(x) = t(x). Then IExec(while > 0(a, i, I), s) = IExec(while > 0(a, i, I), IExec(I, s)).

(26) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a be an Int position, i be an integer, X be a set, and f be a function from ∏ (the object kind of SCMPDS) into ℕ. Suppose that

(i) cardI > 0, (ii) for every state t of SCMPDS such that f(Dstatet) = 0 holds

t(DataLoc(s(a), i)) 0, and (iii) for every state t of SCMPDS such that for every x such that x ∈ X

holds t(x) = s(x) and t(a) = s(a) and t(DataLoc(s(a), i)) > 0 holds (IExec(I, t))(a) = t(a) and I is closed on t and halting on t and f(DstateIExec(I, t)) < f(Dstatet) and for every x such that x ∈ X holds (IExec(I, t))(x) = t(x). Then while > 0(a, i, I) is closed on s and while > 0(a, i, I) is halting on s and if s(DataLoc(s(a), i)) > 0, then IExec(while > 0(a, i, I), s) = IExec(while > 0(a, i, I), IExec(I, s)).

(27) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a be an Int position, i, c be integers, and X, Y be sets. Suppose that

(i) cardI > 0, (ii) for every x such that x ∈ X holds s(x) c + s(DataLoc(s(a), i)), and (iii) for every state t of SCMPDS such that for every x such that x ∈ X

holds t(x) c + t(DataLoc(s(a), i)) and for every x such that x ∈ Y holds t(x) = s(x) and t(a) = s(a) and t(DataLoc(s(a), i)) > 0 holds (IExec(I, t))(a) = t(a) and I is closed on t and halting on t and (IExec(I, t))(DataLoc(s(a), i)) < t(DataLoc(s(a), i)) and for every x such that x ∈ X holds (IExec(I, t))(x) c+(IExec(I, t))(DataLoc(s(a), i)) and for every x such that x ∈ Y holds (IExec(I, t))(x) = t(x). Then while > 0(a, i, I) is closed on s and while > 0(a, i, I) is halting on s and if s(DataLoc(s(a), i)) > 0, then IExec(while > 0(a, i, I), s) = IExec(while > 0(a, i, I), IExec(I, s)).

(28) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a be an Int position, i be an integer, and X be a set. Suppose that

(i) cardI > 0, and (ii) for every state t of SCMPDS such that for every x such that x ∈ X

holds t(x) = s(x) and t(a) = s(a) and t(DataLoc(s(a), i)) > 0 holds (IExec(I, t))(a) = t(a) and I is closed on t and halting on t and (IExec(I, t))(DataLoc(s(a), i)) < t(DataLoc(s(a), i)) and for every x such that x ∈ X holds (IExec(I, t))(x) = t(x). Then while > 0(a, i, I) is closed on s and while > 0(a, i, I) is halting on s and if s(DataLoc(s(a), i)) > 0, then IExec(while > 0(a, i, I), s) = IExec(while > 0(a, i, I), IExec(I, s)).

(29) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a be an Int position, i, c be integers, and X be a set. Suppose that

(i) cardI > 0, (ii) for every x such that x ∈ X holds s(x) c + s(DataLoc(s(a), i)), and (iii) for every state t of SCMPDS such that for every x such that x ∈ X holds

t(x) c + t(DataLoc(s(a), i)) and t(a) = s(a) and t(DataLoc(s(a), i)) > 0 holds (IExec(I, t))(a) = t(a) and I is closed on t and halting on t and (IExec(I, t))(DataLoc(s(a), i)) < t(DataLoc(s(a), i)) and for every x such that x ∈ X holds (IExec(I, t))(x) c + (IExec(I, t))(DataLoc(s(a), i)). Then while > 0(a, i, I) is closed on s and while > 0(a, i, I) is halting on s and if s(DataLoc(s(a), i)) > 0, then IExec(while > 0(a, i, I), s) = IExec(while > 0(a, i, I), IExec(I, s)).

References

[1] Grzegorz Bancerek. Cardinal numbers. Formalized Mathematics, 1(2):377–382, 1990.

[2] Grzegorz Bancerek. The fundamental properties of natural numbers. Formalized Mathematics, 1(1):41–46, 1990.

[3] Grzegorz Bancerek. König’s theorem. Formalized Mathematics, 1(3):589–593, 1990.

[4] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[5] Czesław Byliński. Functions from a set to a set. Formalized Mathematics, 1(1):153–164, 1990.

[6] Jing-Chao Chen. Computation and program shift in the SCMPDS computer. Formalized Mathematics, 8(1):193–199, 1999.

the construction and computation of … 405

[7] Jing-Chao Chen. Computation of two consecutive program blocks for SCMPDS. Formalized Mathematics, 8(1):211–217, 1999.

[8] Jing-Chao Chen. The construction and computation of conditional statements for SCMPDS. Formalized Mathematics, 8(1):219–234, 1999.

[9] Jing-Chao Chen. The construction and shiftability of program blocks for SCMPDS. Formalized Mathematics, 8(1):201–210, 1999.

[10] Jing-Chao Chen. The SCMPDS computer and the basic semantics of its instructions. Formalized Mathematics, 8(1):183–191, 1999.

[11] Jing-Chao Chen. Recursive Euclide algorithm. Formalized Mathematics, 9(1):1–4, 2001.

[12] Krzysztof Hryniewiecki. Basic properties of real numbers. Formalized Mathematics, 1(1):35–40, 1990.

[13] Krzysztof Hryniewiecki. Recursive definitions. Formalized Mathematics, 1(2):321–328, 1990.

[14] Yatsuka Nakamura and Andrzej Trybulec. A mathematical model of CPU. Formalized Mathematics, 3(2):151–160, 1992.

[15] Yatsuka Nakamura and Andrzej Trybulec. On a mathematical model of programs. Formalized Mathematics, 3(2):241–250, 1992.

[16] Yasushi Tanaka. On the decomposition of the states of SCM. Formalized Mathematics, 5(1):1–8, 1996.

[17] Andrzej Trybulec. Domains and their Cartesian products. Formalized Mathematics, 1(1):115–122, 1990.

[18] Andrzej Trybulec. Tarski Grothendieck set theory. Formalized Mathematics, 1(1):9–11, 1990.

[19] Andrzej Trybulec and Yatsuka Nakamura. Some remarks on the simple concrete model of computer. Formalized Mathematics, 4(1):51–56, 1993.

[20] Michał J. Trybulec. Integers. Formalized Mathematics, 1(3):501–505, 1990.

[21] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[22] Edmund Woronowicz. Relations and their basic properties. Formalized Mathematics, 1(1):73–83, 1990.

[23] Edmund Woronowicz. Relations defined on sets. Formalized Mathematics, 1(1):181–186, 1990.

406 jing-chao chen

Insert Sort on SCMPDS^{1}

Jing-Chao Chen Shanghai Jiaotong University

Summary. The goal of this article is to examine the effectiveness of “forloop” and “while-loop” statements on SCMPDS by insert sort. In this article, first of all, we present an approach to compute the execution result of “for-loop” program by “loop-invariant”, based on Hoare’s axioms for program verification. Secondly, we extend the fundamental properties of the finite sequence and complex instructions of SCMPDS. Finally, we prove the correctness of the insert sort program described in the article.

MML Identifier: SCPISORT.

The terminology and notation used in this paper have been introduced in the following articles: [16], [19], [1], [3], [4], [20], [2], [13], [15], [9], [5], [8], [6], [7], [12], [10], [11], [17], [21], [18], and [14].

1. Preliminaries

In this paper n, p_{0} are natural numbers.

Let f be a finite sequence of elements of ℤ, let s be a state of SCMPDS, and let m be a natural number. We say that f is FinSequence on s, m if and only if:

(Def. 1) For every natural number i such that 1 i and i lenf holds f(i) = s(intposm + i).

We now state four propositions:

(1) Let f be a finite sequence of elements of ℤ and m, n be natural numbers. If m n, then f is non decreasing on m, n.

1This research is partially supported by the National Natural Science Foundation of China Grant No. 69873033.

(2) Let s be a state of SCMPDS and n, m be natural numbers. Then there exists a finite sequence f of elements of ℤ such that lenf = n and for every natural number i such that 1 i and i lenf holds f(i) = s(intposm+i).

(3) Let s be a state of SCMPDS and n, m be natural numbers. Then there exists a finite sequence f of elements of ℤ such that lenf = n and f is FinSequence on s, m.

(4) Let f, g be finite sequences of elements of ℤ and m, n be natural numbers. Suppose that 1 n and n lenf and 1 m and m lenf and lenf = leng and f(m) = g(n) and f(n) = g(m) and for every natural number k such that k ≠ m and k ≠ n and 1 k and k lenf holds f(k) = g(k). Then f and g are fiberwise equipotent.

The following propositions are true:

(5) For all states s_{1}, s_{2} of SCMPDS such that for every Int position a holds s_{1}(a) = s_{2}(a) holds Dstates_{1} = Dstates_{2}.

(6) Let s be a state of SCMPDS, I be a No-StopCode Program-block, and j be a parahalting shiftable instruction of SCMPDS. Suppose I is closed on s and halting on s. Then I; j is closed on s and I; j is halting on s.

(7) Let s be a state of SCMPDS, I be a No-StopCode Program-block, J be a shiftable parahalting Program-block, and a be an Int position. If I is closed on s and halting on s, then (IExec(I; J, s))(a) = (IExec(J, IExec(I, s)))(a).

(8) Let s be a state of SCMPDS, I be a No-StopCode parahalting Programblock, J be a shiftable Program-block, and a be an Int position. If J is closed on IExec(I, s) and halting on IExec(I, s), then (IExec(I; J, s))(a) = (IExec(J, IExec(I, s)))(a).

(9) Let s be a state of SCMPDS, I be a Program-block, and J be a shiftable parahalting Program-block. Suppose I is closed on s and halting on s. Then I; J is closed on s and I; J is halting on s.

(10) Let s be a state of SCMPDS, I be a parahalting Program-block, and J be a shiftable Program-block. Suppose J is closed on IExec(I, s) and halting on IExec(I, s). Then I; J is closed on s and I; J is halting on s.

(11) Let s be a state of SCMPDS, I be a Program-block, and j be a parahalting shiftable instruction of SCMPDS. Suppose I is closed on s and halting on s. Then I; j is closed on s and I; j is halting on s.

2. Computing the Execution Result of For-Loop Program by Loop-Invariant

In this article we present several logical schemes. The scheme ForDownHalt deals with a state A of SCMPDS, a No-StopCode shiftable Program-block B, an Int position C, an integer D, a natural number E, and a unary predicate P, and states that:

P[A] or not P[A] but for-down(C, D, E, B) is closed on A but for-down(C, D, E, B) is halting on A

provided the following requirements are met:

• E > 0,

• P[DstateA], and

• Let t be a state of SCMPDS. Suppose P[Dstatet] and t(C) = A(C) and t(DataLoc(A(C), D)) > 0. Then (IExec(B; AddTo(C, D, − E), t))(C) = t(C) and (IExec(B; AddTo(C, D, − E), t))(DataLoc(A(C), D)) = t(DataLoc(A(C), D)) − E and B is closed on t and B is halting on t and P[DstateIExec(B; AddTo(C, D, − E), t)].

The scheme ForDownExec deals with a state A of SCMPDS, a No-StopCode shiftable Program-block B, an Int position C, an integer D, a natural number E, and a unary predicate P, and states that:

P[A] or not P[A] but IExec(for-down(C, D, E, B), A) = IExec(for-down(C, D, E, B), IExec(B; AddTo(C, D, − E), A))

provided the parameters meet the following conditions:

• E > 0,

• A(DataLoc(A(C), D)) > 0,

• P[DstateA], and

• Let t be a state of SCMPDS. Suppose P[Dstatet] and t(C) = A(C) and t(DataLoc(A(C), D)) > 0. Then (IExec(B; AddTo(C, D, − E), t))(C) = t(C) and (IExec(B; AddTo(C, D, − E), t))(DataLoc(A(C), D)) = t(DataLoc(A(C), D)) − E and B is closed on t and B is halting on t and P[DstateIExec(B; AddTo(C, D, − E), t)].

The scheme ForDownEnd deals with a state A of SCMPDS, a No-StopCode shiftable Program-block B, an Int position C, an integer D, a natural number E, and a unary predicate P, and states that:

P[A] or not P[A] but (IExec(for-down(C, D, E, B), A))(DataLoc(A(C), D)) 0 but P[DstateIExec(for-down(C, D, E, B), A)]

provided the parameters have the following properties:

• E > 0,

• P[DstateA], and

• Let t be a state of SCMPDS. Suppose P[Dstatet] and t(C) = A(C) and t(DataLoc(A(C), D)) > 0. Then (IExec(B; AddTo(C, D, − E), t))(C) = t(C) and (IExec(B; AddTo(C, D, − E), t))(DataLoc(A(C), D)) = t(DataLoc(A(C), D)) − E and B is closed on t and B is halting on t and P[DstateIExec(B; AddTo(C, D, − E), t)].

We now state three propositions:

(12) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a, x, y be Int positions, i, c be integers, and n be a natural number.

Suppose that

(i) n > 0, (ii) s(x) s(y) + c, and (iii) for every state t of SCMPDS such that t(x) t(y) + c and t(a) = s(a)

and t(DataLoc(s(a), i)) > 0 holds (IExec(I; AddTo(a, i, − n), t))(a) = t(a) and (IExec(I; AddTo(a, i, − n), t))(DataLoc(s(a), i)) = t(DataLoc(s(a), i)) −n and I is closed on t and halting on t and (IExec(I; AddTo(a, i, − n), t))

(x) (IExec(I; AddTo(a, i, − n), t))(y) + c. Then for-down(a, i, n, I) is closed on s and for-down(a, i, n, I) is halting on s.

(13) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a, x, y be Int positions, i, c be integers, and n be a natural number. Suppose that

(i) n > 0, (ii) s(x) s(y) + c, (iii) s(DataLoc(s(a), i)) > 0, and (iv) for every state t of SCMPDS such that t(x) t(y) + c and t(a) = s(a)

and t(DataLoc(s(a), i)) > 0 holds (IExec(I; AddTo(a, i, − n), t))(a) = t(a) and (IExec(I; AddTo(a, i, − n), t))(DataLoc(s(a), i)) = t(DataLoc(s(a), i)) −n and I is closed on t and halting on t and (IExec(I; AddTo(a, i, − n), t))

(x) (IExec(I; AddTo(a, i, − n), t))(y) + c. Then IExec(for-down(a, i, n, I), s) = IExec(for-down(a, i, n, I), IExec(I; AddTo(a, i, − n), s)).

(14) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a be an Int position, i be an integer, and n be a natural number. Suppose that

(i) s(DataLoc(s(a), i)) > 0, (ii) n > 0, (iii) cardI > 0, (iv) a ≠ DataLoc(s(a), i), and

(v) for every state t of SCMPDS such that t(a) = s(a) holds (IExec(I, t))(a) = t(a) and (IExec(I, t))(DataLoc(s(a), i)) = t(DataLoc(s(a), i)) and I is closed on t and halting on t. Then for-down(a, i, n, I) is closed on s and for-down(a, i, n, I) is halting on s.

3. A Program for Insert Sort

Let n, p_{0} be natural numbers. The functor insert-sort(n, p_{0}) yielding a Program-block is defined by the condition (Def. 2).

(Def. 2) insert-sort(n, p_{0}) = (GBP:=0); ((GBP)_{1}:=0); ((GBP)_{2}:=n − 1); ((GBP)_{3}:=p_{0}); for-down(GBP, 2, 1, AddTo(GBP, 3, 1); ((GBP, 4) := (GBP, 3)); AddTo(GBP, 1, 1); ((GBP, 6) := (GBP, 1)); while > 0(GBP, 6, ((GBP, 5) := (intpos4, − 1)); SubFrom(GBP, 5, intpos4, 0); (if GBP > 5 then ((GBP, 5) := (intpos4, − 1)); ((intpos4, − 1) := (intpos4, 0)); ((intpos4, 0) := (GBP, 5)); AddTo(GBP, 4, − 1); AddTo(GBP, 6, − 1) else Load((GBP)_{6}:=0)))).

4. The Property of Insert Sort and Its Correctness

We now state two propositions:

(15) cardinsert-sort(n, p_{0}) = 23.

(16) If p_{0} 7, then insert-sort(n, p_{0}) is parahalting.

One can prove the following propositions:

(17) Let s be a state of SCMPDS, f, g be finite sequences of elements of ℤ, and k_{0}, k be natural numbers. Suppose that s(a_{4}) 7+s(a_{6}) and s(GBP) = 0 and k = s(a_{6}) and k_{0} = s(a_{4}) − s(a_{6}) − 1 and f is FinSequence on s, k_{0} and g is FinSequence on IExec(I_{2}, s), k_{0} and lenf = leng and lenf > k and f is non decreasing on 1, k. Then

(i) f and g are fiberwise equipotent, (ii) g is non decreasing on 1, k + 1, (iii) for every natural number i such that i > k + 1 and i lenf holds

f(i) = g(i), and (iv) for every natural number i such that 1 i and i k + 1 there exists a

natural number j such that 1 j and j k + 1 and g(i) = f(j), where a_{4} = intpos4, a_{6} = intpos6, I_{2} = W_{1}, W_{1} = while > 0(GBP, 6, B_{1}), B_{1} = k_{1}; k_{2}; I_{1}, k_{1} = (GBP, 5) := (intpos4, − 1), k_{2} = SubFrom(GBP, 5, intpos4, 0), I_{1} = if GBP > 5 then T_{1} else F_{1}, T_{1} = k_{3}; k_{4}; k_{5}; k_{6}; k_{7}, k_{3} = (GBP, 5) := (intpos4, − 1), k_{4} = (intpos4, − 1) := (intpos4, 0), k_{5} = (intpos4, 0) := (GBP, 5), k_{6} = AddTo(GBP, 4, − 1), k_{7} = AddTo(GBP, 6, − 1), and F_{1} = Load((GBP)_{6}:=0).

(18) Let s be a state of SCMPDS, f, g be finite sequences of elements of ℤ, and p_{0}, n be natural numbers. Suppose p_{0} 6 and lenf = n and leng = n and f is FinSequence on s, p_{0} and g is FinSequence on IExec(insert-sort(n, p_{0}+ 1), s), p_{0}. Then f and g are fiberwise equipotent and g is non decreasing on 1, n.

412 jing-chao chen

References

[1] Grzegorz Bancerek. Cardinal numbers. Formalized Mathematics, 1(2):377–382, 1990.

[2] Grzegorz Bancerek. The fundamental properties of natural numbers. Formalized Mathematics, 1(1):41–46, 1990.

[3] Grzegorz Bancerek. König’s theorem. Formalized Mathematics, 1(3):589–593, 1990.

[4] Grzegorz Bancerek and Krzysztof Hryniewiecki. Segments of natural numbers and finite sequences. Formalized Mathematics, 1(1):107–114, 1990.

[5] Jing-Chao Chen. Computation and program shift in the SCMPDS computer. Formalized Mathematics, 8(1):193–199, 1999.

[6] Jing-Chao Chen. Computation of two consecutive program blocks for SCMPDS. Formalized Mathematics, 8(1):211–217, 1999.

[7] Jing-Chao Chen. The construction and computation of conditional statements for SCMPDS. Formalized Mathematics, 8(1):219–234, 1999.

[8] Jing-Chao Chen. The construction and shiftability of program blocks for SCMPDS. Formalized Mathematics, 8(1):201–210, 1999.

[9] Jing-Chao Chen. The SCMPDS computer and the basic semantics of its instructions. Formalized Mathematics, 8(1):183–191, 1999.

[10] Jing-Chao Chen. The construction and computation of while-loop programs for SCMPDS. Formalized Mathematics, 9(2):397–405, 2001.

[11] Jing-Chao Chen. Recursive Euclide algorithm. Formalized Mathematics, 9(1):1–4, 2001.

[12] Jing-Chao Chen and Piotr Rudnicki. The construction and computation of for-loop programs for SCMPDS. Formalized Mathematics, 9(1):209–219, 2001.

[13] Krzysztof Hryniewiecki. Basic properties of real numbers. Formalized Mathematics, 1(1):35–40, 1990.

[14] Andrzej Kondracki. The Chinese Remainder Theorem. Formalized Mathematics, 6(4):573–577, 1997.

[15] Jarosław Kotowicz. Functions and finite sequences of real numbers. Formalized Mathematics, 3(2):275–278, 1992.

[16] Yatsuka Nakamura and Andrzej Trybulec. A mathematical model of CPU. Formalized Mathematics, 3(2):151–160, 1992.

[17] Piotr Rudnicki. The for (going up) macro instruction. Formalized Mathematics, 7(1):107– 114, 1998.

[18] Andrzej Trybulec. Tarski Grothendieck set theory. Formalized Mathematics, 1(1):9–11, 1990.

[19] Andrzej Trybulec and Yatsuka Nakamura. Some remarks on the simple concrete model of computer. Formalized Mathematics, 4(1):51–56, 1993.

[20] Michał J. Trybulec. Integers. Formalized Mathematics, 1(3):501–505, 1990.

[21] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

Quick Sort on SCMPDS^{1}

Jing-Chao Chen Shanghai Jiaotong University / China Bell Labs

Summary. Proving the correctness of quick sort is much more complicated than proving the correctness of the insert sort. Its difficulty is determined mainly by the following points:

• Quick sort needs to use a push-down stack.

• It contains three nested loops.

• A subroutine of this algorithm, “Partition”, has no loop-invariant. This means we cannot justify the correctness of the “Partition” subroutine by the Hoare’s axiom on program verification. This article is organized as follows. First, we present several fundamental properties of “while” program and finite sequence. Second, we define the “Partition” subroutine on SCMPDS, the task of which is to split a sequence into a smaller and a larger subsequence. The definition of quick sort on SCMPDS follows. Finally, we describe the basic property of the “Partition” and quick sort, and prove their correctness.

MML Identifier: SCPQSORT.

The terminology and notation used here have been introduced in the following articles: [18], [19], [23], [21], [1], [3], [4], [6], [24], [2], [15], [26], [17], [11], [7], [10], [8], [9], [12], [14], [5], [13], [20], [25], [22], and [16].

1. The Several Properties of “while” Program and Finite Sequence

In this paper n, p_{0} denote natural numbers.

Let I, J be shiftable Program-blocks, let a be an Int position, and let k_{1} be an integer. Observe that if a > k_{1} then I else J is shiftable.

Next we state the proposition

1This research is partially supported by the National Natural Science Foundation of China Grant No. 69873033.

(1) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, J be a shiftable Program-block, a, b be Int positions, and k_{1} be an integer. Suppose s(DataLoc(s(a), k_{1})) > 0 and I is closed on s and halting on s. Then (IExec(if a > k_{1} then I else J, s))(b) = (IExec(I, s))(b).

One can prove the following propositions:

(2) Let s, s_{1} be states of SCMPDS, I be a No-StopCode shiftable Programblock, a be an Int position, i be an integer, and m be a natural number. Suppose cardI > 0 and I is closed on s and halting on s and s(DataLoc(s(a), i)) > 0 and m = LifeSpan(s+·Initialized(stopI)) + 2 and s_{1} = (Computation(s+·Initialized(stopwhile > 0(a, i, I))))(m). Then s_{1}↾Data-Loc_{SCM} = IExec(I, s)↾Data-Loc_{SCM} and s_{1}+·Initialized(stopwhile > 0(a, i, I)) = s_{1}.

(3) Let s be a state of SCMPDS and I be a Program-block. Suppose that for every state t of SCMPDS such that t↾Data-Loc_{SCM} = s↾Data-Loc_{SCM} holds I is halting on t. Then I is closed on s.

(4) For all instructions i_{1}, i_{2}, i_{3}, i_{4} of SCMPDS holds card(i_{1}; i_{2}; i_{3}; i_{4}) = 4.

(5) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a, x, y be Int positions, and i, c be integers. Suppose that

(i) cardI > 0, (ii) s(x) c + s(DataLoc(s(a), i)), and (iii) for every state t of SCMPDS such that t(x) c + t(DataLoc(s(a), i))

and t(y) = s(y) and t(a) = s(a) and t(DataLoc(s(a), i)) > 0 holds (IExec(I, t))(a) = t(a) and I is closed on t and halting on t and (IExec(I, t))(DataLoc(s(a), i)) < t(DataLoc(s(a), i)) and (IExec(I, t))(x) c+(IExec(I, t))(DataLoc(s(a), i)) and (IExec(I, t))(y) = t(y). Then while > 0(a, i, I) is closed on s and while > 0(a, i, I) is halting on s and if s(DataLoc(s(a), i)) > 0, then IExec(while > 0(a, i, I), s) = IExec(while > 0(a, i, I), IExec(I, s)).

(6) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a, x, y be Int positions, and i, c be integers. Suppose that

(i) cardI > 0, (ii) s(x) c, and (iii) for every state t of SCMPDS such that t(x) c and t(y) = s(y) and

t(a) = s(a) and t(DataLoc(s(a), i)) > 0 holds (IExec(I, t))(a) = t(a) and I is closed on t and halting on t and (IExec(I, t))(DataLoc(s(a), i)) < t(DataLoc(s(a), i)) and (IExec(I, t))(x) c and (IExec(I, t))(y) = t(y). Then while > 0(a, i, I) is closed on s and while > 0(a, i, I) is halting on s and if s(DataLoc(s(a), i)) > 0, then IExec(while > 0(a, i, I), s) = IExec(while > 0(a, i, I), IExec(I, s)).

(7) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a, x_{1}, x_{2}, x_{3}, x_{4} be Int positions, and i, c, m_{1} be integers. Suppose that

(i) cardI > 0, (ii) s(x_{4}) = (s(x_{3}) − c) + s(x_{1}), (iii) m_{1} s(x_{3}) − c, and (iv) for every state t of SCMPDS such that t(x_{4}) = (t(x_{3}) − c) +

t(x_{1}) and m_{1} t(x_{3}) − c and t(x_{2}) = s(x_{2}) and t(a) = s(a) and t(DataLoc(s(a), i)) > 0 holds (IExec(I, t))(a) = t(a) and I is closed on t and halting on t and (IExec(I, t))(DataLoc(s(a), i)) < t(DataLoc(s(a), i)) and (IExec(I, t))(x_{4}) = ((IExec(I, t))(x_{3}) − c) + (IExec(I, t))(x_{1}) and m_{1} (IExec(I, t))(x_{3}) − c and (IExec(I, t))(x_{2}) = t(x_{2}). Then while > 0(a, i, I) is closed on s and while > 0(a, i, I) is halting on s and if s(DataLoc(s(a), i)) > 0, then IExec(while > 0(a, i, I), s) = IExec(while > 0(a, i, I), IExec(I, s)).

(8) Let f be a finite sequence of elements of ℤ and m, k_{1}, k, n be natural numbers. Suppose that m k and k n and k_{1} = k − 1 and f is non decreasing on m, k_{1} and f is non decreasing on k + 1, n and for every natural number i such that m i and i < k holds f(i) f(k) and for every natural number i such that k < i and i n holds f(k) f(i). Then f is non decreasing on m, n.

(9) Let f, g be finite sequences and x be arbitrary. Suppose x ∈ domg and f and g are fiberwise equipotent. Then there exists arbitrary y such that y ∈ domg and f(x) = g(y).

(10) Let f, g, h be finite sequences. Then f and g are fiberwise equipotent if and only if h^{⌢} f and h^{⌢} g are fiberwise equipotent.

(11) Let f, g be finite sequences and m, n, j be natural numbers. Suppose that f and g are fiberwise equipotent and m n and n lenf and for every natural number i such that 1 i and i m holds f(i) = g(i) and for every natural number i such that n < i and i lenf holds f(i) = g(i) and m < j and j n. Then there exists a natural number k such that m < k and k n and f(j) = g(k).

2. Program Partition is to Split a Sequence into a Smaller and a Larger Subsequence

The Program-block Partition is defined by the condition (Def. 1). (Def. 1) Partition = ((GBP, 5) := (GBP, 4)); SubFrom(GBP, 5, GBP, 2);

((GBP, 3) := (GBP, 2)); AddTo(GBP, 3, 1); while > 0(GBP, 5, while > 0(GBP, 5, ((GBP, 7) := (GBP, 5)); AddTo(GBP, 5, − 1); ((GBP, 6) := (intpos4, 0)); SubFrom(GBP, 6, intpos2, 0); (if GBP > 6 then AddTo(GBP, 4, − 1); AddTo(GBP, 7, − 1) else Load((GBP)_{5}:=0))); while > 0(GBP, 7, ((GBP, 5) := (GBP, 7)); AddTo(GBP, 7, − 1); ((GBP, 6) := (intpos2, 0)); SubFrom(GBP, 6, intpos3, 0); (if GBP > 6 then AddTo(GBP, 3, 1); AddTo(GBP, 5, − 1) else Load((GBP)_{7}:=0))); (if GBP > 0 then 5 else (((GBP, 6) := (intpos4, 0)); ((intpos4, 0) := (intpos3, 0)); ((intpos3, 0) := (GBP, 6)); AddTo(GBP, 5, − 2); AddTo(GBP, 3, 1); AddTo(GBP, 4, − 1)))); ((GBP, 6) := (intpos4, 0)); ((intpos4, 0) := (intpos2, 0)); ((intpos2, 0) := (GBP, 6)).

3. The Construction of Quick Sort

Let n, p_{0} be natural numbers. The functor QuickSort(n, p_{0}) yielding a Program-block is defined by the condition (Def. 2).

(Def. 2) QuickSort(n, p_{0}) = (GBP:=0); (SBP:=1); ((SBP)_{p_{1}}:=p_{0} + 1); ((SBP)_{p_{1}+1}:=p_{1}); while > 0(GBP, 1, ((GBP, 2) := (SBP, p_{1} + 1)); SubFrom(GBP, 2, SBP, p_{1}); (if GBP > 2 then ((GBP, 2) := (SBP, p_{1})); ((GBP, 4) := (SBP, p_{1} + 1)); Partition; (((SBP, p_{1} + 3) := (SBP, p_{1} + 1)); ((SBP, p_{1} + 1) := (GBP, 4)); ((SBP, p_{1} + 2) := (GBP, 4)); AddTo(SBP, p_{1} + 1, − 1); AddTo(SBP, p_{1} + 2, 1); AddTo(GBP, 1, 2)) else Load(AddTo(GBP, 1, − 2)))), where p_{1} = p_{0} + n.

4. The Basic Property of Partition Program

The following four propositions are true:

(12) cardPartition = 38.

(13) Let s be a state of SCMPDS and m_{1}, p_{0} be natural numbers. Suppose s(GBP) = 0 and s(intpos4) − s(intpos2) > 0 and s(intpos2) = m_{1} and m_{1} p_{0} + 1 and p_{0} 7. Then Partition is closed on s and Partition is halting on s.

(14) Let s be a state of SCMPDS, m_{1}, p_{0}, n be natural numbers, and f, f_{1} be finite sequences of elements of ℤ. Suppose that s(GBP) = 0 and s(intpos4) − s(intpos2) > 0 and s(intpos2) = m_{1} and m_{1} p_{0} + 1 and s(intpos4) p_{0}+n and p_{0} 7 and f is FinSequence on s, p_{0} and lenf = n and f_{1} is FinSequence on IExec(Partition, s), p_{0} and lenf_{1} = n. Then

(i) (IExec(Partition, s))(GBP) = 0, (ii) (IExec(Partition, s))(intpos1) = s(intpos1), (iii) f and f_{1} are fiberwise equipotent, and (iv) there exists a natural number m_{4} such that m_{4} = (IExec(Partition, s))

quick sort on scmpds 417

(intpos4) and m_{1} m_{4} and m_{4} s(intpos4) and for every natural number i such that m_{1} i and i < m_{4} holds (IExec(Partition, s))(intposm_{4}) (IExec(Partition, s))(intposi) and for every natural number i such that m_{4} < i and i s(intpos4) holds (IExec(Partition, s))(intposm_{4}) (IExec(Partition, s))(intposi) and for every natural number i such that i p_{0} + 1 but i < s(intpos2) or i > s(intpos4) holds (IExec(Partition, s))(intposi) = s(intposi).

(15) Partition is No-StopCode and shiftable.

5. The Basic Property of Quick Sort and Its Correctness

One can prove the following three propositions:

(16) cardQuickSort(n, p_{0}) = 57.

(17) For all natural numbers p_{0}, n such that p_{0} 7 holds QuickSort(n, p_{0}) is parahalting.

(18) Let s be a state of SCMPDS and p_{0}, n be natural numbers. Suppose p_{0} 7. Then there exist finite sequences f, g of elements of ℤ such that

(i) lenf = n, (ii) f is FinSequence on s, p_{0}, (iii) leng = n, (iv) g is FinSequence on IExec(QuickSort(n, p_{0}), s), p_{0},

(v) f and g are fiberwise equipotent, and (vi) g is non decreasing on 1, n.

References

[1] Grzegorz Bancerek. Cardinal numbers. Formalized Mathematics, 1(2):377–382, 1990.

[2] Grzegorz Bancerek. The fundamental properties of natural numbers. Formalized Mathematics, 1(1):41–46, 1990.

[3] Grzegorz Bancerek. König’s theorem. Formalized Mathematics, 1(3):589–593, 1990.

[4] Grzegorz Bancerek and Krzysztof Hryniewiecki. Segments of natural numbers and finite sequences. Formalized Mathematics, 1(1):107–114, 1990.

[5] Grzegorz Bancerek and Piotr Rudnicki. Development of terminology for scm. Formalized Mathematics, 4(1):61–67, 1993.

[6] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[7] Jing-Chao Chen. Computation and program shift in the SCMPDS computer. Formalized Mathematics, 8(1):193–199, 1999.

[8] Jing-Chao Chen. Computation of two consecutive program blocks for SCMPDS. Formalized Mathematics, 8(1):211–217, 1999.

[9] Jing-Chao Chen. The construction and computation of conditional statements for SCMPDS. Formalized Mathematics, 8(1):219–234, 1999.

[10] Jing-Chao Chen. The construction and shiftability of program blocks for SCMPDS. Formalized Mathematics, 8(1):201–210, 1999.

[11] Jing-Chao Chen. The SCMPDS computer and the basic semantics of its instructions. Formalized Mathematics, 8(1):183–191, 1999.

[12] Jing-Chao Chen. The construction and computation of while-loop programs for SCMPDS. Formalized Mathematics, 9(2):397–405, 2001.

[13] Jing-Chao Chen. Insert sort on SCMPDS. Formalized Mathematics, 9(2):407–412, 2001.

[14] Jing-Chao Chen. Recursive Euclide algorithm. Formalized Mathematics, 9(1):1–4, 2001.

[15] Krzysztof Hryniewiecki. Basic properties of real numbers. Formalized Mathematics, 1(1):35–40, 1990.

[16] Andrzej Kondracki. The Chinese Remainder Theorem. Formalized Mathematics, 6(4):573–577, 1997.

[17] Jarosław Kotowicz. Functions and finite sequences of real numbers. Formalized Mathematics, 3(2):275–278, 1992.

[18] Yatsuka Nakamura and Andrzej Trybulec. A mathematical model of CPU. Formalized Mathematics, 3(2):151–160, 1992.

[19] Yatsuka Nakamura and Andrzej Trybulec. On a mathematical model of programs. Formalized Mathematics, 3(2):241–250, 1992.

[20] Piotr Rudnicki. The for (going up) macro instruction. Formalized Mathematics, 7(1):107– 114, 1998.

[21] Yasushi Tanaka. On the decomposition of the states of SCM. Formalized Mathematics, 5(1):1–8, 1996.

[22] Andrzej Trybulec. Tarski Grothendieck set theory. Formalized Mathematics, 1(1):9–11, 1990.

[23] Andrzej Trybulec and Yatsuka Nakamura. Some remarks on the simple concrete model of computer. Formalized Mathematics, 4(1):51–56, 1993.

[24] Michał J. Trybulec. Integers. Formalized Mathematics, 1(3):501–505, 1990.

[25] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[26] Edmund Woronowicz. Relations and their basic properties. Formalized Mathematics, 1(1):73–83, 1990.

Justifying the Correctness of the Fibonacci Sequence and the Euclide Algorithm by

Loop-Invariant^{1}

Jing-Chao Chen Shanghai Jiaotong University

Summary. If a loop-invariant exists in a loop program, computing its result by loop-invariant is simpler and easier than computing its result by the inductive method. For this purpose, the article describes the premise and the final computation result of the program such as “while<0”, “while>0”, “while<>0” by loop-invariant. To test the effectiveness of the computation method given in this article, by using loop-invariant of the loop programs mentioned above, we justify the correctness of the following three examples: Summing n integers (used for testing “while>0”), Fibonacci sequence (used for testing “while<0”), Greatest Common Divisor, i.e. Euclide algorithm (used for testing “while<>0”).

MML Identifier: SCPINVAR.

The notation and terminology used here have been introduced in the following papers: [18], [22], [19], [1], [3], [4], [6], [7], [24], [23], [2], [5], [16], [26], [27], [12], [8], [11], [9], [10], [13], [15], [14], [21], [25], [20], and [17].

1. Preliminaries

For simplicity, we adopt the following rules: m, n are natural numbers, i, j are instructions of SCMPDS, I is a Program-block, and a is an Int position.

One can prove the following propositions:

(1) For all natural numbers n, m, l such that n | m and n | l holds n | m − l.

1This research is partially supported by the National Natural Science Foundation of China Grant No. 69873033.

(2) m | n iff m | n qua integer.

(3) gcd(m, n) = gcd(m, |n − m|).

(4) For all integers a, b such that a 0 and b 0 holds a gcdb = a gcdb−a.

(5) (i; j; I)(inspos0) = i and (i; j; I)(inspos1) = j.

(6) Let a, b be Int positions. Then there exists a function f from ∏ (the object kind of SCMPDS) into ℕ such that for every state s of SCMPDS holds

(i) if s(a) = s(b), then f(s) = 0, and (ii) if s(a) ≠ s(b), then f(s) = max(|s(a)|, |s(b)|).

(7) There exists a function f from ∏ (the object kind of SCMPDS) into ℕ such that for every state s of SCMPDS holds

(i) if s(a) 0, then f(s) = 0, and (ii) if s(a) < 0, then f(s) = − s(a).

2. Computing Directly the Result of “while<0” Program by Loop-Invariant

The scheme WhileLEnd deals with a unary functor F yielding a natural number, a state A of SCMPDS, a No-StopCode shiftable Program-block B, an Int position C, an integer D, and a unary predicate P, and states that:

F(A) = F(A) or P[A] but F(DstateIExec(while < 0(C, D, B), A)) = 0 but P[DstateIExec(while < 0(C, D, B), A)]

provided the parameters satisfy the following conditions:

• cardB > 0,

• For every state t of SCMPDS such that P[Dstatet] holds F(Dstatet) = 0 iff t(DataLoc(A(C), D)) 0,

• P[DstateA], and

• Let t be a state of SCMPDS. Suppose P[Dstatet] and t(C) = A(C) and t(DataLoc(A(C), D)) < 0. Then (IExec(B, t))(C) = t(C) and B is closed on t and B is halting on t and F(DstateIExec(B, t)) < F(Dstatet) and P[DstateIExec(B, t)].

3. An Example: Summing Directly n Integers by Loop-Invariant

Let n, p_{0} be natural numbers. The functor sum(n, p_{0}) yields a Program-block and is defined as follows:

(Def. 1) sum(n, p_{0}) = (GBP:=0); (intpos1:=0); (intpos2:=− n); (intpos3:=p_{0} + 1); while < 0(GBP, 2, AddTo(GBP, 1, intpos3, 0); AddTo(GBP, 2, 1); AddTo(GBP, 3, 1)).

We now state the proposition

(8) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a, b, c be Int positions, n, i, p_{0} be natural numbers, and f be a finite sequence of elements of ℤ. Suppose that cardI > 0 and f is FinSequence on s, p_{0} and lenf = n and s(b) = 0 and s(a) = 0 and s(intposi) = − n and s(c) = p_{0} + 1 and for every state t of SCMPDS such that there exists a finite sequence g of elements of ℤ such that g is FinSequence on s, p_{0} and leng = t(intposi) + n and t(b) = ∑ g and t(c) = p_{0} + 1 + leng and t(a) = 0 and t(intposi) < 0 and for every natural number i such that i > p_{0} holds t(intposi) = s(intposi) holds (IExec(I, t))(a) = 0 and I is closed on t and halting on t and (IExec(I, t))(intposi) = t(intposi)+1 and there exists a finite sequence g of elements of ℤ such that g is FinSequence on s, p_{0} and leng = t(intposi) + n + 1 and (IExec(I, t))(c) = p_{0} + 1 + leng and (IExec(I, t))(b) = ∑ g and for every natural number i such that i > p_{0} holds (IExec(I, t))(intposi) = s(intposi). Then (IExec(while < 0(a, i, I), s))(b) = ∑ f and while < 0(a, i, I) is closed on s and while < 0(a, i, I) is halting on s.

One can prove the following proposition

(9) Let s be a state of SCMPDS, n, p_{0} be natural numbers, and f be a finite sequence of elements of ℤ. Suppose p_{0} 3 and f is FinSequence on s, p_{0} and lenf = n. Then (IExec(sum(n, p_{0}), s))(intpos1) = ∑ f and sum(n, p_{0}) is parahalting.

4. Computing Directly the Result of “while>0” Program by Loop-Invariant

The scheme WhileGEnd deals with a unary functor F yielding a natural number, a state A of SCMPDS, a No-StopCode shiftable Program-block B, an Int position C, an integer D, and a unary predicate P, and states that:

F(A) = F(A) or P[A] but F(DstateIExec(while > 0(C, D, B), A)) = 0 but P[DstateIExec(while > 0(C, D, B), A)]

provided the parameters meet the following requirements:

• cardB > 0,

• For every state t of SCMPDS such that P[Dstatet] holds F(Dstatet) = 0 iff t(DataLoc(A(C), D)) 0,

• P[DstateA], and

• Let t be a state of SCMPDS. Suppose P[Dstatet] and t(C) = A(C) and t(DataLoc(A(C), D)) > 0. Then (IExec(B, t))(C) = t(C) and B is closed on t and B is halting on t and F(DstateIExec(B, t)) < F(Dstatet) and P[DstateIExec(B, t)].

5. An Example: Computing Directly Fibonacci Sequence by Loop-Invariant

Let n be a natural number. The functor Fib-macron yields a Program-block and is defined by:

(Def. 2) Fib-macron = (GBP:=0); (intpos1:=0); (intpos2:=1); (intpos3:=n); while > 0(GBP, 3, ((GBP, 4) := (GBP, 2)); AddTo(GBP, 2, GBP, 1); ((GBP, 1) := (GBP, 4)); AddTo(GBP, 3, − 1)).

We now state the proposition

(10) Let s be a state of SCMPDS, I be a No-StopCode shiftable Programblock, a, f_{0}, f_{1} be Int positions, and n, i be natural numbers. Suppose that

(i) cardI > 0, (ii) s(a) = 0, (iii) s(f_{0}) = 0, (iv) s(f_{1}) = 1,

(v) s(intposi) = n, and (vi) for every state t of SCMPDS and for every natural number k such

that n = t(intposi) + k and t(f_{0}) = Fib(k) and t(f_{1}) = Fib(k + 1) and t(a) = 0 and t(intposi) > 0 holds (IExec(I, t))(a) = 0 and I is closed on t and halting on t and (IExec(I, t))(intposi) = t(intposi) − 1 and (IExec(I, t))(f_{0}) = Fib(k + 1) and (IExec(I, t))(f_{1}) = Fib(k + 1 + 1). Then (IExec(while > 0(a, i, I), s))(f_{0}) = Fib(n) and (IExec(while > 0(a, i, I), s))(f_{1}) = Fib(n + 1) and while > 0(a, i, I) is closed on s and while > 0(a, i, I) is halting on s.

One can prove the following proposition

(11) For every state s of SCMPDS and for every natural number n holds (IExec(Fib-macron, s))(intpos1) = Fib(n) and (IExec(Fib-macron, s)) (intpos2) = Fib(n + 1) and Fib-macron is parahalting.

6. The Construction of “while<>0” Loop Program

Let a be an Int position, let i be an integer, and let I be a Program-block. The functor while <> 0(a, i, I) yields a Program-block and is defined as follows:

(Def. 3) while <> 0(a, i, I) = ((a, i) <> 0 goto2); goto (cardI + 2); I; goto (− (cardI + 2)).

7. The Basic Property of “while<>0” Program

One can prove the following propositions:

(12) For every Int position a and for every integer i and for every Programblock I holds cardwhile <> 0(a, i, I) = cardI + 3.

(13) Let a be an Int position, i be an integer, m be a natural number, and I be a Program-block. Then m < cardI + 3 if and only if insposm ∈ domwhile <> 0(a, i, I).

(14) For every Int position a and for every integer i and for every Programblock I holds inspos0 ∈ domwhile <> 0(a, i, I) and inspos1 ∈ domwhile <> 0(a, i, I).

(15) Let a be an Int position, i be an integer, and I be a Programblock. Then (while <> 0(a, i, I))(inspos0) = (a, i) <> 0 goto2 and (while <> 0(a, i, I))(inspos1) = goto (cardI + 2) and (while <> 0(a, i, I))(insposcardI + 2) = goto (− (cardI + 2)).

(16) Let s be a state of SCMPDS, I be a Program-block, a be an Int position, and i be an integer. If s(DataLoc(s(a), i)) = 0, then while <> 0(a, i, I) is closed on s and while <> 0(a, i, I) is halting on s.

(17) Let s be a state of SCMPDS, I be a Program-block, a, c be Int positions, and i be an integer. If s(DataLoc(s(a), i)) = 0, then IExec(while <> 0(a, i, I), s) = s+·Start-At(insposcardI + 3).

(18) Let s be a state of SCMPDS, I be a Program-block, a be an Int position, and i be an integer. If s(DataLoc(s(a), i)) = 0, then IC_{IExec(while<>0(a,i,I),s)} = insposcardI + 3.

(19) Let s be a state of SCMPDS, I be a Program-block, a, b be Int positions, and i be an integer. If s(DataLoc(s(a), i)) = 0, then (IExec(while <> 0(a, i, I), s))(b) = s(b).

Let I be a shiftable Program-block, let a be an Int position, and let i be an integer. Observe that while <> 0(a, i, I) is shiftable.

Let I be a No-StopCode Program-block, let a be an Int position, and let i be an integer. Note that while <> 0(a, i, I) is No-StopCode.

8. Computing Directly the Result of “while<>0” Program by Loop-Invariant

Now we present three schemes. The scheme WhileNHalt deals with a unary functor F yielding a natural number, a state A of SCMPDS, a No-StopCode shiftable Program-block B, an Int position C, an integer D, and a unary predicate P, and states that:

F(A) = F(A) or P[A] but while <> 0(C, D, B) is closed on A but while <> 0(C, D, B) is halting on A

provided the following conditions are satisfied:

• cardB > 0,

• For every state t of SCMPDS such that P[Dstatet] and F(Dstatet) = 0 holds t(DataLoc(A(C), D)) = 0,

• P[DstateA], and

• Let t be a state of SCMPDS. Suppose P[Dstatet] and t(C) = A(C) and t(DataLoc(A(C), D)) ≠ 0. Then (IExec(B, t))(C) = t(C) and B is closed on t and B is halting on t and F(DstateIExec(B, t)) < F(Dstatet) and P[DstateIExec(B, t)].

The scheme WhileNExec deals with a unary functor F yielding a natural number, a state A of SCMPDS, a No-StopCode shiftable Program-block B, an Int position C, an integer D, and a unary predicate P, and states that:

F(A) = F(A) or P[A] but IExec(while <> 0(C, D, B), A) = IExec(while <> 0(C, D, B), IExec(B, A))

provided the parameters meet the following conditions:

• cardB > 0,

• A(DataLoc(A(C), D)) ≠ 0,

• For every state t of SCMPDS such that P[Dstatet] and F(Dstatet) = 0 holds t(DataLoc(A(C), D)) = 0,

• P[DstateA], and

• Let t be a state of SCMPDS. Suppose P[Dstatet] and t(C) = A(C) and t(DataLoc(A(C), D)) ≠ 0. Then (IExec(B, t))(C) = t(C) and B is closed on t and B is halting on t and F(DstateIExec(B, t)) < F(Dstatet) and P[DstateIExec(B, t)].

The scheme WhileNEnd deals with a unary functor F yielding a natural number, a state A of SCMPDS, a No-StopCode shiftable Program-block B, an Int position C, an integer D, and a unary predicate P, and states that:

F(A) = F(A) or P[A] but F(DstateIExec(while <> 0(C, D, B), A)) = 0 but P[DstateIExec(while <> 0(C, D, B), A)]

provided the parameters satisfy the following conditions:

• cardB > 0,

• For every state t of SCMPDS such that P[Dstatet] holds F(Dstatet) = 0 iff t(DataLoc(A(C), D)) = 0,

• P[DstateA], and

• Let t be a state of SCMPDS. Suppose P[Dstatet] and t(C) = A(C) and t(DataLoc(A(C), D)) ≠ 0. Then (IExec(B, t))(C) = t(C) and B is closed on t and B is halting on t and F(DstateIExec(B, t)) < F(Dstatet) and P[DstateIExec(B, t)].

We now state the proposition

(20) Let s be a state of SCMPDS, I be a No-StopCode shiftable Program-

block, a, b, c be Int positions, and i, d be integers. Suppose that

(i) cardI > 0, (ii) s(a) = d, (iii) s(b) > 0, (iv) s(c) > 0,

(v) s(DataLoc(d, i)) = s(b) − s(c), and (vi) for every state t of SCMPDS such that t(b) > 0 and t(c) > 0

and t(a) = d and t(DataLoc(d, i)) = t(b) − t(c) and t(b) ≠ t(c) holds (IExec(I, t))(a) = d and I is closed on t and halting on t and if t(b) > t(c), then (IExec(I, t))(b) = t(b) − t(c) and (IExec(I, t))(c) = t(c) and if t(b) t(c), then (IExec(I, t))(c) = t(c) − t(b) and (IExec(I, t))(b) = t(b) and (IExec(I, t))(DataLoc(d, i)) = (IExec(I, t))(b) − (IExec(I, t))(c). Then while <> 0(a, i, I) is closed on s and while <> 0(a, i, I) is halting on s and if s(DataLoc(s(a), i)) ≠ 0, then IExec(while <> 0(a, i, I), s) = IExec(while <> 0(a, i, I), IExec(I, s)).

9. An Example: Computing Greatest Common Divisor (Euclide Algorithm) by Loop-Invariant

The Program-block GCD-Algorithm is defined by: (Def. 4) GCD-Algorithm = (GBP:=0); ((GBP, 3) := (GBP, 1));

SubFrom(GBP, 3, GBP, 2); while <> 0(GBP, 3, (if GBP > 3 then Load(SubFrom(GBP, 1, GBP, 2)) else Load(SubFrom(GBP, 2, GBP, 1))); ((GBP, 3) := (GBP, 1)); SubFrom(GBP, 3, GBP, 2)).

Next we state the proposition

(21) Let s be a state of SCMPDS, I be a No-StopCode shiftable Program-

block, a, b, c be Int positions, and i, d be integers. Suppose that

(i) cardI > 0, (ii) s(a) = d, (iii) s(b) > 0, (iv) s(c) > 0,

(v) s(DataLoc(d, i)) = s(b) − s(c), and (vi) for every state t of SCMPDS such that t(b) > 0 and t(c) > 0

and t(a) = d and t(DataLoc(d, i)) = t(b) − t(c) and t(b) ≠ t(c) holds (IExec(I, t))(a) = d and I is closed on t and halting on t and if t(b) > t(c), then (IExec(I, t))(b) = t(b) − t(c) and (IExec(I, t))(c) = t(c) and if t(b) t(c), then (IExec(I, t))(c) = t(c) − t(b) and (IExec(I, t))(b) = t(b) and (IExec(I, t))(DataLoc(d, i)) = (IExec(I, t))(b) − (IExec(I, t))(c).

Then (IExec(while <> 0(a, i, I), s))(b) = s(b) gcds(c) and (IExec(while <> 0(a, i, I), s))(c) = s(b) gcds(c).

We now state the proposition

(22) cardGCD-Algorithm = 12.

The following proposition is true

(23) Let s be a state of SCMPDS and x, y be integers. Suppose s(intpos1) = x and s(intpos2) = y and x > 0 and y > 0. Then (IExec(GCD-Algorithm, s))(intpos1) = x gcdy and (IExec(GCD-Algorithm, s))(intpos2) = x gcdy and GCD-Algorithm is closed on s and GCD-Algorithm is halting on s.

References

[1] Grzegorz Bancerek. Cardinal numbers. Formalized Mathematics, 1(2):377–382, 1990.

[2] Grzegorz Bancerek. The fundamental properties of natural numbers. Formalized Mathematics, 1(1):41–46, 1990.

[3] Grzegorz Bancerek. König’s theorem. Formalized Mathematics, 1(3):589–593, 1990.

[4] Grzegorz Bancerek and Krzysztof Hryniewiecki. Segments of natural numbers and finite sequences. Formalized Mathematics, 1(1):107–114, 1990.

[5] Grzegorz Bancerek and Piotr Rudnicki. Two programs for scm. Part I - preliminaries. Formalized Mathematics, 4(1):69–72, 1993.

[6] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[7] Czesław Byliński. Functions from a set to a set. Formalized Mathematics, 1(1):153–164, 1990.

[8] Jing-Chao Chen. Computation and program shift in the SCMPDS computer. Formalized Mathematics, 8(1):193–199, 1999.

[9] Jing-Chao Chen. Computation of two consecutive program blocks for SCMPDS. Formalized Mathematics, 8(1):211–217, 1999.

[10] Jing-Chao Chen. The construction and computation of conditional statements for SCMPDS. Formalized Mathematics, 8(1):219–234, 1999.

[11] Jing-Chao Chen. The construction and shiftability of program blocks for SCMPDS. Formalized Mathematics, 8(1):201–210, 1999.

[12] Jing-Chao Chen. The SCMPDS computer and the basic semantics of its instructions. Formalized Mathematics, 8(1):183–191, 1999.

[13] Jing-Chao Chen. The construction and computation of while-loop programs for SCMPDS. Formalized Mathematics, 9(2):397–405, 2001.

[14] Jing-Chao Chen. Insert sort on SCMPDS. Formalized Mathematics, 9(2):407–412, 2001.

[15] Jing-Chao Chen. Recursive Euclide algorithm. Formalized Mathematics, 9(1):1–4, 2001.

[16] Krzysztof Hryniewiecki. Basic properties of real numbers. Formalized Mathematics, 1(1):35–40, 1990.

[17] Andrzej Kondracki. The Chinese Remainder Theorem. Formalized Mathematics, 6(4):573–577, 1997.

[18] Yatsuka Nakamura and Andrzej Trybulec. A mathematical model of CPU. Formalized Mathematics, 3(2):151–160, 1992.

[19] Yasushi Tanaka. On the decomposition of the states of SCM. Formalized Mathematics, 5(1):1–8, 1996.

[20] Andrzej Trybulec. Tarski Grothendieck set theory. Formalized Mathematics, 1(1):9–11, 1990.

[21] Andrzej Trybulec and Czesław Byliński. Some properties of real numbers. Formalized Mathematics, 1(3):445–449, 1990.

[22] Andrzej Trybulec and Yatsuka Nakamura. Some remarks on the simple concrete model of computer. Formalized Mathematics, 4(1):51–56, 1993.

[23] Michał J. Trybulec. Integers. Formalized Mathematics, 1(3):501–505, 1990.

justifying the correctness of the … 427

[24] Wojciech A. Trybulec. Groups. Formalized Mathematics, 1(5):821–827, 1990.

[25] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[26] Edmund Woronowicz. Relations and their basic properties. Formalized Mathematics, 1(1):73–83, 1990.

[27] Edmund Woronowicz. Relations defined on sets. Formalized Mathematics, 1(1):181–186, 1990.

428 jing-chao chen

On the Isomorphism between Finite Chains

Marta Pruszyńska University of Białystok

Marek Dudzicz University of Białystok

MML Identifier: ORDERS 4.

The notation and terminology used here are introduced in the following papers: [11], [1], [4], [8], [9], [7], [10], [3], [5], [2], and [6].

A relational structure is said to be a chain if: (Def. 1) It is a connected non empty poset or it is empty.

One can verify that every relational structure which is empty is also reflexive, transitive, and antisymmetric.

One can verify that every chain is reflexive, transitive, and antisymmetric. Let us note that there exists a chain which is non empty. One can check that every non empty chain is connected. Let L be a 1-sorted structure. We say that L is countable if and only if:

(Def. 2) The carrier of L is countable.

Let us observe that there exists a chain which is finite and non empty. Let us mention that there exists a chain which is countable. Let A be a connected non empty relational structure. Observe that every

non empty relational substructure of A which is full is also connected.

Let A be a finite relational structure. Observe that every relational substructure of A is finite.

We now state the proposition

(1) For all natural numbers n, m such that n m holds ⟨n, ⊆⟩ is a full relational substructure of ⟨m, ⊆⟩.

Let L be a relational structure and let A, B be sets. We say that A, B form upper lower partition of L if and only if:

(Def. 3) A ∪ B = the carrier of L and for all elements a, b of L such that a ∈ A

and b ∈ B holds a < b. Next we state four propositions:

430 marta pruszyńska and marek dudzicz

(2) Let L be a relational structure and A, B be sets. If A, B form upper lower partition of L, then A ∩ B = ∅.

(3) Let L be an upper-bounded antisymmetric non empty relational structure. Then (the carrier of L) \ {⊤_{L}}, {⊤_{L}} form upper lower partition of L.

(4) Let L_{1}, L_{2} be relational structures and f be a map from L_{1} into L_{2}. Suppose f is isomorphic. Then

(i) the carrier of L_{1} ≠ ∅ iff the carrier of L_{2} ≠ ∅, (ii) the carrier of L_{2} ≠ ∅ or the carrier of L_{1} = ∅, and (iii) the carrier of L_{1} = ∅ iff the carrier of L_{2} = ∅.

(5) Let L_{1}, L_{2} be antisymmetric relational structures and A_{1}, B_{1} be subsets of L_{1}. Suppose A_{1}, B_{1} form upper lower partition of L_{1}. Let A_{2}, B_{2} be subsets of L_{2}. Suppose A_{2}, B_{2} form upper lower partition of L_{2}. Let f be a map from sub(A_{1}) into sub(A_{2}). Suppose f is isomorphic. Let g be a map from sub(B_{1}) into sub(B_{2}). Suppose g is isomorphic. Then there exists a map h from L_{1} into L_{2} such that h = f+·g and h is isomorphic.

Let n be a natural number. Observe that n + 1 is non empty.

The following proposition is true

(6) Let A be a finite chain and n be a natural number. If \overline{\overline{the carrier of A}} = n, then A and ⟨n, ⊆⟩ are isomorphic.

References

[1] Grzegorz Bancerek. Cardinal numbers. Formalized Mathematics, 1(2):377–382, 1990.

[2] Grzegorz Bancerek. Bounds in posets and relational substructures. Formalized Mathematics, 6(1):81–91, 1997.

[3] Grzegorz Bancerek. Directed sets, nets, ideals, filters, and maps. Formalized Mathematics, 6(1):93–107, 1997.

[4] Czesław Byliński. The modification of a function by a function and the iteration of the composition of a function. Formalized Mathematics, 1(3):521–527, 1990.

[5] Czesław Byliński. Galois connections. Formalized Mathematics, 6(1):131–143, 1997.

[6] Adam Grabowski and Robert Milewski. Boolean posets, posets under inclusion and products of relational structures. Formalized Mathematics, 6(1):117–121, 1997.

[7] Beata Padlewska and Agata Darmochwał. Topological spaces and continuous functions. Formalized Mathematics, 1(1):223–230, 1990.

[8] Wojciech A. Trybulec. Groups. Formalized Mathematics, 1(5):821–827, 1990.

[9] Wojciech A. Trybulec. Partially ordered sets. Formalized Mathematics, 1(2):313–319, 1990.

[10] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[11] Zinaida Trybulec and Halina Święczkowska. Boolean properties of sets. Formalized Mathematics, 1(1):17–23, 1990.

The Jónsson Theorem about the Representation of Modular Lattices

Mariusz Łapiński University of Białystok

Summary. Formalization of [14, pp. 192–199], chapter IV. Partition Lattices, theorem 8.

MML Identifier: LATTICE8.

The articles [8], [18], [6], [9], [10], [3], [15], [20], [1], [21], [13], [2], [17], [7], [23], [24], [22], [19], [5], [12], [16], [4], [25], and [11] provide the terminology and notation for this paper.

1. Preliminaries

Let A be a non empty set and let P, R be binary relations on A. Let us observe that P ⊆ R if and only if:

(Def. 1) For all elements a, b of A such that ⟨⟨a, b⟩⟩∈ P holds ⟨⟨a, b⟩⟩∈ R.

Let L be a relational structure. We say that L is finitely typed if and only if the condition (Def. 2) is satisfied.

(Def. 2) There exists a non empty set A such that

(i) for every set e such that e ∈ the carrier of L holds e is an equivalence relation of A, and

(ii) there exists a natural number o such that for all equivalence relations e_{1}, e_{2} of A and for all sets x, y such that e_{1} ∈ the carrier of L and e_{2} ∈ the carrier of L and ⟨⟨x, y⟩⟩∈ e_{1} ⊔ e_{2} there exists a non empty finite sequence F of elements of A such that lenF = o and x and y are joint by F, e_{1} and e_{2}.

Let L be a lower-bounded lattice and let n be a natural number. We say that L has a representation of type n if and only if the condition (Def. 3) is satisfied.

(Def. 3) There exists a non trivial set A and there exists a homomorphism f from

L to EqRelPoset(A) such that

(i) f is one-to-one, (ii) Imf is finitely typed, (iii) there exists an equivalence relation e of A such that e ∈ the carrier of

Imf and e ≠ id_{A}, and (iv) the type of Imf n. Let us mention that there exists a lattice which is lower-bounded, distribu-

tive, and finite.

Let A be a non trivial set. Observe that there exists a non empty sublattice of EqRelPoset(A) which is non trivial, finitely typed, and full.

One can prove the following propositions:

(1) For every non empty set A and for every lower-bounded lattice L and for every distance function d of A, L holds succ∅ ⊆ DistEsti(d).

(2) Every trivial semilattice is modular.

(3) Let A be a non empty set and L be a non empty sublattice of EqRelPoset(A). Then L is trivial or there exists an equivalence relation e of A such that e ∈ the carrier of L and e ≠ id_{A}.

(4) Let L_{1}, L_{2} be lower-bounded lattices and f be a map from L_{1} into L_{2}. Suppose f is infs-preserving and sups-preserving. Then f is meetpreserving and join-preserving.

(5) For all lower-bounded lattices L_{1}, L_{2} such that L_{1} and L_{2} are isomorphic and L_{1} is modular holds L_{2} is modular.

(6) Let S be a lower-bounded non empty poset, T be a non empty poset, and f be a monotone map from S into T. Then Imf is lower-bounded.

(7) Let L be a lower-bounded lattice, x, y be elements of L, A be a non empty set, and f be a homomorphism from L to EqRelPoset(A). If f is one-to-one, then if f^{∘}(x) f^{∘}(y), then x y.

2. The Jónsson Theorem

We now state two propositions:

(8) Let A be a non trivial set, L be a finitely typed full non empty sublattice of EqRelPoset(A), and e be an equivalence relation of A. Suppose e ∈ the carrier of L and e ≠ id_{A}. If the type of L 2, then L is modular.

(9) For every lower-bounded lattice L such that L has a representation of type 2 holds L is modular.

Let A be a set. The functor new set2A is defined by: (Def. 4) new set2A = A ∪ {{A}, {{A}}}.

Let A be a set. One can verify that new set2A is non empty. Let A be a non empty set, let L be a lower-bounded lattice, let d be a

bifunction from A into L, and let q be an element of [: A, A, the carrier of L, the carrier of L:]. The functor new bi fun2(d, q) yielding a bifunction from new set2A into L is defined by the conditions (Def. 5).

(Def. 5)(i) For all elements u, v of A holds (new bi fun2(d, q))(u, v) = d(u, v), (ii) (new bi fun2(d, q))({A}, {A}) = ⊥_{L}, (iii) (new bi fun2(d, q))({{A}}, {{A}}) = ⊥_{L}, (iv) (new bi fun2(d, q))({A}, {{A}}) = (d(q_{1}, q_{2}) ⊔ q_{3}) ⊓ q_{4},

(v) (new bi fun2(d, q))({{A}}, {A}) = (d(q_{1}, q_{2}) ⊔ q_{3}) ⊓ q_{4}, and (vi) for every element u of A holds (new bi fun2(d, q))(u, {A}) =

d(u, q_{1}) ⊔ q_{3} and (new bi fun2(d, q))({A}, u) = d(u, q_{1}) ⊔ q_{3} and (new bi fun2(d, q))(u, {{A}}) = d(u, q_{2})⊔q_{3} and (new bi fun2(d, q))({{A}},

u) = d(u, q_{2}) ⊔ q_{3}. Next we state several propositions:

(10) Let A be a non empty set, L be a lower-bounded lattice, and d be a bifunction from A into L. Suppose d is zeroed. Let q be an element of [: A, A, the carrier of L, the carrier of L:]. Then new bi fun2(d, q) is zeroed.

(11) Let A be a non empty set, L be a lower-bounded lattice, and d be a bifunction from A into L. Suppose d is symmetric. Let q be an element of [: A, A, the carrier of L, the carrier of L:]. Then new bi fun2(d, q) is symmetric.

(12) Let A be a non empty set and L be a lower-bounded lattice. Suppose L is modular. Let d be a bifunction from A into L. Suppose d is symmetric and satisfies triangle inequality. Let q be an element of [: A, A, the carrier of L, the carrier of L:]. If d(q_{1}, q_{2}) q_{3} ⊔ q_{4}, then new bi fun2(d, q) satisfies triangle inequality.

(13) For every set A holds A ⊆ new set2A.

(14) Let A be a non empty set, L be a lower-bounded lattice, d be a bifunction from A into L, and q be an element of [: A, A, the carrier of L, the carrier of L:]. Then d ⊆ new bi fun2(d, q).

Let A be a non empty set and let O be an ordinal number. The functor ConsecutiveSet2(A, O) is defined by the condition (Def. 6).

(Def. 6) There exists a transfinite sequence L_{0} such that (i) ConsecutiveSet2(A, O) = lastL_{0}, (ii) domL_{0} = succO, (iii) L_{0}(∅) = A, (iv) for every ordinal number C and for every set z such that succC ∈ succO

and z = L_{0}(C) holds L_{0}(succC) = new set2z, and

(v) for every ordinal number C and for every transfinite sequence L_{1} such that C ∈ succO and C ≠ ∅ and C is a limit ordinal number and L_{1} = L_{0}↾C holds L_{0}(C) = ⋃ rngL_{1}.

One can prove the following three propositions:

(15) For every non empty set A holds ConsecutiveSet2(A, ∅) = A.

(16) For every non empty set A and for every ordinal number O holds ConsecutiveSet2(A, succO) = new set2ConsecutiveSet2(A, O).

(17) Let A be a non empty set, O be an ordinal number, and T be a transfinite sequence. Suppose O ≠ ∅ and O is a limit ordinal number and domT = O and for every ordinal number O_{1} such that O_{1} ∈ O holds T (O_{1}) = ConsecutiveSet2(A, O_{1}). Then ConsecutiveSet2(A, O) = ⋃ rngT.

Let A be a non empty set and let O be an ordinal number. Note that ConsecutiveSet2(A, O) is non empty.

We now state the proposition

(18) For every non empty set A and for every ordinal number O holds A ⊆

ConsecutiveSet2(A, O). Let A be a non empty set, let L be a lower-bounded lattice, let d be a bi-

function from A into L, let q be a sequence of quadruples of d, and let O be an ordinal number. Let us assume that O ∈ domq. The functor Quadr2(q, O) yielding an element of [: ConsecutiveSet2(A, O), ConsecutiveSet2(A, O), the carrier of L, the carrier of L:] is defined by:

(Def. 7) Quadr2(q, O) = q(O).

Let A be a non empty set, let L be a lower-bounded lattice, let d be a bifunction from A into L, let q be a sequence of quadruples of d, and let O be an ordinal number. The functor ConsecutiveDelta2(q, O) is defined by the condition (Def. 8).

(Def. 8) There exists a transfinite sequence L_{0} such that (i) ConsecutiveDelta2(q, O) = lastL_{0}, (ii) domL_{0} = succO, (iii) L_{0}(∅) = d, (iv) for every ordinal number C and for every set z such

that succC ∈ succO and z = L_{0}(C) holds L_{0}(succC) = new bi fun2(BiFun(z, ConsecutiveSet2(A, C), L), Quadr2(q, C)), and

(v) for every ordinal number C and for every transfinite sequence L_{1} such that C ∈ succO and C ≠ ∅ and C is a limit ordinal number and L_{1} = L_{0}↾C holds L_{0}(C) = ⋃ rngL_{1}.

Next we state several propositions:

(19) Let A be a non empty set, L be a lower-bounded lattice, d be a bifunction from A into L, and q be a sequence of quadruples of d. Then ConsecutiveDelta2(q, ∅) = d.

(20) Let A be a non empty set, L be a lower-bounded lattice, d be a bifunction from A into L, q be a sequence of quadruples of d, and O be an ordinal number. Then ConsecutiveDelta2(q, succO) = new bi fun2(BiFun(ConsecutiveDelta2(q, O), ConsecutiveSet2(A, O), L), Quadr2(q, O)).

(21) Let A be a non empty set, L be a lower-bounded lattice, d be a bifunction from A into L, q be a sequence of quadruples of d, T be a transfinite sequence, and O be an ordinal number. Suppose O ≠ ∅ and O is a limit ordinal number and domT = O and for every ordinal number O_{1} such that O_{1} ∈ O holds T (O_{1}) = ConsecutiveDelta2(q, O_{1}). Then ConsecutiveDelta2(q, O) = ⋃ rngT.

(22) For every non empty set A and for all ordinal numbers O, O_{1}, O_{2} such that O_{1} ⊆ O_{2} holds ConsecutiveSet2(A, O_{1}) ⊆ ConsecutiveSet2(A, O_{2}).

(23) Let A be a non empty set, L be a lower-bounded lattice, d be a bifunction from A into L, q be a sequence of quadruples of d, and O be an ordinal number. Then ConsecutiveDelta2(q, O) is a bifunction from ConsecutiveSet2(A, O) into L.

Let A be a non empty set, let L be a lower-bounded lattice, let d be a bifunction from A into L, let q be a sequence of quadruples of d, and let O be an ordinal number. Then ConsecutiveDelta2(q, O) is a bifunction from ConsecutiveSet2(A, O) into L.

The following propositions are true:

(24) Let A be a non empty set, L be a lower-bounded lattice, d be a bifunction from A into L, q be a sequence of quadruples of d, and O be an ordinal number. Then d ⊆ ConsecutiveDelta2(q, O).

(25) Let A be a non empty set, L be a lower-bounded lattice, d be a bifunction from A into L, O_{1}, O_{2} be ordinal numbers, and q be a sequence of quadruples of d. If O_{1} ⊆ O_{2}, then ConsecutiveDelta2(q, O_{1}) ⊆ ConsecutiveDelta2(q, O_{2}).

(26) Let A be a non empty set, L be a lower-bounded lattice, and d be a bifunction from A into L. Suppose d is zeroed. Let q be a sequence of quadruples of d and O be an ordinal number. Then ConsecutiveDelta2(q, O) is zeroed.

(27) Let A be a non empty set, L be a lower-bounded lattice, and d be a bifunction from A into L. Suppose d is symmetric. Let q be a sequence of quadruples of d and O be an ordinal number. Then ConsecutiveDelta2(q, O) is symmetric.

(28) Let A be a non empty set and L be a lower-bounded lattice. Suppose L is modular. Let d be a bifunction from A into L. Suppose d is symmetric and satisfies triangle inequality. Let O be an ordinal number and q be a sequence of quadruples of d. If O ⊆ DistEsti(d), then ConsecutiveDelta2(q, O) satisfies triangle inequality.

(29) Let A be a non empty set, L be a lower-bounded modular lattice, d be a distance function of A, L, O be an ordinal number, and q be a sequence of quadruples of d. If O ⊆ DistEsti(d), then ConsecutiveDelta2(q, O) is a distance function of ConsecutiveSet2(A, O), L.

Let A be a non empty set, let L be a lower-bounded lattice, and let d be a bifunction from A into L. The functor NextSet2d is defined by:

(Def. 9) NextSet2d = ConsecutiveSet2(A, DistEsti(d)).

Let A be a non empty set, let L be a lower-bounded lattice, and let d be a bifunction from A into L. Note that NextSet2d is non empty.

Let A be a non empty set, let L be a lower-bounded lattice, let d be a bifunction from A into L, and let q be a sequence of quadruples of d. The functor NextDelta2q is defined as follows:

(Def. 10) NextDelta2q = ConsecutiveDelta2(q, DistEsti(d)).

Let A be a non empty set, let L be a lower-bounded modular lattice, let d be a distance function of A, L, and let q be a sequence of quadruples of d. Then NextDelta2q is a distance function of NextSet2d, L.

Let A be a non empty set, let L be a lower-bounded lattice, let d be a distance function of A, L, let A_{1} be a non empty set, and let d_{1} be a distance function of A_{1}, L. We say that A_{1}, d_{1} is extension2 of A, d if and only if:

(Def. 11) There exists a sequence q of quadruples of d such that A_{1} = NextSet2d

and d_{1} = NextDelta2q. Next we state the proposition

(30) Let A be a non empty set, L be a lower-bounded lattice, d be a distance function of A, L, A_{1} be a non empty set, and d_{1} be a distance function of A_{1}, L. Suppose A_{1}, d_{1} is extension2 of A, d. Let x, y be elements of A and a, b be elements of L. Suppose d(x, y) a ⊔ b. Then there exist elements z_{1}, z_{2} of A_{1} such that d_{1}(x, z_{1}) = a and d_{1}(z_{1}, z_{2}) = (d(x, y) ⊔ a) ⊓ b and d_{1}(z_{2}, y) = a.

Let A be a non empty set, let L be a lower-bounded modular lattice, and let d be a distance function of A, L. A function is called a ExtensionSeq2 of A, d if it satisfies the conditions (Def. 12).

(Def. 12)(i) domit = ℕ, (ii) it(0) = ⟨⟨A, d⟩⟩, and (iii) for every natural number n there exists a non empty set A′ and there

exists a distance function d′ of A′, L and there exists a non empty set A_{1} and there exists a distance function d_{1} of A_{1}, L such that A_{1}, d_{1} is extension2 of A′, d′ and it(n) = ⟨⟨A′, d′⟩⟩ and it(n + 1) = ⟨⟨A_{1}, d_{1}⟩⟩.

We now state several propositions:

(31) Let A be a non empty set, L be a lower-bounded modular lattice, d be a distance function of A, L, S be a ExtensionSeq2 of A, d, and k, l be natural numbers. If k l, then S(k)_{1} ⊆ S(l)_{1}.

(32) Let A be a non empty set, L be a lower-bounded modular lattice, d be a distance function of A, L, S be a ExtensionSeq2 of A, d, and k, l be natural numbers. If k l, then S(k)_{2} ⊆ S(l)_{2}.

(33) Let L be a lower-bounded modular lattice, S be a ExtensionSeq2 of the carrier of L, δ_{0}(L), and F_{1} be a non empty set. Suppose F_{1} = ⋃{S(i)_{1} : i ranges over natural numbers}. Then ⋃{S(i)_{2} : i ranges over natural numbers} is a distance function of F_{1}, L.

(34) Let L be a lower-bounded modular lattice, S be a ExtensionSeq2 of the carrier of L, δ_{0}(L), F_{1} be a non empty set, F_{2} be a distance function of F_{1}, L, x, y be elements of F_{1}, and a, b be elements of L. Suppose F_{1} = ⋃{S(i)_{1} : i ranges over natural numbers} and F_{2} = ⋃{S(i)_{2} : i ranges over natural numbers} and F_{2}(x, y) a ⊔ b. Then there exist elements z_{1}, z_{2} of F_{1} such that F_{2}(x, z_{1}) = a and F_{2}(z_{1}, z_{2}) = (F_{2}(x,

y) ⊔ a) ⊓ b and F_{2}(z_{2}, y) = a.

(35) Let L be a lower-bounded modular lattice, S be a ExtensionSeq2 of the carrier of L, δ_{0}(L), F_{1} be a non empty set, F_{2} be a distance function of F_{1}, L, f be a homomorphism from L to EqRelPoset(F_{1}), e_{1}, e_{2} be equivalence relations of F_{1}, and x, y be sets. Suppose that

(i) f = α(F_{2}), (ii) F_{1} = ⋃{S(i)_{1} : i ranges over natural numbers}, (iii) F_{2} = ⋃{S(i)_{2} : i ranges over natural numbers}, (iv) e_{1} ∈ the carrier of Imf,

(v) e_{2} ∈ the carrier of Imf, and (vi) ⟨⟨x, y⟩⟩∈ e_{1} ⊔ e_{2}.

Then there exists a non empty finite sequence F of elements of F_{1} such that lenF = 2 + 2 and x and y are joint by F, e_{1} and e_{2}.

(36) For every lower-bounded modular lattice L holds L has a representation of type 2.

(37) For every lower-bounded lattice L holds L has a representation of type 2 iff L is modular.

References

[1] Grzegorz Bancerek. The fundamental properties of natural numbers. Formalized Mathematics, 1(1):41–46, 1990.

[2] Grzegorz Bancerek. The ordinal numbers. Formalized Mathematics, 1(1):91–96, 1990.

438 mariusz Łapiński

[3] Grzegorz Bancerek. Complete lattices. Formalized Mathematics, 2(5):719–725, 1991.

[4] Grzegorz Bancerek. Bounds in posets and relational substructures. Formalized Mathematics, 6(1):81–91, 1997.

[5] Grzegorz Bancerek. Directed sets, nets, ideals, filters, and maps. Formalized Mathematics, 6(1):93–107, 1997.

[6] Grzegorz Bancerek and Krzysztof Hryniewiecki. Segments of natural numbers and finite sequences. Formalized Mathematics, 1(1):107–114, 1990.

[7] Józef Białas. Group and field definitions. Formalized Mathematics, 1(3):433–439, 1990.

[8] Czesław Byliński. Binary operations. Formalized Mathematics, 1(1):175–180, 1990.

[9] Czesław Byliński. Functions and their basic properties. Formalized Mathematics, 1(1):55– 65, 1990.

[10] Czesław Byliński. Functions from a set to a set. Formalized Mathematics, 1(1):153–164, 1990.

[11] Czesław Byliński. Some basic properties of sets. Formalized Mathematics, 1(1):47–53, 1990.

[12] Czesław Byliński. Galois connections. Formalized Mathematics, 6(1):131–143, 1997.

[13] Adam Grabowski. On the category of posets. Formalized Mathematics, 5(4):501–505, 1996.

[14] George Grätzer. General Lattice Theory. Academic Press, New York, 1978.

[15] Jarosław Gryko. The Jónson’s theorem. Formalized Mathematics, 6(4):515–524, 1997.

[16] Adam Naumowicz. On the characterization of modular and distributive lattices. Formalized Mathematics, 7(1):53–55, 1998.

[17] Beata Padlewska and Agata Darmochwał. Topological spaces and continuous functions. Formalized Mathematics, 1(1):223–230, 1990.

[18] Konrad Raczkowski and Paweł Sadowski. Equivalence relations and classes of abstraction. Formalized Mathematics, 1(3):441–444, 1990.

[19] Andrzej Trybulec. Tarski Grothendieck set theory. Formalized Mathematics, 1(1):9–11, 1990.

[20] Andrzej Trybulec. Tuples, projections and Cartesian products. Formalized Mathematics, 1(1):97–105, 1990.

[21] Wojciech A. Trybulec. Partially ordered sets. Formalized Mathematics, 1(2):313–319, 1990.

[22] Zinaida Trybulec. Properties of subsets. Formalized Mathematics, 1(1):67–71, 1990.

[23] Edmund Woronowicz. Relations and their basic properties. Formalized Mathematics, 1(1):73–83, 1990.

[24] Edmund Woronowicz. Relations defined on sets. Formalized Mathematics, 1(1):181–186, 1990.

[25] Mariusz Żynel and Czesław Byliński. Properties of relational structures, posets, lattices and maps. Formalized Mathematics, 6(1):123–130, 1997.

the jónsson theorem about the … 439

alalalalalal alalalalalalal

Index of MML Identifiers

AMISTD 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .291 AMISTD 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .303 CARD FIL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323 COMPLFLD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 FUZZY 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351 FUZZY 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 HAHNBAN1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363 INTEGRA4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 INTEGRA5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 LATTICE7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 LATTICE8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431 ORDERS 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .429 PENCIL 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .383 POLYEQ 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .347 POLYNOM2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331 POLYNOM3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339 POLYNOM4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391 RADIX 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1275 RFUNCT 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .285 SCMPDS 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .397 SCMRING3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 SCPINVAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419 SCPISORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 SCPQSORT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413 WAYBEL28 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 WAYBEL29 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 WAYBEL30 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 WAYBEL31 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 WAYBEL32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377 YELLOW17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373

Contents Formaliz. Math. 9 (2)

Lim-Inf Convergence

By Bartłomiej Skorulski  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237

The Characterization of the Continuity of Topologies

By Grzegorz Bancerek and Adam Naumowicz  . . . . . . . . . . . 241

Meet Continuous Lattices Revisited

By Artur Korniłowicz  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249

Weights of Continuous Lattices

By Robert Milewski  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255

Representation Theorem for Finite Distributive Lattices

By Marek Dudzicz  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261

The Field of Complex Numbers

By Anna Justyna Milewska  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265

Integrability of Bounded Total Functions

By Noboru Endou et al. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271

High-Speed Algorithms for RSA Cryptograms

By Yasushi Fuwa and Yoshinori Fujisawa  . . . . . . . . . . . . . . . . . 275

Definition of Integrability for Partial Functions from ℝ to ℝ and

Integrability for Continuous Functions

By Noboru Endou et al. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281

Introduction to Several Concepts of Convexity and Semicontinuity

for Function from ℝ to ℝ

By Noboru Endou et al. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285

Standard Ordering of Instruction Locations

By Andrzej Trybulec et al.  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291

On the Composition of Macro Instructions of Standard Compu-

ters

By Artur Korniłowicz  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303

The Properties of Instructions of SCM over Ring

By Artur Korniłowicz  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317

Basic Facts about Inaccessible and Measurable Cardinals

By Josef Urban  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323

The Evaluation of Multivariate Polynomials

By Christoph Schwarzweller and Andrzej Trybulec  … 331

The Ring of Polynomials

By Robert Milewski  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 339

Solving Roots of Polynomial Equations of Degree 2 and 3 with

Real Coefficients

By Liang Xiquan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347

The Concept of Fuzzy Set and Membership Function and Basic

Properties of Fuzzy Set Operation

By Takashi Mitsuishi et al. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351

Basic Properties of Fuzzy Set Operation and Membership Func-

tion

By Takashi Mitsuishi et al. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357

The Hahn Banach Theorem in the Vector Space over the Field of

Complex Numbers

By Anna Justyna Milewska  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 363

The Tichonov Theorem

By Bartłomiej Skorulski  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373

On the Order-consistent Topology of Complete and Uncomplete

Lattices

By Ewa Grądzka . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377

On Segre’s Product of Partial Line Spaces

By Adam Naumowicz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383

The Evaluation of Polynomials

By Robert Milewski  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391

The Construction and Computation of While-Loop Programs for

SCMPDS

By Jing-Chao Chen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397

Insert Sort on SCMPDS

By Jing-Chao Chen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407

Quick Sort on SCMPDS

By Jing-Chao Chen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413

Justifying the Correctness of the Fibonacci Sequence and the Euc-

lide Algorithm by Loop-Invariant

By Jing-Chao Chen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419

On the Isomorphism between Finite Chains

By Marta Pruszyńska and Marek Dudzicz  . . . . . . . . . . . . . . . 429

The Jónsson Theorem about the Representation of Modular Lat-

tices

By Mariusz Łapiński  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431

Index of MML Identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 440