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 / V01. The language of Mathlib

Mathlib.Data.Sigma.Basic

45 declarations. Mathlib docs · Source

theorem Sigma.mk.hcongr_4 E1 #

∀ (α α' : Type u),
  α = α' →
    ∀ (β : α → Type v) (β' : α' → Type v),
      β ≍ β' →
        ∀ (fst : α) (fst' : α'), fst ≍ fst' → ∀ (snd : β fst) (snd' : β' fst'), snd ≍ snd' → ⟨fst, snd⟩ ≍ ⟨fst', snd'⟩

instance Sigma.instInhabitedSigma E0 #

{α : Type u_1} → {β : α → Type u_4} → [inst : Inhabited α] → [Inhabited (β default)] → Inhabited (Sigma β)

instance Sigma.instDecidableEqSigma E0 #

{α : Type u_1} → {β : α → Type u_4} → [h₁ : DecidableEq α] → [h₂ : (a : α) → DecidableEq (β a)] → DecidableEq (Sigma β)

theorem Sigma.mk.inj_iff E0 #

∀ {α : Type u_1} {β : α → Type u_4} {a₁ a₂ : α} {b₁ : β a₁} {b₂ : β a₂}, ⟨a₁, b₁⟩ = ⟨a₂, b₂⟩ ↔ a₁ = a₂ ∧ b₁ ≍ b₂

theorem Sigma.eta E0 #

∀ {α : Type u_1} {β : α → Type u_4} (x : (a : α) × β a), ⟨x.fst, x.snd⟩ = x

theorem Sigma.eq E1 #

∀ {α : Type u_7} {β : α → Type u_8} {p₁ p₂ : (a : α) × β a} (h₁ : p₁.fst = p₂.fst),
  Eq.recOn h₁ p₁.snd = p₂.snd → p₁ = p₂

theorem Sigma.subtype_ext E1 #

∀ {α : Type u_1} {β : Type u_7} {p : α → β → Prop} {x₀ x₁ : (a : α) × Subtype (p a)},
  x₀.fst = x₁.fst → ↑x₀.snd = ↑x₁.snd → x₀ = x₁

A specialized ext lemma for equality of sigma types over an indexed subtype.

theorem Sigma.subtype_ext_iff E0 #

∀ {α : Type u_1} {β : Type u_7} {p : α → β → Prop} {x₀ x₁ : (a : α) × Subtype (p a)},
  x₀ = x₁ ↔ x₀.fst = x₁.fst ∧ ↑x₀.snd = ↑x₁.snd

theorem Sigma.forall E1 #

∀ {α : Type u_1} {β : α → Type u_4} {p : (a : α) × β a → Prop},
  (∀ (x : (a : α) × β a), p x) ↔ ∀ (a : α) (b : β a), p ⟨a, b⟩

theorem Sigma.exists E0 #

∀ {α : Type u_1} {β : α → Type u_4} {p : (a : α) × β a → Prop}, (∃ x, p x) ↔ ∃ a b, p ⟨a, b⟩

theorem Sigma.exists' E1 #

∀ {α : Type u_1} {β : α → Type u_4} {p : (a : α) → β a → Prop}, (∃ a b, p a b) ↔ ∃ x, p x.fst x.snd

theorem Sigma.forall' E1 #

∀ {α : Type u_1} {β : α → Type u_4} {p : (a : α) → β a → Prop},
  (∀ (a : α) (b : β a), p a b) ↔ ∀ (x : (a : α) × β a), p x.fst x.snd

theorem sigma_mk_injective E2 #

∀ {α : Type u_1} {β : α → Type u_4} {i : α}, Function.Injective (Sigma.mk i)

theorem Sigma.fst_surjective E1 #

∀ {α : Type u_1} {β : α → Type u_4} [h : ∀ (a : α), Nonempty (β a)], Function.Surjective Sigma.fst

theorem Sigma.fst_surjective_iff E0 #

∀ {α : Type u_1} {β : α → Type u_4}, Function.Surjective Sigma.fst ↔ ∀ (a : α), Nonempty (β a)

theorem Sigma.fst_injective E1 #

∀ {α : Type u_1} {β : α → Type u_4} [h : ∀ (a : α), Subsingleton (β a)], Function.Injective Sigma.fst

theorem Sigma.fst_injective_iff E0 #

∀ {α : Type u_1} {β : α → Type u_4}, Function.Injective Sigma.fst ↔ ∀ (a : α), Subsingleton (β a)

