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.Quot

127 declarations and 7 deprecated aliases. Mathlib docs · Source

Quotient types

This module extends the core library's treatment of quotient types (Init.Core).

Tags

quotient

Truncation

Quotient with implicit Setoid

Versions of quotient definitions and lemmas ending in ' use unification instead of typeclass inference for inferring the Setoid argument. This is useful when there are several different quotient relations on a type, for example quotient groups, rings and modules.

theorem Quot.hrecOn.congr_simp E1 #

∀ {α : Sort u} {r : α → α → Prop} {motive : Quot r → Sort v} (q : Quot r) (f f_1 : (a : α) → motive (Quot.mk r a))
  (e_f : f = f_1) (c : ∀ (a b : α), r a b → f a ≍ f b), Quot.hrecOn q f c = Quot.hrecOn q f_1 ⋯

instance Setoid.instCoeFunForallForallProp_mathlib E0 #

{α : Sort u_1} → CoeFun (Setoid α) fun x ↦ α → α → Prop

When writing a lemma about someSetoid x y (which uses this instance), call it someSetoid_apply not someSetoid_r.

theorem Setoid.ext E1 #

∀ {α : Sort u_3} {s t : Setoid α}, (∀ (a b : α), s a b ↔ t a b) → s = t

theorem Quot.induction_on E1 #

∀ {α : Sort u_4} {r : α → α → Prop} {β : Quot r → Prop} (q : Quot r), (∀ (a : α), β (Quot.mk r a)) → β q

instance Quot.instInhabited_mathlib E0 #

{α : Sort u_1} → (r : α → α → Prop) → [Inhabited α] → Inhabited (Quot r)

instance Quot.Subsingleton E0 #

∀ {α : Sort u_1} {ra : α → α → Prop} [Subsingleton α], Subsingleton (Quot ra)

instance Quot.instUnique E0 #

{α : Sort u_1} → {ra : α → α → Prop} → [Unique α] → Unique (Quot ra)

def Quot.hrecOn₂ E1 #

{α : Sort u_1} →
  {β : Sort u_2} →
    {ra : α → α → Prop} →
      {rb : β → β → Prop} →
        {φ : Quot ra → Quot rb → Sort u_3} →
          (qa : Quot ra) →
            (qb : Quot rb) →
              (f : (a : α) → (b : β) → φ (Quot.mk ra a) (Quot.mk rb b)) →
                (∀ {b : β} {a₁ a₂ : α}, ra a₁ a₂ → f a₁ b ≍ f a₂ b) →
                  (∀ {a : α} {b₁ b₂ : β}, rb b₁ b₂ → f a b₁ ≍ f a b₂) → φ qa qb

Recursion on two Quotient arguments a and b, result type depends on ⟦a⟧ and ⟦b⟧.

def Quot.map E1 #

{α : Sort u_1} →
  {β : Sort u_2} →
    {ra : α → α → Prop} → {rb : β → β → Prop} → (f : α → β) → (∀ ⦃a b : α⦄, ra a b → rb (f a) (f b)) → Quot ra → Quot rb

Map a function f : α → β such that ra x y implies rb (f x) (f y) to a map Quot ra → Quot rb.

def Quot.mapRight E1 #

{α : Sort u_1} → {ra ra' : α → α → Prop} → (∀ (a₁ a₂ : α), ra a₁ a₂ → ra' a₁ a₂) → Quot ra → Quot ra'

If ra is a subrelation of ra', then we have a natural map Quot ra → Quot ra'.

def Quot.factor E1 #

{α : Type u_4} → (r s : α → α → Prop) → (∀ (x y : α), r x y → s x y) → Quot r → Quot s

Weaken the relation of a quotient. This is the same as Quot.map id.

theorem Quot.factor_mk_eq E0 #

∀ {α : Type u_4} (r s : α → α → Prop) (h : ∀ (x y : α), r x y → s x y), Quot.factor r s h ∘ Quot.mk r = Quot.mk s

theorem Quot.lift_mk E0 #

∀ {α : Sort u_1} {γ : Sort u_4} {r : α → α → Prop} (f : α → γ) (h : ∀ (a₁ a₂ : α), r a₁ a₂ → f a₁ = f a₂) (a : α),
  Quot.lift f h (Quot.mk r a) = f a

theorem Quot.liftOn_mk E0 #

∀ {α : Sort u_1} {γ : Sort u_4} {r : α → α → Prop} (a : α) (f : α → γ) (h : ∀ (a₁ a₂ : α), r a₁ a₂ → f a₁ = f a₂),
  (Quot.mk r a).liftOn f h = f a

theorem Quot.surjective_lift E0 #

∀ {α : Sort u_1} {γ : Sort u_4} {r : α → α → Prop} {f : α → γ} (h : ∀ (a₁ a₂ : α), r a₁ a₂ → f a₁ = f a₂),
  Function.Surjective (Quot.lift f h) ↔ Function.Surjective f

def Quot.lift₂ E1 #

{α : Sort u_1} →
  {β : Sort u_2} →
    {γ : Sort u_4} →
      {r : α → α → Prop} →
        {s : β → β → Prop} →
          (f : α → β → γ) →
            (∀ (a : α) (b₁ b₂ : β), s b₁ b₂ → f a b₁ = f a b₂) →
              (∀ (a₁ a₂ : α) (b : β), r a₁ a₂ → f a₁ b = f a₂ b) → Quot r → Quot s → γ

