úÎ@(=°.      !"#$%&'()*+,- portable  experimental Drew Day<drewday@gmail.com>  Safe-Infered!This implementation avoids using  S.Set (a,b) because ? it it is necessary to search for an item without knowing both D and R. In S.Set', you must know both values to search. 0Thus, we have are two maps to updated together.  7 Always be careful with the associated set of the key. ? If you union two relations, apply union to the set of values. = If you subtract, take care when handling the set of values. >As a multi-map, each key is asscoated with a Set of values v. *We do not allow the associations with the  Set. size r/ returns the number of tuples in the relation. 'Construct a relation with no elements. @The list must be formatted like: [(k1, v1), (k2, v2),..,(kn, vn)]. Builds a List from a Relation.  Builds a & consiting of an association between: x and y. The / that results from the union of two relations: r and s. $Union a list of relations using the  relation. Insert a relation  x  and  y  in the relation  r  'Delete an association in the relation. 9The Set of values associated with a value in the domain. 8The Set of values associated with a value in the range. True if the element  x  exists in the domain of  r . )True if the element exists in the range. True if the relation r is the  relation. .True if the relation contains the association x and y True if the relation does not contain the association x and y ?Returns the domain in the relation, as a Set, in its entirety. >Returns the range of the relation, as a Set, in its entirety. 1A compact set of sets the values of which can be  Just (Set x) or Nothing.  The cases of . are purged. It is similar to /.  (Case b <| r a) ( Case a |> r b )1Domain restriction for a relation. Modeled on z. 0Range restriction for a relation. Modeled on z.     portable experimentalDrew Day<drewday@gmail.com> Safe-Infered Documentation Tests [All examples in this module are tested automatically with Doctest, and pretty printed with  Text.Groom. AThis output is provided as proof of the correctness of the REPL (>>>) text:  3 There are 12 tests, with 12 total interactions. 3 Examples: 12 Tried: 12 Errors: 0 Failures: 0  Example 2:  A student x can take n classes. ) Each student must take at least 1 class , Each class must have at least one student.  p enrollment Relation{domain = fromList0 [("Antonio", fromList ["History"]),> ("Rebeca", fromList ["History", "Mathematics"]),A ("Rolando", fromList ["Comunication", "Religion"]),A ("Teresa", fromList ["Architecture", "Religion"])], range = fromList4 [("Architecture", fromList ["Teresa"]),5 ("Comunication", fromList ["Rolando"]),: ("History", fromList ["Antonio", "Rebeca"]),3 ("Mathematics", fromList ["Rebeca"]),< ("Religion", fromList ["Rolando", "Teresa"])]}p rebecaenrollment#fromList ["History", "Mathematics"]p takingreligionfromList ["Rolando", "Teresa"]p others5fromList ["Architecture", "Comunication", "Religion"]p test1Truep takingreligion2Relation{domain = fromList1 [("Rolando", fromList ["Religion"]),1 ("Teresa", fromList ["Religion"])],I range = fromList [("Religion", fromList ["Rolando", "Teresa"])]}$ p religionfromList ["Religion"]%p t11(True, fromList ["Religion"])&p t12&(True, fromList ["Rolando", "Teresa"])'p t13(True, fromList ["Teresa"])(p t14-(True, fromList ["Architecture", "Religion"])- p testAllTrue !"#$%&'()*+,- !"#$%&'()*+,- !"#$%&'()*+,- !"#$%&'()*+,-0      !"#$%&'()*+,-./01231456relation-0.2.1 Data.RelationData.Relation.Examples.E02RelationsizeemptyfromListtoList singletonunionunionsinsertdelete lookupDom lookupRan memberDom memberRannullmember notMemberdomran compactSet<$||$><||>p enrollmentrebecaenrollmenttakingreligionotherstest1takingreligion2id1id2id3id4religionteresat11t12t13t14id1Rid2Rid3Rid4RtestAllbase Data.MaybeNothingGHC.Listconcat