2020年5月15日金曜日

学習環境

解析入門(中) (松坂和夫 数学入門シリーズ 5) (松坂 和夫(著)、岩波書店)の第11章(集合論初歩)、11.2(濃度)、問題8の解答を求めてみる。


  1. x、 y を 開区間 (-1,1) の任意の元とする。

    x = 1 2 n n +

    のとき、

    f x = f y

    ならば、

    f 1 2 n = f y 1 2 n - 1 = f y

    問題の仮定より

    y = 1 2 n - 1

    または

    y = 1 2 n

    のどちらかである。

    n = 1

    の場合、

    1 2 n - 1 = 1 - 1 , 1

    よって、

    y = 1 2 n = x

    また、

    n 2

    の場合、

    f 1 2 n - 1 = 2 · 1 2 n - 1 = 1 2 n - 2 1 2 n - 1 = f x

    よって仮定と矛盾するので

    y = 1 2 n = x

    また、

    x = - 1 2 n - 1 n +

    の場合も同様にして

    x = y

    である。

    また、

    x 1 2 n n +

    の場合、

    x = f y

    で、問題の仮定より、

    y = x

    y = x 2

    のどちらかである。

    x = 2 n n

    の場合、

    f x 2 = f 2 n - 1 = 2 n - 1 f 2 n = 2 n f x f y

    となり、仮定と矛盾。

    よって、

    y = x

    また、

    x 2 n n

    の場合、

    x = 1 2 k k +

    のとき、

    f x = 1 2 k - 1 f x 2 = x 2 = 1 2 k + 1 f x f y

    となり仮定と矛盾。

    よって

    x = y

    ゆえに単射である。

    b を閉区間[1, -1]の任意の元とする。

    b = ± 1 2 k - 1 k +

    のとき、

    f ± 1 2 k = ± 2 · 1 2 k = ± 1 2 k - 1

    また、

    b ± 1 2 k - 1 k +

    のとき、

    f b = b

    よって f は全射である。

    ゆえに、 f は全単射である。

    (証明終)

コード

#!/usr/bin/env python3
import math
from sympy import symbols, solve, Rational
import matplotlib.pyplot as plt
import numpy as np

print('8.')

n = symbols('n', integer=True, positive=True)


def f(x):
    x0 = Rational(math.trunc(100 * x), 100)
    if x0 < 0:
        s = solve(x0 + 1 / 2 ** n)
    else:
        s = solve(x0 - 1 / 2 ** n)
    if len(s) > 0:
        k = float(s[0])
        if k.is_integer() and k > 0:
            return 2 * x
    return x


xs = np.arange(-0.99, 0.99, 0.01)
ys = [f(x) for x in xs]
for x, y in zip(xs, ys):
    print((x, y))

plt.plot(xs, [f(round(x, 2)) for x in xs])
plt.savefig('sample8.png')

入出力結果(Zsh、PowerShell、Terminal、Jupyter(IPython))

