\n>>> A = {1,2,3}\n>>> type(A)\n<class 'set'>\n<\/code><\/pre>\n\u96c6\u5408\u306e\u4e2d\u306b\u306f\u3044\u3063\u3066\u3044\u308b\u3072\u3068\u3064\u3072\u3068\u3064\u306e\u3082\u306e\u3092\u305d\u306e\u96c6\u5408\u306e\u8981\u7d20\u3068\u8a00\u3044\u307e\u3059\u3002
\n\u307e\u305f\u3001\u3053\u306e\u3088\u3046\u306b\u8981\u7d20\u3092\u66f8\u304d\u4e26\u3079\u3066\u96c6\u5408\u3092\u8868\u3059\u66f8\u304d\u65b9\u3092\u3001\u5916\u5ef6\u7684\u8a18\u6cd5\u3068\u8a00\u3044\u307e\u3059\u3002<\/p>\n
\u3042\u308b\u96c6\u5408A\u3068\u3001\u306a\u3093\u3089\u304b\u306e\u3082\u306ea\u306b\u3064\u3044\u3066\u3001a\u304cA\u306e\u8981\u7d20\u3067\u3042\u308b\u304b\u8981\u7d20\u3067\u306a\u3044\u304b\u3001\u3069\u3061\u3089\u304b\u4e00\u65b9\u3060\u3051\u304c\u5fc5\u305a\u6210\u308a\u7acb\u305f\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002<\/p>\n
\u3042\u308b\u3082\u306e a \u304c\u96c6\u5408 A \u306e\u8981\u7d20\u3067\u3042\u308b\u3053\u3068\u3092\u3001
\n$$a \\in A$$
\n\u3068\u66f8\u304d\u307e\u3059\u3002<\/p>\n
\u9006\u306b\u3001a\u304c\u96c6\u5408A\u306e\u8981\u7d20\u3067\u306a\u3044\u3053\u3068\u3092\u3001
\n$$a \\notin A$$
\n\u3068\u66f8\u304d\u307e\u3059\u3002<\/p>\n
\u4f8b\u3048\u3070\u3001
\n$$\uff11 \\in \\lbrace1, 2, 3\\rbrace$$
\n$$\\lbrace\uff11\\rbrace \\notin \\lbrace1, 2, 3\\rbrace$$
\n\u304c\u6210\u308a\u7acb\u3061\u307e\u3059\u3002\u3064\u307e\u308a\u30011\u306f( \\lbrace1, 2, 3\\rbrace)\u306e\u8981\u7d20\u3067\u3059\u304c\u3001(\\lbrace1\\rbrace)\u306f( \\lbrace1, 2, 3\\rbrace)\u306e\u8981\u7d20\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002
\n\u65e2\u306b\u5c11\u3057\u308f\u304b\u308a\u306b\u304f\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u540c\u3058\u72b6\u6cc1\u3092\u8868\u3059\u6b21\u306ePython\u306e\u30b3\u30fc\u30c9\u3067\u898b\u308c\u3070\u3069\u3046\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n
\n>>> 1 in {1,2,3}\nTrue\n>>> {1} not in {1,2,3}\nTrue\n<\/code><\/pre>\nint\u306e\u50241\u306f{1,2,3}\u306e\u8981\u7d20\u3067\u3059\u304c\u30011\u3092\u8981\u7d20\u306b\u6301\u3064{1}\u3068\u3044\u3046set\u306f\u305d\u3046\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u30d7\u30ed\u30b0\u30e9\u30de\u306b\u3068\u3063\u3066\u306f\u3053\u3061\u3089\u306e\u307b\u3046\u304c\u308f\u304b\u308a\u3084\u3059\u3044\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n
\u96c6\u5408\u306f\u4f55\u3092\u8981\u7d20\u306b\u6301\u3064\u304b\u306e\u307f\u306b\u3088\u3063\u3066\u6c7a\u307e\u308a\u307e\u3059\u3002
\n\u305d\u306e\u305f\u3081\u3001
\n$$\\lbrace1, 2\\rbrace\u3000= \\lbrace1,1, 2\\rbrace $$
\n$$\\lbrace1, 2\\rbrace\u3000= \\lbrace2,1\\rbrace $$
\n\u306a\u3069\u304c\u6210\u308a\u7acb\u3061\u307e\u3059\u3002
\nPython\u306eset\u578b\u3067\u3082\u3001\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\u3002<\/p>\n
\n>>> {1,2} == {1,1,2}\nTrue\n>>> {1,2} == {2,1}\nTrue\n<\/code><\/pre>\n\u3044\u305a\u308c\u306e\u96c6\u5408\u30821 \u3068 2 \u3092\u8981\u7d20\u306b\u6301\u3061\u307e\u3059\u304c\u4ed6\u306b\u306f\u3069\u3093\u306a\u8981\u7d20\u3082\u6301\u305f\u306a\u3044\u305f\u3081\u3001\u4f55\u3092\u8981\u7d20\u306b\u6301\u3064\u304b\u3068\u3044\u3046\u89b3\u70b9\u3060\u3051\u3067\u898b\u308c\u3070\u540c\u3058\u3082\u306e\u3067\u3042\u308b\u3068\u8a00\u3048\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u540c\u4e00\u306e\u96c6\u5408\u3068\u306a\u308a\u307e\u3059\u3002
\n\u96c6\u5408\u306b\u306f\u9806\u5e8f\u3084\u91cd\u8907\u3068\u3044\u3063\u305f\u60c5\u5831\u306f\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n
\u7a7a\u96c6\u5408<\/h3>\n
\u8981\u7d20\u3092\u4f55\u3082\u6301\u305f\u306a\u3044\u96c6\u5408\u3001\u3064\u307e\u308a
\n$$ \\lbrace \\rbrace $$
\n\u3092\u7a7a\u96c6\u5408\u3068\u8a00\u3044\u307e\u3059\u3002
\n\u7a7a\u96c6\u5408\u306f(\\emptyset )\u3068\u3044\u3046\u8a18\u53f7\u3067\u8868\u3059\u3053\u3068\u304c\u591a\u3044\u3067\u3059\u3002<\/p>\n
\u96c6\u5408\u8ad6\u306e\u5b66\u3073\u59cb\u3081\u3067\u6df7\u4e71\u3057\u304c\u3061\u306a\u3053\u3068\u306e\u4e00\u3064\u3068\u3057\u3066\u3001(\\emptyset )\u3068(\\lbrace \\emptyset \\rbrace )\u306e\u533a\u5225\u304c\u3042\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u306f\u7570\u306a\u308b\u3082\u306e\u3067\u3059\u3002
\n\u8981\u7d20\u3092\u6301\u305f\u306a\u3044\u96c6\u5408\u3068\u3001\u8981\u7d20\u3092\u6301\u305f\u306a\u3044\u96c6\u5408\u306e\u96c6\u5408\u30fb\u30fb\u30fb\u7d50\u5c40\u7a7a\u306a\u306e\u3060\u304b\u3089\u540c\u3058\u306a\u306e\u3067\u306f\u306a\u3044\u304b\uff1f\u3068\u601d\u3063\u3066\u3057\u307e\u3044\u305d\u3046\u3067\u3059\u304c\u3001\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3067\u8003\u3048\u308b\u3068\u591a\u5c11\u308f\u304b\u308a\u3084\u3059\u3044\u306e\u3067\u306f\u306a\u3044\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n
\n# \u7a7a\u96c6\u5408\n>>> a = frozenset([])\n# \u7a7a\u96c6\u5408\u3060\u3051\u3092\u8981\u7d20\u306b\u6301\u3064\u96c6\u5408\n>>> b = frozenset([frozenset([])])\n>>> a == b\nFalse\n<\/code><\/pre>\nset\u578b\u304cset\u578b\u3092\u8981\u7d20\u306b\u6301\u3066\u306a\u3044\u305f\u3081\u3001frozenset\u3068\u3044\u3046set\u3092\u30a4\u30df\u30e5\u30fc\u30bf\u30d6\u30eb\u306b\u3057\u305f\u578b\u3092\u4f7f\u3063\u3066\u3044\u307e\u3059\u3002
\n\u7a7a\u306e1\u6b21\u5143\u914d\u5217\u3068\u3001\u7a7a\u306e1\u6b21\u5143\u914d\u5217\u3060\u3051\u3092\u8981\u7d20\u306b\u6301\u30642\u6b21\u5143\u914d\u5217\u304c\u5225\u306e\u3082\u306e\u306a\u306e\u3068\u540c\u3058\u3053\u3068\u3067\u3059\u3002<\/p>\n
\u9806\u5e8f\u5bfe<\/h2>\n
\u5148\u7a0b\u3001\u96c6\u5408\u306b\u306f\u9806\u5e8f\u304c\u306a\u3044\u3068\u8a00\u3044\u307e\u3057\u305f\u3002
\n\u3057\u304b\u3057\u3001\u96c6\u5408\u3092\u4f7f\u3063\u3066\u9806\u5e8f\u3092\u4f34\u3063\u305f\u3082\u306e\u306e\u96c6\u307e\u308a\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u306f\u53ef\u80fd\u3067\u3059\u3002
\n\u9806\u5e8f\u3092\u4f34\u3063\u305f2\u3064\u306e\u3082\u306e\u306e\u7d44\u3092
\n$$\\langle x,y \\rangle = \\lbrace\\lbrace x \\rbrace,\\lbrace x,y \\rbrace\\rbrace$$
\n\u3068\u5b9a\u7fa9\u3057\u3001\u3053\u308c\u3092\u9806\u5e8f\u5bfe\u3068\u547c\u3073\u307e\u3059\u3002
\n\u96c6\u5408\u306b\u3064\u3044\u3066\u306f
\n$$ \\lbrace1, 2\\rbrace = \\lbrace2, 1\\rbrace$$
\n\u304c\u6210\u308a\u7acb\u3061\u307e\u3057\u305f\u304c\u3001\u9806\u5e8f\u5bfe\u306b\u3064\u3044\u3066\u306f
\n$$ \\langle 1,2 \\rangle \\neq \\langle 2,1 \\rangle$$
\n\u3068\u306a\u308a\u307e\u3059\u3002
\n\u5b9a\u7fa9\u304b\u3089
\n$$\\langle 1,2 \\rangle = \\lbrace\\lbrace 1 \\rbrace,\\lbrace 1,2 \\rbrace\\rbrace$$
\n$$\\langle 2,1 \\rangle = \\lbrace\\lbrace 2 \\rbrace,\\lbrace 2,1 \\rbrace\\rbrace$$
\n\u3067\u3042\u308a\u3001\u3053\u306e\uff12\u3064\u306e\u96c6\u5408\u306f\u660e\u3089\u304b\u306b\u7570\u306a\u308b\u3082\u306e\u3067\u3059\u3002
\n\u3053\u306e\u3088\u3046\u306b\u3057\u3066\u9806\u5e8f\u3092\u6301\u305f\u306a\u3044\u96c6\u5408\u304b\u3089\u3001\u9806\u5e8f\u3092\u3082\u3063\u305f\u9806\u5e8f\u5bfe\u3068\u3044\u3046\u3082\u306e\u3092\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002<\/p>\n
\u9806\u5e8f\u5bfe\u3092\u8868\u3059\u30af\u30e9\u30b9\u3092\u4f5c\u6210\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n
\nfrom dataclasses import dataclass, field\n\n@dataclass(frozen=True)\nclass OrderedPair:\n a:any\n b:any\n orderedPair:frozenset = field(init=False)\n def __post_init__(self):\n left = frozenset([self.a])\n right = frozenset([self.a,self.b])\n object.__setattr__(self, 'orderedPair', frozenset([left,right]))\n def __repr__(self):\n return f\"<{self.a},{self.b}>\"\n def printAsSets(self):\n print(self.orderedPair)\n<\/code><\/pre>\n\n>>> o1 = OrderedPair(1,2)\n>>> o2 = OrderedPair(2,1)\n>>> o1\n<1,2>\n>>> o2\n<2,1>\n>>> o1.printAsSets()\nfrozenset({frozenset({1}), frozenset({1, 2})})\n>>> o1 == o2\nFalse\n>>> o3 = OrderedPair(1,2)\n>>> o1 == o3\n<\/code><\/pre>\n\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u304a\u3044\u3066\u306f\u3001\u914d\u5217\u3084list\u3068\u3044\u3046\u9806\u5e8f\u3092\u4f34\u3063\u305f\u30c7\u30fc\u30bf\u69cb\u9020\u304c\u6700\u521d\u304b\u3089\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u306e\u3060\u304b\u3089\u3001\u3053\u3093\u306a\u3082\u306e\u3092\u4f5c\u308b\u5fc5\u8981\u306f\u306a\u3044\u3068\u601d\u308f\u308c\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002\u3057\u304b\u3057\u3053\u3053\u3067\u306f\u3001\u96c6\u5408\u3068\u3044\u3046\u9806\u5e8f\u3092\u6301\u305f\u306a\u3044\u30b7\u30f3\u30d7\u30eb\u306a\u5bfe\u8c61\u304b\u3089\u3001\u9806\u5e8f\u3092\u6301\u3063\u305f\u3082\u306e\u3092\u4f5c\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3068\u3044\u3046\u3053\u3068\u3092\u5b9f\u611f\u3057\u3066\u3044\u305f\u3060\u304d\u305f\u3044\u306e\u3067\u3001\u6570\u5b66\u7684\u306a\u5b9a\u7fa9\u306e\u9806\u756a\u306b\u5f93\u3063\u3066\u3053\u306e\u3088\u3046\u306b\u5b9f\u88c5\u3057\u307e\u3057\u305f\u3002<\/p>\n
\u95a2\u4fc2<\/h2>\n
\u306a\u305c\u9806\u5e8f\u5bfe\u3092\u5b9a\u7fa9\u3057\u305f\u306e\u304b\u3068\u3044\u3046\u3068\u3001\u9806\u5e8f\u5bfe\u3092\u4f7f\u3063\u3066\u95a2\u4fc2\u3092\u5b9a\u7fa9\u3057\u305f\u304b\u3063\u305f\u304b\u3089\u3067\u3059\u3002
\n\u305d\u3057\u3066\u3001\u95a2\u4fc2\u3092\u5b9a\u7fa9\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308c\u3070\u3001\u95a2\u4fc2\u306e\u7279\u6b8a\u306a\u4f8b\u3068\u3057\u3066\u95a2\u6570\u3092\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002<\/p>\n
\u95a2\u4fc2\u306f\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u306b\u3001\u5358\u306b\u9806\u5e8f\u5bfe\u306e\u96c6\u5408\u3068\u3057\u3066\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002
\n\u4f8b\u3048\u3070\u3001\u4ee5\u4e0b\u306f\u95a2\u4fc2\u3067\u3059\u3002
\n$$ \\lbrace\\langle\u5317\u6d77\u9053, \u30aa\u30db\u30fc\u30c4\u30af\u6d77\\rangle,\\langle\u5317\u6d77\u9053, \u65e5\u672c\u6d77\\rangle, \\newline \\langle\u5317\u6d77\u9053, \u592a\u5e73\u6d0b\\rangle, \\langle\u9752\u68ee\u770c, \u65e5\u672c\u6d77\\rangle, \\newline \\langle\u9752\u68ee\u770c, \u592a\u5e73\u6d0b\\rangle,\\langle\u79cb\u7530\u770c,\u65e5\u672c\u6d77\\rangle, \\newline ...,\\langle\u6c96\u7e04\u770c, \u592a\u5e73\u6d0b\\rangle,\\langle\u6c96\u7e04\u770c, \u6771\u30b7\u30ca\u6d77\\rangle\\rbrace $$
\n\u9806\u5e8f\u5bfe\u306e\u96c6\u5408\u306b\u95a2\u4fc2\u3068\u3044\u3046\u540d\u524d\u304c\u3064\u3044\u3066\u3044\u308b\u306e\u306f\u3001\u300cx \u3068 y \u306f \u25cb\u25cb \u3068\u3044\u3046\u95a2\u4fc2\u306b\u3042\u308b\u300d\u3068\u3044\u3046\u72b6\u6cc1\u3092\u8868\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u304b\u3089\u3067\u3059\u3002\u4e0a\u8a18\u306e\u4f8b\u306f\u3001\u300cx \u306f y \u306b\u9762\u3057\u3066\u3044\u308b\u300d\u3068\u3044\u3046\u95a2\u4fc2\u3092\u8868\u3057\u3066\u3044\u307e\u3059(x \u3068\u3057\u3066\u306f\u65e5\u672c\u306e\u90fd\u9053\u5e9c\u770c\u3060\u3051\u3092\u8003\u3048\u3066\u3044\u307e\u3059)\u3002<\/p>\n
\u9806\u5e8f\u5bfe\u304c\u96c6\u5408\u3092\u4f7f\u3063\u3066\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u305f\u3053\u3068\u3092\u601d\u3044\u51fa\u3059\u3068\u3001\u95a2\u4fc2\u3082\u305d\u306e\u6c17\u306b\u306a\u308c\u3070\u5168\u3066\u96c6\u5408\u3060\u3051\u3067\u66f8\u304d\u4e0b\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
\n\u5148\u7a0b\u306e\u300cx\u306fy\u306b\u9762\u3057\u3066\u3044\u308b\u300d\u3068\u3044\u3046\u95a2\u4fc2\u3067\u3042\u308c\u3070\u3001
\n$$ \\lbrace \\lbrace \u5317\u6d77\u9053 \\rbrace, \\lbrace \u5317\u6d77\u9053, \u30aa\u30db\u30fc\u30c4\u30af\u6d77 \\rbrace \\rbrace ,\\newline
\n\\lbrace \\lbrace \u5317\u6d77\u9053 \\rbrace, \\lbrace \u5317\u6d77\u9053, \u65e5\u672c\u6d77 \\rbrace \\rbrace ,\\newline
\n\\lbrace \\lbrace \u5317\u6d77\u9053 \\rbrace, \\lbrace \u5317\u6d77\u9053, \u592a\u5e73\u6d0b \\rbrace \\rbrace, \\newline
\n\\lbrace \\lbrace \u9752\u68ee\u770c \\rbrace, \\lbrace \u9752\u68ee\u770c, \u65e5\u672c\u6d77 \\rbrace \\rbrace, \\newline
\n\\lbrace \\lbrace \u9752\u68ee\u770c \\rbrace, \\lbrace \u9752\u68ee\u770c, \u592a\u5e73\u6d0b \\rbrace \\rbrace, \\newline
\n\\lbrace \\lbrace \u79cb\u7530\u770c \\rbrace, \\lbrace \u79cb\u7530\u770c, \u65e5\u672c\u6d77 \\rbrace \\rbrace
\n\\newline...,
\n\\lbrace \\lbrace \u6c96\u7e04\u770c \\rbrace, \\lbrace \u6c96\u7e04\u770c, \u592a\u5e73\u6d0b \\rbrace \\rbrace, \\newline
\n\\lbrace \\lbrace \u6c96\u7e04\u770c \\rbrace, \\lbrace \u6c96\u7e04\u770c, \u6771\u30b7\u30ca\u6d77 \\rbrace \\rbrace $$
\n\u3068\u540c\u3058\u3053\u3068\u3067\u3059\u3002\u9577\u3059\u304e\u3066\u898b\u3065\u3089\u3044\u3067\u3059\u304c\u30fb\u30fb\u30fb
\n\u3053\u306e\u8a18\u4e8b\u3067\u5b9a\u7fa9\u3057\u3066\u3044\u308b\u6982\u5ff5\u304c\u3001\u5168\u3066\u5b9f\u4f53\u3068\u3057\u3066\u306f\u96c6\u5408\u3067\u3042\u308b\u3053\u3068\u3092\u5b9f\u611f\u3057\u3066\u3082\u3089\u3048\u305f\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n
\u3042\u308b\u95a2\u4fc2\u306b\u3064\u3044\u3066\u3001\u305d\u306e\u8981\u7d20\u3068\u306a\u308b\u9806\u5e8f\u5bfe(\\langle x, y\\rangle )\u306e x \u304c\u5168\u3066\u5c5e\u3059\u308b\u3088\u3046\u306a\u96c6\u5408\u3092\u3001\u305d\u306e\u95a2\u4fc2\u306e\u5b9a\u7fa9\u57df\u3068\u3044\u3044\u307e\u3059\u3002
\n\u5148\u7a0b\u306e\u4f8b\u3067\u8a00\u3048\u3070\u3001\u90fd\u9053\u5e9c\u770c\u5168\u4f53\u306e\u96c6\u5408(\\lbrace\u5317\u6d77\u9053, \u9752\u68ee\u770c,\u79cb\u7530\u770c,...,\u6c96\u7e04\u770c\\rbrace)\u304c\u5b9a\u7fa9\u57df\u306e\u4e00\u3064\u3067\u3042\u308b\u3068\u8a00\u3048\u307e\u3059\u3002\u90fd\u9053\u5e9c\u770c\u5168\u4f53\u306e\u96c6\u5408\u304b\u3089\u7fa4\u99ac\u770c\u306a\u3069\u306e\u5185\u9678\u770c\u3092\u53d6\u308a\u9664\u3044\u305f\u96c6\u5408\u306f\u3001\u5148\u7a0b\u306e\u95a2\u4fc2\u306e\u6700\u5c0f\u306e\u5b9a\u7fa9\u57df\u3067\u3059\u3002\u9006\u306b\u3001\u90fd\u9053\u5e9c\u770c\u5168\u4f53\u3068\u30a2\u30e1\u30ea\u30ab\u5408\u8846\u56fd\u306e\u5dde\u5168\u3066\u3092\u96c6\u3081\u305f\u96c6\u5408\u3082\u5148\u7a0b\u306e\u95a2\u4fc2\u306e\u5b9a\u7fa9\u57df\u3067\u3059\u3002<\/p>\n
\u307e\u305f\u3001\u3042\u308b\u95a2\u4fc2\u306b\u3064\u3044\u3066\u3001\u305d\u306e\u8981\u7d20\u3068\u306a\u308b\u9806\u5e8f\u5bfe(\\langle x, y \\rangle )\u306e y \u304c\u5168\u3066\u5c5e\u3059\u308b\u3088\u3046\u306a\u96c6\u5408\u3092\u3001\u305d\u306e\u95a2\u4fc2\u306e\u5024\u57df\u3068\u3044\u3044\u307e\u3059\u3002<\/p>\n
\u95a2\u4fc2\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n
\n@dataclass(frozen=True)\nclass Relation:\n relation:frozenset[OrderedPair]\n # \u6700\u5c0f\u306e\u5b9a\u7fa9\u57df\n domain:frozenset = field(init=False)\n # \u6700\u5c0f\u306e\u5024\u57df\n range:frozenset = field(init=False)\n def __post_init__(self):\n object.__setattr__(self, 'domain', frozenset([o.a for o in self.relation]))\n object.__setattr__(self, 'range', frozenset([o.a for o in self.relation]))\n def __repr__(self):\n return str(self.relation)\n<\/code><\/pre>\n\n>>> o1 = OrderedPair('\u5317\u6d77\u9053','\u30aa\u30db\u30fc\u30c4\u30af\u6d77')\n>>> o2 = OrderedPair('\u5317\u6d77\u9053','\u65e5\u672c\u6d77')\n>>> o3 = OrderedPair('\u5317\u6d77\u9053','\u592a\u5e73\u6d0b')\n>>> o4 = OrderedPair('\u9752\u68ee\u770c','\u65e5\u672c\u6d77')\n>>> o5 = OrderedPair('\u9752\u68ee\u770c','\u592a\u5e73\u6d0b')\n>>> r = Relation(frozenset([o1,o2,o3,o4,o5]))\n>>> r\nfrozenset({<\u5317\u6d77\u9053,\u30aa\u30db\u30fc\u30c4\u30af\u6d77>, <\u9752\u68ee\u770c,\u592a\u5e73\u6d0b>, <\u5317\u6d77\u9053,\u65e5\u672c\u6d77>, <\u5317\u6d77\u9053,\u592a\u5e73\u6d0b>, <\u9752\u68ee\u770c,\u65e5\u672c\u6d77>})\n>>> r.domain\nfrozenset({'\u9752\u68ee\u770c', '\u5317\u6d77\u9053'})\n>>> r.range\nfrozenset({'\u592a\u5e73\u6d0b', '\u30aa\u30db\u30fc\u30c4\u30af\u6d77', '\u65e5\u672c\u6d77'})\n<\/code><\/pre>\n\u95a2\u6570<\/h2>\n
\u95a2\u6570\u306f\u3001\u300c\u8981\u7d20\u3067\u3042\u308b\u5404\u9806\u5e8f\u5bfe<x,y>\u306b\u3064\u3044\u3066\u3001x \u304c\u540c\u4e00\u306a\u3089 y \u3082\u540c\u4e00\u3067\u3042\u308b\u300d\u3068\u3044\u3046\u6761\u4ef6\u3092\u6e80\u305f\u3059\u3088\u3046\u306a\u95a2\u4fc2\u3067\u3059\u3002
\n\u5148\u7a0b\u6319\u3052\u305f\u90fd\u9053\u5e9c\u770c\u3068\u9762\u3059\u308b\u6d77\u306e\u95a2\u4fc2\u306f\u3001\u95a2\u4fc2\u3067\u306f\u3042\u308b\u3082\u306e\u306e\u95a2\u6570\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u3002(\\langle\u5317\u6d77\u9053, \u30aa\u30db\u30fc\u30c4\u30af\u6d77\\rangle,\\langle\u5317\u6d77\u9053, \u65e5\u672c\u6d77\\rangle)\u306a\u3069\u306e\u8981\u7d20\u304c\u95a2\u6570\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3055\u306a\u3044\u305f\u3081\u3067\u3059\u3002<\/p>\n
\u4ed6\u65b9\u3067\u3001\u4ee5\u4e0b\u306f\u95a2\u6570\u3067\u3059\u3002
\n$$ \\lbrace \\langle0,0\\rangle, \\langle1,2\\rangle, \\langle2,4\\rangle,\\langle3,6\\rangle \\rbrace $$
\n\u3053\u308c\u306f\u3001x\u30920,1,2,3\u306b\u9650\u5b9a\u3057\u305f\u5834\u5408\u306e f(x)=2x \u3067\u3059\u3002
\n\u4eca\u56de\u306f\u6709\u9650\u306e\u4f8b\u3057\u304b\u6271\u3044\u307e\u305b\u3093\u3067\u3057\u305f\u304c\u3001\u96c6\u5408\u306e\u8981\u7d20\u306f\u7121\u9650\u500b\u3042\u3063\u3066\u3082\u69cb\u308f\u306a\u3044\u306e\u3067\u3001\u5b9f\u6570\u4e0a\u306ef(x)=2x\u3067\u3082\u96c6\u5408\u3067\u8868\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002
\n\uff08\u305f\u3060\u3057\u3001\u3053\u3053\u3067\u306f\u8981\u7d20\u3092\u5168\u3066\u66f8\u304d\u4e26\u3079\u3066\u8868\u3059\u5916\u5ef6\u7684\u8a18\u6cd5\u3057\u304b\u5c0e\u5165\u3057\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u7121\u9650\u96c6\u5408\u3092\u6b63\u78ba\u306b\u66f8\u304d\u8868\u3059\u3053\u3068\u306f\u3067\u304d\u307e\u305b\u3093\u3002\uff09<\/p>\n
\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u304a\u3044\u3066\u3082\u95a2\u6570\u3092\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u304c\u3001\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u304a\u3051\u308b\u95a2\u6570\u306f\u3053\u3053\u3067\u5b9a\u7fa9\u3057\u305f\u6570\u5b66\u7684\u306a\u95a2\u6570\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3059\u3068\u306f\u9650\u308a\u307e\u305b\u3093\u3002
\n\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306b\u304a\u3044\u3066\u306f\u3001\u7570\u306a\u308b\u5f15\u6570\u306b\u5bfe\u3057\u3066\u540c\u3058\u5024\u3092\u8fd4\u3059\u95a2\u6570\u3092\u4f5c\u308c\u307e\u3059\u3057\u3001\u30b0\u30ed\u30fc\u30d0\u30eb\u5909\u6570\u3084\u30e9\u30f3\u30c0\u30e0\u306a\u5024\u3092\u7528\u3044\u308c\u3070\u540c\u3058\u5f15\u6570\u306b\u5bfe\u3057\u3066\u3082\u7570\u306a\u308b\u5024\u3092\u8fd4\u3059\u95a2\u6570\u304c\u4f5c\u308c\u3066\u3057\u307e\u3044\u307e\u3059\u3002<\/p>\n
\u95a2\u6570\u306b\u3064\u3044\u3066\u3082\u3001\u95a2\u4fc2\u3068\u540c\u3058\u3088\u3046\u306b\u5b9a\u7fa9\u57df\u30fb\u5024\u57df\u304c\u5b9a\u7fa9\u3055\u308c\u307e\u3059\u3002<\/p>\n
\u95a2\u6570\u306e\u5b9f\u88c5\u4f8b\u3067\u3059\u3002<\/p>\n
\n@dataclass(frozen=True)\nclass Function:\n function:frozenset[OrderedPair]\n # \u6700\u5c0f\u306e\u5b9a\u7fa9\u57df\n domain:frozenset = field(init=False)\n # \u6700\u5c0f\u306e\u5024\u57df\n range:frozenset = field(init=False)\n def __post_init__(self):\n # \u95a2\u6570\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3059\u304b\u30c1\u30a7\u30c3\u30af\n for o1 in self.function:\n for o2 in self.function:\n if o1.a == o2.a and o1.b != o2.b:\n raise ValueError(f'{self.function} is not a function')\n object.__setattr__(self, 'domain', frozenset([o.a for o in self.function]))\n object.__setattr__(self, 'range', frozenset([o.a for o in self.function]))\n def __repr__(self):\n return str(self.function)\n def value(self,x):\n for o in self.function:\n if o.a == x:\n return o.b\n<\/code><\/pre>\n\n>>> o1 = OrderedPair(0,0)\n>>> o2 = OrderedPair(1,2)\n>>> o3 = OrderedPair(2,4)\n>>> o4 = OrderedPair(3,6)\n>>> f = Function((frozenset([o1,o2,o3,o4])))\n>>> f\nfrozenset({<2,4>, <0,0>, <1,2>, <3,6>})\n>>> f.domain\nfrozenset({0, 1, 2, 3})\n>>> f.range\nfrozenset({0, 2, 4, 6})\n<\/code><\/pre>\n\u307e\u3068\u3081<\/h2>\n
\u95a2\u6570\u3068\u3044\u3046\u6bd4\u8f03\u7684\u99b4\u67d3\u307f\u306e\u6709\u308a\u305d\u3046\u306a\u6982\u5ff5\u304c\u96c6\u5408\u306b\u3088\u3063\u3066\u5b9a\u7fa9\u3067\u304d\u308b\u3068\u3044\u3046\u3053\u3068\u3092\u611f\u3058\u3066\u3044\u305f\u3060\u304d\u305f\u304b\u3063\u305f\u306e\u3067\u3001\u901a\u5e38\u306e\u96c6\u5408\u8ad6\u306e\u5165\u9580\u66f8\u306a\u3069\u3067\u3042\u308c\u3070\u3082\u3063\u3068\u5148\u306b\u5c0e\u5165\u3059\u308b\u3067\u3042\u308d\u3046\u6982\u5ff5\u3092\u7121\u8996\u3057\u3066\u6700\u77ed\u3067\u95a2\u6570\u306e\u5b9a\u7fa9\u3092\u884c\u3044\u307e\u3057\u305f\u3002<\/p>\n
\u4ed6\u306e\u96c6\u5408\u8ad6\u306e\u6982\u5ff5\u3082\u540c\u3058\u65b9\u6cd5\u3067\u7d39\u4ecb\u3057\u3066\u307f\u305f\u3044\u3067\u3059\u3057\u3001\u96c6\u5408\u8ad6\u306e\u6e96\u5099\u304c\u5145\u5206\u306b\u3067\u304d\u305f\u3089\u3001\u305d\u306e\u4e0a\u3067\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30e2\u30c7\u30eb\u306e\u89e3\u8aac\u3082\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3063\u3066\u3044\u307e\u3059\u3002\u3057\u304b\u3057\u30ea\u30ec\u30fc\u30b7\u30e7\u30ca\u30eb\u30e2\u30c7\u30eb\u306b\u3064\u3044\u3066\u7b46\u8005\u304c\u307e\u3060\u7406\u89e3\u3067\u304d\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u3053\u308c\u304b\u3089\u9811\u5f35\u3063\u3066\u3044\u304d\u307e\u3059\u3002\u3002\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
DWS\u306e\u9053\u4e0b\u3067\u3059\u3002 \u96c6\u5408\u8ad6\u3068\u3044\u3046\u6570\u5b66\u306e\u5206\u91ce\u304c\u3042\u308a\u307e\u3059\u3002 \u96c6\u5408\u8ad6\u306f\u73fe\u4ee3\u6570\u5b66\u306e\u6a19\u6e96\u8a00\u8a9e\u306a\u3069\u3068\u8a00\u308f\u308c\u308b\u3053\u3068\u3082\u3042\u308a\u3001\u96c6\u5408\u8ad6\u306e\u4e0a\u3067\u69d8\u3005\u306a\u6570\u5b66\u306e\u6982\u5ff5\u3092\u5b9a\u5f0f\u5316\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u30d7\u30ed\u30b0\u30e9\u30de\u306b\u3082\u7121\u7e01\u3067\u306f\u306a\u304f\u3001\u4f8b\u3048\u3070SQL\u306e\u30d9\u30fc\u30b9\u3068\u306a\u3063 […]<\/p>\n","protected":false},"author":1,"featured_media":4824,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jinr_url_youtube":"","_jinr_pip_youtube":false,"_jinr_time_youtube":"","_jinr_thumb_youtube":"","_jinr_media_youtube":"","_jinr_category_edit":false,"_jinr_category":"","_jinr_title_display":false,"_jinr_snsbutton_display":false,"_jinr_ads_display":false,"_jinr_thumbnail_display":false,"_jinr_profile_display":false,"_jinr_relatedpost_display":false,"_jinr_sidebar1col_display":false,"_jinr_sidebar2col_display":false,"_jinr_seotitle_display":"","_jinr_description_display":"","_jinr_keyword_display":"","_jinr_hastag_display":"","_jinr_canonical_display":"","_jinr_noindex_display":false,"_jinr_paidpost":false,"_jinr_paidpost_product_id":"","_jinr_headtag_article":""},"categories":[1],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/cms-mordpress.test.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/4699"}],"collection":[{"href":"https:\/\/cms-mordpress.test.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cms-mordpress.test.mmmcorp.co.jp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cms-mordpress.test.mmmcorp.co.jp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cms-mordpress.test.mmmcorp.co.jp\/wp-json\/wp\/v2\/comments?post=4699"}],"version-history":[{"count":0,"href":"https:\/\/cms-mordpress.test.mmmcorp.co.jp\/wp-json\/wp\/v2\/posts\/4699\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cms-mordpress.test.mmmcorp.co.jp\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/cms-mordpress.test.mmmcorp.co.jp\/wp-json\/wp\/v2\/media?parent=4699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cms-mordpress.test.mmmcorp.co.jp\/wp-json\/wp\/v2\/categories?post=4699"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cms-mordpress.test.mmmcorp.co.jp\/wp-json\/wp\/v2\/tags?post=4699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}