I am a newbie in math and I am currently reading some measure theory for fun. I realized that when reading proofs for many theorems, the author often "magically" declared some sequence of sets or some collection of sets, that seems very counterintuitive at first, but somehow will always prove the theorem at the very end.
I was wondering how do they make up with all these prove? Because many of the theorems I am looking at seems to be "small unnamed theorem." If I want to prove these theorem "magically", is there a way to do it? Or Is the only way is through trial and error?
Mostly when I researched a topic in my PhD time and I had a theorem that needed proofing I would write it down in the current form that I thought was right.
Then I tried to break it. Most of the time, I succeeded with some strange construction that wass able to circumvent the theorem by having a property that my missing theorem requirements allowed it to do.
Because I now knew this, I added an requirement to my theorem (e.g. the function needs to be differentiable) and try to break it again. I continued to iteratively refine the theorem until I couldnt break it anymore.
To write down the proof now I looked at all my strange constructions and looked at WHY they were able to break the theorem. Condense that and write it down the other way around (why do you need to have the requirement to fulfill the theorem) and you have yourself a proof :)
So the strange sets you encountered are not magical and do not make any sense from a outsider perspective why you should use THESE sets and nothing else. But it does make sense from the perspective of the inventor (who wrote the proof).