(Edit: There were some quotes that I think may have messed up the code, which I fixed.)

For your particular problem, the left and right sides should probably checked separately for each number, then whether they each evaluate to the correct solution.

```
left=parseEquation(inputName.latex).lhs
right=parseEquation(inputName.latex).rhs
checkNumbers = countNumberUsage(left,3)=1 and countNumberUsage(left,2)=1
and countNumberUsage(right,5)=1
checkSolution = simpleFunction(left).evaluateAt(1.5) = simpleFunction(right).evaluateAt(1.5)
correct = checkNumbers and checkSolution
```

parseEquation takes an equation and splits it into left and right expressions. You can access them using “lhs” and “rhs”. You can also use differenceFunction which will create a function of lhs-rhs.

You could combine checkNumbers and checkSolution into correct instead of separately, just thought it would be easier to understand this way.

You can use “this” instead of “inputName” if you’re in the input component.