# Revision history [back]

Actually, you must declare the first quadrant as

M = R2.open_subset('M', coord_def={c_xy: [x>0, y>0]})


Then the output of your test is correct, i.e. it is False False False True.

Of course the syntax you used, i.e. x>0 and y>0, is more user friendly, and we should definitively implement it! For the time being, coordinate conditions passed as a list are combined with and, while those passed as a tuple are combined with or. For instance [x>0, (y>2, y<-2)] stands for x>0 and (y>2 or y<-2). This is documented in the function add_restrictions on http://sagemanifolds.obspm.fr/doc/reference/manifolds/sage/manifolds/chart.html

Actually, you must declare the first quadrant as

M = R2.open_subset('M', coord_def={c_xy: [x>0, y>0]})


Then the output of your test is correct, i.e. it is False False False True.

Of course the syntax you used, i.e. x>0 and y>0, is more user friendly, and we should definitively implement it! For the time being, coordinate conditions passed as a list are combined with and, while those passed as a tuple are combined with or. For instance [x>0, (y>2, y<-2)] stands for x>0 and (y>2 or y<-2). This is documented in the function add_restrictions on http://sagemanifolds.obspm.fr/doc/reference/manifolds/sage/manifolds/chart.htmlhttp://sagemanifolds.obspm.fr/doc/reference/manifolds/sage/manifolds/chart.html, but not in the function open_subset, as it should; sorry for the inconvenience.