def Sigma.map E1 #

{α₁ : Type u_2} →
  {α₂ : Type u_3} →
    {β₁ : α₁ → Type u_5} → {β₂ : α₂ → Type u_6} → (f₁ : α₁ → α₂) → ((a : α₁) → β₁ a → β₂ (f₁ a)) → Sigma β₁ → Sigma β₂

Map the left and right components of a sigma

theorem Sigma.map_mk E0 #

∀ {α₁ : Type u_2} {α₂ : Type u_3} {β₁ : α₁ → Type u_5} {β₂ : α₂ → Type u_6} (f₁ : α₁ → α₂)
  (f₂ : (a : α₁) → β₁ a → β₂ (f₁ a)) (x : α₁) (y : β₁ x), Sigma.map f₁ f₂ ⟨x, y⟩ = ⟨f₁ x, f₂ x y⟩

theorem Function.Injective.sigma_map E1 #

∀ {α₁ : Type u_2} {α₂ : Type u_3} {β₁ : α₁ → Type u_5} {β₂ : α₂ → Type u_6} {f₁ : α₁ → α₂}
  {f₂ : (a : α₁) → β₁ a → β₂ (f₁ a)},
  Function.Injective f₁ → (∀ (a : α₁), Function.Injective (f₂ a)) → Function.Injective (Sigma.map f₁ f₂)

theorem Function.Injective.of_sigma_map E1 #

∀ {α₁ : Type u_2} {α₂ : Type u_3} {β₁ : α₁ → Type u_5} {β₂ : α₂ → Type u_6} {f₁ : α₁ → α₂}
  {f₂ : (a : α₁) → β₁ a → β₂ (f₁ a)}, Function.Injective (Sigma.map f₁ f₂) → ∀ (a : α₁), Function.Injective (f₂ a)

theorem Function.Injective.sigma_map_iff E0 #

∀ {α₁ : Type u_2} {α₂ : Type u_3} {β₁ : α₁ → Type u_5} {β₂ : α₂ → Type u_6} {f₁ : α₁ → α₂}
  {f₂ : (a : α₁) → β₁ a → β₂ (f₁ a)},
  Function.Injective f₁ → (Function.Injective (Sigma.map f₁ f₂) ↔ ∀ (a : α₁), Function.Injective (f₂ a))

theorem Function.Surjective.sigma_map E1 #

∀ {α₁ : Type u_2} {α₂ : Type u_3} {β₁ : α₁ → Type u_5} {β₂ : α₂ → Type u_6} {f₁ : α₁ → α₂}
  {f₂ : (a : α₁) → β₁ a → β₂ (f₁ a)},
  Function.Surjective f₁ → (∀ (a : α₁), Function.Surjective (f₂ a)) → Function.Surjective (Sigma.map f₁ f₂)

def Sigma.curry E1 #

{α : Type u_1} →
  {β : α → Type u_4} → {γ : (a : α) → β a → Type u_7} → ((x : Sigma β) → γ x.fst x.snd) → (x : α) → (y : β x) → γ x y

Interpret a function on Σ x : α, β x as a dependent function with two arguments.

This also exists as an Equiv as Equiv.piCurry γ.

def Sigma.uncurry E1 #

{α : Type u_1} →
  {β : α → Type u_4} → {γ : (a : α) → β a → Type u_7} → ((x : α) → (y : β x) → γ x y) → (x : Sigma β) → γ x.fst x.snd

Interpret a dependent function with two arguments as a function on Σ x : α, β x.

This also exists as an Equiv as (Equiv.piCurry γ).symm.

theorem Sigma.uncurry_curry E0 #

∀ {α : Type u_1} {β : α → Type u_4} {γ : (a : α) → β a → Type u_7} (f : (x : Sigma β) → γ x.fst x.snd),
  Sigma.uncurry (Sigma.curry f) = f

theorem Sigma.curry_uncurry E0 #

∀ {α : Type u_1} {β : α → Type u_4} {γ : (a : α) → β a → Type u_7} (f : (x : α) → (y : β x) → γ x y),
  Sigma.curry (Sigma.uncurry f) = f

theorem Sigma.curry_update E1 #

