src/HOL/Complex/NSComplex.thy
author paulson
Tue, 03 Feb 2004 15:58:31 +0100
changeset 14374 61de62096768
parent 14373 67a628beb981
child 14377 f454b3004f8f
permissions -rw-r--r--
further tidying of the complex numbers
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
     1
(*  Title:       NSComplex.thy
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
     2
    Author:      Jacques D. Fleuriot
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
     3
    Copyright:   2001  University of Edinburgh
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
     4
    Description: Nonstandard Complex numbers
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
     5
*)
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
     6
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
     7
theory NSComplex = NSInduct:
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
     8
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
     9
constdefs
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    10
    hcomplexrel :: "((nat=>complex)*(nat=>complex)) set"
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
    11
    "hcomplexrel == {p. \<exists>X Y. p = ((X::nat=>complex),Y) &
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    12
                        {n::nat. X(n) = Y(n)}: FreeUltrafilterNat}"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    13
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    14
typedef hcomplex = "{x::nat=>complex. True}//hcomplexrel"
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    15
  by (auto simp add: quotient_def)
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    16
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    17
instance hcomplex :: zero ..
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    18
instance hcomplex :: one ..
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    19
instance hcomplex :: plus ..
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    20
instance hcomplex :: times ..
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    21
instance hcomplex :: minus ..
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    22
instance hcomplex :: inverse ..
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    23
instance hcomplex :: power ..
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    24
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    25
defs (overloaded)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    26
  hcomplex_zero_def:
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    27
  "0 == Abs_hcomplex(hcomplexrel `` {%n. (0::complex)})"
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    28
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    29
  hcomplex_one_def:
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    30
  "1 == Abs_hcomplex(hcomplexrel `` {%n. (1::complex)})"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    31
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    32
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    33
  hcomplex_minus_def:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    34
  "- z == Abs_hcomplex(UN X: Rep_hcomplex(z).
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    35
                       hcomplexrel `` {%n::nat. - (X n)})"
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    36
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    37
  hcomplex_diff_def:
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    38
  "w - z == w + -(z::hcomplex)"
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    39
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    40
constdefs
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    41
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    42
  hcomplex_of_complex :: "complex => hcomplex"
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    43
  "hcomplex_of_complex z == Abs_hcomplex(hcomplexrel `` {%n. z})"
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    44
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    45
  hcinv  :: "hcomplex => hcomplex"
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    46
  "inverse(P)   == Abs_hcomplex(UN X: Rep_hcomplex(P).
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    47
                    hcomplexrel `` {%n. inverse(X n)})"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    48
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    49
  (*--- real and Imaginary parts ---*)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    50
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    51
  hRe :: "hcomplex => hypreal"
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    52
  "hRe(z) == Abs_hypreal(UN X:Rep_hcomplex(z). hyprel `` {%n. Re (X n)})"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    53
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    54
  hIm :: "hcomplex => hypreal"
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    55
  "hIm(z) == Abs_hypreal(UN X:Rep_hcomplex(z). hyprel `` {%n. Im (X n)})"
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    56
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    57
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    58
  (*----------- modulus ------------*)
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    59
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    60
  hcmod :: "hcomplex => hypreal"
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    61
  "hcmod z == Abs_hypreal(UN X: Rep_hcomplex(z).
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    62
			  hyprel `` {%n. cmod (X n)})"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    63
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    64
  (*------ imaginary unit ----------*)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    65
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    66
  iii :: hcomplex
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    67
  "iii == Abs_hcomplex(hcomplexrel `` {%n. ii})"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    68
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    69
  (*------- complex conjugate ------*)
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    70
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    71
  hcnj :: "hcomplex => hcomplex"
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    72
  "hcnj z == Abs_hcomplex(UN X:Rep_hcomplex(z). hcomplexrel `` {%n. cnj (X n)})"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    73
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    74
  (*------------ Argand -------------*)
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    75
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    76
  hsgn :: "hcomplex => hcomplex"
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    77
  "hsgn z == Abs_hcomplex(UN X:Rep_hcomplex(z). hcomplexrel `` {%n. sgn(X n)})"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    78
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    79
  harg :: "hcomplex => hypreal"
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    80
  "harg z == Abs_hypreal(UN X:Rep_hcomplex(z). hyprel `` {%n. arg(X n)})"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    81
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    82
  (* abbreviation for (cos a + i sin a) *)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    83
  hcis :: "hypreal => hcomplex"
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    84
  "hcis a == Abs_hcomplex(UN X:Rep_hypreal(a). hcomplexrel `` {%n. cis (X n)})"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    85
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    86
  (* abbreviation for r*(cos a + i sin a) *)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    87
  hrcis :: "[hypreal, hypreal] => hcomplex"
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    88
  "hrcis r a == hcomplex_of_hypreal r * hcis a"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    89
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    90
  (*----- injection from hyperreals -----*)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    91
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    92
  hcomplex_of_hypreal :: "hypreal => hcomplex"
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    93
  "hcomplex_of_hypreal r == Abs_hcomplex(UN X:Rep_hypreal(r).
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    94
			       hcomplexrel `` {%n. complex_of_real (X n)})"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    95
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    96
  (*------------ e ^ (x + iy) ------------*)
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    97
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
    98
  hexpi :: "hcomplex => hcomplex"
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    99
  "hexpi z == hcomplex_of_hypreal(( *f* exp) (hRe z)) * hcis (hIm z)"
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   100
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   101
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   102
defs (overloaded)
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   103
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   104
  (*----------- division ----------*)
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   105
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   106
  hcomplex_divide_def:
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   107
  "w / (z::hcomplex) == w * inverse z"
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   108
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   109
  hcomplex_add_def:
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   110
  "w + z == Abs_hcomplex(UN X:Rep_hcomplex(w). UN Y:Rep_hcomplex(z).
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   111
		      hcomplexrel `` {%n. X n + Y n})"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   112
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   113
  hcomplex_mult_def:
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   114
  "w * z == Abs_hcomplex(UN X:Rep_hcomplex(w). UN Y:Rep_hcomplex(z).
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   115
		      hcomplexrel `` {%n. X n * Y n})"
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   116
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   117
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   118
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   119
consts
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   120
  "hcpow"  :: "[hcomplex,hypnat] => hcomplex"     (infixr 80)
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   121
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   122
defs
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   123
  (* hypernatural powers of nonstandard complex numbers *)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   124
  hcpow_def:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   125
  "(z::hcomplex) hcpow (n::hypnat)
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   126
      == Abs_hcomplex(UN X:Rep_hcomplex(z). UN Y: Rep_hypnat(n).
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   127
             hcomplexrel `` {%n. (X n) ^ (Y n)})"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   128
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   129
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   130
lemma hcomplexrel_refl: "(x,x): hcomplexrel"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   131
by (simp add: hcomplexrel_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   132
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   133
lemma hcomplexrel_sym: "(x,y): hcomplexrel ==> (y,x):hcomplexrel"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   134
by (auto simp add: hcomplexrel_def eq_commute)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   135
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   136
lemma hcomplexrel_trans:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   137
      "[|(x,y): hcomplexrel; (y,z):hcomplexrel|] ==> (x,z):hcomplexrel"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   138
by (simp add: hcomplexrel_def, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   139
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   140
lemma equiv_hcomplexrel: "equiv UNIV hcomplexrel"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   141
apply (simp add: equiv_def refl_def sym_def trans_def hcomplexrel_refl)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   142
apply (blast intro: hcomplexrel_sym hcomplexrel_trans)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   143
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   144
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   145
lemmas equiv_hcomplexrel_iff =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   146
    eq_equiv_class_iff [OF equiv_hcomplexrel UNIV_I UNIV_I, simp]
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   147
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   148
lemma hcomplexrel_in_hcomplex [simp]: "hcomplexrel``{x} : hcomplex"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   149
by (simp add: hcomplex_def hcomplexrel_def quotient_def, blast)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   150
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   151
lemma inj_on_Abs_hcomplex: "inj_on Abs_hcomplex hcomplex"
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   152
apply (rule inj_on_inverseI)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   153
apply (erule Abs_hcomplex_inverse)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   154
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   155
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   156
declare inj_on_Abs_hcomplex [THEN inj_on_iff, simp]
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   157
        Abs_hcomplex_inverse [simp]
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   158
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   159
declare equiv_hcomplexrel [THEN eq_equiv_class_iff, simp]
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   160
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   161
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   162
lemma inj_Rep_hcomplex: "inj(Rep_hcomplex)"
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   163
apply (rule inj_on_inverseI)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   164
apply (rule Rep_hcomplex_inverse)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   165
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   166
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   167
lemma lemma_hcomplexrel_refl [simp]: "x: hcomplexrel `` {x}"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   168
by (simp add: hcomplexrel_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   169
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   170
lemma hcomplex_empty_not_mem [simp]: "{} \<notin> hcomplex"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   171
apply (simp add: hcomplex_def hcomplexrel_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   172
apply (auto elim!: quotientE)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   173
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   174
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   175
lemma Rep_hcomplex_nonempty [simp]: "Rep_hcomplex x \<noteq> {}"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   176
by (cut_tac x = x in Rep_hcomplex, auto)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   177
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   178
lemma eq_Abs_hcomplex:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   179
    "(!!x. z = Abs_hcomplex(hcomplexrel `` {x}) ==> P) ==> P"
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   180
apply (rule_tac x1=z in Rep_hcomplex [unfolded hcomplex_def, THEN quotientE])
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   181
apply (drule_tac f = Abs_hcomplex in arg_cong)
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   182
apply (force simp add: Rep_hcomplex_inverse hcomplexrel_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   183
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   184
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   185
(*??delete*)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   186
lemma hcomplexrel_iff [iff]:
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   187
   "((X,Y): hcomplexrel) = ({n. X n = Y n}: FreeUltrafilterNat)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   188
by (simp add: hcomplexrel_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   189
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   190
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   191
subsection{*Properties of Nonstandard Real and Imaginary Parts*}
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   192
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   193
lemma hRe:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   194
     "hRe(Abs_hcomplex (hcomplexrel `` {X})) =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   195
      Abs_hypreal(hyprel `` {%n. Re(X n)})"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   196
apply (simp add: hRe_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   197
apply (rule_tac f = Abs_hypreal in arg_cong)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   198
apply (auto, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   199
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   200
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   201
lemma hIm:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   202
     "hIm(Abs_hcomplex (hcomplexrel `` {X})) =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   203
      Abs_hypreal(hyprel `` {%n. Im(X n)})"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   204
apply (simp add: hIm_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   205
apply (rule_tac f = Abs_hypreal in arg_cong)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   206
apply (auto, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   207
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   208
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   209
lemma hcomplex_hRe_hIm_cancel_iff:
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   210
     "(w=z) = (hRe(w) = hRe(z) & hIm(w) = hIm(z))"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   211
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   212
apply (rule eq_Abs_hcomplex [of w])
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   213
apply (auto simp add: hRe hIm complex_Re_Im_cancel_iff)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   214
apply (ultra+)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   215
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   216
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   217
lemma hcomplex_hRe_zero [simp]: "hRe 0 = 0"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   218
by (simp add: hcomplex_zero_def hRe hypreal_zero_num)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   219
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   220
lemma hcomplex_hIm_zero [simp]: "hIm 0 = 0"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   221
by (simp add: hcomplex_zero_def hIm hypreal_zero_num)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   222
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   223
lemma hcomplex_hRe_one [simp]: "hRe 1 = 1"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   224
by (simp add: hcomplex_one_def hRe hypreal_one_num)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   225
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   226
lemma hcomplex_hIm_one [simp]: "hIm 1 = 0"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   227
by (simp add: hcomplex_one_def hIm hypreal_one_def hypreal_zero_num)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   228
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   229
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   230
subsection{*Addition for Nonstandard Complex Numbers*}
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   231
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   232
lemma hcomplex_add_congruent2:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   233
    "congruent2 hcomplexrel (%X Y. hcomplexrel `` {%n. X n + Y n})"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   234
by (auto simp add: congruent2_def, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   235
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   236
lemma hcomplex_add:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   237
  "Abs_hcomplex(hcomplexrel``{%n. X n}) + Abs_hcomplex(hcomplexrel``{%n. Y n}) =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   238
   Abs_hcomplex(hcomplexrel``{%n. X n + Y n})"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   239
apply (simp add: hcomplex_add_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   240
apply (rule_tac f = Abs_hcomplex in arg_cong)
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   241
apply (auto, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   242
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   243
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   244
lemma hcomplex_add_commute: "(z::hcomplex) + w = w + z"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   245
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   246
apply (rule eq_Abs_hcomplex [of w])
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   247
apply (simp add: complex_add_commute hcomplex_add)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   248
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   249
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   250
lemma hcomplex_add_assoc: "((z1::hcomplex) + z2) + z3 = z1 + (z2 + z3)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   251
apply (rule eq_Abs_hcomplex [of z1])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   252
apply (rule eq_Abs_hcomplex [of z2])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   253
apply (rule eq_Abs_hcomplex [of z3])
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   254
apply (simp add: hcomplex_add complex_add_assoc)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   255
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   256
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   257
lemma hcomplex_add_zero_left: "(0::hcomplex) + z = z"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   258
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   259
apply (simp add: hcomplex_zero_def hcomplex_add)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   260
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   261
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   262
lemma hcomplex_add_zero_right: "z + (0::hcomplex) = z"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   263
by (simp add: hcomplex_add_zero_left hcomplex_add_commute)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   264
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   265
lemma hRe_add: "hRe(x + y) = hRe(x) + hRe(y)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   266
apply (rule eq_Abs_hcomplex [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   267
apply (rule eq_Abs_hcomplex [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   268
apply (simp add: hRe hcomplex_add hypreal_add complex_Re_add)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   269
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   270
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   271
lemma hIm_add: "hIm(x + y) = hIm(x) + hIm(y)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   272
apply (rule eq_Abs_hcomplex [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   273
apply (rule eq_Abs_hcomplex [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   274
apply (simp add: hIm hcomplex_add hypreal_add complex_Im_add)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   275
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   276
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   277
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   278
subsection{*Additive Inverse on Nonstandard Complex Numbers*}
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   279
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   280
lemma hcomplex_minus_congruent:
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   281
     "congruent hcomplexrel (%X. hcomplexrel `` {%n. - (X n)})"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   282
by (simp add: congruent_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   283
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   284
lemma hcomplex_minus:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   285
  "- (Abs_hcomplex(hcomplexrel `` {%n. X n})) =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   286
      Abs_hcomplex(hcomplexrel `` {%n. -(X n)})"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   287
apply (simp add: hcomplex_minus_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   288
apply (rule_tac f = Abs_hcomplex in arg_cong)
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   289
apply (auto, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   290
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   291
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   292
lemma hcomplex_add_minus_left: "-z + z = (0::hcomplex)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   293
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   294
apply (simp add: hcomplex_add hcomplex_minus hcomplex_zero_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   295
done
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   296
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   297
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   298
subsection{*Multiplication for Nonstandard Complex Numbers*}
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   299
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   300
lemma hcomplex_mult:
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   301
  "Abs_hcomplex(hcomplexrel``{%n. X n}) *
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   302
     Abs_hcomplex(hcomplexrel``{%n. Y n}) =
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   303
     Abs_hcomplex(hcomplexrel``{%n. X n * Y n})"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   304
apply (simp add: hcomplex_mult_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   305
apply (rule_tac f = Abs_hcomplex in arg_cong)
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   306
apply (auto, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   307
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   308
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   309
lemma hcomplex_mult_commute: "(w::hcomplex) * z = z * w"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   310
apply (rule eq_Abs_hcomplex [of w])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   311
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   312
apply (simp add: hcomplex_mult complex_mult_commute)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   313
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   315
lemma hcomplex_mult_assoc: "((u::hcomplex) * v) * w = u * (v * w)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   316
apply (rule eq_Abs_hcomplex [of u])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   317
apply (rule eq_Abs_hcomplex [of v])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   318
apply (rule eq_Abs_hcomplex [of w])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   319
apply (simp add: hcomplex_mult complex_mult_assoc)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   320
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   321
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   322
lemma hcomplex_mult_one_left: "(1::hcomplex) * z = z"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   323
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   324
apply (simp add: hcomplex_one_def hcomplex_mult)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   325
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   326
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   327
lemma hcomplex_mult_zero_left: "(0::hcomplex) * z = 0"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   328
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   329
apply (simp add: hcomplex_zero_def hcomplex_mult)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   330
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   331
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   332
lemma hcomplex_add_mult_distrib:
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   333
     "((z1::hcomplex) + z2) * w = (z1 * w) + (z2 * w)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   334
apply (rule eq_Abs_hcomplex [of z1])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   335
apply (rule eq_Abs_hcomplex [of z2])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   336
apply (rule eq_Abs_hcomplex [of w])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   337
apply (simp add: hcomplex_mult hcomplex_add left_distrib)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   338
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   339
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   340
lemma hcomplex_zero_not_eq_one: "(0::hcomplex) \<noteq> (1::hcomplex)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   341
by (simp add: hcomplex_zero_def hcomplex_one_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   342
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   343
declare hcomplex_zero_not_eq_one [THEN not_sym, simp]
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   344
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   345
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   346
subsection{*Inverse of Nonstandard Complex Number*}
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   347
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   348
lemma hcomplex_inverse:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   349
  "inverse (Abs_hcomplex(hcomplexrel `` {%n. X n})) =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   350
      Abs_hcomplex(hcomplexrel `` {%n. inverse (X n)})"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   351
apply (simp add: hcinv_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   352
apply (rule_tac f = Abs_hcomplex in arg_cong)
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   353
apply (auto, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   354
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   355
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   356
lemma hcomplex_mult_inv_left:
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   357
      "z \<noteq> (0::hcomplex) ==> inverse(z) * z = (1::hcomplex)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   358
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   359
apply (simp add: hcomplex_zero_def hcomplex_one_def hcomplex_inverse hcomplex_mult, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   360
apply (rule ccontr)
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   361
apply (drule left_inverse, auto)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   362
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   363
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   364
subsection {* The Field of Nonstandard Complex Numbers *}
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   365
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   366
instance hcomplex :: field
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   367
proof
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   368
  fix z u v w :: hcomplex
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   369
  show "(u + v) + w = u + (v + w)"
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   370
    by (simp add: hcomplex_add_assoc)
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   371
  show "z + w = w + z"
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   372
    by (simp add: hcomplex_add_commute)
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   373
  show "0 + z = z"
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   374
    by (simp add: hcomplex_add_zero_left)
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   375
  show "-z + z = 0"
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   376
    by (simp add: hcomplex_add_minus_left)
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   377
  show "z - w = z + -w"
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   378
    by (simp add: hcomplex_diff_def)
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   379
  show "(u * v) * w = u * (v * w)"
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   380
    by (simp add: hcomplex_mult_assoc)
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   381
  show "z * w = w * z"
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   382
    by (simp add: hcomplex_mult_commute)
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   383
  show "1 * z = z"
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   384
    by (simp add: hcomplex_mult_one_left)
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   385
  show "0 \<noteq> (1::hcomplex)"
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   386
    by (rule hcomplex_zero_not_eq_one)
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   387
  show "(u + v) * w = u * w + v * w"
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   388
    by (simp add: hcomplex_add_mult_distrib)
14341
a09441bd4f1e Ring_and_Field now requires axiom add_left_imp_eq for semirings.
paulson
parents: 14336
diff changeset
   389
  show "z+u = z+v ==> u=v"
a09441bd4f1e Ring_and_Field now requires axiom add_left_imp_eq for semirings.
paulson
parents: 14336
diff changeset
   390
    proof -
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   391
      assume eq: "z+u = z+v"
14341
a09441bd4f1e Ring_and_Field now requires axiom add_left_imp_eq for semirings.
paulson
parents: 14336
diff changeset
   392
      hence "(-z + z) + u = (-z + z) + v" by (simp only: eq hcomplex_add_assoc)
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   393
      thus "u = v"
14341
a09441bd4f1e Ring_and_Field now requires axiom add_left_imp_eq for semirings.
paulson
parents: 14336
diff changeset
   394
        by (simp only: hcomplex_add_minus_left hcomplex_add_zero_left)
a09441bd4f1e Ring_and_Field now requires axiom add_left_imp_eq for semirings.
paulson
parents: 14336
diff changeset
   395
    qed
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   396
  assume neq: "w \<noteq> 0"
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   397
  thus "z / w = z * inverse w"
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   398
    by (simp add: hcomplex_divide_def)
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   399
  show "inverse w * w = 1"
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   400
    by (rule hcomplex_mult_inv_left)
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   401
qed
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   402
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   403
instance hcomplex :: division_by_zero
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   404
proof
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   405
  show inv: "inverse 0 = (0::hcomplex)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   406
    by (simp add: hcomplex_inverse hcomplex_zero_def)
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   407
  fix x :: hcomplex
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   408
  show "x/0 = 0"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   409
    by (simp add: hcomplex_divide_def inv)
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   410
qed
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   411
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   412
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   413
subsection{*More Minus Laws*}
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   414
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   415
lemma hRe_minus: "hRe(-z) = - hRe(z)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   416
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   417
apply (simp add: hRe hcomplex_minus hypreal_minus complex_Re_minus)
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   418
done
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   419
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   420
lemma hIm_minus: "hIm(-z) = - hIm(z)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   421
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   422
apply (simp add: hIm hcomplex_minus hypreal_minus complex_Im_minus)
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   423
done
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   424
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   425
lemma hcomplex_add_minus_eq_minus:
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   426
      "x + y = (0::hcomplex) ==> x = -y"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   427
apply (drule Ring_and_Field.equals_zero_I)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   428
apply (simp add: minus_equation_iff [of x y])
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   429
done
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   430
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   431
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   432
subsection{*More Multiplication Laws*}
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   433
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   434
lemma hcomplex_mult_one_right: "z * (1::hcomplex) = z"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   435
by (rule Ring_and_Field.mult_1_right)
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   436
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   437
lemma hcomplex_mult_minus_one [simp]: "- 1 * (z::hcomplex) = -z"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   438
by simp
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   439
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   440
lemma hcomplex_mult_minus_one_right [simp]: "(z::hcomplex) * - 1 = -z"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   441
by (subst hcomplex_mult_commute, simp)
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   442
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   443
lemma hcomplex_mult_left_cancel:
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   444
     "(c::hcomplex) \<noteq> (0::hcomplex) ==> (c*a=c*b) = (a=b)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   445
by (simp add: field_mult_cancel_left)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   446
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   447
lemma hcomplex_mult_right_cancel:
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   448
     "(c::hcomplex) \<noteq> (0::hcomplex) ==> (a*c=b*c) = (a=b)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   449
by (simp add: Ring_and_Field.field_mult_cancel_right)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   450
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   451
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   452
subsection{*Subraction and Division*}
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   453
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   454
lemma hcomplex_diff:
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   455
 "Abs_hcomplex(hcomplexrel``{%n. X n}) - Abs_hcomplex(hcomplexrel``{%n. Y n}) =
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   456
  Abs_hcomplex(hcomplexrel``{%n. X n - Y n})"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   457
by (simp add: hcomplex_diff_def hcomplex_minus hcomplex_add complex_diff_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   458
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   459
lemma hcomplex_diff_eq_eq [simp]: "((x::hcomplex) - y = z) = (x = z + y)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   460
by (rule Ring_and_Field.diff_eq_eq)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   461
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   462
lemma hcomplex_add_divide_distrib: "(x+y)/(z::hcomplex) = x/z + y/z"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   463
by (rule Ring_and_Field.add_divide_distrib)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   464
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   465
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   466
subsection{*Embedding Properties for @{term hcomplex_of_hypreal} Map*}
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   467
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   468
lemma hcomplex_of_hypreal:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   469
  "hcomplex_of_hypreal (Abs_hypreal(hyprel `` {%n. X n})) =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   470
      Abs_hcomplex(hcomplexrel `` {%n. complex_of_real (X n)})"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   471
apply (simp add: hcomplex_of_hypreal_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   472
apply (rule_tac f = Abs_hcomplex in arg_cong, auto, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   473
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   474
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   475
lemma hcomplex_of_hypreal_cancel_iff [iff]:
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   476
     "(hcomplex_of_hypreal x = hcomplex_of_hypreal y) = (x = y)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   477
apply (rule eq_Abs_hypreal [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   478
apply (rule eq_Abs_hypreal [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   479
apply (simp add: hcomplex_of_hypreal)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   480
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   481
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   482
lemma hcomplex_of_hypreal_minus:
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   483
     "hcomplex_of_hypreal(-x) = - hcomplex_of_hypreal x"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   484
apply (rule eq_Abs_hypreal [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   485
apply (simp add: hcomplex_of_hypreal hcomplex_minus hypreal_minus complex_of_real_minus)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   486
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   487
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   488
lemma hcomplex_of_hypreal_inverse:
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   489
     "hcomplex_of_hypreal(inverse x) = inverse(hcomplex_of_hypreal x)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   490
apply (rule eq_Abs_hypreal [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   491
apply (simp add: hcomplex_of_hypreal hypreal_inverse hcomplex_inverse complex_of_real_inverse)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   492
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   493
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   494
lemma hcomplex_of_hypreal_add:
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   495
     "hcomplex_of_hypreal x + hcomplex_of_hypreal y =
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   496
      hcomplex_of_hypreal (x + y)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   497
apply (rule eq_Abs_hypreal [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   498
apply (rule eq_Abs_hypreal [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   499
apply (simp add: hcomplex_of_hypreal hypreal_add hcomplex_add complex_of_real_add)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   500
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   501
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   502
lemma hcomplex_of_hypreal_diff:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   503
     "hcomplex_of_hypreal x - hcomplex_of_hypreal y =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   504
      hcomplex_of_hypreal (x - y)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   505
by (simp add: hcomplex_diff_def hcomplex_of_hypreal_minus [symmetric] hcomplex_of_hypreal_add hypreal_diff_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   506
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   507
lemma hcomplex_of_hypreal_mult:
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   508
     "hcomplex_of_hypreal x * hcomplex_of_hypreal y =
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   509
      hcomplex_of_hypreal (x * y)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   510
apply (rule eq_Abs_hypreal [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   511
apply (rule eq_Abs_hypreal [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   512
apply (simp add: hcomplex_of_hypreal hypreal_mult hcomplex_mult complex_of_real_mult)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   513
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   514
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   515
lemma hcomplex_of_hypreal_divide:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   516
  "hcomplex_of_hypreal x / hcomplex_of_hypreal y = hcomplex_of_hypreal(x/y)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   517
apply (simp add: hcomplex_divide_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   518
apply (case_tac "y=0", simp)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   519
apply (auto simp add: hcomplex_of_hypreal_mult hcomplex_of_hypreal_inverse [symmetric])
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   520
apply (simp add: hypreal_divide_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   521
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   522
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   523
lemma hcomplex_of_hypreal_one [simp]: "hcomplex_of_hypreal 1 = 1"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   524
by (simp add: hcomplex_one_def hcomplex_of_hypreal hypreal_one_num)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   525
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   526
lemma hcomplex_of_hypreal_zero [simp]: "hcomplex_of_hypreal 0 = 0"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   527
by (simp add: hcomplex_zero_def hypreal_zero_def hcomplex_of_hypreal)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   528
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   529
lemma hRe_hcomplex_of_hypreal [simp]: "hRe(hcomplex_of_hypreal z) = z"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   530
apply (rule eq_Abs_hypreal [of z])
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   531
apply (auto simp add: hcomplex_of_hypreal hRe)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   532
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   533
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   534
lemma hIm_hcomplex_of_hypreal [simp]: "hIm(hcomplex_of_hypreal z) = 0"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   535
apply (rule eq_Abs_hypreal [of z])
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   536
apply (auto simp add: hcomplex_of_hypreal hIm hypreal_zero_num)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   537
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   538
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   539
lemma hcomplex_of_hypreal_epsilon_not_zero [simp]:
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   540
     "hcomplex_of_hypreal epsilon \<noteq> 0"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   541
by (auto simp add: hcomplex_of_hypreal epsilon_def hcomplex_zero_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   542
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   543
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   544
subsection{*Modulus (Absolute Value) of Nonstandard Complex Number*}
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   545
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   546
lemma hcmod:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   547
  "hcmod (Abs_hcomplex(hcomplexrel `` {%n. X n})) =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   548
      Abs_hypreal(hyprel `` {%n. cmod (X n)})"
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   549
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   550
apply (simp add: hcmod_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   551
apply (rule_tac f = Abs_hypreal in arg_cong)
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   552
apply (auto, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   553
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   554
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   555
lemma hcmod_zero [simp]: "hcmod(0) = 0"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   556
apply (simp add: hcomplex_zero_def hypreal_zero_def hcmod)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   557
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   558
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   559
lemma hcmod_one [simp]: "hcmod(1) = 1"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   560
by (simp add: hcomplex_one_def hcmod hypreal_one_num)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   561
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   562
lemma hcmod_hcomplex_of_hypreal [simp]: "hcmod(hcomplex_of_hypreal x) = abs x"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   563
apply (rule eq_Abs_hypreal [of x])
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   564
apply (auto simp add: hcmod hcomplex_of_hypreal hypreal_hrabs)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   565
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   566
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   567
lemma hcomplex_of_hypreal_abs:
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   568
     "hcomplex_of_hypreal (abs x) =
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   569
      hcomplex_of_hypreal(hcmod(hcomplex_of_hypreal x))"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   570
by simp
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   571
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   572
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   573
subsection{*Conjugation*}
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   574
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   575
lemma hcnj:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   576
  "hcnj (Abs_hcomplex(hcomplexrel `` {%n. X n})) =
14318
7dbd3988b15b type hcomplex is now in class field
paulson
parents: 14314
diff changeset
   577
   Abs_hcomplex(hcomplexrel `` {%n. cnj(X n)})"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   578
apply (simp add: hcnj_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   579
apply (rule_tac f = Abs_hcomplex in arg_cong)
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   580
apply (auto, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   581
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   582
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   583
lemma hcomplex_hcnj_cancel_iff [iff]: "(hcnj x = hcnj y) = (x = y)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   584
apply (rule eq_Abs_hcomplex [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   585
apply (rule eq_Abs_hcomplex [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   586
apply (simp add: hcnj)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   587
done
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   588
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   589
lemma hcomplex_hcnj_hcnj [simp]: "hcnj (hcnj z) = z"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   590
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   591
apply (simp add: hcnj)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   592
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   593
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   594
lemma hcomplex_hcnj_hcomplex_of_hypreal [simp]:
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   595
     "hcnj (hcomplex_of_hypreal x) = hcomplex_of_hypreal x"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   596
apply (rule eq_Abs_hypreal [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   597
apply (simp add: hcnj hcomplex_of_hypreal)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   598
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   599
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   600
lemma hcomplex_hmod_hcnj [simp]: "hcmod (hcnj z) = hcmod z"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   601
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   602
apply (simp add: hcnj hcmod)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   603
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   604
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   605
lemma hcomplex_hcnj_minus: "hcnj (-z) = - hcnj z"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   606
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   607
apply (simp add: hcnj hcomplex_minus complex_cnj_minus)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   608
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   609
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   610
lemma hcomplex_hcnj_inverse: "hcnj(inverse z) = inverse(hcnj z)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   611
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   612
apply (simp add: hcnj hcomplex_inverse complex_cnj_inverse)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   613
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   614
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   615
lemma hcomplex_hcnj_add: "hcnj(w + z) = hcnj(w) + hcnj(z)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   616
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   617
apply (rule eq_Abs_hcomplex [of w])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   618
apply (simp add: hcnj hcomplex_add complex_cnj_add)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   619
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   620
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   621
lemma hcomplex_hcnj_diff: "hcnj(w - z) = hcnj(w) - hcnj(z)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   622
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   623
apply (rule eq_Abs_hcomplex [of w])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   624
apply (simp add: hcnj hcomplex_diff complex_cnj_diff)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   625
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   626
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   627
lemma hcomplex_hcnj_mult: "hcnj(w * z) = hcnj(w) * hcnj(z)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   628
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   629
apply (rule eq_Abs_hcomplex [of w])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   630
apply (simp add: hcnj hcomplex_mult complex_cnj_mult)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   631
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   632
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   633
lemma hcomplex_hcnj_divide: "hcnj(w / z) = (hcnj w)/(hcnj z)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   634
by (simp add: hcomplex_divide_def hcomplex_hcnj_mult hcomplex_hcnj_inverse)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   635
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   636
lemma hcnj_one [simp]: "hcnj 1 = 1"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   637
by (simp add: hcomplex_one_def hcnj)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   638
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   639
lemma hcomplex_hcnj_zero [simp]: "hcnj 0 = 0"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   640
by (simp add: hcomplex_zero_def hcnj)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   641
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   642
lemma hcomplex_hcnj_zero_iff [iff]: "(hcnj z = 0) = (z = 0)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   643
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   644
apply (simp add: hcomplex_zero_def hcnj)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   645
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   646
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   647
lemma hcomplex_mult_hcnj:
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   648
     "z * hcnj z = hcomplex_of_hypreal (hRe(z) ^ 2 + hIm(z) ^ 2)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   649
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   650
apply (simp add: hcnj hcomplex_mult hcomplex_of_hypreal hRe hIm hypreal_add
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   651
                      hypreal_mult complex_mult_cnj numeral_2_eq_2)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   652
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   653
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   654
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   655
subsection{*More Theorems about the Function @{term hcmod}*}
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   656
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   657
lemma hcomplex_hcmod_eq_zero_cancel [simp]: "(hcmod x = 0) = (x = 0)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   658
apply (rule eq_Abs_hcomplex [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   659
apply (simp add: hcmod hcomplex_zero_def hypreal_zero_num)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   660
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   661
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   662
lemma hcmod_hcomplex_of_hypreal_of_nat [simp]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   663
     "hcmod (hcomplex_of_hypreal(hypreal_of_nat n)) = hypreal_of_nat n"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   664
apply (simp add: abs_if linorder_not_less)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   665
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   666
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   667
lemma hcmod_hcomplex_of_hypreal_of_hypnat [simp]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   668
     "hcmod (hcomplex_of_hypreal(hypreal_of_hypnat n)) = hypreal_of_hypnat n"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   669
apply (simp add: abs_if linorder_not_less)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   670
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   671
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   672
lemma hcmod_minus [simp]: "hcmod (-x) = hcmod(x)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   673
apply (rule eq_Abs_hcomplex [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   674
apply (simp add: hcmod hcomplex_minus)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   675
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   676
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   677
lemma hcmod_mult_hcnj: "hcmod(z * hcnj(z)) = hcmod(z) ^ 2"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   678
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   679
apply (simp add: hcmod hcomplex_mult hcnj hypreal_mult complex_mod_mult_cnj numeral_2_eq_2)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   680
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   681
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   682
lemma hcmod_ge_zero [simp]: "(0::hypreal) \<le> hcmod x"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   683
apply (rule eq_Abs_hcomplex [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   684
apply (simp add: hcmod hypreal_zero_num hypreal_le)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   685
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   686
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   687
lemma hrabs_hcmod_cancel [simp]: "abs(hcmod x) = hcmod x"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   688
by (simp add: abs_if linorder_not_less)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   689
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   690
lemma hcmod_mult: "hcmod(x*y) = hcmod(x) * hcmod(y)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   691
apply (rule eq_Abs_hcomplex [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   692
apply (rule eq_Abs_hcomplex [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   693
apply (simp add: hcmod hcomplex_mult hypreal_mult complex_mod_mult)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   694
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   695
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   696
lemma hcmod_add_squared_eq:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   697
     "hcmod(x + y) ^ 2 = hcmod(x) ^ 2 + hcmod(y) ^ 2 + 2 * hRe(x * hcnj y)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   698
apply (rule eq_Abs_hcomplex [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   699
apply (rule eq_Abs_hcomplex [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   700
apply (simp add: hcmod hcomplex_add hypreal_mult hRe hcnj hcomplex_mult
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   701
                      numeral_2_eq_2 realpow_two [symmetric]
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   702
                  del: realpow_Suc)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   703
apply (simp add: numeral_2_eq_2 [symmetric] complex_mod_add_squared_eq
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   704
                 hypreal_add [symmetric] hypreal_mult [symmetric]
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   705
                 hypreal_of_real_def [symmetric])
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   706
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   707
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   708
lemma hcomplex_hRe_mult_hcnj_le_hcmod [simp]: "hRe(x * hcnj y) \<le> hcmod(x * hcnj y)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   709
apply (rule eq_Abs_hcomplex [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   710
apply (rule eq_Abs_hcomplex [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   711
apply (simp add: hcmod hcnj hcomplex_mult hRe hypreal_le)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   712
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   713
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   714
lemma hcomplex_hRe_mult_hcnj_le_hcmod2 [simp]: "hRe(x * hcnj y) \<le> hcmod(x * y)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   715
apply (cut_tac x = x and y = y in hcomplex_hRe_mult_hcnj_le_hcmod)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   716
apply (simp add: hcmod_mult)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   717
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   718
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   719
lemma hcmod_triangle_squared [simp]: "hcmod (x + y) ^ 2 \<le> (hcmod(x) + hcmod(y)) ^ 2"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   720
apply (rule eq_Abs_hcomplex [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   721
apply (rule eq_Abs_hcomplex [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   722
apply (simp add: hcmod hcnj hcomplex_add hypreal_mult hypreal_add
14323
27724f528f82 converting Complex/Complex.ML to Isar
paulson
parents: 14320
diff changeset
   723
                      hypreal_le realpow_two [symmetric] numeral_2_eq_2
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   724
            del: realpow_Suc)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   725
apply (simp add: numeral_2_eq_2 [symmetric])
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   726
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   727
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   728
lemma hcmod_triangle_ineq [simp]: "hcmod (x + y) \<le> hcmod(x) + hcmod(y)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   729
apply (rule eq_Abs_hcomplex [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   730
apply (rule eq_Abs_hcomplex [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   731
apply (simp add: hcmod hcomplex_add hypreal_add hypreal_le)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   732
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   733
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   734
lemma hcmod_triangle_ineq2 [simp]: "hcmod(b + a) - hcmod b \<le> hcmod a"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   735
apply (cut_tac x1 = b and y1 = a and c = "-hcmod b" in hcmod_triangle_ineq [THEN add_right_mono])
14331
8dbbb7cf3637 re-organized numeric lemmas
paulson
parents: 14323
diff changeset
   736
apply (simp add: add_ac)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   737
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   738
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   739
lemma hcmod_diff_commute: "hcmod (x - y) = hcmod (y - x)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   740
apply (rule eq_Abs_hcomplex [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   741
apply (rule eq_Abs_hcomplex [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   742
apply (simp add: hcmod hcomplex_diff complex_mod_diff_commute)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   743
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   744
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   745
lemma hcmod_add_less:
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   746
     "[| hcmod x < r; hcmod y < s |] ==> hcmod (x + y) < r + s"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   747
apply (rule eq_Abs_hcomplex [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   748
apply (rule eq_Abs_hcomplex [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   749
apply (rule eq_Abs_hypreal [of r])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   750
apply (rule eq_Abs_hypreal [of s])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   751
apply (simp add: hcmod hcomplex_add hypreal_add hypreal_less, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   752
apply (auto intro: complex_mod_add_less)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   753
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   754
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   755
lemma hcmod_mult_less:
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   756
     "[| hcmod x < r; hcmod y < s |] ==> hcmod (x * y) < r * s"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   757
apply (rule eq_Abs_hcomplex [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   758
apply (rule eq_Abs_hcomplex [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   759
apply (rule eq_Abs_hypreal [of r])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   760
apply (rule eq_Abs_hypreal [of s])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   761
apply (simp add: hcmod hypreal_mult hypreal_less hcomplex_mult, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   762
apply (auto intro: complex_mod_mult_less)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   763
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   764
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   765
lemma hcmod_diff_ineq [simp]: "hcmod(a) - hcmod(b) \<le> hcmod(a + b)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   766
apply (rule eq_Abs_hcomplex [of a])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   767
apply (rule eq_Abs_hcomplex [of b])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   768
apply (simp add: hcmod hcomplex_add hypreal_diff hypreal_le)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   769
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   770
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   771
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   772
subsection{*A Few Nonlinear Theorems*}
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   773
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   774
lemma hcpow:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   775
  "Abs_hcomplex(hcomplexrel``{%n. X n}) hcpow
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   776
   Abs_hypnat(hypnatrel``{%n. Y n}) =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   777
   Abs_hcomplex(hcomplexrel``{%n. X n ^ Y n})"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   778
apply (simp add: hcpow_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   779
apply (rule_tac f = Abs_hcomplex in arg_cong)
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   780
apply (auto, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   781
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   782
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   783
lemma hcomplex_of_hypreal_hyperpow:
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   784
     "hcomplex_of_hypreal (x pow n) = (hcomplex_of_hypreal x) hcpow n"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   785
apply (rule eq_Abs_hypreal [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   786
apply (rule eq_Abs_hypnat [of n])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   787
apply (simp add: hcomplex_of_hypreal hyperpow hcpow complex_of_real_pow)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   788
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   789
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   790
lemma hcmod_hcpow: "hcmod(x hcpow n) = hcmod(x) pow n"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   791
apply (rule eq_Abs_hcomplex [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   792
apply (rule eq_Abs_hypnat [of n])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   793
apply (simp add: hcpow hyperpow hcmod complex_mod_complexpow)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   794
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   795
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   796
lemma hcmod_hcomplex_inverse: "hcmod(inverse x) = inverse(hcmod x)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   797
apply (case_tac "x = 0", simp)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   798
apply (rule_tac c1 = "hcmod x" in hypreal_mult_left_cancel [THEN iffD1])
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   799
apply (auto simp add: hcmod_mult [symmetric])
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   800
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   801
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   802
lemma hcmod_divide: "hcmod(x/y) = hcmod(x)/(hcmod y)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   803
by (simp add: hcomplex_divide_def hypreal_divide_def hcmod_mult hcmod_hcomplex_inverse)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   804
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   805
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   806
subsection{*Exponentiation*}
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   807
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   808
primrec
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   809
     hcomplexpow_0:   "z ^ 0       = 1"
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   810
     hcomplexpow_Suc: "z ^ (Suc n) = (z::hcomplex) * (z ^ n)"
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   811
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   812
instance hcomplex :: ringpower
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   813
proof
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   814
  fix z :: hcomplex
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   815
  fix n :: nat
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   816
  show "z^0 = 1" by simp
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   817
  show "z^(Suc n) = z * (z^n)" by simp
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   818
qed
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   819
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   820
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   821
lemma hcomplex_of_hypreal_pow:
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   822
     "hcomplex_of_hypreal (x ^ n) = (hcomplex_of_hypreal x) ^ n"
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   823
apply (induct_tac "n")
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   824
apply (auto simp add: hcomplex_of_hypreal_mult [symmetric])
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   825
done
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   826
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   827
lemma hcomplex_hcnj_pow: "hcnj(z ^ n) = hcnj(z) ^ n"
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   828
apply (induct_tac "n")
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   829
apply (auto simp add: hcomplex_hcnj_mult)
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   830
done
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   831
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   832
lemma hcmod_hcomplexpow: "hcmod(x ^ n) = hcmod(x) ^ n"
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   833
apply (induct_tac "n")
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   834
apply (auto simp add: hcmod_mult)
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   835
done
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   836
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   837
lemma hcomplexpow_minus:
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   838
     "(-x::hcomplex) ^ n = (if even n then (x ^ n) else -(x ^ n))"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   839
by (induct_tac "n", auto)
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   840
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   841
lemma hcpow_minus:
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   842
     "(-x::hcomplex) hcpow n =
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   843
      (if ( *pNat* even) n then (x hcpow n) else -(x hcpow n))"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   844
apply (rule eq_Abs_hcomplex [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   845
apply (rule eq_Abs_hypnat [of n])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   846
apply (auto simp add: hcpow hyperpow starPNat hcomplex_minus, ultra)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   847
apply (auto simp add: complexpow_minus, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   848
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   849
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   850
lemma hcpow_mult: "((r::hcomplex) * s) hcpow n = (r hcpow n) * (s hcpow n)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   851
apply (rule eq_Abs_hcomplex [of r])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   852
apply (rule eq_Abs_hcomplex [of s])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   853
apply (rule eq_Abs_hypnat [of n])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   854
apply (simp add: hcpow hypreal_mult hcomplex_mult power_mult_distrib)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   855
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   856
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   857
lemma hcpow_zero [simp]: "0 hcpow (n + 1) = 0"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   858
apply (simp add: hcomplex_zero_def hypnat_one_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   859
apply (rule eq_Abs_hypnat [of n])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   860
apply (simp add: hcpow hypnat_add)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   861
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   862
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   863
lemma hcpow_zero2 [simp]: "0 hcpow (hSuc n) = 0"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   864
by (simp add: hSuc_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   865
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   866
lemma hcpow_not_zero [simp,intro]: "r \<noteq> 0 ==> r hcpow n \<noteq> (0::hcomplex)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   867
apply (rule eq_Abs_hcomplex [of r])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   868
apply (rule eq_Abs_hypnat [of n])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   869
apply (auto simp add: hcpow hcomplex_zero_def, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   870
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   871
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   872
lemma hcpow_zero_zero: "r hcpow n = (0::hcomplex) ==> r = 0"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   873
by (blast intro: ccontr dest: hcpow_not_zero)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   874
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   875
lemma hcomplex_i_mult_eq [simp]: "iii * iii = - 1"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   876
by (simp add: iii_def hcomplex_mult hcomplex_one_def hcomplex_minus)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   877
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   878
lemma hcomplexpow_i_squared [simp]: "iii ^ 2 = - 1"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   879
by (simp add: numeral_2_eq_2)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   880
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   881
lemma hcomplex_i_not_zero [simp]: "iii \<noteq> 0"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   882
by (simp add: iii_def hcomplex_zero_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   883
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   884
lemma hcomplex_divide:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   885
  "Abs_hcomplex(hcomplexrel``{%n. X n}) / Abs_hcomplex(hcomplexrel``{%n. Y n}) =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   886
   Abs_hcomplex(hcomplexrel``{%n. X n / Y n})"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   887
by (simp add: hcomplex_divide_def complex_divide_def hcomplex_inverse hcomplex_mult)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   888
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   889
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   890
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   891
subsection{*The Function @{term hsgn}*}
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   892
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   893
lemma hsgn:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   894
  "hsgn (Abs_hcomplex(hcomplexrel `` {%n. X n})) =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   895
      Abs_hcomplex(hcomplexrel `` {%n. sgn (X n)})"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   896
apply (simp add: hsgn_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   897
apply (rule_tac f = Abs_hcomplex in arg_cong)
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   898
apply (auto, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   899
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   900
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   901
lemma hsgn_zero [simp]: "hsgn 0 = 0"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   902
by (simp add: hcomplex_zero_def hsgn)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   903
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   904
lemma hsgn_one [simp]: "hsgn 1 = 1"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   905
by (simp add: hcomplex_one_def hsgn)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   906
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   907
lemma hsgn_minus: "hsgn (-z) = - hsgn(z)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   908
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   909
apply (simp add: hsgn hcomplex_minus sgn_minus)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   910
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   911
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   912
lemma hsgn_eq: "hsgn z = z / hcomplex_of_hypreal (hcmod z)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   913
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   914
apply (simp add: hsgn hcomplex_divide hcomplex_of_hypreal hcmod sgn_eq)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   915
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   916
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   917
lemma lemma_hypreal_P_EX2:
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   918
     "(\<exists>(x::hypreal) y. P x y) =
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   919
      (\<exists>f g. P (Abs_hypreal(hyprel `` {f})) (Abs_hypreal(hyprel `` {g})))"
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   920
apply auto
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   921
apply (rule_tac z = x in eq_Abs_hypreal)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   922
apply (rule_tac z = y in eq_Abs_hypreal, auto)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   923
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   924
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   925
lemma complex_split2:
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   926
     "\<forall>(n::nat). \<exists>x y. (z n) = complex_of_real(x) + ii * complex_of_real(y)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   927
by (blast intro: complex_split)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   928
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   929
(* Interesting proof! *)
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   930
lemma hcomplex_split:
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
   931
     "\<exists>x y. z = hcomplex_of_hypreal(x) + iii * hcomplex_of_hypreal(y)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   932
apply (rule eq_Abs_hcomplex [of z])
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   933
apply (auto simp add: lemma_hypreal_P_EX2 hcomplex_of_hypreal iii_def hcomplex_add hcomplex_mult)
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   934
apply (cut_tac z = x in complex_split2)
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   935
apply (drule choice, safe)+
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   936
apply (rule_tac x = f in exI)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   937
apply (rule_tac x = fa in exI, auto)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   938
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   939
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   940
lemma hRe_hcomplex_i [simp]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   941
     "hRe(hcomplex_of_hypreal(x) + iii * hcomplex_of_hypreal(y)) = x"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   942
apply (rule eq_Abs_hypreal [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   943
apply (rule eq_Abs_hypreal [of y])
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   944
apply (auto simp add: hRe iii_def hcomplex_add hcomplex_mult hcomplex_of_hypreal)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   945
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   946
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   947
lemma hIm_hcomplex_i [simp]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   948
     "hIm(hcomplex_of_hypreal(x) + iii * hcomplex_of_hypreal(y)) = y"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   949
apply (rule eq_Abs_hypreal [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   950
apply (rule eq_Abs_hypreal [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   951
apply (simp add: hIm iii_def hcomplex_add hcomplex_mult hcomplex_of_hypreal)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   952
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   953
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   954
lemma hcmod_i:
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   955
     "hcmod (hcomplex_of_hypreal(x) + iii * hcomplex_of_hypreal(y)) =
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   956
      ( *f* sqrt) (x ^ 2 + y ^ 2)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   957
apply (rule eq_Abs_hypreal [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   958
apply (rule eq_Abs_hypreal [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   959
apply (simp add: hcomplex_of_hypreal iii_def hcomplex_add hcomplex_mult starfun hypreal_mult hypreal_add hcmod cmod_i numeral_2_eq_2)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   960
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   961
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   962
lemma hcomplex_eq_hRe_eq:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   963
     "hcomplex_of_hypreal xa + iii * hcomplex_of_hypreal ya =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   964
      hcomplex_of_hypreal xb + iii * hcomplex_of_hypreal yb
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   965
       ==> xa = xb"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   966
apply (simp add: iii_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   967
apply (rule eq_Abs_hypreal [of xa])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   968
apply (rule eq_Abs_hypreal [of ya])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   969
apply (rule eq_Abs_hypreal [of xb])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   970
apply (rule eq_Abs_hypreal [of yb])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   971
apply (simp add: hcomplex_mult hcomplex_add hcomplex_of_hypreal, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   972
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   973
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   974
lemma hcomplex_eq_hIm_eq:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   975
     "hcomplex_of_hypreal xa + iii * hcomplex_of_hypreal ya =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   976
      hcomplex_of_hypreal xb + iii * hcomplex_of_hypreal yb
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   977
       ==> ya = yb"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   978
apply (simp add: iii_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   979
apply (rule eq_Abs_hypreal [of xa])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   980
apply (rule eq_Abs_hypreal [of ya])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   981
apply (rule eq_Abs_hypreal [of xb])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   982
apply (rule eq_Abs_hypreal [of yb])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   983
apply (simp add: hcomplex_mult hcomplex_add hcomplex_of_hypreal, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   984
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   985
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   986
lemma hcomplex_eq_cancel_iff [simp]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   987
     "(hcomplex_of_hypreal xa + iii * hcomplex_of_hypreal ya =
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   988
       hcomplex_of_hypreal xb + iii * hcomplex_of_hypreal yb) =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   989
      ((xa = xb) & (ya = yb))"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   990
by (auto intro: hcomplex_eq_hIm_eq hcomplex_eq_hRe_eq)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   991
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   992
lemma hcomplex_eq_cancel_iffA [iff]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   993
     "(hcomplex_of_hypreal xa + hcomplex_of_hypreal ya * iii =
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   994
       hcomplex_of_hypreal xb + hcomplex_of_hypreal yb * iii) = ((xa = xb) & (ya = yb))"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   995
apply (simp add: hcomplex_mult_commute)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   996
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
   997
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
   998
lemma hcomplex_eq_cancel_iffB [iff]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
   999
     "(hcomplex_of_hypreal xa + hcomplex_of_hypreal ya * iii =
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1000
       hcomplex_of_hypreal xb + iii * hcomplex_of_hypreal yb) = ((xa = xb) & (ya = yb))"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1001
apply (simp add: hcomplex_mult_commute)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1002
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1003
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1004
lemma hcomplex_eq_cancel_iffC [iff]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1005
     "(hcomplex_of_hypreal xa + iii * hcomplex_of_hypreal ya  =
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1006
       hcomplex_of_hypreal xb + hcomplex_of_hypreal yb * iii) = ((xa = xb) & (ya = yb))"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1007
apply (simp add: hcomplex_mult_commute)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1008
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1009
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1010
lemma hcomplex_eq_cancel_iff2 [simp]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1011
     "(hcomplex_of_hypreal x + iii * hcomplex_of_hypreal y =
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1012
      hcomplex_of_hypreal xa) = (x = xa & y = 0)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1013
apply (cut_tac xa = x and ya = y and xb = xa and yb = 0 in hcomplex_eq_cancel_iff)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1014
apply (simp del: hcomplex_eq_cancel_iff)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1015
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1016
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1017
lemma hcomplex_eq_cancel_iff2a [simp]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1018
     "(hcomplex_of_hypreal x + hcomplex_of_hypreal y * iii =
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1019
      hcomplex_of_hypreal xa) = (x = xa & y = 0)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1020
apply (simp add: hcomplex_mult_commute)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1021
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1022
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1023
lemma hcomplex_eq_cancel_iff3 [simp]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1024
     "(hcomplex_of_hypreal x + iii * hcomplex_of_hypreal y =
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1025
      iii * hcomplex_of_hypreal ya) = (x = 0 & y = ya)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1026
apply (cut_tac xa = x and ya = y and xb = 0 and yb = ya in hcomplex_eq_cancel_iff)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1027
apply (simp del: hcomplex_eq_cancel_iff)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1028
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1029
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1030
lemma hcomplex_eq_cancel_iff3a [simp]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1031
     "(hcomplex_of_hypreal x + hcomplex_of_hypreal y * iii =
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1032
      iii * hcomplex_of_hypreal ya) = (x = 0 & y = ya)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1033
apply (simp add: hcomplex_mult_commute)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1034
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1035
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1036
lemma hcomplex_split_hRe_zero:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1037
     "hcomplex_of_hypreal x + iii * hcomplex_of_hypreal y = 0
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1038
      ==> x = 0"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1039
apply (simp add: iii_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1040
apply (rule eq_Abs_hypreal [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1041
apply (rule eq_Abs_hypreal [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1042
apply (simp add: hcomplex_of_hypreal hcomplex_add hcomplex_mult hcomplex_zero_def hypreal_zero_num, ultra)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1043
apply (simp add: complex_split_Re_zero)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1044
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1045
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1046
lemma hcomplex_split_hIm_zero:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1047
     "hcomplex_of_hypreal x + iii * hcomplex_of_hypreal y = 0
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1048
      ==> y = 0"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1049
apply (simp add: iii_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1050
apply (rule eq_Abs_hypreal [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1051
apply (rule eq_Abs_hypreal [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1052
apply (simp add: hcomplex_of_hypreal hcomplex_add hcomplex_mult hcomplex_zero_def hypreal_zero_num, ultra)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1053
apply (simp add: complex_split_Im_zero)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1054
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1055
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1056
lemma hRe_hsgn [simp]: "hRe(hsgn z) = hRe(z)/hcmod z"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1057
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1058
apply (simp add: hsgn hcmod hRe hypreal_divide)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1059
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1060
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1061
lemma hIm_hsgn [simp]: "hIm(hsgn z) = hIm(z)/hcmod z"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1062
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1063
apply (simp add: hsgn hcmod hIm hypreal_divide)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1064
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1065
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1066
lemma real_two_squares_add_zero_iff [simp]: "(x*x + y*y = 0) = ((x::real) = 0 & y = 0)"
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1067
apply (auto intro: real_sum_squares_cancel)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1068
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1069
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1070
lemma hcomplex_inverse_complex_split:
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1071
     "inverse(hcomplex_of_hypreal x + iii * hcomplex_of_hypreal y) =
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1072
      hcomplex_of_hypreal(x/(x ^ 2 + y ^ 2)) -
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1073
      iii * hcomplex_of_hypreal(y/(x ^ 2 + y ^ 2))"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1074
apply (rule eq_Abs_hypreal [of x])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1075
apply (rule eq_Abs_hypreal [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1076
apply (simp add: hcomplex_of_hypreal hcomplex_mult hcomplex_add iii_def starfun hypreal_mult hypreal_add hcomplex_inverse hypreal_divide hcomplex_diff complex_inverse_complex_split numeral_2_eq_2)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1077
done
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1078
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1079
lemma hRe_mult_i_eq[simp]:
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1080
    "hRe (iii * hcomplex_of_hypreal y) = 0"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1081
apply (simp add: iii_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1082
apply (rule eq_Abs_hypreal [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1083
apply (simp add: hcomplex_of_hypreal hcomplex_mult hRe hypreal_zero_num)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1084
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1085
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1086
lemma hIm_mult_i_eq [simp]:
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1087
    "hIm (iii * hcomplex_of_hypreal y) = y"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1088
apply (simp add: iii_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1089
apply (rule eq_Abs_hypreal [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1090
apply (simp add: hcomplex_of_hypreal hcomplex_mult hIm hypreal_zero_num)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1091
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1092
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1093
lemma hcmod_mult_i [simp]: "hcmod (iii * hcomplex_of_hypreal y) = abs y"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1094
apply (rule eq_Abs_hypreal [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1095
apply (simp add: hcomplex_of_hypreal hcmod hypreal_hrabs iii_def hcomplex_mult)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1096
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1097
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1098
lemma hcmod_mult_i2 [simp]: "hcmod (hcomplex_of_hypreal y * iii) = abs y"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1099
by (simp add: hcomplex_mult_commute)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1100
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1101
(*---------------------------------------------------------------------------*)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1102
(*  harg                                                                     *)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1103
(*---------------------------------------------------------------------------*)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1104
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1105
lemma harg:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1106
  "harg (Abs_hcomplex(hcomplexrel `` {%n. X n})) =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1107
      Abs_hypreal(hyprel `` {%n. arg (X n)})"
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1108
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1109
apply (simp add: harg_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1110
apply (rule_tac f = Abs_hypreal in arg_cong)
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1111
apply (auto, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1112
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1113
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1114
lemma cos_harg_i_mult_zero_pos:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1115
     "0 < y ==> ( *f* cos) (harg(iii * hcomplex_of_hypreal y)) = 0"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1116
apply (rule eq_Abs_hypreal [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1117
apply (simp add: hcomplex_of_hypreal iii_def hcomplex_mult
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1118
                hypreal_zero_num hypreal_less starfun harg, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1119
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1120
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1121
lemma cos_harg_i_mult_zero_neg:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1122
     "y < 0 ==> ( *f* cos) (harg(iii * hcomplex_of_hypreal y)) = 0"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1123
apply (rule eq_Abs_hypreal [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1124
apply (simp add: hcomplex_of_hypreal iii_def hcomplex_mult
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1125
                      hypreal_zero_num hypreal_less starfun harg, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1126
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1127
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1128
lemma cos_harg_i_mult_zero [simp]:
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1129
     "y \<noteq> 0 ==> ( *f* cos) (harg(iii * hcomplex_of_hypreal y)) = 0"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1130
apply (cut_tac x = y and y = 0 in linorder_less_linear)
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1131
apply (auto simp add: cos_harg_i_mult_zero_pos cos_harg_i_mult_zero_neg)
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1132
done
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1133
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1134
lemma hcomplex_of_hypreal_zero_iff [simp]:
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1135
     "(hcomplex_of_hypreal y = 0) = (y = 0)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1136
apply (rule eq_Abs_hypreal [of y])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1137
apply (simp add: hcomplex_of_hypreal hypreal_zero_num hcomplex_zero_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1138
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1139
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1140
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1141
subsection{*Polar Form for Nonstandard Complex Numbers*}
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1142
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1143
lemma complex_split_polar2:
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1144
     "\<forall>n. \<exists>r a. (z n) = complex_of_real r *
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1145
      (complex_of_real(cos a) + ii * complex_of_real(sin a))"
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1146
apply (blast intro: complex_split_polar)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1147
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1148
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1149
lemma hcomplex_split_polar:
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1150
  "\<exists>r a. z = hcomplex_of_hypreal r *
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1151
   (hcomplex_of_hypreal(( *f* cos) a) + iii * hcomplex_of_hypreal(( *f* sin) a))"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1152
apply (rule eq_Abs_hcomplex [of z])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1153
apply (simp add: lemma_hypreal_P_EX2 hcomplex_of_hypreal iii_def starfun hcomplex_add hcomplex_mult)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1154
apply (cut_tac z = x in complex_split_polar2)
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1155
apply (drule choice, safe)+
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1156
apply (rule_tac x = f in exI)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1157
apply (rule_tac x = fa in exI, auto)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1158
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1159
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1160
lemma hcis:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1161
  "hcis (Abs_hypreal(hyprel `` {%n. X n})) =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1162
      Abs_hcomplex(hcomplexrel `` {%n. cis (X n)})"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1163
apply (simp add: hcis_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1164
apply (rule_tac f = Abs_hcomplex in arg_cong, auto, ultra)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1165
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1166
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1167
lemma hcis_eq:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1168
   "hcis a =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1169
    (hcomplex_of_hypreal(( *f* cos) a) +
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1170
    iii * hcomplex_of_hypreal(( *f* sin) a))"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1171
apply (rule eq_Abs_hypreal [of a])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1172
apply (simp add: starfun hcis hcomplex_of_hypreal iii_def hcomplex_mult hcomplex_add cis_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1173
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1174
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1175
lemma hrcis:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1176
  "hrcis (Abs_hypreal(hyprel `` {%n. X n})) (Abs_hypreal(hyprel `` {%n. Y n})) =
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1177
      Abs_hcomplex(hcomplexrel `` {%n. rcis (X n) (Y n)})"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1178
by (simp add: hrcis_def hcomplex_of_hypreal hcomplex_mult hcis rcis_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1179
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1180
lemma hrcis_Ex: "\<exists>r a. z = hrcis r a"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1181
apply (simp add: hrcis_def hcis_eq)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1182
apply (rule hcomplex_split_polar)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1183
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1184
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1185
lemma hRe_hcomplex_polar [simp]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1186
     "hRe(hcomplex_of_hypreal r *
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1187
      (hcomplex_of_hypreal(( *f* cos) a) +
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1188
       iii * hcomplex_of_hypreal(( *f* sin) a))) = r * ( *f* cos) a"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1189
by (simp add: right_distrib hcomplex_of_hypreal_mult mult_ac)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1190
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1191
lemma hRe_hrcis [simp]: "hRe(hrcis r a) = r * ( *f* cos) a"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1192
by (simp add: hrcis_def hcis_eq)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1193
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1194
lemma hIm_hcomplex_polar [simp]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1195
     "hIm(hcomplex_of_hypreal r *
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1196
      (hcomplex_of_hypreal(( *f* cos) a) +
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1197
       iii * hcomplex_of_hypreal(( *f* sin) a))) = r * ( *f* sin) a"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1198
by (simp add: right_distrib hcomplex_of_hypreal_mult mult_ac)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1199
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1200
lemma hIm_hrcis [simp]: "hIm(hrcis r a) = r * ( *f* sin) a"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1201
by (simp add: hrcis_def hcis_eq)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1202
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1203
lemma hcmod_complex_polar [simp]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1204
     "hcmod (hcomplex_of_hypreal r *
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1205
      (hcomplex_of_hypreal(( *f* cos) a) +
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1206
       iii * hcomplex_of_hypreal(( *f* sin) a))) = abs r"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1207
apply (rule eq_Abs_hypreal [of r])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1208
apply (rule eq_Abs_hypreal [of a])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1209
apply (simp add: iii_def starfun hcomplex_of_hypreal hcomplex_mult hcmod hcomplex_add hypreal_hrabs)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1210
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1211
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1212
lemma hcmod_hrcis [simp]: "hcmod(hrcis r a) = abs r"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1213
by (simp add: hrcis_def hcis_eq)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1214
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1215
(*---------------------------------------------------------------------------*)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1216
(*  (r1 * hrcis a) * (r2 * hrcis b) = r1 * r2 * hrcis (a + b)                *)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1217
(*---------------------------------------------------------------------------*)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1218
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1219
lemma hcis_hrcis_eq: "hcis a = hrcis 1 a"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1220
by (simp add: hrcis_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1221
declare hcis_hrcis_eq [symmetric, simp]
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1222
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1223
lemma hrcis_mult:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1224
  "hrcis r1 a * hrcis r2 b = hrcis (r1*r2) (a + b)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1225
apply (simp add: hrcis_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1226
apply (rule eq_Abs_hypreal [of r1])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1227
apply (rule eq_Abs_hypreal [of r2])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1228
apply (rule eq_Abs_hypreal [of a])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1229
apply (rule eq_Abs_hypreal [of b])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1230
apply (simp add: hrcis hcis hypreal_add hypreal_mult hcomplex_of_hypreal
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1231
                      hcomplex_mult cis_mult [symmetric]
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1232
                      complex_of_real_mult [symmetric])
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1233
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1234
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1235
lemma hcis_mult: "hcis a * hcis b = hcis (a + b)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1236
apply (rule eq_Abs_hypreal [of a])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1237
apply (rule eq_Abs_hypreal [of b])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1238
apply (simp add: hcis hcomplex_mult hypreal_add cis_mult)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1239
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1240
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1241
lemma hcis_zero [simp]: "hcis 0 = 1"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1242
by (simp add: hcomplex_one_def hcis hypreal_zero_num)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1243
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1244
lemma hrcis_zero_mod [simp]: "hrcis 0 a = 0"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1245
apply (simp add: hcomplex_zero_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1246
apply (rule eq_Abs_hypreal [of a])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1247
apply (simp add: hrcis hypreal_zero_num)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1248
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1249
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1250
lemma hrcis_zero_arg [simp]: "hrcis r 0 = hcomplex_of_hypreal r"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1251
apply (rule eq_Abs_hypreal [of r])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1252
apply (simp add: hrcis hypreal_zero_num hcomplex_of_hypreal)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1253
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1254
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1255
lemma hcomplex_i_mult_minus [simp]: "iii * (iii * x) = - x"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1256
by (simp add: hcomplex_mult_assoc [symmetric])
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1257
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1258
lemma hcomplex_i_mult_minus2 [simp]: "iii * iii * x = - x"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1259
by simp
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1260
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1261
lemma hcis_hypreal_of_nat_Suc_mult:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1262
   "hcis (hypreal_of_nat (Suc n) * a) = hcis a * hcis (hypreal_of_nat n * a)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1263
apply (rule eq_Abs_hypreal [of a])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1264
apply (simp add: hypreal_of_nat hcis hypreal_mult hcomplex_mult cis_real_of_nat_Suc_mult)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1265
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1266
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1267
lemma NSDeMoivre: "(hcis a) ^ n = hcis (hypreal_of_nat n * a)"
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1268
apply (induct_tac "n")
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1269
apply (simp_all add: hcis_hypreal_of_nat_Suc_mult)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1270
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1271
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1272
lemma hcis_hypreal_of_hypnat_Suc_mult:
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1273
     "hcis (hypreal_of_hypnat (n + 1) * a) =
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1274
      hcis a * hcis (hypreal_of_hypnat n * a)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1275
apply (rule eq_Abs_hypreal [of a])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1276
apply (rule eq_Abs_hypnat [of n])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1277
apply (simp add: hcis hypreal_of_hypnat hypnat_add hypnat_one_def hypreal_mult hcomplex_mult cis_real_of_nat_Suc_mult)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1278
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1279
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1280
lemma NSDeMoivre_ext: "(hcis a) hcpow n = hcis (hypreal_of_hypnat n * a)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1281
apply (rule eq_Abs_hypreal [of a])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1282
apply (rule eq_Abs_hypnat [of n])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1283
apply (simp add: hcis hypreal_of_hypnat hypreal_mult hcpow DeMoivre)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1284
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1285
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1286
lemma DeMoivre2:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1287
  "(hrcis r a) ^ n = hrcis (r ^ n) (hypreal_of_nat n * a)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1288
apply (simp add: hrcis_def power_mult_distrib NSDeMoivre hcomplex_of_hypreal_pow)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1289
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1290
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1291
lemma DeMoivre2_ext:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1292
  "(hrcis r a) hcpow n = hrcis (r pow n) (hypreal_of_hypnat n * a)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1293
apply (simp add: hrcis_def hcpow_mult NSDeMoivre_ext hcomplex_of_hypreal_hyperpow)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1294
done
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1295
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1296
lemma hcis_inverse [simp]: "inverse(hcis a) = hcis (-a)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1297
apply (rule eq_Abs_hypreal [of a])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1298
apply (simp add: hcomplex_inverse hcis hypreal_minus)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1299
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1300
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1301
lemma hrcis_inverse: "inverse(hrcis r a) = hrcis (inverse r) (-a)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1302
apply (rule eq_Abs_hypreal [of a])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1303
apply (rule eq_Abs_hypreal [of r])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1304
apply (simp add: hcomplex_inverse hrcis hypreal_minus hypreal_inverse rcis_inverse, ultra)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1305
apply (simp add: real_divide_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1306
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1307
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1308
lemma hRe_hcis [simp]: "hRe(hcis a) = ( *f* cos) a"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1309
apply (rule eq_Abs_hypreal [of a])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1310
apply (simp add: hcis starfun hRe)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1311
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1312
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1313
lemma hIm_hcis [simp]: "hIm(hcis a) = ( *f* sin) a"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1314
apply (rule eq_Abs_hypreal [of a])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1315
apply (simp add: hcis starfun hIm)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1316
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1317
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1318
lemma cos_n_hRe_hcis_pow_n: "( *f* cos) (hypreal_of_nat n * a) = hRe(hcis a ^ n)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1319
apply (simp add: NSDeMoivre)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1320
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1321
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1322
lemma sin_n_hIm_hcis_pow_n: "( *f* sin) (hypreal_of_nat n * a) = hIm(hcis a ^ n)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1323
apply (simp add: NSDeMoivre)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1324
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1325
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1326
lemma cos_n_hRe_hcis_hcpow_n: "( *f* cos) (hypreal_of_hypnat n * a) = hRe(hcis a hcpow n)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1327
apply (simp add: NSDeMoivre_ext)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1328
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1329
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1330
lemma sin_n_hIm_hcis_hcpow_n: "( *f* sin) (hypreal_of_hypnat n * a) = hIm(hcis a hcpow n)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1331
apply (simp add: NSDeMoivre_ext)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1332
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1333
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1334
lemma hexpi_add: "hexpi(a + b) = hexpi(a) * hexpi(b)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1335
apply (simp add: hexpi_def)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1336
apply (rule eq_Abs_hcomplex [of a])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1337
apply (rule eq_Abs_hcomplex [of b])
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1338
apply (simp add: hcis hRe hIm hcomplex_add hcomplex_mult hypreal_mult starfun hcomplex_of_hypreal cis_mult [symmetric] complex_Im_add complex_Re_add exp_add complex_of_real_mult)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1339
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1340
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1341
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1342
subsection{*@{term hcomplex_of_complex}: the Injection from
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1343
  type @{typ complex} to to @{typ hcomplex}*}
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1344
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1345
lemma inj_hcomplex_of_complex: "inj(hcomplex_of_complex)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1346
apply (rule inj_onI, rule ccontr)
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1347
apply (simp add: hcomplex_of_complex_def)
14354
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1348
done
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1349
988aa4648597 types complex and hcomplex are now instances of class ringpower:
paulson
parents: 14341
diff changeset
  1350
lemma hcomplex_of_complex_i: "iii = hcomplex_of_complex ii"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1351
by (simp add: iii_def hcomplex_of_complex_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1352
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1353
lemma hcomplex_of_complex_add [simp]:
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1354
     "hcomplex_of_complex (z1 + z2) = hcomplex_of_complex z1 + hcomplex_of_complex z2"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1355
by (simp add: hcomplex_of_complex_def hcomplex_add)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1356
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1357
lemma hcomplex_of_complex_mult [simp]:
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1358
     "hcomplex_of_complex (z1 * z2) = hcomplex_of_complex z1 * hcomplex_of_complex z2"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1359
by (simp add: hcomplex_of_complex_def hcomplex_mult)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1360
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1361
lemma hcomplex_of_complex_eq_iff [simp]:
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1362
     "(hcomplex_of_complex z1 = hcomplex_of_complex z2) = (z1 = z2)"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1363
by (simp add: hcomplex_of_complex_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1364
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1365
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1366
lemma hcomplex_of_complex_minus [simp]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1367
     "hcomplex_of_complex (-r) = - hcomplex_of_complex  r"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1368
by (simp add: hcomplex_of_complex_def hcomplex_minus)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1369
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1370
lemma hcomplex_of_complex_one [simp]: "hcomplex_of_complex 1 = 1"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1371
by (simp add: hcomplex_of_complex_def hcomplex_one_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1372
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1373
lemma hcomplex_of_complex_zero [simp]: "hcomplex_of_complex 0 = 0"
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1374
by (simp add: hcomplex_of_complex_def hcomplex_zero_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1375
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1376
lemma hcomplex_of_complex_zero_iff: "(hcomplex_of_complex r = 0) = (r = 0)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1377
by (auto intro: FreeUltrafilterNat_P simp add: hcomplex_of_complex_def hcomplex_zero_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1378
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1379
lemma hcomplex_of_complex_inverse [simp]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1380
     "hcomplex_of_complex (inverse r) = inverse (hcomplex_of_complex r)"
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1381
apply (case_tac "r=0")
14336
8f731d3cd65b Deleting more redundant theorems
paulson
parents: 14335
diff changeset
  1382
apply (simp add: hcomplex_of_complex_zero)
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1383
apply (rule_tac c1 = "hcomplex_of_complex r"
14336
8f731d3cd65b Deleting more redundant theorems
paulson
parents: 14335
diff changeset
  1384
       in hcomplex_mult_left_cancel [THEN iffD1])
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1385
apply (force simp add: hcomplex_of_complex_zero_iff)
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1386
apply (subst hcomplex_of_complex_mult [symmetric])
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1387
apply (simp add: hcomplex_of_complex_one hcomplex_of_complex_zero_iff)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1388
done
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1389
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1390
lemma hcomplex_of_complex_divide [simp]:
14335
9c0b5e081037 conversion of Real/PReal to Isar script;
paulson
parents: 14331
diff changeset
  1391
     "hcomplex_of_complex (z1 / z2) = hcomplex_of_complex z1 / hcomplex_of_complex z2"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1392
by (simp add: hcomplex_divide_def complex_divide_def)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1393
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1394
lemma hRe_hcomplex_of_complex:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1395
   "hRe (hcomplex_of_complex z) = hypreal_of_real (Re z)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1396
by (simp add: hcomplex_of_complex_def hypreal_of_real_def hRe)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1397
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1398
lemma hIm_hcomplex_of_complex:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1399
   "hIm (hcomplex_of_complex z) = hypreal_of_real (Im z)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1400
by (simp add: hcomplex_of_complex_def hypreal_of_real_def hIm)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1401
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1402
lemma hcmod_hcomplex_of_complex:
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1403
     "hcmod (hcomplex_of_complex x) = hypreal_of_real (cmod x)"
14374
61de62096768 further tidying of the complex numbers
paulson
parents: 14373
diff changeset
  1404
by (simp add: hypreal_of_real_def hcomplex_of_complex_def hcmod)
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1405
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1406
ML
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1407
{*
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1408
val hcomplex_zero_def = thm"hcomplex_zero_def";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1409
val hcomplex_one_def = thm"hcomplex_one_def";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1410
val hcomplex_minus_def = thm"hcomplex_minus_def";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1411
val hcomplex_diff_def = thm"hcomplex_diff_def";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1412
val hcomplex_divide_def = thm"hcomplex_divide_def";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1413
val hcomplex_mult_def = thm"hcomplex_mult_def";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1414
val hcomplex_add_def = thm"hcomplex_add_def";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1415
val hcomplex_of_complex_def = thm"hcomplex_of_complex_def";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1416
val iii_def = thm"iii_def";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1417
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1418
val hcomplexrel_iff = thm"hcomplexrel_iff";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1419
val hcomplexrel_refl = thm"hcomplexrel_refl";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1420
val hcomplexrel_sym = thm"hcomplexrel_sym";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1421
val hcomplexrel_trans = thm"hcomplexrel_trans";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1422
val equiv_hcomplexrel = thm"equiv_hcomplexrel";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1423
val equiv_hcomplexrel_iff = thm"equiv_hcomplexrel_iff";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1424
val hcomplexrel_in_hcomplex = thm"hcomplexrel_in_hcomplex";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1425
val inj_on_Abs_hcomplex = thm"inj_on_Abs_hcomplex";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1426
val inj_Rep_hcomplex = thm"inj_Rep_hcomplex";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1427
val lemma_hcomplexrel_refl = thm"lemma_hcomplexrel_refl";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1428
val hcomplex_empty_not_mem = thm"hcomplex_empty_not_mem";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1429
val Rep_hcomplex_nonempty = thm"Rep_hcomplex_nonempty";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1430
val eq_Abs_hcomplex = thm"eq_Abs_hcomplex";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1431
val hRe = thm"hRe";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1432
val hIm = thm"hIm";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1433
val hcomplex_hRe_hIm_cancel_iff = thm"hcomplex_hRe_hIm_cancel_iff";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1434
val hcomplex_hRe_zero = thm"hcomplex_hRe_zero";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1435
val hcomplex_hIm_zero = thm"hcomplex_hIm_zero";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1436
val hcomplex_hRe_one = thm"hcomplex_hRe_one";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1437
val hcomplex_hIm_one = thm"hcomplex_hIm_one";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1438
val inj_hcomplex_of_complex = thm"inj_hcomplex_of_complex";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1439
val hcomplex_of_complex_i = thm"hcomplex_of_complex_i";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1440
val hcomplex_add_congruent2 = thm"hcomplex_add_congruent2";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1441
val hcomplex_add = thm"hcomplex_add";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1442
val hcomplex_add_commute = thm"hcomplex_add_commute";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1443
val hcomplex_add_assoc = thm"hcomplex_add_assoc";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1444
val hcomplex_add_zero_left = thm"hcomplex_add_zero_left";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1445
val hcomplex_add_zero_right = thm"hcomplex_add_zero_right";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1446
val hRe_add = thm"hRe_add";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1447
val hIm_add = thm"hIm_add";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1448
val hcomplex_minus_congruent = thm"hcomplex_minus_congruent";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1449
val hcomplex_minus = thm"hcomplex_minus";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1450
val hcomplex_add_minus_left = thm"hcomplex_add_minus_left";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1451
val hRe_minus = thm"hRe_minus";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1452
val hIm_minus = thm"hIm_minus";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1453
val hcomplex_add_minus_eq_minus = thm"hcomplex_add_minus_eq_minus";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1454
val hcomplex_diff = thm"hcomplex_diff";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1455
val hcomplex_diff_eq_eq = thm"hcomplex_diff_eq_eq";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1456
val hcomplex_mult = thm"hcomplex_mult";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1457
val hcomplex_mult_commute = thm"hcomplex_mult_commute";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1458
val hcomplex_mult_assoc = thm"hcomplex_mult_assoc";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1459
val hcomplex_mult_one_left = thm"hcomplex_mult_one_left";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1460
val hcomplex_mult_one_right = thm"hcomplex_mult_one_right";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1461
val hcomplex_mult_zero_left = thm"hcomplex_mult_zero_left";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1462
val hcomplex_mult_minus_one = thm"hcomplex_mult_minus_one";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1463
val hcomplex_mult_minus_one_right = thm"hcomplex_mult_minus_one_right";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1464
val hcomplex_add_mult_distrib = thm"hcomplex_add_mult_distrib";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1465
val hcomplex_zero_not_eq_one = thm"hcomplex_zero_not_eq_one";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1466
val hcomplex_inverse = thm"hcomplex_inverse";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1467
val hcomplex_mult_inv_left = thm"hcomplex_mult_inv_left";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1468
val hcomplex_mult_left_cancel = thm"hcomplex_mult_left_cancel";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1469
val hcomplex_mult_right_cancel = thm"hcomplex_mult_right_cancel";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1470
val hcomplex_add_divide_distrib = thm"hcomplex_add_divide_distrib";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1471
val hcomplex_of_hypreal = thm"hcomplex_of_hypreal";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1472
val hcomplex_of_hypreal_cancel_iff = thm"hcomplex_of_hypreal_cancel_iff";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1473
val hcomplex_of_hypreal_minus = thm"hcomplex_of_hypreal_minus";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1474
val hcomplex_of_hypreal_inverse = thm"hcomplex_of_hypreal_inverse";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1475
val hcomplex_of_hypreal_add = thm"hcomplex_of_hypreal_add";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1476
val hcomplex_of_hypreal_diff = thm"hcomplex_of_hypreal_diff";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1477
val hcomplex_of_hypreal_mult = thm"hcomplex_of_hypreal_mult";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1478
val hcomplex_of_hypreal_divide = thm"hcomplex_of_hypreal_divide";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1479
val hcomplex_of_hypreal_one = thm"hcomplex_of_hypreal_one";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1480
val hcomplex_of_hypreal_zero = thm"hcomplex_of_hypreal_zero";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1481
val hcomplex_of_hypreal_pow = thm"hcomplex_of_hypreal_pow";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1482
val hRe_hcomplex_of_hypreal = thm"hRe_hcomplex_of_hypreal";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1483
val hIm_hcomplex_of_hypreal = thm"hIm_hcomplex_of_hypreal";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1484
val hcomplex_of_hypreal_epsilon_not_zero = thm"hcomplex_of_hypreal_epsilon_not_zero";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1485
val hcmod = thm"hcmod";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1486
val hcmod_zero = thm"hcmod_zero";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1487
val hcmod_one = thm"hcmod_one";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1488
val hcmod_hcomplex_of_hypreal = thm"hcmod_hcomplex_of_hypreal";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1489
val hcomplex_of_hypreal_abs = thm"hcomplex_of_hypreal_abs";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1490
val hcnj = thm"hcnj";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1491
val hcomplex_hcnj_cancel_iff = thm"hcomplex_hcnj_cancel_iff";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1492
val hcomplex_hcnj_hcnj = thm"hcomplex_hcnj_hcnj";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1493
val hcomplex_hcnj_hcomplex_of_hypreal = thm"hcomplex_hcnj_hcomplex_of_hypreal";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1494
val hcomplex_hmod_hcnj = thm"hcomplex_hmod_hcnj";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1495
val hcomplex_hcnj_minus = thm"hcomplex_hcnj_minus";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1496
val hcomplex_hcnj_inverse = thm"hcomplex_hcnj_inverse";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1497
val hcomplex_hcnj_add = thm"hcomplex_hcnj_add";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1498
val hcomplex_hcnj_diff = thm"hcomplex_hcnj_diff";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1499
val hcomplex_hcnj_mult = thm"hcomplex_hcnj_mult";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1500
val hcomplex_hcnj_divide = thm"hcomplex_hcnj_divide";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1501
val hcnj_one = thm"hcnj_one";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1502
val hcomplex_hcnj_pow = thm"hcomplex_hcnj_pow";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1503
val hcomplex_hcnj_zero = thm"hcomplex_hcnj_zero";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1504
val hcomplex_hcnj_zero_iff = thm"hcomplex_hcnj_zero_iff";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1505
val hcomplex_mult_hcnj = thm"hcomplex_mult_hcnj";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1506
val hcomplex_hcmod_eq_zero_cancel = thm"hcomplex_hcmod_eq_zero_cancel";
14371
c78c7da09519 Conversion of HyperNat to Isar format and its declaration as a semiring
paulson
parents: 14370
diff changeset
  1507
14314
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1508
val hcmod_hcomplex_of_hypreal_of_nat = thm"hcmod_hcomplex_of_hypreal_of_nat";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1509
val hcmod_hcomplex_of_hypreal_of_hypnat = thm"hcmod_hcomplex_of_hypreal_of_hypnat";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1510
val hcmod_minus = thm"hcmod_minus";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1511
val hcmod_mult_hcnj = thm"hcmod_mult_hcnj";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1512
val hcmod_ge_zero = thm"hcmod_ge_zero";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1513
val hrabs_hcmod_cancel = thm"hrabs_hcmod_cancel";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1514
val hcmod_mult = thm"hcmod_mult";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1515
val hcmod_add_squared_eq = thm"hcmod_add_squared_eq";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1516
val hcomplex_hRe_mult_hcnj_le_hcmod = thm"hcomplex_hRe_mult_hcnj_le_hcmod";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1517
val hcomplex_hRe_mult_hcnj_le_hcmod2 = thm"hcomplex_hRe_mult_hcnj_le_hcmod2";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1518
val hcmod_triangle_squared = thm"hcmod_triangle_squared";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1519
val hcmod_triangle_ineq = thm"hcmod_triangle_ineq";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1520
val hcmod_triangle_ineq2 = thm"hcmod_triangle_ineq2";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1521
val hcmod_diff_commute = thm"hcmod_diff_commute";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1522
val hcmod_add_less = thm"hcmod_add_less";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1523
val hcmod_mult_less = thm"hcmod_mult_less";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1524
val hcmod_diff_ineq = thm"hcmod_diff_ineq";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1525
val hcpow = thm"hcpow";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1526
val hcomplex_of_hypreal_hyperpow = thm"hcomplex_of_hypreal_hyperpow";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1527
val hcmod_hcomplexpow = thm"hcmod_hcomplexpow";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1528
val hcmod_hcpow = thm"hcmod_hcpow";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1529
val hcomplexpow_minus = thm"hcomplexpow_minus";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1530
val hcpow_minus = thm"hcpow_minus";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1531
val hcmod_hcomplex_inverse = thm"hcmod_hcomplex_inverse";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1532
val hcmod_divide = thm"hcmod_divide";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1533
val hcpow_mult = thm"hcpow_mult";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1534
val hcpow_zero = thm"hcpow_zero";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1535
val hcpow_zero2 = thm"hcpow_zero2";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1536
val hcpow_not_zero = thm"hcpow_not_zero";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1537
val hcpow_zero_zero = thm"hcpow_zero_zero";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1538
val hcomplex_i_mult_eq = thm"hcomplex_i_mult_eq";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1539
val hcomplexpow_i_squared = thm"hcomplexpow_i_squared";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1540
val hcomplex_i_not_zero = thm"hcomplex_i_not_zero";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1541
val hcomplex_divide = thm"hcomplex_divide";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1542
val hsgn = thm"hsgn";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1543
val hsgn_zero = thm"hsgn_zero";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1544
val hsgn_one = thm"hsgn_one";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1545
val hsgn_minus = thm"hsgn_minus";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1546
val hsgn_eq = thm"hsgn_eq";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1547
val lemma_hypreal_P_EX2 = thm"lemma_hypreal_P_EX2";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1548
val complex_split2 = thm"complex_split2";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1549
val hcomplex_split = thm"hcomplex_split";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1550
val hRe_hcomplex_i = thm"hRe_hcomplex_i";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1551
val hIm_hcomplex_i = thm"hIm_hcomplex_i";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1552
val hcmod_i = thm"hcmod_i";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1553
val hcomplex_eq_hRe_eq = thm"hcomplex_eq_hRe_eq";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1554
val hcomplex_eq_hIm_eq = thm"hcomplex_eq_hIm_eq";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1555
val hcomplex_eq_cancel_iff = thm"hcomplex_eq_cancel_iff";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1556
val hcomplex_eq_cancel_iffA = thm"hcomplex_eq_cancel_iffA";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1557
val hcomplex_eq_cancel_iffB = thm"hcomplex_eq_cancel_iffB";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1558
val hcomplex_eq_cancel_iffC = thm"hcomplex_eq_cancel_iffC";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1559
val hcomplex_eq_cancel_iff2 = thm"hcomplex_eq_cancel_iff2";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1560
val hcomplex_eq_cancel_iff2a = thm"hcomplex_eq_cancel_iff2a";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1561
val hcomplex_eq_cancel_iff3 = thm"hcomplex_eq_cancel_iff3";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1562
val hcomplex_eq_cancel_iff3a = thm"hcomplex_eq_cancel_iff3a";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1563
val hcomplex_split_hRe_zero = thm"hcomplex_split_hRe_zero";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1564
val hcomplex_split_hIm_zero = thm"hcomplex_split_hIm_zero";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1565
val hRe_hsgn = thm"hRe_hsgn";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1566
val hIm_hsgn = thm"hIm_hsgn";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1567
val real_two_squares_add_zero_iff = thm"real_two_squares_add_zero_iff";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1568
val hcomplex_inverse_complex_split = thm"hcomplex_inverse_complex_split";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1569
val hRe_mult_i_eq = thm"hRe_mult_i_eq";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1570
val hIm_mult_i_eq = thm"hIm_mult_i_eq";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1571
val hcmod_mult_i = thm"hcmod_mult_i";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1572
val hcmod_mult_i2 = thm"hcmod_mult_i2";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1573
val harg = thm"harg";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1574
val cos_harg_i_mult_zero = thm"cos_harg_i_mult_zero";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1575
val hcomplex_of_hypreal_zero_iff = thm"hcomplex_of_hypreal_zero_iff";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1576
val complex_split_polar2 = thm"complex_split_polar2";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1577
val hcomplex_split_polar = thm"hcomplex_split_polar";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1578
val hcis = thm"hcis";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1579
val hcis_eq = thm"hcis_eq";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1580
val hrcis = thm"hrcis";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1581
val hrcis_Ex = thm"hrcis_Ex";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1582
val hRe_hcomplex_polar = thm"hRe_hcomplex_polar";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1583
val hRe_hrcis = thm"hRe_hrcis";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1584
val hIm_hcomplex_polar = thm"hIm_hcomplex_polar";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1585
val hIm_hrcis = thm"hIm_hrcis";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1586
val hcmod_complex_polar = thm"hcmod_complex_polar";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1587
val hcmod_hrcis = thm"hcmod_hrcis";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1588
val hcis_hrcis_eq = thm"hcis_hrcis_eq";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1589
val hrcis_mult = thm"hrcis_mult";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1590
val hcis_mult = thm"hcis_mult";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1591
val hcis_zero = thm"hcis_zero";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1592
val hrcis_zero_mod = thm"hrcis_zero_mod";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1593
val hrcis_zero_arg = thm"hrcis_zero_arg";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1594
val hcomplex_i_mult_minus = thm"hcomplex_i_mult_minus";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1595
val hcomplex_i_mult_minus2 = thm"hcomplex_i_mult_minus2";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1596
val hcis_hypreal_of_nat_Suc_mult = thm"hcis_hypreal_of_nat_Suc_mult";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1597
val NSDeMoivre = thm"NSDeMoivre";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1598
val hcis_hypreal_of_hypnat_Suc_mult = thm"hcis_hypreal_of_hypnat_Suc_mult";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1599
val NSDeMoivre_ext = thm"NSDeMoivre_ext";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1600
val DeMoivre2 = thm"DeMoivre2";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1601
val DeMoivre2_ext = thm"DeMoivre2_ext";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1602
val hcis_inverse = thm"hcis_inverse";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1603
val hrcis_inverse = thm"hrcis_inverse";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1604
val hRe_hcis = thm"hRe_hcis";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1605
val hIm_hcis = thm"hIm_hcis";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1606
val cos_n_hRe_hcis_pow_n = thm"cos_n_hRe_hcis_pow_n";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1607
val sin_n_hIm_hcis_pow_n = thm"sin_n_hIm_hcis_pow_n";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1608
val cos_n_hRe_hcis_hcpow_n = thm"cos_n_hRe_hcis_hcpow_n";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1609
val sin_n_hIm_hcis_hcpow_n = thm"sin_n_hIm_hcis_hcpow_n";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1610
val hexpi_add = thm"hexpi_add";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1611
val hcomplex_of_complex_add = thm"hcomplex_of_complex_add";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1612
val hcomplex_of_complex_mult = thm"hcomplex_of_complex_mult";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1613
val hcomplex_of_complex_eq_iff = thm"hcomplex_of_complex_eq_iff";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1614
val hcomplex_of_complex_minus = thm"hcomplex_of_complex_minus";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1615
val hcomplex_of_complex_one = thm"hcomplex_of_complex_one";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1616
val hcomplex_of_complex_zero = thm"hcomplex_of_complex_zero";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1617
val hcomplex_of_complex_zero_iff = thm"hcomplex_of_complex_zero_iff";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1618
val hcomplex_of_complex_inverse = thm"hcomplex_of_complex_inverse";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1619
val hcomplex_of_complex_divide = thm"hcomplex_of_complex_divide";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1620
val hRe_hcomplex_of_complex = thm"hRe_hcomplex_of_complex";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1621
val hIm_hcomplex_of_complex = thm"hIm_hcomplex_of_complex";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1622
val hcmod_hcomplex_of_complex = thm"hcmod_hcomplex_of_complex";
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1623
*}
314da085adf3 converted Complex/NSComplex to Isar script
paulson
parents: 13957
diff changeset
  1624
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
  1625
end