Computational-Analysis/chapter-03/decidable/main.py
Jan-Niclas Loosen 719f5816e9 init repo
2025-05-07 10:48:37 +02:00

12 lines
368 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

from decidable import REAL
from gmpy2 import mpq
# Theorem 3.1 (5)
# Es gibt eine ganze Zahl z ∈ Z und eine entscheidbare Menge A ⊆ N mit x = z + xA, wobei xA := SUMi∈A 2^(i1)
print(REAL.from_rational(mpq(1,3)).as_str(10))
print(REAL.from_rational(mpq(41,5)).as_str(10))
print(REAL.from_rational(mpq(1,5)).as_str(10))
print(REAL.from_int(1).as_str(10))