∀ {α : Type u_1} {β : α → Type u_4} {γ : (a : α) → β a → Type u_7} [inst : DecidableEq α]
  [inst_1 : (a : α) → DecidableEq (β a)] (i : (a : α) × β a) (f : (i : (a : α) × β a) → γ i.fst i.snd)
  (x : γ i.fst i.snd),
  Sigma.curry (Function.update f i x) =
    Function.update (Sigma.curry f) i.fst (Function.update (Sigma.curry f i.fst) i.snd x)

def Prod.toSigma E1 #

{α : Type u_7} → {β : Type u_8} → α × β → (_ : α) × β

Convert a product type to a Σ-type.

theorem Prod.fst_comp_toSigma E0 #

∀ {α : Type u_7} {β : Type u_8}, Sigma.fst ∘ Prod.toSigma = Prod.fst

theorem Prod.fst_toSigma E0 #

∀ {α : Type u_7} {β : Type u_8} (x : α × β), x.toSigma.fst = x.1

theorem Prod.snd_toSigma E0 #

∀ {α : Type u_7} {β : Type u_8} (x : α × β), x.toSigma.snd = x.2

theorem Prod.toSigma_mk E0 #

∀ {α : Type u_7} {β : Type u_8} (x : α) (y : β), (x, y).toSigma = ⟨x, y⟩

theorem Prod.toSigma_injective E1 #

∀ {α : Type u_7} {β : Type u_8}, Function.Injective Prod.toSigma

theorem Prod.toSigma_inj E0 #

∀ {α : Type u_7} {β : Type u_8} {x y : α × β}, x.toSigma = y.toSigma ↔ x = y

def PSigma.elim E1 #

{α : Sort u_1} → {β : α → Sort u_2} → {γ : Sort u_3} → ((a : α) → β a → γ) → PSigma β → γ

Nondependent eliminator for PSigma.

theorem PSigma.elim_val E0 #

∀ {α : Sort u_1} {β : α → Sort u_2} {γ : Sort u_3} (f : (a : α) → β a → γ) (a : α) (b : β a),
  PSigma.elim f ⟨a, b⟩ = f a b

instance PSigma.instInhabitedOfDefault_mathlib E0 #

{α : Sort u_1} → {β : α → Sort u_2} → [inst : Inhabited α] → [Inhabited (β default)] → Inhabited (PSigma β)

instance PSigma.decidableEq E0 #

{α : Sort u_1} → {β : α → Sort u_2} → [h₁ : DecidableEq α] → [h₂ : (a : α) → DecidableEq (β a)] → DecidableEq (PSigma β)

theorem PSigma.mk.inj_iff E0 #

∀ {α : Sort u_1} {β : α → Sort u_2} {a₁ a₂ : α} {b₁ : β a₁} {b₂ : β a₂}, ⟨a₁, b₁⟩ = ⟨a₂, b₂⟩ ↔ a₁ = a₂ ∧ b₁ ≍ b₂

theorem PSigma.forall E1 #

∀ {α : Sort u_1} {β : α → Sort u_2} {p : (a : α) ×' β a → Prop},
  (∀ (x : (a : α) ×' β a), p x) ↔ ∀ (a : α) (b : β a), p ⟨a, b⟩

theorem PSigma.exists E0 #

∀ {α : Sort u_1} {β : α → Sort u_2} {p : (a : α) ×' β a → Prop}, (∃ x, p x) ↔ ∃ a b, p ⟨a, b⟩

theorem PSigma.subtype_ext E1 #

∀ {α : Sort u_1} {β : Sort u_3} {p : α → β → Prop} {x₀ x₁ : (a : α) ×' Subtype (p a)},
  x₀.fst = x₁.fst → ↑x₀.snd = ↑x₁.snd → x₀ = x₁

A specialized ext lemma for equality of PSigma types over an indexed subtype.

theorem PSigma.subtype_ext_iff E0 #

∀ {α : Sort u_1} {β : Sort u_3} {p : α → β → Prop} {x₀ x₁ : (a : α) ×' Subtype (p a)},
  x₀ = x₁ ↔ x₀.fst = x₁.fst ∧ ↑x₀.snd = ↑x₁.snd

def PSigma.map E1 #

{α₁ : Sort u_3} →
  {α₂ : Sort u_4} →
    {β₁ : α₁ → Sort u_5} → {β₂ : α₂ → Sort u_6} → (f₁ : α₁ → α₂) → ((a : α₁) → β₁ a → β₂ (f₁ a)) → PSigma β₁ → PSigma β₂

Map the left and right components of a sigma