---------------------------------------------------- ----------------- Examples ------------------------- ---------------------------------------------------- ---------------------------------------------------- -------- Using the package for examples ------------ ---------------------------------------------------- Source "BBS_subschemes.cpkg5"; ---------------------------------------------------- -- Example 3.6: ---------------------------------------------------- W:=mat([[1,1],[0,1]]); O := MakeTermOrd(W); P := NewPolyRing(QQ, "x,y", O, 1); use P; OO := [one(P),x,y,x*y]; BBS := BBRing(OO); --define the bb ring K[cij] for OO BBBorder(OO); --[x^2, y^2, x^2*y, x*y^2] GenMultMat(BBS,OO); I_BO := IdealOfBBS(BBS,OO); indent(I_BO); ---------------------------------------------------- -- Examples 4.4, 5.13: Continue the example 3.6 ---------------------------------------------------- NonLGor := NonLGorLocus(BBS,OO); indent(NonLGor); I_BOdf := IdealOfBOdf(BBS,OO); indent(I_BOdf); I_BOdf = I_BO; --true I_BOhom := IdealOfBOhom(BBS,OO); I_BOhom; ---------------------------------------------------- -- Example 6.4: ---------------------------------------------------- W:=mat([[1,1,1],[0,0,1],[0,1,0]]); O := MakeTermOrd(W); P := NewPolyRing(QQ, "x,y,z", O, 1); use P; OO := [one(P),x,y,z,x^2]; BBS:=BBRing(OO); BBBorder(OO); --[x*y, y^2, x*z, y*z, z^2, x^3, x^2*y, x^2*z] I_BO := IdealOfBBS(BBS,OO); --after applying "interreduced" I_BOdf := IdealOfBOdf(BBS,OO); Len(Gens(I_BOdf)); --52 (without "interreduced" 60 polys) NCB :=NonCBLocusInBOdf(BBS,OO); F := gens(NCB)[1]; F; [NR(G,gens(I_BOdf))| G in gens(NCB)]; ---------------------------------------------------- -- Example 7.6: (Similar for Example 7.7) ---------------------------------------------------- I_X := ideal(y^2-x^2,z^2-x^2,x*y,x*z,y*z,x^3); CheckingCBPUsingCanModule(I_X); ---------------------------------------------------- -- Example 7.12: ---------------------------------------------------- W:=mat([[1,1],[0,1]]); O := MakeTermOrd(W); P := NewPolyRing(QQ, "x,y", O, 1); use P; OO := [one(P),x,y,x^2,x*y,y^2,x^3]; BBS := BBRing(OO); BBBorder(OO); --[x^2*y, x*y^2, y^3, x^4, x^3*y] I_BOdf := IdealOfBOdf(BBS,OO); NCB :=NonCBLocusInBOdf(BBS,OO); F := gens(NCB)[1]; F; [NR(G,gens(I_BOdf))| G in gens(NCB)]; SCB := NonSCBLocusInBOdf(BBS,OO); [NR(G,gens(I_BOdf))| G in gens(SCB)]; --SCB = I_BOdf; ---------------------------------------------------- -- Example 8.4: ---------------------------------------------------- W:=mat([[1,1],[0,1]]); O := MakeTermOrd(W); P := NewPolyRing(QQ, "x,y", O, 1); use P; OO := [one(P),x,y,x*y]; BBS:=BBRing(OO); SG := NonSGorLocusInBOdf(BBS,OO); SCI := NonSCILocusInBOdf(BBS,OO); SCI; ---------------------------------------------------- -- Example 8.5: ---------------------------------------------------- W:=mat([[1,1,1],[0,0,1],[0,1,0]]); O := MakeTermOrd(W); P := NewPolyRing(QQ, "x,y,z", O, 1); use P; OO := [one(P),x,y,z,x^2,x*y,x*z,x^3]; BBS:=BBRing(OO); BBBorder(OO); --[y^2, y*z, z^2, x^2*y, x*y^2, x^2*z, x*y*z, -- x*z^2, x^4, x^3*y, x^3*z] SG := NonSGorLocusInBOdf(BBS,OO); Len(gens(SG)); Gens(SG)[1]; -- note the order of terms in the border SCI := NonSCILocusInBOdf(BBS,OO); Len(gens(SCI)); Gens(SCI)[1];-- note the order of terms in the border ---------------------------------------------------- -- Example 9.12: ---------------------------------------------------- W:=mat([[1,1],[0,1]]); O := MakeTermOrd(W); P := NewPolyRing(QQ, "x,y", O, 1); use P; OO := [one(P),x,y,x^2,x^3]; BBS:=BBRing(OO); I_DHF := IdealOfDomHFS(BBS,OO,2,4); indent(I_DHF); I_BOHbar :=IdealOfBOHbar(BBS,OO,[1,3,5]); indent(I_BOHbar); I_ZO:=IdealOfBOHcompl(BBS,OO,[1,3,5]); indent(I_ZO); IdealOfBOHcomplList(BBS,OO,[1,3,5]); IdealOfBOHbar(BBS,OO,[1,2,5]); IdealOfBOHbar(BBS,OO,[1,3,4,5]); ---------------------------------------------------- -- Example 9.13: ---------------------------------------------------- OO := [one(P),x,x^2,x^3]; BBS:=BBRing(OO); I_BOHbar :=IdealOfBOHbar(BBS,OO,[1,2,4]); I_BOHbar; I_ZO:=IdealOfBOHcompl(BBS,OO,[1,2,4]); I_ZO; IdealOfBOHcomplList(BBS,OO,[1,2,4]); IdealOfBOHbar(BBS,OO,[1,1,4]); IdealOfBOHbar(BBS,OO,[1,2,3,4]); ---------------------------------------------------- -- Example 10.4: ---------------------------------------------------- W:=mat([[1,1],[0,1]]); O := MakeTermOrd(W); P := NewPolyRing(QQ, "x,y", O, 1); use P; OO := [one(P),x,y,x^2,x^3]; OO; BBS:=BBRing(OO); H := [1,3,5]; OO1 := [one(P),x,y,x^2,x*y]; J1 := IdealOfBOdfbcompl(BBS,OO,OO1,H); -- compute only the first part (+I_BO(Hbar)) indent(J1); OO2 := [one(P),x,y,x^2,y^2]; J2 := IdealOfBOdfbcompl(BBS,OO,OO2,H); indent(J2); OO3 := [one(P),x,y,x*y,y^2]; J3 := IdealOfBOdfbcompl(BBS,OO,OO3,H); indent(J3); ---------------------------------------------------- -- Example 11.2: ---------------------------------------------------- W:=mat([[1,1],[0,1]]); O := MakeTermOrd(W); P := NewPolyRing(QQ, "x,y", O, 1); use P; OO := [one(P),x,y,x^2,x^3]; OO; BBS:=BBRing(OO); LO:=HFOrderIdeals(P,H); LO; ListNCB := CombLociHilbertStratum_NCB(BBS,OO,H); indent(ListNCB); ---------------------------------------------------- -- Example 11.3 ---------------------------------------------------- W:=mat([[1,1],[0,1]]); O := MakeTermOrd(W); P := NewPolyRing(QQ, "x,y", O, 1); use P; OO := [one(P), x, x^2, x^3]; BBS := BBRing(OO); H := [1,3,4]; LO := HFOrderIdeals(P,H); LO; ListNCB := CombLociHilbertStratum_NCB(BBS,OO,H); indent(ListNCB); I_BOHbar := IdealOfBOHbar(BBS,OO,[1,3,4]); GBI := GBasis(I_BOHbar); h := Gens(ListNCB[1][3])[1]; h; NR(h,GBI); ---------------------------------------------------- -- Example 12.2 ---------------------------------------------------- --W:=mat([[1,1,1],[0,0,1],[0,1,0]]); W:=mat([[1,1,1],[0,1,1],[0,0,1]]); O := MakeTermOrd(W); P := NewPolyRing(QQ, "x,y,z", O, 1); use P; OO := [one(P),x,y,z,x^2,x^3]; OO; BBBorder(OO); BBS := BBRing(OO); HF := [1,4,6]; LO := HFOrderIdeals(P,HF); LO; ---------------------------------------------------- -- Use this function only for Example 12.2 -- Inside we do not compute the intersection ---------------------------------------------------- Define CombLociHilbertStratum_NSCB1(BBS, OO, HF) Rold := RingOf(ideal(OO)); Mu := Len(OO); N := NumIndets(Rold); I_Zero := ideal(zero(BBS)); I_One := ideal(one(BBS)); MultMat := GenMultMat(BBS,OO); -- Step (1): Compute I(B_O(Hbar)), I(Z_O) I_BOHbar := IdealOfBOHbar(BBS,OO,HF); I_ZO := IdealOfBOHcompl(BBS,OO,HF); I_ZOred := ideal(BBS,[Y in gens(I_ZO)| NR(Y,gens(I_BOHbar))<>0]); -- Step (2): Compute all deg-filt-ord-ideals OOp LOI := HFOrderIdeals(Rold,HF); ListIJO :=[]; -- the starting list of [OOp,I_OOp,J_OOphat] foreach OOp in LOI do -- Step (4): Using the function Locus(OOp) BOp := BBBorder(OOp); Nup := Len(BOp); CR := CoeffRing(Rold); BBSp ::= CR[cp[1..Mu,1..Nup]]; NSCBList := NonSCBLocusInBOdfList(BBSp,OOp); -- SCBLocus(OOp) J_OOp := NSCBList[1]; -- the main part without I(B_OOp^df) J_OOpGens := interreduced(gens(J_OOp)); -- Step (5): Find the polynomial \delta_i in K[C] MatEp := []; for i:=1 to Len(OOp) do Logt := exponents(OOp[i]); Mono := product([MultMat[j]^(Logt[j])| j in 1..N]); append(ref MatEp, submat(Mono,1..Mu,[1])); endfor; Tmatp := BlockMat([MatEp]); -- matrix T' w.r.t OOp Delta_OOp := Det(Tmatp); -- the polynomial \delta_i -- Step (6): Compute the polynomials p_ij and the matrix B' MatBp := []; for k:=1 to Nup do Logbk := exponents(BOp[k]); Monok := product([MultMat[l]^(Logbk[l])| l in 1..N]); append(ref MatBp, submat(Monok,1..Mu,[1])); endfor; Bmatp := BlockMat([MatBp]); -- matrix B' Smat := adj(Tmatp); -- matrix S=det(T')*(T')^{-1} CMat := Smat*Bmatp; -- matrix S*B' contains p_ij in BBS -- Step (7): Form the expected ideal J_OOp in BBS -- Homogenization step in BSSpz BBSpz ::= CR[cp[1..Mu,1..Nup],z]; Cpz := First(indets(BBSpz),Mu*Nup); psi_z := PolyAlgebraHom(BBSp, BBSpz, Cpz); J_OOpGensz := homog(apply(psi_z,J_OOpGens), Last(indets(BBSpz))); -- bring back to BBS (phi_p: cp_ij->CMat[i,j],z->Delta_OOp Cpij := Concat(flatten(GetRows(CMat)),[Delta_OOp]); phi_p := PolyAlgebraHom(BBSpz, BBS, Cpij); J_OOpGensnew := apply(phi_p,J_OOpGensz); J_OOphat := ideal(BBS,interreduced(J_OOpGensnew)); -- Step (8): Compute the ideal I_OOp_dfb append(ref ListIJO,[OOp,[Delta_OOp],J_OOphat]); -- add the triple to ListIJO endforeach; return ListIJO; EndDefine; -- CombLociHilbertStratum_NSCB1 ---------------------------------------------------- -- Apply the above function: ListNSCB := CombLociHilbertStratum_NSCB1(BBS,OO,HF); J1 := ListNSCB[1][3]; -- ideal J_1 for SCBP indent(J1); GBJ1 := GBasis(J1); -- Groebner basis of J_1 Len(GBJ1); -- 39 --------------------------------------------------- -- Compute \tilde{J}_i for CBP --------------------------------------------------- Rold := RingOf(ideal(OO)); Mu := Len(OO); N := NumIndets(Rold); I_Zero := ideal(zero(BBS)); I_One := ideal(one(BBS)); MultMat := GenMultMat(BBS,OO); -- Step (1): Compute I(B_O(Hbar)), I(Z_O) I_BOHbar := IdealOfBOHbar(BBS,OO,HF); I_ZO := IdealOfBOHcompl(BBS,OO,HF); I_ZOred := ideal(BBS,[Y in gens(I_ZO)| NR(Y,gens(I_BOHbar))<>0]); -- Step (2): Compute all deg-filt-ord-ideals OOp LOI := HFOrderIdeals(Rold,HF); -- Start with the order ideal OOp OOp:=LOI[1]; -- the first order ideal in the list LOI OOp; --[1, x, y, z, x^2, x*y] -- Step (4): Using the function Locus(OOp) BOp := BBBorder(OOp); Nup := Len(BOp); CR := CoeffRing(Rold); BBSp ::= CR[cp[1..Mu,1..Nup]]; NSCBList := NonCBLocusInBOdfList(BBSp,OOp); -- CBLocus(OOp) J_OOp := NSCBList[1]; -- the main part without I(B_OOp^df) J_OOpGens := interreduced(gens(J_OOp)); -- Step (5): Find the polynomial \delta_i in K[C] MatEp := []; for i:=1 to Len(OOp) do Logt := exponents(OOp[i]); Mono := product([MultMat[j]^(Logt[j])| j in 1..N]); append(ref MatEp, submat(Mono,1..Mu,[1])); endfor; Tmatp := BlockMat([MatEp]); -- matrix T' w.r.t OOp Delta_OOp := Det(Tmatp); -- the polynomial \delta_i -- Step (6): Compute the polynomials p_ij and the matrix B' MatBp := []; for k:=1 to Nup do Logbk := exponents(BOp[k]); Monok := product([MultMat[l]^(Logbk[l])| l in 1..N]); append(ref MatBp, submat(Monok,1..Mu,[1])); endfor; Bmatp := BlockMat([MatBp]); -- matrix B' Smat := adj(Tmatp); -- matrix S=det(T')*(T')^{-1} CMat := Smat*Bmatp; -- matrix S*B' contains p_ij in BBS -- Step (7): Form the expected ideal J_OOp in BBS -- Homogenization step in BSSpz BBSpz ::= CR[cp[1..Mu,1..Nup],z]; Cpz := First(indets(BBSpz),Mu*Nup); psi_z := PolyAlgebraHom(BBSp, BBSpz, Cpz); J_OOpGensz := homog(apply(psi_z,J_OOpGens), Last(indets(BBSpz))); -- bring back to BBS (phi_p: cp_ij->CMat[i,j],z->Delta_OOp Cpij := Concat(flatten(GetRows(CMat)),[Delta_OOp]); phi_p := PolyAlgebraHom(BBSpz, BBS, Cpij); J_OOpGensnew := apply(phi_p,J_OOpGensz); --J_OOphat := ideal(BBS,J_OOpGensnew); J_OOphat := ideal(BBS,interreduced(J_OOpGensnew)); --------------------------------------------------- -- Get the ideal for CBP w.r.t OOp: J1tilde := J_OOphat; -- the ideal \tilde{J}_1 J1G := Gens(J1tilde); Len(J1G); -- 58 -- Check J_1 \subseteq \tilde{J}_1: foreach G in Gens(J1) do if NR(G,J1G) <>0 then print 1; else print 0; endif; endforeach; -- 0000000 and hence J_1 \Ċżubseteq \tilde{J}_1 -- Check \tilde{J}_1 \subseteq J_1: foreach G in J1G do if NR(G,GBJ1) <>0 then print 1; else print 0; endif; endforeach; --0000011111111111111111111111111111111111111111111111111111 -- We choose the first element of J1G which is not contained in J_1: F1 := J1G[6]; F1; NR(F1,GBJ1)=F1; -- We need to check that F1 is not contained in Rad(J_1). -- We choose the following point: Pt := [0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,1,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0, 1,0,0,0,0,0,1,0,0,0]; eval(F1,Pt); -- 1 --> the value of F1 at Pt is 1 -- We check that this point is contained in Z(I_BOHbar) and Z(J1): I_BOHbar := IdealOfBOHbar(BBS,OO,HF); GensI_BOHbar := Gens(I_BOHbar); -- ideal of B_O(Hbar) Len(GensI_BOHbar); -- 81 foreach H in GensI_BOHbar do print eval(H,Pt); if eval(H,Pt)<>0 then println H; endif; endforeach; -- value of poly in GensI_BOHbar at Pt: -- 00000000000000000000000000000000000000000 -- 0000000000000000000000000000000000000000 foreach H in Gens(J1) do print eval(H,Pt); if eval(H,Pt)<>0 then println H; endif; endforeach; -- value of poly in J1 at Pt: -- 0000000 --> Hence the point Pt is in Z(I_BOHbar) and Z(J_1) --> So, F1 is not contained in Rad(J_1)! -- -- Check for Pt in Z(Ji), i=1..15: for i:=1 to 15 do Ji := ListNSCB[i][3]; foreach H in Gens(Ji) do print eval(H,Pt); if eval(H,Pt)<>0 then println H; endif; endforeach; endfor; --> every poly in Ji vanishes at Pt --> Pt is contained in Z(Ji) for all i=1..15 -- Check for Pt in Z(I_OOp): I_ZO := IdealOfBOHcompl(BBS,OO,HF); -- the ideal for Z_O(Hbar) I_ZOred := ideal(BBS,[Y in gens(I_ZO)| NR(Y,gens(I_BOHbar))<>0]); foreach H in Gens(I_ZOred) do print eval(H,Pt); if eval(H,Pt)<>0 then println " --> Poly: ", H; endif; endforeach; /* 00001 --> Poly: c[6,1] -1 --> Poly: c[5,2] -c[6,7] 000-1 --> Poly: -c[6,7]^2 +c[5,5] 000000000000000000000000000000000000000000000000000 */ GIzo:=Gens(I_ZOred); GIzo[5]; -- c[6,1] = Delta_1 -- Pt is not contained in Z(I_OOp)=Z(I_ZOred) \cup Z(Delta_1) --> Pt is a point for CBP, but not for SCBP -- The 0-dim ideal corresponding to Pt is: -- (c_{61} = c_{32} = c_{67} = 1) I_Pt := ideal(x*y - x^3, x*z - y, y^2, y*z, z^2, x^2*y, x^2*z - x^3, x^4, x^3*y, x^3*z); -- Check it for CBP: CheckingCBPUsingCanModule(I_Pt); -- true DF(I_Pt); -- ideal(x*z, y^2, y*z, z^2, x^3, x^2*y) CheckingCBPUsingCanModule(DF(I_Pt)); -- false ---------------------------------------------------- -- Example 13.2 ---------------------------------------------------- W:=mat([[1,1],[0,1]]); O := MakeTermOrd(W); P := NewPolyRing(QQ, "x,y", O, 1); use P; OO := [one(P), x, y, x^2, x^3, x^4]; BBS := BBRing(OO); H := [1,3,5,6]; LO := HFOrderIdeals(P,H); LO; I_BOHbar := IdealOfBOHbar(BBS,OO,H); I_ZO := IdealOfBOHcompl(BBS,OO,H); I_ZOred := ideal(BBS,[Y in gens(I_ZO)| NR(Y,gens(I_BOHbar))<>0]); indent(I_ZOred); ListNSCI := CombLociHilbertStratum_NSCI(BBS,OO,H); Ii := ListNSCI[1][2]; indent(Ii); Ji := ListNSCI[1][3]; indent(Ji); SC := ListNSCI[1]; -- Use only for the example Define NonSCI(BBS, OO, HF) I_BOHbar := IdealOfBOHbar(BBS,OO,HF); ListIJO := CombLociHilbertStratum_NSCI(BBS,OO,HF); SCB_O := sum([intersection(X[2],X[3])| X in ListIJO]); SCB_Oint := interreduced(gens(SCB_O)); return [ideal(BBS,SCB_Oint),I_BOHbar]; EndDefine;