# Classes are syntax sugar for formulas ðŸ”—

Author: Wisp

In classical set theory, we make a distinction between classes and sets. Every set is a class, but some classes are not sets. The classes which are not also sets are called "proper classes". Proper classes are similar to sets, but they are always very big.

Classes are defined using class-builder notation: `{ x | some formula }`

.

For example, `{ x | 0 < x and x < 10 }`

is the class of all natural numbers between 0 and 10 (assuming < is defined only on natural numbers). In this case, the class is also a set. On the other hand, the class `{ x | x = x }`

is a proper class, and contains everything.

So what exactly is a class? In ZFC, classes are syntax sugar on sets. There are three parts to this syntax sugar.

## Membership in a Class ðŸ”—

The statement `x âˆˆ { y | some formula }`

can be reduced by replacing every occurence of `y`

in `some formula`

with `x`

. For example, `x âˆˆ { y | y < 10 }`

can be replaced by `x < 10`

.

This replacement will always produce a formula which is true iff the original formula was true. In this way, we can eliminate membership in a class from the language.

## Class Equality ðŸ”—

Given two classes `{ x | some formula }`

and `{ y | some formula }`

, we say that they are equal iff they have the same members. So given the statement `{ x | x < 10 } = { y | y <= 9 }`

, we can transform it like into this:

âˆ€z ( z âˆˆ { x | x < 10 } <-> z âˆˆ { y | y <= 9 } )

Which can then be reduced further, eliminating all classes from the statement:

âˆ€z ( z < 10 <-> z <= 9 )

## Class Membership ðŸ”—

Given the formula `{ x | x < 10 } âˆˆ { y | y âŠ† â„• }`

, we can reduce it by transforming the left-hand side into a set. We do so this way:

âˆƒz ( z = { x | x < 10 } and z âˆˆ { y | y âŠ† â„• } )

Which can then be reduced farther:

âˆƒz ( âˆ€w ( w âˆˆ z <-> w < 10 ) and z âˆˆ { y | y âŠ† â„• } )

âˆƒz ( âˆ€w ( w âˆˆ z <-> w < 10 ) and z âŠ† â„• )

And then we are done, all classes have been eliminated.

## Related Links ðŸ”—

The Theory of Classes (Metamath)

Class abstraction definition in Metamath

Class membership definition in Metamath

Class equality definition in Metamath

Home Page

Date: 2022-10-21

Tags: post | classical_logic | classes | set_theory