forked from OpenMath/OMSTD
-
Notifications
You must be signed in to change notification settings - Fork 0
/
arith1.ocd
888 lines (852 loc) · 22 KB
/
arith1.ocd
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
<CD xmlns="http://www.openmath.org/OpenMathCD">
<CDComment>
This document is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The copyright holder grants you permission to redistribute this
document freely as a verbatim copy. Furthermore, the copyright
holder permits you to develop any derived work from this document
provided that the following conditions are met.
a) The derived work acknowledges the fact that it is derived from
this document, and maintains a prominent reference in the
work to the original source.
b) The fact that the derived work is not the original OpenMath
document is stated prominently in the derived work. Moreover if
both this document and the derived work are Content Dictionaries
then the derived work must include a different CDName element,
chosen so that it cannot be confused with any works adopted by
the OpenMath Society. In particular, if there is a Content
Dictionary Group whose name is, for example, `math' containing
Content Dictionaries named `math1', `math2' etc., then you should
not name a derived Content Dictionary `mathN' where N is an integer.
However you are free to name it `private_mathN' or some such. This
is because the names `mathN' may be used by the OpenMath Society
for future extensions.
c) The derived work is distributed under terms that allow the
compilation of derived works, but keep paragraphs a) and b)
intact. The simplest way to do this is to distribute the derived
work under the OpenMath license, but this is not a requirement.
If you have questions about this license please contact the OpenMath
society at http://www.openmath.org.
</CDComment>
<CDName>arith1</CDName>
<CDBase>http://www.openmath.org/cd</CDBase>
<CDURL>http://www.openmath.org/cd/arith1.ocd</CDURL>
<CDReviewDate>2006-03-30</CDReviewDate>
<CDStatus>official</CDStatus>
<CDDate>2004-03-30</CDDate>
<CDVersion>3</CDVersion>
<CDRevision>1</CDRevision>
<CDComment>
Author: OpenMath Consortium
SourceURL: https://github.com/OpenMath/CDs
</CDComment>
<Description>
This CD defines symbols for common arithmetic functions.
</Description>
<CDDefinition>
<Name>lcm</Name>
<Role>application</Role>
<Description>
The symbol to represent the n-ary function to return the least common
multiple of its arguments.
</Description>
<CMP> lcm(a,b) = a*b/gcd(a,b) </CMP>
<FMP>
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="arith1" name="lcm"/>
<OMV name="a"/>
<OMV name="b"/>
</OMA>
<OMA>
<OMS cd="arith1" name="divide"/>
<OMA>
<OMS cd="arith1" name="times"/>
<OMV name="a"/>
<OMV name="b"/>
</OMA>
<OMA>
<OMS cd="arith1" name="gcd"/>
<OMV name="a"/>
<OMV name="b"/>
</OMA>
</OMA>
</OMA>
</OMOBJ>
</FMP>
<CMP>
for all integers a,b |
There does not exist a c>0 such that c/a is an Integer and c/b is an
Integer and lcm(a,b) > c.
</CMP>
<FMP>
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMBIND>
<OMS cd="quant1" name="forall"/>
<OMBVAR>
<OMV name="a"/>
<OMV name="b"/>
</OMBVAR>
<OMA>
<OMS cd="logic1" name="implies"/>
<OMA>
<OMS cd="logic1" name="and"/>
<OMA>
<OMS cd="set1" name="in"/>
<OMV name="a"/>
<OMS cd="setname1" name="Z"/>
</OMA>
<OMA>
<OMS cd="set1" name="in"/>
<OMV name="b"/>
<OMS cd="setname1" name="Z"/>
</OMA>
</OMA>
<OMA>
<OMS cd="logic1" name="not"/>
<OMBIND>
<OMS cd="quant1" name="exists"/>
<OMBVAR>
<OMV name="c"/>
</OMBVAR>
<OMA>
<OMS cd="logic1" name="and"/>
<OMA>
<OMS cd="relation1" name="gt"/>
<OMV name="c"/>
<OMI>0</OMI>
</OMA>
<OMA>
<OMS cd="integer1" name="factorof"/>
<OMV name="a"/>
<OMV name="c"/>
</OMA>
<OMA>
<OMS cd="integer1" name="factorof"/>
<OMV name="b"/>
<OMV name="c"/>
</OMA>
<OMA>
<OMS cd="relation1" name="lt"/>
<OMV name="c"/>
<OMA>
<OMS cd="arith1" name="lcm"/>
<OMV name="a"/>
<OMV name="b"/>
</OMA>
</OMA>
</OMA>
</OMBIND>
</OMA>
</OMA>
</OMBIND>
</OMOBJ>
</FMP>
</CDDefinition>
<CDDefinition>
<Name>gcd</Name>
<Role>application</Role>
<Description>
The symbol to represent the n-ary function to return the gcd (greatest
common divisor) of its arguments.
</Description>
<CMP>
for all integers a,b |
There does not exist a c such that a/c is an Integer and b/c is an
Integer and c > gcd(a,b).
Note that this implies that gcd(a,b) > 0
</CMP>
<FMP>
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMBIND>
<OMS cd="quant1" name="forall"/>
<OMBVAR>
<OMV name="a"/>
<OMV name="b"/>
</OMBVAR>
<OMA>
<OMS cd="logic1" name="implies"/>
<OMA>
<OMS cd="logic1" name="and"/>
<OMA>
<OMS cd="set1" name="in"/>
<OMV name="a"/>
<OMS cd="setname1" name="Z"/>
</OMA>
<OMA>
<OMS cd="set1" name="in"/>
<OMV name="b"/>
<OMS cd="setname1" name="Z"/>
</OMA>
</OMA>
<OMA>
<OMS cd="logic1" name="not"/>
<OMBIND>
<OMS cd="quant1" name="exists"/>
<OMBVAR>
<OMV name="c"/>
</OMBVAR>
<OMA>
<OMS cd="logic1" name="and"/>
<OMA>
<OMS cd="set1" name="in"/>
<OMA>
<OMS cd="arith1" name="divide"/>
<OMV name="a"/>
<OMV name="c"/>
</OMA>
<OMS cd="setname1" name="Z"/>
</OMA>
<OMA>
<OMS cd="set1" name="in"/>
<OMA>
<OMS cd="arith1" name="divide"/>
<OMV name="b"/>
<OMV name="c"/>
</OMA>
<OMS cd="setname1" name="Z"/>
</OMA>
<OMA>
<OMS cd="relation1" name="gt"/>
<OMV name="c"/>
<OMA>
<OMS cd="arith1" name="gcd"/>
<OMV name="a"/>
<OMV name="b"/>
</OMA>
</OMA>
</OMA>
</OMBIND>
</OMA>
</OMA>
</OMBIND>
</OMOBJ>
</FMP>
<Example>
gcd(6,9) = 3
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="arith1" name="gcd"/>
<OMI> 6 </OMI>
<OMI> 9 </OMI>
</OMA>
<OMI> 3 </OMI>
</OMA>
</OMOBJ>
</Example>
</CDDefinition>
<CDDefinition>
<Name>plus</Name>
<Role>application</Role>
<Description>
The symbol representing an n-ary commutative function plus.
</Description>
<CMP> for all a,b | a + b = b + a </CMP>
<FMP>
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMBIND>
<OMS cd="quant1" name="forall"/>
<OMBVAR>
<OMV name="a"/>
<OMV name="b"/>
</OMBVAR>
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="arith1" name="plus"/>
<OMV name="a"/>
<OMV name="b"/>
</OMA>
<OMA>
<OMS cd="arith1" name="plus"/>
<OMV name="b"/>
<OMV name="a"/>
</OMA>
</OMA>
</OMBIND>
</OMOBJ>
</FMP>
</CDDefinition>
<CDDefinition>
<Name>unary_minus</Name>
<Role>application</Role>
<Description>
This symbol denotes unary minus, i.e. the additive inverse.
</Description>
<CMP> for all a | a + (-a) = 0 </CMP>
<FMP>
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMBIND>
<OMS cd="quant1" name="forall"/>
<OMBVAR>
<OMV name="a"/>
</OMBVAR>
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="arith1" name="plus"/>
<OMV name="a"/>
<OMA>
<OMS cd="arith1" name="unary_minus"/>
<OMV name="a"/>
</OMA>
</OMA>
<OMS cd="alg1" name="zero"/>
</OMA>
</OMBIND>
</OMOBJ>
</FMP>
</CDDefinition>
<CDDefinition>
<Name>minus</Name>
<Role>application</Role>
<Description>
The symbol representing a binary minus function. This is equivalent to
adding the additive inverse.
</Description>
<CMP> for all a,b | a - b = a + (-b) </CMP>
<FMP>
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMBIND>
<OMS cd="quant1" name="forall"/>
<OMBVAR>
<OMV name="a"/>
<OMV name="b"/>
</OMBVAR>
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="arith1" name="minus"/>
<OMV name="a"/>
<OMV name="b"/>
</OMA>
<OMA>
<OMS cd="arith1" name="plus"/>
<OMV name="a"/>
<OMA>
<OMS cd="arith1" name="unary_minus"/>
<OMV name="b"/>
</OMA>
</OMA>
</OMA>
</OMBIND>
</OMOBJ>
</FMP>
</CDDefinition>
<CDDefinition>
<Name>times</Name>
<Role>application</Role>
<Description>
The symbol representing an n-ary multiplication function.
</Description>
<Example>
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="arith1" name="times"/>
<OMA>
<OMS cd="linalg2" name="matrix"/>
<OMA>
<OMS cd="linalg2" name="matrixrow"/>
<OMI> 1 </OMI>
<OMI> 2 </OMI>
</OMA>
<OMA>
<OMS cd="linalg2" name="matrixrow"/>
<OMI> 3 </OMI>
<OMI> 4 </OMI>
</OMA>
</OMA>
<OMA>
<OMS cd="linalg2" name="matrix"/>
<OMA>
<OMS cd="linalg2" name="matrixrow"/>
<OMI> 5 </OMI>
<OMI> 6 </OMI>
</OMA>
<OMA>
<OMS cd="linalg2" name="matrixrow"/>
<OMI> 7 </OMI>
<OMI> 8 </OMI>
</OMA>
</OMA>
</OMA>
<OMA>
<OMS cd="linalg2" name="matrix"/>
<OMA>
<OMS cd="linalg2" name="matrixrow"/>
<OMI> 19 </OMI>
<OMI> 22 </OMI>
</OMA>
<OMA>
<OMS cd="linalg2" name="matrixrow"/>
<OMI> 43 </OMI>
<OMI> 50 </OMI>
</OMA>
</OMA>
</OMA>
</OMOBJ>
</Example>
<CMP> for all a,b | a * 0 = 0 and a * b = a * (b - 1) + a </CMP>
<FMP><OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMBIND>
<OMS cd="quant1" name="forall"/>
<OMBVAR>
<OMV name="a"/>
<OMV name="b"/>
</OMBVAR>
<OMA>
<OMS cd="logic1" name="and"/>
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="arith1" name="times"/>
<OMV name="a"/>
<OMS cd="alg1" name="zero"/>
</OMA>
<OMS cd="alg1" name="zero"/>
</OMA>
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="arith1" name="times"/>
<OMV name="a"/>
<OMV name="b"/>
</OMA>
<OMA>
<OMS cd="arith1" name="plus"/>
<OMA>
<OMS cd="arith1" name="times"/>
<OMV name="a"/>
<OMA>
<OMS cd="arith1" name="minus"/>
<OMV name="b"/>
<OMS cd="alg1" name="one"/>
</OMA>
</OMA>
<OMV name="a"/>
</OMA>
</OMA>
</OMA>
</OMBIND>
</OMOBJ></FMP>
<CMP> for all a,b,c | a*(b+c) = a*b + a*c </CMP>
<FMP><OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMBIND>
<OMS cd="quant1" name="forall"/>
<OMBVAR>
<OMV name="a"/>
<OMV name="b"/>
<OMV name="c"/>
</OMBVAR>
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="arith1" name="times"/>
<OMV name="a"/>
<OMA>
<OMS cd="arith1" name="plus"/>
<OMV name="b"/>
<OMV name="c"/>
</OMA>
</OMA>
<OMA>
<OMS cd="arith1" name="plus"/>
<OMA>
<OMS cd="arith1" name="times"/>
<OMV name="a"/>
<OMV name="b"/>
</OMA>
<OMA>
<OMS cd="arith1" name="times"/>
<OMV name="a"/>
<OMV name="c"/>
</OMA>
</OMA>
</OMA>
</OMBIND>
</OMOBJ></FMP>
</CDDefinition>
<CDDefinition>
<Name>divide</Name>
<Role>application</Role>
<Description>
This symbol represents a (binary) division function denoting the first argument
right-divided by the second, i.e. divide(a,b)=a*inverse(b). It is the
inverse of the multiplication function defined by the symbol times in this CD.
</Description>
<CMP> whenever not(a=0) then a/a = 1 </CMP>
<FMP>
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMBIND>
<OMS cd="quant1" name="forall"/>
<OMBVAR>
<OMV name="a"/>
</OMBVAR>
<OMA>
<OMS cd="logic1" name="implies"/>
<OMA>
<OMS cd="relation1" name="neq"/>
<OMV name="a"/>
<OMS cd="alg1" name="zero"/>
</OMA>
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="arith1" name="divide"/>
<OMV name="a"/>
<OMV name="a"/>
</OMA>
<OMS cd="alg1" name="one"/>
</OMA>
</OMA>
</OMBIND>
</OMOBJ>
</FMP>
</CDDefinition>
<CDDefinition>
<Name>power</Name>
<Role>application</Role>
<Description>
This symbol represents a power function. The first argument is raised
to the power of the second argument. When the second argument is not
an integer, powering is defined in terms of exponentials and
logarithms for the complex and real numbers.
This operator can represent general powering.
</Description>
<CMP>
x\in C implies x^a = exp(a ln x)
</CMP>
<FMP>
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="logic1" name="implies"/>
<OMA>
<OMS cd="set1" name="in"/>
<OMV name="x"/>
<OMS cd="setname1" name="C"/>
</OMA>
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS name="power" cd="arith1"/>
<OMV name="x"/>
<OMV name="a"/>
</OMA>
<OMA>
<OMS name="exp" cd="transc1"/>
<OMA>
<OMS name="times" cd="arith1"/>
<OMV name="a"/>
<OMA>
<OMS name="ln" cd="transc1"/>
<OMV name="x"/>
</OMA>
</OMA>
</OMA>
</OMA>
</OMA>
</OMOBJ>
</FMP>
<CMP>
if n is an integer then
x^0 = 1,
x^n = x * x^(n-1)
</CMP>
<FMP>
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="logic1" name="implies"/>
<OMA>
<OMS cd="set1" name="in"/>
<OMV name="n"/>
<OMS cd="setname1" name="Z"/>
</OMA>
<OMA>
<OMS cd="logic1" name="and"/>
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="arith1" name="power"/>
<OMV name="x"/>
<OMI>0</OMI>
</OMA>
<OMS cd="alg1" name="one"/>
</OMA>
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="arith1" name="power"/>
<OMV name="x"/>
<OMV name="n"/>
</OMA>
<OMA>
<OMS cd="arith1" name="times"/>
<OMV name="x"/>
<OMA>
<OMS cd="arith1" name="power"/>
<OMV name="x"/>
<OMA>
<OMS cd="arith1" name="minus"/>
<OMV name="n"/>
<OMI>1</OMI>
</OMA>
</OMA>
</OMA>
</OMA>
</OMA>
</OMA>
</OMOBJ>
</FMP>
<Example>
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="arith1" name="power"/>
<OMA>
<OMS cd="linalg2" name="matrix"/>
<OMA>
<OMS cd="linalg2" name="matrixrow"/>
<OMI> 1 </OMI>
<OMI> 2 </OMI>
</OMA>
<OMA>
<OMS cd="linalg2" name="matrixrow"/>
<OMI> 3 </OMI>
<OMI> 4 </OMI>
</OMA>
</OMA>
<OMI>3</OMI>
</OMA>
<OMA>
<OMS cd="linalg2" name="matrix"/>
<OMA>
<OMS cd="linalg2" name="matrixrow"/>
<OMI> 37 </OMI>
<OMI> 54 </OMI>
</OMA>
<OMA>
<OMS cd="linalg2" name="matrixrow"/>
<OMI> 81 </OMI>
<OMI> 118 </OMI>
</OMA>
</OMA>
</OMA>
</OMOBJ>
</Example>
<Example>
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="arith1" name="power"/>
<OMS cd="nums1" name="e"/>
<OMA>
<OMS cd="arith1" name="times"/>
<OMS cd="nums1" name="i"/>
<OMS cd="nums1" name="pi"/>
</OMA>
</OMA>
<OMA>
<OMS cd="arith1" name="unary_minus"/>
<OMS cd="alg1" name="one"/>
</OMA>
</OMA>
</OMOBJ>
</Example>
</CDDefinition>
<CDDefinition>
<Name>abs</Name>
<Role>application</Role>
<Description>
A unary operator which represents the absolute value of its
argument. The argument should be numerically valued.
In the complex case this is often referred to as the modulus.
</Description>
<CMP> for all x,y | abs(x) + abs(y) >= abs(x+y) </CMP>
<FMP>
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMBIND>
<OMS cd="quant1" name="forall"/>
<OMBVAR>
<OMV name="x"/>
<OMV name="y"/>
</OMBVAR>
<OMA>
<OMS cd="relation1" name="geq"/>
<OMA>
<OMS cd="arith1" name="plus"/>
<OMA>
<OMS cd="arith1" name="abs"/>
<OMV name="x"/>
</OMA>
<OMA>
<OMS cd="arith1" name="abs"/>
<OMV name="y"/>
</OMA>
</OMA>
<OMA>
<OMS cd="arith1" name="abs"/>
<OMA>
<OMS cd="arith1" name="plus"/>
<OMV name="x"/>
<OMV name="y"/>
</OMA>
</OMA>
</OMA>
</OMBIND>
</OMOBJ>
</FMP>
</CDDefinition>
<CDDefinition>
<Name>root</Name>
<Role>application</Role>
<Description>
A binary operator which represents its first argument "lowered" to its
n'th root where n is the second argument. This is the inverse of the operation
represented by the power symbol defined in this CD.
Care should be taken as to the precise meaning of this operator, in
particular which root is represented, however it is here to represent
the general notion of taking n'th roots. As inferred by the signature
relevant to this symbol, the function represented by this symbol is
the single valued function, the specific root returned is the one
indicated by the first CMP. Note also that the converse of the second
CMP is not valid in general.
</Description>
<CMP> x\in C implies root(x,n) = exp(ln(x)/n) </CMP>
<FMP>
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="logic1" name="implies"/>
<OMA>
<OMS cd="set1" name="in"/>
<OMV name="x"/>
<OMS cd="setname1" name="C"/>
</OMA>
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="arith1" name="root"/>
<OMV name="x"/>
<OMV name="n"/>
</OMA>
<OMA>
<OMS name="exp" cd="transc1"/>
<OMA>
<OMS name="divide" cd="arith1"/>
<OMA>
<OMS name="ln" cd="transc1"/>
<OMV name="x"/>
</OMA>
<OMV name="n"/>
</OMA>
</OMA>
</OMA>
</OMA>
</OMOBJ>
</FMP>
<CMP> for all a,n | power(root(a,n),n) = a (if the root exists!) </CMP>
<FMP>
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMBIND>
<OMS cd="quant1" name="forall"/>
<OMBVAR>
<OMV name="a"/>
<OMV name="n"/>
</OMBVAR>
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="arith1" name="power"/>
<OMA>
<OMS cd="arith1" name="root"/>
<OMV name="a"/>
<OMV name="n"/>
</OMA>
<OMV name="n"/>
</OMA>
<OMV name="a"/>
</OMA>
</OMBIND>
</OMOBJ>
</FMP>
</CDDefinition>
<CDDefinition>
<Name>sum</Name>
<Role>application</Role>
<Description>
An operator taking two arguments, the first being the range of summation,
e.g. an integral interval, the second being the function to be
summed. Note that the sum may be over an infinite interval.
</Description>
<Example>
This represents the summation of the reciprocals of all the integers between
1 and 10 inclusive.
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="arith1" name="sum"/>
<OMA>
<OMS cd="interval1" name="integer_interval"/>
<OMI> 1 </OMI>
<OMI> 10 </OMI>
</OMA>
<OMBIND>
<OMS cd="fns1" name="lambda"/>
<OMBVAR>
<OMV name="x"/>
</OMBVAR>
<OMA>
<OMS cd="arith1" name="divide"/>
<OMI> 1 </OMI>
<OMV name="x"/>
</OMA>
</OMBIND>
</OMA>
</OMOBJ>
</Example>
</CDDefinition>
<CDDefinition>
<Name>product</Name>
<Role>application</Role>
<Description>
An operator taking two arguments, the first being the range of multiplication
e.g. an integral interval, the second being the function to
be multiplied. Note that the product may be over an infinite interval.
</Description>
<Example>
This represents the statement that the factorial of n is equal to the product
of all the integers between 1 and n inclusive.
<OMOBJ xmlns="http://www.openmath.org/OpenMath" version="2.0" cdbase="http://www.openmath.org/cd">
<OMA>
<OMS cd="relation1" name="eq"/>
<OMA>
<OMS cd="integer1" name="factorial"/>
<OMV name="n"/>
</OMA>
<OMA>
<OMS cd="arith1" name="product"/>
<OMA>
<OMS cd="interval1" name="integer_interval"/>
<OMI> 1 </OMI>
<OMV name="n"/>
</OMA>
<OMBIND>
<OMS cd="fns1" name="lambda"/>
<OMBVAR>
<OMV name="i"/>
</OMBVAR>
<OMV name="i"/>
</OMBIND>
</OMA>
</OMA>
</OMOBJ>
</Example>
</CDDefinition>
</CD>