jack: (Default)
[personal profile] jack
That took more fiddling than I'd hoped to get all the modulo operators in the right place, but exactly the same system works for modulo equations:
from pylogram import constrain, default_vars as vars

constrain(   vars.a + 5*vars.b == 22 , mod=17 )
constrain( 2*vars.a +   vars.b == -5 , mod=17 )

print( " >> a , b =", vars.a, ",", vars.b )

#  >> a , b = 8, 13

assert (  8 + 5*13)%17 , (22)%17
assert (2*8 +   13)%17 , (-6)%17
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org