Skip to content

Utah2016 "5 things I wish I knew"

aboocher edited this page Jul 19, 2017 · 9 revisions

5 Things I wish I knew...

#####Adam Boocher

  1. One can define a ring without "ideal" e.g.

         S = QQ[x,y]/(x^2,x*y)
    
  2. Typing ?matrix returns some help files

  3. With for loops, you don't need to specify the lower bound, if it is zero. e.g.

         for i to 5 do print i;
    
  4. There is clever power series code in hilbertSeries

  5. You don't need parentheses if you use spaces judiciously. For example, the following two are the same:

        first {{1,2,5},QQ[x,y]} /(i->i^2)  == (first {{1,2,5},QQ[x,y]})/(i->i^2)
    
  6. If you want to load something everytime that M2 loads, you should add a line to the init.m2 file. I had trouble locating this file, but ultimately found it in Application\ Support /Macaulay2/ (On other machines it might be in Applications/Macaulay2/

  7. If you want git to use emacs instead of vi then just use git

        config --global core.editor emacs
    
S. Hamid Hassanzadeh
  1. flatten entries (Matrix): Turns Matrix into a list whereas the command "toList" is not working for Matrices.

  2. (vars ambient ring J)_{0..(r-1)}: Returns the first r variables of the ring in which the ideal J is living inside.

  3. max(apply(L,zz->degree zz): Returns the maximum degree among elements of a list L of polynomials :

  4. toList(apply(0..r-1,z->0):
    A list with r zeros: