Object Membership

Set theoretic representation

As an appendix to [], a set-theoretic representation of object membership, ϵ, is presented. The canonical structure of ϵ is first generalized to a structure that is essential with respect to set representation. It is shown that any such essential structure has an extension that satisfies certain consistency conditions with respect to preimages in ϵ. A consistent essential structure (O, ϵ) is then embedded into a cumulative hierarchy V of sets, called eigenclass frame. Similarly to a superstructure in non-standard analysis, V has urelement-like sets on the ground level. However, the powerset cumulation goes to ω + 1 which is one stage more than in superstructures. The V set is recognized as an essential structure of object membership with following constituents: Like with abstract objects, object membership, ϵ, on V is obtained as the composition of .ec with .

In addition to the above structure, the embedding map, , preserves primary objects. Moreover, a partial correspondence between and ϵ is established. For every x, y from O,

Preface

Author
Ondřej Pavlata
Jablonec nad Nisou
Czech Republic
Document date
Initial releaseJanuary 12, 2013
Last major release January 22, 2013
Last updateJanuary 22, 2013
(see Document history)
Warning
  1. This document has been created without any prepublication review except those made by the author himself.

Table of contents

Preliminaries

Ordinal numbers up to ω + 1
Let ω denote the first infinite ordinal number so that it is just another symbol for the set of natural numbers. The set ω + 1 equals ω {ω}. Following the standard convention, we use the symbol and its variants for set inclusion between ordinal numbers. In particular, i < ω for every natural i.

For a subset X of ω + 1, we write sup(X) for the supremum of X – the least y from ω + 1 such that x y for every x from X. Equivalently,

Powerset cumulation
For a set X, we denote (X) the powerset of X, the set of all subsets of X. In addition, we denote We will use exponents up to ω + 1 for multiple application as follows:
Well-foundedness
For a relation R on a set X, an element x X is well-founded in R if x is not a member of an infinite descending chain in R, i.e. if there is no infinite chain of the form A relation R on a set X is well-founded if all elements x X are well-founded in R. Assuming the axiom of choice, this is equivalent to the condition that every non-empty subset Y X contains an element y that is minimal in (Y,R) (i.e. such that R−1({y}) Y is empty).

A relation S is the well-founded restriction of R if S is the domain-restricton of R to the set of elements from the domain of R that are well-founded in R, i.e.

Obviously, S is a well-founded relation.
Primorder algebra
By a primorder algebra we mean a structure (X, .ec, .pr) where Elements from the range X.pr are primary. Elements from the range X.ec are eigenclasses. We write x.ec(i) for i-th application of .ec to x (x.ec(0) equals x). The structure is subject to the following axioms: We denote .ce the inverse of .ec. If defined, x.ce is the (direct) eigenclass predecessor of x. The eigenclass index of x, denoted x.eci, is defined as the unique i from (2).

Proposition:

  1. Each component of the monounary algebra (X, .ec) is isomorphic (via .eci) to the structure (, succ) of natural numbers where succ is the successor operator.
  2. X = X.pr X.ec, i.e. an element is either primary or an eigenclass.
  3. For an element x the following are equivalent:
  4. A primorder algebra (X, .ec, .pr) is uniquely given by its reduct (X, .ec).
 
Terminological conventions
In this document, the term class is not used in the set-theoretic sense. Instead, the terminology from [] is applied, i.e. class means primary non-terminal object.

S1v: The essential structure of object membership

By an S1v structure we mean a structure (O, .ec, , r) where The usual ancestor / descendant terminology is used for inheritance. Objects that are not descendants of r are terminal(s). The eigenclass chain of an object x is the set { x.ec(i) | i ≥ 0 } where x.ec(i) is the i-th application of .ec to x.
The structure is subject to the following axioms:
(S1v~1) Inheritance, , is a partial order.
(S1v~2) The eigenclass map, .ec, is an order-embedding of (O, ) into itself.
(S1v~3) Objects from eigenclass chains of terminals are minimal in inheritance.
(S1v~4) Every eigenclass is a descendant of the inheritance root, O.ec r..
(S1v~5) The eigenclass chain of r (denoted R – see below) has no lower bound in . In particular, r.ec r.

