That's an ... interesting ... way to do a division, but sure: also in prime cyclic groups represented as an additive group discrete log algorithms should work.
When I try your example on a version that is reported as 10.3.beta3, I'm not getting an error, so you'll probably have to include version information and quite likely the random seed to make this error reliably reproducible. Looking at the implementation, there is a low probability that the routine produces this error even if there is a discrete log to be found: it tries 10 random walks and then just errors out. That's by design, so one solution would be to just document the implementation as a random algorithm with a non-zero probability of failure. On Tuesday 2 July 2024 at 10:15:53 UTC-7 Georgi Guninski wrote: > I think this is a bug: > > ``` > #Author Georgi Guninski > > p=90887;Kp=GF(p);g=Kp(2);X=46712;a=X*g > print(a==X*g) > Y=discrete_log_lambda(a,g,operation="+",bounds=(1,p)) > > -> 1076 raise ValueError("Pollard Lambda failed to find a log") > ValueError: Pollard Lambda failed to find a log > ``` > -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/317c5b47-f2c3-453c-ae05-b5d17bc4fc92n%40googlegroups.com.