# 各種數字系統

• 空集合：
• $\emptyset= \{\}$
• the set containing no elements.
• 整數
• $Z = \{. . . ,−3,−2,−1, 0, 1, 2, 3 . . .\}$
• the set of integers. (Z is for “Zahlen”, the German word for “number”.)
• 有理數
• $Q = \{p/q|p, q \in Z, q \ne 0\}$
• the set of rational numbers. (Q is for quotient.)
• 實數
• $R = \{x|x = a1a2 · · · an.b1b2 · · · \}$
• the set of real numbers, i.e. the set of numbers with decimal expansions.
• 複數
• $C = \{a + i b|a, b \in R, i^2 = −1\}$
• the set of complex numbers. ı is the square root of −1.
• 正數的表示
• $Z^+, Q^+, R^+$
• the sets of positive integers, rationals and reals, respectively.
• For example, $Z^+ = {1, 2, 3, . . .}.$
• 負數的表示
• $Z^-, Q^-, R^-$
• 包含零的正數表示：
• $Z^{0+}, Q^{0+} and R^{0+}$
• the sets of non-negative integers, rationals and reals, respectively.
• For example, $Z^{0+} ={0, 1, 2, . . .}$
• 開區間
• $(a . . . b)$
• denotes an open interval on the real axis. $(a . . . b)={x|x \in R, a < x < b}$
• 閉區間
• $[a..b]$
• We use brackets to denote the closed interval. $[a..b]={x|x \in R, a x b}$

# Python 的數字運算

## 整數 (Z)

>>> a=3
>>> b=5
>>> a+b
8
>>> a-b
-2
>>> a*b
15
>>> a-b
-2


## 實數 (R)

>>> a=3.14
>>> b=2.71828
>>> a+b
5.858280000000001
>>> a-b
0.4217200000000001
>>> a*b
8.5353992
>>> a/b
1.155142222287623
>>> math.pi
3.141592653589793
>>> math.e
2.718281828459045
>>> pi
3.141592653589793
>>> e
2.718281828459045
>>> pi+e
5.859874482048838
>>> pi-e
0.423310825130748
>>> pi*e
8.539734222673566
>>> pi/e
1.1557273497909217
>>>


## 有理數 (Q)

>>> from fractions import Fraction
>>> a=Fraction(1,3)
>>> b=Fraction(1,4)
>>> a+b
Fraction(7, 12)
>>> a-b
Fraction(1, 12)
>>> a*b
Fraction(1, 12)
>>> a/b
Fraction(4, 3)


## 複數 (C)

>>> a = 3+2j
>>> b = 1+1j
>>> a+b
(4+3j)
>>> a-b
(2+1j)
>>> a*b
(1+5j)
>>> a/b
(2.5-0.5j)


# 整數論的皮諾公設系統

Axiom of Natural Number System (Peano)

PE1 : 0 exist
PE2 : x' = x+1
PE3 : x' > x
PE4 : If x' = y' then x = y
PE5 : Principle of mathmatical Induction :
If P(0) and P(x) -> P(x') then For all x, P(x)