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

Function bounded_sum

examples/06_effectful_verifier/python/main.py:57–60  ·  view source on GitHub ↗
(x: Annotated[int, Gt(0)], y: Annotated[int, Gt(0)])

Source from the content-addressed store, hash-verified

55
56
57def bounded_sum(x: Annotated[int, Gt(0)], y: Annotated[int, Gt(0)]):
58 s = x + y
59 assert_refined(s, Gt(1)) # x > 0 ∧ y > 0 → x + y > 1 ✓
60 assert_refined(s, Ge(2)) # x > 0 ∧ y > 0 → x + y >= 2 ✓
61
62
63assert verify(bounded_sum)

Callers

nothing calls this directly

Calls 3

GtClass · 0.90
assert_refinedFunction · 0.90
GeClass · 0.90

Tested by

no test coverage detected