def samerule (rulea, ruleb) :
	"""check is rule a & b are the same
	
	Parameters
	a, b : rules to compare
	
	Returns
	True or False
	"""
	if len(rulea) == len(ruleb) :
		for opa, opb in zip (rulea, ruleb) :
			if not (opa.type == opb.type and opa.val == opb.val) : 
				return False
		return True
	else :
		return False