from sage.all import PolynomialRing, ZZ

pr = PolynomialRing(ZZ, ('c', 'd', 'X1', 'X2', 'Y1', 'Y2'), 6)
c, d, X1, X2, Y1, Y2 = pr.gens()
ccd = c * c * d
ccd2 = 2 * c * c * d
c2 = 2 * c
cc4 = 4 * c * c
k = 1 / c
Z1, Z2 = 1, 1
formula = {}
A = Z1 * Z2
formula['A'] = A
B = A ** 2
formula['B'] = B
C = X1 * X2
formula['C'] = C
D = Y1 * Y2
formula['D'] = D
t0 = C * D
formula['t0'] = t0
E = d * t0
formula['E'] = E
F = B - E
formula['F'] = F
G = B + E
formula['G'] = G
t1 = X1 + Y1
formula['t1'] = t1
t2 = X2 + Y2
formula['t2'] = t2
t3 = t1 * t2
formula['t3'] = t3
t4 = t3 - C
formula['t4'] = t4
t5 = t4 - D
formula['t5'] = t5
t6 = F * t5
formula['t6'] = t6
X3 = A * t6
formula['X3'] = X3
t7 = D - C
formula['t7'] = t7
t8 = G * t7
formula['t8'] = t8
Y3 = A * t8
formula['Y3'] = Y3
t9 = F * G
formula['t9'] = t9
Z3 = c * t9
formula['Z3'] = Z3
