# Sets, logic, and formal languages. Which precedes the other? [duplicate]

This question already has an answer here:

Recently I was reading about relations, and one passage stated "The notion of logical equivalence is, as its name suggests, an equivalence relation on the set of propositional terms".

Now, to me this application of sets to logic seemed a bit circular. I always saw a set as a mathematical idea and math as being 'inside' of a logical system. So then how can we use sets to describe logic if the logic is used to build up the math?

I am also encountering this confusion in Enderton's logic book, for example: "An expression is a well-formed formula iff it is a member of every inductive set".