Quotients -- extends the core library
Equations
- quot.inhabited = {default := quot.mk ra (inhabited.default α)}
Recursion on two quotient
arguments a
and b
, result type depends on ⟦a⟧
and ⟦b⟧
.
If ra
is a subrelation of ra'
, then we have a natural map quot ra → quot ra'
.
Equations
- quot.map_right h = quot.map id h
weaken the relation of a quotient
Equations
- quot.factor r s h = quot.lift (quot.mk s) _
Descends a function f : α → β → γ
to quotients of α
and β
.
Equations
- quot.lift₂ f hr hs q₁ q₂ = quot.lift (λ (a : α), quot.lift (f a) _) _ q₁ q₂
Descends a function f : α → β → γ
to quotients of α
and β
and applies it.
Equations
- p.lift_on₂ q f hr hs = quot.lift₂ f hr hs p q
Descends a function f : α → β → γ
to quotients of α
and β
wih values in a quotient of
γ
.
Equations
- quot.map₂ f hr hs q₁ q₂ = quot.lift₂ (λ (a : α) (b : β), quot.mk t (f a b)) _ _ q₁ q₂
Equations
Induction on two quotient
arguments a
and b
, result type depends on ⟦a⟧
and ⟦b⟧
.
Equations
- qa.hrec_on₂ qb f c = quot.hrec_on₂ qa qb f _ _
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
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₂ (λ (x : α) (y : β), ⟦f x y⟧) _
Choose an element of the equivalence class using the axiom of choice. Sound but noncomputable.
Equations
- q.out = classical.some _
Unwrap the VM representation of a quotient to obtain an element of the equivalence class. Computable but unsound.
Choose an element of the equivalence class using the axiom of choice. Sound but noncomputable.
Equations
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 = ⟦(λ (i : ι), (f i).out)⟧
Equations
Any constant function lifts to a function out of the truncation
Equations
- trunc.lift f c = quot.lift f _
Lift a constant function on q : trunc α
.
Equations
- q.lift_on f c = trunc.lift f c q
Equations
Equations
A version of trunc.rec_on
assuming the codomain is a subsingleton
.
Equations
- q.rec_on_subsingleton f = trunc.rec f _ q
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
A version of quotient.lift_on
taking {s : setoid α}
as an implicit argument instead of an
instance argument.
A version of quotient.lift_on₂
taking {s₁ : setoid α} {s₂ : setoid β}
as implicit arguments
instead of instance arguments.
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.induction_on
taking {s : setoid α}
as an implicit argument instead
of an instance argument.
A version of quotient.induction_on₂
taking {s₁ : setoid α} {s₂ : setoid β}
as implicit
arguments instead of instance arguments.
A version of quotient.induction_on₃
taking {s₁ : setoid α} {s₂ : setoid β} {s₃ : setoid γ}
as implicit arguments instead of instance arguments.
Recursion on a quotient
argument a
, result type depends on ⟦a⟧
.
Equations
- qa.hrec_on' f c = quot.hrec_on qa f c
Recursion on two quotient
arguments a
and b
, result type depends on ⟦a⟧
and ⟦b⟧
.
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
A version of quotient.map₂
using curly braces and unification.
Equations
- quotient.map₂' f h = quotient.map₂ f h
A version of quotient.out
taking {s₁ : setoid α}
as an implicit argument instead of an
instance argument.