Documentation

Cvc.Defs

Functions and monads for term, term building, SMT etc. helpers and monads #

structure Cvc.Term (α : Type) :

Type-safe cvc5 terms, input type expected to be IsSrt for most uses.

  • No direct constructor exposed publicly, users must go through the Term.Build monadic constructors.
  • ofUnsafe :: (
    • hasSymbols : Bool

      True if the term mentions symbols.

    • toUnsafe : cvc5.Term

      Underlying unsafe term.

  • )
Instances For
    @[reducible, inline]

    Abbreviation for a Term Bool.

    Equations
    Instances For
      @[reducible, inline]

      Boolean terms: Term Bool.

      Equations
      Instances For
        @[reducible, inline]

        Integer terms: Term Int.

        Equations
        Instances For
          @[reducible, inline]

          Real/Rat terms: Term Rat.

          Equations
          Instances For
            @[reducible, inline]

            String terms: Term String.

            Equations
            Instances For
              @[reducible, inline]
              abbrev Cvc.Term.Array (α β : Type) :

              Array terms.

              Equations
              Instances For
                @[reducible, inline]
                abbrev Cvc.Term.Seq (α : Type) :

                Sequence terms.

                Equations
                Instances For
                  @[reducible, inline]
                  abbrev Cvc.Term.Fun (α β : Type) :

                  Function terms.

                  Equations
                  Instances For
                    @[reducible, inline]
                    abbrev Cvc.Term.Prod (α β : Type) :

                    Product terms.

                    Equations
                    Instances For
                      @[reducible, inline]
                      abbrev Cvc.Term.srt {α : Type} [A : IsSrt α] (term : Term α) :

                      Sort of some term.

                      Note that due to strong-typing, this function does not perform any FFI.

                      Equations
                      Instances For
                        theorem Cvc.Term.srt_bij {α : Type} [A : IsSrt α] (term : Term α) :
                        α = term.srt.toType
                        def Cvc.Term.retype {α : Type} [A : IsSrt α] (term : Term α) :

                        Re-types t in terms of the type of t.srt.

                        Equations
                        Instances For
                          def Cvc.Term.inspectSrt {α : Type} [A : IsSrt α] (term : Term α) {β : Sort u_1} (f : (srt : Srt) → Term srt.toTypeβ) :
                          β

                          Helper for dependent-pattern-matching the sort of a term.

                          Equations
                          Instances For
                            def Cvc.Term.toSmtString {α : Type} (term : Term α) :

                            SMT-LIB string representation.

                            Equations
                            Instances For

                              Term building #

                              State of the term builder monad.

                              • mk' :: (
                                • Term manager.

                                • Logic builder, used to track the logic necessary to express the terms actually built.

                                  Updated when building terms.

                              • )
                              Instances For

                                Constructor from a term manager.

                                Equations
                                Instances For

                                  Creates a new term builder state.

                                  Equations
                                  Instances For
                                    @[reducible, inline]
                                    abbrev Cvc.Term.BuildT (m : TypeType u) (α : Type) :

                                    Term-building error-state-monad transformer.

                                    Equations
                                    Instances For
                                      @[reducible, inline]
                                      abbrev Cvc.Term.BuildIO (α : Type) :

                                      Term-building error-state-monad in IO.

                                      Equations
                                      Instances For
                                        @[reducible, inline]
                                        abbrev Cvc.Term.Build (α : Type) :

                                        Plain term-building error-state-monad.

                                        Equations
                                        Instances For
                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Equations
                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          def Cvc.Term.BuildT.runWith' {m : TypeType u_1} {α : Type} (build : BuildT m α) (state : Build.State) :

                                          Runs term-building code with a specific build state.

                                          Equations
                                          Instances For
                                            def Cvc.Term.BuildT.runWith {m : TypeType u_1} [Monad m] {α : Type} (build : BuildT m α) (state : Build.State) :
                                            m (Except Error α)

                                            Runs term-building code with a specific build state.

                                            Equations
                                            Instances For
                                              def Cvc.Term.BuildT.run' {m : TypeType u_1} [Monad m] {α : Type} [MonadLiftT BaseIO m] (build : BuildT m α) (state? : Option Build.State := none) :

                                              Runs term-building code, creates an initial build state if none is provided.

                                              Equations
                                              Instances For
                                                def Cvc.Term.BuildT.run {m : TypeType u_1} [Monad m] {α : Type} [MonadLiftT BaseIO m] (build : BuildT m α) (state? : Option Build.State := none) :
                                                m (Except Error α)

                                                Runs term-building code, creates an initial build state if none is provided.

                                                Equations
                                                Instances For
                                                  def Cvc.Term.BuildT.runIO' {α : Type} (build : BuildIO α) (state? : Option Build.State := none) :

                                                  Runs term-building code in IO, creates an initial build state if none is provided

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    def Cvc.Term.BuildT.runIO {α : Type} (build : BuildIO α) (state? : Option Build.State := none) :
                                                    IO α

                                                    Runs term-building code in IO, creates an initial build state if none is provided

                                                    Equations
                                                    Instances For

                                                      Conversion to unsafe sorts.

                                                      • function sorts are flattened:

                                                        srt → srt' → srt'' → nonFunSrt becomes #[srt, srt', srt''] → nonFunSrt
                                                      Equations
                                                      Instances For
                                                        @[irreducible]
                                                        def Cvc.Srt.toSort.aux (srt : Srt) (tm : cvc5.TermManager) (srt' : Srt) (maxRec : Nat) :
                                                        Equations
                                                        Instances For
                                                          @[irreducible]
                                                          Equations
                                                          Instances For

                                                            Term creation API #

                                                            Builds a constant Boolean term.

                                                            Equations
                                                            Instances For

                                                              Retrieves the value of a constant Boolean term.

                                                              Equations
                                                              Instances For

                                                                Retrieves the value of a constant Boolean term.

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

                                                                  Builds a constant integer term.

                                                                  Equations
                                                                  Instances For

                                                                    Retrieves the value of a constant integer term.

                                                                    Equations
                                                                    Instances For

                                                                      Retrieves the value of a constant integer term.

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

                                                                        Retrieves the value of a constant rational/real term.

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

                                                                          Retrieves the value of a constant rational/real term.

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

                                                                            Builds the Boolean negation of a term.

                                                                            Equations
                                                                            Instances For

                                                                              Builds the Boolean negation of a term.

                                                                              Equations
                                                                              Instances For
                                                                                def Cvc.Term.ite {α : Type} [IsSrt α] (cnd : Term.Bool) (thn els : Term α) :
                                                                                Build (Term α)

                                                                                Builds an if-then-else term.

                                                                                Equations
                                                                                Instances For

                                                                                  n-ary operators (2 ≤ n) #

                                                                                  def Cvc.Term.mkAnd (terms : Array (Term Bool)) (h_size : 2 terms.size := by (try (try simp <;> try omega); done) <;> fail "expected an array of **at least** two terms") :

                                                                                  Builds a conjunction term.

                                                                                  Equations
                                                                                  Instances For

                                                                                    Builds a conjunction term.

                                                                                    Equations
                                                                                    Instances For
                                                                                      def Cvc.Term.mkOr (terms : Array (Term Bool)) (h_size : 2 terms.size := by (try (try simp <;> try omega); done) <;> fail "expected an array of **at least** two terms") :

                                                                                      Builds a disjunction term.

                                                                                      Equations
                                                                                      Instances For
                                                                                        def Cvc.Term.or (lft rgt : Term Bool) :

                                                                                        Builds a disjunction term.

                                                                                        Equations
                                                                                        Instances For
                                                                                          def Cvc.Term.mkXor (terms : Array (Term Bool)) (h_size : 2 terms.size := by (try (try simp <;> try omega); done) <;> fail "expected an array of **at least** two terms") :

                                                                                          Builds an exclusive-disjunction term.

                                                                                          Equations
                                                                                          Instances For

                                                                                            Builds an exclusive-disjunction term.

                                                                                            Equations
                                                                                            Instances For
                                                                                              def Cvc.Term.mkImplies (terms : Array (Term Bool)) (h_size : 2 terms.size := by (try (try simp <;> try omega); done) <;> fail "expected an array of **at least** two terms") :

                                                                                              Builds a disjunction term.

                                                                                              Equations
                                                                                              Instances For

                                                                                                Builds a disjunction term.

                                                                                                Equations
                                                                                                Instances For
                                                                                                  def Cvc.Term.mkEqual {α : Type} (terms : Array (Term α)) (h_size : 2 terms.size := by (try (try simp <;> try omega); done) <;> fail "expected an array of **at least** two terms") :

                                                                                                  Builds an equality term.

                                                                                                  Equations
                                                                                                  Instances For
                                                                                                    def Cvc.Term.equal {α : Type} (lft rgt : Term α) :

                                                                                                    Builds an equality term.

                                                                                                    Equations
                                                                                                    Instances For
                                                                                                      def Cvc.Term.mkDistinct {α : Type} (terms : Array (Term α)) (h_size : 2 terms.size := by (try (try simp <;> try omega); done) <;> fail "expected an array of **at least** two terms") :

                                                                                                      Builds a pairwise-distinct term.

                                                                                                      Equations
                                                                                                      Instances For
                                                                                                        def Cvc.Term.distinct {α : Type} (lft rgt : Term α) :

                                                                                                        Builds a pairwise-distinct term.

                                                                                                        Equations
                                                                                                        Instances For
                                                                                                          @[reducible, inline]
                                                                                                          abbrev Cvc.Term.mkNEqual {α : Type} (lft rgt : Term α) :

                                                                                                          Builds a pairwise-distinct term.

                                                                                                          Equations
                                                                                                          Instances For
                                                                                                            @[reducible, inline]
                                                                                                            abbrev Cvc.Term.nequal {α : Type} (lft rgt : Term α) :

                                                                                                            Builds a pairwise-distinct term.

                                                                                                            Equations
                                                                                                            Instances For
                                                                                                              def Cvc.Term.mkLt {α : Type} (terms : Array (Term α)) (h_size : 2 terms.size := by (try (try simp <;> try omega); done) <;> fail "expected an array of **at least** two terms") :

                                                                                                              Builds a less-than term.

                                                                                                              Equations
                                                                                                              Instances For
                                                                                                                def Cvc.Term.lt {α : Type} (lft rgt : Term α) :

                                                                                                                Builds a less-than term.

                                                                                                                Equations
                                                                                                                Instances For
                                                                                                                  def Cvc.Term.mkLe {α : Type} (terms : Array (Term α)) (h_size : 2 terms.size := by (try (try simp <;> try omega); done) <;> fail "expected an array of **at least** two terms") :

                                                                                                                  Builds a less-than-or-equal-to term.

                                                                                                                  Equations
                                                                                                                  Instances For
                                                                                                                    def Cvc.Term.le {α : Type} (lft rgt : Term α) :

                                                                                                                    Builds a less-than-or-equal-to term.

                                                                                                                    Equations
                                                                                                                    Instances For
                                                                                                                      def Cvc.Term.mkGe {α : Type} (terms : Array (Term α)) (h_size : 2 terms.size := by (try (try simp <;> try omega); done) <;> fail "expected an array of **at least** two terms") :

                                                                                                                      Builds a greater-than-or-equal-to term.

                                                                                                                      Equations
                                                                                                                      Instances For
                                                                                                                        def Cvc.Term.ge {α : Type} (lft rgt : Term α) :

                                                                                                                        Builds a greater-than-or-equal-to term.

                                                                                                                        Equations
                                                                                                                        Instances For
                                                                                                                          def Cvc.Term.mkGt {α : Type} (terms : Array (Term α)) (h_size : 2 terms.size := by (try (try simp <;> try omega); done) <;> fail "expected an array of **at least** two terms") :

                                                                                                                          Builds a greater-than term.

                                                                                                                          Equations
                                                                                                                          Instances For
                                                                                                                            def Cvc.Term.gt {α : Type} (lft rgt : Term α) :

                                                                                                                            Builds a greater-than term.

                                                                                                                            Equations
                                                                                                                            Instances For

                                                                                                                              Arithmetic #

                                                                                                                              def Cvc.Term.mkAdd {α : Type} [IsSrt α] (terms : Array (Term α)) (h_size : 2 terms.size := by (try (try simp <;> try omega); done) <;> fail "expected an array of **at least** two terms") (Arith : IsSrt.Arith α := by (try (exact inferInstance); done) <;> fail "expected arithmetic type `Int` or `Rat`, see `Cvc.is_arith` and `Cvc.IsSrt.Arith`") :
                                                                                                                              Build (Term α)

                                                                                                                              Builds an addition term.

                                                                                                                              • Forbids difference logics.
                                                                                                                              Equations
                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                              Instances For
                                                                                                                                def Cvc.Term.add {α : Type} [IsSrt α] (lft rgt : Term α) (Arith : IsSrt.Arith α := by (try (exact inferInstance); done) <;> fail "expected arithmetic type `Int` or `Rat`, see `Cvc.is_arith` and `Cvc.IsSrt.Arith`") :
                                                                                                                                Build (Term α)

                                                                                                                                Builds an addition term.

                                                                                                                                • Forbids difference logics.
                                                                                                                                Equations
                                                                                                                                Instances For
                                                                                                                                  def Cvc.Term.mkSub {α : Type} [IsSrt α] (terms : Array (Term α)) (h_size : 2 terms.size := by (try (try simp <;> try omega); done) <;> fail "expected an array of **at least** two terms") (Arith : IsSrt.Arith α := by (try (exact inferInstance); done) <;> fail "expected arithmetic type `Int` or `Rat`, see `Cvc.is_arith` and `Cvc.IsSrt.Arith`") :
                                                                                                                                  Build (Term α)

                                                                                                                                  Builds a subtraction term.

                                                                                                                                  Equations
                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                  Instances For
                                                                                                                                    def Cvc.Term.sub {α : Type} [IsSrt α] (lft rgt : Term α) (Arith : IsSrt.Arith α := by (try (exact inferInstance); done) <;> fail "expected arithmetic type `Int` or `Rat`, see `Cvc.is_arith` and `Cvc.IsSrt.Arith`") :
                                                                                                                                    Build (Term α)

                                                                                                                                    Builds a subtraction term.

                                                                                                                                    Equations
                                                                                                                                    Instances For
                                                                                                                                      def Cvc.Term.neg {α : Type} [IsSrt α] (term : Term α) (Arith : IsSrt.Arith α := by (try (exact inferInstance); done) <;> fail "expected arithmetic type `Int` or `Rat`, see `Cvc.is_arith` and `Cvc.IsSrt.Arith`") :
                                                                                                                                      Build (Term α)
                                                                                                                                      Equations
                                                                                                                                      Instances For
                                                                                                                                        def Cvc.Term.mkMul {α : Type} [IsSrt α] (terms : Array (Term α)) (h_size : 2 terms.size := by (try (try simp <;> try omega); done) <;> fail "expected an array of **at least** two terms") (Arith : IsSrt.Arith α := by (try (exact inferInstance); done) <;> fail "expected arithmetic type `Int` or `Rat`, see `Cvc.is_arith` and `Cvc.IsSrt.Arith`") :
                                                                                                                                        Build (Term α)

                                                                                                                                        Builds a multiplication term.

                                                                                                                                        • Forbids difference logic.
                                                                                                                                        • Forces non-linear logic if non-linear.
                                                                                                                                        Equations
                                                                                                                                        Instances For
                                                                                                                                          def Cvc.Term.mul {α : Type} [IsSrt α] (lft rgt : Term α) (Arith : IsSrt.Arith α := by (try (exact inferInstance); done) <;> fail "expected arithmetic type `Int` or `Rat`, see `Cvc.is_arith` and `Cvc.IsSrt.Arith`") :
                                                                                                                                          Build (Term α)

                                                                                                                                          Builds a multiplication term.

                                                                                                                                          • Forbids difference logic.
                                                                                                                                          • Forces non-linear logic if non-linear.
                                                                                                                                          Equations
                                                                                                                                          Instances For
                                                                                                                                            def Cvc.Term.mkDiv! {α : Type} [IsSrt α] (terms : Array (Term α)) (h_size : 2 terms.size := by (try (try simp <;> try omega); done) <;> fail "expected an array of **at least** two terms") (Arith : IsSrt.Arith α := by (try (exact inferInstance); done) <;> fail "expected arithmetic type `Int` or `Rat`, see `Cvc.is_arith` and `Cvc.IsSrt.Arith`") :
                                                                                                                                            Build (Term α)

                                                                                                                                            Arithmetic division with division by 0 undefined, left associative.

                                                                                                                                            • Forbids difference logic.
                                                                                                                                            • Forces non-linear logic if non-linear.
                                                                                                                                            Equations
                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                            Instances For
                                                                                                                                              def Cvc.Term.div! {α : Type} [IsSrt α] (lft rgt : Term α) (Arith : IsSrt.Arith α := by (try (exact inferInstance); done) <;> fail "expected arithmetic type `Int` or `Rat`, see `Cvc.is_arith` and `Cvc.IsSrt.Arith`") :
                                                                                                                                              Build (Term α)

                                                                                                                                              Arithmetic division with division by 0 undefined, left associative.

                                                                                                                                              • Forbids difference logic.
                                                                                                                                              • Forces non-linear logic if non-linear.
                                                                                                                                              Equations
                                                                                                                                              Instances For
                                                                                                                                                def Cvc.Term.mkDivTotal {α : Type} [IsSrt α] (lft rgt : Term α) (Arith : IsSrt.Arith α := by (try (exact inferInstance); done) <;> fail "expected arithmetic type `Int` or `Rat`, see `Cvc.is_arith` and `Cvc.IsSrt.Arith`") :
                                                                                                                                                Build (Term α)

                                                                                                                                                Arithmetic division with division by 0 defined to be 0, left associative.

                                                                                                                                                Equations
                                                                                                                                                • One or more equations did not get rendered due to their size.
                                                                                                                                                Instances For
                                                                                                                                                  def Cvc.Term.divTotal {α : Type} [IsSrt α] (lft rgt : Term α) (Arith : IsSrt.Arith α := by (try (exact inferInstance); done) <;> fail "expected arithmetic type `Int` or `Rat`, see `Cvc.is_arith` and `Cvc.IsSrt.Arith`") :
                                                                                                                                                  Build (Term α)

                                                                                                                                                  Arithmetic division with division by 0 defined to be 0, left associative.

                                                                                                                                                  Equations
                                                                                                                                                  Instances For

                                                                                                                                                    Function application #

                                                                                                                                                    def Cvc.Term.apply {β α : Type} [IsSrt β] (function : Term (αβ)) (arg : Term α) :
                                                                                                                                                    Build (Term β)

                                                                                                                                                    Applies a function term to an argument.

                                                                                                                                                    Partial applications and higher-order #

                                                                                                                                                    This function supports partial applications: they are encoded as cvc5.Kind.HO_APPLY terms, which would trigger errors if used in a solver without support for higher-order. Since support for higher-order makes cvc5-level reasoning much more expensive, we want to avoid having HO_APPLY terms as much as possible.

                                                                                                                                                    For this reason, this function detects when it is building an application that yields a non-function term; in this case, it will destruct the underlying higher-order terms (recursively, and if any) and rewrite them as a regular (first-order) function application.

                                                                                                                                                    Equations
                                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                                    Instances For
                                                                                                                                                      structure Cvc.Value (α : Type) :

                                                                                                                                                      A term-value, as produced by getValue-like (SMT) function.

                                                                                                                                                      • ofTerm :: (
                                                                                                                                                        • toTerm : Term α

                                                                                                                                                          Underlying term.

                                                                                                                                                      • )
                                                                                                                                                      Instances For
                                                                                                                                                        def Cvc.Value.toString {α : Type} (value : Value α) :
                                                                                                                                                        Equations
                                                                                                                                                        Instances For
                                                                                                                                                          @[reducible, inline]

                                                                                                                                                          Boolean values.

                                                                                                                                                          Equations
                                                                                                                                                          Instances For
                                                                                                                                                            @[reducible, inline]

                                                                                                                                                            Integer values.

                                                                                                                                                            Equations
                                                                                                                                                            Instances For
                                                                                                                                                              @[reducible, inline]

                                                                                                                                                              Real/Rat values.

                                                                                                                                                              Equations
                                                                                                                                                              Instances For
                                                                                                                                                                @[reducible, inline]

                                                                                                                                                                String values.

                                                                                                                                                                Equations
                                                                                                                                                                Instances For
                                                                                                                                                                  @[reducible, inline]
                                                                                                                                                                  abbrev Cvc.Value.Array (α β : Type) :

                                                                                                                                                                  Array values.

                                                                                                                                                                  Equations
                                                                                                                                                                  Instances For
                                                                                                                                                                    @[reducible, inline]
                                                                                                                                                                    abbrev Cvc.Value.Seq (α : Type) :

                                                                                                                                                                    Sequence values.

                                                                                                                                                                    Equations
                                                                                                                                                                    Instances For
                                                                                                                                                                      @[reducible, inline]
                                                                                                                                                                      abbrev Cvc.Value.Fun (α β : Type) :

                                                                                                                                                                      Function values.

                                                                                                                                                                      Equations
                                                                                                                                                                      Instances For
                                                                                                                                                                        @[reducible, inline]
                                                                                                                                                                        abbrev Cvc.Value.Prod (α β : Type) :

                                                                                                                                                                        Product values.

                                                                                                                                                                        Equations
                                                                                                                                                                        Instances For
                                                                                                                                                                          @[reducible, inline]
                                                                                                                                                                          abbrev Cvc.Value.srt {α : Type} [A : IsSrt α] (value : Value α) :
                                                                                                                                                                          Equations
                                                                                                                                                                          Instances For
                                                                                                                                                                            theorem Cvc.Value.srt_bij {α : Type} [A : IsSrt α] (value : Value α) :
                                                                                                                                                                            α = value.srt.toType
                                                                                                                                                                            def Cvc.Value.retype {α : Type} [A : IsSrt α] (value : Value α) :
                                                                                                                                                                            Equations
                                                                                                                                                                            Instances For
                                                                                                                                                                              def Cvc.Value.inspectSrt {α : Type} [A : IsSrt α] (value : Value α) {β : Sort u_1} (f : (srt : Srt) → Value srt.toTypeβ) :
                                                                                                                                                                              β
                                                                                                                                                                              Equations
                                                                                                                                                                              Instances For
                                                                                                                                                                                Equations
                                                                                                                                                                                Instances For
                                                                                                                                                                                  Equations
                                                                                                                                                                                  Instances For
                                                                                                                                                                                    Equations
                                                                                                                                                                                    Instances For
                                                                                                                                                                                      class Cvc.Conv.ValueToVal (m : TypeType) (α : Type) extends Cvc.IsSrt α :
                                                                                                                                                                                      Instances
                                                                                                                                                                                        @[reducible, inline]
                                                                                                                                                                                        Equations
                                                                                                                                                                                        Instances For
                                                                                                                                                                                          def Cvc.Conv.ValueToVal.mk {α : Type} {m : TypeType} [IsSrt α] (Val : Type) (ofValue : Value αm Val) :
                                                                                                                                                                                          Equations
                                                                                                                                                                                          Instances For
                                                                                                                                                                                            Equations
                                                                                                                                                                                            Instances For
                                                                                                                                                                                              @[reducible, inline]
                                                                                                                                                                                              abbrev Cvc.Conv.ValueToVal.adaptM {m : TypeType} {α : Type} {m' : TypeType} [A : ValueToVal m α] (lift : {β : Type} → m βm' β) :
                                                                                                                                                                                              Equations
                                                                                                                                                                                              Instances For
                                                                                                                                                                                                @[reducible, inline]
                                                                                                                                                                                                abbrev Cvc.Conv.ValueToVal.liftM {m m' : TypeType} {α : Type} [MonadLiftT m m'] [A : ValueToVal m α] :
                                                                                                                                                                                                Equations
                                                                                                                                                                                                Instances For
                                                                                                                                                                                                  @[reducible, inline]
                                                                                                                                                                                                  Equations
                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                    class Cvc.Conv.ValuesToVal (m : TypeType) :
                                                                                                                                                                                                    Instances
                                                                                                                                                                                                      @[reducible, inline]
                                                                                                                                                                                                      Equations
                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                        @[reducible, inline]
                                                                                                                                                                                                        Equations
                                                                                                                                                                                                        Instances For

                                                                                                                                                                                                          Conversion of term-values #

                                                                                                                                                                                                          Instances
                                                                                                                                                                                                            Equations
                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                              Instances
                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                Instances For

                                                                                                                                                                                                                  Smt environment and functions #

                                                                                                                                                                                                                  structure Cvc.Smt.State :
                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                    @[reducible, inline]
                                                                                                                                                                                                                    abbrev Cvc.SmtT (m : TypeType) (α : Type) :
                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                    Instances For
                                                                                                                                                                                                                      @[reducible, inline]
                                                                                                                                                                                                                      abbrev Cvc.SmtIO (α : Type) :
                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                        @[reducible, inline]
                                                                                                                                                                                                                        abbrev Cvc.Smt (α : Type) :
                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                          instance Cvc.Smt.instMonadLiftSmtT {m : TypeType} [Monad m] :
                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                          instance Cvc.Smt.instMonadLiftSmtTOfMonad {m m' : TypeType} [Monad m] [Monad m'] [MonadLift m m'] :
                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                          Instances For

                                                                                                                                                                                                                            Sets an option in the solver.

                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                              def Cvc.Smt.declare (symbol : String) (α : Type) [IsSrt α] :
                                                                                                                                                                                                                              Smt (Term α)

                                                                                                                                                                                                                              Declares a function symbol.

                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                def Cvc.Smt.declare' {α : Type} [IsSrt α] (symbol : String) :
                                                                                                                                                                                                                                Smt (Term α)

                                                                                                                                                                                                                                Declares a function symbol.

                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                                  def Cvc.Smt.assert (formula : Formula) :

                                                                                                                                                                                                                                  Asserts a formula.

                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                  Instances For

                                                                                                                                                                                                                                    Checks the satisfiability of the formulas asserted with Smt.assert.

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

                                                                                                                                                                                                                                      Simplified Smt.checkSat, returns true/false for sat/unsat, none for unknown/unexpected.

                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                        @[reducible, inline]
                                                                                                                                                                                                                                        abbrev Cvc.Smt.SatT (m : TypeType u) (α : Type) :

                                                                                                                                                                                                                                        Sat-mode monad, allows running commands such as get-value.

                                                                                                                                                                                                                                        Smt does not lift to this monad as this would allow issuing a check-sat that could switch to a different solver mode.

                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                                                          @[reducible, inline]
                                                                                                                                                                                                                                          abbrev Cvc.Smt.Sat (α : Type) :

                                                                                                                                                                                                                                          Sat-mode monad, allows running commands such as get-value.

                                                                                                                                                                                                                                          Smt does not lift to this monad as this would allow issuing a check-sat that could switch to a different solver mode.

                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                            def Cvc.Smt.Sat.unexpected {m : TypeType u_1} [Monad m] {α : Type} :
                                                                                                                                                                                                                                            SatT m α
                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                                              @[reducible, inline]
                                                                                                                                                                                                                                              abbrev Cvc.Smt.UnsatT (m : TypeType u) (α : Type) :

                                                                                                                                                                                                                                              Unsat-mode monad, allows running commands such as get-proof.

                                                                                                                                                                                                                                              Smt does not lift to this monad as this would allow issuing a check-sat that could switch to a different solver mode.

                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                @[reducible, inline]
                                                                                                                                                                                                                                                abbrev Cvc.Smt.Unsat (α : Type) :

                                                                                                                                                                                                                                                Unsat-mode monad, allows running commands such as get-proof.

                                                                                                                                                                                                                                                Smt does not lift to this monad as this would allow issuing a check-sat that could switch to a different solver mode.

                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                                                  def Cvc.Smt.Unsat.unexpected {m : TypeType u_1} [Monad m] {α : Type} :
                                                                                                                                                                                                                                                  UnsatT m α
                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                    @[reducible, inline]
                                                                                                                                                                                                                                                    abbrev Cvc.Smt.UnknownT (m : TypeType u) (α : Type) :

                                                                                                                                                                                                                                                    Unknown-mode monad, allows running unknown-mode-specific commands.

                                                                                                                                                                                                                                                    Smt does not lift to this monad as this would allow issuing a check-sat that could switch to a different solver mode.

                                                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                                                    Instances For
                                                                                                                                                                                                                                                      @[reducible, inline]
                                                                                                                                                                                                                                                      abbrev Cvc.Smt.Unknown (α : Type) :

                                                                                                                                                                                                                                                      Unknown-mode monad, allows running unknown-mode-specific commands.

                                                                                                                                                                                                                                                      Smt does not lift to this monad as this would allow issuing a check-sat that could switch to a different solver mode.

                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                        def Cvc.Smt.Unknown.unexpected {m : TypeType u_1} [Monad m] {α : Type} :
                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                                                                          def Cvc.Smt.checkSatAnd {m : TypeType} [Monad m] {α : Type} (assuming : Option (Array Formula) := none) (ifSat : SatT m α := Sat.unexpected) (ifUnsat : UnsatT m α := Unsat.unexpected) (ifUnknown : UnknownT m α := Unknown.unexpected) :
                                                                                                                                                                                                                                                          SmtT m α

                                                                                                                                                                                                                                                          Performs a check-sat and runs sat/unsat/unknown-specific code.

                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                          • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                            def Cvc.Smt.Sat.getValue {α : Type} (term : Term α) :
                                                                                                                                                                                                                                                            Sat (Value α)

                                                                                                                                                                                                                                                            Retrieves the value of a term in Sat mode.

                                                                                                                                                                                                                                                            This function is available the following namespaces: Cvc.Term, Cvc.Smt, and Cvc.Smt.Sat.

                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                                                              def Cvc.Smt.Sat.getValues {α : Type} (terms : Array (Term α)) :
                                                                                                                                                                                                                                                              Sat (Array (Term α × Value α))

                                                                                                                                                                                                                                                              Retrieves the values of some terms of the same sort in Sat mode.

                                                                                                                                                                                                                                                              This function is available the following namespaces: Cvc.Term, Cvc.Smt, and Cvc.Smt.Sat.

                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                def Cvc.Smt.Sat.getValUsing {m : TypeType} {α : Type} [Monad m] [MonadLiftT m Sat] (Val : Conv.ValueToVal m α) (term : Term α) :

                                                                                                                                                                                                                                                                Retrieves the concrete Value of a term in Sat mode.

                                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                                                                  def Cvc.Smt.Sat.getVal {m : TypeType} {α : Type} [Monad m] [MonadLiftT m Sat] [Val : Conv.ValueToVal m α] (term : Term α) :

                                                                                                                                                                                                                                                                  Retrieves the concrete Value of a term in Sat mode.

                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                  Instances For

                                                                                                                                                                                                                                                                    Retrieves the concrete values of some terms of the same sort in Sat mode.

                                                                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                                                                    • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                    Instances For
                                                                                                                                                                                                                                                                      def Cvc.Smt.Sat.getVals {α : Type} [Val : Conv.ValueToVal Sat α] (terms : Array (Term α)) :

                                                                                                                                                                                                                                                                      Retrieves the concrete values of some terms of the same sort in Sat mode.

                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                        def Cvc.Term.getSymbol? {α : Type} (term : Term α) :

                                                                                                                                                                                                                                                                        Returns the symbol of a symbol-term.

                                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                                        Instances For
                                                                                                                                                                                                                                                                          def Cvc.SmtT.runWith' {m : TypeType} {α : Type} (smt : SmtT m α) (state : Smt.State) :
                                                                                                                                                                                                                                                                          Equations
                                                                                                                                                                                                                                                                          Instances For
                                                                                                                                                                                                                                                                            def Cvc.SmtT.runWith {m : TypeType} [M : Monad m] {α : Type} (smt : SmtT m α) (state : Smt.State) :
                                                                                                                                                                                                                                                                            m (Except Error α)
                                                                                                                                                                                                                                                                            Equations
                                                                                                                                                                                                                                                                            Instances For
                                                                                                                                                                                                                                                                              def Cvc.SmtT.run' {m : TypeType} [M : Monad m] {α : Type} [MonadLiftT BaseIO m] (smt : SmtT m α) (state? : Option Smt.State := none) :
                                                                                                                                                                                                                                                                              Equations
                                                                                                                                                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                              • smt.run' (some state) = do let __discrsmt.runWith' state match __discr with | (res, state) => pure (Except.map (fun (x : α) => (x, state)) res)
                                                                                                                                                                                                                                                                              Instances For
                                                                                                                                                                                                                                                                                @[reducible, inline]
                                                                                                                                                                                                                                                                                abbrev Cvc.SmtT.run {m : TypeType} [M : Monad m] {α : Type} [MonadLiftT BaseIO m] (smt : SmtT m α) (state? : Option Smt.State := none) :
                                                                                                                                                                                                                                                                                m (Except Error α)
                                                                                                                                                                                                                                                                                Equations
                                                                                                                                                                                                                                                                                Instances For
                                                                                                                                                                                                                                                                                  def Cvc.SmtT.runIO' {α : Type} (smt : SmtIO α) (state? : Option Smt.State := none) :
                                                                                                                                                                                                                                                                                  Equations
                                                                                                                                                                                                                                                                                  • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                  Instances For
                                                                                                                                                                                                                                                                                    def Cvc.SmtT.runIO {α : Type} (smt : SmtIO α) (state? : Option Smt.State := none) :
                                                                                                                                                                                                                                                                                    IO α
                                                                                                                                                                                                                                                                                    Equations
                                                                                                                                                                                                                                                                                    Instances For
                                                                                                                                                                                                                                                                                      def Cvc.SmtT.runWithBuilder' {m : TypeType} [M : Monad m] {α : Type} (smt : SmtT m α) (builder : Term.Build.State) :
                                                                                                                                                                                                                                                                                      Equations
                                                                                                                                                                                                                                                                                      • One or more equations did not get rendered due to their size.
                                                                                                                                                                                                                                                                                      Instances For
                                                                                                                                                                                                                                                                                        def Cvc.SmtT.runWithBuilder {m : TypeType} [M : Monad m] {α : Type} (smt : SmtT m α) (builder : Term.Build.State) :
                                                                                                                                                                                                                                                                                        m (Except Error α)
                                                                                                                                                                                                                                                                                        Equations
                                                                                                                                                                                                                                                                                        Instances For