Proposition A:

  1. The structure (O, .ec) is a reduct of a primorder algebra.
    We will apply established notation and terminology for primorder algebras – in particular, definition of .pr, .ce and .eci.
  2. The inheritance root r is a primary object.
  3. For every object x and every natural i, j, (That is, a strict inheritance ancestor of an object x can only appear before x in the eigenclass chain, not after x, directly or indirectly.)
  Additional notation and terminology is applied:

Proposition B:

  1. The set R is linearly ordered by
  2. The set R forms a closure system in (O T, ). (That is, every non-terminal object x has a least ancestor that belongs to R.) The corresponding closure operator is denoted .re. We have
  3. The set R. of helix objects has no lower bound in .
  4. The structure (O, .ec, , r) is uniquely given by the object membership structure, (O, ϵ).
  5. (ϵ) () = (ϵ) = () (ϵ)   (= () (ϵ) ()).
  6. A substructure of an S1v structure is an S1v structure.
  7. Each of the sets R and R. forms a substructure.
  8. The set R forms a minimum substructure.
 
S1ϵ as a special case of S1v

Proposition A: For a structure (O, ϵ) the following are equivalent:

Proposition B: For a structure (O, ϵ) the following are equivalent:

Rank
An object x is ϵ-ranked or just ranked if x. T.ϵ where ϵ denotes the reflexive transitive closure of ϵ. Equivalently, for every descendant y of x there exists an ϵ-chain such that x0 is terminal. A set (or the whole structure) is ranked if its every object is ranked.

For a ranked object x we denote x.d the supremum of lengths n of ϵ-chains ending in x. (So that x.d equals ω if there is no greatest n.)

Proposition:

  1. For a ranked object x, the following are satisfied:
  2. For every ranked object x, If x is well-founded in ϵ then the rank of x equals the index of the highest meta-level that contains a descendant a of x.
Bounded and unbounded objects
We say that an object x is bounded if it is well-founded in ϵ, i.e. if there is no infinite chain of the form Otherwise, x is unbounded.

Observations:

  1. For an object x the following are equivalent:
    1. x is bounded.
    2. R x...
    3. Descendants of x only occur in finitely many meta-levels.
  2. Bounded (resp. unbounded) objects form a down-set (resp. an up-set) in .
  3. For every object x, if x.ec is bounded then so is x. (But not necessarily vice versa, see example (ⅰ).)
  4. Every object x such that x > x.ec(i) for some i > 0 is unbounded. (But not necessarily vice versa, see example (ⅱ).) In particular, if x ϵ x then x is unbounded.
The following are examples of S1v structures. In example (ⅰ), the A class is the only bounded object.
(ⅰ) (ⅱ)
In example (ⅱ), all object are unbounded.
: the well-founded restriction of ϵ
We denote the well-founded restriction of ϵ, i.e. Similar notational conventions are used for as for ϵ. In particular, x. denotes the set of all bounded members of x. (So that r. is the set of all bounded objects.)

Proposition:

  1. The union of and .ec is well-founded.
  2. For every object x,
  3. For a ranked object x,
-consistency
An object x is called -A-consistent if it satisfies the following condition:
(A) If x is non-terminal then it has non-empty -preimage and all objects y with equal or larger -preimage are ancestors of x, i.e.
  • x. , and
  • x. y. implies x y   for every object y   (so that x. y. iff x y).
An object x is called -B-consistent if it satisfies the following condition:
(B) If x is a class then there exist a, b from x. such that
  • the set a. b. x.϶ is empty,
i.e. a, b are bounded instances of x that do not have a common ancestor among (all) instances of x.
An object x is called -consistent if it is both -A-consistent and -B-consistent. A set X of objects is -(A/B)-consistent if every object from X is -(A/B)-consistent. The whole structure is said to be -(A/B)-consistent if so are all objects.

Proposition:

(1) For a non-terminal object x, the following are equivalent:
  1. x is -A-consistent.
  2. x = x..ec   (i.e. x is the least upper bound of the set { a.ec | a x }).
