Interface:Complex numbers

This file contains the basic operations on complex numbers: addition, subtraction, square roots, and so on. It also contains a variety of convenience theorems and notations; for a minimal set of theorems/axioms sufficient to define the complex numbers see instead Interface:Complex number axioms.

We build on propositional logic, first-order logic, and set theory.

 param (CLASSICAL Interface:Classical_propositional_calculus ) param (FIRSTORDER Interface:First-order_logic_with_quantifiability (CLASSICAL) ) param (SETS Interface:Set_theory (CLASSICAL FIRSTORDER) ) 

Complex numbers
There is a set of complex numbers. As a convention, we tend to use  and   to refer to complex numbers, although using these names does not by itself ensure that a term is a complex number rather than a set of numbers or a relation or something else.  term (object (ℂ)) var (object z w s) 

The complex numbers are closed under an addition operation, which is commutative and associative.  term (object (+ object object)) stmt (ComplexAdditionClosure  (((z ∈ (ℂ)) ∧ (w ∈ (ℂ))) → ((z + w) ∈ (ℂ)))) stmt (AdditionCommutativity  (((z ∈ (ℂ)) ∧ (w ∈ (ℂ))) → ((z + w) = (w + z)))) stmt (AdditionAssociativity  ((((z ∈ (ℂ)) ∧ (w ∈ (ℂ))) ∧ (s ∈ (ℂ))) → (((z + w) + s) = (z + (w + s))))) 

The complex numbers are closed under a multiplication operation, which is commutative and associative.  term (object (· object object)) stmt (ComplexMultiplicationClosure  (((z ∈ (ℂ)) ∧ (w ∈ (ℂ))) → ((z · w) ∈ (ℂ)))) stmt (MultiplicationCommutativity  (((z ∈ (ℂ)) ∧ (w ∈ (ℂ))) → ((z · w) = (w · z)))) stmt (MultiplicationAssociativity  ((((z ∈ (ℂ)) ∧ (w ∈ (ℂ))) ∧ (s ∈ (ℂ))) → (((z · w) · s) = (z · (w · s))))) 

Multiplication distributes over addition.  stmt (Distributivity  ((((z ∈ (ℂ)) ∧ (w ∈ (ℂ))) ∧ (s ∈ (ℂ))) → ((z · (w + s)) = ((z · w) + (z · s))))) 

There is a complex number, which serves as a multiplicative identity.  term (object (1)) stmt (MultiplicativeIdentity  ((z ∈ (ℂ)) → ((z · (1)) = z))) 

There is a complex number, not equal to  , which serves as an additive identity.  term (object (0)) stmt (AdditiveIdentity  ((z ∈ (ℂ)) → ((z + (0)) = z))) stmt (ZeroOne  ((0) ≠ (1))) 

There is a complex number  for the square root of negative one.  term (object (i)) stmt (IComplex  ((i) ∈ (ℂ))) stmt (ISquared  ((((i) · (i)) + (1)) = (0))) 

Real numbers
There is a subset of the complex numbers called the real numbers which are closed under addition and multiplication. We conventionally use,  , and   to refer to real number terms, and   and   for real variables.  term (object (ℝ)) var (object a b c) var (variable x y) stmt (RealComplex  ((ℝ) ⊆ (ℂ))) stmt (RealAdditionClosure  (((a ∈ (ℝ)) ∧ (b ∈ (ℝ))) → ((a + b) ∈ (ℝ)))) stmt (RealMultiplicationClosure  (((a ∈ (ℝ)) ∧ (b ∈ (ℝ))) → ((a · b) ∈ (ℝ)))) </jh>

Any complex number can be written as real and imaginary parts.  stmt (ComplexParts ((x y z)) ((z ∈ (ℂ)) → (∃ x (((value x) ∈ (ℝ)) ∧ (∃ y (((value y) ∈ (ℝ)) ∧ (z = ((value x) + ((i) · (value y)))))))))) </jh>

Numerical constants
There is not (yet at least) any particularly convenient way of expressing integers short of defining each one, so here are some of the more commonly used ones.  def ((2) ((1) + (1))) def ((3) ((2) + (1))) def ((4) ((3) + (1))) def ((5) ((4) + (1))) def ((6) ((5) + (1))) def ((7) ((6) + (1))) def ((8) ((7) + (1))) def ((9) ((8) + (1))) def ((10) ((9) + (1))) def ((11) ((10) + (1))) def ((12) ((11) + (1))) def ((30) ((3) · (10))) def ((45) (((4) · (10)) + (5))) def ((60) ((6) · (10))) def ((90) ((9) · (10))) def ((100) ((10) · (10))) def ((180) ((100) + ((8) · (10)))) def ((360) (((3) · (100)) + (60))) def ((1000) ((100) · (10))) def ((1000000) ((1000) · (1000)))

