def _convert_to_varsPOS(maxterm, variables):
 temp = []
 for (i, m) in enumerate(maxterm):
  if (m == 1):
   temp.append(Not(variables[i]))
  elif (m == 0):
   temp.append(variables[i])
  else:
   pass
 return Or(*temp)

def _convert_to_varsPOS ( maxterm , variables ) : temp = [ ] for ( i , m ) in enumerate ( maxterm ) : if ( m == 1 ) : temp . append ( Not ( variables [ i ] ) ) elif ( m == 0 ) : temp . append ( variables [ i ] ) else : pass return Or ( * temp )
converts a term in the expansion of a function from binary to its variable form .