The full answer is beyond my scope of understanding; however, there is only one time in a trainer's life where they can build muscle and lose fat at the same time. That's when they are a beginner and are currently obese. Based off of information from Dr. Kilgore in "Practical Programming for Strength Training" we have a couple variables for building muscle:
- Doing enough work to disrupt homeostasis, and force an adaptation.
- Getting enough rest and food for recovery.
A beginner is so far removed from their genetic potential, they have much more leeway to play with their nutrition than someone who is an intermediate or higher lifter. Intermediate refers to the length of time recovery takes, not how much the person actually lifts. Essentially, the beginner can lift with a calorie deficit, assuming they are getting the protein and other nutrients they need. Essentially the body needs the following for recovery:
- Rest (sleep and time without work)
- Protein (used to build more protein pairs in the muscle fibers to make you stronger)
- Vitamins and minerals (necessary part of metabolism, and a lifter needs more of these than a sedentary person)
- Energy (can be in the form of fat or carbs, the body doesn't care)
The key aspect here is the last bullet point. With the calorie deficit, the body will pull from the fat stores to push energy into the muscles. Energy in this sense is the glycogen stores. A pound of muscle can store 600 Calories of glycogen, and a pound of fat stores 3500 Calories of glycogen. So the exchange will never be 1-to-1.
There are a few "anabolic" diets out there, some more questionable than others. A similarity among most that work is a reduction in the amount of carbs you eat, or a controlling of the glycemic load on the body.
The unfortunate truth is that as you progress in your lifting and are getting closer to your genetic potential, the difference between disrupting homeostasis and overtraining gets to be razor thin. When you aren't recovering like you should, you have to look at the diet.
This is a primary reason why most professional bodybuilders have bulking and cutting stages. The bulking stage is focused on building the muscle up, by any means necessary. That means more food, and probably higher fat than they would normally like. The cutting stage doesn't build more muscle, or make you stronger. It's designed to preserve your muscle while you burn fat. Essentially the work you are doing is not disrupting homeostasis, so it isn't going to force any adaptations. That means it's like an active recovery for a bit. Trying to cut Calories while building muscle can mean the difference between successful recovery for the next increase or overtraining because of insufficient recovery.