Am 31.05.2016 um 19:46 schrieb Martin Baker:
> On 31/05/16 16:51, Kurt Pagani wrote:
>> Hallo Martin
>>
>> I'm not aware of any examples/tutorials of
>>
http://fricas.github.io/api/SmithNormalForm.html, but it looks pretty
>> straightforward.
>
> Well I'm not even sure what to use for the package type parameters:
> R: EuclideanDomain
> Row: FiniteLinearAggregate R
> Col: FiniteLinearAggregate R
> M: MatrixCategory(R, Row, Col)
For instance the example in
https://en.wikipedia.org/wiki/Smith_normal_form:
FriCAS Computer Algebra System
Version: FriCAS 1.2.7
Timestamp: Sat Mar 26 17:23:40 GMT 2016
-----------------------------------------------------------------------------
Issue )copyright to view copyright notices.
Issue )summary for a summary of useful system commands.
Issue )quit to leave FriCAS and return to shell.
-----------------------------------------------------------------------------
">>> .axiom.input"
Type:
Void
(2) -> A:=matrix [[2,4,4],[-6,6,12],[10,-4,-16]]
+ 2 4 4 +
| |
(2) |- 6 6 12 |
| |
+10 - 4 - 16+
Type:
Matrix(Integer)
(3) -> smith A
+2 0 0 +
| |
(3) |0 6 0 |
| |
+0 0 12+
Type:
Matrix(Integer)
(4) -> R==>Integer
Type:
Void
(5) -> Row==>Vector R
Type:
Void
(6) -> Col==>Vector R
Type:
Void
(7) -> M==>Matrix R
Type:
Void
(8) -> SMNF==>SmithNormalForm(R, Row, Col, M)
Type:
Void
(9) -> SMNF
(9)
SmithNormalForm(Integer,Vector(Integer),Vector(Integer),Matrix(Integer))
Type:
Type
(10) -> smith(A)$SMNF
+2 0 0 +
| |
(10) |0 6 0 |
| |
+0 0 12+
Type:
Matrix(Integer)
(11) -> completeSmith(A)$SMNF
(11)
+2 0 0 + + 1 0 0 + +1 - 2 - 2+
| | | | | |
[Smith= |0 6 0 |,leftEqMat= |- 1 3 2 |,rightEqMat= |0 1 0 |]
| | | | | |
+0 0 12+ + 3 - 4 - 3+ +0 0 1 +
Type: Record(Smith: Matrix(Integer),leftEqMat:
Matrix(Integer),rightEqMat: Matri
x(Integer))
etc.
>
> At the moment Id be happy to limit the code to homology over Z (Integer).
>
> and I'm not fully upto speed on the theory either.
>
>> See e.g. here for a GAP impl:
>>
http://ljk.imag.fr/membres/Jean-Guillaume.Dumas/Publications/DHSW.pdf
>
> This looks very interesting, perhaps at this stage I should do some more
> reading before taking up more of your time.
Not at all.
>
>> Of course, it were nice if you'd consider to share you're experience
>> with SmithNormalForm ;)
>
> Happy to pass on anything I find out (when you decide on preferred format).
>
Well, my favourite is Sphinx :)
> How will such documentation (basic tutorial and use cases) get into
> programs like
http://fricas.github.io/
>
> I quite like the idea of it being picked up from the spad file (an
> alternative form of ++ comments but more useful information). I don't
> like the mechanics of literate programming (where it requires special
> editing tools) but it is nice to have all the reference information
> together rather than having to assemble from different places. However,
> given Waldeks views, perhaps it might be better to move all
> documentation out of SPAD files into a separate system?
I'm also not a friend of too much docunentation in the source code.
However, it's a matter of taste, but I'm happy how it is.
>
> I would like a way to get html and diagrams (SVG and PNG) directly into
> the documentation (not via TEX).
Another +1 for Sphinx ;)
> Judging by past discussions on this, I don't think my views on this are
> popular, but since you and Ralf are doing good work on this I thought I
> would just state my views without trying to provoke the old disagreements.
Beware, neither do I. As said, nobody is urged to ...