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

Function Function

lean_py/z3/core.py:1037–1045  ·  view source on GitHub ↗

Declare an uninterpreted function. ``Function('f', IntSort(), IntSort(), BoolSort())`` declares ``f : Int -> Int -> Prop``.

(name: str, *sorts: SortRef)

Source from the content-addressed store, hash-verified

1035
1036
1037def Function(name: str, *sorts: SortRef) -> FuncDeclRef:
1038 """Declare an uninterpreted function.
1039
1040 ``Function('f', IntSort(), IntSort(), BoolSort())`` declares
1041 ``f : Int -> Int -> Prop``.
1042 """
1043 if len(sorts) < 2:
1044 raise TypeError("Function needs at least a domain and range sort")
1045 return FuncDeclRef(name, tuple(sorts[:-1]), sorts[-1])
1046
1047
1048# ---------------------------------------------------------------------------

Calls 1

FuncDeclRefClass · 0.85