Documentation

Cvc.Untyped.Theory.Arith

Generated arithmetic constructors, sort-erased #

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        Euclidean integer division, left-associative; unspecified on a zero divisor.

        Equations
        Instances For

          Base-two logarithm.

          Equations
          Instances For
            def Cvc.Untyped.Term.neg [Ω] (arithTerm : Term) :

            Arithmetic negation.

            Equations
            Instances For
              def Cvc.Untyped.Term.subN [Ω] (terms : Terms) (atLeastTwoElements : 2 ≤ Array.size terms := by (try grind) <;> fail "failed to prove term array has at least two elements") :

              sub over two or more terms.

              Equations
              Instances For

                A real literal.

                Equations
                Instances For

                  An integer literal, read from its decimal representation.

                  Equations
                  Instances For
                    def Cvc.Untyped.Term.gt [Ω] (lft rgt : Term) :

                    Binary greater-than; gtN chains, as ltN does.

                    Equations
                    Instances For
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For

                        The constant π.

                        Equations
                        Instances For
                          def Cvc.Untyped.Term.mulN' [Ω] (terms : Terms) (on0 : Env Term := mkInt 1) (on1 : Term → Env Term := pure) :

                          mul over any number of terms: none gives 1, one gives that term. on0 and on1 override these.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            def Cvc.Untyped.Term.le [Ω] (lft rgt : Term) :

                            Binary less-than-or-equal-to; leN chains, as ltN does.

                            Equations
                            Instances For

                              Cosecant.

                              Equations
                              Instances For
                                def Cvc.Untyped.Term.pow2 [Ω] (exponent : Term) :

                                Two raised to a non-negative exponent.

                                Equations
                                Instances For
                                  def Cvc.Untyped.Term.toInt [Ω] (arithTerm : Term) :

                                  Conversion to an integer, rounding towards negative infinity.

                                  Equations
                                  Instances For
                                    def Cvc.Untyped.Term.geN [Ω] (terms : Terms) (atLeastTwoElements : 2 ≤ Array.size terms := by (try grind) <;> fail "failed to prove term array has at least two elements") :

                                    ge over two or more terms.

                                    Equations
                                    Instances For

                                      Real division, left-associative; unspecified on a zero divisor.

                                      Equations
                                      Instances For
                                        def Cvc.Untyped.Term.intDivTotalN [Ω] (terms : Terms) (atLeastTwoElements : 2 ≤ Array.size terms := by (try grind) <;> fail "failed to prove term array has at least two elements") :

                                        intDivTotal over two or more terms.

                                        Equations
                                        Instances For
                                          def Cvc.Untyped.Term.piand [Ω] (size lft rgt : Term) :

                                          Bit-wise and of the low size bits of lft and rgt; zero when size ≤ 0.

                                          Equations
                                          Instances For

                                            Euclidean integer division, left-associative; zero on a zero divisor.

                                            Equations
                                            Instances For
                                              def Cvc.Untyped.Term.abs [Ω] (arithTerm : Term) :

                                              Absolute value.

                                              Equations
                                              Instances For

                                                Arc cotangent.

                                                Equations
                                                Instances For
                                                  def Cvc.Untyped.Term.ltN [Ω] (terms : Terms) (atLeastTwoElements : 2 ≤ Array.size terms := by (try grind) <;> fail "failed to prove term array has at least two elements") :

                                                  lt over two or more terms.

                                                  Equations
                                                  Instances For
                                                    def Cvc.Untyped.Term.pow [Ω] (base exponent : Term) :

                                                    Exponentiation.

                                                    Equations
                                                    Instances For

                                                      Arc tangent.

                                                      Equations
                                                      Instances For

                                                        Arc cosecant.

                                                        Equations
                                                        Instances For
                                                          Equations
                                                          • One or more equations did not get rendered due to their size.
                                                          Instances For
                                                            def Cvc.Untyped.Term.leN [Ω] (terms : Terms) (atLeastTwoElements : 2 ≤ Array.size terms := by (try grind) <;> fail "failed to prove term array has at least two elements") :

                                                            le over two or more terms.

                                                            Equations
                                                            Instances For
                                                              def Cvc.Untyped.Term.sub [Ω] (lft rgt : Term) :

                                                              Binary subtraction; subN is left-associative.

                                                              Equations
                                                              Instances For
                                                                def Cvc.Untyped.Term.divisible [Ω] (divisor : Nat) (arg : Term) :

                                                                Whether arg is divisible by divisor.

                                                                Equations
                                                                Instances For

                                                                  Cosine.

                                                                  Equations
                                                                  Instances For

                                                                    Euclidean integer modulus; the dividend on a zero divisor.

                                                                    Equations
                                                                    Instances For
                                                                      def Cvc.Untyped.Term.realDivN [Ω] (terms : Terms) (atLeastTwoElements : 2 ≤ Array.size terms := by (try grind) <;> fail "failed to prove term array has at least two elements") :

                                                                      realDiv over two or more terms.

                                                                      Equations
                                                                      Instances For
                                                                        Equations
                                                                        • One or more equations did not get rendered due to their size.
                                                                        Instances For
                                                                          Equations
                                                                          • One or more equations did not get rendered due to their size.
                                                                          Instances For
                                                                            Equations
                                                                            • One or more equations did not get rendered due to their size.
                                                                            Instances For
                                                                              Equations
                                                                              • One or more equations did not get rendered due to their size.
                                                                              Instances For
                                                                                def Cvc.Untyped.Term.add [Ω] (lft rgt : Term) :

                                                                                Binary addition.

                                                                                Equations
                                                                                Instances For
                                                                                  Equations
                                                                                  • One or more equations did not get rendered due to their size.
                                                                                  Instances For

                                                                                    A real literal, read from a decimal ("1.5") or a fraction ("3/4").

                                                                                    Equations
                                                                                    Instances For

                                                                                      Cotangent.

                                                                                      Equations
                                                                                      Instances For

                                                                                        Arc secant.

                                                                                        Equations
                                                                                        Instances For
                                                                                          def Cvc.Untyped.Term.mul [Ω] (lft rgt : Term) :

                                                                                          Binary multiplication.

                                                                                          Equations
                                                                                          Instances For
                                                                                            def Cvc.Untyped.Term.ge [Ω] (lft rgt : Term) :

                                                                                            Binary greater-than-or-equal-to; geN chains, as ltN does.

                                                                                            Equations
                                                                                            Instances For
                                                                                              Equations
                                                                                              • One or more equations did not get rendered due to their size.
                                                                                              Instances For
                                                                                                def Cvc.Untyped.Term.addN' [Ω] (terms : Terms) (on0 : Env Term := mkInt 0) (on1 : Term → Env Term := pure) :

                                                                                                add over any number of terms: none gives 0, one gives that term. on0 and on1 override these.

                                                                                                Equations
                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                Instances For
                                                                                                  def Cvc.Untyped.Term.mulN [Ω] (terms : Terms) (atLeastTwoElements : 2 ≤ Array.size terms := by (try grind) <;> fail "failed to prove term array has at least two elements") :

                                                                                                  mul over two or more terms.

                                                                                                  Equations
                                                                                                  Instances For
                                                                                                    def Cvc.Untyped.Term.gtN [Ω] (terms : Terms) (atLeastTwoElements : 2 ≤ Array.size terms := by (try grind) <;> fail "failed to prove term array has at least two elements") :

                                                                                                    gt over two or more terms.

                                                                                                    Equations
                                                                                                    Instances For
                                                                                                      Equations
                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                      Instances For

                                                                                                        Square root.

                                                                                                        Equations
                                                                                                        Instances For
                                                                                                          def Cvc.Untyped.Term.toReal [Ω] (arithTerm : Term) :

                                                                                                          Conversion to a real.

                                                                                                          Equations
                                                                                                          Instances For
                                                                                                            Equations
                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                            Instances For
                                                                                                              def Cvc.Untyped.Term.isInt [Ω] (arithTerm : Term) :

                                                                                                              Whether an arithmetic term denotes an integer.

                                                                                                              Equations
                                                                                                              Instances For

                                                                                                                Sine.

                                                                                                                Equations
                                                                                                                Instances For
                                                                                                                  def Cvc.Untyped.Term.iand [Ω] (size : Nat) (lft rgt : Term) :

                                                                                                                  Bit-wise and of the low size bits of lft and rgt.

                                                                                                                  Equations
                                                                                                                  Instances For

                                                                                                                    Tangent.

                                                                                                                    Equations
                                                                                                                    Instances For

                                                                                                                      The exponential function.

                                                                                                                      Equations
                                                                                                                      Instances For
                                                                                                                        def Cvc.Untyped.Term.intDivN [Ω] (terms : Terms) (atLeastTwoElements : 2 ≤ Array.size terms := by (try grind) <;> fail "failed to prove term array has at least two elements") :

                                                                                                                        intDiv over two or more terms.

                                                                                                                        Equations
                                                                                                                        Instances For

                                                                                                                          Real division, left-associative; zero on a zero divisor.

                                                                                                                          Equations
                                                                                                                          Instances For

                                                                                                                            Secant.

                                                                                                                            Equations
                                                                                                                            Instances For
                                                                                                                              Equations
                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                              Instances For
                                                                                                                                def Cvc.Untyped.Term.realDivTotalN [Ω] (terms : Terms) (atLeastTwoElements : 2 ≤ Array.size terms := by (try grind) <;> fail "failed to prove term array has at least two elements") :

                                                                                                                                realDivTotal over two or more terms.

                                                                                                                                Equations
                                                                                                                                Instances For
                                                                                                                                  def Cvc.Untyped.Term.lt [Ω] (lft rgt : Term) :

                                                                                                                                  Binary less-than; ltN chains: ltN #[a, b, c] is a < b ∧ b < c.

                                                                                                                                  Equations
                                                                                                                                  Instances For

                                                                                                                                    Euclidean integer modulus, never negative; unspecified on a zero divisor.

                                                                                                                                    Equations
                                                                                                                                    Instances For

                                                                                                                                      Arc sine.

                                                                                                                                      Equations
                                                                                                                                      Instances For

                                                                                                                                        Arc cosine.

                                                                                                                                        Equations
                                                                                                                                        Instances For

                                                                                                                                          An integer literal.

                                                                                                                                          Equations
                                                                                                                                          Instances For
                                                                                                                                            Equations
                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                            Instances For
                                                                                                                                              Equations
                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                              Instances For
                                                                                                                                                def Cvc.Untyped.Term.addN [Ω] (terms : Terms) (atLeastTwoElements : 2 ≤ Array.size terms := by (try grind) <;> fail "failed to prove term array has at least two elements") :

                                                                                                                                                add over two or more terms.

                                                                                                                                                Equations
                                                                                                                                                Instances For

                                                                                                                                                  Takes a term apart one level, if Arith owns its operator.

                                                                                                                                                  Equations
                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                  Instances For

                                                                                                                                                    Arith's operators, taken apart one level, sort-erased.

                                                                                                                                                    Instances For

                                                                                                                                                      Values #

                                                                                                                                                      Nat goes to a term but not back: the sort is Int, so reading one back would have to fail on a negative value rather than answer.

                                                                                                                                                      The sign of an integer or real value, -1, 0 or 1, failing on any other term.

                                                                                                                                                      Equations
                                                                                                                                                      Instances For

                                                                                                                                                        Machine-width views #

                                                                                                                                                        An SMT integer is unbounded, so these say whether a value happens to fit a machine word and hand it over if it does. They are views of getIntValue, not a different value.

                                                                                                                                                        Determine if this term is an Int32 value.

                                                                                                                                                        NB: this will return true for integer constants and real constants that have integer value.

                                                                                                                                                        Equations
                                                                                                                                                        Instances For

                                                                                                                                                          Get the Int32 representation of this integral value.

                                                                                                                                                          NB: requires that this term is an Int32 value (see isInt32Value).

                                                                                                                                                          Equations
                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                          Instances For

                                                                                                                                                            Determine if this term is an Int64 value.

                                                                                                                                                            NB: this will return true for integer constants and real constants that have integer value.

                                                                                                                                                            Equations
                                                                                                                                                            Instances For

                                                                                                                                                              Get the Int64 representation of this integral value.

                                                                                                                                                              NB: requires that this term is an Int64 value (see isInt64Value).

                                                                                                                                                              Equations
                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                              Instances For

                                                                                                                                                                Determine if this term is an UInt32 value.

                                                                                                                                                                NB: this will return true for integer constants and real constants that have integer value.

                                                                                                                                                                Equations
                                                                                                                                                                Instances For

                                                                                                                                                                  Get the UInt32 representation of this integral value.

                                                                                                                                                                  NB: requires that this term is an UInt32 value (see isUInt32Value).

                                                                                                                                                                  Equations
                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                  Instances For

                                                                                                                                                                    Determine if this term is an UInt64 value.

                                                                                                                                                                    NB: this will return true for integer constants and real constants that have integer value.

                                                                                                                                                                    Equations
                                                                                                                                                                    Instances For

                                                                                                                                                                      Get the UInt64 representation of this integral value.

                                                                                                                                                                      NB: requires that this term is an UInt64 value (see isUInt64Value).

                                                                                                                                                                      Equations
                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                      Instances For

                                                                                                                                                                        Whether a term denotes a real that fits a 32-bit numerator and denominator.

                                                                                                                                                                        Equations
                                                                                                                                                                        Instances For

                                                                                                                                                                          The numerator and denominator of a real value, at 32 bits.

                                                                                                                                                                          Equations
                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                          Instances For

                                                                                                                                                                            Whether a term denotes a real that fits a 64-bit numerator and denominator.

                                                                                                                                                                            Equations
                                                                                                                                                                            Instances For

                                                                                                                                                                              The numerator and denominator of a real value, at 64 bits.

                                                                                                                                                                              Equations
                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                              Instances For

                                                                                                                                                                                Real algebraic numbers #

                                                                                                                                                                                A real algebraic number is not a rational, so it has no getRatValue. It is described instead by a polynomial it is a root of, together with an interval isolating that root.

                                                                                                                                                                                Determine if this term is a real algebraic number.

                                                                                                                                                                                Equations
                                                                                                                                                                                Instances For

                                                                                                                                                                                  The polynomial a real algebraic number is a root of, written in the bound variable v.

                                                                                                                                                                                  Equations
                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                  Instances For

                                                                                                                                                                                    Determine if this real/integer constant term is an integral value.

                                                                                                                                                                                    Equations
                                                                                                                                                                                    Instances For

                                                                                                                                                                                      The integer a term denotes, failing if it denotes none.

                                                                                                                                                                                      Equations
                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                      Instances For

                                                                                                                                                                                        The integer a term denotes, failing if it denotes none.

                                                                                                                                                                                        Equations
                                                                                                                                                                                        Instances For

                                                                                                                                                                                          Determine if this term is a rational value.

                                                                                                                                                                                          NB: A term of kind Kind.PI is not considered to be a real value.

                                                                                                                                                                                          Equations
                                                                                                                                                                                          Instances For

                                                                                                                                                                                            The real a term denotes as a string, failing if it denotes none.

                                                                                                                                                                                            Equations
                                                                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                                                                            Instances For

                                                                                                                                                                                              The real a term denotes as a string, failing if it denotes none.

                                                                                                                                                                                              Equations
                                                                                                                                                                                              Instances For

                                                                                                                                                                                                The real a term denotes as a Rat, failing if it denotes none.

                                                                                                                                                                                                An irrational model value, which nonlinear real arithmetic can produce, is no Rat: read it as a term instead, and take it apart with the getRealAlgebraicNumber… functions.

                                                                                                                                                                                                Equations
                                                                                                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                Instances For

                                                                                                                                                                                                  The real a term denotes as a Rat, failing if it denotes none.

                                                                                                                                                                                                  An irrational model value, which nonlinear real arithmetic can produce, is no Rat: read it as a term instead, and take it apart with the getRealAlgebraicNumber… functions.

                                                                                                                                                                                                  Equations
                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                    @[instance_reducible]
                                                                                                                                                                                                    Equations
                                                                                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                    @[instance_reducible]
                                                                                                                                                                                                    Equations
                                                                                                                                                                                                    @[instance_reducible]
                                                                                                                                                                                                    Equations
                                                                                                                                                                                                    • One or more equations did not get rendered due to their size.

                                                                                                                                                                                                    smt! literals #

                                                                                                                                                                                                    Integer and real literals in smt!. Without this module smt! accepts neither.

                                                                                                                                                                                                    Integer literal.

                                                                                                                                                                                                    Equations
                                                                                                                                                                                                    Instances For

                                                                                                                                                                                                      Real literal, 1.5 or 1.5e-3.

                                                                                                                                                                                                      Equations
                                                                                                                                                                                                      Instances For