# HG changeset patch
# User Martin Albrecht <martinralbrecht@googlemail.com>
# Date 1281444370 3600
# Node ID a46f9f3374608411e8b4fb5940444833d06b1173
# Parent 848eec53713fb713902dc549ae5cd9575578c5d5
#9717 fixing parent ring in substitute_variable() (fix due to Alexander Dreyer)
diff r 848eec53713f r a46f9f337460 sage/rings/polynomial/pbori.pyx
a

b


7085  7085  ``var(i)`` is replaced by ``vec[i]`` in ``poly``. 
7086  7086  
7087  7087  EXAMPLE:: 
 7088  
7088  7089  sage: B.<a,b,c> = BooleanPolynomialRing() 
7089  7090  sage: f = a*b + c + 1 
7090  7091  sage: from polybori import substitute_variables 
… 
… 

7096  7097  a*b + a + b + c 
7097  7098  sage: substitute_variables([a+1,b+1,B(0)],f) 
7098  7099  a*b + a + b 
 7100  
 7101  Substitution is also allowed with different rings:: 
 7102  
 7103  sage: B.<a,b,c> = BooleanPolynomialRing() 
 7104  sage: f = a*b + c + 1 
 7105  sage: B.<w,x,y,z> = BooleanPolynomialRing(order='deglex') 
 7106  
 7107  sage: from polybori import substitute_variables 
 7108  sage: substitute_variables([x,y,z], f) * w 
 7109  w*x*y + w*z + w 
 7110  
7099  7111  """ 
7100  7112  cdef BooleanPolynomialVector _vec 
7101  7113  
… 
… 

7105  7117  _vec = BooleanPolynomialVector() 
7106  7118  for f in vec: 
7107  7119  _vec.append(f) 
7108   return new_BP_from_PBPoly((<BooleanPolynomialRing>poly._parent), pb_substitute_variables(_vec._vec, poly._pbpoly)) 
 7120  return new_BP_from_PBPoly((<BooleanPolynomialRing>_vec._parent), pb_substitute_variables(_vec._vec, poly._pbpoly)) 
7109  7121  
7110  7122  
7111  7123  def set_random_seed(seed): 