Skip to content

Commit 677d3d4

Browse files
committed
Avoid name clashes with Sum and Product.
Fixes Github issue #62 #62 [Refactor]
1 parent 23fbb1f commit 677d3d4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

modules/FiniteSetsExt.tla

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ FoldSet(op(_,_), base, set) ==
1313
(*************************************************************************)
1414
MapThenFoldSet(op, base, LAMBDA x : x, LAMBDA s : CHOOSE x \in s : TRUE, set)
1515

16-
Sum(set) ==
16+
SumSet(set) ==
1717
(*************************************************************************)
1818
(* Calculate the sum of the elements in set. *)
1919
(* *)
@@ -22,7 +22,7 @@ Sum(set) ==
2222
(*************************************************************************)
2323
FoldSet(+, 0, set)
2424

25-
Product(set) ==
25+
ProductSet(set) ==
2626
(*************************************************************************)
2727
(* Calculuate the product of the elements in set. *)
2828
(* *)

tests/FiniteSetsExtTests.tla

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ ASSUME SymDiff({1,2,3}, {2,3,4}) = {1,4}
119119
ASSUME SymDiff({1,2,3}, {2,3}) = {1}
120120
ASSUME SymDiff({2,3}, {2,3,4}) = {4}
121121

122-
ASSUME Sum(1..3) = 6
123-
ASSUME Product(1..4) = 24
122+
ASSUME SumSet(1..3) = 6
123+
ASSUME ProductSet(1..4) = 24
124124

125125
-----------------------------------------------------------------------------
126126

0 commit comments

Comments
 (0)