r/sagemath • u/MCCPyTutorials • Apr 27 '21
Intro to Graph Theory with SageMath
r/sagemath • u/vassari79 • May 05 '26
Hi all,
I'd like to announce DiffAlg for SageMath, a port of the DiffAlg Macaulay2 package to SageMath. See also, https://msp.org/jsag/2019/9-1/p02.xhtml
What it does
DiffAlg computes standard operations with polynomial differential forms and vector fields: exterior product, exterior differential, interior product (contraction), Lie derivative, pullback, singular ideals, involutivity of distributions, and kernel/image of linear operators on forms and vector fields. It works symbolically.
It's a little niche, I know — but I hope somebody out there finds it useful!
Any comment would be welcome!
r/sagemath • u/[deleted] • Sep 18 '20
https://doc.sagemath.org/html/en/tutorial/index.html
They're great. I'm glad that this exists. I don't have a copy of mathematica, and obviously I can't have my local files interact with wolfram alpha. So sage it is.
I was surprised to see it in the official ubuntu repository, which was nice. I don't think mathematica is that easy to install. So boom up and running in 30s.
I started using sage cause half the time I'd open up a web browser just to integrate something or find the standard deviation, but that seems dumb. I'm used to using ipython, I'm used to doing things in the terminal so sage is really great for me.
I made a log file of the last 10k lines of sage shell output that isn't an exception for easy grep or ctrl + f reference.
This really is a great project.
r/sagemath • u/alexice89 • Sep 10 '20
What do you guys think will be the future of CAS software? Open source like SageMath or closed like Mathematica? I am asking because I am still undecided on which one I should learn to benefit me 10 - 20 years from now. If you could share with me the reasons you choose Sage over Mathematica I would appreciate it. Thanks.
r/sagemath • u/jackofthebeanstalk • Jul 17 '19
r/sagemath • u/phatsphere • Feb 29 '16
r/sagemath • u/MCCPyTutorials • Jan 16 '21
r/sagemath • u/noscore6 • Jun 08 '20
r/sagemath • u/Ok-Landscape1687 • Nov 13 '25
One of the most elegant results in algebra: for every prime power q = pn, there exists exactly one finite field (up to isomorphism) with q elements. That's it - no ambiguity, no choices to make. You want a field with 8 elements? There's exactly one. Field with 49 elements? Exactly one.
If you work through the examples in this .ipynb notebook, the construction is beautifully concrete. For prime fields like GF(7), you just get {0,1,2,3,4,5,6} with arithmetic mod 7. For extension fields like GF(9) = GF(3²), you construct it as F₃[x]/(f(x)) where f is an irreducible degree-2 polynomial. The multiplicative group is always cyclic - so GF(q)* has order q-1 and you can find a primitive element that generates everything. Fermat's Little Theorem falls right out: ap-1 = 1 for all nonzero a in GF(p).
The Frobenius endomorphism x ↦ xp is remarkable too. It's a field homomorphism (which seems weird - raising to a power preserves addition!), but it works because of characteristic p. Apply it n times in GF(pn) and you get back where you started.
Link: https://cocalc.com/share/public_paths/4e15da9b7faea432e8fcf3b3b0a3f170e5f5b2c8
r/sagemath • u/MCCPyTutorials • Aug 30 '20
r/sagemath • u/AutoModerator • Dec 04 '21
Let's look back at some memorable moments and interesting insights from last year.
Your top 10 posts:
"Mathematics behind cryptography l homomorphism and modulo group applicat..." by u/Siva_915544
"Happy Cakeday, r/sagemath! Today you're 9" by u/AutoModerator
"Sorry to bother you all with this question, but I broke typeset output by setting the renderer to SVG and now I can't figure out how to revert it." by u/SirMiba
"OEIS Sequence with SageMath (YouTube Short)" by u/MCCPyTutorials
"How to take a generator of a polynomial ring in Sage? and specify an arbitrary ring polynomial?" by u/GPineda17
"How do I find the zeros of a function in Sage Math?" by u/hwoodice
r/sagemath • u/jssmith42 • Nov 20 '21
I’d like to write proofs in a math programming language as a way of processing them, making sure I understand them, harnessing the power of computers to ensure the proof is valid, and studying the proof in more detail by having automatic functions for examining some of the relevant objects in the proof.
Is this a common use of Sage, to write proofs?
r/sagemath • u/Siva_915544 • Jun 03 '21
r/sagemath • u/wstein • Feb 11 '16
r/sagemath • u/Pali1119 • Aug 13 '26
So I managed to install 10.7 on the Linux subsystem and it works more or less. I've also found an installation of the 9.3 version on my PC (from years ago), which, if I remember correctly, was an officially supported Windows native installation.
This got me wondering, why is SageMath not supported natively on Windows anymore? Is there a good reason why they discontinued, despite the majority of people using Windows? If I understand correctly, you can compile the source yourself for windows, but this or installing on a Linux subsystem is complicated and doesn't favour widespread adoption.
r/sagemath • u/[deleted] • Sep 19 '20
https://i.imgur.com/ab8lDWa.png
I made an example for calculating the standard deviation of a line separated text file containing pendulum period data I had. Obviously it's not the most complex example, but it shows a use of sage that a typical student in a variety of fields might use.
I feel like sage's greatest strengths is having generic python syntax and the Ipython stuff like cd. Stuff like ease of reading files, ease of parsing them, list comprehensions, all the stuff that makes python great is also part of sage.
I enjoyed the thematic examples on the website, and thought about making some examples that are your sort of everyday scenario, where you would do something like read in a file parse it, use numpy, etc.
Edit: Unrelated, but is there a way to specify numpy to always be imported as np whenever I start my sage shell? I almost always use it for something.
Edit: Don't know why I used print for this. Oh well.
r/sagemath • u/YouAllMeetInATavern • Aug 10 '18
I have a friend in college who actually shelled out for Mathematica and loves it. Not just for math, but also because it’s a great all-purpose language, and really concise for things like Project Euler problems.
I tend to suspect Sage probably isn’t quite adept at general coding, and surely lacks Mathematica’s outrageous number of unusually specific and often very poweful default functions, like analyzing an image to determine if it is of a goat. (Yes, really. It can also parse sentences.)
However, I would love to hear some general thought on how the two compare, both for math work and as all-purpose languages.
r/sagemath • u/[deleted] • Feb 06 '16
r/sagemath • u/wstein • Sep 29 '14
r/sagemath • u/OkEar3108 • Jan 09 '26
Hey,
for some part of my thesis I wanted to compute some chow polynomials of especially graphic matroids for bipartite graphs and wanted to compare the run tim two different functions to obtain them.
One function is the implementation of theorem 1 of the paper chow and augmented chow polynomials as evaluations of poincaré-extended ab-indices from Christian Stump.
The other function is sagemath´s inbuild-function hilbert_seres() for the defining_ideal()-class of chow rings.
As example (here I am using sage as a python-package) :
G = graphs.CompleteBipartiteGraph(3, 4)
G1 = Graph()
G1.add_edges([(u, v, i) for i, (u, v) in enumerate(edges)])
M1 = Matroid(graph=G1)
ch = M1.chow_ring(QQ, False)
poly = ch.defining_ideal().hilbert_series() Then poly is the chow polynomial for the bipartite graphs on 3 + 4 vertices.
For n + m >= 8 and n,m >= 3, the runtime of this functions explodes.
I have 16 GB RAM and this was not enough to compute the chow polynomial of the bipartite graph with n = 2 and m = 6, before my program just crushed.
I tried to take a look at the documentation on how the calculation is done for this specific function, but I couldn´t really see it.
Does someone know, where to find in the documentation of sagemath which method is used to calculate the chow polynomial this way or does someone know this?
Sincerely,
OkEar3108
r/sagemath • u/AutoModerator • Dec 04 '22
Let's look back at some memorable moments and interesting insights from last year.
Your top 6 posts:
r/sagemath • u/JMatzenbacher • Dec 16 '21
Hi guys, can anyone help me?
I've never worked with sage, but I decided to use it to get some simple results in my research.
The problem is the following: I end up with a equation which depends on variable 'a' and 't', what I need is to isolate variable 'a' so I will get a(t), I've tried using solve command but it didn't work. Does anyone know how to do it?
r/sagemath • u/MCCPyTutorials • Jun 28 '21
r/sagemath • u/AutoModerator • Dec 04 '20
Let's look back at some memorable moments and interesting insights from last year.
Your top 10 posts:
"Whoever wrote the tutorials for sagemath.org is a cool dude" by u/BoomerFelonOwl
"Video I Made on SageMath Help Features and Other Resources - May Be of Interest Here" by u/MCCPyTutorials
"My SageMath setup, using vim-Jupyter plugin for interaction." by u/noscore6
"Making examples of practical undergrad uses of sagemath?" by u/BoomerFelonOwl
"Help with a probability problem SageMath seems to not want to simplify" by u/PM_ME_YOUR_FUN_MATH
"truncating tensor/scalar perturbations at particular orders...(general relativity)" by u/deepdooper
"Mathematical software: sagemath and mathematica" by u/TeoCol777