I'm trying to use NMaxValue inside other statements (FindRoot and NMinimize). Those statements should bind variable names, but I'm getting weird warnings which seem to indicate that the variables aren't bound inside the constraints of the NMaxValue statement? Minimal example:
NMinimize[{NMaxValue[{f[x,y],1<x<y},x],1<y},y]
NMaxValue::bcons: The following constraints are not valid: {1<x,x<y}. Constraints should be equalities, inequalities, or domain specifications involving the variables.
NMaxValue::bcons: The following constraints are not valid: {1<x,x<y}. Constraints should be equalities, inequalities, or domain specifications involving the variables.
NMaxValue::bcons: The following constraints are not valid: {1<x,x<y}. Constraints should be equalities, inequalities, or domain specifications involving the variables.
General::stop: "Further output of NMaxValue::bcons will be suppressed during this calculation."
Why are these constraints not valid? y should be in-scope because it's defined by NMinimize, right? Is this a bug?