Tangle sums and factorization of A-polynomials