# Is there a nice way to deal with sets in an abstract/symbolic way?

For instance, if I wanted to

• declare $$A$$ to be the set of all finite subsets of $$\mathbb{Z}$$, and
• declare $$B$$ to be a set comprising all finite subsets of $$\mathbb{Z^{-}}$$, and then
• declare $$C$$ to be $$A \setminus B$$, i.e. consisting of all finite subsets of the integers such that at least one element is nonnegative,

is there any chance that sort of thing has a tidy approach in Mathematica? More specifically, I'd want to define a few sets in very similar ways, with the goal of identifying the properties of elements shared by all of them, stuff like that.

I couldn't find anything that seemed to apply—closest seemed to be judicious use of Assuming and Solve, maybe. If it takes an ugly workaround, I can do that myself (or stick to pen and paper), but I figured it was worth an ask!

• Mathematica cannot do this. FindEquationalProof and AxiomaticTheory are worth looking at, but you'll find they can only deal with first order statements and 'syntactical' rewrite kinds of proofs. Second order logic and higher concepts like the infinite powersets (like your $A$ and $B$) cannot be represented in Mathematica using these methods - though you could represent finite ones if they are sufficiently small. Dec 20, 2022 at 13:58
• It would be helpful to see specific examples of what you're trying to do. There are many strategies for representing abstract things, but you haven't provided enough to get started. identifying the properties of elements shared by all of them might be tractable if you could be more specific. Dec 20, 2022 at 15:39