The solver API for CP-SAT offers the attribute NumBooleans
, which is documented as "Returns the number of boolean variables managed by the SAT solver".
Excuse my ignorance, but why is this a property of the solution rather than the model itself? Should I think about the solver as applying some simplifying preprocessing steps to the model, and the number indicating the complexity of the model after that, or what is the right mental model here?