aboutsummaryrefslogtreecommitdiff
path: root/src/algebra
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra')
-rw-r--r--src/algebra/array1.spad.pamphlet3
-rw-r--r--src/algebra/array2.spad.pamphlet2
-rw-r--r--src/algebra/bags.spad.pamphlet2
-rw-r--r--src/algebra/list.spad.pamphlet6
-rw-r--r--src/algebra/lmdict.spad.pamphlet34
-rw-r--r--src/algebra/mset.spad.pamphlet6
-rw-r--r--src/algebra/polset.spad.pamphlet4
-rw-r--r--src/algebra/regset.spad.pamphlet2
-rw-r--r--src/algebra/sets.spad.pamphlet6
-rw-r--r--src/algebra/sregset.spad.pamphlet2
-rw-r--r--src/algebra/string.spad.pamphlet2
-rw-r--r--src/algebra/tree.spad.pamphlet5
-rw-r--r--src/algebra/triset.spad.pamphlet2
-rw-r--r--src/algebra/vector.spad.pamphlet4
14 files changed, 36 insertions, 44 deletions
diff --git a/src/algebra/array1.spad.pamphlet b/src/algebra/array1.spad.pamphlet
index b941d84e..a36f682a 100644
--- a/src/algebra/array1.spad.pamphlet
+++ b/src/algebra/array1.spad.pamphlet
@@ -39,8 +39,7 @@ PrimitiveArray(S:Type): OneDimensionalArrayAggregate S == add
fill!(x, s) == %vfill(x,s)
copy x == %vcopy x
maxIndex x == #x - %icst1
- parts x == %array2list x
- members x == parts x
+ members x == %array2list x
@
diff --git a/src/algebra/array2.spad.pamphlet b/src/algebra/array2.spad.pamphlet
index 4828c081..6a7330dc 100644
--- a/src/algebra/array2.spad.pamphlet
+++ b/src/algebra/array2.spad.pamphlet
@@ -128,7 +128,7 @@ TwoDimensionalArrayCategory(R,Row,Col): Category == Definition where
if f(qelt(m,i,j)) then num := num + 1
num
- parts m ==
+ members m ==
entryList : List R := nil()
for i in maxRowIndex(m)..minRowIndex(m) by -1 repeat
for j in maxColIndex(m)..minColIndex(m) by -1 repeat
diff --git a/src/algebra/bags.spad.pamphlet b/src/algebra/bags.spad.pamphlet
index 38c5ab33..a3f222f0 100644
--- a/src/algebra/bags.spad.pamphlet
+++ b/src/algebra/bags.spad.pamphlet
@@ -42,7 +42,7 @@ Stack(S: Type): StackAggregate S with
s = t ==
deref s = deref t
- parts s == -- from HOAGG
+ members s == -- from HOAGG
deref s
map(f: S -> S, s: %) == -- from HOAGG
diff --git a/src/algebra/list.spad.pamphlet b/src/algebra/list.spad.pamphlet
index 78cb7133..6ceb30fa 100644
--- a/src/algebra/list.spad.pamphlet
+++ b/src/algebra/list.spad.pamphlet
@@ -21,7 +21,7 @@ import ListAggregate
++ Basic Operations:
++ \#, append, concat, concat!, cons, construct, copy, elt, elt,
++ empty, empty?, eq?, first, member?, merge!, mergeSort, minIndex,
-++ nil, null, parts, removeDuplicates!, rest, rest, reverse,
+++ nil, null, removeDuplicates!, rest, rest, reverse,
++ reverse!, setDifference, setIntersection, setUnion, setelt,
++ setfirst!, setrest!, sort!, split!
++ Related Constructors: ListFunctions2, ListFunctions3, ListToMap
@@ -110,7 +110,7 @@ List(S:Type): Exports == Implementation where
%store(%tail x,y)$Foreign(Builtin)
%tail x
construct l == l
- parts s == s
+ members s == s
reverse! x == %lreverse! x
reverse x == %lreverse x
minIndex x == %icst1
@@ -474,7 +474,7 @@ AssociationList(Key:SetCategory, Entry:SetCategory):
empty() == dictionary()
empty? t == empty? deref t
entries(t:%):List(Pair) == deref t
- parts(t:%):List(Pair) == deref t
+ members(t:%):List(Pair) == deref t
keys t == [k.key for k in deref t]
# t == # deref t
first(t:%):Pair == first deref t
diff --git a/src/algebra/lmdict.spad.pamphlet b/src/algebra/lmdict.spad.pamphlet
index 0b1e3ee3..a339b019 100644
--- a/src/algebra/lmdict.spad.pamphlet
+++ b/src/algebra/lmdict.spad.pamphlet
@@ -47,11 +47,11 @@ ListMultiDictionary(S:SetCategory): Join(MultiDictionary S,FiniteAggregate S) wi
sub: (S, S, S) -> S
coerce(s:%):OutputForm ==
- prefix("dictionary"::OutputForm, [x::OutputForm for x in parts s])
+ prefix("dictionary"::OutputForm, [x::OutputForm for x in members s])
- #s == # parts s
- copy s == dictionary copy parts s
- empty? s == empty? parts s
+ #s == # members s
+ copy s == dictionary copy members s
+ empty? s == empty? members s
bag l == dictionary l
dictionary() == dictionary empty()
@@ -66,28 +66,28 @@ ListMultiDictionary(S:SetCategory): Join(MultiDictionary S,FiniteAggregate S) wi
if S has ConvertibleTo InputForm then
convert(lmd:%):InputForm ==
convert [convert('dictionary)@InputForm,
- convert(parts lmd)@InputForm]
+ convert(members lmd)@InputForm]
- map(f, s) == dictionary map(f, parts s)
- map!(f, s) == dictionary map!(f, parts s)
- parts s == deref s
+ map(f, s) == dictionary map(f, members s)
+ map!(f, s) == dictionary map!(f, members s)
+ members s == deref s
sub(x, y, z) == (z = x => y; z)
insert!(x, s, n) == (for i in 1..n repeat insert!(x, s); s)
- substitute(x, y, s) == dictionary map(sub(x, y, #1), parts s)
- removeDuplicates! s == dictionary removeDuplicates! parts s
+ substitute(x, y, s) == dictionary map(sub(x, y, #1), members s)
+ removeDuplicates! s == dictionary removeDuplicates! members s
inspect s ==
empty? s => error "empty dictionary"
- first parts s
+ first members s
extract! s ==
empty? s => error "empty dictionary"
- x := first(p := parts s)
+ x := first(p := members s)
setref(s, rest p)
x
duplicates? s ==
- empty?(p := parts s) => false
+ empty?(p := members s) => false
q := rest p
while not empty? q repeat
first p = first q => return true
@@ -96,20 +96,20 @@ ListMultiDictionary(S:SetCategory): Join(MultiDictionary S,FiniteAggregate S) wi
false
remove!(p: S->Boolean, lmd:%):% ==
- for x in removeDuplicates parts lmd | p(x) repeat remove!(x,lmd)
+ for x in removeDuplicates members lmd | p(x) repeat remove!(x,lmd)
lmd
select!(p: S->Boolean, lmd:%):% == remove!(not p(#1), lmd)
duplicates(lmd:%):List D ==
ld: List D := empty()
- for x in removeDuplicates parts lmd | (n := count(x, lmd)) >
+ for x in removeDuplicates members lmd | (n := count(x, lmd)) >
1$NonNegativeInteger repeat
ld := cons([x, n], ld)
ld
if S has OrderedSet then
- s = t == parts s = parts t
+ s = t == members s = members t
remove!(x:S, s:%) ==
p := deref s
@@ -133,7 +133,7 @@ ListMultiDictionary(S:SetCategory): Join(MultiDictionary S,FiniteAggregate S) wi
s
else
- remove!(x:S, s:%) == (setref(s, remove!(x, parts s)); s)
+ remove!(x:S, s:%) == (setref(s, remove!(x, members s)); s)
s = t ==
a := copy s
diff --git a/src/algebra/mset.spad.pamphlet b/src/algebra/mset.spad.pamphlet
index 6fd60011..f11bb9a9 100644
--- a/src/algebra/mset.spad.pamphlet
+++ b/src/algebra/mset.spad.pamphlet
@@ -32,7 +32,7 @@ Multiset(S: SetCategory): Join(MultisetAggregate S,FiniteAggregate S,ShallowlyMu
++ multiset(ls) creates a multiset with elements from \spad{ls}.
unique: % -> List S
++ \spad{unique ms} returns a list of the elements of \spad{ms}
- ++ {\em without} their multiplicity. See also \spadfun{parts}.
+ ++ {\em without} their multiplicity. See also \spadfun{members}.
remove: (S,%,Integer) -> %
++ remove(x,ms,number) removes at most \spad{number} copies of
++ element x if \spad{number} is positive, all of them if
@@ -97,7 +97,7 @@ Multiset(S: SetCategory): Join(MultisetAggregate S,FiniteAggregate S,ShallowlyMu
if S has ConvertibleTo InputForm then
convert(ms:%):InputForm ==
convert [convert('multiset)@InputForm,
- convert(parts ms)@InputForm]
+ convert(members ms)@InputForm]
unique(ms:%):List S == keys ms.table
@@ -219,7 +219,7 @@ Multiset(S: SetCategory): Join(MultisetAggregate S,FiniteAggregate S,ShallowlyMu
map(f: S -> S, ms:%):% == map!(f, copy ms) -- HomogeneousAggregate
- parts(m:%):List S ==
+ members(m:%):List S ==
l := empty()$List(S)
t := m.table
for e in keys t repeat
diff --git a/src/algebra/polset.spad.pamphlet b/src/algebra/polset.spad.pamphlet
index 5f20c1c8..74d4383c 100644
--- a/src/algebra/polset.spad.pamphlet
+++ b/src/algebra/polset.spad.pamphlet
@@ -395,7 +395,7 @@ GeneralPolynomialSet(R,E,VarSet,P) : Exports == Implementation where
empty() ==
[]
- parts ps ==
+ members ps ==
ps pretend LP
map (f : PtoP, ps : $) : $ ==
@@ -408,7 +408,7 @@ GeneralPolynomialSet(R,E,VarSet,P) : Exports == Implementation where
member?(p,members(ps))$LP
ps1 = ps2 ==
- {p for p in parts(ps1)} =$(Set P) {p for p in parts(ps2)}
+ {p for p in members(ps1)} =$(Set P) {p for p in members(ps2)}
coerce(ps:$) : OutputForm ==
lp : List(P) := sort(infRittWu?,members(ps))$(List P)
diff --git a/src/algebra/regset.spad.pamphlet b/src/algebra/regset.spad.pamphlet
index 7247474b..7dab81ad 100644
--- a/src/algebra/regset.spad.pamphlet
+++ b/src/algebra/regset.spad.pamphlet
@@ -1437,8 +1437,6 @@ RegularTriangularSet(R,E,V,P) : Exports == Implementation where
per([])
empty?(ts:$) ==
empty?(rep(ts))
- parts ts ==
- rep(ts)
members ts ==
rep(ts)
map (f : PtoP, ts : $) : $ ==
diff --git a/src/algebra/sets.spad.pamphlet b/src/algebra/sets.spad.pamphlet
index 6e57f8e4..e467aa7b 100644
--- a/src/algebra/sets.spad.pamphlet
+++ b/src/algebra/sets.spad.pamphlet
@@ -30,7 +30,7 @@
++ a set and the usual operations such as union and intersection are available
++ to form new sets.
++ In our implementation, \Language{} maintains the entries in
-++ sorted order. Specifically, the parts function returns the entries
+++ sorted order. Specifically, the members function returns the entries
++ as a list in ascending order and
++ the extract operation returns the maximum entry.
++ Given two sets s and t where \spad{#s = m} and \spad{#t = n},
@@ -47,7 +47,7 @@ Set(S:SetCategory): FiniteSetAggregate S == add
set() == empty()
empty() == empty()$Rep
copy s == copy(s)$Rep
- parts s == parts(s)$Rep
+ members s == members(s)$Rep
inspect s == (empty? s => error "Empty set"; s(maxIndex s))
extract! s ==
@@ -72,7 +72,7 @@ Set(S:SetCategory): FiniteSetAggregate S == add
if S has ConvertibleTo InputForm then
convert(x:%):InputForm ==
convert [convert('set)@InputForm,
- convert(parts x)@InputForm]
+ convert(members x)@InputForm]
if S has OrderedSet then
s = t == s =$Rep t
diff --git a/src/algebra/sregset.spad.pamphlet b/src/algebra/sregset.spad.pamphlet
index 472c3f47..5c2571bd 100644
--- a/src/algebra/sregset.spad.pamphlet
+++ b/src/algebra/sregset.spad.pamphlet
@@ -1228,8 +1228,6 @@ SquareFreeRegularTriangularSet(R,E,V,P) : Exports == Implementation where
per([])
empty?(ts:$) ==
empty?(rep(ts))
- parts ts ==
- rep(ts)
members ts ==
rep(ts)
map (f : PtoP, ts : $) : $ ==
diff --git a/src/algebra/string.spad.pamphlet b/src/algebra/string.spad.pamphlet
index cdd1d97d..78bb6628 100644
--- a/src/algebra/string.spad.pamphlet
+++ b/src/algebra/string.spad.pamphlet
@@ -268,7 +268,7 @@ CharacterClass: Join(SetCategory, ConvertibleTo String,
for i in 0..%idec N | a.i repeat temp(ord f char i) := true
copyInto!(a, temp, 0)
- parts a ==
+ members a ==
[char i for i in 0..%idec N | a.i]
@
diff --git a/src/algebra/tree.spad.pamphlet b/src/algebra/tree.spad.pamphlet
index d3c10e91..3d5e19da 100644
--- a/src/algebra/tree.spad.pamphlet
+++ b/src/algebra/tree.spad.pamphlet
@@ -128,10 +128,9 @@ Tree(S: SetCategory): T==C where
member?(n, t) ==
t case empty => false
n = value t or "or"/[member?(n, c) for c in children t]
- members t == parts t
- parts t == --buggy?
+ members t == --buggy?
t case empty => empty()
- u := [parts c for c in children t]
+ u := [members c for c in children t]
u = empty() => [value t]
cons(value t,"append"/u)
diff --git a/src/algebra/triset.spad.pamphlet b/src/algebra/triset.spad.pamphlet
index 63913bab..8f821470 100644
--- a/src/algebra/triset.spad.pamphlet
+++ b/src/algebra/triset.spad.pamphlet
@@ -538,8 +538,6 @@ GeneralTriangularSet(R,E,V,P) : Exports == Implementation where
per([])
empty?(ts:$) ==
empty?(rep(ts))
- parts ts ==
- rep(ts)
members ts ==
rep(ts)
map (f : PtoP, ts : $) : $ ==
diff --git a/src/algebra/vector.spad.pamphlet b/src/algebra/vector.spad.pamphlet
index fafce6ca..ea83ba12 100644
--- a/src/algebra/vector.spad.pamphlet
+++ b/src/algebra/vector.spad.pamphlet
@@ -135,7 +135,7 @@ Vector(R:Type): Exports == Implementation where
if R has ConvertibleTo InputForm then
convert(x:%):InputForm ==
convert [convert('vector)@InputForm,
- convert(parts x)@InputForm]
+ convert(members x)@InputForm]
@
@@ -305,7 +305,7 @@ DirectProduct(dim:NonNegativeInteger, R:Type):
coerce(z:%):Vector(R) == copy rep z
coerce(r:R):% == per new(dim, r)$Vector(R)
- parts x == VEC2LIST(x)$Lisp
+ members x == VEC2LIST(x)$Lisp
directProduct z ==
#z = dim => per copy z