This function creates an object of type DivisorClassRepresentativeM0nbar from a hash table. Here is a basic example:
i1 : H1=new HashTable from { {{1,3},1}, {{1,4},1} }; |
i2 : divisorClassRepresentativeM0nbar(6,H1) o2 = DivisorClassRepresentativeM0nbar{DivisorExpression => HashTable{{1, 3} => 1}} {1, 4} => 1 NumberOfMarkedPoints => 6 o2 : DivisorClassRepresentativeM0nbar |
Warning: when you enter a hash table in Macaulay2, if you use a key more than once, the first instance is discarded. Here is an example where the behavior may differ from what you want:
i3 : H=new HashTable from { {{1,3},1}, {{1,4},1}, {{1,3},2}} o3 = HashTable{{1, 3} => 2} {1, 4} => 1 o3 : HashTable |
The user probably wanted $\delta_{\{1,3\}} + 2\delta_{\{1,3\}}$ to give $3\delta_{\{1,3\}}$ instead. The moral of the story: if your expression has two terms that are written exactly alike, you could either combine them before you create the input hash table, or input a list instead:
i4 : L= { {{1,3},1}, {{1,4},1}, {{1,3},2}} o4 = {{{1, 3}, 1}, {{1, 4}, 1}, {{1, 3}, 2}} o4 : List |
i5 : divisorClassRepresentativeM0nbar(6,L) o5 = DivisorClassRepresentativeM0nbar{DivisorExpression => HashTable{{1, 3} => 3}} {1, 4} => 1 NumberOfMarkedPoints => 6 o5 : DivisorClassRepresentativeM0nbar |
For this reason, most users will probably prefer to enter divisors via lists, rather than hash tables.
The function divisorClassRepresentative does the same minimal testing if you enter a hash table that it does if you enter a list. See the documentation for divisorClassRepresentativeM0nbar(ZZ,List).