Descends a function f : α → β → γ to quotients of α and β.

theorem Quot.lift₂_mk E0 #

∀ {α : Sort u_1} {β : Sort u_2} {γ : Sort u_4} {r : α → α → Prop} {s : β → β → Prop} (f : α → β → γ)
  (hr : ∀ (a : α) (b₁ b₂ : β), s b₁ b₂ → f a b₁ = f a b₂) (hs : ∀ (a₁ a₂ : α) (b : β), r a₁ a₂ → f a₁ b = f a₂ b)
  (a : α) (b : β), Quot.lift₂ f hr hs (Quot.mk r a) (Quot.mk s b) = f a b

def Quot.liftOn₂ E1 #

{α : Sort u_1} →
  {β : Sort u_2} →
    {γ : Sort u_4} →
      {r : α → α → Prop} →
        {s : β → β → Prop} →
          Quot r →
            Quot s →
              (f : α → β → γ) →
                (∀ (a : α) (b₁ b₂ : β), s b₁ b₂ → f a b₁ = f a b₂) →
                  (∀ (a₁ a₂ : α) (b : β), r a₁ a₂ → f a₁ b = f a₂ b) → γ

Descends a function f : α → β → γ to quotients of α and β and applies it.

theorem Quot.liftOn₂_mk E0 #

∀ {α : Sort u_1} {β : Sort u_2} {γ : Sort u_4} {r : α → α → Prop} {s : β → β → Prop} (a : α) (b : β) (f : α → β → γ)
  (hr : ∀ (a : α) (b₁ b₂ : β), s b₁ b₂ → f a b₁ = f a b₂) (hs : ∀ (a₁ a₂ : α) (b : β), r a₁ a₂ → f a₁ b = f a₂ b),
  (Quot.mk r a).liftOn₂ (Quot.mk s b) f hr hs = f a b

def Quot.map₂ E1 #

{α : Sort u_1} →
  {β : Sort u_2} →
    {γ : Sort u_4} →
      {r : α → α → Prop} →
        {s : β → β → Prop} →
          {t : γ → γ → Prop} →
            (f : α → β → γ) →
              (∀ (a : α) (b₁ b₂ : β), s b₁ b₂ → t (f a b₁) (f a b₂)) →
                (∀ (a₁ a₂ : α) (b : β), r a₁ a₂ → t (f a₁ b) (f a₂ b)) → Quot r → Quot s → Quot t

Descends a function f : α → β → γ to quotients of α and β with values in a quotient of γ.

theorem Quot.map₂_mk E0 #

∀ {α : Sort u_1} {β : Sort u_2} {γ : Sort u_4} {r : α → α → Prop} {s : β → β → Prop} {t : γ → γ → Prop} (f : α → β → γ)
  (hr : ∀ (a : α) (b₁ b₂ : β), s b₁ b₂ → t (f a b₁) (f a b₂))
  (hs : ∀ (a₁ a₂ : α) (b : β), r a₁ a₂ → t (f a₁ b) (f a₂ b)) (a : α) (b : β),
  Quot.map₂ f hr hs (Quot.mk r a) (Quot.mk s b) = Quot.mk t (f a b)

def Quot.recOnSubsingleton₂ E1 #

{α : Sort u_1} →
  {β : Sort u_2} →
    {r : α → α → Prop} →
      {s : β → β → Prop} →
        {φ : Quot r → Quot s → Sort u_5} →
          [h : ∀ (a : α) (b : β), Subsingleton (φ (Quot.mk r a) (Quot.mk s b))] →
            (q₁ : Quot r) → (q₂ : Quot s) → ((a : α) → (b : β) → φ (Quot.mk r a) (Quot.mk s b)) → φ q₁ q₂

A binary version of Quot.recOnSubsingleton.

theorem Quot.induction_on₂ E1 #

∀ {α : Sort u_1} {β : Sort u_2} {r : α → α → Prop} {s : β → β → Prop} {δ : Quot r → Quot s → Prop} (q₁ : Quot r)
  (q₂ : Quot s), (∀ (a : α) (b : β), δ (Quot.mk r a) (Quot.mk s b)) → δ q₁ q₂

theorem Quot.induction_on₃ E1 #

∀ {α : Sort u_1} {β : Sort u_2} {γ : Sort u_4} {r : α → α → Prop} {s : β → β → Prop} {t : γ → γ → Prop}
  {δ : Quot r → Quot s → Quot t → Prop} (q₁ : Quot r) (q₂ : Quot s) (q₃ : Quot t),
  (∀ (a : α) (b : β) (c : γ), δ (Quot.mk r a) (Quot.mk s b) (Quot.mk t c)) → δ q₁ q₂ q₃

instance Quot.lift.decidablePred E0 #

{α : Sort u_1} →
  (r : α → α → Prop) →
    (f : α → Prop) → (h : ∀ (a b : α), r a b → f a = f b) → [hf : DecidablePred f] → DecidablePred (Quot.lift f h)

instance Quot.lift₂.decidablePred E0 #

