/usr/share/axiom-20170501/src/algebra/AFFSP.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 | )abbrev domain AFFSP AffineSpace
++ Author: Gaetan Hache
++ Date Created: 17 nov 1992
++ Date Last Updated: May 2010 by Tim Daly
++ Description:
++ The following is all the categories and domains related to projective
++ space and part of the PAFF package
AffineSpace(dim,K) : SIG == CODE where
dim : NonNegativeInteger
K : Field
LIST ==> List
NNI ==> NonNegativeInteger
SIG ==> AffineSpaceCategory(K)
CODE ==> List(K) add
Rep:= List(K)
origin ==
new(dim,0$K)$List(K)
coerce(pt:%):OutputForm ==
dd:OutputForm:= ":" :: OutputForm
llout:List(OutputForm):=[ hconcat(dd, a::OutputForm) for a in rest pt]
lout:= cons( (first pt)::OutputForm , llout)
out:= hconcat lout
oo:=paren(out)
ee:OutputForm:= degree(pt) :: OutputForm
oo**ee
definingField(pt) ==
K has PseudoAlgebraicClosureOfPerfectFieldCategory => _
maxTower(pt@Rep)
1$K
degree(pt) ==
K has PseudoAlgebraicClosureOfPerfectFieldCategory => _
extDegree definingField pt
1
coerce(pt:%):List(K) ==
pt@Rep
affinePoint(pt:LIST(K)) ==
pt :: %
list(ptt) ==
ptt@Rep
pointValue(ptt) ==
ptt@Rep
conjugate(p,e) ==
lp:Rep:=p
pc:List(K):=[c**e for c in lp]
affinePoint(pc)
rational?(p,n) ==
p = conjugate(p,n)
rational?(p) ==
rational?(p,characteristic()$K)
removeConjugate(l) ==
removeConjugate(l,characteristic()$K)
removeConjugate(l:LIST(%),n:NNI):LIST(%) ==
if K has FiniteFieldCategory then
allconj:LIST(%):=empty()
conjrem:LIST(%):=empty()
for p in l repeat
if ^member?(p,allconj) then
conjrem:=cons(p,conjrem)
allconj:=concat(allconj,orbit(p,n))
conjrem
else
error "The field is not finite"
conjugate(p) ==
conjugate(p,characteristic()$K)
orbit(p) ==
orbit(p,characteristic()$K)
orbit(p,e)==
if K has FiniteFieldCategory then
l:LIST(%):=[p]
np:%:=conjugate(p,e)
flag:=^(np=p)::Boolean
while flag repeat
l:=concat(np,l)
np:=conjugate(np,e)
flag:=not (np=p)::Boolean
l
else
error "Cannot compute the conjugate"
aa:% = bb:% ==
aa =$Rep bb
coerce(pt:LIST(K)) ==
^(dim=#pt) => error "Le point n'a pas la bonne dimension"
ptt:%:= pt
ptt
|