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

""" 

Scheme obtained by gluing two other schemes 

""" 

from __future__ import absolute_import 

 

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

# Copyright (C) 2006 William Stein 

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

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

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

 

from . import morphism 

from . import scheme 

 

class GluedScheme(scheme.Scheme): 

r""" 

INPUT: 

 

 

- ``f`` - open immersion from a scheme U to a scheme 

X 

 

- ``g`` - open immersion from U to a scheme Y 

 

 

OUTPUT: The scheme obtained by gluing X and Y along the open set 

U. 

 

.. note:: 

 

Checking that `f` and `g` are open 

immersions is not implemented. 

""" 

def __init__(self, f, g, check=True): 

if check: 

if not morphism.is_SchemeMorphism(f): 

raise TypeError("f (=%s) must be a scheme morphism"%f) 

if not morphism.is_SchemeMorphism(g): 

raise TypeError("g (=%s) must be a scheme morphism"%g) 

if f.domain() != g.domain(): 

raise ValueError("f (=%s) and g (=%s) must have the same domain"%(f,g)) 

self.__f = f 

self.__g = g 

 

def gluing_maps(self): 

return self.__f, self.__g 

 

def _repr_(self): 

return "Scheme obtained by gluing X and Y along U, where\n X: %s\n Y: %s\n U: %s"%( 

self.__f.codomain(), self.__g.codomain(), self.__f.domain())