Documentation

Mathlib.Data.Set.Prod

Sets in product and pi types #

This file defines the product of sets in α × β and in Π i, α i along with the diagonal of a type.

Main declarations #

Cartesian binary product of sets #

theorem Set.Subsingleton.prod {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} (hs : Set.Subsingleton s) (ht : Set.Subsingleton t) :
noncomputable instance Set.decidableMemProd {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} [DecidablePred fun (x : α) => x s] [DecidablePred fun (x : β) => x t] :
DecidablePred fun (x : α × β) => x s ×ˢ t
Equations
theorem Set.prod_mono {α : Type u_1} {β : Type u_2} {s₁ : Set α} {s₂ : Set α} {t₁ : Set β} {t₂ : Set β} (hs : s₁ s₂) (ht : t₁ t₂) :
s₁ ×ˢ t₁ s₂ ×ˢ t₂
theorem Set.prod_mono_left {α : Type u_1} {β : Type u_2} {s₁ : Set α} {s₂ : Set α} {t : Set β} (hs : s₁ s₂) :
s₁ ×ˢ t s₂ ×ˢ t
theorem Set.prod_mono_right {α : Type u_1} {β : Type u_2} {s : Set α} {t₁ : Set β} {t₂ : Set β} (ht : t₁ t₂) :
s ×ˢ t₁ s ×ˢ t₂
@[simp]
theorem Set.prod_self_subset_prod_self {α : Type u_1} {s₁ : Set α} {s₂ : Set α} :
s₁ ×ˢ s₁ s₂ ×ˢ s₂ s₁ s₂
@[simp]
theorem Set.prod_self_ssubset_prod_self {α : Type u_1} {s₁ : Set α} {s₂ : Set α} :
s₁ ×ˢ s₁ s₂ ×ˢ s₂ s₁ s₂
theorem Set.prod_subset_iff {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} {P : Set (α × β)} :
s ×ˢ t P xs, yt, (x, y) P
theorem Set.forall_prod_set {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} {p : α × βProp} :
(xs ×ˢ t, p x) xs, yt, p (x, y)
theorem Set.exists_prod_set {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} {p : α × βProp} :
(∃ x ∈ s ×ˢ t, p x) ∃ x ∈ s, ∃ y ∈ t, p (x, y)
@[simp]
theorem Set.prod_empty {α : Type u_1} {β : Type u_2} {s : Set α} :
@[simp]
theorem Set.empty_prod {α : Type u_1} {β : Type u_2} {t : Set β} :
@[simp]
theorem Set.univ_prod_univ {α : Type u_1} {β : Type u_2} :
Set.univ ×ˢ Set.univ = Set.univ
theorem Set.univ_prod {α : Type u_1} {β : Type u_2} {t : Set β} :
Set.univ ×ˢ t = Prod.snd ⁻¹' t
theorem Set.prod_univ {α : Type u_1} {β : Type u_2} {s : Set α} :
s ×ˢ Set.univ = Prod.fst ⁻¹' s
@[simp]
theorem Set.prod_eq_univ {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} [Nonempty α] [Nonempty β] :
s ×ˢ t = Set.univ s = Set.univ t = Set.univ
@[simp]
theorem Set.singleton_prod {α : Type u_1} {β : Type u_2} {t : Set β} {a : α} :
{a} ×ˢ t = Prod.mk a '' t
@[simp]
theorem Set.prod_singleton {α : Type u_1} {β : Type u_2} {s : Set α} {b : β} :
s ×ˢ {b} = (fun (a : α) => (a, b)) '' s
theorem Set.singleton_prod_singleton {α : Type u_1} {β : Type u_2} {a : α} {b : β} :
{a} ×ˢ {b} = {(a, b)}
@[simp]
theorem Set.union_prod {α : Type u_1} {β : Type u_2} {s₁ : Set α} {s₂ : Set α} {t : Set β} :
(s₁ s₂) ×ˢ t = s₁ ×ˢ t s₂ ×ˢ t
@[simp]
theorem Set.prod_union {α : Type u_1} {β : Type u_2} {s : Set α} {t₁ : Set β} {t₂ : Set β} :
s ×ˢ (t₁ t₂) = s ×ˢ t₁ s ×ˢ t₂
theorem Set.inter_prod {α : Type u_1} {β : Type u_2} {s₁ : Set α} {s₂ : Set α} {t : Set β} :
(s₁ s₂) ×ˢ t = s₁ ×ˢ t s₂ ×ˢ t
theorem Set.prod_inter {α : Type u_1} {β : Type u_2} {s : Set α} {t₁ : Set β} {t₂ : Set β} :
s ×ˢ (t₁ t₂) = s ×ˢ t₁ s ×ˢ t₂
theorem Set.prod_inter_prod {α : Type u_1} {β : Type u_2} {s₁ : Set α} {s₂ : Set α} {t₁ : Set β} {t₂ : Set β} :
s₁ ×ˢ t₁ s₂ ×ˢ t₂ = (s₁ s₂) ×ˢ (t₁ t₂)
theorem Set.compl_prod_eq_union {α : Type u_5} {β : Type u_6} (s : Set α) (t : Set β) :
(s ×ˢ t) = s ×ˢ Set.univ Set.univ ×ˢ t
@[simp]
theorem Set.disjoint_prod {α : Type u_1} {β : Type u_2} {s₁ : Set α} {s₂ : Set α} {t₁ : Set β} {t₂ : Set β} :
Disjoint (s₁ ×ˢ t₁) (s₂ ×ˢ t₂) Disjoint s₁ s₂ Disjoint t₁ t₂
theorem Set.Disjoint.set_prod_left {α : Type u_1} {β : Type u_2} {s₁ : Set α} {s₂ : Set α} (hs : Disjoint s₁ s₂) (t₁ : Set β) (t₂ : Set β) :
Disjoint (s₁ ×ˢ t₁) (s₂ ×ˢ t₂)
theorem Set.Disjoint.set_prod_right {α : Type u_1} {β : Type u_2} {t₁ : Set β} {t₂ : Set β} (ht : Disjoint t₁ t₂) (s₁ : Set α) (s₂ : Set α) :
Disjoint (s₁ ×ˢ t₁) (s₂ ×ˢ t₂)
theorem Set.insert_prod {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} {a : α} :
insert a s ×ˢ t = Prod.mk a '' t s ×ˢ t
theorem Set.prod_insert {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} {b : β} :
s ×ˢ insert b t = (fun (a : α) => (a, b)) '' s s ×ˢ t
theorem Set.prod_preimage_eq {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} {s : Set α} {t : Set β} {f : γα} {g : δβ} :
(f ⁻¹' s) ×ˢ (g ⁻¹' t) = (fun (p : γ × δ) => (f p.1, g p.2)) ⁻¹' s ×ˢ t
theorem Set.prod_preimage_left {α : Type u_1} {β : Type u_2} {γ : Type u_3} {s : Set α} {t : Set β} {f : γα} :
(f ⁻¹' s) ×ˢ t = (fun (p : γ × β) => (f p.1, p.2)) ⁻¹' s ×ˢ t
theorem Set.prod_preimage_right {α : Type u_1} {β : Type u_2} {δ : Type u_4} {s : Set α} {t : Set β} {g : δβ} :
s ×ˢ (g ⁻¹' t) = (fun (p : α × δ) => (p.1, g p.2)) ⁻¹' s ×ˢ t
theorem Set.preimage_prod_map_prod {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} (f : αβ) (g : γδ) (s : Set β) (t : Set δ) :
Prod.map f g ⁻¹' s ×ˢ t = (f ⁻¹' s) ×ˢ (g ⁻¹' t)
theorem Set.mk_preimage_prod {α : Type u_1} {β : Type u_2} {γ : Type u_3} {s : Set α} {t : Set β} (f : γα) (g : γβ) :
(fun (x : γ) => (f x, g x)) ⁻¹' s ×ˢ t = f ⁻¹' s g ⁻¹' t
@[simp]
theorem Set.mk_preimage_prod_left {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} {b : β} (hb : b t) :
(fun (a : α) => (a, b)) ⁻¹' s ×ˢ t = s
@[simp]
theorem Set.mk_preimage_prod_right {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} {a : α} (ha : a s) :
@[simp]
theorem Set.mk_preimage_prod_left_eq_empty {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} {b : β} (hb : bt) :
(fun (a : α) => (a, b)) ⁻¹' s ×ˢ t =
@[simp]
theorem Set.mk_preimage_prod_right_eq_empty {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} {a : α} (ha : as) :
theorem Set.mk_preimage_prod_left_eq_if {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} {b : β} [DecidablePred fun (x : β) => x t] :
(fun (a : α) => (a, b)) ⁻¹' s ×ˢ t = if b t then s else
theorem Set.mk_preimage_prod_right_eq_if {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} {a : α} [DecidablePred fun (x : α) => x s] :
Prod.mk a ⁻¹' s ×ˢ t = if a s then t else
theorem Set.mk_preimage_prod_left_fn_eq_if {α : Type u_1} {β : Type u_2} {γ : Type u_3} {s : Set α} {t : Set β} {b : β} [DecidablePred fun (x : β) => x t] (f : γα) :
(fun (a : γ) => (f a, b)) ⁻¹' s ×ˢ t = if b t then f ⁻¹' s else
theorem Set.mk_preimage_prod_right_fn_eq_if {α : Type u_1} {β : Type u_2} {δ : Type u_4} {s : Set α} {t : Set β} {a : α} [DecidablePred fun (x : α) => x s] (g : δβ) :
(fun (b : δ) => (a, g b)) ⁻¹' s ×ˢ t = if a s then g ⁻¹' t else
@[simp]
theorem Set.preimage_swap_prod {α : Type u_1} {β : Type u_2} (s : Set α) (t : Set β) :
Prod.swap ⁻¹' s ×ˢ t = t ×ˢ s
@[simp]
theorem Set.image_swap_prod {α : Type u_1} {β : Type u_2} (s : Set α) (t : Set β) :
Prod.swap '' s ×ˢ t = t ×ˢ s
theorem Set.prod_image_image_eq {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} {s : Set α} {t : Set β} {m₁ : αγ} {m₂ : βδ} :
(m₁ '' s) ×ˢ (m₂ '' t) = (fun (p : α × β) => (m₁ p.1, m₂ p.2)) '' s ×ˢ t
theorem Set.prod_range_range_eq {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} {m₁ : αγ} {m₂ : βδ} :
Set.range m₁ ×ˢ Set.range m₂ = Set.range fun (p : α × β) => (m₁ p.1, m₂ p.2)
@[simp]
theorem Set.range_prod_map {α : Type u_1} {β : Type u_2} {γ : Type u_3} {δ : Type u_4} {m₁ : αγ} {m₂ : βδ} :
Set.range (Prod.map m₁ m₂) = Set.range m₁ ×ˢ Set.range m₂
theorem Set.prod_range_univ_eq {α : Type u_1} {β : Type u_2} {γ : Type u_3} {m₁ : αγ} :
Set.range m₁ ×ˢ Set.univ = Set.range fun (p : α × β) => (m₁ p.1, p.2)
theorem Set.prod_univ_range_eq {α : Type u_1} {β : Type u_2} {δ : Type u_4} {m₂ : βδ} :
Set.univ ×ˢ Set.range m₂ = Set.range fun (p : α × β) => (p.1, m₂ p.2)
theorem Set.range_pair_subset {α : Type u_1} {β : Type u_2} {γ : Type u_3} (f : αβ) (g : αγ) :
(Set.range fun (x : α) => (f x, g x)) Set.range f ×ˢ Set.range g
theorem Set.Nonempty.prod {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} :
theorem Set.Nonempty.fst {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} :
theorem Set.Nonempty.snd {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} :
@[simp]
theorem Set.prod_nonempty_iff {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} :
@[simp]
theorem Set.prod_eq_empty_iff {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} :
s ×ˢ t = s = t =
theorem Set.prod_sub_preimage_iff {α : Type u_1} {β : Type u_2} {γ : Type u_3} {s : Set α} {t : Set β} {W : Set γ} {f : α × βγ} :
s ×ˢ t f ⁻¹' W ∀ (a : α) (b : β), a sb tf (a, b) W
theorem Set.image_prod_mk_subset_prod {α : Type u_1} {β : Type u_2} {γ : Type u_3} {f : αβ} {g : αγ} {s : Set α} :
(fun (x : α) => (f x, g x)) '' s (f '' s) ×ˢ (g '' s)
theorem Set.image_prod_mk_subset_prod_left {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} {b : β} (hb : b t) :
(fun (a : α) => (a, b)) '' s s ×ˢ t
theorem Set.image_prod_mk_subset_prod_right {α : Type u_1} {β : Type u_2} {s : Set α} {t : Set β} {a : α} (ha : a s) :
Prod.mk a '' t s ×ˢ t
theorem Set.prod_subset_preimage_fst {α : Type u_1} {β : Type u_2} (s : Set α) (t : Set β) :
s ×ˢ t Prod.fst ⁻¹' s
theorem Set.fst_image_prod_subset {α : Type u_1} {β : Type u_2} (s : Set α) (t : Set β) :
Prod.fst '' s ×ˢ t s
theorem Set.fst_image_prod {α : Type u_1} {β : Type u_2} (s : Set β) {t : Set α} (ht : Set.Nonempty t) :
Prod.fst '' s ×ˢ t = s
theorem Set.prod_subset_preimage_snd {α : Type u_1} {β : Type u_2} (s : Set α) (t : Set β) :
s ×ˢ t Prod.snd ⁻¹' t
theorem Set.snd_image_prod_subset {α : Type u_1} {β : Type u_2} (s : Set α) (t : Set β) :
Prod.snd '' s ×ˢ t t
theorem Set.snd_image_prod {α : Type u_1} {β : Type u_2} {s : Set α} (hs : Set.Nonempty s) (t : Set β) :
Prod.snd '' s ×ˢ t = t
theorem Set.prod_diff_prod {α : Type u_1} {β : Type u_2} {s : Set α} {s₁ : Set α} {t : Set β} {t₁ : Set β} :
s ×ˢ t \ s₁ ×ˢ t₁ = s ×ˢ (t \ t₁) (s \ s₁) ×ˢ t
theorem Set.prod_subset_prod_iff {α : Type u_1} {β : Type u_2} {s : Set α} {s₁ : Set α} {t : Set β} {t₁ : Set β} :
s ×ˢ t s₁ ×ˢ t₁ s s₁ t t₁ s = t =

A product set is included in a product set if and only factors are included, or a factor of the first set is empty.

theorem Set.prod_eq_prod_iff_of_nonempty {α : Type u_1} {β : Type u_2} {s : Set α} {s₁ : Set α} {t : Set β} {t₁ : Set β} (h : Set.Nonempty (s ×ˢ t)) :
s ×ˢ t = s₁ ×ˢ t₁ s = s₁ t = t₁
theorem Set.prod_eq_prod_iff {α : Type u_1} {β : Type u_2} {s : Set α} {s₁ : Set α} {t : Set β} {t₁ : Set β} :
s ×ˢ t = s₁ ×ˢ t₁ s = s₁ t = t₁ (s = t = ) (s₁ = t₁ = )
@[simp]
theorem Set.prod_eq_iff_eq {α : Type u_1} {β : Type u_2} {s : Set α} {s₁ : Set α} {t : Set β} (ht : Set.Nonempty t) :
s ×ˢ t = s₁ ×ˢ t s = s₁
theorem Monotone.set_prod {α : Type u_1} {β : Type u_2} {γ : Type u_3} [Preorder α] {f : αSet β} {g : αSet γ} (hf : Monotone f) (hg : Monotone g) :
Monotone fun (x : α) => f x ×ˢ g x
theorem Antitone.set_prod {α : Type u_1} {β : Type u_2} {γ : Type u_3} [Preorder α] {f : αSet β} {g : αSet γ} (hf : Antitone f) (hg : Antitone g) :
Antitone fun (x : α) => f x ×ˢ g x
theorem MonotoneOn.set_prod {α : Type u_1} {β : Type u_2} {γ : Type u_3} {s : Set α} [Preorder α] {f : αSet β} {g : αSet γ} (hf : MonotoneOn f s) (hg : MonotoneOn g s) :
MonotoneOn (fun (x : α) => f x ×ˢ g x) s
theorem AntitoneOn.set_prod {α : Type u_1} {β : Type u_2} {γ : Type u_3} {s : Set α} [Preorder α] {f : αSet β} {g : αSet γ} (hf : AntitoneOn f s) (hg : AntitoneOn g s) :
AntitoneOn (fun (x : α) => f x ×ˢ g x) s

Diagonal #

In this section we prove some lemmas about the diagonal set {p | p.1 = p.2} and the diagonal map fun x ↦ (x, x).

instance Set.decidableMemDiagonal {α : Type u_1} [h : DecidableEq α] (x : α × α) :
Equations
theorem Set.preimage_coe_coe_diagonal {α : Type u_1} (s : Set α) :
(Prod.map (fun (x : s) => x) fun (x : s) => x) ⁻¹' Set.diagonal α = Set.diagonal s
@[simp]
theorem Set.range_diag {α : Type u_1} :
(Set.range fun (x : α) => (x, x)) = Set.diagonal α
theorem Set.diagonal_subset_iff {α : Type u_1} {s : Set (α × α)} :
Set.diagonal α s ∀ (x : α), (x, x) s
@[simp]
theorem Set.prod_subset_compl_diagonal_iff_disjoint {α : Type u_1} {s : Set α} {t : Set α} :
@[simp]
theorem Set.diag_preimage_prod {α : Type u_1} (s : Set α) (t : Set α) :
(fun (x : α) => (x, x)) ⁻¹' s ×ˢ t = s t
theorem Set.diag_preimage_prod_self {α : Type u_1} (s : Set α) :
(fun (x : α) => (x, x)) ⁻¹' s ×ˢ s = s
theorem Set.diag_image {α : Type u_1} (s : Set α) :
(fun (x : α) => (x, x)) '' s = Set.diagonal α s ×ˢ s
theorem Set.diagonal_eq_univ {α : Type u_1} [Subsingleton α] :
Set.diagonal α = Set.univ
theorem Set.range_const_eq_diagonal {α : Type u_1} {β : Type u_2} [hβ : Nonempty β] :
Set.range (Function.const α) = {f : αβ | ∀ (x y : α), f x = f y}

A function is Function.const α a for some a if and only if ∀ x y, f x = f y.

@[inline, reducible]
abbrev Function.Pullback {X : Type u_1} {Y : Sort u_2} {Z : Type u_3} (f : XY) (g : ZY) :
Type (max 0 u_3 u_1)

The fiber product $X \times_Y Z$.

Equations
Instances For
    @[inline, reducible]
    abbrev Function.PullbackSelf {X : Type u_1} {Y : Sort u_2} (f : XY) :
    Type u_1

    The fiber product $X \times_Y X$.

    Equations
    Instances For
      def Function.Pullback.fst {X : Type u_1} {Y : Sort u_2} {Z : Type u_3} {f : XY} {g : ZY} (p : Function.Pullback f g) :
      X

      The projection from the fiber product to the first factor.

      Equations
      Instances For
        def Function.Pullback.snd {X : Type u_1} {Y : Sort u_2} {Z : Type u_3} {f : XY} {g : ZY} (p : Function.Pullback f g) :
        Z

        The projection from the fiber product to the second factor.

        Equations
        Instances For
          theorem Function.pullback_comm_sq {X : Type u_2} {Y : Sort u_3} {Z : Type u_1} (f : XY) (g : ZY) :
          f Function.Pullback.fst = g Function.Pullback.snd
          def toPullbackDiag {X : Type u_1} {Y : Sort u_2} (f : XY) (x : X) :

          The diagonal map $\Delta: X \to X \times_Y X$.

          Equations
          Instances For
            def Function.pullbackDiagonal {X : Type u_1} {Y : Sort u_2} (f : XY) :

            The diagonal $\Delta(X) \subseteq X \times_Y X$.

            Equations
            Instances For
              def Function.mapPullback {X₁ : Type u_1} {X₂ : Type u_2} {Y₁ : Sort u_3} {Y₂ : Sort u_4} {Z₁ : Type u_5} {Z₂ : Type u_6} {f₁ : X₁Y₁} {g₁ : Z₁Y₁} {f₂ : X₂Y₂} {g₂ : Z₂Y₂} (mapX : X₁X₂) (mapY : Y₁Y₂) (mapZ : Z₁Z₂) (commX : f₂ mapX = mapY f₁) (commZ : g₂ mapZ = mapY g₁) (p : Function.Pullback f₁ g₁) :

              Three functions between the three pairs of spaces $X_i, Y_i, Z_i$ that are compatible induce a function $X_1 \times_{Y_1} Z_1 \to X_2 \times_{Y_2} Z_2$.

              Equations
              Instances For
                def Function.PullbackSelf.map_fst {X : Type u_1} {Y : Sort u_2} {Z : Type u_3} {f : XY} {g : ZY} :
                Function.PullbackSelf Function.Pullback.sndFunction.PullbackSelf f

                The projection $(X \times_Y Z) \times_Z (X \times_Y Z) \to X \times_Y X$.

                Equations
                • Function.PullbackSelf.map_fst = Function.mapPullback Function.Pullback.fst g Function.Pullback.fst
                Instances For
                  def Function.PullbackSelf.map_snd {X : Type u_1} {Y : Sort u_2} {Z : Type u_3} {f : XY} {g : ZY} :
                  Function.PullbackSelf Function.Pullback.fstFunction.PullbackSelf g

                  The projection $(X \times_Y Z) \times_X (X \times_Y Z) \to Z \times_Y Z$.

                  Equations
                  • Function.PullbackSelf.map_snd = Function.mapPullback Function.Pullback.snd f Function.Pullback.snd
                  Instances For
                    theorem preimage_map_fst_pullbackDiagonal {X : Type u_2} {Y : Sort u_3} {Z : Type u_1} {f : XY} {g : ZY} :
                    Function.PullbackSelf.map_fst ⁻¹' Function.pullbackDiagonal f = Function.pullbackDiagonal Function.Pullback.snd
                    theorem Function.Injective.preimage_pullbackDiagonal {X : Type u_2} {Y : Sort u_3} {Z : Type u_1} {f : XY} {g : ZX} (inj : Function.Injective g) :
                    theorem image_toPullbackDiag {X : Type u_1} {Y : Sort u_2} (f : XY) (s : Set X) :
                    theorem injective_toPullbackDiag {X : Type u_1} {Y : Sort u_2} (f : XY) :
                    theorem Set.offDiag_mono {α : Type u_1} :
                    Monotone Set.offDiag
                    @[simp]
                    @[simp]

                    Alias of the reverse direction of Set.offDiag_nonempty.

                    Alias of the reverse direction of Set.offDiag_nonempty.

                    theorem Set.offDiag_subset_prod {α : Type u_1} (s : Set α) :
                    theorem Set.offDiag_eq_sep_prod {α : Type u_1} (s : Set α) :
                    Set.offDiag s = {x : α × α | x s ×ˢ s x.1 x.2}
                    @[simp]
                    @[simp]
                    theorem Set.offDiag_singleton {α : Type u_1} (a : α) :
                    @[simp]
                    theorem Set.offDiag_univ {α : Type u_1} :
                    @[simp]
                    theorem Set.prod_sdiff_diagonal {α : Type u_1} (s : Set α) :
                    @[simp]
                    theorem Set.offDiag_inter {α : Type u_1} (s : Set α) (t : Set α) :
                    theorem Set.offDiag_union {α : Type u_1} {s : Set α} {t : Set α} (h : Disjoint s t) :
                    theorem Set.offDiag_insert {α : Type u_1} {s : Set α} {a : α} (ha : as) :

                    Cartesian set-indexed product of sets #

                    @[simp]
                    theorem Set.empty_pi {ι : Type u_1} {α : ιType u_2} (s : (i : ι) → Set (α i)) :
                    Set.pi s = Set.univ
                    theorem Set.subsingleton_univ_pi {ι : Type u_1} {α : ιType u_2} {t : (i : ι) → Set (α i)} (ht : ∀ (i : ι), Set.Subsingleton (t i)) :
                    @[simp]
                    theorem Set.pi_univ {ι : Type u_1} {α : ιType u_2} (s : Set ι) :
                    (Set.pi s fun (i : ι) => Set.univ) = Set.univ
                    @[simp]
                    theorem Set.pi_univ_ite {ι : Type u_1} {α : ιType u_2} (s : Set ι) [DecidablePred fun (x : ι) => x s] (t : (i : ι) → Set (α i)) :
                    (Set.pi Set.univ fun (i : ι) => if i s then t i else Set.univ) = Set.pi s t
                    theorem Set.pi_mono {ι : Type u_1} {α : ιType u_2} {s : Set ι} {t₁ : (i : ι) → Set (α i)} {t₂ : (i : ι) → Set (α i)} (h : is, t₁ i t₂ i) :
                    Set.pi s t₁ Set.pi s t₂
                    theorem Set.pi_inter_distrib {ι : Type u_1} {α : ιType u_2} {s : Set ι} {t : (i : ι) → Set (α i)} {t₁ : (i : ι) → Set (α i)} :
                    (Set.pi s fun (i : ι) => t i t₁ i) = Set.pi s t Set.pi s t₁
                    theorem Set.pi_congr {ι : Type u_1} {α : ιType u_2} {s₁ : Set ι} {s₂ : Set ι} {t₁ : (i : ι) → Set (α i)} {t₂ : (i : ι) → Set (α i)} (h : s₁ = s₂) (h' : is₁, t₁ i = t₂ i) :
                    Set.pi s₁ t₁ = Set.pi s₂ t₂
                    theorem Set.pi_eq_empty {ι : Type u_1} {α : ιType u_2} {s : Set ι} {t : (i : ι) → Set (α i)} {i : ι} (hs : i s) (ht : t i = ) :
                    theorem Set.univ_pi_eq_empty {ι : Type u_1} {α : ιType u_2} {t : (i : ι) → Set (α i)} {i : ι} (ht : t i = ) :
                    Set.pi Set.univ t =
                    theorem Set.pi_nonempty_iff {ι : Type u_1} {α : ιType u_2} {s : Set ι} {t : (i : ι) → Set (α i)} :
                    Set.Nonempty (Set.pi s t) ∀ (i : ι), ∃ (x : α i), i sx t i
                    theorem Set.univ_pi_nonempty_iff {ι : Type u_1} {α : ιType u_2} {t : (i : ι) → Set (α i)} :
                    Set.Nonempty (Set.pi Set.univ t) ∀ (i : ι), Set.Nonempty (t i)
                    theorem Set.pi_eq_empty_iff {ι : Type u_1} {α : ιType u_2} {s : Set ι} {t : (i : ι) → Set (α i)} :
                    Set.pi s t = ∃ (i : ι), IsEmpty (α i) i s t i =
                    @[simp]
                    theorem Set.univ_pi_eq_empty_iff {ι : Type u_1} {α : ιType u_2} {t : (i : ι) → Set (α i)} :
                    Set.pi Set.univ t = ∃ (i : ι), t i =
                    @[simp]
                    theorem Set.univ_pi_empty {ι : Type u_1} {α : ιType u_2} [h : Nonempty ι] :
                    (Set.pi Set.univ fun (x : ι) => ) =
                    @[simp]
                    theorem Set.disjoint_univ_pi {ι : Type u_1} {α : ιType u_2} {t₁ : (i : ι) → Set (α i)} {t₂ : (i : ι) → Set (α i)} :
                    Disjoint (Set.pi Set.univ t₁) (Set.pi Set.univ t₂) ∃ (i : ι), Disjoint (t₁ i) (t₂ i)
                    theorem Set.Disjoint.set_pi {ι : Type u_1} {α : ιType u_2} {s : Set ι} {t₁ : (i : ι) → Set (α i)} {t₂ : (i : ι) → Set (α i)} {i : ι} (hi : i s) (ht : Disjoint (t₁ i) (t₂ i)) :
                    Disjoint (Set.pi s t₁) (Set.pi s t₂)
                    theorem Set.uniqueElim_preimage {ι : Type u_1} {α : ιType u_2} [Unique ι] (t : (i : ι) → Set (α i)) :
                    uniqueElim ⁻¹' Set.pi Set.univ t = t default
                    theorem Set.pi_eq_empty_iff' {ι : Type u_1} {α : ιType u_2} {s : Set ι} {t : (i : ι) → Set (α i)} [∀ (i : ι), Nonempty (α i)] :
                    Set.pi s t = ∃ i ∈ s, t i =
                    @[simp]
                    theorem Set.disjoint_pi {ι : Type u_1} {α : ιType u_2} {s : Set ι} {t₁ : (i : ι) → Set (α i)} {t₂ : (i : ι) → Set (α i)} [∀ (i : ι), Nonempty (α i)] :
                    Disjoint (Set.pi s t₁) (Set.pi s t₂) ∃ i ∈ s, Disjoint (t₁ i) (t₂ i)
                    theorem Set.range_dcomp {ι : Type u_1} {α : ιType u_2} {β : ιType u_3} (f : (i : ι) → α iβ i) :
                    (Set.range fun (g : (i : ι) → α i) (i : ι) => f i (g i)) = Set.pi Set.univ fun (i : ι) => Set.range (f i)
                    @[simp]
                    theorem Set.insert_pi {ι : Type u_1} {α : ιType u_2} (i : ι) (s : Set ι) (t : (i : ι) → Set (α i)) :
                    @[simp]
                    theorem Set.singleton_pi {ι : Type u_1} {α : ιType u_2} (i : ι) (t : (i : ι) → Set (α i)) :
                    theorem Set.singleton_pi' {ι : Type u_1} {α : ιType u_2} (i : ι) (t : (i : ι) → Set (α i)) :
                    Set.pi {i} t = {x : (i : ι) → α i | x i t i}
                    theorem Set.univ_pi_singleton {ι : Type u_1} {α : ιType u_2} (f : (i : ι) → α i) :
                    (Set.pi Set.univ fun (i : ι) => {f i}) = {f}
                    theorem Set.preimage_pi {ι : Type u_1} {α : ιType u_2} {β : ιType u_3} (s : Set ι) (t : (i : ι) → Set (β i)) (f : (i : ι) → α iβ i) :
                    (fun (g : (i : ι) → α i) (i : ι) => f i (g i)) ⁻¹' Set.pi s t = Set.pi s fun (i : ι) => f i ⁻¹' t i
                    theorem Set.pi_if {ι : Type u_1} {α : ιType u_2} {p : ιProp} [h : DecidablePred p] (s : Set ι) (t₁ : (i : ι) → Set (α i)) (t₂ : (i : ι) → Set (α i)) :
                    (Set.pi s fun (i : ι) => if p i then t₁ i else t₂ i) = Set.pi {i : ι | i s p i} t₁ Set.pi {i : ι | i s ¬p i} t₂
                    theorem Set.union_pi {ι : Type u_1} {α : ιType u_2} {s₁ : Set ι} {s₂ : Set ι} {t : (i : ι) → Set (α i)} :
                    Set.pi (s₁ s₂) t = Set.pi s₁ t Set.pi s₂ t
                    theorem Set.union_pi_inter {ι : Type u_1} {α : ιType u_2} {s₁ : Set ι} {s₂ : Set ι} {t₁ : (i : ι) → Set (α i)} {t₂ : (i : ι) → Set (α i)} (ht₁ : is₁, t₁ i = Set.univ) (ht₂ : is₂, t₂ i = Set.univ) :
                    (Set.pi (s₁ s₂) fun (i : ι) => t₁ i t₂ i) = Set.pi s₁ t₁ Set.pi s₂ t₂
                    @[simp]
                    theorem Set.pi_inter_compl {ι : Type u_1} {α : ιType u_2} {t : (i : ι) → Set (α i)} (s : Set ι) :
                    Set.pi s t Set.pi s t = Set.pi Set.univ t
                    theorem Set.pi_update_of_not_mem {ι : Type u_1} {α : ιType u_2} {β : ιType u_3} {s : Set ι} {i : ι} [DecidableEq ι] (hi : is) (f : (j : ι) → α j) (a : α i) (t : (j : ι) → α jSet (β j)) :
                    (Set.pi s fun (j : ι) => t j (Function.update f i a j)) = Set.pi s fun (j : ι) => t j (f j)
                    theorem Set.pi_update_of_mem {ι : Type u_1} {α : ιType u_2} {β : ιType u_3} {s : Set ι} {i : ι} [DecidableEq ι] (hi : i s) (f : (j : ι) → α j) (a : α i) (t : (j : ι) → α jSet (β j)) :
                    (Set.pi s fun (j : ι) => t j (Function.update f i a j)) = {x : (i : ι) → β i | x i t i a} Set.pi (s \ {i}) fun (j : ι) => t j (f j)
                    theorem Set.univ_pi_update {ι : Type u_1} {α : ιType u_2} [DecidableEq ι] {β : ιType u_4} (i : ι) (f : (j : ι) → α j) (a : α i) (t : (j : ι) → α jSet (β j)) :
                    (Set.pi Set.univ fun (j : ι) => t j (Function.update f i a j)) = {x : (i : ι) → β i | x i t i a} Set.pi {i} fun (j : ι) => t j (f j)
                    theorem Set.univ_pi_update_univ {ι : Type u_1} {α : ιType u_2} [DecidableEq ι] (i : ι) (s : Set (α i)) :
                    Set.pi Set.univ (Function.update (fun (j : ι) => Set.univ) i s) = Function.eval i ⁻¹' s
                    theorem Set.eval_image_pi_subset {ι : Type u_1} {α : ιType u_2} {s : Set ι} {t : (i : ι) → Set (α i)} {i : ι} (hs : i s) :
                    theorem Set.eval_image_univ_pi_subset {ι : Type u_1} {α : ιType u_2} {t : (i : ι) → Set (α i)} {i : ι} :
                    Function.eval i '' Set.pi Set.univ t t i
                    theorem Set.subset_eval_image_pi {ι : Type u_1} {α : ιType u_2} {s : Set ι} {t : (i : ι) → Set (α i)} (ht : Set.Nonempty (Set.pi s t)) (i : ι) :
                    theorem Set.eval_image_pi {ι : Type u_1} {α : ιType u_2} {s : Set ι} {t : (i : ι) → Set (α i)} {i : ι} (hs : i s) (ht : Set.Nonempty (Set.pi s t)) :
                    @[simp]
                    theorem Set.eval_image_univ_pi {ι : Type u_1} {α : ιType u_2} {t : (i : ι) → Set (α i)} {i : ι} (ht : Set.Nonempty (Set.pi Set.univ t)) :
                    (fun (f : (i : ι) → α i) => f i) '' Set.pi Set.univ t = t i
                    theorem Set.pi_subset_pi_iff {ι : Type u_1} {α : ιType u_2} {s : Set ι} {t₁ : (i : ι) → Set (α i)} {t₂ : (i : ι) → Set (α i)} :
                    Set.pi s t₁ Set.pi s t₂ (is, t₁ i t₂ i) Set.pi s t₁ =
                    theorem Set.univ_pi_subset_univ_pi_iff {ι : Type u_1} {α : ιType u_2} {t₁ : (i : ι) → Set (α i)} {t₂ : (i : ι) → Set (α i)} :
                    Set.pi Set.univ t₁ Set.pi Set.univ t₂ (∀ (i : ι), t₁ i t₂ i) ∃ (i : ι), t₁ i =
                    theorem Set.eval_preimage {ι : Type u_1} {α : ιType u_2} {i : ι} [DecidableEq ι] {s : Set (α i)} :
                    Function.eval i ⁻¹' s = Set.pi Set.univ (Function.update (fun (i : ι) => Set.univ) i s)
                    theorem Set.eval_preimage' {ι : Type u_1} {α : ιType u_2} {i : ι} [DecidableEq ι] {s : Set (α i)} :
                    Function.eval i ⁻¹' s = Set.pi {i} (Function.update (fun (i : ι) => Set.univ) i s)
                    theorem Set.update_preimage_pi {ι : Type u_1} {α : ιType u_2} {s : Set ι} {t : (i : ι) → Set (α i)} {i : ι} [DecidableEq ι] {f : (i : ι) → α i} (hi : i s) (hf : js, j if j t j) :
                    theorem Set.update_preimage_univ_pi {ι : Type u_1} {α : ιType u_2} {t : (i : ι) → Set (α i)} {i : ι} [DecidableEq ι] {f : (i : ι) → α i} (hf : ∀ (j : ι), j if j t j) :
                    Function.update f i ⁻¹' Set.pi Set.univ t = t i
                    theorem Set.subset_pi_eval_image {ι : Type u_1} {α : ιType u_2} (s : Set ι) (u : Set ((i : ι) → α i)) :
                    u Set.pi s fun (i : ι) => Function.eval i '' u
                    theorem Set.univ_pi_ite {ι : Type u_1} {α : ιType u_2} (s : Set ι) [DecidablePred fun (x : ι) => x s] (t : (i : ι) → Set (α i)) :
                    (Set.pi Set.univ fun (i : ι) => if i s then t i else Set.univ) = Set.pi s t
                    theorem Equiv.piCongrLeft_symm_preimage_pi {ι : Type u_1} {ι' : Type u_2} {α : ιType u_3} (f : ι' ι) (s : Set ι') (t : (i : ι) → Set (α i)) :
                    ((Equiv.piCongrLeft α f).symm ⁻¹' Set.pi s fun (i' : ι') => t (f i')) = Set.pi (f '' s) t
                    theorem Equiv.piCongrLeft_symm_preimage_univ_pi {ι : Type u_1} {ι' : Type u_2} {α : ιType u_3} (f : ι' ι) (t : (i : ι) → Set (α i)) :
                    ((Equiv.piCongrLeft α f).symm ⁻¹' Set.pi Set.univ fun (i' : ι') => t (f i')) = Set.pi Set.univ t
                    theorem Equiv.piCongrLeft_preimage_pi {ι : Type u_1} {ι' : Type u_2} {α : ιType u_3} (f : ι' ι) (s : Set ι') (t : (i : ι) → Set (α i)) :
                    (Equiv.piCongrLeft α f) ⁻¹' Set.pi (f '' s) t = Set.pi s fun (i : ι') => t (f i)
                    theorem Equiv.piCongrLeft_preimage_univ_pi {ι : Type u_1} {ι' : Type u_2} {α : ιType u_3} (f : ι' ι) (t : (i : ι) → Set (α i)) :
                    (Equiv.piCongrLeft α f) ⁻¹' Set.pi Set.univ t = Set.pi Set.univ fun (i : ι') => t (f i)
                    theorem Equiv.sumPiEquivProdPi_symm_preimage_univ_pi {ι : Type u_1} {ι' : Type u_2} (π : ι ι'Type u_4) (t : (i : ι ι') → Set (π i)) :
                    (Equiv.sumPiEquivProdPi π).symm ⁻¹' Set.pi Set.univ t = (Set.pi Set.univ fun (i : ι) => t (Sum.inl i)) ×ˢ Set.pi Set.univ fun (i : ι') => t (Sum.inr i)