Note about Mathlib/Init/
#
The files in Mathlib/Init
are leftovers from the port from Mathlib3.
(They contain content moved from lean3 itself that Mathlib needed but was not moved to lean4.)
We intend to move all the content of these files out into the main Mathlib
directory structure.
Contributions assisting with this are appreciated.
Quotient types #
These are ported from the Lean 3 standard library file init/data/quot.lean
.
EqvGen r
is the equivalence relation generated by r
.
- rel: ∀ {α : Type u} {r : α → α → Prop} (x y : α), r x y → EqvGen r x y
- refl: ∀ {α : Type u} {r : α → α → Prop} (x : α), EqvGen r x x
- symm: ∀ {α : Type u} {r : α → α → Prop} (x y : α), EqvGen r x y → EqvGen r y x
- trans: ∀ {α : Type u} {r : α → α → Prop} (x y z : α), EqvGen r x y → EqvGen r y z → EqvGen r x z
Instances For
EqvGen.Setoid r
is the setoid generated by a relation r
.
The motivation for this definition is that Quot r
behaves like Quotient (EqvGen.Setoid r)
,
see for example Quot.exact
and Quot.EqvGen_sound
.
Equations
- EqvGen.Setoid r = { r := EqvGen r, iseqv := ⋯ }
Instances For
instance
Quotient.decidableEq
{α : Sort u}
{s : Setoid α}
[d : (a b : α) → Decidable (a ≈ b)]
:
DecidableEq (Quotient s)