-
Notifications
You must be signed in to change notification settings - Fork 0
/
complex.trig
174 lines (147 loc) · 4.5 KB
/
complex.trig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# ---------------
# Complex numbers
# ---------------
#
# See https://en.wikipedia.org/wiki/Complex_number.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix complex: <http://eyereasoner.github.io/complex#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix var: <http://www.w3.org/2000/10/swap/var#>.
@prefix : <http://example.org/#>.
# exponentiation
_:bng_1 log:isImpliedBy _:bng_2.
_:bng_1 {
((var:A var:B) (var:C var:D)) complex:exponentiation (var:E var:F).
}
_:bng_2 {
(var:A var:B) complex:polar (var:R var:T).
(var:R var:C) math:exponentiation var:Z1.
var:D math:negation var:Z2.
(var:Z2 var:T) math:product var:Z3.
(2.718281828459045 var:Z3) math:exponentiation var:Z4.
(2.718281828459045 var:Z5) math:exponentiation var:R.
(var:D var:Z5) math:product var:Z6.
(var:C var:T) math:product var:Z7.
(var:Z6 var:Z7) math:sum var:Z8.
var:Z8 math:cos var:Z9.
(var:Z1 var:Z4 var:Z9) math:product var:E.
var:Z8 math:sin var:Z10.
(var:Z1 var:Z4 var:Z10) math:product var:F.
}
# asin
_:bng_3 log:isImpliedBy _:bng_4.
_:bng_3 {
(var:A var:B) complex:asin (var:C var:D).
}
_:bng_4 {
(1 var:A) math:sum var:Z1.
(var:Z1 2) math:exponentiation var:Z2.
(var:B 2) math:exponentiation var:Z3.
(var:Z2 var:Z3) math:sum var:Z4.
(var:Z4 0.5) math:exponentiation var:Z5.
(1 var:A) math:difference var:Z6.
(var:Z6 2) math:exponentiation var:Z7.
(var:Z7 var:Z3) math:sum var:Z8.
(var:Z8 0.5) math:exponentiation var:Z9.
(var:Z5 var:Z9) math:difference var:Z10.
(var:Z10 2) math:quotient var:E.
(var:Z5 var:Z9) math:sum var:Z11.
(var:Z11 2) math:quotient var:F.
var:E math:asin var:C.
(var:F 2) math:exponentiation var:Z12.
(var:Z12 1) math:difference var:Z13.
(var:Z13 0.5) math:exponentiation var:Z14.
(var:F var:Z14) math:sum var:Z15.
(2.718281828459045 var:D) math:exponentiation var:Z15.
}
# acos
_:bng_5 log:isImpliedBy _:bng_6.
_:bng_5 {
(var:A var:B) complex:acos (var:C var:D).
}
_:bng_6 {
(1 var:A) math:sum var:Z1.
(var:Z1 2) math:exponentiation var:Z2.
(var:B 2) math:exponentiation var:Z3.
(var:Z2 var:Z3) math:sum var:Z4.
(var:Z4 0.5) math:exponentiation var:Z5.
(1 var:A) math:difference var:Z6.
(var:Z6 2) math:exponentiation var:Z7.
(var:Z7 var:Z3) math:sum var:Z8.
(var:Z8 0.5) math:exponentiation var:Z9.
(var:Z5 var:Z9) math:difference var:Z10.
(var:Z10 2) math:quotient var:E.
(var:Z5 var:Z9) math:sum var:Z11.
(var:Z11 2) math:quotient var:F.
var:E math:acos var:C.
(var:F 2) math:exponentiation var:Z12.
(var:Z12 1) math:difference var:Z13.
(var:Z13 0.5) math:exponentiation var:Z14.
(var:F var:Z14) math:sum var:Z15.
(2.718281828459045 var:U) math:exponentiation var:Z15.
var:U math:negation var:D.
}
# polar
_:bng_7 log:isImpliedBy _:bng_8.
_:bng_7 {
(var:X var:Y) complex:polar(var:R var:Tp).
}
_:bng_8 {
(var:X 2) math:exponentiation var:Z1.
(var:Y 2) math:exponentiation var:Z2.
(var:Z1 var:Z2) math:sum var:Z3.
(var:Z3 0.5) math:exponentiation var:R.
var:X math:absoluteValue var:Z4.
(var:Z4 var:R) math:quotient var:Z5.
var:Z5 math:acos var:T.
(var:X var:Y var:T) complex:dial var:Tp.
}
# dial
_:bng_9 log:isImpliedBy _:bng_10.
_:bng_9 {
(var:X var:Y var:T) complex:dial var:Tp.
}
_:bng_10 {
var:X math:notLessThan 0.
var:Y math:notLessThan 0.
(0 var:T) math:sum var:Tp.
}
_:bng_11 log:isImpliedBy _:bng_12.
_:bng_11 {
(var:X var:Y var:T) complex:dial var:Tp.
}
_:bng_12 {
var:X math:lessThan 0.
var:Y math:notLessThan 0.
(3.141592653589793 var:T) math:difference var:Tp.
}
_:bng_13 log:isImpliedBy _:bng_14.
_:bng_13 {
(var:X var:Y var:T) complex:dial var:Tp.
}
_:bng_14 {
var:X math:lessThan 0.
var:Y math:lessThan 0.
(3.141592653589793 var:T) math:sum var:Tp.
}
_:bng_15 log:isImpliedBy _:bng_16.
_:bng_15 {
(var:X var:Y var:T) complex:dial var:Tp.
}
_:bng_16 {
var:X math:notLessThan 0.
var:Y math:lessThan 0.
(3.141592653589793 2) math:product var:Z1.
(var:Z1 var:T) math:difference var:Tp.
}
# query
_:bng_17 log:query _:bng_17.
_:bng_17 {
((-1 0) (0.5 0)) complex:exponentiation var:C1.
((2.718281828459045 0) (0 3.141592653589793)) complex:exponentiation var:C2.
((0 1) (0 1)) complex:exponentiation var:C3.
((2.718281828459045 0) (-1.57079632679 0)) complex:exponentiation var:C4.
(2 0) complex:asin var:C5.
(2 0) complex:acos var:C6.
}