equal
deleted
inserted
replaced
17 typedef (REAL) |
17 typedef (REAL) |
18 real = "UNIV//realrel" (Equiv.quotient_def) |
18 real = "UNIV//realrel" (Equiv.quotient_def) |
19 |
19 |
20 |
20 |
21 instance |
21 instance |
22 real :: {ord, zero, plus, times, minus, inverse} |
22 real :: {ord, zero, one, plus, times, minus, inverse} |
23 |
23 |
24 consts |
24 consts |
25 "1r" :: real ("1r") |
|
26 |
|
27 (*Overloaded constants denoting the Nat and Real subsets of enclosing |
25 (*Overloaded constants denoting the Nat and Real subsets of enclosing |
28 types such as hypreal and complex*) |
26 types such as hypreal and complex*) |
29 Nats, Reals :: "'a set" |
27 Nats, Reals :: "'a set" |
30 |
28 |
31 (*overloaded constant for injecting other types into "real"*) |
29 (*overloaded constant for injecting other types into "real"*) |
36 |
34 |
37 real_zero_def |
35 real_zero_def |
38 "0 == Abs_REAL(realrel``{(preal_of_prat(prat_of_pnat 1p), |
36 "0 == Abs_REAL(realrel``{(preal_of_prat(prat_of_pnat 1p), |
39 preal_of_prat(prat_of_pnat 1p))})" |
37 preal_of_prat(prat_of_pnat 1p))})" |
40 real_one_def |
38 real_one_def |
41 "1r == Abs_REAL(realrel``{(preal_of_prat(prat_of_pnat 1p) + |
39 "1 == Abs_REAL(realrel``{(preal_of_prat(prat_of_pnat 1p) + |
42 preal_of_prat(prat_of_pnat 1p),preal_of_prat(prat_of_pnat 1p))})" |
40 preal_of_prat(prat_of_pnat 1p),preal_of_prat(prat_of_pnat 1p))})" |
43 |
41 |
44 real_minus_def |
42 real_minus_def |
45 "- R == Abs_REAL(UN (x,y):Rep_REAL(R). realrel``{(y,x)})" |
43 "- R == Abs_REAL(UN (x,y):Rep_REAL(R). realrel``{(y,x)})" |
46 |
44 |
47 real_diff_def |
45 real_diff_def |
48 "R - (S::real) == R + - S" |
46 "R - (S::real) == R + - S" |
49 |
47 |
50 real_inverse_def |
48 real_inverse_def |
51 "inverse (R::real) == (SOME S. (R = 0 & S = 0) | S * R = 1r)" |
49 "inverse (R::real) == (SOME S. (R = 0 & S = 0) | S * R = 1)" |
52 |
50 |
53 real_divide_def |
51 real_divide_def |
54 "R / (S::real) == R * inverse S" |
52 "R / (S::real) == R * inverse S" |
55 |
53 |
56 constdefs |
54 constdefs |
67 |
65 |
68 |
66 |
69 defs |
67 defs |
70 |
68 |
71 (*overloaded*) |
69 (*overloaded*) |
72 real_of_nat_def "real n == real_of_posnat n + (- 1r)" |
70 real_of_nat_def "real n == real_of_posnat n + (- 1)" |
73 |
71 |
74 real_add_def |
72 real_add_def |
75 "P+Q == Abs_REAL(UN p1:Rep_REAL(P). UN p2:Rep_REAL(Q). |
73 "P+Q == Abs_REAL(UN p1:Rep_REAL(P). UN p2:Rep_REAL(Q). |
76 (%(x1,y1). (%(x2,y2). realrel``{(x1+x2, y1+y2)}) p2) p1)" |
74 (%(x1,y1). (%(x2,y2). realrel``{(x1+x2, y1+y2)}) p2) p1)" |
77 |
75 |