You want the source code for a powerful CAS? try Axiom. It's an open-source CAS; its interface is not very appealing, but it's very very powerful. Try to join their developer team, if you are really interested. You will then realize how difficult is to create a decent CAS.If I have Mathematica I may have its source . But I dont have money for it .
You could also try yacas (an acronym for "yet another computer algebra system"). Its developer team is small, but it's quite promising.