{α : Sort u_1} →
  {β : Sort u_2} →
    (r : α → α → Prop) →
      (s : β → β → Prop) →
        (f : α → β → Prop) →
          (ha : ∀ (a : α) (b₁ b₂ : β), s b₁ b₂ → f a b₁ = f a b₂) →
            (hb : ∀ (a₁ a₂ : α) (b : β), r a₁ a₂ → f a₁ b = f a₂ b) →
              [hf : (a : α) → DecidablePred (f a)] → (q₁ : Quot r) → DecidablePred (Quot.lift₂ f ha hb q₁)

Note that this provides DecidableRel (Quot.Lift₂ f ha hb) when α = β.

instance Quot.instDecidableLiftOnOfDecidablePred_mathlib E0 #

{α : Sort u_1} →
  (r : α → α → Prop) →
    (q : Quot r) → (f : α → Prop) → (h : ∀ (a b : α), r a b → f a = f b) → [DecidablePred f] → Decidable (q.liftOn f h)

instance Quot.instDecidableLiftOn₂OfDecidablePred E0 #

{α : Sort u_1} →
  {β : Sort u_2} →
    (r : α → α → Prop) →
      (s : β → β → Prop) →
        (q₁ : Quot r) →
          (q₂ : Quot s) →
            (f : α → β → Prop) →
              (ha : ∀ (a : α) (b₁ b₂ : β), s b₁ b₂ → f a b₁ = f a b₂) →
                (hb : ∀ (a₁ a₂ : α) (b : β), r a₁ a₂ → f a₁ b = f a₂ b) →
                  [(a : α) → DecidablePred (f a)] → Decidable (q₁.liftOn₂ q₂ f ha hb)

def Quotient.«term⟦_⟧» E1 #

Lean.ParserDescr

Places an element of a type into the quotient that equates terms according to an equivalence relation.

The setoid instance is provided explicitly. Quotient.mk' uses instance synthesis instead.

Given v : α, Quotient.mk s v : Quotient s is like v, except all observations of v's value must respect s.r. Quotient.lift allows values in a quotient to be mapped to other types, so long as the mapping respects s.r.

instance Quotient.instInhabitedQuotient E0 #

{α : Sort u_1} → (s : Setoid α) → [Inhabited α] → Inhabited (Quotient s)

instance Quotient.instSubsingletonQuotient E0 #

∀ {α : Sort u_1} (s : Setoid α) [Subsingleton α], Subsingleton (Quotient s)

instance Quotient.instUniqueQuotient E0 #

{α : Sort u_1} → (s : Setoid α) → [Unique α] → Unique (Quotient s)

instance Quotient.instIsEquivEquiv E0 #

∀ {α : Type u_4} [inst : Setoid α], IsEquiv α fun x1 x2 ↦ x1 ≈ x2

def Quotient.hrecOn₂ E1 #

{α : Sort u_1} →
  {β : Sort u_2} →
    {sa : Setoid α} →
      {sb : Setoid β} →
        {φ : Quotient sa → Quotient sb → Sort u_3} →
          (qa : Quotient sa) →
            (qb : Quotient sb) →
              (f : (a : α) → (b : β) → φ ⟦a⟧ ⟦b⟧) →
                (∀ (a₁ : α) (b₁ : β) (a₂ : α) (b₂ : β), a₁ ≈ a₂ → b₁ ≈ b₂ → f a₁ b₁ ≍ f a₂ b₂) → φ qa qb

Induction on two Quotient arguments a and b, result type depends on ⟦a⟧ and ⟦b⟧.

def Quotient.map E1 #

{α : Sort u_1} →
  {β : Sort u_2} →
    {sa : Setoid α} → {sb : Setoid β} → (f : α → β) → (∀ ⦃a b : α⦄, a ≈ b → f a ≈ f b) → Quotient sa → Quotient sb

Map a function f : α → β that sends equivalent elements to equivalent elements to a function Quotient sa → Quotient sb. Useful to define unary operations on quotients.

theorem Quotient.map_mk E0 #

∀ {α : Sort u_1} {β : Sort u_2} {sa : Setoid α} {sb : Setoid β} (f : α → β) (h : ∀ ⦃a b : α⦄, a ≈ b → f a ≈ f b)
  (x : α), Quotient.map f h ⟦x⟧ = ⟦f x⟧

def Quotient.map₂ E1 #

{α : Sort u_1} →
  {β : Sort u_2} →
    {sa : Setoid α} →
      {sb : Setoid β} →
        {γ : Sort u_4} →
          {sc : Setoid γ} →
            (f : α → β → γ) →
              (∀ ⦃a₁ a₂ : α⦄, a₁ ≈ a₂ → ∀ ⦃b₁ b₂ : β⦄, b₁ ≈ b₂ → f a₁ b₁ ≈ f a₂ b₂) →
                Quotient sa → Quotient sb → Quotient sc

Map a function f : α → β → γ that sends equivalent elements to equivalent elements to a function f : Quotient sa → Quotient sb → Quotient sc. Useful to define binary operations on quotients.

theorem Quotient.map₂_mk E0 #

∀ {α : Sort u_1} {β : Sort u_2} {sa : Setoid α} {sb : Setoid β} {γ : Sort u_4} {sc : Setoid γ} (f : α → β → γ)
  (h : ∀ ⦃a₁ a₂ : α⦄, a₁ ≈ a₂ → ∀ ⦃b₁ b₂ : β⦄, b₁ ≈ b₂ → f a₁ b₁ ≈ f a₂ b₂) (x : α) (y : β),
  Quotient.map₂ f h ⟦x⟧ ⟦y⟧ = ⟦f x y⟧

