The areas / V01. The language of Mathlib
Mathlib.Data.Subtype
49 declarations. Mathlib docs · Source
theorem Subtype.mk.hinj E1 #
∀ {α : Sort u} {p : α → Prop} {val : α} {property : p val} {α_1 : Sort u} {p_1 : α_1 → Prop} {val_1 : α_1}
{property_1 : p_1 val_1}, α = α_1 → p ≍ p_1 → ⟨val, property⟩ ≍ ⟨val_1, property_1⟩ → α = α_1 ∧ p ≍ p_1 ∧ val ≍ val_1
theorem Subtype.val.hcongr_3 E1 #
∀ (α α' : Sort u),
α = α' →
∀ (p : α → Prop) (p' : α' → Prop), p ≍ p' → ∀ (self : Subtype p) (self' : Subtype p'), self ≍ self' → ↑self ≍ ↑self'
theorem Subtype.prop E2 #
∀ {α : Sort u_1} {p : α → Prop} (x : Subtype p), p ↑x
A version of x.property or x.2 where p is syntactically applied to the coercion of x
instead of x.1. A similar result is Subtype.mem in Mathlib/Data/Set/Basic.lean.
theorem Subtype.forall' E1 #
∀ {α : Sort u_1} {p : α → Prop} {q : (x : α) → p x → Prop}, (∀ (x : α) (h : p x), q x h) ↔ ∀ (x : { a // p a }), q ↑x ⋯
An alternative version of Subtype.forall. This one is useful if Lean cannot figure out q
when using Subtype.forall from right to left.
theorem Subtype.exists' E1 #
∀ {α : Sort u_1} {p : α → Prop} {q : (x : α) → p x → Prop}, (∃ x, ∃ (h : p x), q x h) ↔ ∃ x, q ↑x ⋯
An alternative version of Subtype.exists. This one is useful if Lean cannot figure out q
when using Subtype.exists from right to left.
theorem Subtype.heq_iff_coe_eq E0 #
∀ {α : Sort u_1} {p q : α → Prop},
(∀ (x : α), p x ↔ q x) → ∀ {a1 : { x // p x }} {a2 : { x // q x }}, a1 ≍ a2 ↔ ↑a1 = ↑a2
theorem Subtype.heq_iff_coe_heq E1 #
∀ {α β : Sort u_4} {p : α → Prop} {q : β → Prop} {a : { x // p x }} {b : { y // q y }},
α = β → p ≍ q → (a ≍ b ↔ ↑a ≍ ↑b)
theorem Subtype.coe_eta E0 #
∀ {α : Sort u_1} {p : α → Prop} (a : { a // p a }) (h : p ↑a), ⟨↑a, h⟩ = a
theorem Subtype.coe_mk E0 #
∀ {α : Sort u_1} {p : α → Prop} (a : α) (h : p a), ↑⟨a, h⟩ = a
theorem Subtype.mk_eq_mk E0 #
∀ {α : Sort u_1} {p : α → Prop} {a : α} {h : p a} {a' : α} {h' : p a'}, ⟨a, h⟩ = ⟨a', h'⟩ ↔ a = a'
Restatement of Subtype.mk.injEq as an iff.
theorem Subtype.coe_eq_of_eq_mk E0 #
∀ {α : Sort u_1} {p : α → Prop} {a : { a // p a }} {b : α} (h : ↑a = b), a = ⟨b, ⋯⟩
theorem Subtype.coe_eq_iff E0 #
∀ {α : Sort u_1} {p : α → Prop} {a : { a // p a }} {b : α}, ↑a = b ↔ ∃ (h : p b), a = ⟨b, h⟩
theorem Subtype.coe_injective E0 #
∀ {α : Sort u_1} {p : α → Prop}, Function.Injective fun a ↦ ↑a
theorem Subtype.val_injective E0 #
∀ {α : Sort u_1} {p : α → Prop}, Function.Injective Subtype.val
theorem Subtype.coe_inj E0 #
∀ {α : Sort u_1} {p : α → Prop} {a b : Subtype p}, ↑a = ↑b ↔ a = b
theorem Subtype.val_inj E0 #
∀ {α : Sort u_1} {p : α → Prop} {a b : Subtype p}, ↑a = ↑b ↔ a = b
theorem Subtype.coe_ne_coe E0 #
∀ {α : Sort u_1} {p : α → Prop} {a b : Subtype p}, ↑a ≠ ↑b ↔ a ≠ b
theorem exists_eq_subtype_mk_iff E0 #
∀ {α : Sort u_1} {p : α → Prop} {a : Subtype p} {b : α}, (∃ (h : p b), a = ⟨b, h⟩) ↔ ↑a = b
theorem exists_subtype_mk_eq_iff E0 #
∀ {α : Sort u_1} {p : α → Prop} {a : Subtype p} {b : α}, (∃ (h : p b), ⟨b, h⟩ = a) ↔ b = ↑a
theorem Function.extend_val_apply E0 #
∀ {β : Sort u_2} {γ : Sort u_3} {p : β → Prop} {g : { x // p x } → γ} {j : β → γ} {b : β} (hb : p b),
Function.extend Subtype.val g j b = g ⟨b, hb⟩
theorem Function.extend_val_apply' E1 #
∀ {β : Sort u_2} {γ : Sort u_3} {p : β → Prop} {g : { x // p x } → γ} {j : β → γ} {b : β},
¬p b → Function.extend Subtype.val g j b = j b
def Subtype.restrict E1 #
{α : Sort u_5} → {β : α → Type u_4} → (p : α → Prop) → ((x : α) → β x) → (x : Subtype p) → β ↑x
Restrict a (dependent) function to a subtype
theorem Subtype.restrict_apply E0 #
∀ {α : Sort u_5} {β : α → Type u_4} (f : (x : α) → β x) (p : α → Prop) (x : Subtype p), Subtype.restrict p f x = f ↑x
theorem Subtype.restrict_def E0 #
∀ {α : Sort u_4} {β : Type u_5} (f : α → β) (p : α → Prop), Subtype.restrict p f = f ∘ fun a ↦ ↑a
theorem Subtype.restrict_injective E1 #
∀ {α : Sort u_4} {β : Type u_5} {f : α → β} (p : α → Prop),
Function.Injective f → Function.Injective (Subtype.restrict p f)
theorem Subtype.surjective_restrict E1 #
∀ {α : Sort u_5} {β : α → Type u_4} [ne : ∀ (a : α), Nonempty (β a)] (p : α → Prop),
Function.Surjective fun f ↦ Subtype.restrict p f
def Subtype.coind E1 #
{α : Sort u_4} → {β : Sort u_5} → (f : α → β) → {p : β → Prop} → (∀ (a : α), p (f a)) → α → Subtype p
Defining a map into a subtype, this can be seen as a "coinduction principle" of Subtype
theorem Subtype.coind_coe E0 #
∀ {α : Sort u_4} {β : Sort u_5} (f : α → β) {p : β → Prop} (h : ∀ (a : α), p (f a)) (a : α),
↑(Subtype.coind f h a) = f a
theorem Subtype.coind_injective E1 #
∀ {α : Sort u_4} {β : Sort u_5} {f : α → β} {p : β → Prop} (h : ∀ (a : α), p (f a)),
Function.Injective f → Function.Injective (Subtype.coind f h)
theorem Subtype.coind_injective_iff E0 #
∀ {α : Sort u_4} {β : Sort u_5} {f : α → β} {p : β → Prop} (h : ∀ (a : α), p (f a)),
Function.Injective (Subtype.coind f h) ↔ Function.Injective f
def Subtype.map E1 #
{α : Sort u_1} →
{β : Sort u_2} → {p : α → Prop} → {q : β → Prop} → (f : α → β) → (∀ (a : α), p a → q (f a)) → Subtype p → Subtype q
Restriction of a function to a function on subtypes.
theorem Subtype.map_coe E0 #
∀ {α : Sort u_1} {β : Sort u_2} {p : α → Prop} {q : β → Prop} (f : α → β) (h : ∀ (a : α), p a → q (f a))
(a : Subtype p), ↑(Subtype.map f h a) = f ↑a
theorem Subtype.map_def E0 #
∀ {α : Sort u_1} {β : Sort u_2} {p : α → Prop} {q : β → Prop} (f : α → β) (h : ∀ (a : α), p a → q (f a)),
Subtype.map f h = fun x ↦ ⟨f ↑x, ⋯⟩
theorem Subtype.map_comp E0 #
∀ {α : Sort u_1} {β : Sort u_2} {γ : Sort u_3} {p : α → Prop} {q : β → Prop} {r : γ → Prop} {x : Subtype p} (f : α → β)
(h : ∀ (a : α), p a → q (f a)) (g : β → γ) (l : ∀ (a : β), q a → r (g a)),
Subtype.map g l (Subtype.map f h x) = Subtype.map (g ∘ f) ⋯ x
theorem Subtype.map_id E0 #
∀ {α : Sort u_1} {p : α → Prop} {h : ∀ (a : α), p a → p (id a)}, Subtype.map id h = id
theorem Subtype.val_comp_map E0 #
∀ {α : Sort u_1} {β : Sort u_2} {p : α → Prop} {q : β → Prop} {f : α → β} (h : ∀ (a : α), p a → q (f a)),
Subtype.val ∘ Subtype.map f h = f ∘ Subtype.val
theorem Subtype.map_injective E0 #
∀ {α : Sort u_1} {β : Sort u_2} {p : α → Prop} {q : β → Prop} {f : α → β} (h : ∀ (a : α), p a → q (f a)),
Function.Injective f → Function.Injective (Subtype.map f h)
theorem Subtype.map_involutive E0 #
∀ {α : Sort u_1} {p : α → Prop} {f : α → α} (h : ∀ (a : α), p a → p (f a)),
Function.Involutive f → Function.Involutive (Subtype.map f h)
theorem Subtype.map_eq E0 #
∀ {α : Sort u_1} {β : Sort u_2} {p : α → Prop} {q : β → Prop} {f g : α → β} (h₁ : ∀ (a : α), p a → q (f a))
(h₂ : ∀ (a : α), p a → q (g a)) {x y : Subtype p}, Subtype.map f h₁ x = Subtype.map g h₂ y ↔ f ↑x = g ↑y
theorem Subtype.map_ne E0 #
∀ {α : Sort u_1} {β : Sort u_2} {p : α → Prop} {q : β → Prop} {f g : α → β} (h₁ : ∀ (a : α), p a → q (f a))
(h₂ : ∀ (a : α), p a → q (g a)) {x y : Subtype p}, Subtype.map f h₁ x ≠ Subtype.map g h₂ y ↔ f ↑x ≠ g ↑y
instance Subtype.instHasEquiv_mathlib E0 #
{α : Sort u_1} → [HasEquiv α] → (p : α → Prop) → HasEquiv (Subtype p)
theorem Subtype.equiv_iff E0 #
∀ {α : Sort u_1} [inst : HasEquiv α] {p : α → Prop} {s t : Subtype p}, s ≈ t ↔ ↑s ≈ ↑t
theorem Subtype.refl E1 #
∀ {α : Sort u_1} {p : α → Prop} [inst : Setoid α] (s : Subtype p), s ≈ s
theorem Subtype.symm E1 #
∀ {α : Sort u_1} {p : α → Prop} [inst : Setoid α] {s t : Subtype p}, s ≈ t → t ≈ s
theorem Subtype.trans E1 #
∀ {α : Sort u_1} {p : α → Prop} [inst : Setoid α] {s t u : Subtype p}, s ≈ t → t ≈ u → s ≈ u
theorem Subtype.equivalence E1 #
∀ {α : Sort u_1} [inst : Setoid α] (p : α → Prop), Equivalence HasEquiv.Equiv
instance Subtype.instSetoid_mathlib E0 #
{α : Sort u_1} → [Setoid α] → (p : α → Prop) → Setoid (Subtype p)
theorem Subtype.coe_prop E0 #
∀ {α : Type u_1} {S : Set α} (a : { a // a ∈ S }), ↑a ∈ S
theorem Subtype.val_prop E0 #
∀ {α : Type u_1} {S : Set α} (a : { a // a ∈ S }), ↑a ∈ S