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. English
  61. 54. notice
  62. 55. feature
  63. logic-topic
  64. 56. logic
  65. 57. set-theory
  66. 58. map
  67. 59. order
  68. 60. combinatorics
  69. calculus
  70. 61. real-numbers
  71. 62. limit-sequence
  72. 63. โ„^n
  73. 64. Euclidean-space
  74. 65. Minkowski-space
  75. 66. polynomial
  76. 67. analytic-Euclidean
  77. 68. analytic-Minkowski
  78. 69. analytic-struct-operation
  79. 70. ordinary-differential-equation
  80. 71. volume
  81. 72. integral
  82. 73. divergence
  83. 74. limit-net
  84. 75. compact
  85. 76. connected
  86. 77. topology-struct-operation
  87. 78. exponential
  88. 79. angle
  89. geometry
  90. 80. manifold
  91. 81. metric
  92. 82. metric-connection
  93. 83. geodesic-derivative
  94. 84. curvature-of-metric
  95. 85. Einstein-metric
  96. 86. constant-sectional-curvature
  97. 87. simple-symmetric-space
  98. 88. principal-bundle
  99. 89. group-action
  100. 90. stereographic-projection
  101. 91. Hopf-bundle
  102. field-theory
  103. 92. point-particle-non-relativity
  104. 93. point-particle-relativity
  105. 94. scalar-field
  106. 95. scalar-field-current
  107. 96. scalar-field-non-relativity
  108. 97. projective-lightcone
  109. 98. spacetime-momentum-spinor-representation
  110. 99. Lorentz-group
  111. 100. spinor-field
  112. 101. spinor-field-current
  113. 102. electromagnetic-field
  114. 103. Laplacian-of-tensor-field
  115. 104. Einstein-metric
  116. 105. interaction
  117. 106. harmonic-oscillator-quantization
  118. 107. reference

note-math

Propositional Logic

Examples of Natural Language

Proposition Boolean Value (bool)
Humans are organisms True, true, 1
Iron is an organism False, false, 0

Digital circuits represent bool

Circuit Value bool
High Level 1
Low Level 0

I won't deal with the hardware implementation of digital circuits here. I don't know the details either.

logic-operator_(tag) logical and, or, not

  • And, โˆง, and, logical conjunction
  • Or, โˆจ, or, logical disjunction
  • Not, ยฌ, not, logical negation

Examples of Natural Language

Proposition Boolean Value
Humans are organisms and 1 is a natural number 1
Humans are organisms and 1 = 2 0

Formal Language

๐‘ ๐‘ž ๐‘โˆง๐‘ž
1 1 1
1 0 0
0 1 0
0 0 0
๐‘ ๐‘ž ๐‘โˆจ๐‘ž
1 1 1
1 0 1
0 1 1
0 0 0
๐‘ ยฌ๐‘
1 0
0 1

Representation of โˆง,โˆจ,ยฌ in digital circuits and logic gates

Are gates designed to prevent reverse current?

The not gate converts a low level to a high level, indicating that the hardware implementation of the gate requires external energy and needs to be powered on

"Redundancy" e.g. we can use ยฌ,โˆง to represent โˆจ

Circuit gate implementations start with not,nand or ยฌ,(ยฌโˆง). But I think maintaining the symmetry of โˆง,โˆจ is useful, cognitively or in terms of negative duals.

computability_(tag) Computability of Circuits

Logic gates can be used to create any {0,1}๐‘›โ†’{0,1}๐‘š function

(image from p.85 of ref-1)

  • Construction of {0,1}๐‘› input

๐‘› circuits ๐ด0,โ€ฆ,๐ด๐‘›โˆ’1 require at most 2๐‘› and gates ๐‘Œ0,โ€ฆ,๐‘Œ2๐‘›โˆ’1. Some functions only need a portion of the 2๐‘› inputs, in which case some lines are not connected.

๐‘›โ‡2๐‘› represents the "multiplication" property of {0,1} value parallel circuits

  • Construction of {0,1}1 output

In the input, connect the wires that you want to output to 1 to the or gate

Example not xor

Exclusive or, โŠ•, xor

๐‘ ๐‘ž ๐‘โŠ•๐‘ž
1 1 0
1 0 1
0 1 1
0 0 0
  • Construction of {0,1}๐‘š output. Just connect the required wires to ๐‘š or games

