1. notice
  2. 中文
  3. 1. feature
  4. 逻辑
  5. 2. 逻辑
  6. 3. 集合论
  7. 4. 映射
  8. 5. 序
  9. 6. 组合
  10. 微积分
  11. 7. 实数
  12. 8. 数列极限
  13. 9. ℝ^n
  14. 10. Euclidean 空间
  15. 11. Minkowski 空间
  16. 12. 多项式
  17. 13. 解析 (Euclidean)
  18. 14. 解析 (Minkowski)
  19. 15. 解析 struct 的操作
  20. 16. 常微分方程
  21. 17. 体积
  22. 18. 积分
  23. 19. 散度
  24. 20. 网极限
  25. 21. 紧致
  26. 22. 连通
  27. 23. 拓扑 struct 的操作
  28. 24. 指数函数
  29. 25. 角度
  30. 几何
  31. 26. 流形
  32. 27. 度规
  33. 28. 度规的联络
  34. 29. Levi-Civita 导数
  35. 30. 度规的曲率
  36. 31. Einstein 度规
  37. 32. 常截面曲率
  38. 33. simple-symmetric-space
  39. 34. 主丛
  40. 35. 群作用
  41. 36. 球极投影
  42. 37. Hopf 丛
  43. 场论
  44. 38. 非相对论点粒子
  45. 39. 相对论点粒子
  46. 40. 纯量场
  47. 41. 纯量场的守恒流
  48. 42. 非相对论纯量场
  49. 43. 光锥射影
  50. 44. 时空动量的自旋表示
  51. 45. Lorentz 群
  52. 46. 旋量场
  53. 47. 旋量场的守恒流
  54. 48. 电磁场
  55. 49. 张量场的 Laplacian
  56. 50. Einstein 度规
  57. 51. 相互作用
  58. 52. 谐振子量子化
  59. 53. 旋量场杂项
  60. 54. 参考
  61. English
  62. 55. notice
  63. 56. feature
  64. logic-topic
  65. 57. logic
  66. 58. set-theory
  67. 59. map
  68. 60. order
  69. 61. combinatorics
  70. calculus
  71. 62. real-numbers
  72. 63. limit-sequence
  73. 64. ℝ^n
  74. 65. Euclidean-space
  75. 66. Minkowski-space
  76. 67. polynomial
  77. 68. analytic-Euclidean
  78. 69. analytic-Minkowski
  79. 70. analytic-struct-operation
  80. 71. ordinary-differential-equation
  81. 72. volume
  82. 73. integral
  83. 74. divergence
  84. 75. limit-net
  85. 76. compact
  86. 77. connected
  87. 78. topology-struct-operation
  88. 79. exponential
  89. 80. angle
  90. geometry
  91. 81. manifold
  92. 82. metric
  93. 83. metric-connection
  94. 84. geodesic-derivative
  95. 85. curvature-of-metric
  96. 86. Einstein-metric
  97. 87. constant-sectional-curvature
  98. 88. simple-symmetric-space
  99. 89. principal-bundle
  100. 90. group-action
  101. 91. stereographic-projection
  102. 92. Hopf-bundle
  103. field-theory
  104. 93. point-particle-non-relativity
  105. 94. point-particle-relativity
  106. 95. scalar-field
  107. 96. scalar-field-current
  108. 97. scalar-field-non-relativity
  109. 98. projective-lightcone
  110. 99. spacetime-momentum-spinor-representation
  111. 100. Lorentz-group
  112. 101. spinor-field
  113. 102. spinor-field-current
  114. 103. electromagnetic-field
  115. 104. Laplacian-of-tensor-field
  116. 105. Einstein-metric
  117. 106. interaction
  118. 107. harmonic-oscillator-quantization
  119. 108. spinor-field-misc
  120. 109. reference

note-math

For people, one way to understand natural numbers is counting

For computers (cf. logic.typ), the ways to represent natural numbers are

  • Periodic circuit
  • Arithmetic component
  • Binary
  • Function that call itself

However, the number of elements in the set of natural numbers is infinite, while bits and computer memory are finite. Human memory is also finite

The problem of infinite space: Reality cannot build circuits and memory with infinite space. Even if it could, it would be limited by the finite speed of electricity.

But potentially infinite time can be used to achieve "potential infinity"

Assuming that the upper limit of memory is infinite but the memory occupied in each cycle is limited, the program has infinite possible inputs, which is also a potential infinite

However, there are even sets with an uncountable number of elements. Example

  • the set of all subset of ,
  • all function from to itself,

Verifying the correctness of set theory language requires a parser, memory data structures, and functions. The implementation of the generated computer instruction stream is not the focus of this goal.

