/* BigattiGeramita03.cocoa last update: 25 October 2001 MinHF(T, R) -- the (t,r)-minimal HF MinHF_Codim(T, R) -- H(1) of the (t,r)-minimal HF MinHF_Points(T, R) -- the sum of the (t,r)-minimal HF MinHFLexList(T, R); -- only the significant generators (Deg<=R) MinHFLexIdeal(T, R); -- the ideal BettiMatrix(I); -- shortcut for GB.GetBettiMatrix() AllBetti(R, Codim); -- all Lex Betti matrices for a fixed R and codim -------------------------[ EXAMPLES ]------------------------- -- Example 2.4: BinExp(101,6); BinExp(101,6, -1,-1); -- Example 3.5: MinHF(101, 6); -- Example 4.10: N := MinHF_Codim(101, 6); Use Q[x[1..N]]; MinHFLexList(101, 6); I := MinHFLexIdeal(101, 6); I; -- Example 5.7: BettiMatrix(I); -- codimension 3: AllLexBetti(6, 3); */ -------------------------[ MinHF ]------------------------- Define MinHF(T,R) BE := BinExp(T, R); HV := NewList(R+1,0); -- HVector HV[R+1] := T; For I := R To 2 Step -1 Do HV[I] := EvalBinExp(BE, I-1-R, I-1-R); EndFor; HV[1] := 1; Return [HV, 0]; EndDefine; -- MinHF Define MinHF_Codim(T,R) Return BinExp(T,R, -R+1,-R+1); EndDefine; -- MinHF_Codim Define MinHF_Points(T,R) HF := MinHF(T,R); HF0 := [ Sum(First(HF[1],I)) | I In 1..(Len(HF[1])-1) ]; Return [ HF0, Sum(HF[1]) ] EndDefine; -- MinHF_Points -------------------------[ Lex Ideals ]------------------------- Define MinHFLexList(T,R) L := [ B[1]-B[2] | B In BinExp(T,R) ]; N := L[1]+2; D := [ Len([ X In L | X=N-I-1 ]) | I In 1..(First(L)-Last(L)+1) ]; D[Len(D)] := D[Len(D)]-1; L := [ Indet(I)*Product([ Indet(J)^D[J] | J In 1..I] ) | I In 1..Len(D) ]; Return L; End; -- MinHFLexIdeal Define MinHFLexIdeal(T,R) N := BinExp(T, R, 1-R, 1-R); Return Ideal(Last(Indets(), NumIndets()-N)) +Ideal(MinHFLexList(T,R))+Ideal(Indets())^(R+1); End; -- MinHFLexIdeal Alias GB := $cocoa/gb In Define BettiMatrix(I) RES := Res(I); Return GB.GetBettiMatrix(I); EndDefine; -- BettiMatrix EndAlias; Define AllLexBetti(R, Codim) MyRing ::= Q[x[1..Codim]]; Using MyRing Do For T := Bin(R+Codim-2,R)+1 To Bin(R+Codim-1,R)-1 Do I := MinHFLexIdeal(T,R); PrintLn '(T, R) = (', T,', ', R,'):'; BettiMatrix(I); End; End; EndDefine; -- AllBetti