Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

""" 

Quartic curve constructor 

""" 

from __future__ import absolute_import 

 

#***************************************************************************** 

# Copyright (C) 2006 David Kohel <kohel@maths.usyd.edu> 

# Distributed under the terms of the GNU General Public License (GPL) 

# http://www.gnu.org/licenses/ 

#***************************************************************************** 

 

from sage.schemes.projective.projective_space import is_ProjectiveSpace, ProjectiveSpace 

from sage.rings.polynomial.multi_polynomial_element import is_MPolynomial 

 

from .quartic_generic import QuarticCurve_generic 

 

def QuarticCurve(F, PP=None, check=False): 

""" 

Returns the quartic curve defined by the polynomial F. 

 

INPUT: 

 

- F -- a polynomial in three variables, homogeneous of degree 4 

 

- PP -- a projective plane (default:None) 

 

- check -- whether to check for smoothness or not (default:False) 

 

EXAMPLES:: 

 

sage: x,y,z=PolynomialRing(QQ,['x','y','z']).gens() 

sage: QuarticCurve(x**4+y**4+z**4) 

Quartic Curve over Rational Field defined by x^4 + y^4 + z^4 

 

TESTS:: 

 

sage: QuarticCurve(x**3+y**3) 

Traceback (most recent call last): 

... 

ValueError: Argument F (=x^3 + y^3) must be a homogeneous polynomial of degree 4 

 

sage: QuarticCurve(x**4+y**4+z**3) 

Traceback (most recent call last): 

... 

ValueError: Argument F (=x^4 + y^4 + z^3) must be a homogeneous polynomial of degree 4 

 

sage: x,y=PolynomialRing(QQ,['x','y']).gens() 

sage: QuarticCurve(x**4+y**4) 

Traceback (most recent call last): 

... 

ValueError: Argument F (=x^4 + y^4) must be a polynomial in 3 variables 

 

""" 

if not is_MPolynomial(F): 

raise ValueError("Argument F (=%s) must be a multivariate polynomial"%F) 

P = F.parent() 

if not P.ngens() == 3: 

raise ValueError("Argument F (=%s) must be a polynomial in 3 variables"%F) 

if not(F.is_homogeneous() and F.degree()==4): 

raise ValueError("Argument F (=%s) must be a homogeneous polynomial of degree 4"%F) 

 

if not PP is None: 

if not is_ProjectiveSpace(PP) and PP.dimension == 2: 

raise ValueError("Argument PP (=%s) must be a projective plane"%PP) 

else: 

PP = ProjectiveSpace(P) 

 

if check: 

raise NotImplementedError("Argument checking (for nonsingularity) is not implemented.") 

 

return QuarticCurve_generic(PP, F)