(2) For an S1v structure the following are equivalent:
  1. Every object is -A-consistent.
  2. The set O.ec r. of bounded eigenclasses is join-dense in (O T, ).
(3) Every -A-consistent S1v structure is ranked.

Proof:

(1) Every object x is an upper bound of the set X = { a.ec | a x }. By definition, x is the least upper bound of X iff for every object y the following are equivalent:
  • a.ec y for every a x,
  • x y.
Since (a) is equivalent to x. y., we obtain the equivalence x. y.x y from the definition of -A-consistency.

Moreover, x since otherwise x would be a lower bound of R, violating (S1v~5). Thus if (ⅱ) holds then x. .

(3) Let x be an object. Since is well-founded, there is a finite chain x0 x1 xn = x such that x0. is empty. Since x0 is -A-consistent it is necessarily terminal.
 
Examples of -non-consistency
The diagrams below show examples of S1v structures in which some objects (those marked with red color) are not -consistent. In both examples, bounded objects are easily recognized as those that have no helical arrow pointing to them. (In (ⅰ), bounded objects are exactly those from eigenclass chains of terminals, i.e. the set T.pr−1.)

The example (ⅰ) shows that -A-consistency of all classes does not necessarily imply that all objects are -A-consistent. We have

so that A.ec. B.. But A.ec B, therefore A.ec is not -A-consistent. (The set of objects that are not -A-consistent equals { A.ec(i) | i > 0 }.)
(ⅰ) (ⅱ)
In example (ⅱ), all objects are -A-consistent but not -consistent since the M class is not -B-consistent.
Freely attached objects
For objects x, p, we say x is freely attached to p if the following are satisfied: We say that an object x is freely attached if x is freely attached to p for some object p.

Observations:

  1. An object can be freely attached to at most one object.
  2. If x is freely attached to p then x is one meta-level lower than p.
  3. If x is freely attached to a class p, then p = x.class.

In the following example, the F class is a leaf that is freely attached to the M class. Dashed brown arrows indicate the domain-restriction of inheritance (in the reflexive transitive reduction) to the eigenclass chain of F. This is in order to illustrate proposition (A) below.

The example also illustrates propositions (E) and (F). In the restricted structure, without the eigenclass chain of F, the M class is not -(A-)consistent – because M. = N. = {A, B}. After a free attachment of F to M, the M class becomes -consistent (but not so the N class).

Proposition:

(A) Given an S1v structure S = (O, ϵ) and an object p O, there exists an S1v structure S' = (O', ϵ) and an object x such that
  • S is a substructure of S',
  • O'.pr = O.pr {x},
  • x is a leaf that is freely attached to p.
(B) In an S1v structure with upper-finite inheritance, i.e. such that
  • (0) every object has finite number of ancestors,
the following conditions (ⅰ) and (ⅱ) are equivalent:
    • (1) Every primary object is freely attached.
    • (1) Every object has at most one parent. In particular, x.class is defined for every x.
    • (2) For every object x, x.ec.class = x.class.class.
    • (3) R = R..
Note that (0) & (ⅱ)(1) is equivalent to:   (O T, , r) is an algebraic tree [].
(C) In an S1v structure with upper-finite inheritance, (ⅰ) and (ⅱ) are equivalent:
    • (1) Except for ancestors of r.ec, every primary object is freely attached.
    • (2) Ancestors of r.ec are linearly ordered by .   (Thus, the helix R. is linearly ordered.)
    • (1) Every object has at most one parent.
    • (2) For every object x, x.ec.class = x.class.class.
(D) For an object x, the following are equivalent:
  • x is freely attached to itself.
  • x equals the inheritance root r and R = R..
(E) For every object p, each of the following conditions (a) or (b) is sufficient for p.ec(i) to be -consistent for every i ≥ 0:
  • (a) p has at least 2 bounded members that are freely attached to p.
  • (b) p has at least 2 bounded members x, y such that x is freely attached to p and y x.
