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

Method test_lambda_constant

tests/test_z3_semantic.py:1327–1331  ·  view source on GitHub ↗

Select(Lambda(x, 42), anything) = 42

(self, kernel)

Source from the content-addressed store, hash-verified

1325 assert _try_prove(Select(f, IntVal(5)) == IntVal(6))
1326
1327 def test_lambda_constant(self, kernel):
1328 """Select(Lambda(x, 42), anything) = 42"""
1329 x = Int("x")
1330 f = Lambda([x], IntVal(42))
1331 assert _try_prove(Select(f, IntVal(999)) == IntVal(42))
1332
1333 def test_lambda_square(self, kernel):
1334 """Select(Lambda(x, x*x), 7) = 49"""

Callers

nothing calls this directly

Calls 5

IntFunction · 0.90
LambdaFunction · 0.90
IntValFunction · 0.90
_try_proveFunction · 0.90
SelectFunction · 0.90

Tested by

no test coverage detected