If the function does not require complete {0,1}๐‘›โ†’{0,1}๐‘š, the circuit calculation components do not necessarily have to be constructed in this fixed way. It can be further simplified and the use of gates can be reduced depending on the situation. But I won't go into details here

A symbolic representation of multiple input or output lines in a computing unit

control-circuit_(tag) Control circuit, selector or multiplexer (multiplexer)

๐‘†=0 outputs ๐ท0 to ๐‘Œ, ๐‘†=1 outputs ๐ท1 to ๐‘Œ

2๐‘› inputs ๐ท0,โ€ฆ,๐ท2๐‘›โˆ’1 require ๐‘› control circuits ๐‘†0,โ€ฆ,๐‘†๐‘›โˆ’1

De-Morgan-law_(tag) negative dual law or De Morgan's law

ยฌ(ยฌ๐ด)=๐ดยฌ(๐ดโˆง๐ต)=(ยฌ๐ด)โˆจ(ยฌ๐ต)ยฌ(๐ดโˆจ๐ต)=(ยฌ๐ด)โˆง(ยฌ๐ต)

Proven by exhaustion, just like how humans count numbers is actually also exhaustion. Same below

boolean-algebra_(tag)

bool algebra is denoted as {0,1},+,โ‹… or {0,1},โˆจ,โˆง

bool-distributive-law_(tag) distributive law

(๐ด+๐ต)โ‹…๐ถ=๐ดโ‹…๐ถ+๐ตโ‹…๐ถย orย (๐ดโˆจ๐ต)โˆง๐ถ=(๐ดโˆง๐ถ)โˆจ(๐ตโˆง๐ถ)

Its negative dual

(๐ดโ‹…๐ต)+๐ถ=๐ดโ‹…๐ถ+๐ตโ‹…๐ถย orย (๐ดโˆง๐ต)โˆจ๐ถ=(๐ดโˆจ๐ถ)โˆง(๐ตโˆจ๐ถ)

Inductively

โ‹€๐‘–=1..๐‘›โ‹๐‘—=1..๐‘š๐ด๐‘–๐‘—=โ‹๐‘–=1..๐‘›โ‹€๐‘—=1..๐‘š๐ด๐‘–๐‘—

and e.g. โ‹€๐‘–โ‹๐‘—โ‹€๐‘˜๐ด๐‘–๐‘—๐‘˜=โ‹ฏ

bool-commutative-law_(tag) Commutative law ๐ด+๐ต=๐ต+๐ด. same for โ‹…

bool-associative-law_(tag) Associative law (๐ด+๐ต)+๐ถ=๐ด+(๐ต+๐ถ). same for โ‹…

periodic-circuit_(tag) Periodic circuit

Implemented by crystal oscillator

memory-circuit_(tag) Circuit memory

Black box model

Possible implementation

  • Use a ring circuit to reuse the 1/0 value of ๐‘Ž,๐‘Žยฏ from the previous cycle
  • Inverter (not gate) ensures current direction and prevents 1 from decaying (through external energy)
  • In order to write 0 to an existing 1, you need to write 1 to writeยฏ to get ๐‘Žยฏ=1, and then invert it to ๐‘Ž=0
  • Need a higher write voltage than the voltage in the loop to overwrite the previously existing 1? e.g. use a higher voltage writeย ยฏ=1 to overwrite the existing ๐‘Ž=1

finite-machine_(tag) Finite State Machine

i/o_(tag) The input of a circuit may come from the outside world (e.g. sensors, keyboards), and the output of the circuit may also reach the outside world (e.g. signal lights, screens)

The rhythm of external input is usually inconsistent with the rhythm of the computer's internal periodic circuit, so the external input needs to pass through synchronization components first

memory-array_(tag) Memory array

Binary, order, natural number. Example 23 is the number of steps from 000, 001, 010 to 111, although this assumes that we can recognize three bits. 2๐‘›=2โ‹ฏ2โŸ๐‘›-fold, 101=1โ‹…22+0โ‹…21+1โ‹…20=4+1=5

The range of natural numbers contained in multiple bits, for example, 3 bits of 0,1,โ€ฆ,7 as parameters, to correspond to the real world content. Example Computer's character representation e.g. ASCII, Unicode, the position and color of the light-emitting points on the screen

(image modified from wiki media about ASCII)

In practical applications, multiple bits per address are better than 1 bit per address, or a two-dimensional memory array is more efficient than one-dimensional

