If we manage to add VoleCon.IsEven, then it would be nice to also have VoleCon.IsOdd.
Thoughts welcome. My thoughts below:
Currently, for any individual case, we can achieve this result by doing VoleCon.InGroup(AlternatingGroup(n)) for an appropriate n.
However, in general, we might not necessarily know what the right n should be, at the point that we instantiate the constraint. In particular, this approach does not give us a "universal" constraint for evenness. This means that we can't just translate IsEven once to an instance of VoleCon.InGroup(AlternatingGroup(n)) that we can use forevermore, because we would have to choose n = infinity for this to work all the time, and that is not possible.
One way around this would be to implement the "lazy" translation of constraints into refiners, as asked for in #26. If this was implemented, we could have a constraint VoleCon.IsEven that doesn't do anything, but is translated into the appropriate VoleCon.InGroup(AlternatingGroup(n)) once a bound for the search is known.
Perhaps the solution is that a 'refiner' for IsEven shouldn't actually be doing anything involving alternating groups... I'll create a separate issue for this.
If we manage to add
VoleCon.IsEven
, then it would be nice to also haveVoleCon.IsOdd
.Thoughts welcome. My thoughts below:
Currently, for any individual case, we can achieve this result by doing
VoleCon.InGroup(AlternatingGroup(n))
for an appropriaten
.However, in general, we might not necessarily know what the right
n
should be, at the point that we instantiate the constraint. In particular, this approach does not give us a "universal" constraint for evenness. This means that we can't just translateIsEven
once to an instance ofVoleCon.InGroup(AlternatingGroup(n))
that we can use forevermore, because we would have to choosen = infinity
for this to work all the time, and that is not possible.One way around this would be to implement the "lazy" translation of constraints into refiners, as asked for in #26. If this was implemented, we could have a constraint
VoleCon.IsEven
that doesn't do anything, but is translated into the appropriateVoleCon.InGroup(AlternatingGroup(n))
once a bound for the search is known.Perhaps the solution is that a 'refiner' for
IsEven
shouldn't actually be doing anything involving alternating groups... I'll create a separate issue for this.