instance Quotient.lift.decidablePred E0 #

{α : Sort u_1} →
  {sa : Setoid α} →
    (f : α → Prop) → (h : ∀ (a b : α), a ≈ b → f a = f b) → [DecidablePred f] → DecidablePred (Quotient.lift f h)

instance Quotient.lift₂.decidablePred E0 #

{α : Sort u_1} →
  {β : Sort u_2} →
    {sa : Setoid α} →
      {sb : Setoid β} →
        (f : α → β → Prop) →
          (h : ∀ (a₁ : α) (b₁ : β) (a₂ : α) (b₂ : β), a₁ ≈ a₂ → b₁ ≈ b₂ → f a₁ b₁ = f a₂ b₂) →
            [hf : (a : α) → DecidablePred (f a)] → (q₁ : Quotient sa) → DecidablePred (Quotient.lift₂ f h q₁)

Note that this provides DecidableRel (Quotient.lift₂ f h) when α = β.

instance Quotient.instDecidableLiftOnOfDecidablePred_mathlib E0 #

{α : Sort u_1} →
  {sa : Setoid α} →
    (q : Quotient sa) →
      (f : α → Prop) → (h : ∀ (a b : α), a ≈ b → f a = f b) → [DecidablePred f] → Decidable (q.liftOn f h)

instance Quotient.instDecidableLiftOn₂OfDecidablePred_mathlib E0 #

{α : Sort u_1} →
  {β : Sort u_2} →
    {sa : Setoid α} →
      {sb : Setoid β} →
        (q₁ : Quotient sa) →
          (q₂ : Quotient sb) →
            (f : α → β → Prop) →
              (h : ∀ (a₁ : α) (b₁ : β) (a₂ : α) (b₂ : β), a₁ ≈ a₂ → b₁ ≈ b₂ → f a₁ b₁ = f a₂ b₂) →
                [(a : α) → DecidablePred (f a)] → Decidable (q₁.liftOn₂ q₂ f h)

theorem Quot.eq E1 #

∀ {α : Type u_3} {r : α → α → Prop} {x y : α}, Quot.mk r x = Quot.mk r y ↔ Relation.EqvGen r x y

theorem Quotient.eq E1 #

∀ {α : Sort u_1} {r : Setoid α} {x y : α}, ⟦x⟧ = ⟦y⟧ ↔ r x y

theorem Quotient.forall E1 #

∀ {α : Sort u_3} {s : Setoid α} {p : Quotient s → Prop}, (∀ (a : Quotient s), p a) ↔ ∀ (a : α), p ⟦a⟧

theorem Quotient.exists E1 #

∀ {α : Sort u_3} {s : Setoid α} {p : Quotient s → Prop}, (∃ a, p a) ↔ ∃ a, p ⟦a⟧

theorem Quotient.lift_mk E0 #

∀ {α : Sort u_1} {β : Sort u_2} {s : Setoid α} (f : α → β) (h : ∀ (a b : α), a ≈ b → f a = f b) (x : α),
  Quotient.lift f h ⟦x⟧ = f x

theorem Quotient.lift_comp_mk E0 #

∀ {α : Sort u_1} {β : Sort u_2} {x : Setoid α} (f : α → β) (h : ∀ (a b : α), a ≈ b → f a = f b),
  Quotient.lift f h ∘ Quotient.mk x = f

theorem Quotient.lift_surjective_iff E0 #

∀ {α : Sort u_3} {β : Sort u_4} {s : Setoid α} (f : α → β) (h : ∀ (a b : α), a ≈ b → f a = f b),
  Function.Surjective (Quotient.lift f h) ↔ Function.Surjective f

theorem Quotient.lift_surjective E1 #

∀ {α : Sort u_3} {β : Sort u_4} {s : Setoid α} (f : α → β) (h : ∀ (a b : α), a ≈ b → f a = f b),
  Function.Surjective f → Function.Surjective (Quotient.lift f h)

theorem Quotient.lift₂_mk E0 #

∀ {α : Sort u_3} {β : Sort u_4} {γ : Sort u_5} {x : Setoid α} {x_1 : Setoid β} (f : α → β → γ)
  (h : ∀ (a₁ : α) (a₂ : β) (b₁ : α) (b₂ : β), a₁ ≈ b₁ → a₂ ≈ b₂ → f a₁ a₂ = f b₁ b₂) (a : α) (b : β),
  Quotient.lift₂ f h ⟦a⟧ ⟦b⟧ = f a b

theorem Quotient.liftOn_mk E0 #

∀ {α : Sort u_1} {β : Sort u_2} {s : Setoid α} (f : α → β) (h : ∀ (a b : α), a ≈ b → f a = f b) (x : α),
  ⟦x⟧.liftOn f h = f x

theorem Quotient.liftOn₂_mk E0 #

∀ {α : Sort u_3} {β : Sort u_4} {γ : Sort u_5} {x : Setoid α} {x_1 : Setoid β} (f : α → β → γ)
  (h : ∀ (a₁ : α) (b₁ : β) (a₂ : α) (b₂ : β), a₁ ≈ a₂ → b₁ ≈ b₂ → f a₁ b₁ = f a₂ b₂) (x_2 : α) (y : β),
  ⟦x_2⟧.liftOn₂ ⟦y⟧ f h = f x_2 y

