The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V33. Data structures and computation

Mathlib.Data.List.Perm.Subperm

10 declarations. Mathlib docs · Source

theorem List.subperm_iff_count E1 #

∀ {α : Type u_1} {l₁ l₂ : List α} [inst : DecidableEq α], l₁.Subperm l₂ ↔ ∀ (a : α), List.count a l₁ ≤ List.count a l₂

See also List.subperm_ext_iff.

theorem List.subperm_iff E0 #

∀ {α : Type u_1} {l₁ l₂ : List α}, l₁.Subperm l₂ ↔ ∃ l, l.Perm l₂ ∧ l₁.Sublist l

theorem List.subperm_singleton_iff E0 #

∀ {α : Type u_1} {l : List α} {a : α}, l.Subperm [a] ↔ l = [] ∨ l = [a]

theorem List.subperm_cons_self E1 #

∀ {α : Type u_1} {l : List α} {a : α}, l.Subperm (a :: l)

theorem List.subperm.of_cons E1 #

∀ {α : Type u_1} (a : α) {l₁ l₂ : List α}, (a :: l₁).Subperm (a :: l₂) → l₁.Subperm l₂

Alias of the forward direction of List.subperm_cons.

theorem List.subperm.cons E1 #

∀ {α : Type u_1} (a : α) {l₁ l₂ : List α}, l₁.Subperm l₂ → (a :: l₁).Subperm (a :: l₂)

Alias of the reverse direction of List.subperm_cons.

theorem List.Subperm.append E1 #

∀ {α : Type u_1} {l₁ l₂ r₁ r₂ : List α}, l₁.Subperm l₂ → r₁.Subperm r₂ → (l₁ ++ r₁).Subperm (l₂ ++ r₂)

theorem List.map_subperm_map_iff E0 #

∀ {α : Type u_2} {β : Type u_3} {l₁ l₂ : List α} {f : α → β},
  Function.Injective f → ((List.map f l₁).Subperm (List.map f l₂) ↔ l₁.Subperm l₂)

theorem List.Subperm.map E1 #

∀ {α : Type u_2} {β : Type u_3} {l₁ l₂ : List α} {f : α → β},
  Function.Injective f → l₁.Subperm l₂ → (List.map f l₁).Subperm (List.map f l₂)

Alias of the reverse direction of List.map_subperm_map_iff.

theorem List.Nodup.subperm E1 #

∀ {α : Type u_1} {l₁ l₂ : List α}, l₁.Nodup → l₁ ⊆ l₂ → l₁.Subperm l₂