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

Method test_function_decl

tests/test_z3_compat.py:331–339  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

329 assert isinstance(radd._ast.lhs, IntLit) and radd._ast.lhs.val == 1
330
331 def test_function_decl(self):
332 S = DeclareSort("S")
333 f = Function("f", IntSort(), S)
334 x = Int("x")
335 app = f(x)
336 # f and S should be free vars
337 assert any(n == "f" for n, _ in app._vars)
338 var_names = {n for n, _ in app._vars}
339 assert "S" in var_names
340
341 def test_nat_var(self):
342 n = Nat("n")

Callers

nothing calls this directly

Calls 4

DeclareSortFunction · 0.90
FunctionFunction · 0.90
IntSortFunction · 0.90
IntFunction · 0.90

Tested by

no test coverage detected