What is logic and what is mathematics is indeed a very tricky question, many people would naively consider mathematics as nothing but machinery for generating symbols out of symbols, they see mathematics as strings of symbols generating strings of symbols. So mathematics just provide the necessary strings of symbols that other disciplines would use by "attaching" meaning belonging to those disciplines to those symbols. Under this perspective mathematics can be said to be prior to any kind of fairly complex knowledge that necessitate generating many string of symbols from prior ones. So mathematics in this sense would be prior to the known logical systems as well like propositional logic, first order, second order, infinitary logic, etc.
However mathematics is not commonly perceived to be so general, more commonly it is thought to be about some particular content mostly about general spatial-temporal relations, thought about 'structure' seem to be at the core of it. In this sense mathematics would be posterior to logic, since the later covers more general grounds. But however day after day I'm more of the opinion that particular mathematics is wholly interpretable in mere logic! and that the particular content it is thought to negotiate is really dispensable with at least in principle.
A Logical system mends itself with general inferences, so logical connectives take arguments that range over all values that can substitute those arguments. To me any naive extension of a logical system is a logical system, of course this extension must not include complex measures, and they must be of the kind that makes one feel as being "natural" extensions. I'll speak about one below so that one gets the sense of what I mean by "natural" here.
Lets take first order logic "FOL", I'll accept this as a pure piece of logic (the recursive mechanism and the use of natural indexing, function symbols, etc.. although mathematical tools per se, but they'll be considered here a legitimate logical tools and thus just part of logic).
Now in first order logic quantification is allowed over Objects only, predicate symbols are not quantified over.
However this kind of logic can be naturally extended into a logic that allows quantification over predicate symbols that take only Object symbols as arguments, i.e. predicates that hold of objects only, those can be called predicates of the first kind, now predicates that take predicates of the first kind as arguments are named as predicates of the second kind. Now as with the case of first order logic, we can impose the restriction that predicates of the second kind cannot be quantified over so only constant symbols denoting particular predicates of the second kind can be used in a formula (in FOL only constant predicate symbols of the first kind are allowed in formulas and they are not quantified over). Now this extension is consistent, and it is a natural extension of FOL, it employs no concept other than a general copy of what underlies first order logic but to a higher realm, so the motivation and the tools used are all logical, so the resulting system is to me a "pure" piece of logic also. Along the 'same' lines one can extend that system further to one that also quantifies over predicates of the second kind but leave those of the third kind non quantified. Now this can be further extended using the natural indexing commonly used in logical systems to cover all predicates of any n-kind. We use 'sorted' formulas those will use indexed predicate symbols as P1, P2, P3,... each Pi is taken to range only over predicates of the i_th sort and of course only takes Pi-1 predicates as arguments. A well sorted formula would be acceptable only if every atomic formula of it is of the general form Pi+1(Qi), Objects are indexed with 0 (or otherwise left un-indexed). This system is purely logical since FOL is logical system and it is a fragment of it and since every one step higher extension of a logical fragment of it is logical also, so by naive understanding about induction logicality would sweep into the whole system.
Now we also desire to Extend that system! But to do that along similar lines it becomes "necessary" to use an indexing beyond the naturals.
Now we'll use the index #, and P# would denote a predicate that range over predicates of the # sort. Now each P# predicate can take any Pi where i is a natural index as an argument, so P#(P1), P#(P2), ... are all atomic formulas, and also along the same lines P#+1(P#), P#+2(P# +1), etc.. are all atomic formulas. Now this is also very natural since # is above any natural index and all can be seen to be 'immediately' lower than it, i.e. the distance that 0 has from # is not really different from that any n has from #, so a predicate of the #-sort can take any predicate of the n-sort (where n is a natural) as an argument, this is just a naive extension of the previous system. So this system for the same reasons outlined above would also inherit the logicality of the prior system, and it *is* a pure piece LOGIC.
The use of index # came out of logical necessity to extend the system along the same lines, so it is a necessity that sprang out of strictly employing logical lines of extension, since it is a necessity raised within pure logical context, and then it is logical.
The above logical system clearly has the power to interpret second order arithmetic!
Actually along the same lines I think every piece of mathematics can be said to be interpretable in a logical system.
So logicism seems to be the case for the bulk of traditional mathematics, and possibly for any mathematical endeavor?
I don't think the above result comes into conflict with the criterion of permutation invariance to decide logical notions, but I'm not sure.
I'd like here to also present this permutation invariance (as how I understand it) of a logical notion.
Now a symbol $ is said to be logical iff the representative set of it is invariant under all permutations of the domain of discourse over which arguments of $ range.
The representative set of a symbol goes generally along the following lines.
For monadic symbol $, it is the set of all x such that $(x) is True.
For any n_adic symbol $, is the set of all <x1,...,xn> tuples such that $(x1,..,xn) is True.
A permutation over any set is a bijection from that set to that set.
Now if D is the domain of discourse over which all arguments of $ range, and if f is a bijection from D to D, then $ would be called as permutation invariant iff for each permutation f on D the set D* of all <f(x1),...,f(xn)> tuples where <x1,...,xn> is an element of the representative set of $, is the same set D.
Now this works for all logical connectives, identity, first order quantifiers, any n quantifier, even infinite quantifiers, also it works for second order quantifiers over predicates that can have extensions (non purely intentional predicates).
Now the domain of discourse for any logical connective is the set of all "propositions" which are statements that are can either be True or False. Permutations can be carried over all "atomic" sentences of the propositional discourse since that will enact permutations on non- atomic sentences as well. And those are easily seen to be invariant.
Identity is a clearly invariant relation.
The universal quantifier is a symbol linking an object to a proposition, so its representative set would be the set of all <x,phi(x)> of course phi is fixed, but x would be any object, phi is of course true for every x. Now this is invariant under all replacements of x (notice that phi is Constant formula raning over ONE value, so it is only replaced by itself!)
This criterion (as displayed here) is a nice criterion to separate logical from non-logical constants. However it doesn't speak a lot about what meta-logical symbols are allowed in formulas (like whether the symbol # above is allowed or not), although it allows the meta- logical symbol omega in infinitary logic which it grants as logic.
Anyhow I really prefer naive natural extensions of logical systems as a generating stream of logical systems, yet the above criterion might be needed to settle the final demarcation of logic from other disciplines.
Whether this is of importance or not, is something that the future would determine. Arguable reasoning about naively extending logical systems in the genre displayed above seem to be a "limited" kind of reasoning, so if just from that reasoning all mathematics can be derived then it is worthwhile promoting logicism. However still for interpreting mathematics in those systems one needs to negotiate thoughts about 'structures' i.e. some contentfull thoughts that mathematics is seem commonly to be about, since the logical motivation is too general for negotiating those particular thoughts, anyhow seeing that there is a logical mainframe within which those thoughts can be carried out is without any doubt helpful in guiding contemplations about those thoughts themselves. So I think logicism is important in providing logical guidance and of course as being an arbiter for mathematical thought.