src/HOL/Complex/CStar.thy
author urbanc
Tue, 13 Dec 2005 18:11:21 +0100
changeset 18396 b3e7da94b51f
parent 17318 bc1c75855f3d
child 19765 dfe940911617
permissions -rw-r--r--
added a fresh_left lemma that contains all instantiation for the various atom-types.
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
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    39
(*
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    40
Goal "( *fNat* (%n. z ^ n)) N = (hcomplex_of_complex z) hcpow N"
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    41
*)
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    42
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    43
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
    44
apply (cases Z)
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    45
apply (simp add: hcpow starfun hypnat_of_nat_eq)
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    46
done
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    47
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    48
lemma starfun_mult_CFinite_capprox:
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    49
    "[| ( *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
    50
     ==>  ( *f* (%x. f x * g x)) y @c= l * m"
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    51
apply (drule capprox_mult_CFinite, assumption+)
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    52
apply (auto intro: capprox_sym [THEN [2] capprox_CFinite])
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    53
done
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    54
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    55
lemma starfun_add_capprox:
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    56
    "[| ( *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
    57
     ==>  ( *f* (%x. f x + g x)) y @c= l + m"
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    58
by (auto intro: capprox_add)
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    59
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    60
lemma starfunCR_cmod: "*f* cmod = hcmod"
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    61
apply (rule ext)
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    62
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
    63
apply (simp add: starfun hcmod)
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    64
done
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    65
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    66
subsection{*Internal Functions - Some Redundancy With *f* Now*}
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    67
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    68
(** subtraction: ( *fn) - ( *gn) = *(fn - gn) **)
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    69
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    70
lemma starfun_n_diff:
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    71
   "( *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
    72
apply (cases z)
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    73
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
    74
done
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    75
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    76
(** composition: ( *fn) o ( *gn) = *(fn o gn) **)
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    77
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    78
lemma starfunC_eq_Re_Im_iff:
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    79
    "(( *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
    80
                          (( *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
    81
apply (cases x, cases z)
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    82
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
    83
done
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    84
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    85
lemma starfunC_approx_Re_Im_iff:
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    86
    "(( *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
    87
                            (( *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
    88
apply (cases x, cases z)
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    89
apply (simp add: starfun hIm hRe capprox_approx_iff)
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    90
done
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    91
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    92
lemma starfunC_Idfun_capprox:
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
    93
    "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
    94
by simp
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    95
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    96
ML
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    97
{*
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    98
val STARC_SComplex_subset = thm "STARC_SComplex_subset";
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
    99
val STARC_hcomplex_of_complex_Int = thm "STARC_hcomplex_of_complex_Int";
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
   100
val lemma_not_hcomplexA = thm "lemma_not_hcomplexA";
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
   101
val starfun_capprox = thm "starfun_capprox";
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
   102
val starfunC_hcpow = thm "starfunC_hcpow";
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
   103
val starfun_mult_CFinite_capprox = thm "starfun_mult_CFinite_capprox";
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
   104
val starfun_add_capprox = thm "starfun_add_capprox";
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
   105
val starfunCR_cmod = thm "starfunCR_cmod";
17318
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
   106
val starfun_inverse_inverse = thm "starfun_inverse_inverse";
bc1c75855f3d starfun, starset, and other functions on NS types are now polymorphic;
huffman
parents: 17300
diff changeset
   107
val starfun_n_diff = thm "starfun_n_diff";
14407
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
   108
val starfunC_eq_Re_Im_iff = thm "starfunC_eq_Re_Im_iff";
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
   109
val starfunC_approx_Re_Im_iff = thm "starfunC_approx_Re_Im_iff";
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
   110
val starfunC_Idfun_capprox = thm "starfunC_Idfun_capprox";
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
   111
*}
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
   112
043bf0d9e9b5 conversion of Complex/CStar to Isar script
paulson
parents: 13957
diff changeset
   113
end