triska / clpz

Constraint Logic Programming over Integers

Home Page:https://www.metalevel.at/prolog/clpz

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Verify propagation

triska opened this issue · comments

Verify the following propagation:

?- M #= 10^150, [B,E,P]ins 0..M, P #= B^E, B #>= 2, P #< E.
M = 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000,
clpz:(B^E#=P),
clpz:(P#=<E+ -1),
clpz:(P in 512..999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999),
clpz:(E in 513..1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000),
clpz:(B in 2..1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) ? 
yes

Is this correct? Can it be made stronger?

With the latest update, this fails, which is correct.