MCPcopy Create free account
hub / github.com/BasisResearch/lean.py / coerce

Function coerce

examples/06_effectful_verifier/python/refine.py:136–137  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

134 h[var_ops[name]] = (lambda bv=bv: lambda: bv)(bv)
135
136 def coerce(x):
137 return eb.mk_int(x) if isinstance(x, int) else x
138
139 h[int_ops.__add__] = lambda a, b: eb.mk_int_add(coerce(a), coerce(b))
140 h[int_ops.__sub__] = lambda a, b: eb.mk_int_sub(coerce(a), coerce(b))

Callers 1

_make_expr_handlerFunction · 0.85

Calls 1

mk_intMethod · 0.80

Tested by

no test coverage detected