# kinds                                                               -*- sh -*-
#
# For documentation on this file format, please refer to
# src/theory/builtin/kinds.
#

theory THEORY_ARITH ::CVC4::theory::arith::TheoryArith "theory/arith/theory_arith.h"
typechecker "theory/arith/theory_arith_type_rules.h"

properties stable-infinite
properties check propagate ppStaticLearn presolve notifyRestart

rewriter ::CVC4::theory::arith::ArithRewriter "theory/arith/arith_rewriter.h"

operator PLUS 2: "arithmetic addition (N-ary)"
operator MULT 2: "arithmetic multiplication (N-ary)"
operator NONLINEAR_MULT 2: "synonym for MULT"
operator MINUS 2 "arithmetic binary subtraction operator"
operator UMINUS 1 "arithmetic unary negation"
operator DIVISION 2 "real division, division by 0 undefined (user symbol)"
operator DIVISION_TOTAL 2 "real division with interpreted division by 0 (internal symbol)"
operator INTS_DIVISION 2 "integer division, division by 0 undefined (user symbol)"
operator INTS_DIVISION_TOTAL 2 "integer division with interpreted division by 0 (internal symbol)"
operator INTS_MODULUS 2 "integer modulus, division by 0 undefined (user symbol)"
operator INTS_MODULUS_TOTAL 2 "integer modulus with interpreted division by 0 (internal symbol)"
operator ABS 1 "absolute value"
parameterized DIVISIBLE DIVISIBLE_OP 1 "divisibility-by-k predicate; first parameter is a DIVISIBLE_OP, second is integer term"
operator POW 2 "arithmetic power"

constant DIVISIBLE_OP \
        ::CVC4::Divisible \
        ::CVC4::DivisibleHashFunction \
        "util/divisible.h" \
        "operator for the divisibility-by-k predicate; payload is an instance of the CVC4::Divisible class"

sort REAL_TYPE \
    Cardinality::REALS \
    well-founded \
        "NodeManager::currentNM()->mkConst(Rational(0))" \
        "expr/node_manager.h" \
    "real type"
sort INTEGER_TYPE \
    Cardinality::INTEGERS \
    well-founded \
        "NodeManager::currentNM()->mkConst(Rational(0))" \
        "expr/node_manager.h" \
    "integer type"

constant SUBRANGE_TYPE \
    ::CVC4::SubrangeBounds \
    ::CVC4::SubrangeBoundsHashFunction \
    "util/subrange_bound.h" \
    "the type of an integer subrange"
cardinality SUBRANGE_TYPE \
    "::CVC4::theory::arith::SubrangeProperties::computeCardinality(%TYPE%)" \
    "theory/arith/theory_arith_type_rules.h"
well-founded SUBRANGE_TYPE \
    true \
    "::CVC4::theory::arith::SubrangeProperties::mkGroundTerm(%TYPE%)" \
    "theory/arith/theory_arith_type_rules.h"

constant CONST_RATIONAL \
    ::CVC4::Rational \
    ::CVC4::RationalHashFunction \
    "util/rational.h" \
    "a multiple-precision rational constant; payload is an instance of the CVC4::Rational class"

enumerator REAL_TYPE \
    "::CVC4::theory::arith::RationalEnumerator" \
    "theory/arith/type_enumerator.h"
enumerator INTEGER_TYPE \
    "::CVC4::theory::arith::IntegerEnumerator" \
    "theory/arith/type_enumerator.h"
enumerator SUBRANGE_TYPE \
    "::CVC4::theory::arith::SubrangeEnumerator" \
    "theory/arith/type_enumerator.h"

operator LT 2 "less than, x < y"
operator LEQ 2 "less than or equal, x <= y"
operator GT 2 "greater than, x > y"
operator GEQ 2 "greater than or equal, x >= y"

operator IS_INTEGER 1 "term-is-integer predicate (parameter is a real-sorted term)"
operator TO_INTEGER 1 "convert term to integer by the floor function (parameter is a real-sorted term)"
operator TO_REAL 1 "cast term to real (parameter is an integer-sorted term; this is a no-op in CVC4, as integer is a subtype of real)"

typerule PLUS ::CVC4::theory::arith::ArithOperatorTypeRule
typerule MULT ::CVC4::theory::arith::ArithOperatorTypeRule
typerule NONLINEAR_MULT ::CVC4::theory::arith::ArithOperatorTypeRule
typerule MINUS ::CVC4::theory::arith::ArithOperatorTypeRule
typerule UMINUS ::CVC4::theory::arith::ArithOperatorTypeRule
typerule DIVISION ::CVC4::theory::arith::ArithOperatorTypeRule
typerule POW ::CVC4::theory::arith::ArithOperatorTypeRule

typerule CONST_RATIONAL ::CVC4::theory::arith::ArithConstantTypeRule

typerule LT ::CVC4::theory::arith::ArithPredicateTypeRule
typerule LEQ ::CVC4::theory::arith::ArithPredicateTypeRule
typerule GT ::CVC4::theory::arith::ArithPredicateTypeRule
typerule GEQ ::CVC4::theory::arith::ArithPredicateTypeRule

typerule TO_REAL ::CVC4::theory::arith::ArithOperatorTypeRule
typerule TO_INTEGER ::CVC4::theory::arith::ArithOperatorTypeRule
typerule IS_INTEGER ::CVC4::theory::arith::ArithUnaryPredicateTypeRule

typerule ABS ::CVC4::theory::arith::IntOperatorTypeRule
typerule INTS_DIVISION ::CVC4::theory::arith::IntOperatorTypeRule
typerule INTS_MODULUS ::CVC4::theory::arith::IntOperatorTypeRule
typerule DIVISIBLE ::CVC4::theory::arith::IntUnaryPredicateTypeRule

typerule DIVISION_TOTAL ::CVC4::theory::arith::ArithOperatorTypeRule
typerule INTS_DIVISION_TOTAL ::CVC4::theory::arith::IntOperatorTypeRule
typerule INTS_MODULUS_TOTAL ::CVC4::theory::arith::IntOperatorTypeRule

endtheory
