## Symbolic Representation

To solve the given optimization problem, we first need to convert the natural language description into a symbolic representation.

Let's define the symbolic variables as follows:
- $x_1$ represents the number of Package 1 sold
- $x_2$ represents the number of Package 2 sold

The objective is to maximize profit. Given that the profit per Package 1 is $50 and per Package 2 is $70, the objective function can be written as:
\[ \text{Maximize:} \quad 50x_1 + 70x_2 \]

The factory has limited amounts of blue and red fabric. Package 1 contains 20 meters of blue fabric and 30 meters of red fabric, while Package 2 contains 40 meters of blue fabric and 40 meters of red fabric. The factory has 10000 meters of blue fabric and 12000 meters of red fabric. This gives us the following constraints:
\[ 20x_1 + 40x_2 \leq 10000 \]
\[ 30x_1 + 40x_2 \leq 12000 \]
\[ x_1 \geq 0, x_2 \geq 0 \] (Non-negativity constraints, as the number of packages sold cannot be negative)

## Symbolic Representation in JSON Format

```json
{
    'sym_variables': [('x1', 'Package 1'), ('x2', 'Package 2')],
    'objective_function': '50*x1 + 70*x2',
    'constraints': [
        '20*x1 + 40*x2 <= 10000',
        '30*x1 + 40*x2 <= 12000',
        'x1 >= 0',
        'x2 >= 0'
    ]
}
```

## Gurobi Code in Python

```python
import gurobipy as gp

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

# Define the variables
x1 = model.addVar(name="Package_1", lb=0, vtype=gp.GRB.CONTINUOUS)
x2 = model.addVar(name="Package_2", lb=0, vtype=gp.GRB.CONTINUOUS)

# Define the objective function
model.setObjective(50*x1 + 70*x2, gp.GRB.MAXIMIZE)

# Add constraints
model.addConstr(20*x1 + 40*x2 <= 10000, name="Blue_Fabric_Constraint")
model.addConstr(30*x1 + 40*x2 <= 12000, name="Red_Fabric_Constraint")

# Solve the model
model.optimize()

# Print the solution
if model.status == gp.GRB.OPTIMAL:
    print(f"Optimal solution found: Package 1 = {x1.varValue}, Package 2 = {x2.varValue}")
    print(f"Maximum profit: ${model.objVal:.2f}")
else:
    print("No optimal solution found")
```