stmt (ZeroReal  ((0) ∈ (ℝ))) stmt (OneReal  ((1) ∈ (ℝ))) stmt (TwoReal  ((2) ∈ (ℝ))) stmt (ThreeReal  ((3) ∈ (ℝ))) stmt (FourReal  ((4) ∈ (ℝ))) stmt (FiveReal  ((5) ∈ (ℝ))) stmt (SixReal  ((6) ∈ (ℝ))) stmt (SevenReal  ((7) ∈ (ℝ))) stmt (EightReal  ((8) ∈ (ℝ))) stmt (NineReal  ((9) ∈ (ℝ))) stmt (TenReal  ((10) ∈ (ℝ))) stmt (ElevenReal  ((11) ∈ (ℝ))) stmt (TwelveReal  ((12) ∈ (ℝ))) stmt (ThirtyReal  ((30) ∈ (ℝ))) stmt (FortyFiveReal  ((45) ∈ (ℝ))) stmt (SixtyReal  ((60) ∈ (ℝ))) stmt (NinetyReal  ((90) ∈ (ℝ))) stmt (HundredReal  ((100) ∈ (ℝ))) stmt (HundredEightyReal  ((180) ∈ (ℝ))) stmt (ThreeHundredSixtyReal  ((360) ∈ (ℝ))) stmt (ThousandReal  ((1000) ∈ (ℝ))) stmt (MillionReal  ((1000000) ∈ (ℝ))) </jh>

Additive inverse and subtraction
Any complex number has an additive inverse, and for a real number the inverse is real. Our notation is  for the additive inverse of.

 term (object (- object))

stmt (RealAdditiveInverseClosed  ((z ∈ (ℝ)) → ((- z) ∈ (ℝ)))) stmt (RealAdditiveInverseExists ((x a)) ((a ∈ (ℝ)) → (∃ x (((value x) ∈ (ℝ)) ∧ ((a + (value x)) = (0))))))

stmt (ComplexAdditiveInverseClosed  ((z ∈ (ℂ)) → ((- z) ∈ (ℂ)))) stmt (ComplexAdditiveInverse  ((z ∈ (ℂ)) → ((z + (- z)) = (0)))) </jh>

We can subtract any complex (real?) number from another. In case your screen doesn't show it clearly, the minus sign is a different character (longer) than the negation sign above.  term (object (− object object)) stmt (SubtractionClosed  (((z ∈ (ℂ)) ∧ (w ∈ (ℂ))) → ((z − w) ∈ (ℂ)))) stmt (Subtraction  (((z ∈ (ℂ)) ∧ (w ∈ (ℂ))) → ((z − w) = (z + (- w))))) </jh>

Subtracting a number from itself yields zero.  stmt (SubtractionItself  ((z ∈ (ℂ)) → ((z − z) = (0)))) </jh>

The difference between two numbers is zero if and only if they are equal.  stmt (ZeroDifferenceEquality  (((z ∈ (ℂ)) ∧ (w ∈ (ℂ))) → (((z − w) = (0)) ↔ (z = w)))) </jh>

Properties of negation
Negation distributes across multiplication in the familiar ways.  stmt (MultiplicationNegativeNegative  (((z ∈ (ℂ)) ∧ (w ∈ (ℂ))) → (((- z) · (- w)) = (z · w)))) </jh>

Negating a subtraction is the same as reversing the operands to the subtraction.  stmt (NegativeSubtraction  (((z ∈ (ℂ)) ∧ (w ∈ (ℂ))) → ((- (z − w)) = (w − z)))) </jh>

Multiplicative inverse and division
Every nonzero complex number has a multiplicative inverse.  term (object (/ object object)) stmt (ReciprocalClosed  (((z ∈ (ℂ)) ∧ (z ≠ (0))) → (((1) / z) ∈ (ℂ)))) stmt (Reciprocal  (((z ∈ (ℂ)) ∧ (z ≠ (0))) → ((z · ((1) / z)) = (1)))) </jh>

The reciprocal of a real number is real. We state this two ways, once with  and once with.  stmt (RealReciprocalClosed  (((a ∈ (ℝ)) ∧ (a ≠ (0))) → (((1) / a) ∈ (ℝ)))) stmt (RealReciprocalExists ((x a))  (((a ∈ (ℝ)) ∧ (a ≠ (0))) → (∃ x (((value x) ∈ (ℝ)) ∧ ((a · (value x)) = (1)))))) </jh>

We can divide any complex number by any nonzero complex number.  stmt (DivisionClosed  ((((z ∈ (ℂ)) ∧ (w ∈ (ℂ))) ∧ (w ≠ (0))) → ((z / w) ∈ (ℂ)))) stmt (Division  ((((z ∈ (ℂ)) ∧ (w ∈ (ℂ))) ∧ (w ≠ (0))) → ((z / w) = (z · ((1) / w))))) </jh>

