Quotient types #
This module extends the core library's treatment of quotient types (Init.Core).
Tags #
quotient
Equations
- Quot.instInhabited_mathlib r = { default := Quot.mk r default }
Equations
- ⋯ = ⋯
Equations
- Quot.instUnique = Unique.mk' (Quot ra)
Recursion on two Quotient arguments a and b, result type depends on ⟦a⟧ and ⟦b⟧.
Equations
- qa.hrecOn₂ qb f ca cb = Quot.hrecOn qa (fun (a : α) => Quot.hrecOn qb (f a) ⋯) ⋯
Instances For
Descends a function f : α → β → γ to quotients of α and β.
Equations
- Quot.lift₂ f hr hs q₁ q₂ = Quot.lift (fun (a : α) => Quot.lift (f a) ⋯) ⋯ q₁ q₂
Instances For
Descends a function f : α → β → γ to quotients of α and β and applies it.
Equations
- p.liftOn₂ q f hr hs = Quot.lift₂ f hr hs p q
Instances For
Descends a function f : α → β → γ to quotients of α and β with values in a quotient of
γ.
Equations
- Quot.map₂ f hr hs q₁ q₂ = Quot.lift₂ (fun (a : α) (b : β) => Quot.mk t (f a b)) ⋯ ⋯ q₁ q₂
Instances For
A binary version of Quot.recOnSubsingleton.
Equations
- q₁.recOnSubsingleton₂ q₂ f = Quot.recOnSubsingleton q₁ fun (a : α) => Quot.recOnSubsingleton q₂ fun (b : β) => f a b
Instances For
Equations
- Quot.lift.decidablePred r f h q = Quot.recOnSubsingleton q hf
Note that this provides DecidableRel (Quot.Lift₂ f ha hb) when α = β.
Equations
- Quot.lift₂.decidablePred r s f ha hb q₁ q₂ = q₁.recOnSubsingleton₂ q₂ hf
Equations
- Quot.instDecidableLiftOnOfDecidablePred_mathlib r q f h = Quot.lift.decidablePred r f h q
Equations
- Quot.instDecidableLiftOn₂OfDecidablePred r s q₁ q₂ f ha hb = Quot.lift₂.decidablePred r s f ha hb q₁ q₂
The canonical quotient map into a Quotient.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Pretty printer defined by notation3 command.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Quotient.instInhabitedQuotient s = { default := ⟦default⟧ }
Equations
- ⋯ = ⋯
Equations
Induction on two Quotient arguments a and b, result type depends on ⟦a⟧ and ⟦b⟧.
Equations
- qa.hrecOn₂ qb f c = Quot.hrecOn₂ qa qb f ⋯ ⋯
Instances For
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.
Equations
- Quotient.map f h = Quot.map f h
Instances For
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.
Equations
- Quotient.map₂ f h = Quotient.lift₂ (fun (x : α) (y : β) => ⟦f x y⟧) ⋯
Instances For
Equations
- Quotient.lift.decidablePred f h = Quot.lift.decidablePred HasEquiv.Equiv f h
Note that this provides DecidableRel (Quotient.lift₂ f h) when α = β.
Equations
- Quotient.lift₂.decidablePred f h q₁ q₂ = Quotient.recOnSubsingleton₂ q₁ q₂ hf
Equations
- q.instDecidableLiftOnOfDecidablePred_mathlib f h = Quotient.lift.decidablePred f h q
Equations
- q₁.instDecidableLiftOn₂OfDecidablePred_mathlib q₂ f h = Quotient.lift₂.decidablePred f h q₁ q₂
Quot.mk r is a surjective function.
Quotient.mk is a surjective function.
Quotient.mk' is a surjective function.
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.
Equations
- Quotient.choice f = ⟦fun (i : ι) => (f i).out⟧
Instances For
Truncation #
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.
Instances For
Any constant function lifts to a function out of the truncation
Equations
- Trunc.lift f c = Quot.lift f ⋯
Instances For
Lift a constant function on q : Trunc α.
Equations
- q.liftOn f c = Trunc.lift f c q
Instances For
A version of Trunc.recOn assuming the codomain is a Subsingleton.
Instances For
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.
A version of Quotient.mk taking {s : Setoid α} as an implicit argument instead of an
instance argument.
Equations
- Quotient.mk'' a = Quot.mk Setoid.r a
Instances For
Quotient.mk'' is a surjective function.
A version of Quotient.liftOn taking {s : Setoid α} as an implicit argument instead of an
instance argument.
Equations
- q.liftOn' f h = q.liftOn f h
Instances For
A version of Quotient.liftOn₂ taking {s₁ : Setoid α} {s₂ : Setoid β} as implicit arguments
instead of instance arguments.
Equations
- q₁.liftOn₂' q₂ f h = q₁.liftOn₂ q₂ f h
Instances For
A version of Quotient.ind taking {s : Setoid α} as an implicit argument instead of an
instance argument.
A version of Quotient.ind₂ taking {s₁ : Setoid α} {s₂ : Setoid β} as implicit arguments
instead of instance arguments.
A version of Quotient.inductionOn taking {s : Setoid α} as an implicit argument instead
of an instance argument.
A version of Quotient.inductionOn₂ taking {s₁ : Setoid α} {s₂ : Setoid β} as implicit
arguments instead of instance arguments.
A version of Quotient.inductionOn₃ taking {s₁ : Setoid α} {s₂ : Setoid β} {s₃ : Setoid γ}
as implicit arguments instead of instance arguments.
A version of Quotient.recOnSubsingleton taking {s₁ : Setoid α} as an implicit argument
instead of an instance argument.
Equations
- q.recOnSubsingleton' f = Quotient.recOnSubsingleton q f
Instances For
A version of Quotient.recOnSubsingleton₂ taking {s₁ : Setoid α} {s₂ : Setoid α}
as implicit arguments instead of instance arguments.
Equations
- q₁.recOnSubsingleton₂' q₂ f = Quotient.recOnSubsingleton₂ q₁ q₂ f
Instances For
Recursion on a Quotient argument a, result type depends on ⟦a⟧.
Equations
- qa.hrecOn' f c = Quot.hrecOn qa f c
Instances For
Recursion on two Quotient arguments a and b, result type depends on ⟦a⟧ and ⟦b⟧.
Equations
- qa.hrecOn₂' qb f c = qa.hrecOn₂ qb f c
Instances For
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.
Equations
- Quotient.map' f h = Quot.map f h
Instances For
A version of Quotient.map₂ using curly braces and unification.
Equations
- Quotient.map₂' f h = Quotient.map₂ f h
Instances For
A version of Quotient.out taking {s₁ : Setoid α} as an implicit argument instead of an
instance argument.
Equations
- a.out' = a.out
Instances For
Equations
- q.instDecidableLiftOn'OfDecidablePred f h = Quotient.lift.decidablePred f h q
Equations
- q₁.instDecidableLiftOn₂'OfDecidablePred q₂ f h = Quotient.lift₂.decidablePred f h q₁ q₂