> > BTW2: The 'Pfaffian' function starts with an
> > upper case letter. I think the convention for
> > functions is lower case, isn't it?
> 
> > A similar issue is 'mrv_limit' which is not
> > camel case.
> 
> > It's besselJ, besselY, ...
> 
> I think FriCAS should stick to the convention that types (domains,
> categories, and packages) start with an uppercase letter and functions
> with a lowercase letter and all names use camelcase.

So this convention is still up and supported. That's good, I
think is very useful. It makes it easier for beginners to
learn using the Axiom System. (It really helped me a lot.)

> So yes, I would be in favour of renaming Pfaffian to pfaffian and
> remove the "mrv_" in front of all exports from the MrvLimitPackage.

Ok, I prepared a patch.
If we all agree on this change, please apply it.

> But after all, it's a convention and for some cases there might be
> good reasons to deviate from the convention.

As usual with conventions.
But at least I don't see a good reason to deviate here.

-- 
You received this message because you are subscribed to the Google Groups 
"FriCAS - computer algebra system" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/fricas-devel?hl=en.

Index: src/algebra/matcat.spad.pamphlet
===================================================================
--- src/algebra/matcat.spad.pamphlet	(revision 1501)
+++ src/algebra/matcat.spad.pamphlet	(working copy)
@@ -280,8 +280,8 @@
        minordet : % -> R
          ++ \spad{minordet(m)} computes the determinant of the matrix m using
          ++ minors. Error: if the matrix is not square.
-       Pfaffian : % -> R
-         ++ \spad{Pfaffian(m)} returns the Pfaffian of the matrix m.
+       pfaffian : % -> R
+         ++ \spad{pfaffian(m)} returns the Pfaffian of the matrix m.
          ++ Error: if the matrix is not antisymmetric.
      if R has Field then
        inverse : % -> Union(%,"failed")
@@ -845,29 +845,29 @@
 The Pfaffian is the constant term of the \emph{Pfaffian-characteristic
   polynomial}:
 <<category MATCAT MatrixCategory>>=
-        Pfaffian A ==
+        pfaffian A ==
             if antisymmetric? A
             then if odd? nrows A
                  then 0
                  else PfChar(A).0
-            else error "Pfaffian: only defined for antisymmetric square matrices!"
+            else error "pfaffian: only defined for antisymmetric square matrices!"
 @
 
 <<TEST MATCAT>>=
-testcase "Pfaffian"
+testcase "pfaffian"
 m n == matrix [[(if i = j then 0 _
                           else if i < j _
                                then x[i, j] _
                                else -x[j, i]) for i in 1..n] for j in 1..n]
-testEquals("Pfaffian [[0,1,0,0],[-1,0,0,0],[0,0,0,1],[0,0,-1,0]]", "1")
-testEquals("Pfaffian [[0, u, v, w],[-u, 0, x, y],[-v,-x,0,z],[-w,-y,-z,0]]", _
+testEquals("pfaffian [[0,1,0,0],[-1,0,0,0],[0,0,0,1],[0,0,-1,0]]", "1")
+testEquals("pfaffian [[0, u, v, w],[-u, 0, x, y],[-v,-x,0,z],[-w,-y,-z,0]]", _
            "u*z-v*y+w*x")
-testEquals("Pfaffian m 3", "0")
-testEquals("Pfaffian [[0,0],[0,0]]", "0")
+testEquals("pfaffian m 3", "0")
+testEquals("pfaffian [[0,0],[0,0]]", "0")
 M := m 6;
-testEquals("(Pfaffian M)^2", "determinant M")
-testLibraryError "Pfaffian [[1,2],[0,0]]"
-testLibraryError "Pfaffian [[1,2,3],[0,0,0]]"
+testEquals("(pfaffian M)^2", "determinant M")
+testLibraryError "pfaffian [[1,2],[0,0]]"
+testLibraryError "pfaffian [[1,2,3],[0,0,0]]"
 
 @
 
@@ -1166,8 +1166,8 @@
       minordet : % -> R
         ++ \spad{minordet(m)} computes the determinant of the matrix m
         ++ using minors.
-      Pfaffian : % -> R
-         ++ \spad{Pfaffian(m)} returns the Pfaffian of the matrix m.
+      pfaffian : % -> R
+         ++ \spad{pfaffian(m)} returns the Pfaffian of the matrix m.
          ++ Error: if the matrix is not antisymmetric.
 
     if R has Field then
Index: src/algebra/matrix.spad.pamphlet
===================================================================
--- src/algebra/matrix.spad.pamphlet	(revision 1501)
+++ src/algebra/matrix.spad.pamphlet	(working copy)
@@ -441,7 +441,7 @@
 
       determinant x == determinant(x pretend Matrix(R))
       minordet x    == minordet(x pretend Matrix(R))
-      Pfaffian x    == Pfaffian(x pretend Matrix(R))
+      pfaffian x    == pfaffian(x pretend Matrix(R))
 
     if R has EuclideanDomain then
 

Reply via email to