aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/seg.spad.pamphlet
diff options
context:
space:
mode:
Diffstat (limited to 'src/algebra/seg.spad.pamphlet')
-rw-r--r--src/algebra/seg.spad.pamphlet14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/algebra/seg.spad.pamphlet b/src/algebra/seg.spad.pamphlet
index c0795e9e..7bd81dcd 100644
--- a/src/algebra/seg.spad.pamphlet
+++ b/src/algebra/seg.spad.pamphlet
@@ -139,7 +139,7 @@ Segment(S:Type): SegmentCategory(S) with
s1.low = s2.low and s1.high=s2.high and s1.incr = s2.incr
coerce(s:%):OutputForm ==
- seg := SEGMENT(s.low::OutputForm, s.high::OutputForm)
+ seg := s.low::OutputForm..s.high::OutputForm
s.incr = 1 => seg
infix(" by "::OutputForm, seg, s.incr::OutputForm)
@@ -217,7 +217,7 @@ SegmentFunctions2(R:Type, S:Type): public == private where
private ==> add
map(f : R->S, r : Segment R): Segment S ==
- SEGMENT(f lo r,f hi r)$Segment(S)
+ (f(lo r)..f(hi r))$Segment(S)
if R has OrderedRing then
map(f : R->S, r : Segment R): List S ==
@@ -412,8 +412,8 @@ UniversalSegment(S: Type): SegmentCategory(S) with
s case Rec2 => (s :: Rec2).incr
(s :: Rec).incr
- SEGMENT(a) == segment a
- SEGMENT(a,b) == segment(a,b)
+ a.. == segment a
+ a..b == segment(a,b)
coerce(sg : SEG): % == segment(lo sg, hi sg)
@@ -435,8 +435,8 @@ UniversalSegment(S: Type): SegmentCategory(S) with
coerce(s: %): OutputForm ==
seg :=
e := (lo s)::OutputForm
- hasHi s => SEGMENT(e, (hi s)::OutputForm)
- SEGMENT e
+ hasHi s => e..(hi s)::OutputForm
+ e..
inc := incr s
inc = 1 => seg
infix(" by "::OutputForm, seg, inc::OutputForm)
@@ -455,7 +455,7 @@ UniversalSegment(S: Type): SegmentCategory(S) with
while not null ls and hasHi first ls repeat
s := first ls
ls := rest ls
- ns := BY(SEGMENT(lo s, hi s), incr s)$Segment(S)
+ ns := BY(lo(s)..hi(s), incr s)$Segment(S)
lb := concat!(lb,ns)
if not null ls then
s := first ls