-
Notifications
You must be signed in to change notification settings - Fork 2
/
Ask Dan and Mike - log.m2
1257 lines (761 loc) · 31.3 KB
/
Ask Dan and Mike - log.m2
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
+ /Users/dan/src/M2/trunk/M2/BUILD/dan/builds.tmp/mac64.production/M2 --no-readline --print-width 97
Macaulay2, version 1.4.0.1
with packages: ConwayPolynomials, Elimination, IntegralClosure, LLLBases, PrimaryDecomposition,
ReesAlgebra, TangentCone
i1 : hello there
stdio:1:1:(3): error: no method for adjacent objects:
-- hello (of class Symbol)
-- SPACE there (of class Symbol)
i2 : x
o2 = x
o2 : Symbol
i3 : "x"
o3 = x
i4 : x_3
o4 = x
3
o4 : IndexedVariable
i5 : class o2
o5 = Symbol
o5 : Type
i6 : class "x"
o6 = String
o6 : Type
i7 : x
o7 = x
o7 : Symbol
i8 : dictionaryPath
o8 = {SimpleDoc.Dictionary, User#"private dictionary", User.Dictionary, Elimination.Dictionary,
--------------------------------------------------------------------------------------------
LLLBases.Dictionary, IntegralClosure.Dictionary, PrimaryDecomposition.Dictionary,
--------------------------------------------------------------------------------------------
Classic.Dictionary, TangentCone.Dictionary, ReesAlgebra.Dictionary,
--------------------------------------------------------------------------------------------
ConwayPolynomials.Dictionary, Core.Dictionary, OutputDictionary, PackageDictionary}
o8 : List
i9 : keys Elimination.Dictionary
o9 = {Elimination$discriminant, discriminant, eliminate, Elimination$eliminate, sylvesterMatrix,
--------------------------------------------------------------------------------------------
Elimination$sylvesterMatrix, resultant, Elimination$resultant}
o9 : List
i10 : x
o10 = x
o10 : Symbol
i11 : mutable\dictionaryPath
o11 = {false, true, true, false, false, false, false, false, false, false, false, false, true,
-------------------------------------------------------------------------------------------
true}
o11 : List
i12 : dictionaryPath
o12 = {SimpleDoc.Dictionary, User#"private dictionary", User.Dictionary, Elimination.Dictionary,
-------------------------------------------------------------------------------------------
LLLBases.Dictionary, IntegralClosure.Dictionary, PrimaryDecomposition.Dictionary,
-------------------------------------------------------------------------------------------
Classic.Dictionary, TangentCone.Dictionary, ReesAlgebra.Dictionary,
-------------------------------------------------------------------------------------------
ConwayPolynomials.Dictionary, Core.Dictionary, OutputDictionary, PackageDictionary}
o12 : List
i13 : x=3
o13 = 3
i14 : dictionary symbol x
o14 = User#"private dictionary"
o14 : GlobalDictionary
i15 : dictionary local x
i16 : local x, global x
o16 = (x, x)
o16 : Sequence
i17 : dictionary symbol res
o17 = Core.Dictionary
o17 : GlobalDictionary
i18 : getSymbol "res"
o18 = res
o18 : Symbol
i19 : dictionary oo
o19 = User#"private dictionary"
o19 : GlobalDictionary
i20 : res
o20 = res
o20 : Symbol
i21 : dictionaryPath
o21 = {SimpleDoc.Dictionary, User#"private dictionary", User.Dictionary, Elimination.Dictionary,
-------------------------------------------------------------------------------------------
LLLBases.Dictionary, IntegralClosure.Dictionary, PrimaryDecomposition.Dictionary,
-------------------------------------------------------------------------------------------
Classic.Dictionary, TangentCone.Dictionary, ReesAlgebra.Dictionary,
-------------------------------------------------------------------------------------------
ConwayPolynomials.Dictionary, Core.Dictionary, OutputDictionary, PackageDictionary}
o21 : List
i22 : newPackage "Foo"
--loading configuration for package "Foo" from file /Users/dan/Library/Application Support/Macaulay2/init-Foo.m2
--new configuration options for package Foo
--backup file created: /Users/dan/Library/Application Support/Macaulay2/init-Foo.m2.bak
--storing configuration for package Foo in /Users/dan/Library/Application Support/Macaulay2/init-Foo.m2
o22 = Foo
o22 : Package
i23 : dictionaryPath
o23 = {SimpleDoc.Dictionary, Foo#"private dictionary", Foo.Dictionary, Elimination.Dictionary,
-------------------------------------------------------------------------------------------
LLLBases.Dictionary, IntegralClosure.Dictionary, PrimaryDecomposition.Dictionary,
-------------------------------------------------------------------------------------------
Classic.Dictionary, TangentCone.Dictionary, ReesAlgebra.Dictionary,
-------------------------------------------------------------------------------------------
ConwayPolynomials.Dictionary, Core.Dictionary, OutputDictionary, PackageDictionary}
o23 : List
i24 : dictionary x
i25 : dictionary symbol x
i26 : x=3
o26 = 3
i27 : dictionary symbol x
i28 : keys Foo#'private dictionary"
stdio:28:10:(2): error: invalid character
i28 : keys Foo#"private dictionary"
o28 = {}
o28 : List
i29 : "
i29 : keys Foo#"private dictionary"
o29 = {}
o29 : List
i30 : f = () -> ()
o30 = f
o30 : FunctionClosure
i31 : keys Foo#"private dictionary"
o31 = {f}
o31 : List
i32 : symbol xxx
o32 = xxx
o32 : Symbol
i33 : keys Foo#"private dictionary"
o33 = {xxx, f}
o33 : List
i34 : symbol x
o34 = x
o34 : Symbol
i35 : keys Foo#"private dictionary"
o35 = {xxx, f}
o35 : List
i36 : symbol xx
o36 = xx
o36 : Symbol
i37 : vars 23
o37 = x
o37 : Symbol
i38 : dictionary vars 23
i39 : endPackage "Foo"
--warning: symbol "res" in Core.Dictionary is shadowed by a symbol in User#"private dictionary"
-- use one of the synonyms Core$res, Core$resolution, resolution
stdio:41:1:(2): error: mutable unexported unset symbol(s) in package Foo: 'xxx', 'xx'
stdio:34:8-34:11: here is the first use of 'xxx'
stdio:38:8-38:10: here is the first use of 'xx'
i40 : dictionary vars 23
o40 = User#"private dictionary"
o40 : GlobalDictionary
i41 : newPackage "Foo"
stdio:43:1:(3): error: package Foo not reloaded; try Reload => true
i42 : newPackage "Fooo"
o42 = Fooo
o42 : Package
i43 : rr = 1
o43 = 1
i44 : ss := 2
o44 = 2
i45 : export {"tt"}
o45 = {tt}
o45 : List
i46 : tt = 3
o46 = 3
i47 : endPackage "Fooo"
o47 = Fooo
o47 : Package
i48 : rr,ss,tt
o48 = (rr, 2, 3) ------- 2
o48 : Sequence
i49 : newPackage "Foooo"
o49 = Foooo
o49 : Package
i50 : export "f"
o50 = {f}
o50 : List
i51 : f = () -> ( QQ(monoid [ getSymbol "x" ] ) )
o51 = f
o51 : FunctionClosure
i52 : endPackage "Foooo"
o52 = Foooo
o52 : Package
i53 : f()
o53 = QQ[x]
o53 : PolynomialRing
i54 : x
o54 = 3
i55 : use o53
o55 = QQ[x]
o55 : PolynomialRing
i56 : x
o56 = 3 -- oops
i57 : R = QQ[a..e]
o57 = R
o57 : PolynomialRing
i58 : R_2
o58 = c
o58 : R
i59 : R_"c"
o59 = c
o59 : R
i60 : 3_R
o60 = 3
o60 : R
i61 : symbol c
o61 = c
o61 : Symbol
i62 : value oo
o62 = c
o62 : R
i63 : S = QQ( monoid [ e_1 .. e_5 ] )
stdio:65:19:(3):[1]: error: no method for binary operator _ applied to objects:
-- e (of class R)
-- _ 1 (of class ZZ)
i64 : S = QQ( monoid [ symbol e_1 .. symbol e_5 ] )
warning: clearing value of symbol e to allow access to subscripted variables based on it
: debug with expression debug 3903 or with command line option --debug 3903
o64 = S
o64 : PolynomialRing
i65 : e_1
o65 = e
1
o65 : S
i66 : T := QQ( monoid [ symbol f_1 .. symbol f_5 ] )
o66 = QQ[f , f , f , f , f ]
1 2 3 4 5
o66 : PolynomialRing
i67 : f_1
o67 = {*Function[../../trunk/M2/Macaulay2/m2/classes.m2:66:44-66:59]*}
o67 : FunctionClosure
i68 : f
o68 = f
o68 : FunctionClosure
i69 : symbol f_1
o69 = f
1
o69 : IndexedVariable
i70 : value oo
o70 = f
1
o70 : IndexedVariable
i71 : use T
warning: clearing value of symbol f to allow access to subscripted variables based on it
: debug with expression debug 3406 or with command line option --debug 3406
stdio:73:1:(3): error: assignment to protected variable 'f'
i72 : restart
Macaulay2, version 1.4.0.1
with packages: ConwayPolynomials, Elimination, IntegralClosure, LLLBases, PrimaryDecomposition,
ReesAlgebra, TangentCone
i1 : T := QQ( monoid [ symbol f_1 .. symbol f_5 ] )
o1 = QQ[f , f , f , f , f ]
1 2 3 4 5
o1 : PolynomialRing
i2 : f_1
o2 = f
1
o2 : IndexedVariable
i3 : value oo
o3 = f
1
o3 : IndexedVariable
i4 : use T
o4 = QQ[f , f , f , f , f ]
1 2 3 4 5
o4 : PolynomialRing
i5 : value o2
o5 = f
1
o5 : QQ[f , f , f , f , f ]
1 2 3 4 5
i6 : newPackage "Foooo"
o6 = Foooo
o6 : Package
i7 : x = getSymbol "x"
o7 = x
o7 : Symbol
i8 : f = () -> x
o8 = f
o8 : FunctionClosure
i9 : export "f"
o9 = {f}
o9 : List
i10 : endPackage "Foooo"
--warning: symbol "f" in User#"private dictionary" is shadowed by a symbol in Foooo.Dictionary
-- use the synonym f$0
o10 = Foooo
o10 : Package
i11 : f()
o11 = x
o11 : Symbol
i12 : oo===x
o12 = true
i13 : R := QQ(monoid[r_1 .. r_5 ])
o13 = QQ[r , r , r , r , r ]
1 2 3 4 5
o13 : PolynomialRing
i14 : r_1
o14 = r
1
o14 : IndexedVariable
i15 : R_(symbol r_2)
o15 = r
2
o15 : QQ[r , r , r , r , r ]
1 2 3 4 5
i16 : x := local x
o16 = x
o16 : Symbol
i17 : U = QQ[x]
o17 = U
o17 : PolynomialRing
i18 : x
o18 = x
o18 : U
i19 : symbol x
o19 = x
o19 : Symbol
i20 : global x
o20 = x
o20 : Symbol
i21 : symbol x === global x
o21 = false
i22 : hash symbol x, hash global x
o22 = (1202132, 1202086)
o22 : Sequence
i23 : x := getSymbol "x"
stdio:23:1:(3): warning: local declaration of x shields variable with same name
o23 = x
o23 : Symbol
i24 : aa := getSymbol "bb"
o24 = bb
o24 : Symbol
i25 : aa = 5
o25 = 5
i26 : value getSymbol "bb"
o26 = bb
o26 : Symbol
i27 : bb = 5555
o27 = 5555
i28 : value getSymbol "bb"
o28 = 5555
i29 : aa
o29 = 5
i30 : o24
o30 = bb
o30 : Symbol
i31 : value oo
o31 = 5555
i32 : o24
o32 = bb
o32 : Symbol
i33 : o24 <- 878787
o33 = 878787
i34 : bb
o34 = 878787
i35 : aa
o35 = 5
i36 : o24
o36 = bb
o36 : Symbol
i37 : o24 = 100!
o37 = 9332621544394415268169923885626670049071596826438162146859296389521759999322991560894146397
6156518286253697920827223758251185210916864000000000000000000000000
i38 : o24
o38 = 9332621544394415268169923885626670049071596826438162146859296389521759999322991560894146397
6156518286253697920827223758251185210916864000000000000000000000000
i39 : o40
o39 = o40
o39 : Symbol
i40 : o40
o40 = o40
o40 : Symbol
i41 : o40
o41 = o40
o41 : Symbol
i42 : o39
o42 = o40
o42 : Symbol
i43 : (o43=7;asdf)
o43 = asdf
o43 : Symbol
i44 : o43
o44 = 7 -- ???????????????
i45 : ooo
o45 = asdf
o45 : Symbol
i46 : o43
o46 = 7
i47 : dictionary symbol o43 , dictionary symbol o44
o47 = (User#"private dictionary", OutputDictionary)
o47 : Sequence
i48 : dictionaryPath
o48 = {Foooo.Dictionary, SimpleDoc.Dictionary, User#"private dictionary", User.Dictionary,
-------------------------------------------------------------------------------------------
Elimination.Dictionary, LLLBases.Dictionary, IntegralClosure.Dictionary,
-------------------------------------------------------------------------------------------
PrimaryDecomposition.Dictionary, Classic.Dictionary, TangentCone.Dictionary,
-------------------------------------------------------------------------------------------
ReesAlgebra.Dictionary, ConwayPolynomials.Dictionary, Core.Dictionary, OutputDictionary,
-------------------------------------------------------------------------------------------
PackageDictionary}
o48 : List
i49 : M = ZZ^5
5
o49 = ZZ
o49 : ZZ-module, free
i50 : peek M
o50 = Module of Vector{cache => CacheTable{...2...} }
numgens => 5
RawFreeModule => free(rank 5 degrees = {1, 1, 1, 1, 1})
ring => ZZ
i51 : mutable M
o51 = false
i52 : M#foo = bar
stdio:52:7:(3): error: attempted to modify an immutable hash table
i53 : mutable ideal 4
o53 = false
i54 : mutable Ideal
o54 = true
i55 : unique { ZZ^5, ZZ^4, ZZ^5 }
5 4
o55 = {ZZ , ZZ }
o55 : List
i56 : unique { QQ[x], QQ[x] }
o56 = {QQ[x], QQ[x]}
o56 : List
i57 : unique { QQ[x], QQ[x,y], QQ[x,x,x] }
o57 = {QQ[x], QQ[x, y], QQ[x, x, x]}
o57 : List
i58 : R = QQ[x]
o58 = QQ[x]
o58 : PolynomialRing
i59 : R[y]
o59 = QQ[x][y]
o59 : PolynomialRing
i60 : degrees oo
o60 = {{1, 0}}
o60 : List
i61 : degree y
o61 = {1, 0}
o61 : List
i62 : degree x_o59
o62 = {0, 1}
o62 : List
i63 : R[z,Join=>false]
o63 = QQ[x][z]
o63 : PolynomialRing
i64 : degree z
o64 = {1}
o64 : List
i66 : options betti
o66 = OptionTable{Weights => null}
o66 : OptionTable
i67 : use R
o67 = QQ[x]
o67 : PolynomialRing
i68 : x
o68 = x
o68 : Symbol -- ?????
i69 : restart
Macaulay2, version 1.4.0.1
with packages: ConwayPolynomials, Elimination, IntegralClosure, LLLBases, PrimaryDecomposition,
ReesAlgebra, TangentCone
i1 : QQ[a..e]
o1 = QQ[a, b, c, d, e]
o1 : PolynomialRing
i2 : res coker vars o1
1 5 10 10 5 1
o2 = (QQ[a, b, c, d, e]) <-- (QQ[a, b, c, d, e]) <-- (QQ[a, b, c, d, e]) <-- (QQ[a, b, c, d, e]) <-- (QQ[a, b, c, d, e]) <-- (QQ[a, b, c, d, e]) <-- 0
0 1 2 3 4 5 6
o2 : ChainComplex
i3 : betti oo
0 1 2 3 4 5
o3 = total: 1 5 10 10 5 1
0: 1 5 10 10 5 1
o3 : BettiTally
i4 : peek oo
o4 = BettiTally{(0, {0}, 0) => 1 }
(1, {1}, 1) => 5
(2, {2}, 2) => 10
(3, {3}, 3) => 10
(4, {4}, 4) => 5
(5, {5}, 5) => 1
i5 : R = QQ[a,b, Degrees => {{1,0},{0,2}}]
o5 = R
o5 : PolynomialRing
i6 : betti res coker vars R
0 1 2
o6 = total: 1 2 1
0: 1 1 .
1: . 1 1
o6 : BettiTally
i7 : peek oo
o7 = BettiTally{(0, {0, 0}, 0) => 1}
(1, {0, 2}, 2) => 1
(1, {1, 0}, 1) => 1
(2, {1, 2}, 3) => 1
i8 : heft R
o8 = {1, 1}
o8 : List
i9 : ideal vars R
o9 = ideal (a, b)
o9 : Ideal of R
i11 : o9^0
o11 = ideal 1
o11 : Ideal of R
i12 : monomialIdeal oo
o12 = monomialIdeal 1
o12 : MonomialIdeal of R
i13 : oo^0
stdio:13:3:(3): error: missing unit element
i14 : errorDepth
o14 = 3
i15 : errorDepth=1
o15 = 1
i16 : errorDepth=2
o16 = 2
i17 : o12^0
stdio:17:4:(3): error: missing unit element
i18 : errorDepth=1
o18 = 1
i19 : o12^0
../trunk/M2/Macaulay2/m2/monideal.m2:44:49:(1):[1]: error: missing unit element
../../trunk/M2/Macaulay2/m2/monideal.m2:44:49:(1):[1]: --entering debugger (type help to see debugger commands)
../../trunk/M2/Macaulay2/m2/monideal.m2:44:49-44:69: --source code:
MonomialIdeal ^ ZZ := MonomialIdeal => (I,n) -> SimplePowerMethod(I,n)
ii20 : debug Core
ii21 : SimplePowerMethod
oo21 = SimplePowerMethod
oo21 : CompiledFunction
ii22 : code oo
oo22 = function 'SimplePowerMethod': source code not available
ii23 : restart
Macaulay2, version 1.4.0.1
with packages: ConwayPolynomials, Elimination, IntegralClosure, LLLBases, PrimaryDecomposition,
ReesAlgebra, TangentCone
i1 : R = QQ[x]
o1 = R
o1 : PolynomialRing
i2 : monomialIdeal x
o2 = monomialIdeal(x)
o2 : MonomialIdeal of R
i3 : oo^0
o3 = monomialIdeal 1
o3 : MonomialIdeal of R
i4 : oo^-1
stdio:4:3:(3): error: you dummy!
i5 : apropos "local"
o5 = {local, localDictionaries, localize}
o5 : List
i6 : apropos "init"
o6 = {InfiniteNumber, infinity, isFinite, isInfinite}
o6 : List
i7 : apropos "ath"
o7 = {dictionaryPath, mathML, path, prefixPath, realpath, rootPath, searchPath, texMath,
--------------------------------------------------------------------------------------------
toAbsolutePath}
o7 : List