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 byrbecome identified in the quotient. If a theorem or definition makes use ofQuot.sound, it will show up in the#print axiomscommand.Of course, the quotient construction is most commonly used in situations when
ris an equivalence relation. Givenras above, if we definer'according to the ruler' a biffQuot.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.soundsays thatr a bimpliesr' a b. UsingQuot.liftandQuot.ind, we can show thatr'is the smallest equivalence relation containingr, in the sense that ifr''is any equivalence relation containingr, thenr' a bimpliesr'' a b. In particular, ifrwas an equivalence relation to start with, then for allaandbwe haver a biffr' 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: May 02 2025 at 03:31 UTC