# HG changeset patch
# User William Stein <wstein@gmail.com>
# Date 1203069116 28800
# Node ID 812520431ceee4cbe9774212548c01961b364fb8
# Parent ad5d8bd802bc4a04661f55bf699bb9f3fefd197d
Add some documentation.
diff r ad5d8bd802bc r 812520431cee magma/sage/basic.m
a

b

end function; 
6  6  end function; 
7  7  
8  8  intrinsic Sage(X::.) > MonStgElt 
9   {} 
 9  {Default way to convert a Magma object to Sage if we haven't 
 10  written anything better.} 
10  11  return Sprintf("%o", X), true; 
11  12  end intrinsic; 
12  13  
13  14  intrinsic Sage(X::SetEnum) > MonStgElt 
14   {} 
 15  {Convert an enumerated set to Sage.} 
15  16  Y := [Sage(z) : z in X]; 
16  17  return Sprintf("Set(%o)", Y), true; 
17  18  end intrinsic; 
18  19  
19  20  intrinsic Sage(X::SetIndx) > MonStgElt 
20   {WARNING: Sage does not have an analogue of indexed sets.} 
21   Y := [z : z in X]; 
 21  {Convert an indexed set to Sage. 
 22  WARNING: Sage does not have an analogue of indexed sets (yet!), 
 23  so we just return a Python list.} 
 24  Y := [Sage(z) : z in X]; 
22  25  return Sprintf("%o", Y), true; 
23  26  end intrinsic; 
24  27  
25  28  intrinsic Sage(X::SetMulti) > MonStgElt, BoolElt 
26   {WARNING: Sage does not have an analogue of multisets.} 
27   Y := [z : z in X]; 
 29  {Convert a multiset to Sage. 
 30  WARNING: Sage does not have an analogue of multisets yet, so we return a Python list.} 
 31  Y := [Sage(z) : z in X]; 
28  32  return Sprintf("%o", Y), true; 
29  33  end intrinsic; 
30  34  
31  35  intrinsic Sage(X::RngInt) > MonStgElt, BoolElt 
32   {} 
 36  {Conver the ring of integers to Sage.} 
33  37  return "ZZ", false; 
34  38  end intrinsic; 
35  39  
… 
… 
intrinsic Sage(X::ModMatRngElt) > MonSt 
61  65  pp := PreparseElts(BaseRing(X)); 
62  66  return convert_matrix(X, pp), pp; 
63  67  end intrinsic; 
 68  
 69  /* Elltiptic Curve */ 