"""
fta — Fundamental Theorem of Arithmetic as a coordinate system.

Every positive integer has a unique prime factorization (FTA). This package
treats that factorization as a coordinate system: each prime is an axis, each
exponent is a coordinate. Under this embedding, divisibility becomes geometry.

The central object is Lattice(n): the complete divisibility structure of n.
Give it an integer; get back every way that integer can be cleanly subdivided
and how those subdivisions relate to each other.

No assumptions about what the integers represent. The domain sits entirely
outside this package.

    from fta import Lattice

    L = Lattice(86400)
    L.members()        # all divisors of 86400
    L.covers(3600)     # immediate parents of 3600 in the Hasse diagram
    L.meet(720, 1800)  # gcd — greatest common divisor
    L.join(720, 1800)  # lcm — least common multiple

Standalone utilities
--------------------
    smallest_divisor_gte(n, k)  — smallest divisor of n that is >= k
    factorize(n)                — prime exponent coordinate of n
"""

from .lattice import Lattice
from .arithmetic import factorize, to_int, smallest_divisor_gte
from .arithmetic import (
    set_factorization_backend,
    clear_factorization_cache,
    factorization_cache_size,
)

__version__ = "0.1.0"

__all__ = [
    "Lattice",
    "factorize",
    "to_int",
    "smallest_divisor_gte",
    "set_factorization_backend",
    "clear_factorization_cache",
    "factorization_cache_size",
    "__version__",
]
