Could you elaborate on this please: "the exercises guide you to "invent" the important parts of the theory."
BTW: I think time not doing exercises is just as important; it's when your mind tries to piece together the data. Coincidentally(?) time resting, after physically exercising, is when your muscles strengthen.
Sure, texts like "linear algebra done right" or "Understanding Analysis" do a unusually good job of integrating large multi part examples where the reader works through them and proves the theorems themselves before they are explained in the book. The nominal case for most math texts is definition, lemmas, theorems, and sometimes they provide examples, and other times, readers are expected to make their own examples. For example, basic topology really only needs 10-20 pages to completely define, but to really understand why the axioms are chosen and the implications, you must work through examples, it is the only way. In fact there is a good book on topology specifically due to this " Counterexamples in Topology"
Thanks! I think I now recognize this from Spivak (Calculus), where much of the teaching is literally in the exercises. You are guided along, deriving/proving many things along the way, some incidental, some cumulative. (There's also important exposition in the exercises.)
A downside is you lose the thread if you skip exercises (e.g. do alternate ones) - the exercises are an integrated whole. But it's a lot to do all of them.
I hadn't gotten the impression that these helped show why exactly the axioms were choosen - though could well be there and I just didn't see it.
BTW: I think time not doing exercises is just as important; it's when your mind tries to piece together the data. Coincidentally(?) time resting, after physically exercising, is when your muscles strengthen.