-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add operators to the Relation module.
* Is[Strictly]PartiallyOrdered * Is[Stringly]TotallyOrdered * Is*Under(op(_,_), S) Signed-off-by: Markus Alexander Kuppe <[email protected]>
- Loading branch information
Showing
4 changed files
with
126 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
------------------------- MODULE RelationTests ------------------------- | ||
EXTENDS Relation, Naturals, TLC | ||
|
||
ASSUME LET T == INSTANCE TLC IN T!PrintT("RelationTests") | ||
|
||
S == {0, 1, 2, 3} | ||
|
||
ASSUME IsReflexiveUnder(=, S) | ||
ASSUME ~IsReflexiveUnder(<, S) | ||
ASSUME IsReflexiveUnder(<=, S) | ||
|
||
ASSUME ~IsIrreflexiveUnder(=, S) | ||
ASSUME IsIrreflexiveUnder(<, S) | ||
ASSUME ~IsIrreflexiveUnder(<=, S) | ||
|
||
ASSUME IsSymmetricUnder(=, S) | ||
ASSUME ~IsSymmetricUnder(<, S) | ||
ASSUME ~IsSymmetricUnder(<=, S) | ||
|
||
ASSUME LET R == [<<x,y>> \in S \X S |-> <(x,y)] | ||
T == <<0,2>> :> TRUE @@ <<2,0>> :> TRUE @@ R | ||
IN ~IsAntiSymmetric(T, S) | ||
|
||
ASSUME IsAntiSymmetricUnder(=, S) | ||
ASSUME IsAntiSymmetricUnder(<, S) | ||
ASSUME IsAntiSymmetricUnder(<=, S) | ||
|
||
ASSUME ~IsAsymmetricUnder(=, S) | ||
ASSUME IsAsymmetricUnder(<, S) | ||
ASSUME ~IsAsymmetricUnder(<=, S) | ||
|
||
ASSUME LET R == [<<x,y>> \in S \X S |-> <(x,y)] | ||
T == <<0,2>> :> FALSE @@ R | ||
IN ~IsTransitive(T, S) | ||
|
||
ASSUME IsTransitiveUnder(=, S) | ||
ASSUME IsTransitiveUnder(<, S) | ||
ASSUME IsTransitiveUnder(<=, S) | ||
|
||
ASSUME ~IsStrictlyPartiallyOrderedUnder(=, S) | ||
ASSUME IsStrictlyPartiallyOrderedUnder(<, S) | ||
ASSUME ~IsStrictlyPartiallyOrderedUnder(<=, S) | ||
|
||
ASSUME IsPartiallyOrderedUnder(=, S) | ||
ASSUME ~IsPartiallyOrderedUnder(<, S) | ||
ASSUME IsPartiallyOrderedUnder(<=, S) | ||
|
||
ASSUME ~IsStrictlyTotallyOrderedUnder(=, S) | ||
ASSUME IsStrictlyTotallyOrderedUnder(<, S) | ||
ASSUME ~IsStrictlyTotallyOrderedUnder(<=, S) | ||
|
||
ASSUME ~IsTotallyOrderedUnder(=, S) | ||
ASSUME ~IsTotallyOrderedUnder(<, S) | ||
ASSUME IsTotallyOrderedUnder(<=, S) | ||
============================================================================= |