Sage -- Robert Šámal, Radek Hušek

Sage (NMIN365) 2023/24


Held in SU1, Tuesday 14:00-15:30. Language: Czech or English (depending if an English speaking student wants to participate).

Summer semester 0/2 Credit

Aims

To learn to use Sage program to solve basic math problems, to experiment with math, to do math research. We will also learn to "program math" and to extend the program.
To quickly run a short Sage code, you may use SageMath Cell Server.

Getting credit

Presenting material showing what you have learned.

Covered topics

Last time we taught this. (The web page is in Czech.)
Week 1
Introduction to the Sage system. Rough plan for the semester. If needed, help with installing it on your laptop. Next week the class is canceled.
Notebook used
Week 2
Canceled
Week 3
Basic dealing with expressions etc. Notebook used
Week 4
More symbolic computation: assumptions, several types of functions, doing symbolic sums.
Notebook used
Week 5
Linear programming in Sage.
1st notebook used
2st notebook used (and its solution)
Week 6
Notebook used
Week 7
Getting comfortable with graphs
Week 8
More play with graphs
Week 9
Getting the answer fast -- python vs cython etc.
Week 10
Tables, graphs etc. (and some solution)

More advanced tutorial
Week 11
Playing with flows in graphs
a sage script
For running long-term computations on a server i recommended tmux program. The program comes with a nice documentataion, but for quick start you will need little: (1) tmux starts the program, you run your computation that will take a long time to finish (and possibly produces an output, so you will want to look at it again). (2) press "ctrl-b d" this detaches you from the computation. (3) Now you can log out, and at any later point run "tmux a" to attach again to the same session.
For more details (running multiple sessions, windows, panes, etc.) -- se the documentation.
Week 12
We will be using z3 Prover -- a SAT/SMT solver.
Jupyter notebook.
Interesting tutorial.
Another.
Microsoft guide.
Week 13
We will be learning numpy. Jupyter notebook (and its solution)
Basic tutorial.
Nice slides
100 exercises of increasing difficulty (you may use this link for a zip file if you are not familiar with git).