Motivation for sets/types

  • Modularization and multiplicative decomposition to simplify cognition

    Example Natural language's Subject-Verb-Object SVO (subject, predicate, object). Suppose there are 10 nouns and 10 verbs. Suppose we "forget the SVO rule", then verifying the grammatical correctness of a three-word sentence requires at most times. If we understand and use the SVO rule, it requires at most times.

  • If the number of elements in a set is infinite, then the set/type limits the concept, making it possible to say it in a finite amount of time

Complex set theory objects, propositions are stored in variable names, so humans still need to check all the complex definitions stored in variable names, so readability is very important

Parser or proof assistants can allow humans to reduce from reviewing all steps to reviewing definitions (and check all the code logic of compiler), skipping a large number of detailed proof steps, and then determine the correctness of the proof result. This is like the case of APIs

The human brain compiler can omit and supplement omissions, trading temporary efficiency for error-proneness and forgetfulness

Assistance also has other functions, like the case of, Programming before the era of IDE/LSP/friendly-and-interactive-compiler-error-messages/documentation was painful. The organization, structuring and reuse of data and information were not done well, and the powerful capacity and time of memory of computer were not used well.

Example of proof assistant: acornprover, in development. Not yet implement set theory … My attitude is that even if there may not be a good underlying implementation for the time being, we can turn to looking for easy-to-use syntax and convenient additional tools (e.g. LSP).

[proposition] proposition is a special (string, bool) product struct computer data structure. For mathematical language, the string field uses special construction rules to restrict it, and this restricted version of the string is called a formula

Because we cannot directly judge the truth or falsehood of a guess, we need a language with undefined truth values.

from proposition to unknown proposition, its truth value part is modified to (bool, unknow) sum struct

Abbreviation true proposition and proposition are often used interchangeably

Many propositions cannot be automatically derived by computers, and humans need to find possible paths, input them into the computer for verification, or develop more new automated proof methods.

We will assume some initial propositions that do not need to be proven. And assume rules for constructing new propositions using existing propositions.

Abbreviation Use the same symbol for formula and proposition, " is true/false/unknow",

[formula]

  • in

let symbol be type of math object, then is a formula

is similar to value : type or variable_name : type in programming language

symbol is not math object

  • equal
let be object, then is a formula
  • and, or, not

let be formula, then

is formula

  • forall, exists

let be formula built with i.e. read in memory, used by some specific function call, then

is formula

  • inference , equivalent is formula

The following discusses math-object-construct-rule alias set-theory

[natural-number]

natrual number and natrual number set is object. is true proposition

But computers cannot handle infinity. In order to allow computers to use limited characters and memory to represent natural numbers, let and functions be finite symbols in the memory address, and define the following as true proposition

Equivalent to telling the computer how to continuously with instruction streams? Also related to induction

The cost of finite characters is potentially infinite time, always relying on counting or periodic circuits.

[empty]

empty is object. let be a object, is false proposition

The definition of is convenient for intersections e.g. the intersection is empty, and the number of elements of of a finite set , is more convenient than

Define language expansion

Because “define language expansion” is very long, it is usually abbreviated to "definition" "def"

In fact, the symbol is also commonly used to represent defining language expansion or specifying language transformation. Specifically, the of natural numbers can be directly defined as comparing the value of memory with computer circuits.

[declare-element-of-set]

If is non empty (this information comes from the definition of ), we can define symbol and construct true proposition (let)

A finite number of declare statements can be constructed

[enum] enumerate

is object then is a set

Represented as a sequence of numbers in memory

The entire set can be called in this way: record the address of the first element + the length of the array as the number of circuit cycles, and read one element per circuit cycle

formulas are true propositions

Specifically, a single-element set

define

[equivalent]

Some equivalent uses. For finite computer data, the following calculation results can be exhaustively proven to be equal

Similarly, in order to represent the case of "infinite elements", define language expansion or specify language transformation. For example, De Morgan law of infinite elements

The concept of "infinity" is limited by using the symbol string of declare-element-of-set

formula, proposition is a special data structure in memory. It can be considered that math_object, formula, proposition are the type of programming language

Many propositions are equivalent, so we can consider the "quotient" type of propositions, but the possibility of equivalence is infinite, whether it is possible to have an exhaustive algorithm, first depends on whether it is countable …

Similar to the redundancy of , set theory construction rules may also have redundancy, or there are many equivalent definitions

Specify (finite)

transitive :=

transitive :=

follow various rules of bool in the finite case, define language transformation rules: let is formula built with independent/parallel i.e. independent/parallel in memory read and used by specific cuntion, then

[commutative-forall-exists]

same for

[distributive-forall-exists]

Note that I myself also feel that I cannot completely clearly handle the concepts of derivation and proof below

Natural language example of derivation

If it rains, I won't go out
It's raining
So I won't go out

