Since you approach this from a mathematical point of view, you should consider reading this first. Von Neumann's theory on universal constructors captured the essentials of biochemistry long before the field of biochemistry came into existence, therefore the right approach in biology and medicine is to frame things in terms of robust machines that are going to be able to maintain themselves under a very wide range of conditions by adapting themselves.
Now, the human body has evolved to function optimally under conditions that involve eating a low fat, high whole grain carb diet and a lot of physical exercise. What has happened over many millions of years, is that our body has come to depend on sticking to such a lifestyle for optimal function, but adaptability means that you won't immediately collapse and die if your lifestyle differs from this significantly.
What about empiric evidence to back this up? For a long time, the medical community didn't seriously investigate this, the Western lifestyle was used as the default model and only minor tweaks were investigated. It was found that eating less saturated fats, a bit more fruits and vegetables, and exercising a bit more was going to improve the general health. Only very recently have more radically different lifestyles been seriously investigated. E.g. this article describes the health of the Tsimane people in Bolivia. As we can read here (the Lancet article is behind a paywall):
A high carbohydrate diet of rice, plantain, manioc and corn, with a small amount of wild game and fish – plus around six hours’ exercise every day – has given the Tsimané people of the Bolivian Amazon the healthiest hearts in the world.
“Most of the Tsimané are able to live their entire life without developing any coronary atherosclerosis. This has never been seen in any prior research. While difficult to achieve in the industrialized world, we can adopt some aspects of their lifestyle to potentially forestall a condition we thought would eventually effect almost all of us.”
To me, this empirical evidence goes beyond the specifics of the Tsimane lifestyle, it also confirms what I explained above, i.e. the human body has been adapted by natural selection so much to an indigenous lifestyle that straying away too far from this will damage the body. But because the human body is a well designed self repairing machine, it will adapt itself quite well to an unhealthy lifestyle. So, while you'll get atherosclerosis, it won't kill you for some considerable time.
Another example. If you live in Nature, your salt intake won't be much higher than 0.1 grams per day, more than 50 times lower than what passes for a normal salt intake. Is this harmful or is our normal intake harmful? If you believe in what I'm advocating for then you should believe that 0.1 grams per day is not harmful and that possibly 5 grams per day could have negative health effects. A priori there are no good reasons to expect that 5 grams of salt per day would fix a biological flaw in our body. And indeed, if you read this article, you see that what passes for a normal blood pressure should be considered to be mild hypertension, this is masked due to the fact that we're all overdosing on salt.
What about eating fat, don't carbs cause type 2 diabetes? As pointed out here, the problem starts with fat buildup in the muscles which causes insulin resistance which can eventually lead to type 2 diabetes. This shouldn't be a surprise if you consider where your calories would come from if you lived in an indigenous society. There is no cooking oil in the jungle. So, why would you assume that millions of years of evolution has led to some flaw in your body design that is magically going to be cured by Tesco's extra virgin olive oil? That doesn't make sense to me, so you should not use any oil or at least limit it's use to very small amounts.
Then if you stop or severely cut down on fats, take a lot of exercise and eat a lot of fruits and vegetables and whole grains, your health should improve. You may ask how much fruits and vegetables you should eat. We can again approach this from a theoretical reasoning where we assume that the indigenous lifestyle yields optimal health. Here we can consider that indigenous people had little access to meat and ate no dairy products. This means that they would have had to get a fair fraction of all their essential amino acids from vegetables and grains.
The problem is then that some essential amino acids are difficult to get from non-meat, non-dairy products if you eat normal Western-diet sized portions (unless you eat special foods like tofu, but such special foods are hard to get in the jungle). So, this means that what passes for normal portions is too small. If you make some rough estimates of how much you should eat, you get to a figure of the order of 1 kg of fruits and vegetables combined per day. So, 500 grams of vegetables and 500 grams of fruits per day will yield a fair fraction of essential amino acids, it is thus a good guess for what a healthy intake should be.
We can then assume that this intake of 1 kg of fruits and vegetables is something that our bodies are likely optimally designed for. While amino acids is not something we need to be concerned about unless you are a vegan, fruits and vegetables contain a lot of vitamins and minerals and fibers. So, even if you eat meat and dairy products, your body should be considered to be optimally designed to eat about 1 kg of fruits and vegetables.
Eating a lot more fruits and vegetables than recommended as been put to the test only recently, the results are as follows:
Compared with eating no fruit or veg a day, it showed:
200g cut the risk of cardiovascular disease by 13% while 800g cut the risk by 28%
200g cut the risk of cancer by 4%, while 800g cut the risk by 13%
200g cut the risk of a premature death by 15%, while 800g cut the risk by 31%
Now, as I mentioned above, indigenous people have a low meat intake, so it may be wise to limit your meat intake. But you must then make sure you're getting enough protein.