Declare an uninterpreted function. ``Function('f', IntSort(), IntSort(), BoolSort())`` declares ``f : Int -> Int -> Prop``.
(name: str, *sorts: SortRef)
| 1035 | |
| 1036 | |
| 1037 | def 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 | # --------------------------------------------------------------------------- |