2020年6月25日木曜日

数学 - Python - 解析学 - 距離空間の世界 - 位相の基礎的諸概念 - 閉包の内部の閉包の内部、内部の平方の内部の閉包、等式の証明

1. $\begin{array}{l}{A}^{aiai}\\ ={A}^{aiaa}\{A}^{aiaf}\\ ={A}^{\alpha ia}\{A}^{aiaf}\\ ={A}^{aii}\\ ={A}^{ai}\end{array}$
$\begin{array}{l}{A}^{iai}\subset {A}^{ia}\\ {A}^{iaia}\subset {A}^{iaa}\\ {A}^{iaia}\subset {A}^{ia}\\ {A}^{ia}\supset {A}^{i}\\ {A}^{iai}\supset {A}^{ii}={A}^{i}\\ {A}^{iaia}\supset {A}^{ia}\\ {A}^{iaia}={A}^{ia}\end{array}$

（証明終）

コード

#!/usr/bin/env python3
from unittest import TestCase, main
import random
from sympy import Interval

print('10.')

class Test(TestCase):
def test_boundary_intersect_closure_union(self):
for _ in range(10):
a0, a1 = [random.randrange(-10, 11) for _ in range(2)]
A = Interval(a0, a1)
self.assertEqual(
A.closure.interior.closure.interior,
A.closure.interior,
)
self.assertEqual(
A.interior.closure.interior.closure,
A.interior.closure,
)
A = Interval(a0, a1)
self.assertEqual(
A.closure.interior.closure.interior,
A.closure.interior,
)
self.assertEqual(
A.interior.closure.interior.closure,
A.interior.closure,
)
A = Interval(a0, a1)
self.assertEqual(
A.closure.interior.closure.interior,
A.closure.interior,
)
self.assertEqual(
A.interior.closure.interior.closure,
A.interior.closure,
)
A = Interval(a0, a1)
self.assertEqual(
A.closure.interior.closure.interior,
A.closure.interior,
)
self.assertEqual(
A.interior.closure.interior.closure,
A.interior.closure,
)
A = Interval.Lopen(a0, a1)
self.assertEqual(
A.closure.interior.closure.interior,
A.closure.interior,
)
self.assertEqual(
A.interior.closure.interior.closure,
A.interior.closure,
)
A = Interval.Lopen(a0, a1)
self.assertEqual(
A.closure.interior.closure.interior,
A.closure.interior,
)
self.assertEqual(
A.interior.closure.interior.closure,
A.interior.closure,
)
A = Interval.Lopen(a0, a1)
self.assertEqual(
A.closure.interior.closure.interior,
A.closure.interior,
)
self.assertEqual(
A.interior.closure.interior.closure,
A.interior.closure,
)
A = Interval.Ropen(a0, a1)
self.assertEqual(
A.closure.interior.closure.interior,
A.closure.interior,
)
self.assertEqual(
A.interior.closure.interior.closure,
A.interior.closure,
)
A = Interval.Ropen(a0, a1)
self.assertEqual(
A.closure.interior.closure.interior,
A.closure.interior,
)
self.assertEqual(
A.interior.closure.interior.closure,
A.interior.closure,
)
A = Interval.open(a0, a1)
self.assertEqual(
A.closure.interior.closure.interior,
A.closure.interior,
)
self.assertEqual(
A.interior.closure.interior.closure,
A.interior.closure,
)

if __name__ == "__main__":
main()


% ./sample10.py -v
10.
test_boundary_intersect_closure_union (__main__.Test) ... ok

----------------------------------------------------------------------
Ran 1 test in 1.508s

OK
%