[c87cd93] | 1 | #include "cfa-pair.h"
|
---|
[87c5f40] | 2 |
|
---|
| 3 | forall(otype R, otype S
|
---|
| 4 | | { int ?==?(R, R); int ?<?(R, R); int ?<?(S, S); })
|
---|
| 5 | int ?<?(pair(R, S) p, pair(R, S) q) {
|
---|
| 6 | return p.first < q.first || ( p.first == q.first && p.second < q.second );
|
---|
| 7 | }
|
---|
| 8 |
|
---|
| 9 | forall(otype R, otype S
|
---|
| 10 | | { int ?==?(R, R); int ?<?(R, R); int ?<=?(S, S); })
|
---|
| 11 | int ?<=?(pair(R, S) p, pair(R, S) q) {
|
---|
| 12 | return p.first < q.first || ( p.first == q.first && p.second <= q.second );
|
---|
| 13 | }
|
---|
| 14 |
|
---|
| 15 | forall(otype R, otype S | { int ?==?(R, R); int ?==?(S, S); })
|
---|
| 16 | int ?==?(pair(R, S) p, pair(R, S) q) {
|
---|
| 17 | return p.first == q.first && p.second == q.second;
|
---|
| 18 | }
|
---|
| 19 |
|
---|
| 20 | forall(otype R, otype S | { int ?!=?(R, R); int ?!=?(S, S); })
|
---|
| 21 | int ?!=?(pair(R, S) p, pair(R, S) q) {
|
---|
| 22 | return p.first != q.first || p.second != q.second;
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | forall(otype R, otype S
|
---|
| 26 | | { int ?==?(R, R); int ?>?(R, R); int ?>?(S, S); })
|
---|
| 27 | int ?>?(pair(R, S) p, pair(R, S) q) {
|
---|
| 28 | return p.first > q.first || ( p.first == q.first && p.second > q.second );
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | forall(otype R, otype S
|
---|
| 32 | | { int ?==?(R, R); int ?>?(R, R); int ?>=?(S, S); })
|
---|
| 33 | int ?>=?(pair(R, S) p, pair(R, S) q) {
|
---|
| 34 | return p.first > q.first || ( p.first == q.first && p.second >= q.second );
|
---|
| 35 | }
|
---|