## Step 1: Define the symbolic representation of the variables
The variables are 'milligrams of potassium' and 'milligrams of magnesium', which can be represented symbolically as $x_1$ and $x_2$ respectively.

## Step 2: Convert the natural language description into a symbolic representation
The objective function to minimize is $4x_1 + 5x_2$.

## Step 3: List the constraints in symbolic notation
The constraints given are:
- $23x_1 + 14x_2 \geq 39$
- $24x_1 + 28x_2 \geq 125$
- $x_1 - 8x_2 \geq 0$
- $23x_1 + 14x_2 \leq 58$
- $24x_1 + 28x_2 \leq 219$

## 4: Define the symbolic representation of the problem
The symbolic representation of the problem is:
```json
{
'sym_variables': [('x1', 'milligrams of potassium'), ('x2', 'milligrams of magnesium')],
'objective_function': '4*x1 + 5*x2',
'constraints': [
    '23*x1 + 14*x2 >= 39',
    '24*x1 + 28*x2 >= 125',
    'x1 - 8*x2 >= 0',
    '23*x1 + 14*x2 <= 58',
    '24*x1 + 28*x2 <= 219'
]
}
```

## 5: Write the Gurobi code to solve the optimization problem
```python
import gurobi

def solve_optimization_problem():
    # Create a new model
    model = gurobi.Model()

    # Define the variables
    x1 = model.addVar(name='milligrams_of_potassium', lb=0)  # Assuming non-negative
    x2 = model.addVar(name='milligrams_of_magnesium', lb=0)  # Assuming non-negative

    # Define the objective function
    model.setObjective(4 * x1 + 5 * x2, gurobi.GRB.MINIMIZE)

    # Add constraints
    model.addConstr(23 * x1 + 14 * x2 >= 39, name='digestive_support_index_min')
    model.addConstr(24 * x1 + 28 * x2 >= 125, name='cognitive_performance_index_min')
    model.addConstr(x1 - 8 * x2 >= 0, name='potassium_magnesium_ratio')
    model.addConstr(23 * x1 + 14 * x2 <= 58, name='digestive_support_index_max')
    model.addConstr(24 * x1 + 28 * x2 <= 219, name='cognitive_performance_index_max')

    # Optimize the model
    model.optimize()

    # Print the solution
    if model.status == gurobi.GRB.OPTIMAL:
        print('Optimal solution found.')
        print(f'Milligrams of potassium: {x1.varValue}')
        print(f'Milligrams of magnesium: {x2.varValue}')
        print(f'Objective function value: {model.objVal}')
    else:
        print('No optimal solution found.')

solve_optimization_problem()
```