theorem Quot.mk_surjective E1 #

∀ {α : Sort u_1} {r : α → α → Prop}, Function.Surjective (Quot.mk r)

Quot.mk r is a surjective function.

theorem Quotient.mk_surjective E1 #

∀ {α : Sort u_1} {s : Setoid α}, Function.Surjective (Quotient.mk s)

Quotient.mk is a surjective function.

theorem Quotient.mk'_surjective E1 #

∀ {α : Sort u_1} [s : Setoid α], Function.Surjective Quotient.mk'

Quotient.mk' is a surjective function.

theorem Quot.map_surjective E0 #

∀ {α : Sort u_1} {β : Sort u_2} {ra : α → α → Prop} {rb : β → β → Prop} {f : α → β}
  (h : ∀ ⦃a b : α⦄, ra a b → rb (f a) (f b)), Function.Surjective f → Function.Surjective (Quot.map f h)

theorem Quotient.map_surjective E0 #

∀ {α : Sort u_1} {β : Sort u_2} {sa : Setoid α} {sb : Setoid β} {f : α → β} (h : ∀ ⦃a b : α⦄, a ≈ b → f a ≈ f b),
  Function.Surjective f → Function.Surjective (Quotient.map f h)

def Quot.out E1 #

{α : Sort u_1} → {r : α → α → Prop} → Quot r → α

Choose an element of the equivalence class using the axiom of choice. Sound but noncomputable.

def Quot.unquot E1 #

{α : Sort u_1} → {r : α → α → Prop} → Quot r → α

Unwrap the VM representation of a quotient to obtain an element of the equivalence class. Computable but unsound.

theorem Quot.out_eq E0 #

∀ {α : Sort u_1} {r : α → α → Prop} (q : Quot r), Quot.mk r q.out = q

def Quotient.out E1 #

{α : Sort u_1} → {s : Setoid α} → Quotient s → α

Choose an element of the equivalence class using the axiom of choice. Sound but noncomputable.

theorem Quotient.out_eq E0 #

∀ {α : Sort u_1} {s : Setoid α} (q : Quotient s), ⟦q.out⟧ = q

theorem Quotient.mk_out E1 #

∀ {α : Sort u_1} {s : Setoid α} (a : α), s ⟦a⟧.out a

theorem Quotient.mk_eq_iff_out E1 #

∀ {α : Sort u_1} {s : Setoid α} {x : α} {y : Quotient s}, ⟦x⟧ = y ↔ x ≈ y.out

theorem Quotient.out_equiv_out E0 #

∀ {α : Sort u_1} {s : Setoid α} {x y : Quotient s}, x.out ≈ y.out ↔ x = y

theorem Quotient.out_injective E1 #

∀ {α : Sort u_1} {s : Setoid α}, Function.Injective Quotient.out

theorem Quotient.out_inj E0 #

∀ {α : Sort u_1} {s : Setoid α} {x y : Quotient s}, x.out = y.out ↔ x = y

instance piSetoid E0 #

{ι : Sort u_3} → {α : ι → Sort u_4} → [(i : ι) → Setoid (α i)] → Setoid ((i : ι) → α i)

def Quotient.eval E1 #

{ι : Type u_3} → {α : ι → Sort u_4} → {S : (i : ι) → Setoid (α i)} → Quotient inferInstance → (i : ι) → Quotient (S i)

Given a class of functions q : @Quotient (∀ i, α i) _, returns the class of i-th projection Quotient (S i).

theorem Quotient.eval_mk E0 #

∀ {ι : Type u_3} {α : ι → Type u_4} {S : (i : ι) → Setoid (α i)} (f : (i : ι) → α i), ⟦f⟧.eval = fun i ↦ ⟦f i⟧

def Quotient.choice E1 #

{ι : Type u_3} → {α : ι → Type u_4} → {S : (i : ι) → Setoid (α i)} → ((i : ι) → Quotient (S i)) → Quotient inferInstance

Given a function f : Π i, Quotient (S i), returns the class of functions Π i, α i sending each i to an element of the class f i.

theorem Quotient.choice_eq E0 #

∀ {ι : Type u_3} {α : ι → Type u_4} {S : (i : ι) → Setoid (α i)} (f : (i : ι) → α i),
  (Quotient.choice fun i ↦ ⟦f i⟧) = ⟦f⟧

theorem Quotient.induction_on_pi E1 #

∀ {ι : Type u_3} {α : ι → Sort u_4} {s : (i : ι) → Setoid (α i)} {p : ((i : ι) → Quotient (s i)) → Prop}
  (f : (i : ι) → Quotient (s i)), (∀ (a : (i : ι) → α i), p fun i ↦ ⟦a i⟧) → p f

theorem nonempty_quotient_iff E0 #

∀ {α : Sort u_1} (s : Setoid α), Nonempty (Quotient s) ↔ Nonempty α

theorem true_equivalence E1 #

∀ {α : Sort u_1}, Equivalence fun x x_1 ↦ True

def trueSetoid E1 #

{α : Sort u_1} → Setoid α

Always-true relation as a Setoid.

Note that in later files the preferred spelling is ⊤ : Setoid α.

