src/HOL/Complex/CStar.thy
author wenzelm
Sat, 17 Jun 2006 19:37:53 +0200
changeset 19912 4a3e35fd6e02
parent 19765 dfe940911617
child 20559 2116b7a371c7
permissions -rw-r--r--
added singleton;
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       : CStar.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
*)
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
     5
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
     6
header{*Star-transforms in NSA, Extending Sets of Complex Numbers
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
     7
      and Complex Functions*}
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
     8
15131
c69542757a4d New theory header syntax.
nipkow
parents: 14469
diff changeset
     9
theory CStar
15140
322485b816ac import -> imports
nipkow
parents: 15131
diff changeset
    10
imports NSCA
15131
c69542757a4d New theory header syntax.
nipkow
parents: 14469
diff changeset
    11
begin
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    12
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    13
subsection{*Properties of the *-Transform Applied to Sets of Reals*}
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    14
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    15
lemma STARC_SComplex_subset: "SComplex \<subseteq> *s* (UNIV:: complex set)"
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    16
by simp
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    17
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    18
lemma STARC_hcomplex_of_complex_Int:
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    19
     "*s* X Int SComplex = hcomplex_of_complex ` X"
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    20
by (auto simp add: SComplex_def STAR_mem_iff)
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    21
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    22
lemma lemma_not_hcomplexA:
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    23
     "x \<notin> hcomplex_of_complex ` A ==> \<forall>y \<in> A. x \<noteq> hcomplex_of_complex y"
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    24
by auto
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    25
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    26
subsection{*Theorems about Nonstandard Extensions of Functions*}
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    27
15234
ec91a90c604e simplification tweaks for better arithmetic reasoning
paulson
parents: 15169
diff changeset
    28
lemma cstarfun_if_eq:
ec91a90c604e simplification tweaks for better arithmetic reasoning
paulson
parents: 15169
diff changeset
    29
     "w \<noteq> hcomplex_of_complex x
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    30
       ==> ( *f* (\<lambda>z. if z = x then a else g z)) w = ( *f* g) w"
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    31
apply (cases w)
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    32
apply (simp add: star_of_def starfun star_n_eq_iff, ultra)
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    33
done
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    34
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    35
lemma starfun_capprox:
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    36
    "( *f* f) (hcomplex_of_complex a) @c= hcomplex_of_complex (f a)"
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    37
by auto
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    38
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    39
lemma starfunC_hcpow: "( *f* (%z. z ^ n)) Z = Z hcpow hypnat_of_nat n"
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    40
apply (cases Z)
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    41
apply (simp add: hcpow starfun hypnat_of_nat_eq)
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    42
done
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    43
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    44
lemma starfun_mult_CFinite_capprox:
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    45
    "[| ( *f* f) y @c= l; ( *f* g) y @c= m; l: CFinite; m: CFinite |]
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    46
     ==>  ( *f* (%x. f x * g x)) y @c= l * m"
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    47
apply (drule capprox_mult_CFinite, assumption+)
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    48
apply (auto intro: capprox_sym [THEN [2] capprox_CFinite])
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    49
done
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    50
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    51
lemma starfun_add_capprox:
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    52
    "[| ( *f* f) y @c= l; ( *f* g) y @c= m |]
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    53
     ==>  ( *f* (%x. f x + g x)) y @c= l + m"
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    54
by (auto intro: capprox_add)
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    55
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    56
lemma starfunCR_cmod: "*f* cmod = hcmod"
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    57
apply (rule ext)
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    58
apply (rule_tac x = x in star_cases)
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    59
apply (simp add: starfun hcmod)
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    60
done
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    61
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    62
subsection{*Internal Functions - Some Redundancy With *f* Now*}
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    63
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    64
(** subtraction: ( *fn) - ( *gn) = *(fn - gn) **)
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    65
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    66
lemma starfun_n_diff:
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    67
   "( *fn* f) z - ( *fn* g) z = ( *fn* (%i x. f i x - g i x)) z"
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    68
apply (cases z)
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    69
apply (simp add: starfun_n star_n_diff)
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    70
done
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    71
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    72
(** composition: ( *fn) o ( *gn) = *(fn o gn) **)
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    73
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    74
lemma starfunC_eq_Re_Im_iff:
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    75
    "(( *f* f) x = z) = ((( *f* (%x. Re(f x))) x = hRe (z)) &
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    76
                          (( *f* (%x. Im(f x))) x = hIm (z)))"
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    77
apply (cases x, cases z)
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    78
apply (auto simp add: starfun hIm hRe complex_Re_Im_cancel_iff star_n_eq_iff, ultra+)
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    79
done
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    80
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    81
lemma starfunC_approx_Re_Im_iff:
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    82
    "(( *f* f) x @c= z) = ((( *f* (%x. Re(f x))) x @= hRe (z)) &
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    83
                            (( *f* (%x. Im(f x))) x @= hIm (z)))"
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    84
apply (cases x, cases z)
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    85
apply (simp add: starfun hIm hRe capprox_approx_iff)
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    86
done
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    87
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    88
lemma starfunC_Idfun_capprox:
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    89
    "x @c= hcomplex_of_complex a ==> ( *f* (%x. x)) x @c= hcomplex_of_complex  a"
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    90
by simp
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    91
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    92
end