(F) Let S = (O, ϵ), S' = (O', ϵ), x, p be like in (A), i.e. S' is obtained from S by a free attachment of x to p. Then for every object y from O the following holds:
  • y is bounded in S iff y is bounded in S'.
  • If y is -consistent in S then so is in S'.
    Informally, the new freely attached object x (if it is not terminal), is the only new -non-consistent object.
 
Creation of an -consistent structure

Proposition: Every S1v structure is a substructure an -consistent S1v structure.

Proof:
Let S = (O, .ec, , r) be an S1v structure. We systematically perform free attachments of new instances as follows.

  1. For a meta-level of index i > 0 consider a (possibly empty) primorder algebra (X,.ec, .pr) and extensions of .class and such that the following are satisfied: Then in the structure T = (O X, .ec, , r), all classes from the i-th meta-level are -consistent. In addition, all -consistent objects in S are -consistent in T.
  2. For i > 0, the set O r.ec(i). is made -consistent by subsequently making each of its meta-levels -consistent in the descending order i, i - 1, … 1 of their meta-level index. This way we can construct a sequence S = S0, S1, … of S1v structures such that for each i ≥ 0,
  3. The final -consistent structure is made by joining the structures S0, S1, … from the previous step.  

Eigenclass frame

We say that a non-empty set V is an eigenclass frame if it equals the (ω + 1)-st powerset cumulation of its urelement base, i.e. there exists a (necessarily unique) set U such that the following are satisfied:
(1) V = ω+1(U).
(2) Elements of U are minimal in (V, ).
(3) Elements of U are minimal in (V, ).

Observations:

  1. The set U is uniquely determined by U = { x V | x V = }.
  2. The set U forms an antichain in .
  3. V if and only if U = {}.
Given an eigenclass frame V, we introduce the following notation and terminology. We adopt the convention that if a subset X of V is denoted by a capital letter and .f is a function on V then For example, if u is another notation for the set U of urelements, then expressions U.ec and u.ec are interpreted differently:
Empty set as an urelement
The particular case U = {} requires an adjustment, ', of set inclusion on V that disallows the urelement to be a strict subset of any other element: for every x, y in V, To simplify the treatment, we disallow the empty set to be an urelement, i.e. we further assume:
(4) V.
Basic properties

Proposition:

  1. The structure (V, .ec, , r) is an S1v structure. In particular, Established notation and terminology applies with following adjustments:
  2. For an element x V, the following are equivalent:
    1. x is bounded.
    2. x r.
    3. x has finite rank.
  3. For an element x V, the following are equivalent:
    1. x is an eigenclass.
    2. x is a non-empty join-closed ideal in (r, ), i.e. x is a non-empty subset of r such that for every a, b, y,
      • if a b x then a x   (i.e. x is a down-set in (r, )),
      • if a x and b x then a b x   (i.e. x is closed w.r.t. existing binary joins in (r, )),
      • so that x is an ideal in (r, ), in particular, x is an up-directed set in (r, ),
      • if y x and y r then y x   (i.e. x is closed w.r.t. all existing joins in (r, )).
    Condition (b)(ⅲ) can be simplified to: if x r then x x.
  4. The set r of bounded elements is join-dense in (V, ). As a consequence, for every x from V,
  5. The eigenclass map, .ec, satisfies the following properties:
    x.ec = {x} if x.pr is an urelement,
    x.ec = (x) {} iff x r,
    x.ec x iff x ϵ x.
  6. The inverse of the eigenclass map, .ce, is given by set union, i.e. for every x V.ec,
  7. r = U r.ec.   (But for i > 0, r Vi r.ec(i+1).)
  8. For the rank function .d, the following recursive formula holds: In particular, for an urelement x, x.d = sup() = 0.
  9. For every x V U, if y = x then
  10. For every x from V, the meta-level index of x is the length n of the shortest -chain such that x0 is an urelement. Equivalently, x.mli equals the smallest i such that x r.ec(i) is empty.
 
Strata

Observations:

  1. The bottom stratum of r is U. Other strata of r are of the form Vi+1 Vi, 0 < i < ω.
  2. For an element x from V U, a stratum of x is a non-empty intersection of x with a stratum of r.
  3. The eigenclass map commutes with the bottom stratum map, i.e. for every x V,
  4. The eigenclass map preserves the (possibly infinite) number of strata.
  5. For every element x, the meta-level of x is less than or equal to the rank of the bottom stratum of x, i.e.
