|  |  | last edited 8 years ago by Bill Page | 
| 1 2 3 4 5 | ||
| Editor: Bill Page Time: 2015/02/27 13:13:48 GMT+0 | ||
| Note: add conjugate | ||
added: Add conjugate removed: - removed: -++ Date Last Updated: 4 October 1993 added: ++ Date Last Updated: 2 October 2014 ++ Added: 'conjugate' ++ Modied: 'abs' added: conjugate: F -> F ++ conjugate(f) returns the conjugate operator applied to f added: iiconjugate: F -> F ++ iiconjugate(x) should be local but conditional; added: opconjugate := operator('conjugate)$CommonOperators opsqrt := operator('sqrt)$CommonOperators added: conjugate x == opconjugate x added: is?(op, 'conjugate)=> opconjugate added: one? x => 1 added: is?(x, opconjugate) => kernel(opabs, argument(retract(x)@K)(1)) added: if R has abs : R -> R then import from Polynomial R iiabs x == (r := retractIfCan(x)@Union(Fraction Polynomial R, "failed")) case "failed" => iabs x f := r::Fraction Polynomial R (a := retractIfCan(numer f)@Union(R, "failed")) case "failed" or (b := retractIfCan(denom f)@Union(R,"failed")) case "failed" => iabs x abs(a::R)::F / abs(b::R)::F else if F has RadicalCategory and R has conjugate : R -> R then iiabs x == (r := retractIfCan(x)@Union(R, "failed")) case "failed" => iabs x sqrt( (r::R*conjugate(r::R))::F) else iiabs x == iabs x iconjugate(k:K):F == --output("in: ",k::OutputForm)$OutputPackage if symbolIfCan(k) case Symbol then x:=kernel(opconjugate, k::F) else op:=operator(operator(name(k))$CommonOperators)$Expression(R) --output("op: ",properties(op)::OutputForm)$OutputPackage --output("conj op: ",properties(conjugate op)::OutputForm)$OutputPackage x := conjugate(op) argument(k) --output("out: ",x::OutputForm)$OutputPackage return x iiconjugate(x:F):F == --output("iin: ",x::OutputForm)$OutputPackage if (s:=isPlus(x)) case List F then --output("isPlus: ",s::OutputForm)$OutputPackage x := reduce(_+$F,map(iiconjugate,s)) else if (s:=isTimes(x)) case List F then --output("isTimes: ",s::OutputForm)$OutputPackage x:= reduce(_*$F,map(iiconjugate,s)) else if #(ks:List K:=kernels(x))>0 then --output("kernels: ",ks::OutputForm)$OutputPackage x := eval(x,ks, _ map((k:Kernel F):F +-> (height(k)=0 =>k::F;iconjugate k), _ ks)$ListFunctions2(Kernel F,F)) else if R has conjugate:R->R and F has RetractableTo(R) then if (r:=retractIfCan(x)@Union(R,"failed")) case R then x:=conjugate(r::R)::F --output("iout: ",x::OutputForm)$OutputPackage return x removed: - - if R has abs : R -> R then - import from Polynomial R - iiabs x == - (r := retractIfCan(x)@Union(Fraction Polynomial R, "failed")) - case "failed" => iabs x - f := r::Fraction Polynomial R - (a := retractIfCan(numer f)@Union(R, "failed")) case "failed" or - (b := retractIfCan(denom f)@Union(R,"failed")) case "failed" => iabs x - abs(a::R)::F / abs(b::R)::F - - else iiabs x == iabs x added: evaluate(conjugate(opabs), (x:F):F +-> iiabs(x))$BasicOperatorFunctions1(F) evaluate(opconjugate, iiconjugate)$BasicOperatorFunctions1(F) evaluate(conjugate(opconjugate), (x:F):F +-> x)$BasicOperatorFunctions1(F) added: dconjugate(lo : List OF) : OF == overbar lo.1 display(opconjugate,dconjugate) changed: - derivative(opabs, (x : F) : F +-> abs(x)*inv(x)) -- differentiate(abs(g(z)),z) --dvabs : (List F, SE) -> F --dvabs(arg, z) == -- g := first arg -- conjugate(g)*inv(2*abs(g))*differentiate(g,z)+g*inv(2*abs(g))*differentiate(conjugate(g),z) --setProperty(opabs, SPECIALDIFF, dvabs@((List F, SE)->F) pretend None) derivative(opabs, (x : F) : F +-> conjugate(x)*inv(2*abs(x))) -- Wirtinger derivate of non-holomorphic functions derivative(opconjugate, (x : F) : F +-> 0) derivative(conjugate opconjugate, (x : F) : F +-> 1) added:
Add conjugate
)abbrev category COMBOPC CombinatorialOpsCategory
++ Category for summations and products
++ Author: Manuel Bronstein
++ Date Created: ???
++ Date Last Updated: 22 February 1993 (JHD/BMT)
++ Description:
++   CombinatorialOpsCategory is the category obtaining by adjoining
++   summations and products to the usual combinatorial operations;
CombinatorialOpsCategory() : Category ==
  CombinatorialFunctionCategory with
    factorials : % -> %
      ++ factorials(f) rewrites the permutations and binomials in f
      ++ in terms of factorials;
    factorials : (%,
)abbrev package COMBF CombinatorialFunction
++ Provides the usual combinatorial functions
++ Author: Manuel Bronstein,
CombinatorialFunction(R,
  OP  ==> BasicOperator
  K   ==> Kernel F
  SE  ==> Symbol
  O   ==> OutputForm
  SMP ==> SparseMultivariatePolynomial(R,
  POWER        ==> '%power
  OPEXP        ==> 'exp
  SPECIALDIFF  ==> '%specialDiff
  SPECIALDISP  ==> '%specialDisp
  SPECIALEQUAL ==> '%specialEqual
  Exports ==> with
    belong?    : OP -> Boolean
      ++ belong?(op) is true if op is a combinatorial operator;
    operator   : OP -> OP
      ++ operator(op) returns a copy of op with the domain-dependent
      ++ properties appropriate for F;
      ++ error if op is not a combinatorial operator;
    "^"       : (F,
  Implementation ==> add
    COMB := 'comb
    ifact     : F -> F
    iiipow    : List F -> F
    iperm     : List F -> F
    ibinom    : List F -> F
    isum      : List F -> F
    idsum     : List F -> F
    iprod     : List F -> F
    idprod    : List F -> F
    dsum      : List F -> O
    ddsum     : List F -> O
    dprod     : List F -> O
    ddprod    : List F -> O
    equalsumprod  : (K,
    -- Must be a macro to produce fresh symbol for each use
    dummy ==> new()$SE :: F
    opfact  := operator('factorial)$CommonOperators
    opperm  := operator('permutation)$CommonOperators
    opbinom := operator('binomial)$CommonOperators
    opsum   := operator('summation)$CommonOperators
    opdsum  := operator('%defsum)$CommonOperators
    opprod  := operator('product)$CommonOperators
    opdprod := operator('%defprod)$CommonOperators
    oppow   := operator(POWER::Symbol)$CommonOperators
    factorial x          == opfact x
    binomial(x,
    import from F
    import from Kernel F
    number?(x : F) : Boolean ==
      if R has RetractableTo(Z) then
        ground?(x) or
         ((retractIfCan(x)@Union(Fraction(Z),
    x ^ y               ==
      -- Do some basic simplifications
      is?(x,
    belong? op           == has?(op,
    product(x : F,
    summation(x : F,
    dvsum(l,
    dvdsum(l,
    dvprod(l,
      opsum [differentiate(first l,
    dvdprod(l,
    dprod l ==
      prod(summand(l)::O,
    ddprod l ==
      prod(summand(l)::O,
    dsum l ==
      sum(summand(l)::O,
    ddsum l ==
      sum(summand(l)::O,
    equalsumprod(s1,
      (eval(first l1,
    equaldsumprod(s1,
      ((third rest l1 = third rest l2) and
       (third rest rest l1 = third rest rest l2) and
       (eval(first l1,
    product(x : F,
    summation(x : F,
    smpfact(p,
    K2fact(k,
    operator op ==
      is?(op,
    iprod l ==
      zero? first l => 0
--      one? first l => 1
      (first l = 1) => 1
      kernel(opprod,
    isum l ==
      zero? first l => 0
      kernel(opsum,
    idprod l ==
      member?(retract(second l)@SE,
    idsum l ==
      member?(retract(second l)@SE,
    ifact x ==
--      zero? x or one? x => 1
      zero? x or (x = 1) => 1
      kernel(opfact,
    ibinom l ==
      n := first l
      ((p := second l) = 0) or (p = n) => 1
--      one? p or (p = n - 1) => n
      (p = 1) or (p = n - 1) => n
      kernel(opbinom,
    iperm l ==
      zero? second l => 1
      kernel(opperm,
    if R has RetractableTo Z then
      iidsum l ==
        (r1 := retractIfCan(fourth l)@Union(Z,
      iidprod l ==
        (r1 := retractIfCan(fourth l)@Union(Z,
      iiipow l ==
          (u := isExpt(x := first l,
      if F has RadicalCategory then
        ipow l ==
          (r := retractIfCan(second l)@Union(Fraction Z,
    else
      ipow l ==
        zero?(x := first l) =>
          zero? second l => error "0 ^ 0"
          0
--        one? x or zero?(n := second l) => 1
        (x = 1) or zero?(n : F := second l) => 1
--        one? n => x
        (n = 1) => x
        (u := isExpt(x,
    if R has CombinatorialFunctionCategory then
      iifact x ==
        (r := retractIfCan(x)@Union(R,
      iiperm l ==
        (r1 := retractIfCan(first l)@Union(R,
      if R has RetractableTo(Z) and F has Algebra(Fraction(Z)) then
         -- Try to explicitly evaluete binomial coefficient
         -- We currently simplify binomial coefficients for non-negative
         -- integral second argument,
    else
      iifact x  == ifact x
      iibinom l == ibinom l
      iiperm l  == iperm l
    if R has ElementaryFunctionCategory then
      iipow l ==
        (r1 := retractIfCan(first l)@Union(R,
    if F has ElementaryFunctionCategory then
      dvpow2 l == if zero?(first l) then
                    0
                  else
                    log(first l) * first(l) ^ second(l)
    evaluate(opfact,
    setProperty(opsum,
)abbrev package FSPECF FunctionalSpecialFunction
)boot $tryRecompileArguments := nil
++ Provides the special functions
++ Author: Manuel Bronstein
++ Date Created: 18 Apr 1989
++ Description: Provides some special functions over an integral domain.
++ Keywords: special,
  OP  ==> BasicOperator
  K   ==> Kernel F
  SE  ==> Symbol
  SPECIALDIFF  ==> '%specialDiff
  Exports ==> with
    belong? : OP -> Boolean
      ++ belong?(op) is true if op is a special function operator;
    operator : OP -> OP
      ++ operator(op) returns a copy of op with the domain-dependent
      ++ properties appropriate for F;
      ++ error if op is not a special function operator
    abs     : F -> F
      ++ abs(f) returns the absolute value operator applied to f
    conjugate: F -> F
      ++ conjugate(f) returns the conjugate operator applied to f
    Gamma   : F -> F
      ++ Gamma(f) returns the formal Gamma function applied to f
    Gamma   : (F,
  Implementation ==> add
    SPECIAL := 'special
    INP ==> InputForm
    SPECIALINPUT ==> '%specialInput
    iabs      : F -> F
    iGamma    : F -> F
    iBeta     : (F,
    iWeierstrassP : (F,
    iiWeierstrassP : List F -> F
    iiWeierstrassPPrime : List F -> F
    iiWeierstrassSigma : List F -> F
    iiWeierstrassZeta : List F -> F
    iiMeijerG : List F -> F
    opabs       := operator('abs)$CommonOperators
    opconjugate := operator('conjugate)$CommonOperators
    opsqrt      := operator('sqrt)$CommonOperators
    opGamma     := operator('Gamma)$CommonOperators
    opGamma2    := operator('Gamma2)$CommonOperators
    opBeta      := operator('Beta)$CommonOperators
    opdigamma   := operator('digamma)$CommonOperators
    oppolygamma := operator('polygamma)$CommonOperators
    opBesselJ   := operator('besselJ)$CommonOperators
    opBesselY   := operator('besselY)$CommonOperators
    opBesselI   := operator('besselI)$CommonOperators
    opBesselK   := operator('besselK)$CommonOperators
    opAiryAi    := operator('airyAi)$CommonOperators
    opAiryAiPrime := operator('airyAiPrime)$CommonOperators
    opAiryBi    := operator('airyBi)$CommonOperators
    opAiryBiPrime := operator('airyBiPrime)$CommonOperators
    opLambertW := operator('lambertW)$CommonOperators
    opPolylog := operator('polylog)$CommonOperators
    opWeierstrassP := operator('weierstrassP)$CommonOperators
    opWeierstrassPPrime := operator('weierstrassPPrime)$CommonOperators
    opWeierstrassSigma := operator('weierstrassSigma)$CommonOperators
    opWeierstrassZeta := operator('weierstrassZeta)$CommonOperators
    opHypergeometricF := operator('hypergeometricF)$CommonOperators
    opMeijerG := operator('meijerG)$CommonOperators
    opCharlierC := operator('charlierC)$CommonOperators
    opHermiteH := operator('hermiteH)$CommonOperators
    opJacobiP := operator('jacobiP)$CommonOperators
    opLaguerreL := operator('laguerreL)$CommonOperators
    opMeixnerM := operator('meixnerM)$CommonOperators
    op_log_gamma := operator('%logGamma)$CommonOperators
    op_eis := operator('%eis)$CommonOperators
    op_erfs := operator('%erfs)$CommonOperators
    op_erfis := operator('%erfis)$CommonOperators
    abs x         == opabs x
    conjugate x   == opconjugate x
    Gamma(x)      == opGamma(x)
    Gamma(a,
        meijerG(a,
    import from List Kernel(F)
    opdiff := operator(operator('%diff)$CommonOperators)$F
    dummy ==> new()$SE :: F
    ahalf : F := recip(2::F)::F
    athird : F    := recip(3::F)::F
    afourth : F   := recip(4::F)::F
    asixth : F := recip(6::F)::F
    twothirds : F := 2*athird
    threehalfs : F := 3*ahalf
    -- Helpers for partially defined derivatives
    grad2(l : List F,
    grad3(l : List F,
    grad4(l : List F,
    -- handle WeierstrassPInverse
)if false
    opWeierstrassPInverse := operator('weierstrassPInverse)$CommonOperators
    weierstrassPInverse(g2,
    eWeierstrassPInverse(g2 : F,
    elWeierstrassPInverse(l : List F) : F == eWeierstrassPInverse(l(1),
    if F has RadicalCategory then
        eWeierstrassPInverseGrad_g2(l : List F) : F ==
            g2 := l(1)
            g3 := l(2)
            z := l(3)
            error "unimplemented"
        eWeierstrassPInverseGrad_g3(l : List F) : F ==
            g2 := l(1)
            g3 := l(2)
            z := l(3)
            error "unimplemented"
        eWeierstrassPInverseGrad_z(l : List F) : F ==
            g2 := l(1)
            g3 := l(2)
            z := l(3)
            1/sqrt(4*z^3 - g2*z - g3)
        derivative(opWeierstrassPInverse,
)endif
    -- handle WhittakerM
    opWhittakerM := operator('whittakerM)$CommonOperators
    whittakerM(k,
    eWhittakerM(k : F,
    elWhittakerM(l : List F) : F == eWhittakerM(l(1),
    eWhittakerMGrad_z(k : F,
    dWhittakerM(l : List F,
    setProperty(opWhittakerM,
    -- handle WhittakerW
    opWhittakerW := operator('whittakerW)$CommonOperators
    whittakerW(k,
    eWhittakerW(k : F,
    elWhittakerW(l : List F) : F == eWhittakerW(l(1),
    eWhittakerWGrad_z(k : F,
    dWhittakerW(l : List F,
    setProperty(opWhittakerW,
    -- handle AngerJ
    opAngerJ := operator('angerJ)$CommonOperators
    angerJ(v,
    if F has TranscendentalFunctionCategory then
        eAngerJ(v : F,
        elAngerJ(l : List F) : F == eAngerJ(l(1),
        eAngerJGrad_z(v : F,
        dAngerJ(l : List F,
        setProperty(opAngerJ,
    else
        eeAngerJ(l : List F) : F == kernel(opAngerJ,
    -- handle WeberE
    opWeberE := operator('weberE)$CommonOperators
    weberE(v,
    if F has TranscendentalFunctionCategory then
        eWeberE(v : F,
        elWeberE(l : List F) : F == eWeberE(l(1),
        eWeberEGrad_z(v : F,
        dWeberE(l : List F,
        setProperty(opWeberE,
    else
        eeWeberE(l :  List F) : F == kernel(opWeberE,
    -- handle StruveH
    opStruveH := operator('struveH)$CommonOperators
    struveH(v,
    eStruveH(v : F,
    elStruveH(l : List F) : F == eStruveH(l(1),
    if F has TranscendentalFunctionCategory
       and F has RadicalCategory then
        eStruveHGrad_z(v : F,
        dStruveH(l : List F,
        setProperty(opStruveH,
    -- handle StruveL
    opStruveL := operator('struveL)$CommonOperators
    struveL(v,
    eStruveL(v : F,
    elStruveL(l : List F) : F == eStruveL(l(1),
    if F has TranscendentalFunctionCategory
       and F has RadicalCategory then
        eStruveLGrad_z(v : F,
        dStruveL(l : List F,
        setProperty(opStruveL,
    -- handle HankelH1
    opHankelH1 := operator('hankelH1)$CommonOperators
    hankelH1(v,
    eHankelH1(v : F,
    elHankelH1(l : List F) : F == eHankelH1(l(1),
    eHankelH1Grad_z(v : F,
    dHankelH1(l : List F,
    setProperty(opHankelH1,
    -- handle HankelH2
    opHankelH2 := operator('hankelH2)$CommonOperators
    hankelH2(v,
    eHankelH2(v : F,
    elHankelH2(l : List F) : F == eHankelH2(l(1),
    eHankelH2Grad_z(v : F,
    dHankelH2(l : List F,
    setProperty(opHankelH2,
    -- handle LommelS1
    opLommelS1 := operator('lommelS1)$CommonOperators
    lommelS1(m,
    eLommelS1(m : F,
    elLommelS1(l : List F) : F == eLommelS1(l(1),
    eLommelS1Grad_z(m : F,
    dLommelS1(l : List F,
    setProperty(opLommelS1,
    -- handle LommelS2
    opLommelS2 := operator('lommelS2)$CommonOperators
    lommelS2(mu,
    eLommelS2(mu : F,
    elLommelS2(l : List F) : F == eLommelS2(l(1),
    eLommelS2Grad_z(m : F,
    dLommelS2(l : List F,
    setProperty(opLommelS2,
    -- handle KummerM
    opKummerM := operator('kummerM)$CommonOperators
    kummerM(mu,
    eKummerM(a : F,
    elKummerM(l : List F) : F == eKummerM(l(1),
    eKummerMGrad_z(a : F,
    dKummerM(l : List F,
    setProperty(opKummerM,
    -- handle KummerU
    opKummerU := operator('kummerU)$CommonOperators
    kummerU(a,
    eKummerU(a : F,
    elKummerU(l : List F) : F == eKummerU(l(1),
    eKummerUGrad_z(a : F,
    dKummerU(l : List F,
    setProperty(opKummerU,
    -- handle LegendreP
    opLegendreP := operator('legendreP)$CommonOperators
    legendreP(nu,
    eLegendreP(nu : F,
    elLegendreP(l : List F) : F == eLegendreP(l(1),
    eLegendrePGrad_z(nu : F,
    dLegendreP(l : List F,
    setProperty(opLegendreP,
    -- handle LegendreQ
    opLegendreQ := operator('legendreQ)$CommonOperators
    legendreQ(nu,
    eLegendreQ(nu : F,
    elLegendreQ(l : List F) : F == eLegendreQ(l(1),
    eLegendreQGrad_z(nu : F,
    dLegendreQ(l : List F,
    setProperty(opLegendreQ,
    -- handle KelvinBei
    opKelvinBei := operator('kelvinBei)$CommonOperators
    kelvinBei(v,
    eKelvinBei(v : F,
    elKelvinBei(l : List F) : F == eKelvinBei(l(1),
    if F has RadicalCategory then
        eKelvinBeiGrad_z(v : F,
        dKelvinBei(l : List F,
        setProperty(opKelvinBei,
    -- handle KelvinBer
    opKelvinBer := operator('kelvinBer)$CommonOperators
    kelvinBer(v,
    eKelvinBer(v : F,
    elKelvinBer(l : List F) : F == eKelvinBer(l(1),
    if F has RadicalCategory then
        eKelvinBerGrad_z(v : F,
        dKelvinBer(l : List F,
        setProperty(opKelvinBer,
    -- handle KelvinKei
    opKelvinKei := operator('kelvinKei)$CommonOperators
    kelvinKei(v,
    eKelvinKei(v : F,
    elKelvinKei(l : List F) : F == eKelvinKei(l(1),
    if F has RadicalCategory then
        eKelvinKeiGrad_z(v : F,
        dKelvinKei(l : List F,
        setProperty(opKelvinKei,
    -- handle KelvinKer
    opKelvinKer := operator('kelvinKer)$CommonOperators
    kelvinKer(v,
    eKelvinKer(v : F,
    elKelvinKer(l : List F) : F == eKelvinKer(l(1),
    if F has RadicalCategory then
        eKelvinKerGrad_z(v : F,
        dKelvinKer(l : List F,
        setProperty(opKelvinKer,
    -- handle EllipticK
    opEllipticK := operator('ellipticK)$CommonOperators
    ellipticK(m) == opEllipticK(m)
    eEllipticK(m : F) : F ==
        kernel(opEllipticK,
    elEllipticK(l : List F) : F == eEllipticK(l(1))
    evaluate(opEllipticK,
    dEllipticK(m : F) : F ==
        ahalf*(ellipticE(m) - (1 - m)*ellipticK(m))/(m*(1 - m))
    derivative(opEllipticK,
    -- handle one argument EllipticE
    opEllipticE := operator('ellipticE)$CommonOperators
    ellipticE(m) == opEllipticE(m)
    eEllipticE(m : F) : F ==
        kernel(opEllipticE,
    elEllipticE(l : List F) : F == eEllipticE(l(1))
    evaluate(opEllipticE,
    dEllipticE(m : F) : F ==
        ahalf*(ellipticE(m) - ellipticK(m))/m
    derivative(opEllipticE,
    -- handle two argument EllipticE
    opEllipticE2 := operator('ellipticE2)$CommonOperators
    ellipticE(z,
    eEllipticE2(z : F,
    elEllipticE2(l : List F) : F == eEllipticE2(l(1),
    if F has RadicalCategory then
        eEllipticE2Grad_z(l : List F) : F ==
            z := l(1)
            m := l(2)
            sqrt(1 - m*z^2)/sqrt(1 - z^2)
        eEllipticE2Grad_m(l : List F) : F ==
            z := l(1)
            m := l(2)
            ahalf*(ellipticE(z,
        derivative(opEllipticE2,
    inEllipticE2(li : List INP) : INP ==
        convert cons(convert('ellipticE),
    input(opEllipticE2,
    -- handle EllipticF
    opEllipticF := operator('ellipticF)$CommonOperators
    ellipticF(z,
    eEllipticF(z : F,
    elEllipticF(l : List F) : F == eEllipticF(l(1),
    if F has RadicalCategory then
        eEllipticFGrad_z(l : List F) : F ==
            z := l(1)
            m := l(2)
            1/(sqrt(1 - m*z^2)*sqrt(1 - z^2))
        eEllipticFGrad_m(l : List F) : F ==
            z := l(1)
            m := l(2)
            ahalf*((ellipticE(z,
        derivative(opEllipticF,
    -- handle EllipticPi
    opEllipticPi := operator('ellipticPi)$CommonOperators
    ellipticPi(z,
    eEllipticPi(z : F,
    elEllipticPi(l : List F) : F == eEllipticPi(l(1),
    if F has RadicalCategory then
        eEllipticPiGrad_z(l : List F) : F ==
            z := l(1)
            n := l(2)
            m := l(3)
            1/((1 - n*z^2)*sqrt(1 - m*z^2)*sqrt(1 - z^2))
        eEllipticPiGrad_n(l : List F) : F ==
            z := l(1)
            n := l(2)
            m := l(3)
            t1 := -(n^2 - m)*ellipticPi(z,
        eEllipticPiGrad_m(l : List F) : F ==
            z := l(1)
            n := l(2)
            m := l(3)
            t1 := m*z*sqrt(1 - z^2)/sqrt(1 - m*z^2)
            t2 := (-ellipticE(z,
        derivative(opEllipticPi,
    -- handle JacobiSn
    opJacobiSn := operator('jacobiSn)$CommonOperators
    jacobiSn(z,
    eJacobiSn(z : F,
    elJacobiSn : List F -> F
    elJacobiSn(l : List F) : F == eJacobiSn(l(1),
    jacobiGradHelper(z : F,
    eJacobiSnGrad_z(l : List F) : F ==
        z := l(1)
        m := l(2)
        jacobiCn(z,
    eJacobiSnGrad_m(l : List F) : F ==
        z := l(1)
        m := l(2)
        ahalf*(eJacobiSnGrad_z(l)*jacobiGradHelper(z,
    derivative(opJacobiSn,
    -- handle JacobiCn
    opJacobiCn := operator('jacobiCn)$CommonOperators
    jacobiCn(z,
    eJacobiCn(z : F,
    elJacobiCn(l : List F) : F == eJacobiCn(l(1),
    eJacobiCnGrad_z(l : List F) : F ==
        z := l(1)
        m := l(2)
        -jacobiSn(z,
    eJacobiCnGrad_m(l : List F) : F ==
        z := l(1)
        m := l(2)
        ahalf*(eJacobiCnGrad_z(l)*jacobiGradHelper(z,
    derivative(opJacobiCn,
    -- handle JacobiDn
    opJacobiDn := operator('jacobiDn)$CommonOperators
    jacobiDn(z,
    eJacobiDn(z : F,
    elJacobiDn(l : List F) : F == eJacobiDn(l(1),
    eJacobiDnGrad_z(l : List F) : F ==
        z := l(1)
        m := l(2)
        -m*jacobiSn(z,
    eJacobiDnGrad_m(l : List F) : F ==
        z := l(1)
        m := l(2)
        ahalf*(eJacobiDnGrad_z(l)*jacobiGradHelper(z,
    derivative(opJacobiDn,
    -- handle JacobiZeta
    opJacobiZeta := operator('jacobiZeta)$CommonOperators
    jacobiZeta(z,
    eJacobiZeta(z : F,
    elJacobiZeta(l : List F) : F == eJacobiZeta(l(1),
    eJacobiZetaGrad_z(l : List F) : F ==
        z := l(1)
        m := l(2)
        dn := jacobiDn(z,
    eJacobiZetaGrad_m(l : List F) : F ==
        z := l(1)
        m := l(2)
        ek := ellipticK(m)
        ee := ellipticE(m)
        er := ee/ek
        dn := jacobiDn(z,
    derivative(opJacobiZeta,
    -- handle JacobiTheta
    opJacobiTheta := operator('jacobiTheta)$CommonOperators
    jacobiTheta(q,
    eJacobiTheta(q : F,
    elJacobiTheta(l : List F) : F == eJacobiTheta(l(1),
    -- handle LerchPhi
    opLerchPhi := operator('lerchPhi)$CommonOperators
    lerchPhi(z,
    eLerchPhi(z : F,
    elLerchPhi(l : List F) : F == eLerchPhi(l(1),
    dLerchPhi(l : List F,
    setProperty(opLerchPhi,
    -- handle RiemannZeta
    opRiemannZeta := operator('riemannZeta)$CommonOperators
    riemannZeta(z) == opRiemannZeta(z)
    eRiemannZeta(z : F) : F ==
        kernel(opRiemannZeta,
    elRiemannZeta(l : List F) : F == eRiemannZeta(l(1))
    evaluate(opRiemannZeta,
    -- orthogonal polynomials
    charlierC(n : F,
    eCharlierC(n : F,
    elCharlierC(l : List F) : F == eCharlierC(l(1),
    evaluate(opCharlierC,
    hermiteH(n : F,
    eHermiteH(n : F,
    elHermiteH(l : List F) : F == eHermiteH(l(1),
    evaluate(opHermiteH,
    eHermiteHGrad_z(n : F,
    dHermiteH(l : List F,
    setProperty(opHermiteH,
    jacobiP(n : F,
    eJacobiP(n : F,
    elJacobiP(l : List F) : F == eJacobiP(l(1),
    evaluate(opJacobiP,
    eJacobiPGrad_z(n : F,
    dJacobiP(l : List F,
    setProperty(opJacobiP,
    laguerreL(n : F,
    eLaguerreL(n : F,
    elLaguerreL(l : List F) : F == eLaguerreL(l(1),
    evaluate(opLaguerreL,
    eLaguerreLGrad_z(n : F,
    dLaguerreL(l : List F,
    setProperty(opLaguerreL,
    meixnerM(n : F,
    eMeixnerM(n : F,
    elMeixnerM(l : List F) : F == eMeixnerM(l(1),
    evaluate(opMeixnerM,
    --
    belong? op == has?(op,
    operator op ==
      is?(op,
      error "Not a special operator"
    -- Could put more unconditional special rules for other functions here
    iGamma x ==
--      one? x => x
      (x = 1) => x
      kernel(opGamma,
    iabs x ==
      zero? x => 0
      one? x => 1
      is?(x,
    if R has abs : R -> R then
      import from Polynomial R
      iiabs x ==
        (r := retractIfCan(x)@Union(Fraction Polynomial R,
    iconjugate(k:K):F ==
      --output("in: ",
    iiconjugate(x:F):F ==
      --output("iin: ",
    iBeta(x,
    import from Fraction(Integer)
    if F has ElementaryFunctionCategory then
        iAiryAi x ==
            zero?(x) => 1::F/((3::F)^twothirds*Gamma(twothirds))
            kernel(opAiryAi,
    if F has ElementaryFunctionCategory then
        iLambertW(x) ==
            zero?(x) => 0
            x = exp(1$F) => 1$F
            x = -exp(-1$F) => -1$F
            kernel(opLambertW,
    if F has ElementaryFunctionCategory then
        if F has LiouvillianFunctionCategory then
            iiPolylog(s,
    iPolylog(l) == iiPolylog(first l,
    iWeierstrassP(g2,
    iWeierstrassSigma(g2,
    iWeierstrassZeta(g2,
    -- Could put more conditional special rules for other functions here
    if R has SpecialFunctionCategory then
      iiGamma x ==
        (r := retractIfCan(x)@Union(R,
      iiBeta l ==
        (r := retractIfCan(first l)@Union(R,
      iidigamma x ==
        (r := retractIfCan(x)@Union(R,
      iipolygamma l ==
        (s := retractIfCan(first l)@Union(R,
      iiBesselJ l ==
        (r := retractIfCan(first l)@Union(R,
      iiBesselY l ==
        (r := retractIfCan(first l)@Union(R,
      iiBesselI l ==
        (r := retractIfCan(first l)@Union(R,
      iiBesselK l ==
        (r := retractIfCan(first l)@Union(R,
      iiAiryAi x ==
        (r := retractIfCan(x)@Union(R,
      iiAiryAiPrime x ==
        (r := retractIfCan(x)@Union(R,
      iiAiryBi x ==
        (r := retractIfCan(x)@Union(R,
      iiAiryBi x ==
        (r := retractIfCan(x)@Union(R,
    else
      if R has RetractableTo Integer then
        iiGamma x ==
          (r := retractIfCan(x)@Union(Integer,
      iiBeta l == iBeta(first l,
    iiWeierstrassP l == iWeierstrassP(first l,
    -- Default behaviour is to build a kernel
    evaluate(opGamma,
    diff1(op : OP,
    iBesselJ(l : List F,
    iBesselY(l : List F,
    iBesselI(l : List F,
    iBesselK(l : List F,
    dPolylog(l : List F,
    ipolygamma(l : List F,
    if F has ElementaryFunctionCategory then
      iGamma2(l : List F,
    inGamma2(li : List INP) : INP ==
        convert cons(convert('Gamma),
    input(opGamma2,
    dLambertW(x : F) : F ==
        lw := lambertW(x)
        lw/(x*(1+lw))
    iWeierstrassPGrad1(l : List F) : F ==
        g2 := first l
        g3 := second l
        x := third l
        delta := g2^3 - 27*g3^2
        wp := weierstrassP(g2,
    iWeierstrassPGrad2(l : List F) : F ==
        g2 := first l
        g3 := second l
        x := third l
        delta := g2^3 - 27*g3^2
        wp := weierstrassP(g2,
    iWeierstrassPGrad3(l : List F) : F ==
        weierstrassPPrime(first l,
    iWeierstrassPPrimeGrad1(l : List F) : F ==
        g2 := first l
        g3 := second l
        x := third l
        delta := g2^3 - 27*g3^2
        wp := weierstrassP(g2,
    iWeierstrassPPrimeGrad2(l : List F) : F ==
        g2 := first l
        g3 := second l
        x := third l
        delta := g2^3 - 27*g3^2
        wp := weierstrassP(g2,
    iWeierstrassPPrimeGrad3(l : List F) : F ==
        g2 := first l
        6*weierstrassP(g2,
    iWeierstrassSigmaGrad1(l : List F) : F ==
        g2 := first l
        g3 := second l
        x := third l
        delta := g2^3 - 27*g3^2
        ws := weierstrassSigma(g2,
    iWeierstrassSigmaGrad2(l : List F) : F ==
        g2 := first l
        g3 := second l
        x := third l
        delta := g2^3 - 27*g3^2
        ws := weierstrassSigma(g2,
    iWeierstrassSigmaGrad3(l : List F) : F ==
        g2 := first l
        g3 := second l
        x := third l
        weierstrassZeta(g2,
    iWeierstrassZetaGrad1(l : List F) : F ==
        g2 := first l
        g3 := second l
        x := third l
        delta := g2^3 - 27*g3^2
        wp := weierstrassP(g2,
    iWeierstrassZetaGrad2(l : List F) : F ==
        g2 := first l
        g3 := second l
        x := third l
        delta := g2^3 - 27*g3^2
        wp := weierstrassP(g2,
    iWeierstrassZetaGrad3(l : List F) : F ==
        -weierstrassP(first l,
    OF ==> OutputForm
    SEX ==> SExpression
    NNI ==> NonNegativeInteger
    dconjugate(lo : List OF) : OF == overbar lo.1
    display(opconjugate,
    if F has RetractableTo(Integer) then
        get_int_listf : List F -> List Integer
        get_int_listo : (Integer,
        get_int_listf(lf : List F) : List Integer ==
            map(z +-> retract(z)@Integer,
        replace_i(lp : List F,
        iiHypergeometricF(l) ==
            n := #l
            z := l(n-2)
            if z = 0 then
                nn := (n - 2)::NNI
                pq := rest(l,
        idvsum(op : BasicOperator,
        dvhypergeom(l : List F,
        add_pairs_to_list(lp : List List F,
        dvmeijer(l : List F,
        get_if_list(n : Integer,
        get_if_lists(ln : List Integer,
        get_int_listi(n : Integer,
        get_of_list(n : Integer,
        get_of_lists(ln : List Integer,
        get_int_listo(n : Integer,
        dhyper0(op : OF,
        dhyper(lo : List OF) : OF ==
            dhyper0("hypergeometricF"::Symbol::OF,
        ddhyper(lo : List OF) : OF ==
            dhyper0(first lo,
        dmeijer0(op : OF,
        dmeijer(lo : List OF) : OF ==
            dmeijer0('meijerG::OF,
        ddmeijer(lo : List OF) : OF ==
            dmeijer0(first lo,
        setProperty(opHypergeometricF,
        inhyper(lf : List INP) : INP ==
            pqi := get_int_listi(2,
        input(opHypergeometricF,
        inmeijer(lf : List INP) : INP ==
            pqi := get_int_listi(4,
        input(opMeijerG,
    else
        iiHypergeometricF(l) == kernel(opHypergeometricF,
    iiMeijerG(l) == kernel(opMeijerG,
    d_eis(x : F) : F == -kernel(op_eis,
    if F has TranscendentalFunctionCategory
       and F has RadicalCategory then
        d_erfs(x : F) : F == 2*x*kernel(op_erfs,
        d_erfis(x : F) : F == -2*x*kernel(op_erfis,
        derivative(op_erfs,
    -- differentiate(abs(g(z)),
    -- Wirtinger derivate of non-holomorphic functions
    derivative(opconjugate,
    setProperty(oppolygamma,
)abbrev package SUMFS FunctionSpaceSum
++ Top-level sum function
++ Author: Manuel Bronstein
++ Date Created: ???
++ Date Last Updated: 19 April 1991
++ Description: computes sums of top-level expressions;
FunctionSpaceSum(R,
  SE  ==> Symbol
  K   ==> Kernel F
  Exports ==> with
    sum : (F,
  Implementation ==> add
    import from ElementaryFunctionStructurePackage(R,
    innersum : (F,
    newk() == kernel(new()$SE)
    sum(x : F,
    sum(x : F,
    notRF?(f,
    innersum(x,
--Copyright (c) 1991-2002,
-- SPAD files for the functional world should be compiled in the
-- following order:
--
--   op  kl  function  funcpkgs  manip  algfunc
--   elemntry  constant  funceval  COMBFUNC  fe
   Compiling FriCAS source code from file 
      /var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/554697800083835704-25px001.spad
      using old system compiler.
   COMBOPC abbreviates category CombinatorialOpsCategory 
------------------------------------------------------------------------
   initializing NRLIB COMBOPC for CombinatorialOpsCategory 
   compiling into NRLIB COMBOPC 
;;;     ***       |CombinatorialOpsCategory| REDEFINED
Time: 0 SEC.
   finalizing NRLIB COMBOPC 
   Processing CombinatorialOpsCategory for Browser database:
--------constructor---------
--------(factorials (% %))---------
--------(factorials (% % (Symbol)))---------
--------(summation (% % (Symbol)))---------
--------(summation (% % (SegmentBinding %)))---------
--------(product (% % (Symbol)))---------
--------(product (% % (SegmentBinding %)))---------
; compiling file "/var/aw/var/LatexWiki/COMBOPC.NRLIB/COMBOPC.lsp" (written 06 MAR 2015 05:45:52 PM):
; /var/aw/var/LatexWiki/COMBOPC.NRLIB/COMBOPC.fasl written
; compilation finished in 0:00:00.004
------------------------------------------------------------------------
   CombinatorialOpsCategory is now explicitly exposed in frame initial 
   CombinatorialOpsCategory will be automatically loaded when needed 
      from /var/aw/var/LatexWiki/COMBOPC.NRLIB/COMBOPC
   COMBF abbreviates package CombinatorialFunction 
------------------------------------------------------------------------
   initializing NRLIB COMBF for CombinatorialFunction 
   compiling into NRLIB COMBF 
****** Domain: R already in scope
   processing macro definition dummy ==> ::((Sel (Symbol) new),
   compiling exported binomial : (F,
   compiling exported permutation : (F,
   importing F
   importing Kernel F
   compiling local number? : F -> Boolean
****** Domain: R already in scope
augmenting R: (RetractableTo (Integer))
Time: 0 SEC.
   compiling exported ^ : (F,
   compiling exported belong? : BasicOperator -> Boolean
Time: 0 SEC.
   compiling local fourth : List F -> F
Time: 0 SEC.
   compiling local dvpow1 : List F -> F
Time: 0.01 SEC.
   compiling exported factorials : F -> F
Time: 0 SEC.
   compiling exported factorials : (F,
   compiling local facts : (F,
   compiling local summand : List F -> F
Time: 0 SEC.
   compiling exported product : (F,
   compiling exported summation : (F,
   compiling local dvsum : (List F,
   compiling local dvdsum : (List F,
   compiling local dvprod : (List F,
   compiling local dvdprod : (List F,
   compiling local dprod : List F -> OutputForm
Time: 0 SEC.
   compiling local ddprod : List F -> OutputForm
Time: 0 SEC.
   compiling local dsum : List F -> OutputForm
Time: 0 SEC.
   compiling local ddsum : List F -> OutputForm
Time: 0.01 SEC.
   compiling local equalsumprod : (Kernel F,
   compiling local equaldsumprod : (Kernel F,
   compiling exported product : (F,
   compiling exported summation : (F,
   compiling local smpfact : (SparseMultivariatePolynomial(R,
   compiling local K2fact : (Kernel F,
   compiling exported operator : BasicOperator -> BasicOperator
Time: 0 SEC.
   compiling local iprod : List F -> F
Time: 0 SEC.
   compiling local isum : List F -> F
Time: 0.01 SEC.
   compiling local idprod : List F -> F
Time: 0 SEC.
   compiling local idsum : List F -> F
Time: 0.02 SEC.
   compiling local ifact : F -> F
Time: 0.01 SEC.
   compiling local ibinom : List F -> F
Time: 0 SEC.
   compiling local iperm : List F -> F
Time: 0 SEC.
****** Domain: R already in scope
augmenting R: (RetractableTo (Integer))
   compiling exported iidsum : List F -> F
Time: 0.01 SEC.
   compiling exported iidprod : List F -> F
Time: 0.01 SEC.
   compiling local iiipow : List F -> F
Time: 0.01 SEC.
****** Domain: F already in scope
augmenting F: (RadicalCategory)
   compiling exported ipow : List F -> F
Time: 0.01 SEC.
   compiling exported ipow : List F -> F
Time: 0 SEC.
   compiling exported ipow : List F -> F
Time: 0.04 SEC.
****** Domain: R already in scope
augmenting R: (CombinatorialFunctionCategory)
   compiling exported iifact : F -> F
Time: 0.01 SEC.
   compiling exported iiperm : List F -> F
Time: 0 SEC.
****** Domain: R already in scope
augmenting R: (RetractableTo (Integer))
   compiling exported iibinom : List F -> F
Time: 0.03 SEC.
   compiling exported iibinom : List F -> F
Time: 0 SEC.
   compiling exported iibinom : List F -> F
Time: 0.01 SEC.
   compiling exported iifact : F -> F
Time: 0 SEC.
   compiling exported iibinom : List F -> F
Time: 0 SEC.
   compiling exported iiperm : List F -> F
Time: 0 SEC.
****** Domain: R already in scope
augmenting R: (ElementaryFunctionCategory)
   compiling exported iipow : List F -> F
Time: 0 SEC.
   compiling exported iipow : List F -> F
Time: 0.01 SEC.
****** Domain: F already in scope
augmenting F: (ElementaryFunctionCategory)
   compiling local dvpow2 : List F -> F
Time: 0 SEC.
(time taken in buildFunctor:  0)
;;;     ***       |CombinatorialFunction| REDEFINED
;;;     ***       |CombinatorialFunction| REDEFINED
Time: 0.04 SEC.
   Warnings: 
      [1] ^:  val has no value
      [2] ^:  exponent has no value
      [3] iiipow:  var has no value
      [4] iiipow:  exponent has no value
      [5] ipow:  n has no value
      [6] ipow:  var has no value
      [7] ipow:  exponent has no value
   Cumulative Statistics for Constructor CombinatorialFunction
      Time: 0.54 seconds
   finalizing NRLIB COMBF 
   Processing CombinatorialFunction for Browser database:
--------constructor---------
--------(factorials (% %))---------
--------(factorials (% % (Symbol)))---------
--------(summation (% % (Symbol)))---------
--------(summation (% % (SegmentBinding %)))---------
--------(product (% % (Symbol)))---------
--------(product (% % (SegmentBinding %)))---------
--------constructor---------
--------(belong? ((Boolean) (BasicOperator)))---------
--------(operator ((BasicOperator) (BasicOperator)))---------
--------(^ (F F F))---------
--------(binomial (F F F))---------
--------(permutation (F F F))---------
--------(factorial (F F))---------
--------(factorials (F F))---------
--------(factorials (F F (Symbol)))---------
--------(summation (F F (Symbol)))---------
--------(summation (F F (SegmentBinding F)))---------
--------(product (F F (Symbol)))---------
--------(product (F F (SegmentBinding F)))---------
--------(iifact (F F))---------
--------(iibinom (F (List F)))---------
--------(iiperm (F (List F)))---------
--------(iipow (F (List F)))---------
--------(iidsum (F (List F)))---------
--------(iidprod (F (List F)))---------
--------(ipow (F (List F)))---------
--->/usr/local/lib/fricas/target/x86_64-unknown-linux/../../src/algebra/COMBF.spad-->CombinatorialFunction(): Spurious comments: Provides combinatorial functions over an integral domain.
; compiling file "/var/aw/var/LatexWiki/COMBF.NRLIB/COMBF.lsp" (written 06 MAR 2015 05:45:52 PM):
; /var/aw/var/LatexWiki/COMBF.NRLIB/COMBF.fasl written
; compilation finished in 0:00:00.362
------------------------------------------------------------------------
   CombinatorialFunction is now explicitly exposed in frame initial 
   CombinatorialFunction will be automatically loaded when needed from 
      /var/aw/var/LatexWiki/COMBF.NRLIB/COMBF
   FSPECF abbreviates package FunctionalSpecialFunction 
(EVAL-WHEN (EVAL LOAD) (SETQ |$tryRecompileArguments| NIL))
Value = NIL
------------------------------------------------------------------------
   initializing NRLIB FSPECF for FunctionalSpecialFunction 
   compiling into NRLIB FSPECF 
****** Domain: R already in scope
   processing macro definition INP ==> InputForm 
   processing macro definition SPECIALINPUT ==> QUOTE %specialInput 
   compiling exported abs : F -> F
Time: 0.01 SEC.
   compiling exported conjugate : F -> F
Time: 0 SEC.
   compiling exported Gamma : F -> F
Time: 0 SEC.
   compiling exported Gamma : (F,
   compiling exported Beta : (F,
   compiling exported digamma : F -> F
Time: 0 SEC.
   compiling exported polygamma : (F,
   compiling exported besselJ : (F,
   compiling exported besselY : (F,
   compiling exported besselI : (F,
   compiling exported besselK : (F,
   compiling exported airyAi : F -> F
Time: 0 SEC.
   compiling exported airyAiPrime : F -> F
Time: 0 SEC.
   compiling exported airyBi : F -> F
Time: 0 SEC.
   compiling exported airyBiPrime : F -> F
Time: 0 SEC.
   compiling exported lambertW : F -> F
Time: 0 SEC.
   compiling exported polylog : (F,
   compiling exported weierstrassP : (F,
   compiling exported weierstrassPPrime : (F,
   compiling exported weierstrassSigma : (F,
   compiling exported weierstrassZeta : (F,
****** Domain: F already in scope
augmenting F: (RetractableTo (Integer))
augmenting $: (SIGNATURE $ hypergeometricF (F (List F) (List F) F))
augmenting $: (SIGNATURE $ meijerG (F (List F) (List F) (List F) (List F) F))
   compiling exported hypergeometricF : (List F,
   compiling exported meijerG : (List F,
   importing List Kernel F
   processing macro definition dummy ==> ::((Sel (Symbol) new),
   compiling local grad3 : (List F,
   compiling local grad4 : (List F,
   compiling exported whittakerM : (F,
   compiling local eWhittakerM : (F,
   compiling local elWhittakerM : List F -> F
Time: 0 SEC.
   compiling local eWhittakerMGrad_z : (F,
   compiling local dWhittakerM : (List F,
   compiling exported whittakerW : (F,
   compiling local eWhittakerW : (F,
   compiling local elWhittakerW : List F -> F
Time: 0 SEC.
   compiling local eWhittakerWGrad_z : (F,
   compiling local dWhittakerW : (List F,
   compiling exported angerJ : (F,
****** Domain: F already in scope
augmenting F: (TranscendentalFunctionCategory)
   compiling local eAngerJ : (F,
   compiling local elAngerJ : List F -> F
Time: 0.01 SEC.
   compiling local eAngerJGrad_z : (F,
   compiling local dAngerJ : (List F,
   compiling local eeAngerJ : List F -> F
Time: 0 SEC.
   compiling exported weberE : (F,
****** Domain: F already in scope
augmenting F: (TranscendentalFunctionCategory)
   compiling local eWeberE : (F,
   compiling local elWeberE : List F -> F
Time: 0 SEC.
   compiling local eWeberEGrad_z : (F,
   compiling local dWeberE : (List F,
   compiling local eeWeberE : List F -> F
Time: 0.01 SEC.
   compiling exported struveH : (F,
   compiling local eStruveH : (F,
   compiling local elStruveH : List F -> F
Time: 0 SEC.
****** Domain: F already in scope
augmenting F: (TranscendentalFunctionCategory)
****** Domain: F already in scope
augmenting F: (RadicalCategory)
   compiling local eStruveHGrad_z : (F,
   compiling local dStruveH : (List F,
   compiling exported struveL : (F,
   compiling local eStruveL : (F,
   compiling local elStruveL : List F -> F
Time: 0 SEC.
****** Domain: F already in scope
augmenting F: (TranscendentalFunctionCategory)
****** Domain: F already in scope
augmenting F: (RadicalCategory)
   compiling local eStruveLGrad_z : (F,
   compiling local dStruveL : (List F,
   compiling exported hankelH1 : (F,
   compiling local eHankelH1 : (F,
   compiling local elHankelH1 : List F -> F
Time: 0 SEC.
   compiling local eHankelH1Grad_z : (F,
   compiling local dHankelH1 : (List F,
   compiling exported hankelH2 : (F,
   compiling local eHankelH2 : (F,
   compiling local elHankelH2 : List F -> F
Time: 0 SEC.
   compiling local eHankelH2Grad_z : (F,
   compiling local dHankelH2 : (List F,
   compiling exported lommelS1 : (F,
   compiling local eLommelS1 : (F,
   compiling local elLommelS1 : List F -> F
Time: 0 SEC.
   compiling local eLommelS1Grad_z : (F,
   compiling local dLommelS1 : (List F,
   compiling exported lommelS2 : (F,
   compiling local eLommelS2 : (F,
   compiling local elLommelS2 : List F -> F
Time: 0 SEC.
   compiling local eLommelS2Grad_z : (F,
   compiling local dLommelS2 : (List F,
   compiling exported kummerM : (F,
   compiling local eKummerM : (F,
   compiling local elKummerM : List F -> F
Time: 0.01 SEC.
   compiling local eKummerMGrad_z : (F,
   compiling local dKummerM : (List F,
   compiling exported kummerU : (F,
   compiling local eKummerU : (F,
   compiling local elKummerU : List F -> F
Time: 0 SEC.
   compiling local eKummerUGrad_z : (F,
   compiling local dKummerU : (List F,
   compiling exported legendreP : (F,
   compiling local eLegendreP : (F,
   compiling local elLegendreP : List F -> F
Time: 0.01 SEC.
   compiling local eLegendrePGrad_z : (F,
   compiling local dLegendreP : (List F,
   compiling exported legendreQ : (F,
   compiling local eLegendreQ : (F,
   compiling local elLegendreQ : List F -> F
Time: 0 SEC.
   compiling local eLegendreQGrad_z : (F,
   compiling local dLegendreQ : (List F,
   compiling exported kelvinBei : (F,
   compiling local eKelvinBei : (F,
   compiling local elKelvinBei : List F -> F
Time: 0 SEC.
****** Domain: F already in scope
augmenting F: (RadicalCategory)
   compiling local eKelvinBeiGrad_z : (F,
   compiling local dKelvinBei : (List F,
   compiling exported kelvinBer : (F,
   compiling local eKelvinBer : (F,
   compiling local elKelvinBer : List F -> F
Time: 0.01 SEC.
****** Domain: F already in scope
augmenting F: (RadicalCategory)
   compiling local eKelvinBerGrad_z : (F,
   compiling local dKelvinBer : (List F,
   compiling exported kelvinKei : (F,
   compiling local eKelvinKei : (F,
   compiling local elKelvinKei : List F -> F
Time: 0 SEC.
****** Domain: F already in scope
augmenting F: (RadicalCategory)
   compiling local eKelvinKeiGrad_z : (F,
   compiling local dKelvinKei : (List F,
   compiling exported kelvinKer : (F,
   compiling local eKelvinKer : (F,
   compiling local elKelvinKer : List F -> F
Time: 0 SEC.
****** Domain: F already in scope
augmenting F: (RadicalCategory)
   compiling local eKelvinKerGrad_z : (F,
   compiling local dKelvinKer : (List F,
   compiling exported ellipticK : F -> F
Time: 0 SEC.
   compiling local eEllipticK : F -> F
Time: 0 SEC.
   compiling local elEllipticK : List F -> F
Time: 0 SEC.
   compiling local dEllipticK : F -> F
Time: 0.02 SEC.
   compiling exported ellipticE : F -> F
Time: 0 SEC.
   compiling local eEllipticE : F -> F
Time: 0 SEC.
   compiling local elEllipticE : List F -> F
Time: 0 SEC.
   compiling local dEllipticE : F -> F
Time: 0.01 SEC.
   compiling exported ellipticE : (F,
   compiling local eEllipticE2 : (F,
   compiling local elEllipticE2 : List F -> F
Time: 0 SEC.
****** Domain: F already in scope
augmenting F: (RadicalCategory)
   compiling local eEllipticE2Grad_z : List F -> F
Time: 0.01 SEC.
   compiling local eEllipticE2Grad_m : List F -> F
Time: 0.01 SEC.
   compiling local inEllipticE2 : List InputForm -> InputForm
Time: 0.01 SEC.
   compiling exported ellipticF : (F,
   compiling local eEllipticF : (F,
   compiling local elEllipticF : List F -> F
Time: 0 SEC.
****** Domain: F already in scope
augmenting F: (RadicalCategory)
   compiling local eEllipticFGrad_z : List F -> F
Time: 0.02 SEC.
   compiling local eEllipticFGrad_m : List F -> F
Time: 0.02 SEC.
   compiling exported ellipticPi : (F,
   compiling local eEllipticPi : (F,
   compiling local elEllipticPi : List F -> F
Time: 0 SEC.
****** Domain: F already in scope
augmenting F: (RadicalCategory)
   compiling local eEllipticPiGrad_z : List F -> F
Time: 0.14 SEC.
   compiling local eEllipticPiGrad_n : List F -> F
Time: 0.23 SEC.
   compiling local eEllipticPiGrad_m : List F -> F
Time: 0.03 SEC.
   compiling exported jacobiSn : (F,
   compiling local eJacobiSn : (F,
   compiling local elJacobiSn : List F -> F
Time: 0 SEC.
   compiling local jacobiGradHelper : (F,
   compiling local eJacobiSnGrad_z : List F -> F
Time: 0.01 SEC.
   compiling local eJacobiSnGrad_m : List F -> F
Time: 0.02 SEC.
   compiling exported jacobiCn : (F,
   compiling local eJacobiCn : (F,
   compiling local elJacobiCn : List F -> F
Time: 0 SEC.
   compiling local eJacobiCnGrad_z : List F -> F
Time: 0.01 SEC.
   compiling local eJacobiCnGrad_m : List F -> F
Time: 0.03 SEC.
   compiling exported jacobiDn : (F,
   compiling local eJacobiDn : (F,
   compiling local elJacobiDn : List F -> F
Time: 0 SEC.
   compiling local eJacobiDnGrad_z : List F -> F
Time: 0.01 SEC.
   compiling local eJacobiDnGrad_m : List F -> F
Time: 0.04 SEC.
   compiling exported jacobiZeta : (F,
   compiling local eJacobiZeta : (F,
   compiling local elJacobiZeta : List F -> F
Time: 0 SEC.
   compiling local eJacobiZetaGrad_z : List F -> F
Time: 0 SEC.
   compiling local eJacobiZetaGrad_m : List F -> F
Time: 0.26 SEC.
   compiling exported jacobiTheta : (F,
   compiling local eJacobiTheta : (F,
   compiling local elJacobiTheta : List F -> F
Time: 0.01 SEC.
   compiling exported lerchPhi : (F,
   compiling local eLerchPhi : (F,
   compiling local elLerchPhi : List F -> F
Time: 0.01 SEC.
   compiling local dLerchPhi : (List F,
   compiling exported riemannZeta : F -> F
Time: 0 SEC.
   compiling local eRiemannZeta : F -> F
Time: 0 SEC.
   compiling local elRiemannZeta : List F -> F
Time: 0.01 SEC.
   compiling exported charlierC : (F,
   compiling local eCharlierC : (F,
   compiling local elCharlierC : List F -> F
Time: 0 SEC.
   compiling exported hermiteH : (F,
   compiling local eHermiteH : (F,
   compiling local elHermiteH : List F -> F
Time: 0 SEC.
   compiling local eHermiteHGrad_z : (F,
   compiling local dHermiteH : (List F,
   compiling exported jacobiP : (F,
   compiling local eJacobiP : (F,
   compiling local elJacobiP : List F -> F
Time: 0.01 SEC.
   compiling local eJacobiPGrad_z : (F,
   compiling local dJacobiP : (List F,
   compiling exported laguerreL : (F,
   compiling local eLaguerreL : (F,
   compiling local elLaguerreL : List F -> F
Time: 0 SEC.
   compiling local eLaguerreLGrad_z : (F,
   compiling local dLaguerreL : (List F,
   compiling exported meixnerM : (F,
   compiling local eMeixnerM : (F,
   compiling local elMeixnerM : List F -> F
Time: 0 SEC.
   compiling exported belong? : BasicOperator -> Boolean
Time: 0 SEC.
   compiling exported operator : BasicOperator -> BasicOperator
Time: 0.03 SEC.
   compiling local iGamma : F -> F
Time: 0 SEC.
   compiling local iabs : F -> F
Time: 0.01 SEC.
augmenting R: (SIGNATURE R abs (R R))
   importing Polynomial R
   compiling exported iiabs : F -> F
Time: 0.02 SEC.
****** Domain: F already in scope
augmenting F: (RadicalCategory)
augmenting R: (SIGNATURE R conjugate (R R))
   compiling exported iiabs : F -> F
Time: 0 SEC.
   compiling exported iiabs : F -> F
Time: 0 SEC.
   compiling exported iiabs : F -> F
Time: 0 SEC.
   compiling local iconjugate : Kernel F -> F
****** comp fails at level 9 with expression: ******
error in function iconjugate 
(SEQ
 (SEQ
  (LET (|:| #1=#:G1069 (|Boolean|))
    (|case| (|symbolIfCan| |k|) (|Symbol|)))
  (|exit| 1
   (IF #1#
       (LET |x|
         (|kernel| |opconjugate| (|::| |k| F)))
       (SEQ
        (LET |op|
          ((|Sel| (|Expression| R) |operator|)
           ((|Sel| (|CommonOperators|) |operator|) (|name| |k|))))
        (|exit| 1
         (LET |x|
           ((|conjugate| | << op >> |) (|argument| |k|))))))))
 (|exit| 1 (|return| 1 |x|)))
****** level 9  ******
$x:= op
$m:= F
$f:=
((((|op| #) (#:G1069 # #) (|k| # #) (|iconjugate| #) ...)
  ((|elMeixnerM| #) (|eMeixnerM| #)) ((|eMeixnerM| #) (|dLaguerreL| #))
  ((|dLaguerreL| #) (|eLaguerreLGrad_z| #)) ...))
   >> Apparent user error:
   Cannot coerce op 
      of mode (BasicOperator) 
      to mode ##2