Documentation

Cvc.Basic

Library setup: re-exports and helpers #

@[reducible, inline]
abbrev Cvc.𝕂 {α : Sort u_1} {β : Sort u_2} (val : α) :
βα

The constant combinator.

Equations
Instances For
    @[reducible, inline]
    abbrev Cvc.RBMap (α β : Type) [Ord α] :
    Equations
    Instances For
      def Cvc.RBMap.empty {α : Type} [Ord α] {β : Type} :
      RBMap α β

      The empty map.

      Equations
      Instances For
        def Cvc.RBMap.ofList {α : Type} [Ord α] {β : Type} :
        List (α × β)RBMap α β

        Builds a map from a list.

        Equations
        Instances For
          def Cvc.RBMap.filter {α : Type} [Ord α] {β : Type} (map : RBMap α β) (f : αβBool) :
          RBMap α β

          Removes from map the bindings key/val such that ¬ f key val.

          Equations
          Instances For
            def Cvc.RBMap.filterVal {α : Type} [Ord α] {β : Type} (map : RBMap α β) (f : βBool) :
            RBMap α β

            Removes from map the bindings key/val such that ¬ f val.

            Equations
            Instances For
              def Cvc.RBMap.insert {α : Type} [Ord α] {β : Type} (map : RBMap α β) (key : α) (val : β) :
              RBMap α β

              Inserts a key/val binding in a map.

              See also RBMap.insert'.

              Equations
              Instances For
                def Cvc.RBMap.insert' {α : Type} [Ord α] {β : Type} (map : RBMap α β) (key : α) (val : β) :
                Option β × RBMap α β

                Adds a key/val binding in a map, returns the previous value of key if any.

                See also RBMap.insert.

                Equations
                Instances For
                  def Cvc.RBMap.insertNew? {α : Type} [Ord α] {β : Type} (map : RBMap α β) (key : α) (val : β) :
                  Option (RBMap α β)

                  Adds a key/val binding in a map, none if a binding for key already exists.

                  Equations
                  Instances For
                    def Cvc.RBMap.erase {α : Type} [Ord α] {β : Type} (map : RBMap α β) (key : α) :
                    RBMap α β

                    Removes from map the binding for key, if any.

                    See also RBMap.erase'.

                    Equations
                    Instances For
                      def Cvc.RBMap.erase' {α : Type} [Ord α] {β : Type} (map : RBMap α β) (key : α) :
                      Option β × RBMap α β

                      Removes a key/val binding from a map, yields some val if such a binding existed.

                      See also RBMap.erase.

                      Equations
                      Instances For
                        def Cvc.RBMap.eraseExisting? {α : Type} [Ord α] {β : Type} (map : RBMap α β) (key : α) :
                        Option (RBMap α β)

                        Removes a key/val binding from a map, none if no binding for key existed.

                        Equations
                        Instances For
                          def Cvc.RBMap.mapVal {α : Type} [Ord α] {β γ : Type} (f : αβγ) (map : RBMap α β) :
                          RBMap α γ

                          Map over the values of a map.

                          Equations
                          Instances For
                            def Cvc.RBMap.filterMapValM {α : Type} [Ord α] {m : TypeType u_1} {β γ : Type} [Monad m] (f : αβm (Option γ)) (map : RBMap α β) :
                            m (RBMap α γ)

                            Monadic filter/map over the values of a map.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              def Cvc.RBMap.mapValM {α : Type} [Ord α] {m : TypeType u_1} {β γ : Type} [Monad m] (f : αβm γ) (map : RBMap α β) :
                              m (RBMap α γ)

                              Monadic map over the values of a map.

                              Equations
                              Instances For
                                def Cvc.RBMap.filterMapVal {α : Type} [Ord α] {β γ : Type} (f : αβOption γ) (map : RBMap α β) :
                                RBMap α γ

                                Filter/map over the values of a map.

                                Equations
                                Instances For
                                  def Cvc.RBMap.filterMapValToArrayM {α : Type} [Ord α] {m : Type u_1 → Type u_2} {β : Type} {γ : Type u_1} [Monad m] (f : αβm (Option γ)) (map : RBMap α β) :
                                  m (Array γ)

                                  Monadic filter/map over the values of a map into an array of values.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    def Cvc.RBMap.filterMapValToArray {α : Type} [Ord α] {β : Type} {γ : Type u_1} (f : αβOption γ) (map : RBMap α β) :

                                    Filter/map over the values of a map into an array of values.

                                    Equations
                                    Instances For
                                      def Cvc.RBMap.mapValToArrayM {α : Type} [Ord α] {m : Type u_1 → Type u_2} {β : Type} {γ : Type u_1} [Monad m] (f : αβm γ) (map : RBMap α β) :
                                      m (Array γ)

                                      Monadic map over the values of a map into an array of values.

                                      Equations
                                      Instances For
                                        def Cvc.RBMap.mapValToArray {α : Type} [Ord α] {β : Type} {γ : Type u_1} (f : αβγ) (map : RBMap α β) :

                                        Map over the values of a map into an array of values.

                                        Equations
                                        Instances For
                                          def Cvc.RBMap.mapOnlyValM {α : Type} [Ord α] {m : TypeType u_1} {β γ : Type} [Monad m] (f : βm γ) (map : RBMap α β) :
                                          m (RBMap α γ)

                                          Monadic key-ignoring map over the values of a map.

                                          Equations
                                          Instances For
                                            def Cvc.RBMap.mapOnlyVal {α : Type} [Ord α] {β γ : Type} (f : βγ) (map : RBMap α β) :
                                            RBMap α γ

                                            Key-ignoring map over the values of a map.

                                            Equations
                                            Instances For
                                              def Cvc.RBMap.filterMapOnlyValM {α : Type} [Ord α] {m : TypeType u_1} {β γ : Type} [Monad m] (f : βm (Option γ)) (map : RBMap α β) :
                                              m (RBMap α γ)

                                              Key-ignoring monadic filter/map over the values of a map.

                                              Equations
                                              Instances For
                                                def Cvc.RBMap.filterMapOnlyVal {α : Type} [Ord α] {β γ : Type} (f : βOption γ) (map : RBMap α β) :
                                                RBMap α γ

                                                Key-ignoring filter/map over the values of a map.

                                                Equations
                                                Instances For
                                                  def Cvc.RBMap.filterMapOnlyValToArrayM {α : Type} [Ord α] {m : Type u_1 → Type u_2} {β : Type} {γ : Type u_1} [Monad m] (f : βm (Option γ)) (map : RBMap α β) :
                                                  m (Array γ)

                                                  Key-ignoring filter/map over the values of a map into an array of values.

                                                  Equations
                                                  Instances For
                                                    def Cvc.RBMap.filterMapOnlyValToArray {α : Type} [Ord α] {β : Type} {γ : Type u_1} (f : βOption γ) (map : RBMap α β) :

                                                    Key-ignoring filter/map over the values of a map into an array of values.

                                                    Equations
                                                    Instances For
                                                      def Cvc.RBMap.mapOnlyValToArrayM {α : Type} [Ord α] {m : Type u_1 → Type u_2} {β : Type} {γ : Type u_1} [Monad m] (f : βm γ) (map : RBMap α β) :
                                                      m (Array γ)

                                                      Key-ignoring monadic map over the values of a map into an array of values.

                                                      Equations
                                                      Instances For
                                                        def Cvc.RBMap.mapOnlyValToArray {α : Type} [Ord α] {β : Type} {γ : Type u_1} (f : βγ) (map : RBMap α β) :

                                                        Key-ignoring map over the values of a map into an array of values.

                                                        Equations
                                                        Instances For
                                                          def Cvc.RBMap.filterMapFoldM {α : Type} [Ord α] {m : TypeType u_1} {β γ Acc : Type} [Monad m] (init : Acc) (f : Accαβm (Acc × Option γ)) (map : RBMap α β) :
                                                          m (Acc × RBMap α γ)
                                                          Equations
                                                          • One or more equations did not get rendered due to their size.
                                                          Instances For
                                                            @[reducible, inline]
                                                            abbrev Cvc.RBSet (α : Type) [Ord α] :
                                                            Equations
                                                            Instances For
                                                              def Cvc.RBSet.empty {α : Type} [Ord α] :

                                                              The empty set.

                                                              Equations
                                                              Instances For
                                                                def Cvc.RBSet.filter {α : Type} [Ord α] (set : RBSet α) (f : αBool) :

                                                                Removes from set the elements elm for which ¬ f elm.

                                                                Equations
                                                                Instances For
                                                                  def Cvc.RBSet.insert {α : Type} [Ord α] (set : RBSet α) :
                                                                  αRBSet α

                                                                  Inserts an element in the set.

                                                                  See also RBSet.insert'.

                                                                  Equations
                                                                  Instances For
                                                                    def Cvc.RBSet.insert' {α : Type} [Ord α] (set : RBSet α) (elm : α) :

                                                                    Inserts an element in the set, yields true iff the element is new.

                                                                    See also RBSet.insert.

                                                                    Equations
                                                                    Instances For
                                                                      def Cvc.RBSet.erase {α : Type} [Ord α] (set : RBSet α) (k : α) :

                                                                      Removes an element from a set.

                                                                      See also RBSet.erase'.

                                                                      Equations
                                                                      Instances For
                                                                        def Cvc.RBSet.erase' {α : Type} [Ord α] (set : RBSet α) (elm : α) :

                                                                        Removes an element from a set, yields true iff the element was there.

                                                                        See also RBSet.erase

                                                                        Equations
                                                                        Instances For
                                                                          def Cvc.Decidable.conj' {p q : Prop} (ip : Decidable p) (iq : Decidable q) :
                                                                          Equations
                                                                          Instances For
                                                                            Equations
                                                                            • One or more equations did not get rendered due to their size.
                                                                            Instances For
                                                                              inductive Cvc.CheckSat :

                                                                              A check-sat result.

                                                                              • sat : CheckSat

                                                                                Formulas asserted are satisfiable, i.e. a model exists.

                                                                              • unsat : CheckSat

                                                                                Formulas are unsatisfiable, no assignment of the symbols makes them true.

                                                                              • unknown (desc : String) : CheckSat

                                                                                Solver returned unknown.

                                                                              • other (desc : String) : CheckSat

                                                                                Solver returned some unexpected result.

                                                                              Instances For

                                                                                Conversion to a simple is sat? flag, none on unknown/unexpected results.

                                                                                Equations
                                                                                Instances For
                                                                                  inductive Cvc.Error :
                                                                                  Instances For

                                                                                    Used to allow String and UnitString as context messages.

                                                                                    • asString : αString

                                                                                      Conversion to strings.

                                                                                    Instances
                                                                                      def Cvc.Error.append (self : Error) (txt : String) (newline : Bool := true) :
                                                                                      Equations
                                                                                      Instances For
                                                                                        Equations
                                                                                        • One or more equations did not get rendered due to their size.
                                                                                        Equations
                                                                                        Instances For
                                                                                          def Cvc.Error.throwUser {m : Type u_1 → Type u_2} [MonadExcept Error m] (msg : String) {α : Type u_1} :
                                                                                          m α

                                                                                          Throws an Error.userError.

                                                                                          Equations
                                                                                          Instances For
                                                                                            def Cvc.Error.throwInternal {m : Type u_1 → Type u_2} [MonadExcept Error m] (msg : String) {α : Type u_1} :
                                                                                            m α

                                                                                            Throws an Error.internal.

                                                                                            Equations
                                                                                            Instances For
                                                                                              def Cvc.Error.throwUnreachable {m : Type u_1 → Type u_2} [MonadExcept Error m] {α : Type u_1} (msg : String := "") :
                                                                                              m α

                                                                                              Throws an Error.internal about unreachable code.

                                                                                              Equations
                                                                                              • One or more equations did not get rendered due to their size.
                                                                                              Instances For
                                                                                                @[reducible, inline]
                                                                                                abbrev Cvc.ResT (m : TypeType u_1) (α : Type) :
                                                                                                Type u_1
                                                                                                Equations
                                                                                                Instances For
                                                                                                  @[reducible, inline]
                                                                                                  abbrev Cvc.ResIO (α : Type) :
                                                                                                  Equations
                                                                                                  Instances For
                                                                                                    @[reducible, inline]
                                                                                                    abbrev Cvc.Res (α : Type) :

                                                                                                    Error-result monad.

                                                                                                    Equations
                                                                                                    Instances For
                                                                                                      @[reducible, inline]
                                                                                                      abbrev Cvc.Res.ok {α : Type} :
                                                                                                      αRes α

                                                                                                      A success value of type α

                                                                                                      Equations
                                                                                                      Instances For
                                                                                                        @[reducible, inline]
                                                                                                        abbrev Cvc.Res.error {α : Type} :
                                                                                                        ErrorRes α

                                                                                                        A failure value of type ε

                                                                                                        Equations
                                                                                                        Instances For
                                                                                                          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
                                                                                                          def Cvc.Res.fail {α : Type} (e : Error) :
                                                                                                          Res α
                                                                                                          Equations
                                                                                                          Instances For
                                                                                                            def Cvc.Res.context {S α : Type} [A : Error.AsString S] (s : S) :
                                                                                                            Res αRes α
                                                                                                            Equations
                                                                                                            Instances For
                                                                                                              def Cvc.Res.lift {α : Type} :
                                                                                                              Equations
                                                                                                              Instances For

                                                                                                                Helpers #

                                                                                                                structure Cvc.ArrayMin (n : Nat) (α : Type u) :
                                                                                                                Instances For
                                                                                                                  instance Cvc.instHashableArrayMin {n✝ : Nat} {α✝ : Type u_1} [Hashable α✝] :
                                                                                                                  Hashable (ArrayMin n✝ α✝)
                                                                                                                  Equations
                                                                                                                  instance Cvc.ArrayMin.instInhabited {α : Type u_1} {n : Nat} [Inhabited α] :
                                                                                                                  Equations
                                                                                                                  def Cvc.ArrayMin.mk {α : Type u_1} (pref : Array α) (suff : Array α := #[]) :
                                                                                                                  ArrayMin pref.size α
                                                                                                                  Equations
                                                                                                                  Instances For
                                                                                                                    def Cvc.ArrayMin.toString {α : Type u_1} {n : Nat} [ToString α] (self : ArrayMin n α) :
                                                                                                                    Equations
                                                                                                                    Instances For
                                                                                                                      @[simp]
                                                                                                                      theorem Cvc.ArrayMin.pref_size {n : Nat} {α : Type u_1} (self : ArrayMin n α) :
                                                                                                                      self.pref.size = n
                                                                                                                      @[reducible, inline]
                                                                                                                      abbrev Cvc.ArrayMin.size {n : Nat} {α : Type u_1} (self : ArrayMin n α) :
                                                                                                                      Equations
                                                                                                                      Instances For
                                                                                                                        @[simp]
                                                                                                                        theorem Cvc.ArrayMin.min_le_size {n : Nat} {α : Type u_1} (self : ArrayMin n α) :
                                                                                                                        n self.size
                                                                                                                        def Cvc.ArrayMin.get {n : Nat} {α : Type u_1} (self : ArrayMin n α) (i : Fin self.size) :
                                                                                                                        α
                                                                                                                        Equations
                                                                                                                        Instances For
                                                                                                                          instance Cvc.ArrayMin.instGetElem {n : Nat} {α : Type u_1} :
                                                                                                                          GetElem (ArrayMin n α) Nat α fun (arr : ArrayMin n α) (i : Nat) => i < arr.size
                                                                                                                          Equations
                                                                                                                          def Cvc.ArrayMin.get? {n : Nat} {α : Type u_1} (self : ArrayMin n α) (i : Nat) :
                                                                                                                          Equations
                                                                                                                          Instances For
                                                                                                                            def Cvc.ArrayMin.get! {n : Nat} {α : Type u_1} [Inhabited α] (self : ArrayMin n α) (i : Nat) :
                                                                                                                            α
                                                                                                                            Equations
                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                            Instances For
                                                                                                                              def Cvc.ArrayMin.getN {n : Nat} {α : Type u_1} (self : ArrayMin n α) (i : Nat) (h : i < n := by decide) :
                                                                                                                              α
                                                                                                                              Equations
                                                                                                                              Instances For
                                                                                                                                def Cvc.ArrayMin.toArray {n : Nat} {α : Type u_1} (self : ArrayMin n α) :
                                                                                                                                Equations
                                                                                                                                Instances For
                                                                                                                                  def Cvc.ArrayMin.toList {n : Nat} {α : Type u_1} (self : ArrayMin n α) :
                                                                                                                                  List α
                                                                                                                                  Equations
                                                                                                                                  Instances For
                                                                                                                                    def Cvc.ArrayMin.push {n : Nat} {α : Type u_1} (self : ArrayMin n α) (a : α) :
                                                                                                                                    Equations
                                                                                                                                    Instances For
                                                                                                                                      def Cvc.ArrayMin.drainFirst {n : Nat} {α : Type u_1} :
                                                                                                                                      ArrayMin n.succ αα × ArrayMin n α
                                                                                                                                      Equations
                                                                                                                                      • { pref := { toList := fst :: pref }, inv := h_pref', suff := suff }.drainFirst = (fst, { pref := { toList := pref }, inv := , suff := suff })
                                                                                                                                      Instances For
                                                                                                                                        instance Cvc.ArrayMin.instForIn {n : Nat} {α : Type u_1} {m : Type u_2 → Type u_3} :
                                                                                                                                        ForIn m (ArrayMin n α) α
                                                                                                                                        Equations
                                                                                                                                        • One or more equations did not get rendered due to their size.
                                                                                                                                        structure Cvc.ArrayMin.Frame (n : Nat) (α : Type u) :
                                                                                                                                        Instances For
                                                                                                                                          instance Cvc.ArrayMin.instInhabitedFrame {a✝ : Nat} {a✝¹ : Type u_1} :
                                                                                                                                          Inhabited (Frame a✝ a✝¹)
                                                                                                                                          Equations
                                                                                                                                          def Cvc.ArrayMin.Frame.new {α : Type u_1} (n : Nat) :
                                                                                                                                          Frame n α
                                                                                                                                          Equations
                                                                                                                                          Instances For
                                                                                                                                            def Cvc.ArrayMin.Frame.push {n : Nat} {α : Type u_1} (self : Frame n α) (a : α) :
                                                                                                                                            Frame n α
                                                                                                                                            Equations
                                                                                                                                            • One or more equations did not get rendered due to their size.
                                                                                                                                            Instances For
                                                                                                                                              def Cvc.ArrayMin.Frame.finalize {n : Nat} {α : Type u_1} (self : Frame n α) [Inhabited α] :
                                                                                                                                              Equations
                                                                                                                                              • One or more equations did not get rendered due to their size.
                                                                                                                                              Instances For
                                                                                                                                                def Cvc.ArrayMin.newFrame {n : Nat} {α : Type u_1} {β : Type u_2} :
                                                                                                                                                ArrayMin n αFrame n β
                                                                                                                                                Equations
                                                                                                                                                Instances For
                                                                                                                                                  structure Cvc.ArrayMin.Iter (n : Nat) (α : Type u) :
                                                                                                                                                  Instances For
                                                                                                                                                    @[reducible, inline]
                                                                                                                                                    abbrev Cvc.ArrayMin.Iter.isNotDone {n : Nat} {α : Type u_1} (self : Iter n α) :
                                                                                                                                                    Equations
                                                                                                                                                    Instances For
                                                                                                                                                      @[reducible, inline]
                                                                                                                                                      abbrev Cvc.ArrayMin.Iter.isDone {n : Nat} {α : Type u_1} (self : Iter n α) :
                                                                                                                                                      Equations
                                                                                                                                                      Instances For
                                                                                                                                                        def Cvc.ArrayMin.Iter.next? {n : Nat} {α : Type u_1} (self : Iter n α) :
                                                                                                                                                        Option α × Iter n α
                                                                                                                                                        Equations
                                                                                                                                                        Instances For
                                                                                                                                                          def Cvc.ArrayMin.iter {n : Nat} {α : Type u_1} (self : ArrayMin n α) :
                                                                                                                                                          Iter n α
                                                                                                                                                          Equations
                                                                                                                                                          • self.iter = { val := self, pos := 0 }
                                                                                                                                                          Instances For