Object system
We say that a set O is an object system if there is an eigenclass frame V such that Equivalently, O forms a substructure of the S1v structure induced by the eigenclass frame V.

The following table shows the correspondence between some expressions for the S1v structure (O, .ec, , r).

Terminology Abstract expression Set expression
Inheritance (O, ) (O, )
Inheritance root r O O
Eigenclass of x x.ec (x) r
Set of descendants of x x. (x) O (= x.ec O)
Embedding sequence
Let S = (O, ϵ) be an -consistent S1v structure and V an eigenclass frame. We say that a sequence of maps from O to V is an embedding sequence (w.r.t. S and V) if the following are satisfied:
  1. The restriction of 0 to terminals is a bijection between T and U.
  2. The restriction of 0 to the set O T of non-terminal objects x is defined by well-founded recursion, using well-foundedness of , by
  3. For every natural i,
  4. The last map, , is defined as the limit of the previous ones, i.e.
Note the use of / ϵ in the definition of x.ν0 / x.νi+1, respectively.
The embedding theorem

Proposition: An embedding sequence (using notation from the previous subsection) satisfies the following embedding properties:

(A) The i map is an isomorphism between (O, , ) and (Oi, , ), for every i ω.
(B) The map is an isomorphism between primorder algebras (O, .ec, .pr) and (O.ν, .ec, .pr).
(C) The inheritance roots correspond, i.e. r= Vω.
As a consequence, O is an object system whose S1v structure is isomorphic to S via .
Corollary: There is one-to-one correspondence between object systems and S1v structures.

Proof:

(A) We first show that for every objects x, y from O,
  1. (a) x.d = x.ν0.d,
  2. (b) x y iff x.ν0 y.ν0,
  3. (c) x y iff x.ν0 y.ν0.
The (a) equality is shown by well-founded induction on (O, ). For every a x we have
  • a.d < x.d   (by definition of .d in O),
  • a.ν0.d = a.d   (by the induction assumption),
  • a.ν0.d < ω   (since x.d ω),
  • a.ν0.ec.d = a.ν0.d + 1   (a consequence).
Therefore,
  • x.ν0.d = sup { a.ν0.ec.d | a x } = sup { a.d + 1 | a x } = x.d .
In the (b) equivalence, the implication x yx.ν0 y.ν0 is shown as follows. Since x.d < ω then (by (a)) x.ν0.d < ω. Therefore, x.ν0 x.ν0.ec y.ν0.

The opposite implication in (b) is shown by well-founded induction on (O0, ). Let x.ν0 y.ν0. By definition of y.ν0, there exists an object b such that b y and x.ν0 b.ν0.ec. We obtain

  • x.ν0 b.ν0 y.ν0   (by definition of .ec),
  • x. b.   (by induction assumption for x and b),
  • x b   (by -A-consistency),
  • x y   (since x b y).
If x is a terminal object then (c) is trivially satisfied. Otherwise, (c) is proved by
  • x y iff x. y. iff x.ν0 O0 y.ν0 O0 iff x.ν0 y.ν0.
We observe now that all the maps i coincide in the restriction to r., i.e. for every i ω,
  1. (d) x.ν = x.νi = x.ν0 for every bounded x.
Next we show that for every objects x, y from O, and every i, j < ω the following are satisfied:
  1. (e) x y iff x.νi y.νi,
  2. (f) x y iff x.νi y.νi,
  3. (g) x.νi x.νi+1   (equivalently, i j iff x.νi x.νj).
The (e) equivalence is shown similarly as (b). For x y and i > 0 we have x.ν0 = x.νi = x.νi-1 x.νi-1.ec y.νi. The opposite implication, x yx.νi y.νi, follows by induction over i. Let x.νi y.νi and i > 0. By definition of y.νi, there exists an object b such that b ϵ y and x.ν0 = x.νi = x.νi-1 b.νi-1.ec. Consequently,
  • x.νi-1 b.νi-1   (by definition of .ec),
  • x. b.   (by induction assumption for x and b),
  • x b   (by -A-consistency),
  • x y   (since x b ϵ y and x is bounded).