Order on the reals
We define a total order on the reals, which is consistent with addition and multiplication.  term (formula (< object object)) stmt (Trichotomy  (((a ∈ (ℝ)) ∧ (b ∈ (ℝ))) → ((a < b) ↔ (¬ ((a = b) ∨ (b < a)))))) stmt (Transitivity  ((((a ∈ (ℝ)) ∧ (b ∈ (ℝ))) ∧ (c ∈ (ℝ))) → (((a < b) ∧ (b < c)) → (a < c)))) stmt (LessThanAddition  ((((a ∈ (ℝ)) ∧ (b ∈ (ℝ))) ∧ (c ∈ (ℝ))) → ((a < b) → ((c + a) < (c + b))))) stmt (LessThanMultiplication  (((a ∈ (ℝ)) ∧ (b ∈ (ℝ))) → ((((0) < a) ∧ ((0) < b)) → ((0) < (a · b)))))

def ((> a b) (b < a)) def ((≤ a b) ((a < b) ∨ (a = b))) def ((≥ a b) (b ≤ a)) </jh>

Any nonempty set of real numbers which is bounded above has a least upper bound (supremum) which is a real number. This property distinguishes the reals from the rationals. It is this property which causes us to build the reals on top of set theory, instead of just first-order logic, as it involves sets of reals not just individual real numbers. The statement of the axiom is as in metamath (modulo variable renamings and notation changes); the occurence of  in the second part might better be read as "would-be upper bound" as of course the point is that it can't be less than the supremum and still be an upper bound.  var (object A) var (variable bound supremum) stmt (Supremum ((x bound supremum A))  ((((A ⊆ (ℝ)) ∧ (A ≠ (∅)))   ∧ (∃ bound (((value bound) ∈ (ℝ)) ∧       (∀ x (((value x) ∈ A) → ((value x) < (value bound))))))) →   (∃ supremum (((value supremum) ∈ (ℝ)) ∧ (      (∀ x (((value x) ∈ A) → (¬ ((value supremum) < (value x))))) ∧       (∀ bound (((value bound) ∈ (ℝ)) → (((value bound) < (value supremum)) → (∃ x (((value x) ∈ A) ∧ ((value bound) < (value x)))))))))))) </jh>

Squares and square root
At least for now, we notate the square of  as. We have not yet developed exponentiation, which might treat  squared as a special case of   to an integer power.

Squares
The square of a real number is nonnegative.  stmt (RealSquareNonnegative  ((a ∈ (ℝ)) → ((0) ≤ (a · a)))) </jh>

Square root
We can take the square root of any complex number. The square root of a nonnegative real is real.  term (object (√ object)) stmt (SquareRootComplex  ((z ∈ (ℂ)) → ((√ z) ∈ (ℂ)))) stmt (SquareRootReal  (((a ∈ (ℝ)) ∧ (a ≥ (0))) → ((√ a) ∈ (ℝ)))) stmt (SquareRoot  ((z ∈ (ℂ)) → (((√ z) · (√ z)) = z))) </jh>

Builders
Here we supply builders for each operation.

Although the builders are not interesting unless A0 and so on are complex numbers, we state them without restricting them to complex numbers. However we define the sum of two sets which are not complex numbers, it is no hardship to make that definition obey the builders. <jh> var (object B A0 A1 B0 B1) stmt (AdditionBuilder  (((A0 = A1) ∧ (B0 = B1)) → ((A0 + B0) = (A1 + B1)))) stmt (SubtractionBuilder  (((A0 = A1) ∧ (B0 = B1)) → ((A0 − B0) = (A1 − B1)))) stmt (NegativeBuilder  ((A0 = A1) → ((- A0) = (- A1)))) stmt (MultiplicationBuilder  (((A0 = A1) ∧ (B0 = B1)) → ((A0 · B0) = (A1 · B1)))) stmt (DivisionBuilder  (((A0 = A1) ∧ (B0 = B1)) → ((A0 / B0) = (A1 / B1)))) stmt (SquareRootBuilder  ((A0 = A1) → ((√ A0) = (√ A1)))) </jh>

Convenience builders
The following builders, of course, follow from the ones above. <jh> stmt (buildAddition ((A0 = A1) (B0 = B1)) ((A0 + B0) = (A1 + B1))) stmt (buildAdditionLL ((B0 = B1)) ((A + B0) = (A + B1))) stmt (buildAdditionRR ((A0 = A1)) ((A0 + B) = (A1 + B))) stmt (buildMultiplicationLL ((B0 = B1)) ((A · B0) = (A · B1))) stmt (buildMultiplicationRR ((A0 = A1)) ((A0 · B) = (A1 · B))) </jh>