# mypy: disable-error-code="empty-body"
"""
BigNum/BigRat Example
=====================
"""
'\nBigNum/BigRat Example\n=====================\n'
from __future__ import annotations
from egglog import *
assert egraph.extract(z.numer.to_string()).value == "-617"
egraph.register(set_(bignums(x, y)).to(z))
c = var("c", BigRat)
a, b = vars_("a b", BigInt)
egraph.check(
bignums(a, b) == c,
c.numer == a >> 1,
c.denom == b >> 1,
)