1 - GiacomoZheng/gm GitHub Wiki

点击前往中文部分

class

Class is a abstract concept. Anything you can point out around you is not a class, but almost every noun you say is a class, like "chair", "desk", but not "this chair", "this desk".

sample

(REMARK: I have tried using the word "instance" instead of "sample", but I changed it back here. It is because that I think the word "instance" may confuse the readers. The most important thing is that a sample is not generated from a class but it exist independently.)

Sample is a specific concept. Everything around you can point is a sample, and you can generate a sample from any class, like "a chair", "a desk".

relation between two types --- "in"

Classes are collections of criterions in fact, which are named "axiom" here. The samples who satisfy these axioms are said "in this class", or "samples of this class". Intuitively, we may write a "class" of classes, but it is banned.

In addition, everything in the world is either a class or a sample but not both.

If A is a sample of B, then I write it as A ∈ B in gm.

relation between two classes --- "subclass"

If a class has all the axioms another class has, it is called the "superclass" of the latter. In other word, the latter is "subclass" of the former.

In addition, a class is always the subclass of itself, you can refer to the subset relation of two set.

If A is a subclass of B, then I write it as A ⊆ B in gm.

And if meanwhile the B is a subclass of A, we say these two class are equal, and it is written as A = B in gm.

universal class

This is the class without any axiom.

I use to represent "the universal class" in gm.

(This symbol from one of my old friend, @SkyrimWing)

All the classes are the subclass of , and all the samples are the sample of .

empty class

This is the class without any sample.

It can be created with two axioms with contradiction.

I don’t use any symbol to represent it up to now.

Remark

  • The "universal sample" does not exist, as the existence of empty class.
  • After you completed this passage, you can call the "sample" "instance".

Page Up | Home | Page Down


(全称:类别)

类是一个抽象的概念。你能指出的周围的任何事物都不是类,但几乎你说的每一个名词都是一个类,比如“椅子”、“桌子”,而不是“这把椅子”、“这张桌子”。

实例

(简称:例)

实例是一个特定的概念。你能指向的所有东西都是一个实例,您可以从任何类生成一个实例,比如“一把椅子”、“一张桌子”。

类与例的关系

类实际上是一些要求的集合,在这里被称为“axiom”。满足这些公理的实例称为“在这个类中”或“这个类的实例”。直觉上,我们可以写一个类的“类”,但我并不允许。

特别地,世界上的任何事物都是一个类或一个实例,但不可能是兼是。

如果AB的一个实例,那么在gm中写作A ∈ B

类与类的关系

如果一个类拥有另一个类拥有的所有公理,它就被称为后者的“母类”(或“超类”)。换句话说,后者是前者的“子类”。

同时,一个类总是它自己的子类,你可以参照两个“集合”的“子集”关系。

如果 AB 的子类,那么我就在 gm 中写作 A ⊆ B。如果 BA 的子类 ,我们说这两个类是相等的,在 gm 中它被写作 A = B

全类

全类是没有任何条件的类。

我用 表示 gm 中的全类。

(这个符号来自我的一个老朋友,@SkyrimWing

所有的类都是 的子类,所有的实例都是 的实例。

空类

空类是没有任何实例的类。

它可以通过包含两个相互矛盾的公理得到。

我暂时还没有使用任何符号来表示它。

注意

  • 实例不是从类中生成的,而是自己独立存在的。
  • 因为空类存在,所以“全例”不存在。

上页 | 首页 | 下页

返回顶部

⚠️ **GitHub.com Fallback** ⚠️