In (f), the implication x yx.νi y.νi, follows from the definition of i using (ϵ) () = (ϵ). The opposite implication is proved by
  • x.νi y.νix.νi r.0 y.νi r.0x. y.x y.
The (g) inclusion is proved by induction over i. The case i = 0 follows by definition of 0 and 1 (using the fact that is a restriction of ϵ). For i > 0 we apply the induction assumption:
  • x.νi+1 = { a.νi.ec | a ϵ x } { a.νi-1.ec | a ϵ x } = x.νi.
It is easily seen that (e) and (f) also hold for i =, therefore (A) is satisfied: i is an isomorphism between (O, , ) and (Oi, , ) for every i ω.
(B) We show that for every object x and every natural i,
  • (h) x.ν Vi x.νi,
  • (i) x.ec.νi+1 = x.νi.ec.
The (h) inclusion is proved by induction over i. If u is from x.ν U then u = a.ν = a.ν0 for some terminal a such that a x. Therefore a.ν x.ν0. This solves the case i = 0. For i > 0 we show that
  • x.νj+1 Vi x.νi for every j ≥ 0:
x.νj+1 Vi = { a.νj.ec | a ϵ x } Vi
= { a.νj.ec Vi | a ϵ x }   (by infinite distributivity of set inclusion)
= { (a.νj Vi-1) r | a ϵ x }   (by definition of .ec)
{ a.νi-1.ec | a ϵ x }   (by the induction assumption)
= x.νi.
The (i) equality is shown by
x.ec.νi+1 = { a.νi.ec | a ϵ x.ec }
= { a.νi.ec | a x }
= x.νi.ec   (since a x implies a.νi x.νi and thus a.νi.ec x.νi.ec).
As a consequence, we obtain the commutativity of and .ec:
  • x.ec.ν = { x.ec.νi | i < ω } = { x.νi.ec | i < ω } = x.ν.ec.   (The last equality uses (h).)
To complete (B), it remains to show that O.pr.ν V.pr, i.e. that preserves primary objects. Equivalently, if x is a class then x.ν V.ec. Suppose the contrary, i.e. x is a class such that x.ν is an eigenclass in V. Due to -B-consistency, there are a, b from x. such that a. b. x.϶ is empty. We have
  • a.ν b.ν x.ν   (since x.ν is up-directed w.r.t. ),
  • a.ν b.ν c.ν for some c ϵ x   (by definition of x.ν),
  • a c and b c   (by the (O, )(O.ν, ) correspondence).
Therefore, c belongs to a. b. x.϶, a contradiction.
(C) We show that for every object x and every natural i,
  • if x ϵ x then
    • (j) x.νi.ec x.νi+1,
    • (k) i(x.ν0) Vω x.νi.
The (j) inclusion follows directly from the definition of x.νi+1. The (k) inclusion is shown by induction on i. If i = 0 then equality holds because 0 is identity. For i > 0 we have
i+1(x.ν0) Vω = (i(x.ν0) (i(x.ν0)) Vω
x.νi x.νi.ec   (by the induction assumption)
x.νi x.νi+1   (by (j))
= x.νi+1   (by (g)).
As a consequence, we obtain ω(x.ν0) Vω x.ν for every object x such that x ϵ x. For x = r we have U x.ν, so that
  • Vω = ω(U) ω(r.ν) Vω r Vω,
which shows that r= Vω.  

 

References
C. C. Chang, H. Jerome Keisler, Model Theory, Studies in Logic and the Foundations of Mathematics (3rd ed.), Elsevier, 1990,
B.A. Davey, H.A. Priestley, Introduction to lattices and order, Cambridge University Press 2002
Ondřej Pavlata, Object Membership: The core structure of object-oriented programming, 2012, http://www.atalon.cz/om/object-membership/
Ondřej Pavlata, The Ruby Object Model: Data Structure in Detail, 2012, http://www.atalon.cz/rb-om/ruby-object-model
Document history
January222013 The initial release.
License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License.