Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
143 views
unlisted
ubuntu2004
def rectangle(a,b): return Poset(([(i+1,j+1) for i in range(a) for j in range(b)],lambda x, y: x[0] <= y[0] and x[1] <= y[1])) def shifted_staircase(n): return Poset(([(i+1,j+1) for i in range(n) for j in range(n) if i <= j ],lambda x, y: x[0] <= y[0] and x[1] <= y[1])) def double_tailed_diamond(n): x={i:[i+1] for i in range(1,n-1)} y={n-1:[n,n+1],n:[n+2]} z={i:[i+1] for i in range(n+1,2*n)} z.update(y) z.update(x) return Poset(z) def e6_minuscule_poset(): return Poset(([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16], [[1,2],[2,3],[3,4],[4,5],[3,6],[4,7],[5,8],[6,7],[7,8],[7,9],[8,10],[9,10],[10,11],[9,12],[10,13],[11,14],[12,13],[13,14],[14,15],[15,16]]), cover_relations = True) def e7_minuscule_poset(): return Poset(([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27], [[1,2],[2,3],[3,4],[4,5],[5,6],[4,7],[5,8],[6,9],[7,8],[8,9],[8,10],[9,11],[10,11],[11,12],[10,13],[11,14],[12,15],[13,14],[14,15],[15,16],[16,17],[13,18],[14,19],[15,20],[16,21],[17,22],[18,19],[19,20],[20,21],[21,22],[21,23],[22,24],[23,24],[24,25],[25,26],[26,27]]), cover_relations = True) def type_a_root_poset(n): return Poset(([(i+1,j+1) for i in range(n) for j in range(n) if i + j >= n-1],lambda x, y: x[0] <= y[0] and x[1] <= y[1])) def type_b_root_poset(n): return Poset(([(i+1,j+1) for i in range(2*n-1) for j in range(2*n-1) if i + j >= 2*n-2 and i <= j],lambda x, y: x[0] <= y[0] and x[1] <= y[1])) def h3_root_poset(): return Poset({1:[4],2:[4,5],3:[5],4:[6,7],5:[7],6:[8,9],7:[9],8:[10],9:[10,11],10:[12],11:[12],12:[13],13:[14],14:[15]}) def i2_root_poset(m): x={i:[i+1] for i in range(m)} y={m+1:[1]} y.update(x) return Poset(y) def trapezoid(a,b): return Poset(([(i+1,j+1) for i in range(a) for j in range(a+b) if i + j >= a-1 and j <= b+i-1],lambda x, y: x[0] <= y[0] and x[1] <= y[1])) def chain_of_vs(n): return Poset({1:[2,3]}).product(posets.ChainPoset(n)) def diagram_poset(par): return Partition(par).cell_poset() def shifted_diagram_poset(par): els = [] for i in range(len(par)): for j in range(par[i]): els += [(i,i+j)] return Poset([els, lambda x,y: x[0] <= y[0] and x[1] <= y[1]])
def q_signed_tog_vecs(P,q): L = list(P.order_ideals_lattice()) vecs = [] for p in P: vec = [0 for i in range(len(L))] for i in range(len(L)): I = L[i] if P.order_ideal_toggle(I,p) != I and P.order_ideal_toggle(I,p).issuperset(I): vec[i] = 1 if P.order_ideal_toggle(I,p) != I and P.order_ideal_toggle(I,p).issubset(I): vec[i] = -q vecs += [vec] return vecs def signed_tog_vecs(P): return q_signed_tog_vecs(P,1) def constant_vec(P): return [1 for I in P.order_ideals_lattice()] def antichain_cardinality_vec(P): L = list(P.order_ideals_lattice()) vec = [0 for i in range(len(L))] for p in P: for i in range(len(L)): I = L[i] if P.order_ideal_toggle(I,p) != I and P.order_ideal_toggle(I,p).issubset(I): vec[i] += 1 return vec def order_ideal_cardinality_vec(P): L = list(P.order_ideals_lattice()) vec = [L[i].cardinality() for i in range(len(L))] return vec def rank_alternating_order_ideal_cardinality_vec(P): L = list(P.order_ideals_lattice()) vec = [0 for i in range(len(L))] for p in P: for i in range(len(L)): I = L[i] if p in I: vec[i] += (-1)^(P.rank(p)) return vec def check_vec_in_tog_space(P,vec,verbose=false): vecs = signed_tog_vecs(P) vecs += [constant_vec(P)] M = Matrix(vecs, base_ring=QQ).transpose() if verbose: M.plot().show() print("") v = vector(vec) if verbose: print(v) print("") if verbose: if v in M.column_space(): print(M.solve_right(v)) return v in M.column_space() def check_ac_in_tog_space(P,verbose=false): return check_vec_in_tog_space(P,antichain_cardinality_vec(P),verbose) def check_oic_in_tog_space(P,verbose=false): return check_vec_in_tog_space(P,order_ideal_cardinality_vec(P),verbose) def check_raoic_in_tog_space(P,verbose=false): return check_vec_in_tog_space(P,rank_alternating_order_ideal_cardinality_vec(P),verbose) def check_vec_in_q_tog_space(P,vec,verbose=false): R.<q> = PolynomialRing(QQ) vecs = q_signed_tog_vecs(P,q) vecs += [constant_vec(P)] M = Matrix(vecs, base_ring=Frac(R)).transpose() v = vector(vec) if verbose: print(v) print("") if verbose: if v in M.column_space(): print(M.solve_right(v)) return v in M.column_space() def check_ac_in_q_tog_space(P,verbose=false): return check_vec_in_q_tog_space(P,antichain_cardinality_vec(P),verbose)
def antichain_vecs(P): L = list(P.order_ideals_lattice()) vecs = [] for p in P: vec = [0 for i in range(len(L))] for i in range(len(L)): I = L[i] if P.order_ideal_toggle(I,p) != I and P.order_ideal_toggle(I,p).issubset(I): vec[i] = 1 vecs += [vec] return vecs def order_ideal_vecs(P): L = list(P.order_ideals_lattice()) vecs = [] for p in P: vec = [0 for i in range(len(L))] for i in range(len(L)): I = L[i] if p in I: vec[i] = 1 vecs += [vec] return vecs def antichain_space(P): vecs = signed_tog_vecs(P) vecs += [constant_vec(P)] M = Matrix(vecs, base_ring=QQ).transpose() vecs = antichain_vecs(P) N = Matrix(vecs, base_ring=QQ).transpose() return M.column_space().intersection(N.column_space()) def order_ideal_space(P): vecs = signed_tog_vecs(P) vecs += [constant_vec(P)] M = Matrix(vecs, base_ring=Frac(QQ)).transpose() vecs = order_ideal_vecs(P) N = Matrix(vecs, base_ring=Frac(QQ)).transpose() return M.column_space().intersection(N.column_space()) def q_antichain_space(P,q): vecs = q_signed_tog_vecs(P,q) vecs += [constant_vec(P)] M = Matrix(vecs, base_ring=Frac(parent(q))).transpose() vecs = antichain_vecs(P) N = Matrix(vecs, base_ring=Frac(parent(q))).transpose() return M.column_space().intersection(N.column_space()) def q_order_ideal_space(P,q): vecs = q_signed_tog_vecs(P,q) vecs += [constant_vec(P)] M = Matrix(vecs, base_ring=Frac(parent(q))).transpose() vecs = order_ideal_vecs(P) N = Matrix(vecs, base_ring=Frac(parent(q))).transpose() return M.column_space().intersection(N.column_space()) def approx_q_antichain_space(P): V = antichain_space(P) for i in range(10): V = V.intersection(q_antichain_space(P,Integer(randint(1,100)))) #this approximates generic q by taking the intersection over q being several random integers return V def approx_q_order_ideal_space(P): V = order_ideal_space(P) for i in range(10): V = V.intersection(q_order_ideal_space(P,Integer(randint(1,100)))) #this approximates generic q by taking the intersection over q being several random integers return V
# "good" examples
P = rectangle(2,2) P.show() check_ac_in_tog_space(P,verbose=true)
(0, 1, 1, 1, 2, 1) (-1, -1/2, -1/2, 0, 1) True
P = rectangle(2,2) P.show() check_ac_in_q_tog_space(P,verbose=true)
(0, 1, 1, 1, 2, 1) ((-q - 1)/(q^2 + 1), -q/(q^2 + 1), -q/(q^2 + 1), (-q + 1)/(q^2 + 1), (q + 1)/(q^2 + 1)) True
P = double_tailed_diamond(4) P.show() check_ac_in_q_tog_space(P,verbose=true)
(0, 1, 1, 1, 1, 1, 2, 1, 1, 1) ((-q^3 - 1)/(q^4 + 1), (-q^3 - q)/(q^4 + 1), (-q^3 - q^2)/(q^4 + 1), -q^3/(q^4 + 1), -q^3/(q^4 + 1), (-q^3 + 1)/(q^4 + 1), (-q^3 + q)/(q^4 + 1), (-q^3 + q^2)/(q^4 + 1), (q^3 + 1)/(q^4 + 1)) True
P = rectangle(3,4) P.show() check_ac_in_tog_space(P) check_oic_in_tog_space(P) check_raoic_in_tog_space(P) check_ac_in_q_tog_space(P) print("") antichain_space(P) order_ideal_space(P) approx_q_antichain_space(P) approx_q_order_ideal_space(P)
True True True True Vector space of degree 35 and dimension 6 over Rational Field Basis matrix: [ 0 1 0 0 0 0 0 0 0 -1 0 -1 0 0 -1 -1 -1 -1 -1 -1 0 -1 -1 -1 -1 -2 -1 -1 -2 -1 -1 -1 -2 -2 -1] [ 0 0 1 0 0 1 0 0 0 1 1 1 0 0 1 1 0 1 0 0 0 1 1 1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1 0 1 1 0 1 1 1 1 1 1 0 1 0 0 1 1 0 0 1 0 1 1 1 1 0] [ 0 0 0 0 1 0 0 1 0 0 0 1 0 1 0 1 1 0 1 1 0 0 0 1 1 1 0 1 1 1 0 0 0 1 0] [ 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 0 1 1 0 0 1 0 1 0 1 1 1 1 1 1 1] [ 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1] Vector space of degree 35 and dimension 2 over Rational Field Basis matrix: [0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 0 1 1 0 0 1 0 1 0 1 1 1 1 1 1 1] [0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 1]
P = shifted_staircase(4) P.show() check_ac_in_tog_space(P) check_oic_in_tog_space(P) check_raoic_in_tog_space(P) check_ac_in_q_tog_space(P) print("") antichain_space(P) order_ideal_space(P) approx_q_antichain_space(P) approx_q_order_ideal_space(P)
True True True True Vector space of degree 16 and dimension 7 over Rational Field Basis matrix: [ 0 1 0 0 0 0 0 0 0 0 -1 -1 0 -1 0 -2] [ 0 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 0 -2] [ 0 0 0 1 0 0 1 0 0 0 2 2 -1 1 0 2] [ 0 0 0 0 1 0 1 1 0 0 2 2 0 2 0 3] [ 0 0 0 0 0 1 0 1 0 1 0 1 1 1 0 2] [ 0 0 0 0 0 0 0 0 1 1 -1 -1 1 0 0 -1] [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -1] Vector space of degree 16 and dimension 7 over Rational Field Basis matrix: [ 0 1 0 0 0 0 0 0 0 0 -1 -1 0 -1 0 -2] [ 0 0 1 0 0 0 -1 -1 0 0 0 0 -1 -1 0 -1] [ 0 0 0 1 0 0 1 0 0 -1 2 1 0 2 0 2] [ 0 0 0 0 1 0 1 1 0 0 2 2 0 2 0 3] [ 0 0 0 0 0 1 0 1 0 1 0 1 1 1 0 2] [ 0 0 0 0 0 0 0 0 1 1 -1 -1 1 -1 0 0] [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -1] Vector space of degree 16 and dimension 5 over Rational Field Basis matrix: [ 0 1 0 0 0 0 0 0 -1 -1 0 0 -1 -1 -1 0] [ 0 0 1 0 0 0 0 0 0 0 -1 -1 0 -1 -1 -1] [ 0 0 0 1 0 0 1 0 1 1 1 1 0 1 1 0] [ 0 0 0 0 1 0 1 1 1 1 1 1 1 2 1 1] [ 0 0 0 0 0 1 0 1 0 1 0 1 1 1 1 1] Vector space of degree 16 and dimension 2 over Rational Field Basis matrix: [0 1 0 0 1 0 1 1 0 0 1 1 0 1 0 1] [0 0 0 0 0 1 0 1 0 1 0 1 1 1 1 1]
P = double_tailed_diamond(5) P.show() check_ac_in_tog_space(P) check_oic_in_tog_space(P) check_raoic_in_tog_space(P) check_ac_in_q_tog_space(P) print("") antichain_space(P) order_ideal_space(P) approx_q_antichain_space(P) approx_q_order_ideal_space(P)
True True True True Vector space of degree 12 and dimension 9 over Rational Field Basis matrix: [ 0 1 0 0 0 0 0 0 0 0 0 -1] [ 0 0 1 0 0 0 0 0 0 0 0 -1] [ 0 0 0 1 0 0 0 0 0 0 0 -1] [ 0 0 0 0 1 0 0 0 0 0 0 -1] [ 0 0 0 0 0 1 0 1 0 0 0 4] [ 0 0 0 0 0 0 1 1 0 0 0 4] [ 0 0 0 0 0 0 0 0 1 0 0 -1] [ 0 0 0 0 0 0 0 0 0 1 0 -1] [ 0 0 0 0 0 0 0 0 0 0 1 -1] Vector space of degree 12 and dimension 9 over Rational Field Basis matrix: [ 0 1 0 0 0 0 0 0 0 0 0 -1] [ 0 0 1 0 0 0 0 0 0 0 0 -1] [ 0 0 0 1 0 0 0 0 0 0 0 -1] [ 0 0 0 0 1 0 0 -1 0 0 0 0] [ 0 0 0 0 0 1 0 1 0 0 0 4] [ 0 0 0 0 0 0 1 1 0 0 0 4] [ 0 0 0 0 0 0 0 0 1 0 0 -1] [ 0 0 0 0 0 0 0 0 0 1 0 -1] [ 0 0 0 0 0 0 0 0 0 0 1 -1] Vector space of degree 12 and dimension 6 over Rational Field Basis matrix: [ 0 1 0 0 0 0 0 0 -1 0 0 0] [ 0 0 1 0 0 0 0 0 0 -1 0 0] [ 0 0 0 1 0 0 0 0 0 0 -1 0] [ 0 0 0 0 1 0 0 0 0 0 0 -1] [ 0 0 0 0 0 1 0 1 1 1 1 1] [ 0 0 0 0 0 0 1 1 1 1 1 1] Vector space of degree 12 and dimension 5 over Rational Field Basis matrix: [ 0 1 0 0 0 0 0 0 -1 0 0 0] [ 0 0 1 0 0 0 0 0 0 -1 0 0] [ 0 0 0 1 0 0 0 0 0 0 -1 0] [ 0 0 0 0 0 1 0 1 1 1 1 1] [ 0 0 0 0 0 0 1 1 1 1 1 1]
P = e6_minuscule_poset() P.show() check_ac_in_tog_space(P) check_oic_in_tog_space(P) check_raoic_in_tog_space(P) check_ac_in_q_tog_space(P) print("") antichain_space(P) order_ideal_space(P) approx_q_antichain_space(P) approx_q_order_ideal_space(P)
True True True True Vector space of degree 27 and dimension 11 over Rational Field Basis matrix: [ 0 1 0 0 0 0 0 0 0 0 0 0 -1 0 -1 0 0 -1 0 -1 0 -1 -1 -1 0 0 -3] [ 0 0 1 0 0 0 0 0 0 0 0 0 -1 0 -1 0 0 -1 0 -1 0 -1 -1 -1 0 0 -3] [ 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 -1 0 0 -1 0 -1 0 -1 -1 -1 0 0 -3] [ 0 0 0 0 1 0 1 0 0 0 0 0 3 0 3 -1 -1 2 0 3 -2 1 3 1 0 0 4] [ 0 0 0 0 0 1 1 0 1 0 0 0 3 0 3 0 0 3 0 3 -1 2 3 2 0 0 6] [ 0 0 0 0 0 0 0 1 1 0 1 0 0 1 1 1 1 1 0 0 2 2 0 2 0 0 4] [ 0 0 0 0 0 0 0 0 0 1 1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0 0 -1 -1 0 0 0 0 -1 -1 -1 -1 -1 0 0 -1 -1 -1 0 0] [ 0 0 1 0 0 0 0 0 0 0 0 -1 0 -1 0 0 -1 0 -1 -1 -1 -1 0 -1 -1 -1 0] [ 0 0 0 1 0 0 0 0 0 0 0 0 -1 0 -1 0 0 -1 0 -1 0 -1 -1 -1 -1 -1 -1] [ 0 0 0 0 1 0 1 0 0 1 1 1 1 1 1 0 1 1 1 2 0 1 1 1 1 1 0] [ 0 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 2 2 1 2 1 2 1 2 2 1 1] [ 0 0 0 0 0 0 0 1 1 0 1 0 0 1 1 1 1 1 1 1 1 1 1 2 1 1 1] Vector space of degree 27 and dimension 1 over Rational Field Basis matrix: [0 1 1 0 0 1 1 1 2 0 1 0 1 1 2 1 1 2 0 1 1 2 1 2 1 1 2]
P = e7_minuscule_poset() P.show() check_ac_in_tog_space(P) check_oic_in_tog_space(P) check_raoic_in_tog_space(P) check_ac_in_q_tog_space(P) print("") antichain_space(P) order_ideal_space(P) approx_q_antichain_space(P) approx_q_order_ideal_space(P)
True True True True Vector space of degree 56 and dimension 17 over Rational Field Basis matrix: 17 x 56 dense matrix over Rational Field Vector space of degree 56 and dimension 17 over Rational Field Basis matrix: 17 x 56 dense matrix over Rational Field Vector space of degree 56 and dimension 7 over Rational Field Basis matrix: 7 x 56 dense matrix over Rational Field Vector space of degree 56 and dimension 1 over Rational Field Basis matrix: 1 x 56 dense matrix over Rational Field
P = type_a_root_poset(5) P.show() check_ac_in_tog_space(P) check_oic_in_tog_space(P) check_raoic_in_tog_space(P) check_ac_in_q_tog_space(P) print("") antichain_space(P) order_ideal_space(P) approx_q_antichain_space(P) approx_q_order_ideal_space(P)
True False True False Vector space of degree 132 and dimension 5 over Rational Field Basis matrix: 5 x 132 dense matrix over Rational Field Vector space of degree 132 and dimension 5 over Rational Field Basis matrix: 5 x 132 dense matrix over Rational Field Vector space of degree 132 and dimension 1 over Rational Field Basis matrix: 1 x 132 dense matrix over Rational Field Vector space of degree 132 and dimension 0 over Rational Field Basis matrix: 0 x 132 dense matrix over Rational Field
P = type_b_root_poset(3) P.show() check_ac_in_tog_space(P) check_oic_in_tog_space(P) check_raoic_in_tog_space(P) check_ac_in_q_tog_space(P) print("") antichain_space(P) order_ideal_space(P) approx_q_antichain_space(P) approx_q_order_ideal_space(P)
True False False False Vector space of degree 20 and dimension 5 over Rational Field Basis matrix: [ 0 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1] [ 0 0 1 0 1 0 1 0 1 1 0 1 1/2 1/2 1/2 3/2 -1/2 1/2 0 1] [ 0 0 0 1 0 1 1 0 1 0 1 1 1/2 1/2 1/2 1/2 1/2 1/2 0 1] [ 0 0 0 0 0 0 0 1 0 -1 1 -1 0 0 1 -1 1 0 0 -1] [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -1] Vector space of degree 20 and dimension 5 over Rational Field Basis matrix: [ 0 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1] [ 0 0 1 0 1 0 1 0 1 1 0 1 1/2 1/2 -1/2 1/2 1/2 3/2 0 1] [ 0 0 0 1 0 1 1 0 1 0 1 1 1/2 1/2 1/2 1/2 1/2 1/2 0 1] [ 0 0 0 0 0 0 0 1 0 -1 1 -1 0 0 1 -1 1 -1 0 0] [ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 -1] Vector space of degree 20 and dimension 2 over Rational Field Basis matrix: [ 0 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1] [ 0 0 1 -1 1 -1 0 0 0 1 -1 0 0 0 0 1 -1 0 0 0] Vector space of degree 20 and dimension 1 over Rational Field Basis matrix: [0 1 0 0 1 1 0 0 1 1 0 1 0 1 0 1 0 1 0 1]
P = i2_root_poset(5) P.show() check_ac_in_tog_space(P) check_oic_in_tog_space(P) check_raoic_in_tog_space(P) check_ac_in_q_tog_space(P) print("") antichain_space(P) order_ideal_space(P) approx_q_antichain_space(P) approx_q_order_ideal_space(P)
True False False False Vector space of degree 9 and dimension 6 over Rational Field Basis matrix: [ 0 1 0 1 0 0 0 0 5/2] [ 0 0 1 1 0 0 0 0 5/2] [ 0 0 0 0 1 0 0 0 -1] [ 0 0 0 0 0 1 0 0 -1] [ 0 0 0 0 0 0 1 0 -1] [ 0 0 0 0 0 0 0 1 -1] Vector space of degree 9 and dimension 6 over Rational Field Basis matrix: [ 0 1 0 1 0 0 0 0 5/2] [ 0 0 1 1 0 0 0 0 5/2] [ 0 0 0 0 1 0 0 0 -1] [ 0 0 0 0 0 1 0 0 -1] [ 0 0 0 0 0 0 1 0 -1] [ 0 0 0 0 0 0 0 1 -1] Vector space of degree 9 and dimension 1 over Rational Field Basis matrix: [ 0 1 -1 0 0 0 0 0 0] Vector space of degree 9 and dimension 1 over Rational Field Basis matrix: [ 0 1 -1 0 0 0 0 0 0]
P = h3_root_poset() P.show() check_ac_in_tog_space(P) check_oic_in_tog_space(P) check_raoic_in_tog_space(P) check_ac_in_q_tog_space(P) print("") antichain_space(P) order_ideal_space(P) approx_q_antichain_space(P) approx_q_order_ideal_space(P)
True False False False Vector space of degree 32 and dimension 9 over Rational Field Basis matrix: [ 0 1 0 0 0 1 1 0 1 1 0 0 0 3/2 0 3/2 0 0 3/2 0 0 3/2 0 3/2 -1 1/2 3/2 1/2 0 0 0 2] [ 0 0 1 0 1 0 1 1/2 1 1/2 0 0 0 3/2 0 3/2 1/2 1/2 2 -1/2 -1/2 1 0 3/2 -1 1/2 3/2 1/2 0 0 0 2] [ 0 0 0 1 1 1 0 1/2 1 1/2 0 0 1 0 1 1 1/2 1/2 1/2 1/2 1/2 1/2 0 0 1 1 0 1 0 0 0 2] [ 0 0 0 0 0 0 0 0 0 0 1 0 1 -1 0 -1 1 0 -1 1 1 0 0 -1 1 0 -1 0 0 0 0 -1] [ 0 0 0 0 0 0 0 0 0 0 0 1 0 -1 1 -1 0 1 -1 0 1 -1 0 -1 2 1 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matrix: [ 0 1 -1 1 0 2 0 0 1 1 0 0 1 0 1 1 0 0 0 1 1 1 0 0 1 1 0 1 0 1 0 1] Vector space of degree 32 and dimension 0 over Rational Field Basis matrix: []
## "bad" examples
P = RootSystem(['D',4]).root_poset(facade=true) P.show() check_ac_in_tog_space(P) L = list(P.order_ideals_lattice()) [sum(antichain_cardinality_vec(P)[L.index(I)] for I in O)/len(O) for O in P.rowmotion_orbits()]
False [2, 2, 2, 2, 2, 2, 2, 2, 2, 2]
P = trapezoid(3,4) P.show() check_ac_in_tog_space(P) L = list(P.order_ideals_lattice()) [sum(antichain_cardinality_vec(P)[L.index(I)] for I in O)/len(O) for O in P.rowmotion_orbits()]
False [12/7, 12/7, 12/7, 12/7, 12/7]
P = trapezoid(4,2) P.show() check_ac_in_tog_space(P,verbose=true) L = list(P.order_ideals_lattice()) [sum(antichain_cardinality_vec(P)[L.index(I)] for I in O)/len(O) for O in P.rowmotion_orbits()]
(0, 1, 1, 2, 1, 1, 2, 2, 3, 2, 1, 2, 2, 1, 1, 2, 2, 2, 1, 1) (-1/2, -1/2, 0, -1/2, 0, 0, 1/2, 1, 1/2, 3/2) True [3/2, 3/2, 3/2, 3/2]
P = trapezoid(2,4) P.show() check_ac_in_tog_space(P,verbose=true) L = list(P.order_ideals_lattice()) [sum(antichain_cardinality_vec(P)[L.index(I)] for I in O)/len(O) for O in P.rowmotion_orbits()]
/ext/sage/10.6/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/scikits/__init__.py:1: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html __import__("pkg_resources").declare_namespace(__name__) /ext/sage/10.6/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/scikits/__init__.py:1: DeprecationWarning: Deprecated call to `pkg_resources.declare_namespace('scikits')`. Implementing implicit namespace packages (as specified in PEP 420) is preferred to `pkg_resources.declare_namespace`. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages __import__("pkg_resources").declare_namespace(__name__)
(0, 1, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 1) False [4/3, 4/3, 4/3]
P = trapezoid(1,3) P.show() check_ac_in_tog_space(P) L = list(P.order_ideals_lattice()) [sum(antichain_cardinality_vec(P)[L.index(I)] for I in O)/len(O) for O in P.rowmotion_orbits()]
True [3/4]
P = trapezoid(3,3) P.show() check_ac_in_tog_space(P) L = list(P.order_ideals_lattice()) [sum(antichain_cardinality_vec(P)[L.index(I)] for I in O)/len(O) for O in P.rowmotion_orbits()]
True [3/2, 3/2, 3/2, 3/2]
P = chain_of_vs(5) P.show() check_ac_in_tog_space(P) L = list(P.order_ideals_lattice()) [sum(antichain_cardinality_vec(P)[L.index(I)] for I in O)/len(O) for O in P.rowmotion_orbits()]
False [15/7, 15/7, 15/7, 15/7, 15/7, 15/7, 15/7, 15/7]
#checking for other posets with antichain cardinality in q-toggle space
for n in range(21): print("n="+str(n)) for p in Partitions(n): if check_ac_in_q_tog_space(diagram_poset(p)): print(p) print()
n=0 [] n=1 [1] n=2 [2] [1, 1] n=3 [3] [1, 1, 1] n=4 [4] [2, 2] [1, 1, 1, 1] n=5 [5] [1, 1, 1, 1, 1] n=6 [6] [3, 3] [2, 2, 2] [1, 1, 1, 1, 1, 1] n=7 [7] [1, 1, 1, 1, 1, 1, 1] n=8 [8] [4, 4] [2, 2, 2, 2] [1, 1, 1, 1, 1, 1, 1, 1] n=9 [9] [3, 3, 3] [1, 1, 1, 1, 1, 1, 1, 1, 1] n=10 [10] [5, 5] [2, 2, 2, 2, 2] [1, 1, 1, 1, 1, 1, 1, 1, 1, 1] n=11 [11] [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] n=12 [12] [6, 6] [4, 4, 4] [3, 3, 3, 3] [2, 2, 2, 2, 2, 2] [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] n=13 [13] [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] n=14 [14] [7, 7] [2, 2, 2, 2, 2, 2, 2] [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] n=15 [15] [5, 5, 5] [3, 3, 3, 3, 3] [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] n=16 [16] [8, 8] [4, 4, 4, 4] [2, 2, 2, 2, 2, 2, 2, 2] [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] n=17 [17] [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] n=18 [18] [9, 9] [6, 6, 6] [3, 3, 3, 3, 3, 3] [2, 2, 2, 2, 2, 2, 2, 2, 2] [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] n=19 [19] [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] n=20 [20] [10, 10] [5, 5, 5, 5] [4, 4, 4, 4, 4] [2, 2, 2, 2, 2, 2, 2, 2, 2, 2] [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
for n in range(22): print("n="+str(n)) for p in Partitions(n,max_slope=-1): if check_ac_in_q_tog_space(shifted_diagram_poset(p)): print(p) print()
n=0 [] n=1 [1] n=2 [2] n=3 [3] [2, 1] n=4 [4] n=5 [5] n=6 [6] [3, 2, 1] n=7 [7] n=8 [8] n=9 [9] n=10 [10] [4, 3, 2, 1] n=11 [11] n=12 [12] n=13 [13] n=14 [14] n=15 [15] [5, 4, 3, 2, 1] n=16 [16] n=17 [17] n=18 [18] n=19 [19] n=20 [20] n=21 [21] [6, 5, 4, 3, 2, 1]