(f, p, e=1)
return sorted(X)
Solutions of f(x) congruent 0 mod(p**e).

    Examples
    ========

    >>> from sympy.polys.galoistools import csolve_prime

    >>> csolve_prime([1, 1, 7], 3, 1)
    [1]
    >>> csolve_prime([1, 1, 7], 3, 2)
    [1, 4, 7]

    Solutions [7, 4, 1] (mod 3**2) are generated by ``_raise_mod_power()``
    from solution [1] (mod 3).
Solutions of f(x) congruent 0 mod(p**e).
Solutions of f ( x ) congruent 0 mod ( p ** e ) .
def csolve_prime(f, p, e=1):
    """
    Solutions of f(x) congruent 0 mod(p**e).

    Examples
    ========

    >>> from sympy.polys.galoistools import csolve_prime

    >>> csolve_prime([1, 1, 7], 3, 1)
    [1]
    >>> csolve_prime([1, 1, 7], 3, 2)
    [1, 4, 7]

    Solutions [7, 4, 1] (mod 3**2) are generated by ``_raise_mod_power()``
    from solution [1] (mod 3).
    """
    from sympy.polys.domains import ZZ
    X1 = [i for i in range(p) if gf_eval(f, i, p, ZZ) == 0]
    if e == 1:
        return X1
    X = []
    S = list(zip(X1, [1]*len(X1)))
    while S:
        x, s = S.pop()
        if s == e:
            X.append(x)
        else:
            s1 = s + 1
            ps = p**s
            S.extend([(x + v*ps, s1) for v in _raise_mod_power(x, s, p, f)])
    return sorted(X)
def csolve_prime ( f , p , e = 1 ) : from sympy . polys . domains import ZZ X1 = [ i for i in range ( p ) if gf_eval ( f , i , p , ZZ ) == 0 ] if e == 1 : return X1 X = [ ] S = list ( zip ( X1 , [ 1 ] * len ( X1 ) ) ) while S : x , s = S . pop ( ) if s == e : X . append ( x ) else : s1 = s + 1 ps = p ** s S . extend ( [ ( x + v * ps , s1 ) for v in _raise_mod_power ( x , s , p , f ) ] ) return sorted ( X )