aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/strap/DIFRING-.lsp
blob: b3562e916845a5ca0c6f7b32bf98c4c4ce3cbc1b (plain)
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
(/VERSIONCHECK 2) 

(DECLAIM (FTYPE (FUNCTION (|%Thing| |%Shell|) |%Thing|)
                |DIFRING-;D;2S;1|)) 

(DECLAIM (FTYPE (FUNCTION (|%Thing| (|%IntegerSection| 0) |%Shell|)
                    |%Thing|)
                |DIFRING-;differentiate;SNniS;2|)) 

(DECLAIM (FTYPE (FUNCTION (|%Thing| (|%IntegerSection| 0) |%Shell|)
                    |%Thing|)
                |DIFRING-;D;SNniS;3|)) 

(DEFUN |DIFRING-;D;2S;1| (|r| $) (SPADCALL |r| (|getShellEntry| $ 7))) 

(DEFUN |DIFRING-;differentiate;SNniS;2| (|r| |n| $)
  (PROG (|i|)
    (RETURN
      (SEQ (SEQ (LETT |i| 1 |DIFRING-;differentiate;SNniS;2|) G190
                (COND ((QSGREATERP |i| |n|) (GO G191)))
                (SEQ (EXIT (LETT |r|
                                 (SPADCALL |r| (|getShellEntry| $ 7))
                                 |DIFRING-;differentiate;SNniS;2|)))
                (LETT |i| (QSADD1 |i|)
                      |DIFRING-;differentiate;SNniS;2|)
                (GO G190) G191 (EXIT NIL))
           (EXIT |r|))))) 

(DEFUN |DIFRING-;D;SNniS;3| (|r| |n| $)
  (SPADCALL |r| |n| (|getShellEntry| $ 14))) 

(DEFUN |DifferentialRing&| (|#1|)
  (PROG (|dv$1| |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT |dv$1| (|devaluate| |#1|) . #0=(|DifferentialRing&|))
        (LETT |dv$| (LIST '|DifferentialRing&| |dv$1|) . #0#)
        (LETT $ (|newShell| 16) . #0#)
        (|setShellEntry| $ 0 |dv$|)
        (|setShellEntry| $ 3
            (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|stuffDomainSlots| $)
        (|setShellEntry| $ 6 |#1|)
        $)))) 

(MAKEPROP '|DifferentialRing&| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|)
             (0 . |differentiate|) |DIFRING-;D;2S;1| (|SingleInteger|)
             (5 . |One|) (|NonNegativeInteger|) (9 . |One|)
             |DIFRING-;differentiate;SNniS;2| (13 . |differentiate|)
             |DIFRING-;D;SNniS;3|)
          '#(|differentiate| 19 D 25) 'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 15
                                '(1 6 0 0 7 0 9 0 10 0 11 0 12 2 6 0 0
                                  11 14 2 0 0 0 11 13 2 0 0 0 11 15 1 0
                                  0 0 8)))))
          '|lookupComplete|))