Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Project: TestPlace
Views: 27
K.<sqrt3>=NumberField(x^2-3) def g(a,b,c,d): g=matrix([[a+sqrt3*b,-d-sqrt3*c],[d-sqrt3*c,a-sqrt3*b]]) return g x = [g(a,b,c,d) for a in range(-6,6) for b in range(-6,(6)) for c in range(-6,(6)) for d in range(-6,(6)) if a**2+d**2-3*b**2-3*c**2==1] S.<t,u,v,y>=QQ[] P = g(t,u,v,y) INEQS=[(g.transpose()*P*g-P).trace() for g in x] def coeff(F): C=[] C.append(int(F.coefficient({t:0,u:0,v:0,y:0}))) C.append(int(F.coefficient({t:1,u:0,v:0,y:0}))) C.append(int(F.coefficient({t:0,u:1,v:0,y:0}))) C.append(int(F.coefficient({t:0,u:0,v:1,y:0}))) C.append(int(F.coefficient({t:0,u:0,v:0,y:1}))) return C ineqs=[] for F in INEQS: ineqs.append(coeff(F)) poly=Polyhedron(ieqs=ineqs) poly.Hrepresentation() print("\n") poly.Vrepresentation()
(An inequality (1, -2, 0, 0) x + 0 >= 0, An inequality (1, 0, -2, 0) x + 0 >= 0, An inequality (1, 0, 2, 0) x + 0 >= 0, An inequality (1, 2, 0, 0) x + 0 >= 0, An inequality (2, -3, -2, 0) x + 0 >= 0, An inequality (2, -3, 2, 0) x + 0 >= 0, An inequality (2, -2, -3, 0) x + 0 >= 0, An inequality (2, -2, 3, 0) x + 0 >= 0, An inequality (2, 2, -3, 0) x + 0 >= 0, An inequality (2, 2, 3, 0) x + 0 >= 0, An inequality (2, 3, -2, 0) x + 0 >= 0, An inequality (2, 3, 2, 0) x + 0 >= 0) (A line in the direction (0, 0, 0, 1), A vertex at (0, 0, 0, 0), A ray in the direction (4, -2, -1, 0), A ray in the direction (4, -1, -2, 0), A ray in the direction (4, 1, 2, 0), A ray in the direction (4, 2, 1, 0), A ray in the direction (5, -2, -2, 0), A ray in the direction (4, 2, -1, 0), A ray in the direction (5, 2, 2, 0), A ray in the direction (4, 1, -2, 0), A ray in the direction (4, -1, 2, 0), A ray in the direction (5, 2, -2, 0), A ray in the direction (5, -2, 2, 0), A ray in the direction (4, -2, 1, 0))