$SPAD/src/input rubey.input

Martin Rubey December 3, 2016

Abstract

Contents

2

— * —

)set break resume
)spool rubey.output
)set message test on
)set message auto off
)clear all
--S 1 of 10
mons arg ==
 if #arg = 1
  then arg
   else concat(map(m+->m+first arg, mons rest arg),
               map(m+->m-first arg, mons rest arg))
--R
--R                                                                   Type: Void
--E 1
--S 2 of 10
summ arg == reduce (+,[m^4 for m in mons arg])
--R
--R                                                                   Type: Void
--E 2
--S 3 of 10
t2 n == reduce(+,[reduce(+,
           [summ[x[i],x[j]]
             for j in i+1..n])
               for i in 1..n-1])
--R
--R                                                                   Type: Void
--E 3
--S 4 of 10
t3 n == reduce(+, [reduce(+, [reduce(+,
           [summ[x[i],x[j],x[k]]
             for k in j+1..n])
               for j in i+1..n-1])
                 for i in 1..n-2])
--R
--R                                                                   Type: Void
--E 4
--S 5 of 10
t4 n == reduce(+, [reduce(+, [reduce(+, [reduce(+,
           [summ[x[i],x[j],x[k],x[m]]
             for m in k+1..n])
               for k in j+1..n-1])
                 for j in i+1..n-2])

                   for i in 1..n-3])
--R
--R                                                                   Type: Void
--E 5
--S 6 of 10
t5 n == reduce(+, [reduce(+, [reduce(+, [reduce(+, [reduce(+,
           [summ[x[i],x[j],x[k],x[m],x[p]]
             for p in m+1..n])
               for m in k+1..n-1])
                 for k in j+1..n-2])
                   for j in i+1..n-3])
                     for i in 1..n-4])
--R
--R                                                                   Type: Void
--E 6
--S 7 of 10
factor t2 4
--R
--R   Compiling function mons with type List(Symbol) -> List(Polynomial(
--R      Integer))
--R   Compiling function summ with type List(Symbol) -> Polynomial(Integer
--R      )
--R   Compiling function t2 with type PositiveInteger -> Polynomial(
--R      Integer)
--R
--R            2     2     2     2 2
--R   (7)  6(x   + x   + x   + x  )
--R           4     3     2     1
--R                                          Type: Factored(Polynomial(Integer))
--E 7
--S 8 of 10
factor t3 7
--R
--R   Compiling function t3 with type PositiveInteger -> Polynomial(
--R      Integer)
--R
--R             2     2     2     2     2     2     2 2
--R   (8)  60(x   + x   + x   + x   + x   + x   + x  )
--R            7     6     5     4     3     2     1
--R                                          Type: Factored(Polynomial(Integer))
--E 8
--S 9 of 10
factor t4 10
--R
--R   Compiling function t4 with type PositiveInteger -> Polynomial(
--R      Integer)

--R
--R               2     2     2     2     2     2     2     2     2     2 2
--R   (9)  672(x    + x   + x   + x   + x   + x   + x   + x   + x   + x  )
--R             10     9     8     7     6     5     4     3     2     1
--R                                          Type: Factored(Polynomial(Integer))
--E 9
--S 10 of 10
factor t5 13
--R
--R   Compiling function t5 with type PositiveInteger -> Polynomial(
--R      Integer)
--R
--R   (10)
--R     7920
--R  *
--R            2      2      2      2     2     2     2     2     2     2     2
--R         x    + x    + x    + x    + x   + x   + x   + x   + x   + x   + x
--R          13     12     11     10     9     8     7     6     5     4     3
--R       +
--R           2     2
--R         x   + x
--R          2     1
--R    **
--R       2
--R                                          Type: Factored(Polynomial(Integer))
--E 10
)spool
)lisp (bye)

———-

References^{[1] nothing}

6