mathlib documentation

logic.unique

theorem unique.ext_iff {α : Sort u} (x y : unique α) :

theorem unique.ext {α : Sort u} (x y : unique α) (h : x.to_inhabited = y.to_inhabited) :
x = y

@[instance]

Equations
@[instance]
def fin.unique  :

Equations
@[instance]
def unique.inhabited {α : Sort u} [unique α] :

Equations
theorem unique.eq_default {α : Sort u} [unique α] (a : α) :
a = default α

theorem unique.default_eq {α : Sort u} [unique α] (a : α) :
default α = a

@[instance]
def unique.subsingleton {α : Sort u} [unique α] :

theorem unique.forall_iff {α : Sort u} [unique α] {p : α → Prop} :
(∀ (a : α), p a) p (default α)

theorem unique.exists_iff {α : Sort u} [unique α] {p : α → Prop} :
Exists p p (default α)

theorem unique.subsingleton_unique' {α : Sort u} (h₁ h₂ : unique α) :
h₁ = h₂

@[instance]
def unique.subsingleton_unique {α : Sort u} :

def function.surjective.unique {α : Sort u} {β : Sort v} {f : α → β} (hf : function.surjective f) [unique α] :

If the domain of a surjective function is a singleton, then the codomain is a singleton as well.

Equations
theorem function.injective.comap_subsingleton {α : Sort u} {β : Sort v} {f : α → β} (hf : function.injective f) [subsingleton β] :

If the codomain of an injective function is a subsingleton, then the domain is a subsingleton as well.

theorem nonempty_unique_or_exists_ne {α : Sort u} (x : α) :
nonempty (unique α) ∃ (y : α), y x

theorem subsingleton_or_exists_ne {α : Sort u} (x : α) :
subsingleton α ∃ (y : α), y x