Documentation

Projects.Util.Data.Map

structure Map (α : Type u) (β : Type v) [hh₁ : DecidableEq α] [hh₂ : Hashable α] :
Type (max u v)
Instances For
    @[instance_reducible]
    instance instInhabitedMap {a✝ : Type u_1} {a✝¹ : Type u_2} {a✝² : DecidableEq a✝} {a✝³ : Hashable a✝} :
    Inhabited (Map a✝ a✝¹)
    Equations
    def Map.empty {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] :
    Map α β
    Equations
    Instances For
      @[instance_reducible]
      instance Map.instEmptyCollection {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] :
      Equations
      theorem Map.empty_def {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] :
      = { inner := }
      def Map.insertP {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (x : α × β) (mp : Map α β) :
      Map α β
      Equations
      Instances For
        @[instance_reducible]
        instance Map.instInsertProd {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] :
        Insert (α × β) (Map α β)
        Equations
        theorem Map.insert_def {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {x : α × β} {mp : Map α β} :
        insert x mp = { inner := insert x.toSigma mp.inner }
        def Map.insert {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (mp : Map α β) (i : α) (x : β) :
        Map α β
        Equations
        Instances For
          def Map.ofList {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (xs : List (α × β)) :
          Map α β
          Equations
          Instances For
            def Map.get? {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (i : α) (mp : Map α β) :
            Equations
            Instances For
              def Map.get! {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (i : α) [h : Inhabited β] (mp : Map α β) :
              β
              Equations
              Instances For
                def Map.map {α : Type u} {β : Type v} {γ : Type w} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (mp : Map α β) (f : αβγ) :
                Map α γ
                Equations
                Instances For
                  def Map.mem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (mp : Map α β) (i : α) :
                  Equations
                  Instances For
                    @[instance_reducible]
                    instance Map.instMembership {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] :
                    Membership α (Map α β)
                    Equations
                    theorem Map.mem_def {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} :
                    i mp i mp.inner
                    @[instance_reducible]
                    instance Map.instDecidableMem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} :
                    Decidable (mp.mem i)
                    Equations
                    @[instance_reducible]
                    instance Map.instDecidableMem_1 {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} :
                    Decidable (i mp)
                    Equations
                    theorem Map.mem_iff_get?_eq_some {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} :
                    i mp ∃ (x : β), get? i mp = some x
                    theorem Map.get?_eq_some_of_mem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} (h : i mp) :
                    ∃ (x : β), get? i mp = some x
                    theorem Map.get?_eq_none_of_not_mem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} (h : imp) :
                    get? i mp = none
                    @[simp]
                    theorem Map.get?_eq_none_iff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} :
                    get? i mp = none imp
                    theorem Map.get?_map {α : Type u} {β : Type v} {γ : Type w} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {f : αβγ} {i : α} :
                    get? i (mp.map f) = Option.map (f i) (get? i mp)
                    theorem Map.get!_map_eq_of_pos {α : Type u} {β : Type v} {γ : Type w} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {f : αβγ} {i : α} [ha : Inhabited β] [hb : Inhabited γ] (h : i mp) :
                    get! i (mp.map f) = f i (get! i mp)
                    def Map.toList {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] (mp : Map α β) :
                    List (α × β)
                    Equations
                    Instances For
                      @[simp]
                      theorem Map.ofList_nil {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] :
                      @[simp]
                      theorem Map.ofList_snoc {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {xs : List (α × β)} {x : α × β} :
                      ofList (xs ++ [x]) = insertP x (ofList xs)
                      @[simp]
                      theorem Map.toList_empty {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [LinearOrder α] :
                      @[simp]
                      theorem Map.mem_insertP {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {x : α × β} {i : α} :
                      i insertP x mp i = x.1 i mp
                      @[simp]
                      theorem Map.mem_insert' {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} {x : β} {j : α} :
                      j mp.insert i x j = i j mp
                      @[simp]
                      theorem Map.mem_insert {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {x : α × β} {i : α} :
                      i insert x mp i = x.1 i mp
                      @[simp]
                      theorem Map.mem_ofList {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {xs : List (α × β)} {i : α} :
                      i ofList xs ∃ (x : β), (i, x) xs
                      @[simp]
                      theorem Map.mem_map {α : Type u} {β : Type v} {γ : Type w} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {f : αβγ} {i : α} :
                      i mp.map f i mp
                      theorem Map.eq_empty_iff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} :
                      mp = ∀ (i : α), imp
                      @[simp]
                      theorem Map.not_mem_empty' {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {i : α} :
                      @[simp]
                      theorem Map.not_mem_empty {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {i : α} :
                      i
                      theorem Map.ext_iff' {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} :
                      m₁ = m₂ m₁.inner.inner.out.Equiv m₂.inner.inner.out
                      theorem Map.ext' {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} (h : m₁.inner.inner.out.Equiv m₂.inner.inner.out) :
                      m₁ = m₂
                      theorem Map.ext_iff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} :
                      m₁ = m₂ ∀ (i : α), get? i m₁ = get? i m₂
                      theorem Map.ext {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} (h : ∀ (i : α), get? i m₁ = get? i m₂) :
                      m₁ = m₂
                      theorem Map.get?_eq_ite_of_unit {α : Type u} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m : Map α Unit} {i : α} :
                      @[simp]
                      theorem Map.get?_empty {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {i : α} :
                      theorem Map.ofList_eq_ofList_iff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {xs ys : List (α × β)} (hx : (List.map (fun (x : α × β) => x.1) xs).Nodup) (hy : (List.map (fun (x : α × β) => x.1) ys).Nodup) :
                      ofList xs = ofList ys xs.Perm ys
                      def Map.range {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : Fintype α] (f : αβ) :
                      Map α β
                      Equations
                      Instances For
                        @[simp]
                        theorem Map.mem_range {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : Fintype α] {f : αβ} {i : α} :
                        @[simp]
                        theorem Map.nonempty_insert {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {x : α × β} :
                        @[simp]
                        theorem Map.nodup_toList {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [LinearOrder α] :
                        @[simp]
                        theorem Map.pairwise_toList {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [LinearOrder α] :
                        List.Pairwise (fun (x1 x2 : α × β) => x1.1 x2.1) mp.toList
                        @[simp]
                        theorem Map.mem_toList {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [LinearOrder α] {x : α × β} :
                        x mp.toList get? x.1 mp = some x.2
                        @[simp]
                        theorem Map.toList_eq_toList {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [LinearOrder α] {m₁ m₂ : Map α β} :
                        m₁.toList = m₂.toList m₁ = m₂
                        @[simp]
                        theorem Map.toList_eq_nil_iff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [LinearOrder α] :
                        mp.toList = [] mp =
                        def Map.toDMap {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (mp : Map α β) :
                        DMap α fun (x : α) => β
                        Equations
                        Instances For
                          def DMap.toMap {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (mp : DMap α fun (x : α) => β) :
                          Map α β
                          Equations
                          Instances For
                            @[instance_reducible]
                            instance Map.instDecidableEq {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [hh : DecidableEq β] :
                            Equations
                            def Map.values {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] (mp : Map α β) :
                            List β
                            Equations
                            Instances For
                              def Map.all {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (mp : Map α β) (p : αβBool) :
                              Equations
                              Instances For
                                @[simp]
                                theorem Map.all_def {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [LinearOrder α] {p : αβBool} :
                                mp.all p = decide (∀ xmp.toList, p x.1 x.2 = true)
                                def Map.modify {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (mp : Map α β) (i : α) (f : ββ) :
                                Map α β
                                Equations
                                Instances For
                                  def Map.modifyMany {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (mp : Map α β) (xs : List (α × (ββ))) :
                                  Map α β
                                  Equations
                                  Instances For
                                    @[simp]
                                    theorem Map.modifyMany_nil {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} :
                                    @[simp]
                                    theorem Map.modifyMany_cons {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} {x : ββ} {xs : List (α × (ββ))} :
                                    mp.modifyMany ((i, x) :: xs) = (mp.modify i x).modifyMany xs
                                    def Map.insertMany {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (mp : Map α β) (xs : List (α × β)) :
                                    Map α β
                                    Equations
                                    Instances For
                                      @[simp]
                                      theorem Map.insertMany_nil {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} :
                                      @[simp]
                                      theorem Map.insertMany_cons {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} {x : β} {xs : List (α × β)} :
                                      mp.insertMany ((i, x) :: xs) = (mp.insert i x).insertMany xs
                                      theorem Map.get?_eq_ite {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [hb : Inhabited β] {i : α} :
                                      get? i mp = if i mp then some (get! i mp) else none
                                      @[simp]
                                      theorem Map.mem_modify {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i j : α} {x : ββ} :
                                      i mp.modify j x i mp
                                      theorem Map.get!_eq_get?_get! {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [Inhabited β] {i : α} :
                                      get! i mp = (get? i mp).get!
                                      @[simp]
                                      theorem Map.get?_modify {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} {f : ββ} {j : α} :
                                      get? j (mp.modify i f) = if j = i then Option.map f (get? j mp) else get? j mp
                                      @[simp]
                                      theorem Map.mem_values {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [LinearOrder α] {x : β} :
                                      x mp.values ∃ (i : α), get? i mp = some x
                                      @[instance_reducible]
                                      instance Map.instFintype {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : Fintype α] [hb : Fintype β] :
                                      Fintype (Map α β)
                                      Equations
                                      instance Map.instFinite {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : Finite α] [hb : Finite β] :
                                      Finite (Map α β)
                                      @[simp]
                                      theorem Map.range_eq_range_iff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : Fintype α] {f g : αβ} :
                                      range f = range g ∀ (x : α), f x = g x
                                      theorem Map.mem_of_get?_eq_some {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} {x : β} (h : get? i mp = some x) :
                                      i mp
                                      theorem Map.get!_eq_get!_get? {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} [hb : Inhabited β] :
                                      get! i mp = (get? i mp).get!
                                      @[simp]
                                      theorem Map.get?_eq_some_get!_iff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} [hb : Inhabited β] :
                                      get? i mp = some (get! i mp) i mp
                                      @[simp]
                                      theorem Map.get?_eq_some_get?_get! {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} [hb : Inhabited β] :
                                      get? i mp = some (get? i mp).get! i mp
                                      def Map.fold {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {γ : Type u_1} (mp : Map α β) (f : γαβγ) (z : γ) (h_assoc : ∀ {acc : γ} {i : α} {x : β} {j : α} {y : β}, i jf (f acc i x) j y = f (f acc j y) i x) :
                                      γ
                                      Equations
                                      Instances For
                                        theorem Map.fold_eq_foldl_toList {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {γ : Type u_1} {z : γ} {f : γαβγ} {h_assoc : ∀ {acc : γ} {i : α} {x : β} {j : α} {y : β}, i jf (f acc i x) j y = f (f acc j y) i x} :
                                        mp.fold f z h_assoc = List.foldl (fun (acc : γ) (x : α × β) => f acc x.1 x.2) z mp.toList
                                        theorem Map.eq_iff_inner_eq {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} :
                                        m₁ = m₂ m₁.inner = m₂.inner
                                        theorem Map.eq_iff_toList_eq {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] {m₁ m₂ : Map α β} :
                                        m₁ = m₂ m₁.toList = m₂.toList
                                        @[simp]
                                        theorem Map.ofList_toList {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] :
                                        theorem Map.toList_ofList_perm {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] {xs : List (α × β)} (h : (List.map (fun (x : α × β) => x.1) xs).Nodup) :
                                        def Map.keys {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] (mp : Map α β) :
                                        List α
                                        Equations
                                        Instances For
                                          @[simp]
                                          theorem Map.sortedLE_keys {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] :
                                          @[simp]
                                          theorem Map.sortedLT_keys {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] :
                                          theorem Map.keys_eq_map_fst_toList {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] :
                                          mp.keys = List.map (fun (x : α × β) => x.1) mp.toList
                                          def Map.minKey? {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] (mp : Map α β) :
                                          Equations
                                          Instances For
                                            def Map.maxKey? {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] (mp : Map α β) :
                                            Equations
                                            Instances For
                                              def Map.minKey! {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] [Inhabited α] (mp : Map α β) :
                                              α
                                              Equations
                                              Instances For
                                                def Map.maxKey! {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] [Inhabited α] (mp : Map α β) :
                                                α
                                                Equations
                                                Instances For
                                                  theorem Map.minKey?_eq_head?_keys {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] :
                                                  theorem Map.maxKey?_eq_getLast?_keys {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] :
                                                  @[simp]
                                                  theorem Map.minKey?_eq_none_iff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] :
                                                  @[simp]
                                                  theorem Map.maxKey?_eq_none_iff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] :
                                                  theorem Map.not_mem_of_lt_minKey? {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {m x : α} (h₁ : mp.minKey? = some m) (h₂ : x < m) :
                                                  xmp
                                                  theorem Map.not_mem_of_maxKey?_lt {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {m x : α} (h₁ : mp.maxKey? = some m) (h₂ : m < x) :
                                                  xmp
                                                  theorem Map.not_mem_of_lt_minKey! {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha₁ : Inhabited α] [ha₂ : LinearOrder α] {x : α} (h : x < mp.minKey!) :
                                                  xmp
                                                  theorem Map.not_mem_of_maxKey!_lt {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha₁ : Inhabited α] [ha₂ : LinearOrder α] {x : α} (h : mp.maxKey! < x) :
                                                  xmp
                                                  theorem Map.minKey?_le_of_mem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {m x : α} (h₁ : mp.minKey? = some m) (h₂ : x mp) :
                                                  m x
                                                  theorem Map.le_maxKey?_of_mem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {m x : α} (h₁ : mp.maxKey? = some m) (h₂ : x mp) :
                                                  x m
                                                  theorem Map.minKey!_le_of_mem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha₁ : Inhabited α] [ha₂ : LinearOrder α] {x : α} (h : x mp) :
                                                  theorem Map.le_maxKey!_of_mem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha₁ : Inhabited α] [ha₂ : LinearOrder α] {x : α} (h : x mp) :
                                                  theorem Map.ind {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {p : Map α βProp} (h₁ : p ) (h₂ : ∀ (m : Map α β) (i : α) (x : β), p mimp (m.insert i x)) (m : Map α β) :
                                                  p m
                                                  @[simp]
                                                  theorem Map.fold_empty {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {γ : Type u_1} {f : γαβγ} {z : γ} {h : ∀ {acc : γ} {i : α} {x : β} {j : α} {y : β}, i jf (f acc i x) j y = f (f acc j y) i x} :
                                                  .fold f z h = z
                                                  theorem Map.fold_insert {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {γ : Type u_1} {f : γαβγ} {z : γ} {h : ∀ {acc : γ} {i : α} {x : β} {j : α} {y : β}, i jf (f acc i x) j y = f (f acc j y) i x} {i : α} {x : β} (h₁ : imp) :
                                                  (mp.insert i x).fold f z h = mp.fold f (f z i x)
                                                  theorem Map.insert_comm {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} {x : β} {j : α} {y : β} (h : i j x = y) :
                                                  (mp.insert i x).insert j y = (mp.insert j y).insert i x
                                                  @[simp]
                                                  theorem Map.insert_idemp {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} {x : β} :
                                                  (mp.insert i x).insert i x = mp.insert i x
                                                  def Map.size {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (mp : Map α β) :
                                                  Equations
                                                  Instances For
                                                    def Map.filter {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (mp : Map α β) (p : αβBool) :
                                                    Map α β
                                                    Equations
                                                    Instances For
                                                      def Map.count {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (mp : Map α β) (p : αβBool) :
                                                      Equations
                                                      Instances For
                                                        @[simp]
                                                        theorem Map.size_filter_eq_count {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {p : αβBool} :
                                                        (mp.filter p).size = mp.count p
                                                        theorem Map.count_eq_size_filter {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {p : αβBool} :
                                                        mp.count p = (mp.filter p).size
                                                        @[simp]
                                                        theorem Map.count_le_size {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {p : αβBool} :
                                                        mp.count p mp.size
                                                        theorem Map.count_eq_zero_iff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {p : αβBool} :
                                                        mp.count p = 0 ∀ (i : α) (x : β), get? i mp = some x¬p i x = true
                                                        @[simp]
                                                        theorem Map.count_empty {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {p : αβBool} :
                                                        .count p = 0
                                                        theorem Map.count_insert {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {p : αβBool} {i : α} {x : β} (h : imp) :
                                                        (mp.insert i x).count p = mp.count p + if p i x = true then 1 else 0
                                                        def Map.push {α : Type u} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (mp : Map α ) (i : α) :
                                                        Map α
                                                        Equations
                                                        Instances For
                                                          theorem Map.get?_insert {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i j : α} {x : β} :
                                                          get? i (mp.insert j x) = if j = i then some x else get? i mp
                                                          theorem Map.push_push_comm {α : Type u} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {i j : α} {mp : Map α } :
                                                          (mp.push i).push j = (mp.push j).push i
                                                          @[simp]
                                                          theorem Map.mem_push {α : Type u} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α } {x y : α} :
                                                          y mp.push x y = x y mp
                                                          @[simp]
                                                          theorem Map.length_toList {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] :
                                                          theorem Map.mem_iff_mem_keys {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {k : α} :
                                                          k mp k mp.keys
                                                          @[simp]
                                                          theorem Map.modifyMany_snoc {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {xs : List (α × (ββ))} {i : α} {f : ββ} :
                                                          mp.modifyMany (xs ++ [(i, f)]) = (mp.modifyMany xs).modify i f
                                                          @[simp]
                                                          theorem Map.modify_empty {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {i : α} {f : ββ} :
                                                          @[simp]
                                                          theorem Map.mem_mk_iff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Std.ExtDHashMap α fun (x : α) => β} {i : α} :
                                                          i { inner := mp } i mp
                                                          theorem Map.modify_of_notMem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} {f : ββ} (h : imp) :
                                                          mp.modify i f = mp
                                                          theorem Map.modify_insert_of_ne {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} {x : β} {j : α} {f : ββ} (h : i j) :
                                                          (mp.insert i x).modify j f = (mp.modify j f).insert i x
                                                          @[simp]
                                                          theorem Map.toList_mk {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] {mp : Std.ExtDHashMap α fun (x : α) => β} :
                                                          theorem Map.toList_insert_perm_cons_of_notMem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {i : α} {x : β} (h : imp) :
                                                          (mp.insert i x).toList.Perm ((i, x) :: mp.toList)
                                                          theorem Map.values_insert_perm_of_notMem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {i : α} {x : β} (h : imp) :
                                                          (mp.insert i x).values.Perm (x :: mp.values)
                                                          @[simp]
                                                          theorem Map.modify_insert_of_eq {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} {x : β} {f : ββ} :
                                                          (mp.insert i x).modify i f = mp.insert i (f x)
                                                          theorem Map.countP_values_modify_eq_of {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {p : βBool} {i : α} {f : ββ} (h : ∀ (x : β), p (f x) = p x) :
                                                          theorem Map.countP_values_modifyMany_eq_of {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {p : βBool} {xs : List (α × (ββ))} (h : ∀ (k : α) (f : ββ) (x : β), (k, f) xsp (f x) = p x) :
                                                          theorem Map.size_insert {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} {x : β} (h : imp) :
                                                          (mp.insert i x).size = mp.size + 1
                                                          @[simp]
                                                          theorem Map.size_modify {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} {f : ββ} :
                                                          (mp.modify i f).size = mp.size
                                                          theorem Map.get?_eq_some_iff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {i : α} {x : β} :
                                                          get? i mp = some x (i, x) mp.toList
                                                          @[simp]
                                                          theorem Map.nodup_keys {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] :
                                                          @[simp]
                                                          theorem Map.mem_keys_iff_mem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {k : α} :
                                                          k mp.keys k mp
                                                          @[simp]
                                                          theorem Map.length_keys {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] :
                                                          @[simp]
                                                          theorem Map.keys_modify {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {i : α} {f : ββ} :
                                                          (mp.modify i f).keys = mp.keys
                                                          def Map.erase {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (mp : Map α β) (i : α) :
                                                          Map α β
                                                          Equations
                                                          Instances For
                                                            @[simp]
                                                            theorem Map.mem_erase {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i j : α} :
                                                            j mp.erase i j i j mp
                                                            @[simp]
                                                            theorem Map.pairwise_toList' {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] :
                                                            List.Pairwise (fun (x1 x2 : α × β) => x1.1 < x2.1) mp.toList
                                                            theorem Map.values_eq_map_snd_toList {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] :
                                                            mp.values = List.map (fun (x : α × β) => x.2) mp.toList
                                                            def Map.keyIdx {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] (mp : Map α β) (i : α) :
                                                            Equations
                                                            Instances For
                                                              theorem Map.keyIdx_lt_size {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {i : α} (h : i mp) :
                                                              mp.keyIdx i < mp.size
                                                              theorem Map.toList_modify_eq_list_modify {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {i : α} {f : ββ} (h : i mp) :
                                                              (mp.modify i f).toList = mp.toList.modify (mp.keyIdx i) fun (p : α × β) => (p.1, f p.2)
                                                              theorem Map.keyIdx_eq_of_toList_eq_append {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {i : α} {x : β} {xs ys : List (α × β)} (h : mp.toList = xs ++ (i, x) :: ys) :
                                                              mp.keyIdx i = xs.length
                                                              theorem Map.values_modify_eq_list_modify {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {i : α} {f : ββ} (h : i mp) :
                                                              (mp.modify i f).values = mp.values.modify (mp.keyIdx i) f
                                                              theorem Map.countP_values_modify_eq_ite_of_get? {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {p : βBool} {i : α} {x : β} {f : ββ} (h : get? i mp = some x) :
                                                              List.countP p (mp.modify i f).values = (List.countP p mp.values + if p (f x) = true then 1 else 0) - if p x = true then 1 else 0
                                                              def Map.union {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (m₁ m₂ : Map α β) :
                                                              Map α β
                                                              Equations
                                                              Instances For
                                                                @[instance_reducible]
                                                                instance Map.instUnion {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] :
                                                                Union (Map α β)
                                                                Equations
                                                                theorem Map.union_def {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} :
                                                                m₁ m₂ = m₁.union m₂
                                                                @[simp]
                                                                theorem Map.inner_empty {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] :
                                                                @[simp]
                                                                theorem Map.inner_union {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} :
                                                                (m₁ m₂).inner = m₁.inner m₂.inner
                                                                @[simp]
                                                                theorem Map.empty_union {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} :
                                                                mp = mp
                                                                @[simp]
                                                                theorem Map.union_empty {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} :
                                                                mp = mp
                                                                @[simp]
                                                                theorem Map.insertP_pair {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} {x : β} :
                                                                insertP (i, x) mp = mp.insert i x
                                                                @[simp]
                                                                theorem Map.get?_mk {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Std.ExtDHashMap α fun (x : α) => β} {i : α} :
                                                                get? i { inner := mp } = mp.get? i
                                                                @[simp]
                                                                theorem Map.mk_union_mk {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp₁ mp₂ : Std.ExtDHashMap α fun (x : α) => β} :
                                                                { inner := mp₁ } { inner := mp₂ } = { inner := mp₁ mp₂ }
                                                                theorem Map.get?_union {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} {i : α} :
                                                                get? i (m₁ m₂) = (get? i m₂).or (get? i m₁)
                                                                @[simp]
                                                                theorem Map.inner_ofList {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {xs : List (α × β)} :
                                                                @[simp]
                                                                theorem Map.ofList_singleton {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {x : α × β} :
                                                                @[simp]
                                                                theorem Map.insert_insert_same {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} {i : α} {x y : β} :
                                                                (mp.insert i x).insert i y = mp.insert i y
                                                                theorem Map.insert_union {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} {i : α} {x : β} :
                                                                (m₁ m₂).insert i x = m₁ m₂.insert i x
                                                                theorem Map.union_insert {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} {i : α} {x : β} :
                                                                m₁ m₂.insert i x = (m₁ m₂).insert i x
                                                                @[simp]
                                                                theorem Map.ofList_append {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {xs ys : List (α × β)} :
                                                                ofList (xs ++ ys) = ofList xs ofList ys
                                                                theorem Map.ofList_cons_of_mem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {x : α × β} {xs : List (α × β)} {y : β} (h : (x.1, y) xs) :
                                                                ofList (x :: xs) = ofList xs
                                                                theorem Map.get?_union_left {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} {i : α} (h : im₂) :
                                                                get? i (m₁ m₂) = get? i m₁
                                                                theorem Map.get?_union_right {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} {i : α} (h : im₁) :
                                                                get? i (m₁ m₂) = get? i m₂
                                                                theorem Map.get!_union_left {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} [hb : Inhabited β] {i : α} (h : im₂) :
                                                                get! i (m₁ m₂) = get! i m₁
                                                                theorem Map.get!_union_right {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} [hb : Inhabited β] {i : α} (h : im₁) :
                                                                get! i (m₁ m₂) = get! i m₂
                                                                theorem Map.get!_insert {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [hb : Inhabited β] {i : α} {x : β} {j : α} :
                                                                get! j (mp.insert i x) = if j = i then x else get! j mp
                                                                theorem Map.get?_ofList_eq_some_iff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {xs : List (α × β)} {i : α} {x : β} (h : (List.map (fun (x : α × β) => x.1) xs).Nodup) :
                                                                get? i (ofList xs) = some x (i, x) xs
                                                                theorem Map.get?_ofList_of_nodup {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {xs : List (α × β)} {i : α} (h : (List.map (fun (x : α × β) => x.1) xs).Nodup) :
                                                                get? i (ofList xs) = Option.map (fun (x : α × β) => x.2) (List.find? (fun (x : α × β) => decide (x.1 = i)) xs)
                                                                theorem Map.get!_ofList_of_nodup {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [hb : Inhabited β] {xs : List (α × β)} {i : α} (h : (List.map (fun (x : α × β) => x.1) xs).Nodup) :
                                                                get! i (ofList xs) = (Option.map (fun (x : α × β) => x.2) (List.find? (fun (x : α × β) => decide (x.1 = i)) xs)).get!
                                                                @[simp]
                                                                theorem Map.mem_union {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} {i : α} :
                                                                i m₁ m₂ i m₁ i m₂
                                                                @[simp]
                                                                theorem Map.keys_mk {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] {mp : Std.ExtDHashMap α fun (x : α) => β} :
                                                                { inner := mp }.keys = mp.keys
                                                                @[simp]
                                                                theorem Map.insert_mk {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m : Std.ExtDHashMap α fun (x : α) => β} {i : α} {x : β} :
                                                                { inner := m }.insert i x = { inner := m.insert i x }
                                                                @[simp]
                                                                theorem Map.erase_mk {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m : Std.ExtDHashMap α fun (x : α) => β} {i : α} :
                                                                { inner := m }.erase i = { inner := m.erase i }
                                                                theorem Map.toList_insert_of_not_mem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m : Map α β} [ha : LinearOrder α] {i : α} {x : β} (h : im) :
                                                                (m.insert i x).toList = ((i, x) :: m.toList).mergeSort fun (x1 x2 : α × β) => decide (x1.1 x2.1)
                                                                theorem Map.keys_insert_of_not_mem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m : Map α β} [ha : LinearOrder α] {i : α} {x : β} (h : im) :
                                                                (m.insert i x).keys = (i :: m.keys).mergeSort fun (a b : α) => decide (a b)
                                                                @[simp]
                                                                theorem Map.insert_erase_eq_self_iff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m : Map α β} {i : α} {x : β} :
                                                                (m.erase i).insert i x = m get? i m = some x
                                                                @[simp]
                                                                theorem Map.keys_eq_keys_iff {α : Type u} {β : Type v} {γ : Type w} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] {m₁ : Map α β} {m₂ : Map α γ} :
                                                                m₁.keys = m₂.keys ∀ (i : α), i m₁ i m₂
                                                                theorem Map.union_assoc {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ m₃ : Map α β} :
                                                                m₁ m₂ m₃ = m₁ (m₂ m₃)
                                                                @[simp]
                                                                theorem Map.union_self {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m : Map α β} :
                                                                m m = m
                                                                @[simp]
                                                                theorem Map.union_union_self {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} :
                                                                m₁ (m₁ m₂) = m₁ m₂
                                                                def Map.diff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] (m₁ m₂ : Map α β) :
                                                                Map α β
                                                                Equations
                                                                Instances For
                                                                  @[instance_reducible]
                                                                  instance Map.instSDiff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] :
                                                                  SDiff (Map α β)
                                                                  Equations
                                                                  theorem Map.diff_def {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} :
                                                                  m₁ \ m₂ = m₁.diff m₂
                                                                  @[simp]
                                                                  theorem Map.mk_diff_mk {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Std.ExtDHashMap α fun (x : α) => β} :
                                                                  { inner := m₁ } \ { inner := m₂ } = { inner := m₁ \ m₂ }
                                                                  theorem Map.get?_diff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} {i : α} :
                                                                  get? i (m₁ \ m₂) = if i m₂ then none else get? i m₁
                                                                  @[simp]
                                                                  theorem Map.union_diff_self {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} :
                                                                  m₁ m₂ \ m₁ = m₂ m₁
                                                                  theorem Map.union_eq_self_left_iff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} :
                                                                  m₁ m₂ = m₁ ∀ (i : α) (x : β), get? i m₂ = some xget? i m₁ = some x
                                                                  @[simp]
                                                                  theorem Map.union_insert_empty {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ : Map α β} {i : α} {x : β} :
                                                                  m₁ .insert i x = m₁.insert i x
                                                                  theorem Map.toList_ofList {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] {xs : List (α × β)} (h : (List.map (fun (x : α × β) => x.1) xs).Nodup) :
                                                                  (ofList xs).toList = xs.mergeSort fun (x1 x2 : α × β) => decide (x1.1 x2.1)
                                                                  theorem Map.union_eq_union_iff_right {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m m₁ m₂ : Map α β} (h₁ : im, im₁) (h₂ : im, im₂) :
                                                                  m m₁ = m m₂ m₁ = m₂
                                                                  theorem Map.get?_union_ite {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} {i : α} :
                                                                  get? i (m₁ m₂) = if i m₂ then get? i m₂ else get? i m₁
                                                                  @[simp]
                                                                  theorem Map.mem_diff {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} {i : α} :
                                                                  i m₁ \ m₂ i m₁ im₂
                                                                  theorem Map.toList_ofList_subset {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] {xs : List (α × β)} :
                                                                  (ofList xs).toList xs
                                                                  theorem Map.mem_of_mem_toList_ofList {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] {xs : List (α × β)} {p : α × β} (h : p (ofList xs).toList) :
                                                                  p xs
                                                                  theorem Map.mem_of_get?_ofList {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {xs : List (α × β)} {i : α} {x : β} (h : get? i (ofList xs) = some x) :
                                                                  (i, x) xs
                                                                  @[simp]
                                                                  theorem Map.get!_empty {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [hb : Inhabited β] {i : α} :
                                                                  @[simp]
                                                                  theorem Map.insert_empty_eq_insert_empty {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {i j : α} {x y : β} :
                                                                  .insert i x = .insert j y i = j x = y
                                                                  theorem Map.ofList_eq_foldl {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {xs : List (α × β)} :
                                                                  ofList xs = List.foldl (fun (m : Map α β) (x : α × β) => insertP x m) xs
                                                                  theorem Map.keys_insert_of_mem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {i : α} {x : β} (h : i mp) :
                                                                  (mp.insert i x).keys = mp.keys
                                                                  theorem Map.keys_insert {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {mp : Map α β} [ha : LinearOrder α] {i : α} {x : β} :
                                                                  (mp.insert i x).keys = if i mp then mp.keys else (i :: mp.keys).mergeSort fun (a b : α) => decide (a b)
                                                                  @[simp]
                                                                  theorem Map.keys_empty {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] :
                                                                  theorem Map.get?_ofList_of_nodup_and_mem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {xs : List (α × β)} {i : α} {x : β} (h₁ : (List.map (fun (x : α × β) => x.1) xs).Nodup) (h₂ : (i, x) xs) :
                                                                  get? i (ofList xs) = some x
                                                                  theorem Map.get!_ofList_of_nodup_and_mem {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [hb : Inhabited β] {xs : List (α × β)} {i : α} {x : β} (h₁ : (List.map (fun (x : α × β) => x.1) xs).Nodup) (h₂ : (i, x) xs) :
                                                                  get! i (ofList xs) = x
                                                                  theorem Map.keys_union {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] {m₁ m₂ : Map α β} [ha : LinearOrder α] (h : im₁, im₂) :
                                                                  (m₁ m₂).keys = (m₁.keys ++ m₂.keys).mergeSort fun (a b : α) => decide (a b)
                                                                  theorem Map.keys_ofList {α : Type u} {β : Type v} [hh₁ : DecidableEq α] [hh₂ : Hashable α] [ha : LinearOrder α] {xs : List (α × β)} (h : (List.map (fun (x : α × β) => x.1) xs).Nodup) :
                                                                  (ofList xs).keys = (List.map (fun (x : α × β) => x.1) xs).mergeSort fun (a b : α) => decide (a b)