SageMath syntax for Section 2.1

SageMath is a free open-source mathematics software system. You can use a SageMath cell online by going here.