private boolean hasVariable(AlgebraicParticle a){
		if(a instanceof Variable) return true;
		else if(a instanceof AlgebraicCollection){
			AlgebraicCollection c = (AlgebraicCollection) a;
			for(int i = 0; i < c.length(); i++){
				if(hasVariable(c.get(i))) return true;
			}
			return false;
		}
		else if(a instanceof Fraction){
			Fraction f = (Fraction) a;
			return hasVariable(f.getTop()) || hasVariable(f.getBottom()); 
		}
		else return false;
	}