aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/tree.spad.pamphlet
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2011-03-12 19:17:32 +0000
committerdos-reis <gdr@axiomatics.org>2011-03-12 19:17:32 +0000
commitc93e84048964194e5674e859d6bd8827010f09f6 (patch)
tree407ca23d232bf3f974550fce0175c49495ef49c0 /src/algebra/tree.spad.pamphlet
parent52fddea19454dc2b9bcb54c6edd5a4cd4f5765a9 (diff)
downloadopen-axiom-c93e84048964194e5674e859d6bd8827010f09f6.tar.gz
* src/algebra/: Systematically use negative? when comparing for
greater than 0.
Diffstat (limited to 'src/algebra/tree.spad.pamphlet')
-rw-r--r--src/algebra/tree.spad.pamphlet4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/algebra/tree.spad.pamphlet b/src/algebra/tree.spad.pamphlet
index a4249665..9dbae5b9 100644
--- a/src/algebra/tree.spad.pamphlet
+++ b/src/algebra/tree.spad.pamphlet
@@ -103,7 +103,7 @@ Tree(S: SetCategory): T==C where
t1 = t2 => 0
t2 case empty => -1
u := [n for t in children t2 | (n := distance1(t1,t)) >= 0]
- #u > 0 => 1 + "min"/u
+ positive?(#u) => 1 + "min"/u
-1
distance(t1,t2) ==
n := distance1(t1, t2)
@@ -199,7 +199,7 @@ Tree(S: SetCategory): T==C where
multipleOverbar((".")::OutputForm,eqMemberIndex(t, pl,0),pl)
empty? children t => value t::OutputForm
nodeForm := (value t)::OutputForm
- if (k := eqMemberIndex(t, pl, 0)) > 0 then
+ if positive?(k := eqMemberIndex(t, pl, 0)) then
nodeForm := multipleOverbar(nodeForm, k, pl)
prefix(nodeForm,
[coerce1(br,cons(t,parents),pl) for br in children t])