Documentation

Miri.TreeBorrows.UniMap

Finite semantic port of Miri's tree_borrows/unimap.rs. UniKeyMap keeps the source's reusable u32 index pool; UniValMap keeps optional values in an array indexed by the same value. Large collections are represented by Lean arrays, but all observable insertion/removal behavior is explicit.

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

                Source UniKeyMap<K> from key to reusable index.

                Instances For
                  def Miri.TreeBorrows.instDecidableEqUniKeyMap.decEq {α✝ : Type} [DecidableEq α✝] (x✝ x✝¹ : UniKeyMap α✝) :
                  Decidable (x✝ = x✝¹)
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      Instances For
                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          def Miri.TreeBorrows.UniKeyMap.get {α : Type} [BEq α] (map : UniKeyMap α) (key : α) :
                          Equations
                          Instances For
                            def Miri.TreeBorrows.UniKeyMap.containsKey {α : Type} [BEq α] (map : UniKeyMap α) (key : α) :
                            Equations
                            Instances For

                              Source insertion pops a reusable index first, otherwise converts the current active map length to u32. A duplicate key preserves Rust HashMap's replacement mutation before returning the source panic as an explicit result.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                Equations
                                Instances For
                                  def Miri.TreeBorrows.UniKeyMap.remove {α : Type} [BEq α] (map : UniKeyMap α) (key : α) :
                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    Equations
                                    Instances For

                                      Source UniValMap<V> as a vector of optional values.

                                      Instances For
                                        def Miri.TreeBorrows.instDecidableEqUniValMap.decEq {α✝ : Type} [DecidableEq α✝] (x✝ x✝¹ : UniValMap α✝) :
                                        Decidable (x✝ = x✝¹)
                                        Equations
                                        Instances For
                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            def Miri.TreeBorrows.UniValMap.extendTo {α : Type u_1} (data : Array (Option α)) (length : Nat) :
                                            Equations
                                            Instances For
                                              Equations
                                              Instances For
                                                def Miri.TreeBorrows.UniValMap.insert {α : Type} (map : UniValMap α) (index : UniIndex) (value : α) :

                                                Source insert permanently overwrites any old value at the index.

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  def Miri.TreeBorrows.UniValMap.get {α : Type} (map : UniValMap α) (index : UniIndex) :
                                                  Equations
                                                  Instances For
                                                    Equations
                                                    Instances For

                                                      Canonical representation for source UniValMap::equivalent equality. Rust treats trailing None slots as absent when comparing maps; trimming them before Lean's structural range-map comparison preserves that behavior.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Instances For
                                                        Equations
                                                        Instances For
                                                          Equations
                                                          • One or more equations did not get rendered due to their size.
                                                          Instances For
                                                            def Miri.TreeBorrows.UniValMap.orInsert {α : Type} (map : UniValMap α) (index : UniIndex) (default : α) :
                                                            Equations
                                                            Instances For
                                                              Equations
                                                              Instances For