(f, p, K, method=None)
return lc, factors
Factor a square-free polynomial ``f`` in ``GF(p)[x]``.

    Examples
    ========

    >>> from sympy.polys.domains import ZZ
    >>> from sympy.polys.galoistools import gf_factor_sqf

    >>> gf_factor_sqf(ZZ.map([3, 2, 4]), 5, ZZ)
    (3, [[1, 1], [1, 3]])
Factor a square-free polynomial ``f`` in ``GF(p)[x]``.
Factor a square - free polynomial f in GF ( p ) [ x ] .
def gf_factor_sqf(f, p, K, method=None):
    """
    Factor a square-free polynomial ``f`` in ``GF(p)[x]``.

    Examples
    ========

    >>> from sympy.polys.domains import ZZ
    >>> from sympy.polys.galoistools import gf_factor_sqf

    >>> gf_factor_sqf(ZZ.map([3, 2, 4]), 5, ZZ)
    (3, [[1, 1], [1, 3]])

    """
    lc, f = gf_monic(f, p, K)

    if gf_degree(f) < 1:
        return lc, []

    method = method or query('GF_FACTOR_METHOD')

    if method is not None:
        factors = _factor_methods[method](f, p, K)
    else:
        factors = gf_zassenhaus(f, p, K)

    return lc, factors
def gf_factor_sqf ( f , p , K , method = None ) : lc , f = gf_monic ( f , p , K ) if gf_degree ( f ) < 1 : return lc , [ ] method = method or query ( 'GF_FACTOR_METHOD' ) if method is not None : factors = _factor_methods [ method ] ( f , p , K ) else : factors = gf_zassenhaus ( f , p , K ) return lc , factors