## Symbolic Representation

To solve the given problem, we first need to convert the natural language description into a symbolic representation. Let's define the variables and the objective function, as well as the constraints.

### Variables
- $x_1$ = Number of cheese pizzas
- $x_2$ = Number of pepperoni pizzas

### Objective Function
The objective is to maximize profit. Given that the profit per cheese pizza is $7 and per pepperoni pizza is $9, the objective function can be represented as:
\[ \text{Maximize:} \quad 7x_1 + 9x_2 \]

### Constraints
1. Flour constraint: $30x_1 + 40x_2 \leq 3000$
2. Cheese constraint: $50x_1 + 20x_2 \leq 4000$
3. Sauce constraint: $40x_1 + 30x_2 \leq 5000$
4. Non-negativity constraints: $x_1 \geq 0, x_2 \geq 0$

## Symbolic Representation in JSON Format

```json
{
    'sym_variables': [('x1', 'cheese pizzas'), ('x2', 'pepperoni pizzas')],
    'objective_function': '7*x1 + 9*x2',
    'constraints': [
        '30*x1 + 40*x2 <= 3000',
        '50*x1 + 20*x2 <= 4000',
        '40*x1 + 30*x2 <= 5000',
        'x1 >= 0',
        'x2 >= 0'
    ]
}
```

## Gurobi Code in Python

```python
import gurobipy as gp

# Create a new model
m = gp.Model("pizza_problem")

# Define variables
x1 = m.addVar(name="cheese_pizzas", lb=0, vtype=gp.GRB.INTEGER)  # Number of cheese pizzas
x2 = m.addVar(name="pepperoni_pizzas", lb=0, vtype=gp.GRB.INTEGER)  # Number of pepperoni pizzas

# Objective function: Maximize profit
m.setObjective(7*x1 + 9*x2, gp.GRB.MAXIMIZE)

# Constraints
m.addConstr(30*x1 + 40*x2 <= 3000, name="flour_constraint")  # Flour constraint
m.addConstr(50*x1 + 20*x2 <= 4000, name="cheese_constraint")  # Cheese constraint
m.addConstr(40*x1 + 30*x2 <= 5000, name="sauce_constraint")  # Sauce constraint

# Solve the model
m.optimize()

# Print the results
if m.status == gp.GRB.OPTIMAL:
    print(f"Optimal number of cheese pizzas: {x1.varValue}")
    print(f"Optimal number of pepperoni pizzas: {x2.varValue}")
    print(f"Maximum profit: ${m.objVal:.2f}")
else:
    print("The model is infeasible.")
```