This example is similar to a conditional branch


        
let rain : bool;

        
let out : bool;

        
match (rain) {

        
  true => out = false,

        
  false => out = undefined,

        
};

        
let rain : bool;

        
let out : bool;

        
match (rain) {

        
  true => out = false,

        
  false => out = undefined,

        
};

[inference] For mathematical language, that is

  • The compiler reads the formula
  • The compiler reads the formula is true proposition (may be custom)
  • The compiler reads the formula is true proposition
  • Then the language rule setting is that the compiler, according to this condition (from memory), assigns the bool value of the formula to true i.e. sets is true proposition

[proof] The proof is that compiling passes is true proposition

Another kind of equivalence

[reverse-inference] Reverse inference. If the result is that I went out, then it is definitely not the result of rain. If the result of the conditional branch is out = true, this is not the result of rain = true. Since the bool value of an ideal binary computer must be one of two, it can only be the result of rain = false. This can be written as a conditional branch


        
match (out) {

        
  true => rain = false,

        
  false => rain = undefined,

        
};

        
match (out) {

        
  true => rain = false,

        
  false => rain = undefined,

        
};

Mathematically, reverse inference is written as formula , and defined equivalent to

[reverse-proof] Proof by contradiction is that compiling passes is true proposition

Deductive proof also requires syllogism

  1. All living things die
  2. Humans are living things
  3. Therefore, all humans will die

Where "all living things die" is a specially constructed proposition

[syllogism] Syllogistic reasoning is a language rule

  • The compiler reads the formula is true proposition (possibly from a definition e.g. union))
  • The compiler reads the declaration let is true proposition
  • The compiler reads the formula
  • Then the compiler sets is true proposition according to this condition (from memory)

That is, the compiler implements the specific construction of data (finite) according to the declaration (possibly "infinite")

Or understand it as, this rule and behavior are defining the concept of itself

It is also usually written as the equivalent rule let , then the special inference formula is always true proposition. This form is often used in what previously said, "proving is compiling passes is true proposition"

Reverse syllogism: let , then the equivalent formula is true proposition

We may never know whether a proposition of bool unknow can be constructively proved, i.e. compiled successfully in a limited number of steps

Where does the target proposition come from? It may be related to a model of the real world

The proof requires expanding a large number of sentences, although computers are very fast at processing strings. In any case, performance optimization? Use only when needed (lazy load)? Parallel (parallel) when two propositions are not interdependent? Assume already proven results (incremental compilation)?

A proposition has many proofs with different runtime data flow, which can be considered to belong to the same quotient proof of this proposition

The following object construction rules, except for the intersection, generally give non-empty sets

let be set of sets

[union]

define object and language expansion

is non-emtpy unless

We do not define the union for . Same below. The reason is that let is always a false proposition, which makes many things unusable

enum is special case of sum/union?

[intersection]

[map] alias [function] [constant-dependent-product]

let is math object. The rule for defining map space , map as math object is

where two symbol combine to a new symbol

or

denoted by

denoted by . in finite case, number of elements

Although the usage of seems problematic, they can still be defined in terms of symbol & symbol strings

If we talk about what map specifically represents, due to non-concrete constructibility, there is no specific return like in general programming languages, or the return is a newly defined symbol, math object, language expansion.

Prop

[subset]

denoted by . According to proposition-function equivalent to map space . in finite case, number of elements

Set without any element is subset of every set, add this rule to the definition of subset. define be true proposition.

map space and subset introduce high-level infinity

One seemingly counterintuitive thing at first glance is that we seemingly know all or all , but cannot count them cardinal-increase uncountable. However, what exactly does "know all " mean? In fact, trying to consider the question of "finding an subset of with infinite elements in a general way" reveals that this is not simple.

Similarly, although countable can already define some real numbers e.g. , if not with the help of subset or map, countable construction cannot obtain all

[proposition-function]

let , is already constructed

is object

[product]

let be set of sets, let

or

is non-emtpy unless (related to [axiom-of-choice] )

Abbreviation . in finite case, number of elements

[pair] alias [constant-dependent-sum]

consant-dependent-product . consant-dependent-sum is

[sum]

let be set of sets, let

is non-emtpy unless

in finite case, number of element

[coordinate-component]

  • product component

    or

  • sum component

define

Other uses of

  1. Alias for identifier in memory
  2. Function return value in memory. So should be understood as the return value of the add function is .

[compare-math-lang-with-programming-lang]

What's the difference between ∈ in mathematical language and : in programming language?

Mathematical language and programming languages are very similar, both require a compiler to check a series of language rules.

