pub fn baby_step_giant_step<M>( a: M::T, x: M::T, b: M::T, n: usize, ) -> Option<usize>where M: Monoid<T: Eq + Hash>,
$\min{0\le i < n | a x^i=b}$