Sets in product and pi types #
This file proves basic properties of product of sets in α × β
and in Π i, α i
, and of the
diagonal of a type.
Main declarations #
This file contains basic results on the following notions, which are defined in Set.Operations
.
Set.prod
: Binary product of sets. Fors : Set α
,t : Set β
, we haves.prod t : Set (α × β)
. Denoted bys ×ˢ t
.Set.diagonal
: Diagonal of a type.Set.diagonal α = {(x, x) | x : α}
.Set.offDiag
: Off-diagonal.s ×ˢ s
without the diagonal.Set.pi
: Arbitrary product of sets.
Cartesian binary product of sets #
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
- Set.decidableMemProd x = inferInstanceAs (Decidable (x.1 ∈ s ∧ x.2 ∈ t))
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)
.
Equations
- Set.decidableMemDiagonal x = h x.1 x.2
theorem
Set.range_const_eq_diagonal
{α : Type u_1}
{β : Type u_2}
[hβ : Nonempty β]
:
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
.
@[reducible, inline]
abbrev
Function.Pullback
{X : Type u_1}
{Y : Sort u_2}
{Z : Type u_3}
(f : X → Y)
(g : Z → Y)
:
Type (max 0 u_3 u_1)
The fiber product
Equations
- Function.Pullback f g = { p : X × Z // f p.1 = g p.2 }
Instances For
@[reducible, inline]
The fiber product
Equations
Instances For
theorem
Function.pullback_comm_sq
{X : Type u_2}
{Y : Sort u_3}
{Z : Type u_1}
(f : X → Y)
(g : Z → Y)
:
f ∘ Pullback.fst = g ∘ Pullback.snd
The diagonal
Equations
- Function.pullbackDiagonal f = {p : Function.Pullback f f | p.fst = p.snd}
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 : Pullback f₁ g₁)
:
Pullback f₂ g₂
Three functions between the three pairs of spaces
Equations
- Function.mapPullback mapX mapY mapZ commX commZ p = ⟨(mapX p.fst, mapZ p.snd), ⋯⟩
Instances For
def
Function.PullbackSelf.map_fst
{X : Type u_1}
{Y : Sort u_2}
{Z : Type u_3}
{f : X → Y}
{g : Z → Y}
:
The projection
Equations
Instances For
def
Function.PullbackSelf.map_snd
{X : Type u_1}
{Y : Sort u_2}
{Z : Type u_3}
{f : X → Y}
{g : Z → Y}
:
The projection
Equations
Instances For
theorem
preimage_map_fst_pullbackDiagonal
{X : Type u_2}
{Y : Sort u_3}
{Z : Type u_1}
{f : X → Y}
{g : Z → Y}
:
theorem
Function.Injective.preimage_pullbackDiagonal
{X : Type u_2}
{Y : Sort u_3}
{Z : Type u_1}
{f : X → Y}
{g : Z → X}
(inj : Injective g)
:
mapPullback g id g ⋯ ⋯ ⁻¹' pullbackDiagonal f = pullbackDiagonal (f ∘ g)
theorem
image_toPullbackDiag
{X : Type u_1}
{Y : Sort u_2}
(f : X → Y)
(s : Set X)
:
toPullbackDiag f '' s = Function.pullbackDiagonal f ∩ Subtype.val ⁻¹' s ×ˢ s
@[simp]
theorem
Set.Nontrivial.offDiag_nonempty
{α : Type u_1}
{s : Set α}
:
s.Nontrivial → s.offDiag.Nonempty
Alias of the reverse direction of Set.offDiag_nonempty
.
theorem
Set.Subsingleton.offDiag_eq_empty
{α : Type u_1}
{s : Set α}
:
s.Nontrivial → s.offDiag.Nonempty
Alias of the reverse direction of Set.offDiag_nonempty
.
Cartesian set-indexed product of sets #
@[simp]
theorem
Set.singleton_pi
{ι : Type u_1}
{α : ι → Type u_2}
(i : ι)
(t : (i : ι) → Set (α i))
:
{i}.pi t = Function.eval i ⁻¹' t i
theorem
Set.pi_update_of_not_mem
{ι : Type u_1}
{α : ι → Type u_2}
{β : ι → Type u_3}
{s : Set ι}
{i : ι}
[DecidableEq ι]
(hi : i ∉ s)
(f : (j : ι) → α j)
(a : α i)
(t : (j : ι) → α j → Set (β j))
:
(s.pi fun (j : ι) => t j (Function.update f i a j)) = s.pi 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 : ι) → α j → Set (β j))
:
(s.pi fun (j : ι) => t j (Function.update f i a j)) = {x : (i : ι) → β i | x i ∈ t i a} ∩ (s \ {i}).pi 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 : ι) → α j → Set (β j))
:
theorem
Set.univ_pi_update_univ
{ι : Type u_1}
{α : ι → Type u_2}
[DecidableEq ι]
(i : ι)
(s : Set (α i))
:
univ.pi (Function.update (fun (j : ι) => 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)
:
Function.eval i '' s.pi t ⊆ t i
theorem
Set.eval_image_univ_pi_subset
{ι : Type u_1}
{α : ι → Type u_2}
{t : (i : ι) → Set (α i)}
{i : ι}
:
Function.eval i '' univ.pi t ⊆ t i
theorem
Set.subset_eval_image_pi
{ι : Type u_1}
{α : ι → Type u_2}
{s : Set ι}
{t : (i : ι) → Set (α i)}
(ht : (s.pi t).Nonempty)
(i : ι)
:
t i ⊆ Function.eval i '' s.pi t
theorem
Set.eval_image_pi
{ι : Type u_1}
{α : ι → Type u_2}
{s : Set ι}
{t : (i : ι) → Set (α i)}
{i : ι}
(hs : i ∈ s)
(ht : (s.pi t).Nonempty)
:
Function.eval i '' s.pi t = t i
@[deprecated Set.piMap_image_pi (since := "2024-10-06")]
theorem
Set.dcomp_image_pi
{ι : Type u_1}
{α : ι → Type u_2}
{β : ι → Type u_3}
{s : Set ι}
{f : (i : ι) → α i → β i}
(hf : ∀ i ∉ s, Function.Surjective (f i))
(t : (i : ι) → Set (α i))
:
Alias of Set.piMap_image_pi
.
theorem
Set.eval_preimage
{ι : Type u_1}
{α : ι → Type u_2}
{i : ι}
[DecidableEq ι]
{s : Set (α i)}
:
Function.eval i ⁻¹' s = univ.pi (Function.update (fun (x : ι) => univ) i s)
theorem
Set.eval_preimage'
{ι : Type u_1}
{α : ι → Type u_2}
{i : ι}
[DecidableEq ι]
{s : Set (α i)}
:
Function.eval i ⁻¹' s = {i}.pi (Function.update (fun (x : ι) => 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 : ∀ j ∈ s, j ≠ i → f j ∈ t j)
:
Function.update f i ⁻¹' s.pi t = t i
theorem
Set.update_image
{ι : Type u_1}
{β : ι → Type u_3}
[DecidableEq ι]
(x : (i : ι) → β i)
(i : ι)
(s : Set (β i))
:
Function.update x i '' s = univ.pi (Function.update (fun (j : ι) => {x j}) i s)
theorem
Set.update_preimage_univ_pi
{ι : Type u_1}
{α : ι → Type u_2}
{t : (i : ι) → Set (α i)}
{i : ι}
[DecidableEq ι]
{f : (i : ι) → α i}
(hf : ∀ (j : ι), j ≠ i → f j ∈ t j)
:
Function.update f i ⁻¹' univ.pi t = t i
theorem
Set.subset_pi_eval_image
{ι : Type u_1}
{α : ι → Type u_2}
(s : Set ι)
(u : Set ((i : ι) → α i))
:
u ⊆ s.pi fun (i : ι) => Function.eval i '' u