Constraints in SymbolicRegression.jl

Hi,

I was experimenting with the constraints parameter in SymbolicRegression.jl.

So, my original equation is

y = \mathrm{sin}(2x_4) + x_1^2 \,.

I believe the size/complexity of sin here is 3.

Since \mathrm{sin}(2x)=2\mathrm{sin}(x)\mathrm{cos}(x), I can also write the equation as

y = 2\mathrm{sin}(x_4)\mathrm{cos}(x_4) + x_1^2 \,.

In this form, the size/complexity of both the sin and cos operators is 1. I tried to constrain my model so that it finds this expression:

model = SRRegressor(
    binary_operators=[+,-,*],
    unary_operators=[cos, sin],
    constraints=[cos=>1, sin=>1],
    save_to_file=false,
    # 
    turbo=true,
    bumper=true,
)

I got the following results:
image


I was wondering why this list includes the original expression with the term sin(x_4+x_4) when I constrained the size of sin to be 1?

Thanks!