def Trunc E3 #

Sort u → Sort u

Trunc α is the quotient of α by the always-true relation. This is related to the propositional truncation in HoTT, and is similar in effect to Nonempty α, but unlike Nonempty α, Trunc α is data, so the VM representation is the same as α, and so this can be used to maintain computability.

def Trunc.mk E1 #

{α : Sort u_1} → α → Trunc α

Constructor for Trunc α

instance Trunc.instInhabited E0 #

{α : Sort u_1} → [Inhabited α] → Inhabited (Trunc α)

def Trunc.lift E1 #

{α : Sort u_1} → {β : Sort u_2} → (f : α → β) → (∀ (a b : α), f a = f b) → Trunc α → β

Any constant function lifts to a function out of the truncation

theorem Trunc.ind E1 #

∀ {α : Sort u_1} {β : Trunc α → Prop}, (∀ (a : α), β (Trunc.mk a)) → ∀ (q : Trunc α), β q

theorem Trunc.lift_mk E0 #

∀ {α : Sort u_1} {β : Sort u_2} (f : α → β) (c : ∀ (a b : α), f a = f b) (a : α), Trunc.lift f c (Trunc.mk a) = f a

def Trunc.liftOn E1 #

{α : Sort u_1} → {β : Sort u_2} → Trunc α → (f : α → β) → (∀ (a b : α), f a = f b) → β

Lift a constant function on q : Trunc α.

theorem Trunc.induction_on E1 #

∀ {α : Sort u_1} {β : Trunc α → Prop} (q : Trunc α), (∀ (a : α), β (Trunc.mk a)) → β q

theorem Trunc.exists_rep E1 #

∀ {α : Sort u_1} (q : Trunc α), ∃ a, Trunc.mk a = q

theorem Trunc.induction_on₂ E1 #

∀ {α : Sort u_1} {β : Sort u_2} {C : Trunc α → Trunc β → Prop} (q₁ : Trunc α) (q₂ : Trunc β),
  (∀ (a : α) (b : β), C (Trunc.mk a) (Trunc.mk b)) → C q₁ q₂

theorem Trunc.eq E1 #

∀ {α : Sort u_1} (a b : Trunc α), a = b

instance Trunc.instSubsingletonTrunc E0 #

∀ {α : Sort u_1}, Subsingleton (Trunc α)

def Trunc.bind E1 #

{α : Sort u_1} → {β : Sort u_2} → Trunc α → (α → Trunc β) → Trunc β

The bind operator for the Trunc monad.

def Trunc.map E1 #

{α : Sort u_1} → {β : Sort u_2} → (α → β) → Trunc α → Trunc β

A function f : α → β defines a function map f : Trunc α → Trunc β.

instance Trunc.instMonad E0 #

Monad Trunc

instance Trunc.instLawfulMonad E0 #

LawfulMonad Trunc

def Trunc.rec E1 #

{α : Sort u_1} →
  {C : Trunc α → Sort u_3} → (f : (a : α) → C (Trunc.mk a)) → (∀ (a b : α), ⋯ ▸ f a = f b) → (q : Trunc α) → C q

Recursion/induction principle for Trunc.

def Trunc.recOn E1 #

{α : Sort u_1} →
  {C : Trunc α → Sort u_3} → (q : Trunc α) → (f : (a : α) → C (Trunc.mk a)) → (∀ (a b : α), ⋯ ▸ f a = f b) → C q

A version of Trunc.rec taking q : Trunc α as the first argument.

def Trunc.recOnSubsingleton E1 #

{α : Sort u_1} →
  {C : Trunc α → Sort u_3} →
    [∀ (a : α), Subsingleton (C (Trunc.mk a))] → (q : Trunc α) → ((a : α) → C (Trunc.mk a)) → C q

A version of Trunc.recOn assuming the codomain is a Subsingleton.

def Trunc.out E1 #

{α : Sort u_1} → Trunc α → α

Noncomputably extract a representative of Trunc α (using the axiom of choice).

theorem Trunc.out_eq E0 #

∀ {α : Sort u_1} (q : Trunc α), Trunc.mk q.out = q

theorem Trunc.nonempty E1 #

∀ {α : Sort u_1} (q : Trunc α), Nonempty α

abbrev Quotient.mk'' E1 #

{α : Sort u_1} → {s₁ : Setoid α} → α → Quotient s₁

A version of Quotient.mk taking {s : Setoid α} as an implicit argument instead of an instance argument.

theorem Quotient.mk''_surjective E1 #

∀ {α : Sort u_1} {s₁ : Setoid α}, Function.Surjective Quotient.mk''

Quotient.mk'' is a surjective function.

def Quotient.liftOn' E1 #

{α : Sort u_1} → {φ : Sort u_4} → {s₁ : Setoid α} → Quotient s₁ → (f : α → φ) → (∀ (a b : α), s₁ a b → f a = f b) → φ

A version of Quotient.liftOn taking {s : Setoid α} as an implicit argument instead of an instance argument.

theorem Quotient.liftOn'_mk'' E0 #

∀ {α : Sort u_1} {φ : Sort u_4} {s₁ : Setoid α} (f : α → φ) (h : ∀ (a b : α), s₁ a b → f a = f b) (x : α),
  (Quotient.mk'' x).liftOn' f h = f x

