Zulip Chat Archive
Stream: lean4
Topic: quiz: the smallest equivalence relation of `r`
Bulhwi Cha (Feb 15 2023 at 02:38):
Quiz: read the following excerpt from Section Quotients of #tpil4 and prove the theorems below.
universe u #check (Quot.sound : ∀ {α : Type u} {r : α → α → Prop} {a b : α}, r a b → Quot.mk r a = Quot.mk r b)
This is the axiom that asserts that any two elements of
α
that are related byr
become identified in the quotient. If a theorem or definition makes use ofQuot.sound
, it will show up in the#print axioms
command.Of course, the quotient construction is most commonly used in situations when
r
is an equivalence relation. Givenr
as above, if we definer'
according to the ruler' a b
iffQuot.mk r a = Quot.mk r b
, then it's clear thatr'
is an equivalence relation. Indeed,r'
is the kernel of the functiona ↦ Quot.mk r a
. The axiomQuot.sound
says thatr a b
impliesr' a b
. UsingQuot.lift
andQuot.ind
, we can show thatr'
is the smallest equivalence relation containingr
, in the sense that ifr''
is any equivalence relation containingr
, thenr' a b
impliesr'' a b
. In particular, ifr
was an equivalence relation to start with, then for alla
andb
we haver a b
iffr' a b
.
import Mathlib.Logic.Basic
namespace Quot
-- `Ker r` is the *kernel* of the function `a ↦ Quot.mk r a`
def Ker {α : Type u} (r : α → α → Prop) : α → α → Prop :=
sorry
-- `Ker r` is an equivalence relation
theorem Ker_is_equivalence {α : Type u} (r : α → α → Prop) : Equivalence (Ker r) where
refl := sorry
symm := sorry
trans := sorry
-- `Ker r` is the smallest equivalence relation containing `r`
theorem Ker_is_smallest {α : Type u} {r r' : α → α → Prop} (eqv_r' : Equivalence r')
(sub_r_r' : Subrelation r r') : Subrelation (Ker r) r' := by
sorry
-- if `r` is an equivalence relation, then `r = Ker r`
theorem eqv_eq_Ker {α : Type u} {r : α → α → Prop} (eqv_r : Equivalence r) : r = Ker r :=
sorry
end Quot
Solutions
Bulhwi Cha (Feb 15 2023 at 02:38):
The theorem Ker_is_smallest
was much harder to prove than I thought.
Last updated: Dec 20 2023 at 11:08 UTC