/usr/share/axiom-20170501/src/algebra/FRMOD.spad is in axiom-source 20170501-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | )abbrev domain FRMOD FramedModule
++ Author: Manuel Bronstein
++ Date Created: 27 Jan 1989
++ Date Last Updated: 24 Jul 1990
++ Description:
++ Module representation of fractional ideals.
FramedModule(R, F, UP, A, ibasis) : SIG == CODE where
R : EuclideanDomain
F : QuotientFieldCategory R
UP : UnivariatePolynomialCategory F
A : FramedAlgebra(F, UP)
ibasis : Vector A
VR ==> Vector R
VF ==> Vector F
VA ==> Vector A
M ==> Matrix F
SIG ==> Monoid with
basis : % -> VA
++ basis((f1,...,fn)) = the vector \spad{[f1,...,fn]}.
norm : % -> F
++ norm(f) returns the norm of the module f.
module : VA -> %
++ module([f1,...,fn]) = the module generated by \spad{(f1,...,fn)}
++ over R.
if A has RetractableTo F then
module : FractionalIdeal(R, F, UP, A) -> %
++ module(I) returns I viewed has a module over R.
CODE ==> add
import MatrixCommonDenominator(R, F)
import ModularHermitianRowReduction(R)
Rep := VA
iflag?:Reference(Boolean) := ref true
wflag?:Reference(Boolean) := ref true
imat := new(#ibasis, #ibasis, 0)$M
wmat := new(#ibasis, #ibasis, 0)$M
rowdiv : (VR, R) -> VF
vectProd : (VA, VA) -> VA
wmatrix : VA -> M
W2A : VF -> A
intmat : () -> M
invintmat : () -> M
getintmat : () -> Boolean
getinvintmat: () -> Boolean
1 == ibasis
module(v:VA) == v
basis m == m pretend VA
rowdiv(r, f) == [r.i / f for i in minIndex r..maxIndex r]
coerce(m:%):OutputForm == coerce(basis m)$VA
W2A v == represents(v * intmat())
wmatrix v == coordinates(v) * invintmat()
getinvintmat() ==
m := inverse(intmat())::M
for i in minRowIndex m .. maxRowIndex m repeat
for j in minColIndex m .. maxColIndex m repeat
imat(i, j) := qelt(m, i, j)
false
getintmat() ==
m := coordinates ibasis
for i in minRowIndex m .. maxRowIndex m repeat
for j in minColIndex m .. maxColIndex m repeat
wmat(i, j) := qelt(m, i, j)
false
invintmat() ==
if iflag?() then iflag?() := getinvintmat()
imat
intmat() ==
if wflag?() then wflag?() := getintmat()
wmat
vectProd(v1, v2) ==
k := minIndex(v := new(#v1 * #v2, 0)$VA)
for i in minIndex v1 .. maxIndex v1 repeat
for j in minIndex v2 .. maxIndex v2 repeat
qsetelt_!(v, k, qelt(v1, i) * qelt(v2, j))
k := k + 1
v pretend VA
norm m ==
#(basis m) ^= #ibasis => error "Module not of rank n"
determinant(coordinates(basis m) * invintmat())
m1 * m2 ==
m := rowEch((cd := splitDenominator wmatrix(
vectProd(basis m1, basis m2))).num)
module [u for i in minRowIndex m .. maxRowIndex m |
(u := W2A rowdiv(row(m, i), cd.den)) ^= 0]$VA
if A has RetractableTo F then
module(i:FractionalIdeal(R, F, UP, A)) ==
module(basis i) * module(ibasis)
|