Documentation

Projects.Util.SetTheory

def dfltWfRelCnd {α : Type u_1} (r : α → α → Prop) :
Equations
Instances For
    def dfltWfRel {α : Type u_1} :
    α → α → Prop
    Equations
    Instances For
      def embedT {α : Type u} :
      α → Type u
      Equations
      Instances For
        noncomputable def embedTInv {α : Type u} [ha : Nonempty α] :
        Type u → α
        Equations
        Instances For
          theorem nonempty_equiv_comm {α : Type u_4} {β : Type u_5} :
          Nonempty (α ≃ β) ↔ Nonempty (β ≃ α)
          @[simp]
          theorem nonempty_equiv_refl {α : Type u_4} :
          Nonempty (α ≃ α)
          theorem nonempty_equiv_set_empty_empty {α : Type u_4} {β : Type u_5} :
          @[simp]
          theorem nonempty_equiv_set_empty_iff {α : Type u_4} {β : Type u_5} {s : Set α} :
          Nonempty (↑s ≃ ↑∅) ↔ s = ∅
          theorem nonempty_equiv_trans {α : Type u_4} {γ : Type u_5} (β : Type u_6) (h₁ : Nonempty (α ≃ β)) (h₂ : Nonempty (β ≃ γ)) :
          Nonempty (α ≃ γ)
          @[simp]
          theorem nonempty_equiv_set_univ_iff {α β : Type u} :
          @[simp]
          theorem nonempty_equiv_set_univ_iff' {α β : Type u} :
          theorem Cardinal.mk_eq_of_fintype_card {α : Type u_4} [h : Fintype α] {n : ℕ} (h₁ : Fintype.card α = n) :
          mk α = ↑n
          @[simp]
          theorem Cardinal.mk_subtype_const_true {α : Type u_4} :
          mk { _x : α // True } = mk α
          @[simp]
          theorem Cardinal.mk_eq_mk_of_finite {α β : Type u} [ha : Fintype α] [hb : Fintype β] :
          @[simp]
          theorem nonempty_equiv_subtype_const_true_iff {α β : Type u} :
          Nonempty (α ≃ { _x : β // True }) ↔ Nonempty (α ≃ β)
          theorem Finset.mkRaw_card_eq_set_card_range {α : Type u_4} {β : Type u_5} [ha : Fintype α] {f : α → β} :
          @[simp]
          theorem Fintype.card_set_eq_ncard {α : Type u_4} {s : Set α} [hs : Fintype ↑s] :
          card ↑s = s.ncard
          theorem Finset.card_eq_card_iff_equiv {α β : Type u} {sa : Finset α} {sb : Finset β} :
          sa.card = sb.card ↔ Nonempty (↥sa ≃ ↥sb)
          theorem Set.injOn_of_card_image_eq' {α : Type u_4} {s : Set α} {f : α → α} (h₁ : s.Finite) (h₂ : Cardinal.mk ↑(f '' s) = Cardinal.mk ↑s) :
          InjOn f s
          theorem Set.card_image_eq_iff_injOn' {α : Type u_4} {s : Set α} {f : α → α} (h₁ : s.Finite) :
          Cardinal.mk ↑(f '' s) = Cardinal.mk ↑s ↔ InjOn f s
          theorem Set.ncard_eq_ncard_iff_nonempty_equiv {α β : Type u} {sa : Set α} {sb : Set β} (ha : sa.Finite) (hb : sb.Finite) :
          sa.ncard = sb.ncard ↔ Nonempty (↑sa ≃ ↑sb)
          theorem Set.ncard_image_eq_iff_injOn' {α : Type u_4} {s : Set α} {f : α → α} (h₁ : s.Finite) :
          (f '' s).ncard = s.ncard ↔ InjOn f s
          theorem nonempty_equiv_iff_bijective {α : Type u_4} {β : Type u_5} :
          Nonempty (α ≃ β) ↔ ∃ (f : α → β), Function.Bijective f
          theorem Set.ncard_eq_ncard_iff_bijective {α β : Type u} {sa : Set α} {sb : Set β} (ha : sa.Finite) (hb : sb.Finite) :
          sa.ncard = sb.ncard ↔ ∃ (f : ↑sa → ↑sb), Function.Bijective f
          theorem Set.range_eq_image {α : Type u_4} {β : Type u_5} {f : α → β} :
          theorem Fintype.card_range_eq_iff_injective {α : Type u_4} {β : Type u_5} [ha : Fintype α] {f : α → β} :
          theorem Set.finite_of_finite_and_bijective {α : Type u_4} {β : Type u_5} {sa : Set α} {sb : Set β} (h₁ : sa.Finite) (h₂ : ∃ (f : ↑sa → ↑sb), Function.Bijective f) :
          theorem exi_bijective_symm {α : Type u_4} {β : Type u_5} (h : ∃ (f : α → β), Function.Bijective f) :
          ∃ (f : β → α), Function.Bijective f
          theorem exi_bijective_comm {α : Type u_4} {β : Type u_5} :
          (∃ (f : α → β), Function.Bijective f) ↔ ∃ (f : β → α), Function.Bijective f
          theorem Set.finite_of_finite_and_bijective' {α : Type u_4} {β : Type u_5} {sa : Set α} {sb : Set β} (h₁ : sa.Finite) (h₂ : ∃ (f : ↑sb → ↑sa), Function.Bijective f) :
          theorem Set.ncard_image_eq_iff_injOn {α : Type u_4} {β : Type u_5} {s : Set α} {f : α → β} (h₁ : s.Finite) :
          (f '' s).ncard = s.ncard ↔ InjOn f s
          theorem Set.range_sum_inl_card_eq {α : Type u_4} {β : Type u_5} [ha : Fintype α] :
          theorem Set.range_sum_inr_card_eq {α : Type u_4} {β : Type u_5} [hb : Fintype β] :
          theorem Set.nonempty_range_equiv_self_iff_injective {α β : Type u} [ha : Fintype α] {f : α → β} :
          theorem ncard_eq_card_toFinset {α : Type u_4} [ha : Fintype α] {s : Set α} :
          theorem ncard_eq_card_toFinset' {α : Type u_4} {s : Set α} [hs : Fintype ↑s] :
          @[simp]
          theorem Cardinal.mk_set_elem {α : Type u_4} {s : Set α} :
          mk ↑s = mk { x : α // x ∈ s }
          @[simp]
          @[simp]
          theorem Finset.card_le_fintype_card {α : Type u_4} [ha : Fintype α] {s : Finset α} :
          theorem Cardinal.mk_lt_fn_prop {α : Type u_4} :
          mk α < mk (α → Prop)
          theorem nonempty_equiv_of_embed {α : Type u} {β : Type v} (h₁ : Nonempty (α ↪ β)) (h₂ : Nonempty (β ↪ α)) :
          Nonempty (α ≃ β)
          theorem nonempty_embed_trans {α : Type u} {β : Type v} {γ : Type w} (h₁ : Nonempty (α ↪ β)) (h₂ : Nonempty (β ↪ γ)) :
          Nonempty (α ↪ γ)
          theorem isEmpty_embed_iff_lift_left {α : Type v} {β : Type w} :
          theorem nonempty_embed_of_empty_embed_rev {α : Type u} {β : Type v} (h : IsEmpty (β ↪ α)) :
          Nonempty (α ↪ β)
          theorem isEmpty_embed_of_isEmpty_of_nonempty {α : Type u} {β : Type v} {γ : Type w} (h₁ : IsEmpty (β ↪ α)) (h₂ : Nonempty (β ↪ γ)) :
          IsEmpty (γ ↪ α)
          @[simp]
          theorem isEmpty_set_embed {α : Type u} :
          IsEmpty (Set α ↪ α)
          theorem isEmpty_type_embed {α : Type u} :
          theorem ifEmpty_embed_trans {α : Type u} {β : Type v} {γ : Type w} (h₁ : IsEmpty (α ↪ β)) (h₂ : IsEmpty (β ↪ γ)) :
          IsEmpty (α ↪ γ)
          @[simp]
          theorem nonempty_lift_embed_iff {α : Type v} {β : Type w} :
          @[simp]
          theorem nonempty_embed_lift_iff {α : Type v} {β : Type w} :
          @[simp]
          theorem isEmpty_lift_embed_iff {α : Type v} {β : Type w} :
          @[simp]
          theorem isEmpty_embed_lift_iff {α : Type v} {β : Type w} :
          theorem nonempty_embed_type_max {α : Type v} :
          Nonempty (α ↪ Type (max v u))
          theorem isEmpty_type_max_embed {α : Type v} :
          IsEmpty (Type (max v u) ↪ α)
          @[simp]
          @[simp]
          theorem Finset.card_fin_eq_of {n m : ℕ} {s : Finset (Fin n)} {t : Finset (Fin m)} (hs : ∀ {i : ℕ} {h : i < n}, ⟨i, h⟩ ∈ s → ∃ (h : i < m), ⟨i, h⟩ ∈ t) (ht : ∀ {i : ℕ} {h : i < m}, ⟨i, h⟩ ∈ t → ∃ (h : i < n), ⟨i, h⟩ ∈ s) :
          s.card = t.card
          @[simp]
          theorem Equiv.bijective_toFun {α : Type u_4} {β : Type u_5} (e : α ≃ β) :
          @[simp]
          theorem Equiv.bijective_invFun {α : Type u_4} {β : Type u_5} (e : α ≃ β) :
          theorem Set.finite_of_subset_finset {α : Type u_4} {set : Set α} (s : Finset α) (h : ∀ x ∈ set, x ∈ s) :
          set.Finite
          theorem Set.nonempty_infinite_diff_finite {α : Type u_4} {s s' : Set α} (h₁ : s.Infinite) (h₂ : s'.Finite) :
          (s \ s').Nonempty
          theorem Set.nat_exists_le_of_infinite {s : Set ℕ} {n : ℕ} (h : s.Infinite) :
          ∃ (k : ℕ), n ≤ k ∧ k ∈ s
          theorem Set.exists_infinite_preimage_of' {α : Type u_4} {β : Type u_5} [ha : Infinite α] [hb : Finite β] {f : α → β} :
          ∃ (b : Set β), (f ⁻¹' b).Infinite
          theorem Set.exists_infinite_preimage_of {α : Type u_4} {β : Type u_5} [ha : Infinite α] [hb : Finite β] {f : α → β} :
          ∃ (b : β), (f ⁻¹' {b}).Infinite
          theorem Set.infinite_of_subset {α : Type u_4} {s₁ s₂ : Set α} (h₁ : s₂ ⊆ s₁) (h₂ : s₂.Infinite) :
          theorem Set.exists_infinite_of_forall_exists {α : Type u_4} {β : Type u_5} [ha : Infinite α] [hb : Finite β] {R : α → β → Prop} (h : ∀ (a : α), ∃ (b : β), R a b) :
          ∃ (b : β), {a : α | R a b}.Infinite
          theorem finite_iff_finite_of_bijective {α : Type u_4} {β : Type u_5} (h : ∃ (f : α → β), Function.Bijective f) :
          theorem Set.finite_filter_equiv_toFun_iff {α : Type u_4} {β : Type u_5} {p : β → Prop} {e : α ≃ β} :
          {x : α | p (e x)}.Finite ↔ {y : β | p y}.Finite
          theorem Set.finite_filter_equiv_invFun_iff {α : Type u_4} {β : Type u_5} {p : β → Prop} {e : β ≃ α} :
          {x : α | p (e.invFun x)}.Finite ↔ {y : β | p y}.Finite
          theorem Set.finite_filter_equiv_toFun_of {α : Type u_4} {β : Type u_5} {p : β → Prop} {e : α ≃ β} (h : {y : β | p y}.Finite) :
          {x : α | p (e x)}.Finite
          theorem Set.finite_filter_equiv_invFun_of {α : Type u_4} {β : Type u_5} {p : β → Prop} {e : β ≃ α} (h : {y : β | p y}.Finite) :
          {x : α | p (e.invFun x)}.Finite
          theorem Set.finite_filter_of_bijective {α : Type u_4} {β : Type u_5} {p : β → Prop} {f : α → β} (hf : Function.Bijective f) (h : {x : α | p (f x)}.Finite) :
          {y : β | p y}.Finite
          @[simp]
          @[simp]
          theorem Set.finite_int_abs_sub_le {c d : ℤ} :
          {a : ℤ | |a - c| ≤ d}.Finite
          @[simp]
          theorem Set.finite_toSet_list {α : Type u_4} {xs : List α} :
          @[simp]
          instance instFiniteElemToSet {α : Type u_4} {xs : List α} :
          theorem Set.ncard_toSet_list_of_nodup {α : Type u_4} {xs : List α} (h : xs.Nodup) :
          noncomputable def Set.ncard? {α : Type u_4} (s : Set α) :
          Equations
          Instances For
            @[simp]
            theorem Set.ncard?_empty {α : Type u_4} :
            theorem Set.ncard?_image_of_injOn {α : Type u_4} {β : Type u_5} {s : Set α} {f : α → β} (h : InjOn f s) :
            (f '' s).ncard? = s.ncard?
            theorem Set.ssubset_of {α : Type u_4} {s₁ s₂ : Set α} (x : α) (h₁ : s₁ ⊆ s₂) (h₂ : x ∉ s₁) (h₃ : x ∈ s₂) :
            s₁ ⊂ s₂
            theorem Set.ncard_eq_ite {α : Type u_4} {s : Set α} :
            @[simp]
            theorem Set.embedT_inj {α : Type u_4} {x y : α} :
            embedT x = embedT y ↔ x = y
            @[simp]
            theorem Set.embedTInv_embedT {α : Type u_4} [ha : Nonempty α] {x : α} :
            @[simp]
            theorem Set.ncard_nat_le {n : ℕ} :
            {k : ℕ | k ≤ n}.ncard = n + 1
            @[simp]
            theorem Set.ncard_nat_lt {n : ℕ} :
            {k : ℕ | k < n}.ncard = n
            @[simp]
            theorem Set.finite_ofPred_and_of_left {α : Type u_4} {p q : α → Prop} (h : {x : α | p x}.Finite) :
            {x : α | p x ∧ q x}.Finite
            @[simp]
            theorem Set.finite_ofPred_and_of_right {α : Type u_4} {p q : α → Prop} (h : {x : α | q x}.Finite) :
            {x : α | p x ∧ q x}.Finite
            theorem Set.nat_ncard_ofPred_and_lt_eq_list_countP {p : ℕ → Prop} {n : ℕ} [hp : DecidablePred p] :
            {i : ℕ | p i ∧ i < n}.ncard = List.countP (fun (i : ℕ) => decide (p i)) (List.range n)
            theorem Set.Finite.filter {α : Type u_4} {s : Set α} {p : α → Prop} (h : s.Finite) :
            theorem Set.finite_filter_of_finite_ofPred {α : Type u_4} {s : Set α} {p : α → Prop} (h : (ofPred p).Finite) :
            theorem Set.Infinite.exi_nat_ge {s : Set ℕ} (h : s.Infinite) (n : ℕ) :
            ∃ m ∈ s, n ≤ m
            theorem Set.Infinite.exi_nat_gt {s : Set ℕ} (h : s.Infinite) (n : ℕ) :
            ∃ m ∈ s, n < m
            theorem Set.card_eq_zero_iff {α : Type u_4} {s : Set α} :
            theorem Set.card_eq_of_ne_zero_iff {α : Type u_4} {s : Set α} {n : ℕ} (h : n ≠ 0) :
            s.ncard = n ↔ ∃ (s' : Finset α), s'.card = n ∧ ↑s' = s
            @[simp]
            theorem Set.ncard?_eq_zero {α : Type u_4} {s : Set α} :
            theorem Set.ncard?_eq_some_iff {α : Type u_4} {s : Set α} {n : ℕ} :
            s.ncard? = some n ↔ ∃ (s' : Finset α), s'.card = n ∧ ↑s' = s
            theorem Set.ncard?_eq_one {α : Type u_4} {s : Set α} :
            s.ncard? = some 1 ↔ ∃ (x : α), s = {x}
            theorem Set.ncard?_eq_two {α : Type u_4} {s : Set α} :
            s.ncard? = some 2 ↔ ∃ (x : α) (y : α), x ≠ y ∧ s = {x, y}
            theorem Set.insert_insert_comm {α : Type u_4} {s : Set α} {x y : α} :
            insert y (insert x s) = insert x (insert y s)
            theorem Set.upair_comm {α : Type u_4} {x y : α} :
            {x, y} = {y, x}
            @[simp]
            theorem Set.insert_ne_empty {α : Type u_4} {s : Set α} {x : α} :
            @[simp]
            theorem Finset.forall_not_mem_iff {α : Type u_1} {s : Finset α} :
            (∀ (x : α), x ∉ s) ↔ s = ∅
            theorem Set.finite_iff_exi_list {α : Type u_1} {s : Set α} :
            s.Finite ↔ ∃ (xs : List α), xs.toSet = s
            theorem Set.finite_of_subset_list {α : Type u_1} {s : Set α} (xs : List α) (h : ∀ x ∈ s, x ∈ xs) :
            theorem Set.finite_set_list_iff {α : Type u_1} {s : Set (List α)} :
            s.Finite ↔ ∃ (n : ℕ) (xs : List α), ∀ ys ∈ s, ys.length ≤ n ∧ ys ⊆ xs