| [604e76d] | 1 | #include "cfa-pair.h"
 | 
|---|
| [c9b3a41] | 2 | #include "fstream"
 | 
|---|
| [604e76d] | 3 | 
 | 
|---|
| [000ff2c] | 4 | forall(otype R, otype S
 | 
|---|
| [604e76d] | 5 |         | { int ?==?(R, R); int ?<?(R, R); int ?<?(S, S); })
 | 
|---|
 | 6 | int ?<?(pair(R, S) p, pair(R, S) q) {
 | 
|---|
 | 7 |         return p.first < q.first || ( p.first == q.first && p.second < q.second );
 | 
|---|
 | 8 | }
 | 
|---|
 | 9 | 
 | 
|---|
| [000ff2c] | 10 | forall(otype R, otype S
 | 
|---|
| [604e76d] | 11 |         | { int ?==?(R, R); int ?<?(R, R); int ?<=?(S, S); })
 | 
|---|
 | 12 | int ?<=?(pair(R, S) p, pair(R, S) q) {
 | 
|---|
 | 13 |         return p.first < q.first || ( p.first == q.first && p.second <= q.second );
 | 
|---|
 | 14 | }
 | 
|---|
 | 15 | 
 | 
|---|
 | 16 | forall(otype R, otype S | { int ?==?(R, R); int ?==?(S, S); })
 | 
|---|
 | 17 | int ?==?(pair(R, S) p, pair(R, S) q) {
 | 
|---|
 | 18 |         return p.first == q.first && p.second == q.second;
 | 
|---|
 | 19 | }
 | 
|---|
 | 20 | 
 | 
|---|
 | 21 | forall(otype R, otype S | { int ?!=?(R, R); int ?!=?(S, S); })
 | 
|---|
 | 22 | int ?!=?(pair(R, S) p, pair(R, S) q) {
 | 
|---|
 | 23 |         return p.first != q.first || p.second != q.second;
 | 
|---|
 | 24 | }
 | 
|---|
 | 25 | 
 | 
|---|
| [000ff2c] | 26 | forall(otype R, otype S
 | 
|---|
| [604e76d] | 27 |         | { int ?==?(R, R); int ?>?(R, R); int ?>?(S, S); })
 | 
|---|
 | 28 | int ?>?(pair(R, S) p, pair(R, S) q) {
 | 
|---|
 | 29 |         return p.first > q.first || ( p.first == q.first && p.second > q.second );
 | 
|---|
 | 30 | }
 | 
|---|
 | 31 | 
 | 
|---|
| [000ff2c] | 32 | forall(otype R, otype S
 | 
|---|
| [604e76d] | 33 |         | { int ?==?(R, R); int ?>?(R, R); int ?>=?(S, S); })
 | 
|---|
 | 34 | int ?>=?(pair(R, S) p, pair(R, S) q) {
 | 
|---|
 | 35 |         return p.first > q.first || ( p.first == q.first && p.second >= q.second );
 | 
|---|
 | 36 | }
 | 
|---|
| [c9b3a41] | 37 | 
 | 
|---|
| [79d4186] | 38 | // forall(otype R, otype S)
 | 
|---|
 | 39 | // forall(dtype ostype | ostream( ostype ) | { ostype & ?|?( ostype &, R ); ostype & ?|?( ostype &, S );  })
 | 
|---|
 | 40 | // ostype & ?|?( ostype & os, pair(R, S) p ) {
 | 
|---|
 | 41 | //      return os | '[' | p.first | ',' | p.second | ']';
 | 
|---|
 | 42 | // } // ?|?
 | 
|---|