instruction_(tag) Instruction

Usually represented by multi-bit data written in an address in memory to indicate certain circuit tasks

Some common circuit tasks

  • Addition of natural numbers
  • Determine whether the bit data meets the required conditions
  • Jump to the execution of other instructions

Assume an instruction is completed in one circuit cycle (single-cycle computer)

Example add instruction. add x_1 x_2. The bit data of the instruction is divided into three regions, representing different types of information

  1. Read the add instruction

    • add instruction at adress_0 (add x_1 x_2 and adress_1, adress 2 are from the source code and compiler generation)
    • The value adress_0 stored in the fixed memory address adress_of_instruction is read, the data in the index area of the add instruction is sent to the control signal element (control unit), then the control signal is calculated and output (too many details, see ref-1)
  2. Execute the add instruction

    • The output control signal is input to the control circuit element of the memory, reading x_1 in adress_1 and x_2 in adress_2 from the memory, and inputting them to the arithmetic element (ALU)
    • According to the output control signal, the output of the arithmetic element x_1 + x_2 is written to adress_1
  3. Enter and read the instruction of the next cycle

    • The value adress_0 stored in adress_of_instruction is sent to the arithmetic element by a well-designed circuit, calculating adress_0 + 1 i.e. the next instruction address, which is written into the data in adress_of_instruction. adress_0 + 1 will be executed in the next circuit cycle

Other instructions may have more than two data areas (non-instruction index area)

Instruction stream

Example loop_(tag) Loop

The speed of a periodic circuit is far greater than human speed (1 GHz = 10^9 cycles per second)

Loops in high-level programming languages

i : int = 0;
while (i < 10) {
i = i + 1;
} // result = 10
  1. Reading instructions

    The bgt (branch_grater_than) instruction is stored in adress_0. (Instructions are generated from source code and compilers.) 10 is in one data area of bgt, while the number of instruction streams 3 required for the while loop is in another data area of bgt.

  2. Executing instructions

    Executing the conditional judgment ๐‘–<10

    Read i and 10, compare their sizes in the arithmetic element, give a control signal based on the result, combined with the control signal given by the bgt index area

    Perform different tasks based on the result of the conditional judgment

    • When ๐‘–<10

    The arithmetic element outputs a control signal based on this judgment, changing the value stored in adress_of_instruction to the address of the next instruction adress_0 + 1

    • The instruction at adress_0 + 1 is to perform the task ๐‘–newย =๐‘–ย oldย +1

      Use the add instruction to calculate i + 1 and write it back to adress_1

    • After executing add, we need to return to the judgment of the next loop ๐‘–<10?

      The next instruction after the add instruction is the jump instruction. The result of the execution is to modify the value of adress_of_instruction to adress_0, implementing the jump of the instruction and performing the judgment of the next loop ๐‘–<10?

    • When ๐‘–โ‰ฅ10
    The arithmetic element outputs a control signal based on this judgment, changing the value stored in adress_of_instruction to adress_0 + 3, breaking out of the while loop, and executing the subsequent instructions

compile_(tag) parse_(tag)

Use a parser to verify the correctness of the token stream language, essentially it's traversing all language rules, or using a generated finite state machine

The operation of the parser requires generating large and complex data structures in memory (some figurative descriptions: tables, nodes, trees)

If the data stream is source code of a high-level programming language, an instruction stream can also be generated based on this data structure. This is called compilation (compile), but parse and compile are often used interchangeably

If the language rules are very complex, the language rules can be classified and decomposed (multiple times), first traversing the classification, and then traversing the rules within the classification. Example Separate into "syntax check" and "semantics check"

An enlightening example of the concept of abstraction and API: The items around you can be used conveniently without knowing the manufacturing principle because they are designed that way

Computers, in addition to the advantage of high-speed periodic circuits, have other advantages, such as the capacity of memory (1 GB = 2^(30+3) bit = 8589934592 bit) and persistence (power-on time)

They are part of reason why proof assistant are useful for human

Complex data structures and calculation functions can be constructed in memory. It may also be useful for many other fields.

The motivation for variables or variable names is that humans cannot remember so many addresses. Variable names are designed to assist humans with semantics and allow the computer to convert variable names into addresses, based on the variable's position in the overall program logic.

Variables or variable names allow the values stored in memory to be reused through addresses, rather than being one-time use