(* Instructions to build the thin kernel *)


Begin["System`"]

Begin["System`Private`"]

  Unprotect[ $NewMessage ]

  $NewMessage =
        Function[ {sym, tag},
                Module[ {res, mName},
                        mName = ToString[ MessageName[sym, tag]] ;
                        res = If[ tag =!= "usage",
                                FindList[ "msgthin.m",{ mName,
                                        ToString[MessageName[General, tag]]}],
                                FindList[ "infothin.m", mName]] ;
                        If[ ListQ[res] && Apply[ And, Map[ StringQ, res]],
                                          ToExpression[ res]] ;
                        ],
                {HoldAll}]

  Protect[ $NewMessage]


End[]


  SystemStub[ {Integrate`IntegrateG, Integrate`Definite}, "Integrate`main`"];
  SystemStub[ Integrate`TableLookUp, "Integrate`table`"];                    
                                                                           
  SystemStub[ {JacobiSN, JacobiSD, JacobiSC, JacobiCS, JacobiCN, JacobiCD,
        JacobiNC, JacobiND, JacobiDN, JacobiDS, JacobiDC, JacobiAmplitude,
        InverseJacobiSN, InverseJacobiSD, InverseJacobiSC,  InverseJacobiCS,
        InverseJacobiCN,  InverseJacobiCD, InverseJacobiNS, InverseJacobiNC,
        InverseJacobiDS, InverseJacobiDC,InverseJacobiDN, InverseJacobiND,
        EllipticNomeQ,
        EllipticThetaS, EllipticThetaC, EllipticThetaN, EllipticThetaD,
        WeierstrassP, WeierstrassPPrime, InverseWeierstrassP,
        EllipticExp, EllipticLog}, "Elliptic.m"];

  SystemStub[ {HypergeometricPFQ, HypergeometricPFQRegularized,
               Hypergeometric1F1, Hypergeometric2F1}, "HypergeometricPFQ.m"];

  SystemStub[ {InverseSeries, Series, SeriesData}, "Series.m"];

  SystemStub[ {ClebschGordan, ThreeJSymbol, SixJSymbol}, "ClebschGordan.m"];

  SystemStub[ LinearProgramming, "LinearProgramming.m"];

  SystemStub[ PrimePi, "PrimePi.m"];

  SystemStub[ NSolve, "NSolve.m"];

  SystemStub[ GroebnerBasis, "GroebnerBasis.m"];

  SystemStub[ {ComplexExpand, TargetFunctions, System`ComplexExpand`AbsExpr,
               System`ComplexExpand`ArgExpr, System`ComplexExpand`ConjugateExpr,
               System`ComplexExpand`ReImExpr, System`ComplexExpand`SignExpr},
              "ComplexExpand.m"];

End[]

