Changes between Version 128 and Version 129 of IR2
- Timestamp:
- 06/11/21 09:24:29 (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
IR2
v128 v129 486 486 === `rel.cvh` === 487 487 488 The domain of `$rel<X,Y>` consists of all finite sets R of ordered pairs (x,y) such that x is in X and y is in Y.488 $rel<X,Y> is an alias for $set<$pair<X,Y>>. Therefore, in addition to the functions defined specifically for $rel<X,Y> below, the $set API may also be used with $rel. 489 489 490 490 {{{ … … 493 493 <X,Y> $set<Y> $rel_getRelated( $rel<X,Y> r, X x); // Returns a $set<Y> B such that y in B iff (x,y) in r. 494 494 <X,Y> $set<X> $rel_getRelated( $rel<X,Y> r, Y y); // Returns a $set<X> A such that x in A iff (x,y) in r. 495 <X,Y> $rel<X,Y> $rel_complement( $rel<X,Y> r ); // Returns the relation c such that (x,y) in c iff (x,y) not in r.496 495 <X,Y> $rel<Y,X> $rel_converse( $rel<X,Y> r ); // Returns the relation r' such that (y,x) in r' iff (x,y) in r. 497 496 <X> $rel<X,X> $rel_identity( $set<X> s ); // Returns the relation r such that (x,x) in r for every x in s. 498 497 <X,Y,Z> $rel<X,Z> $rel_join( $rel<X,Y> r1, $rel<Y,Z> r2 ); // Returns the relation r3 such that (x,z) in r3 iff (x,y) in r1 and (y,z) in r2 for some element y of Y. 499 <X> $rel<X,X> $rel_reflexiveClosure( $rel<X,X> r ); // Returns the reflexive closure of r.500 498 <X> $rel<X,X> $rel_transitiveClosure( $rel<X,X> r ); // Returns the transitive closure of r. 501 // Operations "Inherited" from $set502 <X,Y> $bool $rel_contains( $rel<X,Y> r, X x, Y y ); // does r contain (x,y) as member?503 <X,Y> $bool $rel_containsAll( $rel<X,Y> r1, $rel<X,Y> r2 ); // is r2 a subset of r1?504 <X,Y> $rel<X,Y> $rel_add( $rel<X,Y> r, X x, Y y ); // result of adding (x,y) to r505 <X,Y> $rel<X,Y> $rel_union( $rel<X,Y> r1, $rel<X,Y> 2 ); // union of r1 and r2506 <X,Y> $rel<X,Y> $rel_intersection( $rel<X,Y> r1, $rel<X,Y> r2 ); // intersection of r1 and r2507 <X,Y> $rel<X,Y> $rel_difference( $rel<X,Y> r1, $rel<X,Y> r2 ); // elements of r1 not in r2508 499 }}} 509 500 === `concurrency.cvh` ===
