src/HOL/Hyperreal/Transcendental.thy
author paulson
Thu, 01 Jul 2004 12:29:53 +0200
changeset 15013 34264f5e4691
parent 13958 c1c67582c9b5
child 15077 89840837108e
permissions -rw-r--r--
new treatment of binary numerals
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12196
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
     1
(*  Title       : Transcendental.thy
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
     2
    Author      : Jacques D. Fleuriot
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
     3
    Copyright   : 1998,1999 University of Cambridge
13958
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents: 12196
diff changeset
     4
                  1999,2001 University of Edinburgh
12196
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
     5
    Description : Power Series, transcendental functions etc.
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
     6
*)
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
     7
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
     8
Transcendental = NthRoot + Fact + HSeries + EvenOdd + Lim + 
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
     9
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    10
constdefs
15013
34264f5e4691 new treatment of binary numerals
paulson
parents: 13958
diff changeset
    11
    root :: "[nat,real] => real"
12196
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    12
    "root n x == (@u. ((0::real) < x --> 0 < u) & (u ^ n = x))"
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    13
15013
34264f5e4691 new treatment of binary numerals
paulson
parents: 13958
diff changeset
    14
    sqrt :: "real => real"
12196
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    15
    "sqrt x == root 2 x"
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    16
15013
34264f5e4691 new treatment of binary numerals
paulson
parents: 13958
diff changeset
    17
    exp :: "real => real"
12196
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    18
    "exp x == suminf(%n. inverse(real (fact n)) * (x ^ n))"
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    19
15013
34264f5e4691 new treatment of binary numerals
paulson
parents: 13958
diff changeset
    20
    sin :: "real => real"
12196
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    21
    "sin x == suminf(%n. (if even(n) then 0 else
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    22
             ((- 1) ^ ((n - Suc 0) div 2))/(real (fact n))) * x ^ n)"
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    23
 
15013
34264f5e4691 new treatment of binary numerals
paulson
parents: 13958
diff changeset
    24
    diffs :: "(nat => real) => nat => real"
12196
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    25
    "diffs c == (%n. real (Suc n) * c(Suc n))"
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    26
15013
34264f5e4691 new treatment of binary numerals
paulson
parents: 13958
diff changeset
    27
    cos :: "real => real"
12196
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    28
    "cos x == suminf(%n. (if even(n) then ((- 1) ^ (n div 2))/(real (fact n)) 
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    29
                          else 0) * x ^ n)"
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    30
  
15013
34264f5e4691 new treatment of binary numerals
paulson
parents: 13958
diff changeset
    31
    ln :: "real => real"
12196
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    32
    "ln x == (@u. exp u = x)"
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    33
15013
34264f5e4691 new treatment of binary numerals
paulson
parents: 13958
diff changeset
    34
    pi :: "real"
12196
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    35
    "pi == 2 * (@x. 0 <= (x::real) & x <= 2 & cos x = 0)"
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    36
15013
34264f5e4691 new treatment of binary numerals
paulson
parents: 13958
diff changeset
    37
    tan :: "real => real"
12196
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    38
    "tan x == (sin x)/(cos x)"
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    39
15013
34264f5e4691 new treatment of binary numerals
paulson
parents: 13958
diff changeset
    40
    arcsin :: "real => real"
12196
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    41
    "arcsin y == (@x. -(pi/2) <= x & x <= pi/2 & sin x = y)"
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    42
15013
34264f5e4691 new treatment of binary numerals
paulson
parents: 13958
diff changeset
    43
    arcos :: "real => real"
12196
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    44
    "arcos y == (@x. 0 <= x & x <= pi & cos x = y)"
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    45
     
15013
34264f5e4691 new treatment of binary numerals
paulson
parents: 13958
diff changeset
    46
    arctan :: "real => real"
12196
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    47
    "arctan y == (@x. -(pi/2) < x & x < pi/2 & tan x = y)"
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    48
  
a3be6b3a9c0b new theories from Jacques Fleuriot
paulson
parents:
diff changeset
    49
end