예제 #1
0
def construct_maximals(g,Q):
	f = lambda x: [[y for j, y in enumerate(x) if (i >> j) & 1] for i in range(2**len(x))]
	def compatible(s,t):
		return ((s[1] < t[0]) or (t[1] < s[0]))
	def compatible_set(M):
		for i in range(len(M)):
			for j in range(i):
				if not compatible(M[i],M[j]):
					return False
		return True
	
	ups = sorted(g.up_reflections(Q))
	simple_ups = []
	nonsimple_ups = []
	for t in ups:
		if (t[0] > 0 and t[1]-t[0] > 1) or (t[1]-t[0] > 3):
			nonsimple_ups.append(t)
		else:
			simple_ups.append(t)
	
	compatible_sets = [M for M in f(nonsimple_ups) if compatible_set(M)]
	maximal_sets = []
	for M in compatible_sets:
		maximal = True
		for N in compatible_sets:
			if N != M:
				if set(M) < set(N):
					maximal = False
		if maximal:
			maximal_sets.append(M)
					
	use_again=[]
	for s in simple_ups:
		if s[0] > 0:
			for t in simple_ups:
				if s[1] == t[0]:
					use_again.append(s)
	if (-1,2) in simple_ups and (2,3) in simple_ups:
		use_again.append((-1,2))
					
	#print maximal_sets
	#print simple_ups
	#print nonsimple_ups
	#print use_again
	maximal_elements = []
	for M in maximal_sets:
		u = g.index2perm(Q)
		for s in M:
			u = pf.perm_mult(g.trans2perm(s),u)
		for s in simple_ups:
			u = pf.perm_mult(g.trans2perm(s),u)
		for s in use_again:
			u = pf.perm_mult(g.trans2perm(s),u)
		maximal_elements.append(g.perm2index(u))
	return sorted(maximal_elements)
예제 #2
0
def where_do_incompatible_reflections_take_us(g):
	g.perm_list = [g.index2perm(P) for P in g.schubert_list]
	def compatible(s,t):
		return ((s[1] < t[0]) or (t[1] < s[0]))
	for P in g.schubert_list:
		ups = sorted(g.up_reflections(P))
		simple_ups = []
		nonsimple_ups = []
		for t in ups:
			if t[0] > 0 and t[1]-t[0] > 1:
				nonsimple_ups.append(t)
			else:
				simple_ups.append(t)
		for M in get_tuples(nonsimple_ups,nonsimple_ups):
			if M[0] != M[1] and not compatible(M[0],M[1]):
				u = pf.perm_mult(pf.perm_mult(g.trans2perm(M[0]), g.trans2perm(M[1])),g.index2perm(P))
				if u in g.perm_list:
					print str(M[0]) + ' * ' + str(M[1]) + ' * ' + str(P) + ' = ' + str(u) + ', a valid permutation.'
				else:
					print str(M[0]) + ' * ' + str(M[1]) + ' * ' + str(P) + ' = ' + str(u) + ', NOT a valid permutation.'
예제 #3
0
def bruhat_operator(g, alpha, perm_vector):
	sign = 1
	if sum(alpha) < 0:
		alpha = (-1)*alpha
		sign = -1
		
	perm_alpha = root2perm(alpha)
	new_vector = np.array([0 for i in perm_vector])
	for i in (np.nonzero(perm_vector))[0]:
		possible = pf.perm_mult(g.perm_list[i], perm_alpha)
		if pf.perm_length(possible) == pf.perm_length(g.perm_list[i]) + 1:
			new_vector[g.perm_list.index(possible)] += sign*perm_vector[i]
	return new_vector
예제 #4
0
def bad_reflections(g,T):
	perm = g.index2perm(T)
	refs = g.simple_reflections() 
	for s in refs:
		a = []
		for P in g.schubert_list:
			if pf.perm_leq(g.type,pf.perm_mult(perm,s),g.index2perm(P)):
				a.append(P)
		m = []
		for P in a:
			minimal = True
			for Q in a:
				if g.leq(Q,P) and Q != P:
					minimal = False
			if minimal:
				m.append(g.index2perm(P))
		print 'minimal signed permutations violating reflection ' + str(s) + ':'
		print m
예제 #5
0
def simple_neighbors(g,sigma):
 	print str(sigma) + ' has length ' + str(pf.perm_length(g.type,sigma))
 	for u in simple_reflections():
 		v = pf.perm_mult(u,sigma)
 		print 'left multiplication by ' + str(u) + ' yields ' + str(v) + ' which has length ' + str(pf.perm_length(g.type,v))