theorem Quotient.surjective_liftOn' E0 #

∀ {α : Sort u_1} {φ : Sort u_4} {s₁ : Setoid α} {f : α → φ} (h : ∀ (a b : α), s₁ a b → f a = f b),
  (Function.Surjective fun x ↦ x.liftOn' f h) ↔ Function.Surjective f

def Quotient.liftOn₂' E1 #

{α : Sort u_1} →
  {β : Sort u_2} →
    {γ : Sort u_3} →
      {s₁ : Setoid α} →
        {s₂ : Setoid β} →
          Quotient s₁ →
            Quotient s₂ →
              (f : α → β → γ) → (∀ (a₁ : α) (a₂ : β) (b₁ : α) (b₂ : β), s₁ a₁ b₁ → s₂ a₂ b₂ → f a₁ a₂ = f b₁ b₂) → γ

A version of Quotient.liftOn₂ taking {s₁ : Setoid α} {s₂ : Setoid β} as implicit arguments instead of instance arguments.

theorem Quotient.liftOn₂'_mk'' E0 #

∀ {α : Sort u_1} {β : Sort u_2} {γ : Sort u_3} {s₁ : Setoid α} {s₂ : Setoid β} (f : α → β → γ)
  (h : ∀ (a₁ : α) (a₂ : β) (b₁ : α) (b₂ : β), s₁ a₁ b₁ → s₂ a₂ b₂ → f a₁ a₂ = f b₁ b₂) (a : α) (b : β),
  (Quotient.mk'' a).liftOn₂' (Quotient.mk'' b) f h = f a b

def Quotient.hrecOn' E1 #

{α : Sort u_1} →
  {s₁ : Setoid α} →
    {φ : Quotient s₁ → Sort u_5} →
      (qa : Quotient s₁) → (f : (a : α) → φ (Quotient.mk'' a)) → (∀ (a₁ a₂ : α), a₁ ≈ a₂ → f a₁ ≍ f a₂) → φ qa

Recursion on a Quotient argument a, result type depends on ⟦a⟧.

theorem Quotient.hrecOn'_mk'' E0 #

∀ {α : Sort u_1} {s₁ : Setoid α} {φ : Quotient s₁ → Sort u_5} (f : (a : α) → φ (Quotient.mk'' a))
  (c : ∀ (a₁ a₂ : α), a₁ ≈ a₂ → f a₁ ≍ f a₂) (x : α), (Quotient.mk'' x).hrecOn' f c = f x

def Quotient.hrecOn₂' E1 #

{α : Sort u_1} →
  {β : Sort u_2} →
    {s₁ : Setoid α} →
      {s₂ : Setoid β} →
        {φ : Quotient s₁ → Quotient s₂ → Sort u_5} →
          (qa : Quotient s₁) →
            (qb : Quotient s₂) →
              (f : (a : α) → (b : β) → φ (Quotient.mk'' a) (Quotient.mk'' b)) →
                (∀ (a₁ : α) (b₁ : β) (a₂ : α) (b₂ : β), a₁ ≈ a₂ → b₁ ≈ b₂ → f a₁ b₁ ≍ f a₂ b₂) → φ qa qb

Recursion on two Quotient arguments a and b, result type depends on ⟦a⟧ and ⟦b⟧.

theorem Quotient.hrecOn₂'_mk'' E0 #

∀ {α : Sort u_1} {β : Sort u_2} {s₁ : Setoid α} {s₂ : Setoid β} {φ : Quotient s₁ → Quotient s₂ → Sort u_5}
  (f : (a : α) → (b : β) → φ (Quotient.mk'' a) (Quotient.mk'' b))
  (c : ∀ (a₁ : α) (b₁ : β) (a₂ : α) (b₂ : β), a₁ ≈ a₂ → b₁ ≈ b₂ → f a₁ b₁ ≍ f a₂ b₂) (x : α) (qb : Quotient s₂),
  (Quotient.mk'' x).hrecOn₂' qb f c = qb.hrecOn' (f x) ⋯

def Quotient.map' E1 #

{α : Sort u_1} →
  {β : Sort u_2} →
    {s₁ : Setoid α} → {s₂ : Setoid β} → (f : α → β) → (∀ (a b : α), s₁ a b → s₂ (f a) (f b)) → Quotient s₁ → Quotient s₂

Map a function f : α → β that sends equivalent elements to equivalent elements to a function Quotient sa → Quotient sb. Useful to define unary operations on quotients. This is a version of Quotient.map using Setoid.r instead of ≈.

theorem Quotient.map'_mk'' E0 #

∀ {α : Sort u_1} {β : Sort u_2} {s₁ : Setoid α} {s₂ : Setoid β} (f : α → β) (h : ∀ (a b : α), s₁ a b → s₂ (f a) (f b))
  (x : α), Quotient.map' f h (Quotient.mk'' x) = Quotient.mk'' (f x)

def Quotient.map₂' E1 #

{α : Sort u_1} →
  {β : Sort u_2} →
    {γ : Sort u_3} →
      {s₁ : Setoid α} →
        {s₂ : Setoid β} →
          {s₃ : Setoid γ} →
            (f : α → β → γ) →
              (∀ ⦃a₁ a₂ : α⦄, s₁ a₁ a₂ → ∀ ⦃b₁ b₂ : β⦄, s₂ b₁ b₂ → s₃ (f a₁ b₁) (f a₂ b₂)) →
                Quotient s₁ → Quotient s₂ → Quotient s₃

Map a function f : α → β → γ that sends equivalent elements to equivalent elements to a function f : Quotient sa → Quotient sb → Quotient sc. Useful to define binary operations on quotients. This is a version of Quotient.map₂ using Setoid.r instead of ≈.

theorem Quotient.map₂'_mk'' E0 #

∀ {α : Sort u_1} {β : Sort u_2} {γ : Sort u_3} {s₁ : Setoid α} {s₂ : Setoid β} {s₃ : Setoid γ} (f : α → β → γ)
  (h : ∀ ⦃a₁ a₂ : α⦄, s₁ a₁ a₂ → ∀ ⦃b₁ b₂ : β⦄, s₂ b₁ b₂ → s₃ (f a₁ b₁) (f a₂ b₂)) (x : α),
  Quotient.map₂' f h (Quotient.mk'' x) = Quotient.map' (f x) ⋯

theorem Quotient.exact' E1 #

∀ {α : Sort u_1} {s₁ : Setoid α} {a b : α}, Quotient.mk'' a = Quotient.mk'' b → s₁ a b

theorem Quotient.sound' E1 #

∀ {α : Sort u_1} {s₁ : Setoid α} {a b : α}, s₁ a b → Quotient.mk'' a = Quotient.mk'' b

theorem Quotient.eq' E0 #

∀ {α : Sort u_1} {s₁ : Setoid α} {a b : α}, Quotient.mk' a = Quotient.mk' b ↔ s₁ a b

theorem Quotient.eq'' E1 #

∀ {α : Sort u_1} {s₁ : Setoid α} {a b : α}, Quotient.mk'' a = Quotient.mk'' b ↔ s₁ a b

theorem Quotient.out_eq' E1 #

∀ {α : Sort u_1} {s₁ : Setoid α} (q : Quotient s₁), Quotient.mk'' q.out = q

theorem Quotient.mk_out' E1 #

∀ {α : Sort u_1} {s₁ : Setoid α} (a : α), s₁ (Quotient.mk'' a).out a

theorem Quotient.mk''_eq_mk E0 #

∀ {α : Sort u_1} {s : Setoid α}, Quotient.mk'' = Quotient.mk s

theorem Quotient.liftOn'_mk E0 #

∀ {α : Sort u_1} {β : Sort u_2} {s : Setoid α} (x : α) (f : α → β) (h : ∀ (a b : α), s a b → f a = f b),
  ⟦x⟧.liftOn' f h = f x

theorem Quotient.liftOn₂'_mk E0 #

∀ {α : Sort u_1} {β : Sort u_2} {γ : Sort u_3} {s : Setoid α} {t : Setoid β} (f : α → β → γ)
  (h : ∀ (a₁ : α) (a₂ : β) (b₁ : α) (b₂ : β), s a₁ b₁ → t a₂ b₂ → f a₁ a₂ = f b₁ b₂) (a : α) (b : β),
  ⟦a⟧.liftOn₂' ⟦b⟧ f h = f a b

theorem Quotient.map'_mk E0 #

∀ {α : Sort u_1} {β : Sort u_2} {s : Setoid α} {t : Setoid β} (f : α → β) (h : ∀ (a b : α), s a b → t (f a) (f b))
  (x : α), Quotient.map' f h ⟦x⟧ = ⟦f x⟧

instance Quotient.instDecidableLiftOn'OfDecidablePred E0 #

{α : Sort u_1} →
  {s₁ : Setoid α} →
    (q : Quotient s₁) →
      (f : α → Prop) → (h : ∀ (a b : α), s₁ a b → f a = f b) → [DecidablePred f] → Decidable (q.liftOn' f h)

instance Quotient.instDecidableLiftOn₂'OfDecidablePred E0 #

{α : Sort u_1} →
  {β : Sort u_2} →
    {s₁ : Setoid α} →
      {s₂ : Setoid β} →
        (q₁ : Quotient s₁) →
          (q₂ : Quotient s₂) →
            (f : α → β → Prop) →
              (h : ∀ (a₁ : α) (b₁ : β) (a₂ : α) (b₂ : β), s₁ a₁ a₂ → s₂ b₁ b₂ → f a₁ b₁ = f a₂ b₂) →
                [(a : α) → DecidablePred (f a)] → Decidable (q₁.liftOn₂' q₂ f h)

theorem Equivalence.quot_mk_eq_iff E0 #

∀ {α : Type u_3} {r : α → α → Prop}, Equivalence r → ∀ (x y : α), Quot.mk r x = Quot.mk r y ↔ r x y

Deprecated aliases

NameNew nameSince
Quotient.ind'Quotient.ind2026-11-25
Quotient.inductionOn'Quotient.inductionOn2026-11-25
Quotient.inductionOn₂'Quotient.inductionOn₂2026-11-25
Quotient.inductionOn₃'Quotient.inductionOn₃2026-11-25
Quotient.ind₂'Quotient.ind₂2026-11-25
Quotient.recOnSubsingleton'Quotient.recOnSubsingleton2026-11-25
Quotient.recOnSubsingleton₂'Quotient.recOnSubsingleton₂2026-11-25