2017年9月24日日曜日

学習環境

集合・位相入門 (松坂 和夫(著)、岩波書店)の第1章(集合と写像)、2(集合間の演算)、問題6、7を取り組んでみる。


  1. A( BC ) =( AB )( AC ) =( AB )C

    1. AΔB =( AB )( BA ) =( BA )( AB ) =BΔA

    2. ( AB )( AB ) =( AB ) ( AB ) c =( AB )( A c B c ) =( A( A c B c ) )( B( A c B c ) ) =( ( A A c )( A B c ) )( ( B A c )( B B c ) ) =( ϕ( A B c ) )( ( B A c )ϕ ) =( A B c )( B A c ) =( A B c )( A c B )

    3. ( AΔB )ΔC =( ( A B c )( A c B ) )ΔC =( ( ( A B c )( A c B ) ) C c )( ( ( A B c )( A c B ) ) c C ) =( ( A B c C c )( A c B C c ) )( ( ( A B c ) c ( A c B ) c )C ) =( ( A B c C c )( A c B C c ) )( ( ( A c B )( A B c ) )C ) =( ( A B c C c )( A c B C c ) )( ( ( A c B )( A B c ) )C ) =( ( A B c C c )( A c B C c ) )( ( ( A c ( A B c ) )( B( A B c ) ) )C ) =( ( A B c C c )( A c B C c ) )( ( ( A c B c )( BA ) )C ) =( ( A B c C c )( A c B C c ) )( ( A c B c C )( ABC ) ) =( A B c C c )( A c B C c )( A c B c C )( ABC ) AΔ( BΔC ) =AΔ( ( B C c )( B c C ) ) =( A ( ( B C c )( B c C ) ) c )( A c ( ( B C c )( B c C ) ) ) =( A( ( B C c ) c ( B c C ) c ) )( ( A c B C c )( A c B c C ) ) =( A( ( B c C )( B C c ) ) )( ( A c B C c )( A c B c C ) ) =( A( ( ( B c C )B )( ( B c C ) C c ) ) )( ( A c B C c )( A c B c C ) ) =( A( ( BC )( B c C c ) ) )( ( A c B C c )( A c B c C ) ) =( ( ABC )( A B c C c ) )( ( A c B C c )( A c B c C ) ) =( ABC )( A B c C c )( A c B C c )( A c B c C ) ( AΔB )ΔC=AΔ( BΔC )

    4. A( BΔC ) =A( ( B C c )( B c C ) ) =( AB C c )( A B c C ) ( AB )Δ( AC ) =( ( AB ) ( AC ) c )( ( AB ) c ( AC ) ) =( ( AB )( A c C c ) )( ( A c B c )( AC ) ) =( AB C c )( A B c C )

コード(Emacs)

Python 3

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

from matplotlib_venn import venn3_unweighted
import matplotlib.pyplot as plt

from sympy import pprint, FiniteSet, Interval

print('6.')

X = FiniteSet(*range(7))
A = FiniteSet(*range(5))
B = FiniteSet(*range(6))
C = FiniteSet(*range(7))
for X0 in [X, A, B, C]:
    pprint(X0)

print(A.is_subset(C))
print(A | (B & C) == (A | B) & C)

venn3_unweighted(subsets=(A, B, C))
plt.savefig('sample6.svg')

入出力結果(Terminal, Jupyter(IPython))

$ ./sample6.py
6.
{0, 1, 2, 3, 4, 5, 6}
{0, 1, 2, 3, 4}
{0, 1, 2, 3, 4, 5}
{0, 1, 2, 3, 4, 5, 6}
True
True
$

0 コメント:

コメントを投稿