% ./sample8.py
8.
(-0.99, -0.99)
(-0.98, -0.98)
(-0.97, -0.97)
(-0.96, -0.96)
(-0.95, -0.95)
(-0.94, -0.94)
(-0.9299999999999999, -0.9299999999999999)
(-0.9199999999999999, -0.9199999999999999)
(-0.9099999999999999, -0.9099999999999999)
(-0.8999999999999999, -0.8999999999999999)
(-0.8899999999999999, -0.8899999999999999)
(-0.8799999999999999, -0.8799999999999999)
(-0.8699999999999999, -0.8699999999999999)
(-0.8599999999999999, -0.8599999999999999)
(-0.8499999999999999, -0.8499999999999999)
(-0.8399999999999999, -0.8399999999999999)
(-0.8299999999999998, -0.8299999999999998)
(-0.8199999999999998, -0.8199999999999998)
(-0.8099999999999998, -0.8099999999999998)
(-0.7999999999999998, -0.7999999999999998)
(-0.7899999999999998, -0.7899999999999998)
(-0.7799999999999998, -0.7799999999999998)
(-0.7699999999999998, -0.7699999999999998)
(-0.7599999999999998, -0.7599999999999998)
(-0.7499999999999998, -0.7499999999999998)
(-0.7399999999999998, -0.7399999999999998)
(-0.7299999999999998, -0.7299999999999998)
(-0.7199999999999998, -0.7199999999999998)
(-0.7099999999999997, -0.7099999999999997)
(-0.6999999999999997, -0.6999999999999997)
(-0.6899999999999997, -0.6899999999999997)
(-0.6799999999999997, -0.6799999999999997)
(-0.6699999999999997, -0.6699999999999997)
(-0.6599999999999997, -0.6599999999999997)
(-0.6499999999999997, -0.6499999999999997)
(-0.6399999999999997, -0.6399999999999997)
(-0.6299999999999997, -0.6299999999999997)
(-0.6199999999999997, -0.6199999999999997)
(-0.6099999999999997, -0.6099999999999997)
(-0.5999999999999996, -0.5999999999999996)
(-0.5899999999999996, -0.5899999999999996)
(-0.5799999999999996, -0.5799999999999996)
(-0.5699999999999996, -0.5699999999999996)
(-0.5599999999999996, -0.5599999999999996)
(-0.5499999999999996, -0.5499999999999996)
(-0.5399999999999996, -0.5399999999999996)
(-0.5299999999999996, -0.5299999999999996)
(-0.5199999999999996, -0.5199999999999996)
(-0.5099999999999996, -1.0199999999999991)
(-0.49999999999999956, -0.49999999999999956)
(-0.48999999999999955, -0.48999999999999955)
(-0.47999999999999954, -0.47999999999999954)
(-0.46999999999999953, -0.46999999999999953)
(-0.4599999999999995, -0.4599999999999995)
(-0.4499999999999995, -0.4499999999999995)
(-0.4399999999999995, -0.4399999999999995)
(-0.4299999999999995, -0.4299999999999995)
(-0.4199999999999995, -0.4199999999999995)
(-0.4099999999999995, -0.4099999999999995)
(-0.39999999999999947, -0.39999999999999947)
(-0.38999999999999946, -0.38999999999999946)
(-0.37999999999999945, -0.37999999999999945)
(-0.36999999999999944, -0.36999999999999944)
(-0.35999999999999943, -0.35999999999999943)
(-0.3499999999999994, -0.3499999999999994)
(-0.3399999999999994, -0.3399999999999994)
(-0.3299999999999994, -0.3299999999999994)
(-0.3199999999999994, -0.3199999999999994)
(-0.3099999999999994, -0.3099999999999994)
(-0.2999999999999994, -0.2999999999999994)
(-0.28999999999999937, -0.28999999999999937)
(-0.27999999999999936, -0.27999999999999936)
(-0.26999999999999935, -0.26999999999999935)
(-0.25999999999999934, -0.5199999999999987)
(-0.24999999999999933, -0.24999999999999933)
(-0.23999999999999932, -0.23999999999999932)
(-0.22999999999999932, -0.22999999999999932)
(-0.2199999999999993, -0.2199999999999993)
(-0.2099999999999993, -0.2099999999999993)
(-0.1999999999999993, -0.1999999999999993)
(-0.18999999999999928, -0.18999999999999928)
(-0.17999999999999927, -0.17999999999999927)
(-0.16999999999999926, -0.16999999999999926)
(-0.15999999999999925, -0.15999999999999925)
(-0.14999999999999925, -0.14999999999999925)
(-0.13999999999999924, -0.13999999999999924)
(-0.12999999999999923, -0.12999999999999923)
(-0.11999999999999922, -0.11999999999999922)
(-0.10999999999999921, -0.10999999999999921)
(-0.0999999999999992, -0.0999999999999992)
(-0.08999999999999919, -0.08999999999999919)
(-0.07999999999999918, -0.07999999999999918)
(-0.06999999999999917, -0.06999999999999917)
(-0.059999999999999165, -0.059999999999999165)
(-0.049999999999999156, -0.049999999999999156)
(-0.03999999999999915, -0.03999999999999915)
(-0.02999999999999914, -0.02999999999999914)
(-0.01999999999999913, -0.01999999999999913)
(-0.00999999999999912, -0.00999999999999912)
(8.881784197001252e-16, 8.881784197001252e-16)
(0.010000000000000897, 0.010000000000000897)
(0.020000000000000906, 0.020000000000000906)
(0.030000000000000915, 0.030000000000000915)
(0.040000000000000924, 0.040000000000000924)
(0.05000000000000093, 0.05000000000000093)
(0.06000000000000094, 0.06000000000000094)
(0.07000000000000095, 0.07000000000000095)
(0.08000000000000096, 0.08000000000000096)
(0.09000000000000097, 0.09000000000000097)
(0.10000000000000098, 0.10000000000000098)
(0.11000000000000099, 0.11000000000000099)
(0.120000000000001, 0.120000000000001)
(0.130000000000001, 0.130000000000001)
(0.140000000000001, 0.140000000000001)
(0.15000000000000102, 0.15000000000000102)
(0.16000000000000103, 0.16000000000000103)
(0.17000000000000104, 0.17000000000000104)
(0.18000000000000105, 0.18000000000000105)
(0.19000000000000106, 0.19000000000000106)
(0.20000000000000107, 0.20000000000000107)
(0.21000000000000107, 0.21000000000000107)
(0.22000000000000108, 0.22000000000000108)
(0.2300000000000011, 0.2300000000000011)
(0.2400000000000011, 0.2400000000000011)
(0.2500000000000011, 0.5000000000000022)
(0.2600000000000011, 0.2600000000000011)
(0.27000000000000113, 0.27000000000000113)
(0.28000000000000114, 0.28000000000000114)
(0.29000000000000115, 0.29000000000000115)
(0.30000000000000115, 0.30000000000000115)
(0.31000000000000116, 0.31000000000000116)
(0.3200000000000012, 0.3200000000000012)
(0.3300000000000012, 0.3300000000000012)
(0.3400000000000012, 0.3400000000000012)
(0.3500000000000012, 0.3500000000000012)
(0.3600000000000012, 0.3600000000000012)
(0.3700000000000012, 0.3700000000000012)
(0.3800000000000012, 0.3800000000000012)
(0.39000000000000123, 0.39000000000000123)
(0.40000000000000124, 0.40000000000000124)
(0.41000000000000125, 0.41000000000000125)
(0.42000000000000126, 0.42000000000000126)
(0.43000000000000127, 0.43000000000000127)
(0.4400000000000013, 0.4400000000000013)
(0.4500000000000013, 0.4500000000000013)
(0.4600000000000013, 0.4600000000000013)
(0.4700000000000013, 0.4700000000000013)
(0.4800000000000013, 0.4800000000000013)
(0.4900000000000013, 0.4900000000000013)
(0.5000000000000013, 1.0000000000000027)
(0.5100000000000013, 0.5100000000000013)
(0.5200000000000014, 0.5200000000000014)
(0.5300000000000014, 0.5300000000000014)
(0.5400000000000014, 0.5400000000000014)
(0.5500000000000014, 0.5500000000000014)
(0.5600000000000014, 0.5600000000000014)
(0.5700000000000014, 0.5700000000000014)
(0.5800000000000014, 0.5800000000000014)
(0.5900000000000014, 0.5900000000000014)
(0.6000000000000014, 0.6000000000000014)
(0.6100000000000014, 0.6100000000000014)
(0.6200000000000014, 0.6200000000000014)
(0.6300000000000014, 0.6300000000000014)
(0.6400000000000015, 0.6400000000000015)
(0.6500000000000015, 0.6500000000000015)
(0.6600000000000015, 0.6600000000000015)
(0.6700000000000015, 0.6700000000000015)
(0.6800000000000015, 0.6800000000000015)
(0.6900000000000015, 0.6900000000000015)
(0.7000000000000015, 0.7000000000000015)
(0.7100000000000015, 0.7100000000000015)
(0.7200000000000015, 0.7200000000000015)
(0.7300000000000015, 0.7300000000000015)
(0.7400000000000015, 0.7400000000000015)
(0.7500000000000016, 0.7500000000000016)
(0.7600000000000016, 0.7600000000000016)
(0.7700000000000016, 0.7700000000000016)
(0.7800000000000016, 0.7800000000000016)
(0.7900000000000016, 0.7900000000000016)
(0.8000000000000016, 0.8000000000000016)
(0.8100000000000016, 0.8100000000000016)
(0.8200000000000016, 0.8200000000000016)
(0.8300000000000016, 0.8300000000000016)
(0.8400000000000016, 0.8400000000000016)
(0.8500000000000016, 0.8500000000000016)
(0.8600000000000017, 0.8600000000000017)
(0.8700000000000017, 0.8700000000000017)
(0.8800000000000017, 0.8800000000000017)
(0.8900000000000017, 0.8900000000000017)
(0.9000000000000017, 0.9000000000000017)
(0.9100000000000017, 0.9100000000000017)
(0.9200000000000017, 0.9200000000000017)
(0.9300000000000017, 0.9300000000000017)
(0.9400000000000017, 0.9400000000000017)
(0.9500000000000017, 0.9500000000000017)
(0.9600000000000017, 0.9600000000000017)
(0.9700000000000017, 0.9700000000000017)
(0.9800000000000018, 0.9800000000000018)
%

0 コメント:

コメントを投稿