I disagree. Whenever I need to get locked in and focus on complex tasks I eat foods high in nitrates and run (need carbs for that).
Here's a study on the affects of nitrate's improving brain performance in older adults. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3018552/
Ketosis has had the opposite effect for me and I've never been able to balance the keto-flu with my normal day-to-day activities. I feel like garbage.