Some differences:

  • General practical programming languages already use recursion, but mathematical language treats the recursive instruction itself as a type. Or calls the recursive instruction, as, the recursive definition of natural numbers, or, an instruction to generate natural numbers. This allows us to discuss general natural numbers without generating specific natural numbers (generated by periodic circuits of computers or human brains).

  • General practical programming languages (without natural number sets and dependent types) only use finite and and or to generate new types, such as struct, enum. This relies on the computer's ability to represent a specific number of natural numbers. On the other hand, mathematical language has infinite versions of and and or to generate new types (or sets), such as forall, exists, which are not represented like finite and or or. And "infinite" can even go beyond countable natural numbers.

At the bottom, mathematical language or programming language both can be represented by periodic circuits, memory bits, and logic gates.

Mathematical language starts with natural numbers (& propositional calculus & set theory rules). For example, real numbers are defined based on natural numbers. However, it still needs the concept of "variables", such as a in let a ∈ A.

General practical programming languages start with built-in types. From a conceptual, cognitive, and application perspective, it is best to regard them as primitive concepts or structures of bits in computer memory, rather than constructing them using mathematical natural numbers.

[hierarchy-order-of-set]

The set constructed above is called a zero (hierarchy) order set

or

then let be math object, in first order set

Using object construction rules again, what we get is also defined as belonging to

Anyway, we can always construct such a language with types and bool and various rules in the compiler

let be math object, . And so on …

Example


  • Can be divided into multiple sentences, so that it is convenient to add/remove properties to get different structs

looks like the set of natural numbers , so should we assume a new hierarchy again? Then for , continue to use the object construct rule … Although it is indeed possible to abstractly define and subsequent things, of specific natural numbers is needed, and also requires an infinite set hierarchy, a potentially infinite input, in the sense of recursive descent (perhaps the definition of should be part of the input), but the language rules of recursive descent are finite

language is potentially infinite, and so is hierarchy-order-of-set language. Of course most of programming language is potentially infinite

Normally we do not need explicit hierarchy of set. For example, we just need to construct the concrete type like , but not need to mention that the type is a element in type

Is it possible that there exists many non linear order or total order things outside this hierarchy?

There seem to be two types of math objects

  1. Math objects already constructed in a finite number of steps. It represents type constructed by some rules

  2. Math object types directly assumed, or abstract type, with type and its variables in memory acting as placeholders. In programming it's called generics. It represent the type relation between abstract symbols. Sometimes instantiation or monomorphization of generics is required to pass compilation.

The use of homomorphisms between types can facilitate proofs. Sometimes, it can allow calculations to deduce a general case proof from a special case proof; if the special case proof does not use properties specific to the special case, then it is actually a hidden proof of the general case.

[universal-type]

The universal-type problem, or the type of every type problem

One thing that's often overlooked here is what the "type" in "type of every type" refers to? What does "type" mean? A binary bool function or a binary predicate logic proposition?

From a constructive perspective, language rules are needed to define a "type". However, to define "type of every type", require knowing all the language rules for constructing "types". Even if we know about logic gates, periodic circuits, and memory, we don't truly know all the language rules or programs unless we actually write them …

Even without considering the "type of every type", self-reference can still arise. In the recursive descent construction rules of mathematical languages, the math_object type does not participate in the construction rules. If a type T self-referentially participates in the construction rules, then the language or program is non-terminal. For example, T : T , even though the memory used in each cycle is limited, the program cannot be completed runing in finite time. Note that, general programming languages also can have infinite loops in program (by different reason)

Suppose a program defines a The concept of universal-type, and universal-type can be used to construct "type", then universal-type self-referentially participates in the construction rules of "type", resulting in a non-terminal language or program

Example [Russell-paradox]

Defined using set theory rules

Then let the compiler calculate the boolean value of the proposition . Since = true, the compiler only calculates the boolean value of , and then finds the not function, so it calculates the boolean value inside not, but this goes back to calculating the boolean value of , and the compiler may choose to enter a circuit dead loop.

For finite sets, , or it is impossible to judge , e.g. , because , or the proposition is not defined as a true proposition.

If we consider the set hierarchy, for it is very likely that and thus because the first condition does not satisfy

Example [self-referential-paradox] "This sentence is false"


            
this_sentence_is_false : bool = false;

            
loop:

            
  match (this_sentence_is_false) {

            
    false => this_sentence_is_false = true,

            
    true => this_sentence_is_false = false,

            
  }

            
  goto loop

            
};

            
this_sentence_is_false : bool = false;

            
loop:

            
  match (this_sentence_is_false) {

            
    false => this_sentence_is_false = true,

            
    true => this_sentence_is_false = false,

            
  }

            
  goto loop

            
};

Or use layering to bypass the self-referential paradox (this_sentence = false) = true. It is considered that they are different sentences and judgments, and that it cannot refer to itself.

[dependent-distributive]

let be set of sets, let , and let be set of sets, index by its elements

union & intersection

sum & product

draft of proof: expand, use parallel distributive cf. distributive-forall-exists

[set-minus]

. if then define

[symmetric-set-minus]