data.setoid.basic
⟷
Mathlib.Data.Setoid.Basic
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -475,7 +475,7 @@ def mapOfSurjective (r) (f : α → β) (h : ker f ≤ r) (hf : Surjective f) :
⟨y, y, hy, hy, r.refl' y⟩,
fun _ _ ⟨x, y, hx, hy, h⟩ => ⟨y, x, hy, hx, r.symm' h⟩,
fun _ _ _ ⟨x, y, hx, hy, h₁⟩ ⟨y', z, hy', hz, h₂⟩ =>
- ⟨x, z, hx, hz, r.trans' h₁ <| r.trans' (h <| by rwa [← hy'] at hy ) h₂⟩⟩⟩
+ ⟨x, z, hx, hz, r.trans' h₁ <| r.trans' (h <| by rwa [← hy'] at hy) h₂⟩⟩⟩
#align setoid.map_of_surjective Setoid.mapOfSurjective
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2019 Amelia Livingston. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Amelia Livingston, Bryan Gin-ge Chen
-/
-import Mathbin.Logic.Relation
-import Mathbin.Order.GaloisConnection
+import Logic.Relation
+import Order.GaloisConnection
#align_import data.setoid.basic from "leanprover-community/mathlib"@"c3291da49cfa65f0d43b094750541c0731edc932"
mathlib commit https://github.com/leanprover-community/mathlib/commit/001ffdc42920050657fd45bd2b8bfbec8eaaeb29
@@ -584,8 +584,8 @@ theorem Quotient.subsingleton_iff {s : Setoid α} : Subsingleton (Quotient s)
by
simp only [subsingleton_iff, eq_top_iff, Setoid.le_def, Setoid.top_def, Pi.top_apply,
forall_const]
- refine' (surjective_quotient_mk _).forall.trans (forall_congr' fun a => _)
- refine' (surjective_quotient_mk _).forall.trans (forall_congr' fun b => _)
+ refine' (surjective_quotient_mk' _).forall.trans (forall_congr' fun a => _)
+ refine' (surjective_quotient_mk' _).forall.trans (forall_congr' fun b => _)
exact Quotient.eq''
#align quotient.subsingleton_iff Quotient.subsingleton_iff
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2019 Amelia Livingston. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Amelia Livingston, Bryan Gin-ge Chen
-
-! This file was ported from Lean 3 source module data.setoid.basic
-! leanprover-community/mathlib commit c3291da49cfa65f0d43b094750541c0731edc932
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Logic.Relation
import Mathbin.Order.GaloisConnection
+#align_import data.setoid.basic from "leanprover-community/mathlib"@"c3291da49cfa65f0d43b094750541c0731edc932"
+
/-!
# Equivalence relations
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -154,9 +154,11 @@ theorem ker_apply_mk_out' {f : α → β} (a : α) :
#align setoid.ker_apply_mk_out' Setoid.ker_apply_mk_out'
-/
+#print Setoid.ker_def /-
theorem ker_def {f : α → β} {x y : α} : (ker f).Rel x y ↔ f x = f y :=
Iff.rfl
#align setoid.ker_def Setoid.ker_def
+-/
#print Setoid.prod /-
/-- Given types `α`, `β`, the product of two equivalence relations `r` on `α` and `s` on `β`:
@@ -178,15 +180,19 @@ instance : Inf (Setoid α) :=
⟨fun x => ⟨r.refl' x, s.refl' x⟩, fun _ _ h => ⟨r.symm' h.1, s.symm' h.2⟩, fun _ _ _ h1 h2 =>
⟨r.trans' h1.1 h2.1, s.trans' h1.2 h2.2⟩⟩⟩⟩
+#print Setoid.inf_def /-
/-- The infimum of 2 equivalence relations r and s is the same relation as the infimum
of the underlying binary operations. -/
theorem inf_def {r s : Setoid α} : (r ⊓ s).Rel = r.Rel ⊓ s.Rel :=
rfl
#align setoid.inf_def Setoid.inf_def
+-/
+#print Setoid.inf_iff_and /-
theorem inf_iff_and {r s : Setoid α} {x y} : (r ⊓ s).Rel x y ↔ r.Rel x y ∧ s.Rel x y :=
Iff.rfl
#align setoid.inf_iff_and Setoid.inf_iff_and
+-/
/-- The infimum of a set of equivalence relations. -/
instance : InfSet (Setoid α) :=
@@ -230,19 +236,25 @@ instance completeLattice : CompleteLattice (Setoid α) :=
#align setoid.complete_lattice Setoid.completeLattice
-/
+#print Setoid.top_def /-
@[simp]
theorem top_def : (⊤ : Setoid α).Rel = ⊤ :=
rfl
#align setoid.top_def Setoid.top_def
+-/
+#print Setoid.bot_def /-
@[simp]
theorem bot_def : (⊥ : Setoid α).Rel = (· = ·) :=
rfl
#align setoid.bot_def Setoid.bot_def
+-/
+#print Setoid.eq_top_iff /-
theorem eq_top_iff {s : Setoid α} : s = (⊤ : Setoid α) ↔ ∀ x y : α, s.Rel x y := by
simp [eq_top_iff, Setoid.le_def, Setoid.top_def, Pi.top_apply]
#align setoid.eq_top_iff Setoid.eq_top_iff
+-/
#print Setoid.eqvGen_eq /-
/-- The inductively defined equivalence closure of a binary relation r is the infimum
@@ -257,6 +269,7 @@ theorem eqvGen_eq (r : α → α → Prop) :
#align setoid.eqv_gen_eq Setoid.eqvGen_eq
-/
+#print Setoid.sup_eq_eqvGen /-
/-- The supremum of two equivalence relations r and s is the equivalence closure of the binary
relation `x is related to y by r or s`. -/
theorem sup_eq_eqvGen (r s : Setoid α) : r ⊔ s = EqvGen.Setoid fun x y => r.Rel x y ∨ s.Rel x y :=
@@ -265,13 +278,17 @@ theorem sup_eq_eqvGen (r s : Setoid α) : r ⊔ s = EqvGen.Setoid fun x y => r.R
apply congr_arg Inf
simp only [le_def, or_imp, ← forall_and]
#align setoid.sup_eq_eqv_gen Setoid.sup_eq_eqvGen
+-/
+#print Setoid.sup_def /-
/-- The supremum of 2 equivalence relations r and s is the equivalence closure of the
supremum of the underlying binary operations. -/
theorem sup_def {r s : Setoid α} : r ⊔ s = EqvGen.Setoid (r.Rel ⊔ s.Rel) := by
rw [sup_eq_eqv_gen] <;> rfl
#align setoid.sup_def Setoid.sup_def
+-/
+#print Setoid.sSup_eq_eqvGen /-
/-- The supremum of a set S of equivalence relations is the equivalence closure of the binary
relation `there exists r ∈ S relating x and y`. -/
theorem sSup_eq_eqvGen (S : Set (Setoid α)) :
@@ -283,7 +300,9 @@ theorem sSup_eq_eqvGen (S : Set (Setoid α)) :
ext
exact ⟨fun H x y r hr => H hr, fun H r hr x y => H r hr⟩
#align setoid.Sup_eq_eqv_gen Setoid.sSup_eq_eqvGen
+-/
+#print Setoid.sSup_def /-
/-- The supremum of a set of equivalence relations is the equivalence closure of the
supremum of the set's image under the map to the underlying binary operation. -/
theorem sSup_def {s : Set (Setoid α)} : sSup s = EqvGen.Setoid (sSup (Rel '' s)) :=
@@ -292,6 +311,7 @@ theorem sSup_def {s : Set (Setoid α)} : sSup s = EqvGen.Setoid (sSup (Rel '' s)
congr with (x y)
simp only [iSup_apply, iSup_Prop_eq, exists_prop]
#align setoid.Sup_def Setoid.sSup_def
+-/
#print Setoid.eqvGen_of_setoid /-
/-- The equivalence closure of an equivalence relation r is r. -/
@@ -325,6 +345,7 @@ theorem eqvGen_mono {r s : α → α → Prop} (h : ∀ x y, r x y → s x y) :
#align setoid.eqv_gen_mono Setoid.eqvGen_mono
-/
+#print Setoid.gi /-
/-- There is a Galois insertion of equivalence relations on α into binary relations
on α, with equivalence closure the lower adjoint. -/
def gi : @GaloisInsertion (α → α → Prop) (Setoid α) _ _ EqvGen.Setoid Rel
@@ -334,19 +355,24 @@ def gi : @GaloisInsertion (α → α → Prop) (Setoid α) _ _ EqvGen.Setoid Rel
le_l_u x := (eqvGen_of_setoid x).symm ▸ le_refl x
choice_eq _ _ := rfl
#align setoid.gi Setoid.gi
+-/
open Function
+#print Setoid.injective_iff_ker_bot /-
/-- A function from α to β is injective iff its kernel is the bottom element of the complete lattice
of equivalence relations on α. -/
theorem injective_iff_ker_bot (f : α → β) : Injective f ↔ ker f = ⊥ :=
(@eq_bot_iff (Setoid α) _ _ (ker f)).symm
#align setoid.injective_iff_ker_bot Setoid.injective_iff_ker_bot
+-/
+#print Setoid.ker_iff_mem_preimage /-
/-- The elements related to x ∈ α by the kernel of f are those in the preimage of f(x) under f. -/
theorem ker_iff_mem_preimage {f : α → β} {x y} : (ker f).Rel x y ↔ x ∈ f ⁻¹' {f y} :=
Iff.rfl
#align setoid.ker_iff_mem_preimage Setoid.ker_iff_mem_preimage
+-/
#print Setoid.liftEquiv /-
/-- Equivalence between functions `α → β` such that `r x y → f x = f y` and functions
@@ -360,6 +386,7 @@ def liftEquiv (r : Setoid α) : { f : α → β // r ≤ ker f } ≃ (Quotient r
#align setoid.lift_equiv Setoid.liftEquiv
-/
+#print Setoid.lift_unique /-
/-- The uniqueness part of the universal property for quotients of an arbitrary type. -/
theorem lift_unique {r : Setoid α} {f : α → β} (H : r ≤ ker f) (g : Quotient r → β)
(Hg : f = g ∘ Quotient.mk') : Quotient.lift f H = g :=
@@ -368,13 +395,17 @@ theorem lift_unique {r : Setoid α} {f : α → β} (H : r ≤ ker f) (g : Quoti
erw [Quotient.lift_mk f H, Hg]
rfl
#align setoid.lift_unique Setoid.lift_unique
+-/
+#print Setoid.ker_lift_injective /-
/-- Given a map f from α to β, the natural map from the quotient of α by the kernel of f is
injective. -/
theorem ker_lift_injective (f : α → β) : Injective (@Quotient.lift _ _ (ker f) f fun _ _ h => h) :=
fun x y => Quotient.inductionOn₂' x y fun a b h => Quotient.sound' h
#align setoid.ker_lift_injective Setoid.ker_lift_injective
+-/
+#print Setoid.ker_eq_lift_of_injective /-
/-- Given a map f from α to β, the kernel of f is the unique equivalence relation on α whose
induced map from the quotient of α to β is injective. -/
theorem ker_eq_lift_of_injective {r : Setoid α} (f : α → β) (H : ∀ x y, r.Rel x y → f x = f y)
@@ -384,6 +415,7 @@ theorem ker_eq_lift_of_injective {r : Setoid α} (f : α → β) (H : ∀ x y, r
Quotient.exact <| h <| show Quotient.lift f H ⟦x⟧ = Quotient.lift f H ⟦y⟧ from hk)
H
#align setoid.ker_eq_lift_of_injective Setoid.ker_eq_lift_of_injective
+-/
variable (r : Setoid α) (f : α → β)
@@ -450,11 +482,13 @@ def mapOfSurjective (r) (f : α → β) (h : ker f ≤ r) (hf : Surjective f) :
#align setoid.map_of_surjective Setoid.mapOfSurjective
-/
+#print Setoid.mapOfSurjective_eq_map /-
/-- A special case of the equivalence closure of an equivalence relation r equalling r. -/
theorem mapOfSurjective_eq_map (h : ker f ≤ r) (hf : Surjective f) :
map r f = mapOfSurjective r f h hf := by
rw [← eqv_gen_of_setoid (map_of_surjective r f h hf)] <;> rfl
#align setoid.map_of_surjective_eq_map Setoid.mapOfSurjective_eq_map
+-/
#print Setoid.comap /-
/-- Given a function `f : α → β`, an equivalence relation `r` on `β` induces an equivalence
@@ -547,6 +581,7 @@ def correspondence (r : Setoid α) : { s // r ≤ s } ≃o Setoid (Quotient r)
end Setoid
+#print Quotient.subsingleton_iff /-
@[simp]
theorem Quotient.subsingleton_iff {s : Setoid α} : Subsingleton (Quotient s) ↔ s = ⊤ :=
by
@@ -556,7 +591,9 @@ theorem Quotient.subsingleton_iff {s : Setoid α} : Subsingleton (Quotient s)
refine' (surjective_quotient_mk _).forall.trans (forall_congr' fun b => _)
exact Quotient.eq''
#align quotient.subsingleton_iff Quotient.subsingleton_iff
+-/
+#print Quot.subsingleton_iff /-
theorem Quot.subsingleton_iff (r : α → α → Prop) : Subsingleton (Quot r) ↔ EqvGen r = ⊤ :=
by
simp only [subsingleton_iff, _root_.eq_top_iff, Pi.le_def, Pi.top_apply, forall_const]
@@ -565,4 +602,5 @@ theorem Quot.subsingleton_iff (r : α → α → Prop) : Subsingleton (Quot r)
rw [Quot.eq]
simp only [forall_const, le_Prop_eq]
#align quot.subsingleton_iff Quot.subsingleton_iff
+-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -248,7 +248,7 @@ theorem eq_top_iff {s : Setoid α} : s = (⊤ : Setoid α) ↔ ∀ x y : α, s.R
/-- The inductively defined equivalence closure of a binary relation r is the infimum
of the set of all equivalence relations containing r. -/
theorem eqvGen_eq (r : α → α → Prop) :
- EqvGen.Setoid r = sInf { s : Setoid α | ∀ ⦃x y⦄, r x y → s.Rel x y } :=
+ EqvGen.Setoid r = sInf {s : Setoid α | ∀ ⦃x y⦄, r x y → s.Rel x y} :=
le_antisymm
(fun _ _ H =>
EqvGen.ndrec (fun _ _ h _ hs => hs h) (refl' _) (fun _ _ _ => symm' _)
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -446,7 +446,7 @@ def mapOfSurjective (r) (f : α → β) (h : ker f ≤ r) (hf : Surjective f) :
⟨y, y, hy, hy, r.refl' y⟩,
fun _ _ ⟨x, y, hx, hy, h⟩ => ⟨y, x, hy, hx, r.symm' h⟩,
fun _ _ _ ⟨x, y, hx, hy, h₁⟩ ⟨y', z, hy', hz, h₂⟩ =>
- ⟨x, z, hx, hz, r.trans' h₁ <| r.trans' (h <| by rwa [← hy'] at hy) h₂⟩⟩⟩
+ ⟨x, z, hx, hz, r.trans' h₁ <| r.trans' (h <| by rwa [← hy'] at hy ) h₂⟩⟩⟩
#align setoid.map_of_surjective Setoid.mapOfSurjective
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -154,12 +154,6 @@ theorem ker_apply_mk_out' {f : α → β} (a : α) :
#align setoid.ker_apply_mk_out' Setoid.ker_apply_mk_out'
-/
-/- warning: setoid.ker_def -> Setoid.ker_def is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {x : α} {y : α}, Iff (Setoid.Rel.{u1} α (Setoid.ker.{u1, u2} α β f) x y) (Eq.{succ u2} β (f x) (f y))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {x : α} {y : α}, Iff (Setoid.Rel.{u2} α (Setoid.ker.{u2, u1} α β f) x y) (Eq.{succ u1} β (f x) (f y))
-Case conversion may be inaccurate. Consider using '#align setoid.ker_def Setoid.ker_defₓ'. -/
theorem ker_def {f : α → β} {x y : α} : (ker f).Rel x y ↔ f x = f y :=
Iff.rfl
#align setoid.ker_def Setoid.ker_def
@@ -184,24 +178,12 @@ instance : Inf (Setoid α) :=
⟨fun x => ⟨r.refl' x, s.refl' x⟩, fun _ _ h => ⟨r.symm' h.1, s.symm' h.2⟩, fun _ _ _ h1 h2 =>
⟨r.trans' h1.1 h2.1, s.trans' h1.2 h2.2⟩⟩⟩⟩
-/- warning: setoid.inf_def -> Setoid.inf_def is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {r : Setoid.{succ u1} α} {s : Setoid.{succ u1} α}, Eq.{succ u1} (α -> α -> Prop) (Setoid.Rel.{u1} α (Inf.inf.{u1} (Setoid.{succ u1} α) (Setoid.hasInf.{u1} α) r s)) (Inf.inf.{u1} (α -> α -> Prop) (Pi.hasInf.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.hasInf.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => SemilatticeInf.toHasInf.{0} Prop (Lattice.toSemilatticeInf.{0} Prop (CompleteLattice.toLattice.{0} Prop Prop.completeLattice))))) (Setoid.Rel.{u1} α r) (Setoid.Rel.{u1} α s))
-but is expected to have type
- forall {α : Type.{u1}} {r : Setoid.{succ u1} α} {s : Setoid.{succ u1} α}, Eq.{succ u1} (α -> α -> Prop) (Setoid.Rel.{u1} α (Inf.inf.{u1} (Setoid.{succ u1} α) (Setoid.instInfSetoid.{u1} α) r s)) (Inf.inf.{u1} (α -> α -> Prop) (Pi.instInfForAll.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.instInfForAll.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => Lattice.toInf.{0} Prop (CompleteLattice.toLattice.{0} Prop Prop.completeLattice)))) (Setoid.Rel.{u1} α r) (Setoid.Rel.{u1} α s))
-Case conversion may be inaccurate. Consider using '#align setoid.inf_def Setoid.inf_defₓ'. -/
/-- The infimum of 2 equivalence relations r and s is the same relation as the infimum
of the underlying binary operations. -/
theorem inf_def {r s : Setoid α} : (r ⊓ s).Rel = r.Rel ⊓ s.Rel :=
rfl
#align setoid.inf_def Setoid.inf_def
-/- warning: setoid.inf_iff_and -> Setoid.inf_iff_and is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {r : Setoid.{succ u1} α} {s : Setoid.{succ u1} α} {x : α} {y : α}, Iff (Setoid.Rel.{u1} α (Inf.inf.{u1} (Setoid.{succ u1} α) (Setoid.hasInf.{u1} α) r s) x y) (And (Setoid.Rel.{u1} α r x y) (Setoid.Rel.{u1} α s x y))
-but is expected to have type
- forall {α : Type.{u1}} {r : Setoid.{succ u1} α} {s : Setoid.{succ u1} α} {x : α} {y : α}, Iff (Setoid.Rel.{u1} α (Inf.inf.{u1} (Setoid.{succ u1} α) (Setoid.instInfSetoid.{u1} α) r s) x y) (And (Setoid.Rel.{u1} α r x y) (Setoid.Rel.{u1} α s x y))
-Case conversion may be inaccurate. Consider using '#align setoid.inf_iff_and Setoid.inf_iff_andₓ'. -/
theorem inf_iff_and {r s : Setoid α} {x y} : (r ⊓ s).Rel x y ↔ r.Rel x y ∧ s.Rel x y :=
Iff.rfl
#align setoid.inf_iff_and Setoid.inf_iff_and
@@ -248,34 +230,16 @@ instance completeLattice : CompleteLattice (Setoid α) :=
#align setoid.complete_lattice Setoid.completeLattice
-/
-/- warning: setoid.top_def -> Setoid.top_def is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}}, Eq.{succ u1} (α -> α -> Prop) (Setoid.Rel.{u1} α (Top.top.{u1} (Setoid.{succ u1} α) (CompleteLattice.toHasTop.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)))) (Top.top.{u1} (α -> α -> Prop) (Pi.hasTop.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.hasTop.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteLattice.toHasTop.{0} Prop Prop.completeLattice))))
-but is expected to have type
- forall {α : Type.{u1}}, Eq.{succ u1} (α -> α -> Prop) (Setoid.Rel.{u1} α (Top.top.{u1} (Setoid.{succ u1} α) (CompleteLattice.toTop.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)))) (Top.top.{u1} (α -> α -> Prop) (Pi.instTopForAll.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.instTopForAll.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteLattice.toTop.{0} Prop Prop.completeLattice))))
-Case conversion may be inaccurate. Consider using '#align setoid.top_def Setoid.top_defₓ'. -/
@[simp]
theorem top_def : (⊤ : Setoid α).Rel = ⊤ :=
rfl
#align setoid.top_def Setoid.top_def
-/- warning: setoid.bot_def -> Setoid.bot_def is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}}, Eq.{succ u1} (α -> α -> Prop) (Setoid.Rel.{u1} α (Bot.bot.{u1} (Setoid.{succ u1} α) (CompleteLattice.toHasBot.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)))) (Eq.{succ u1} α)
-but is expected to have type
- forall {α : Type.{u1}}, Eq.{succ u1} (α -> α -> Prop) (Setoid.Rel.{u1} α (Bot.bot.{u1} (Setoid.{succ u1} α) (CompleteLattice.toBot.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)))) (fun (x._@.Mathlib.Data.Setoid.Basic._hyg.1211 : α) (x._@.Mathlib.Data.Setoid.Basic._hyg.1213 : α) => Eq.{succ u1} α x._@.Mathlib.Data.Setoid.Basic._hyg.1211 x._@.Mathlib.Data.Setoid.Basic._hyg.1213)
-Case conversion may be inaccurate. Consider using '#align setoid.bot_def Setoid.bot_defₓ'. -/
@[simp]
theorem bot_def : (⊥ : Setoid α).Rel = (· = ·) :=
rfl
#align setoid.bot_def Setoid.bot_def
-/- warning: setoid.eq_top_iff -> Setoid.eq_top_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {s : Setoid.{succ u1} α}, Iff (Eq.{succ u1} (Setoid.{succ u1} α) s (Top.top.{u1} (Setoid.{succ u1} α) (CompleteLattice.toHasTop.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)))) (forall (x : α) (y : α), Setoid.Rel.{u1} α s x y)
-but is expected to have type
- forall {α : Type.{u1}} {s : Setoid.{succ u1} α}, Iff (Eq.{succ u1} (Setoid.{succ u1} α) s (Top.top.{u1} (Setoid.{succ u1} α) (CompleteLattice.toTop.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)))) (forall (x : α) (y : α), Setoid.Rel.{u1} α s x y)
-Case conversion may be inaccurate. Consider using '#align setoid.eq_top_iff Setoid.eq_top_iffₓ'. -/
theorem eq_top_iff {s : Setoid α} : s = (⊤ : Setoid α) ↔ ∀ x y : α, s.Rel x y := by
simp [eq_top_iff, Setoid.le_def, Setoid.top_def, Pi.top_apply]
#align setoid.eq_top_iff Setoid.eq_top_iff
@@ -293,12 +257,6 @@ theorem eqvGen_eq (r : α → α → Prop) :
#align setoid.eqv_gen_eq Setoid.eqvGen_eq
-/
-/- warning: setoid.sup_eq_eqv_gen -> Setoid.sup_eq_eqvGen is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} (r : Setoid.{succ u1} α) (s : Setoid.{succ u1} α), Eq.{succ u1} (Setoid.{succ u1} α) (Sup.sup.{u1} (Setoid.{succ u1} α) (SemilatticeSup.toHasSup.{u1} (Setoid.{succ u1} α) (Lattice.toSemilatticeSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toLattice.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)))) r s) (EqvGen.Setoid.{u1} α (fun (x : α) (y : α) => Or (Setoid.Rel.{u1} α r x y) (Setoid.Rel.{u1} α s x y)))
-but is expected to have type
- forall {α : Type.{u1}} (r : Setoid.{succ u1} α) (s : Setoid.{succ u1} α), Eq.{succ u1} (Setoid.{succ u1} α) (Sup.sup.{u1} (Setoid.{succ u1} α) (SemilatticeSup.toSup.{u1} (Setoid.{succ u1} α) (Lattice.toSemilatticeSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toLattice.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)))) r s) (EqvGen.Setoid.{u1} α (fun (x : α) (y : α) => Or (Setoid.Rel.{u1} α r x y) (Setoid.Rel.{u1} α s x y)))
-Case conversion may be inaccurate. Consider using '#align setoid.sup_eq_eqv_gen Setoid.sup_eq_eqvGenₓ'. -/
/-- The supremum of two equivalence relations r and s is the equivalence closure of the binary
relation `x is related to y by r or s`. -/
theorem sup_eq_eqvGen (r s : Setoid α) : r ⊔ s = EqvGen.Setoid fun x y => r.Rel x y ∨ s.Rel x y :=
@@ -308,24 +266,12 @@ theorem sup_eq_eqvGen (r s : Setoid α) : r ⊔ s = EqvGen.Setoid fun x y => r.R
simp only [le_def, or_imp, ← forall_and]
#align setoid.sup_eq_eqv_gen Setoid.sup_eq_eqvGen
-/- warning: setoid.sup_def -> Setoid.sup_def is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {r : Setoid.{succ u1} α} {s : Setoid.{succ u1} α}, Eq.{succ u1} (Setoid.{succ u1} α) (Sup.sup.{u1} (Setoid.{succ u1} α) (SemilatticeSup.toHasSup.{u1} (Setoid.{succ u1} α) (Lattice.toSemilatticeSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toLattice.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)))) r s) (EqvGen.Setoid.{u1} α (Sup.sup.{u1} (α -> α -> Prop) (Pi.hasSup.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.hasSup.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => SemilatticeSup.toHasSup.{0} Prop (Lattice.toSemilatticeSup.{0} Prop (CompleteLattice.toLattice.{0} Prop Prop.completeLattice))))) (Setoid.Rel.{u1} α r) (Setoid.Rel.{u1} α s)))
-but is expected to have type
- forall {α : Type.{u1}} {r : Setoid.{succ u1} α} {s : Setoid.{succ u1} α}, Eq.{succ u1} (Setoid.{succ u1} α) (Sup.sup.{u1} (Setoid.{succ u1} α) (SemilatticeSup.toSup.{u1} (Setoid.{succ u1} α) (Lattice.toSemilatticeSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toLattice.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)))) r s) (EqvGen.Setoid.{u1} α (Sup.sup.{u1} (α -> α -> Prop) (Pi.instSupForAll.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.instSupForAll.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => SemilatticeSup.toSup.{0} Prop (Lattice.toSemilatticeSup.{0} Prop (CompleteLattice.toLattice.{0} Prop Prop.completeLattice))))) (Setoid.Rel.{u1} α r) (Setoid.Rel.{u1} α s)))
-Case conversion may be inaccurate. Consider using '#align setoid.sup_def Setoid.sup_defₓ'. -/
/-- The supremum of 2 equivalence relations r and s is the equivalence closure of the
supremum of the underlying binary operations. -/
theorem sup_def {r s : Setoid α} : r ⊔ s = EqvGen.Setoid (r.Rel ⊔ s.Rel) := by
rw [sup_eq_eqv_gen] <;> rfl
#align setoid.sup_def Setoid.sup_def
-/- warning: setoid.Sup_eq_eqv_gen -> Setoid.sSup_eq_eqvGen is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} (S : Set.{u1} (Setoid.{succ u1} α)), Eq.{succ u1} (Setoid.{succ u1} α) (SupSet.sSup.{u1} (Setoid.{succ u1} α) (CompleteSemilatticeSup.toHasSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toCompleteSemilatticeSup.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α))) S) (EqvGen.Setoid.{u1} α (fun (x : α) (y : α) => Exists.{succ u1} (Setoid.{succ u1} α) (fun (r : Setoid.{succ u1} α) => And (Membership.Mem.{u1, u1} (Setoid.{succ u1} α) (Set.{u1} (Setoid.{succ u1} α)) (Set.hasMem.{u1} (Setoid.{succ u1} α)) r S) (Setoid.Rel.{u1} α r x y))))
-but is expected to have type
- forall {α : Type.{u1}} (S : Set.{u1} (Setoid.{succ u1} α)), Eq.{succ u1} (Setoid.{succ u1} α) (SupSet.sSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toSupSet.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)) S) (EqvGen.Setoid.{u1} α (fun (x : α) (y : α) => Exists.{succ u1} (Setoid.{succ u1} α) (fun (r : Setoid.{succ u1} α) => And (Membership.mem.{u1, u1} (Setoid.{succ u1} α) (Set.{u1} (Setoid.{succ u1} α)) (Set.instMembershipSet.{u1} (Setoid.{succ u1} α)) r S) (Setoid.Rel.{u1} α r x y))))
-Case conversion may be inaccurate. Consider using '#align setoid.Sup_eq_eqv_gen Setoid.sSup_eq_eqvGenₓ'. -/
/-- The supremum of a set S of equivalence relations is the equivalence closure of the binary
relation `there exists r ∈ S relating x and y`. -/
theorem sSup_eq_eqvGen (S : Set (Setoid α)) :
@@ -338,12 +284,6 @@ theorem sSup_eq_eqvGen (S : Set (Setoid α)) :
exact ⟨fun H x y r hr => H hr, fun H r hr x y => H r hr⟩
#align setoid.Sup_eq_eqv_gen Setoid.sSup_eq_eqvGen
-/- warning: setoid.Sup_def -> Setoid.sSup_def is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {s : Set.{u1} (Setoid.{succ u1} α)}, Eq.{succ u1} (Setoid.{succ u1} α) (SupSet.sSup.{u1} (Setoid.{succ u1} α) (CompleteSemilatticeSup.toHasSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toCompleteSemilatticeSup.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α))) s) (EqvGen.Setoid.{u1} α (SupSet.sSup.{u1} (α -> α -> Prop) (Pi.supSet.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.supSet.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteSemilatticeSup.toHasSup.{0} Prop (CompleteLattice.toCompleteSemilatticeSup.{0} Prop Prop.completeLattice)))) (Set.image.{u1, u1} (Setoid.{succ u1} α) (α -> α -> Prop) (Setoid.Rel.{u1} α) s)))
-but is expected to have type
- forall {α : Type.{u1}} {s : Set.{u1} (Setoid.{succ u1} α)}, Eq.{succ u1} (Setoid.{succ u1} α) (SupSet.sSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toSupSet.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)) s) (EqvGen.Setoid.{u1} α (SupSet.sSup.{u1} (α -> α -> Prop) (Pi.supSet.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.supSet.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteLattice.toSupSet.{0} Prop Prop.completeLattice))) (Set.image.{u1, u1} (Setoid.{succ u1} α) (α -> α -> Prop) (Setoid.Rel.{u1} α) s)))
-Case conversion may be inaccurate. Consider using '#align setoid.Sup_def Setoid.sSup_defₓ'. -/
/-- The supremum of a set of equivalence relations is the equivalence closure of the
supremum of the set's image under the map to the underlying binary operation. -/
theorem sSup_def {s : Set (Setoid α)} : sSup s = EqvGen.Setoid (sSup (Rel '' s)) :=
@@ -385,12 +325,6 @@ theorem eqvGen_mono {r s : α → α → Prop} (h : ∀ x y, r x y → s x y) :
#align setoid.eqv_gen_mono Setoid.eqvGen_mono
-/
-/- warning: setoid.gi -> Setoid.gi is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}}, GaloisInsertion.{u1, u1} (α -> α -> Prop) (Setoid.{succ u1} α) (Pi.preorder.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.preorder.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => PartialOrder.toPreorder.{0} Prop Prop.partialOrder))) (PartialOrder.toPreorder.{u1} (Setoid.{succ u1} α) (Setoid.partialOrder.{u1} α)) (EqvGen.Setoid.{u1} α) (Setoid.Rel.{u1} α)
-but is expected to have type
- forall {α : Type.{u1}}, GaloisInsertion.{u1, u1} (α -> α -> Prop) (Setoid.{succ u1} α) (Pi.preorder.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.preorder.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => PartialOrder.toPreorder.{0} Prop Prop.partialOrder))) (PartialOrder.toPreorder.{u1} (Setoid.{succ u1} α) (Setoid.instPartialOrderSetoid.{u1} α)) (EqvGen.Setoid.{u1} α) (Setoid.Rel.{u1} α)
-Case conversion may be inaccurate. Consider using '#align setoid.gi Setoid.giₓ'. -/
/-- There is a Galois insertion of equivalence relations on α into binary relations
on α, with equivalence closure the lower adjoint. -/
def gi : @GaloisInsertion (α → α → Prop) (Setoid α) _ _ EqvGen.Setoid Rel
@@ -403,24 +337,12 @@ def gi : @GaloisInsertion (α → α → Prop) (Setoid α) _ _ EqvGen.Setoid Rel
open Function
-/- warning: setoid.injective_iff_ker_bot -> Setoid.injective_iff_ker_bot is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β), Iff (Function.Injective.{succ u1, succ u2} α β f) (Eq.{succ u1} (Setoid.{succ u1} α) (Setoid.ker.{u1, u2} α β f) (Bot.bot.{u1} (Setoid.{succ u1} α) (CompleteLattice.toHasBot.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α))))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β), Iff (Function.Injective.{succ u2, succ u1} α β f) (Eq.{succ u2} (Setoid.{succ u2} α) (Setoid.ker.{u2, u1} α β f) (Bot.bot.{u2} (Setoid.{succ u2} α) (CompleteLattice.toBot.{u2} (Setoid.{succ u2} α) (Setoid.completeLattice.{u2} α))))
-Case conversion may be inaccurate. Consider using '#align setoid.injective_iff_ker_bot Setoid.injective_iff_ker_botₓ'. -/
/-- A function from α to β is injective iff its kernel is the bottom element of the complete lattice
of equivalence relations on α. -/
theorem injective_iff_ker_bot (f : α → β) : Injective f ↔ ker f = ⊥ :=
(@eq_bot_iff (Setoid α) _ _ (ker f)).symm
#align setoid.injective_iff_ker_bot Setoid.injective_iff_ker_bot
-/- warning: setoid.ker_iff_mem_preimage -> Setoid.ker_iff_mem_preimage is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {f : α -> β} {x : α} {y : α}, Iff (Setoid.Rel.{u1} α (Setoid.ker.{u1, u2} α β f) x y) (Membership.Mem.{u1, u1} α (Set.{u1} α) (Set.hasMem.{u1} α) x (Set.preimage.{u1, u2} α β f (Singleton.singleton.{u2, u2} β (Set.{u2} β) (Set.hasSingleton.{u2} β) (f y))))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {f : α -> β} {x : α} {y : α}, Iff (Setoid.Rel.{u2} α (Setoid.ker.{u2, u1} α β f) x y) (Membership.mem.{u2, u2} α (Set.{u2} α) (Set.instMembershipSet.{u2} α) x (Set.preimage.{u2, u1} α β f (Singleton.singleton.{u1, u1} β (Set.{u1} β) (Set.instSingletonSet.{u1} β) (f y))))
-Case conversion may be inaccurate. Consider using '#align setoid.ker_iff_mem_preimage Setoid.ker_iff_mem_preimageₓ'. -/
/-- The elements related to x ∈ α by the kernel of f are those in the preimage of f(x) under f. -/
theorem ker_iff_mem_preimage {f : α → β} {x y} : (ker f).Rel x y ↔ x ∈ f ⁻¹' {f y} :=
Iff.rfl
@@ -438,12 +360,6 @@ def liftEquiv (r : Setoid α) : { f : α → β // r ≤ ker f } ≃ (Quotient r
#align setoid.lift_equiv Setoid.liftEquiv
-/
-/- warning: setoid.lift_unique -> Setoid.lift_unique is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {r : Setoid.{succ u1} α} {f : α -> β} (H : LE.le.{u1} (Setoid.{succ u1} α) (Setoid.hasLe.{u1} α) r (Setoid.ker.{u1, u2} α β f)) (g : (Quotient.{succ u1} α r) -> β), (Eq.{max (succ u1) (succ u2)} (α -> β) f (Function.comp.{succ u1, succ u1, succ u2} α (Quotient.{succ u1} α r) β g (Quotient.mk'.{succ u1} α r))) -> (Eq.{max (succ u1) (succ u2)} ((Quotient.{succ u1} α r) -> β) (Quotient.lift.{succ u1, succ u2} α β r f H) g)
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {r : Setoid.{succ u2} α} {f : α -> β} (H : LE.le.{u2} (Setoid.{succ u2} α) (Setoid.instLESetoid.{u2} α) r (Setoid.ker.{u2, u1} α β f)) (g : (Quotient.{succ u2} α r) -> β), (Eq.{max (succ u2) (succ u1)} (α -> β) f (Function.comp.{succ u2, succ u2, succ u1} α (Quotient.{succ u2} α r) β g (Quotient.mk''.{succ u2} α r))) -> (Eq.{max (succ u2) (succ u1)} ((Quotient.{succ u2} α r) -> β) (Quotient.lift.{succ u2, succ u1} α β r f H) g)
-Case conversion may be inaccurate. Consider using '#align setoid.lift_unique Setoid.lift_uniqueₓ'. -/
/-- The uniqueness part of the universal property for quotients of an arbitrary type. -/
theorem lift_unique {r : Setoid α} {f : α → β} (H : r ≤ ker f) (g : Quotient r → β)
(Hg : f = g ∘ Quotient.mk') : Quotient.lift f H = g :=
@@ -453,24 +369,12 @@ theorem lift_unique {r : Setoid α} {f : α → β} (H : r ≤ ker f) (g : Quoti
rfl
#align setoid.lift_unique Setoid.lift_unique
-/- warning: setoid.ker_lift_injective -> Setoid.ker_lift_injective is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} (f : α -> β), Function.Injective.{succ u1, succ u2} (Quotient.{succ u1} α (Setoid.ker.{u1, u2} α β f)) β (Quotient.lift.{succ u1, succ u2} α β (Setoid.ker.{u1, u2} α β f) f (fun (_x : α) (_x_1 : α) (h : HasEquivₓ.Equiv.{succ u1} α (setoidHasEquiv.{succ u1} α (Setoid.ker.{u1, u2} α β f)) _x _x_1) => h))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} (f : α -> β), Function.Injective.{succ u2, succ u1} (Quotient.{succ u2} α (Setoid.ker.{u2, u1} α β f)) β (Quotient.lift.{succ u2, succ u1} α β (Setoid.ker.{u2, u1} α β f) f (fun (_x : α) (_x_1 : α) (h : HasEquiv.Equiv.{succ u2, 0} α (instHasEquiv.{succ u2} α (Setoid.ker.{u2, u1} α β f)) _x _x_1) => h))
-Case conversion may be inaccurate. Consider using '#align setoid.ker_lift_injective Setoid.ker_lift_injectiveₓ'. -/
/-- Given a map f from α to β, the natural map from the quotient of α by the kernel of f is
injective. -/
theorem ker_lift_injective (f : α → β) : Injective (@Quotient.lift _ _ (ker f) f fun _ _ h => h) :=
fun x y => Quotient.inductionOn₂' x y fun a b h => Quotient.sound' h
#align setoid.ker_lift_injective Setoid.ker_lift_injective
-/- warning: setoid.ker_eq_lift_of_injective -> Setoid.ker_eq_lift_of_injective is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {r : Setoid.{succ u1} α} (f : α -> β) (H : forall (x : α) (y : α), (Setoid.Rel.{u1} α r x y) -> (Eq.{succ u2} β (f x) (f y))), (Function.Injective.{succ u1, succ u2} (Quotient.{succ u1} α r) β (Quotient.lift.{succ u1, succ u2} α β r f H)) -> (Eq.{succ u1} (Setoid.{succ u1} α) (Setoid.ker.{u1, u2} α β f) r)
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {r : Setoid.{succ u2} α} (f : α -> β) (H : forall (x : α) (y : α), (Setoid.Rel.{u2} α r x y) -> (Eq.{succ u1} β (f x) (f y))), (Function.Injective.{succ u2, succ u1} (Quotient.{succ u2} α r) β (Quotient.lift.{succ u2, succ u1} α β r f H)) -> (Eq.{succ u2} (Setoid.{succ u2} α) (Setoid.ker.{u2, u1} α β f) r)
-Case conversion may be inaccurate. Consider using '#align setoid.ker_eq_lift_of_injective Setoid.ker_eq_lift_of_injectiveₓ'. -/
/-- Given a map f from α to β, the kernel of f is the unique equivalence relation on α whose
induced map from the quotient of α to β is injective. -/
theorem ker_eq_lift_of_injective {r : Setoid α} (f : α → β) (H : ∀ x y, r.Rel x y → f x = f y)
@@ -546,12 +450,6 @@ def mapOfSurjective (r) (f : α → β) (h : ker f ≤ r) (hf : Surjective f) :
#align setoid.map_of_surjective Setoid.mapOfSurjective
-/
-/- warning: setoid.map_of_surjective_eq_map -> Setoid.mapOfSurjective_eq_map is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {r : Setoid.{succ u1} α} {f : α -> β} (h : LE.le.{u1} (Setoid.{succ u1} α) (Setoid.hasLe.{u1} α) (Setoid.ker.{u1, u2} α β f) r) (hf : Function.Surjective.{succ u1, succ u2} α β f), Eq.{succ u2} (Setoid.{succ u2} β) (Setoid.map.{u1, u2} α β r f) (Setoid.mapOfSurjective.{u1, u2} α β r f h hf)
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {r : Setoid.{succ u2} α} {f : α -> β} (h : LE.le.{u2} (Setoid.{succ u2} α) (Setoid.instLESetoid.{u2} α) (Setoid.ker.{u2, u1} α β f) r) (hf : Function.Surjective.{succ u2, succ u1} α β f), Eq.{succ u1} (Setoid.{succ u1} β) (Setoid.map.{u2, u1} α β r f) (Setoid.mapOfSurjective.{u2, u1} α β r f h hf)
-Case conversion may be inaccurate. Consider using '#align setoid.map_of_surjective_eq_map Setoid.mapOfSurjective_eq_mapₓ'. -/
/-- A special case of the equivalence closure of an equivalence relation r equalling r. -/
theorem mapOfSurjective_eq_map (h : ker f ≤ r) (hf : Surjective f) :
map r f = mapOfSurjective r f h hf := by
@@ -649,12 +547,6 @@ def correspondence (r : Setoid α) : { s // r ≤ s } ≃o Setoid (Quotient r)
end Setoid
-/- warning: quotient.subsingleton_iff -> Quotient.subsingleton_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {s : Setoid.{succ u1} α}, Iff (Subsingleton.{succ u1} (Quotient.{succ u1} α s)) (Eq.{succ u1} (Setoid.{succ u1} α) s (Top.top.{u1} (Setoid.{succ u1} α) (CompleteLattice.toHasTop.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α))))
-but is expected to have type
- forall {α : Type.{u1}} {s : Setoid.{succ u1} α}, Iff (Subsingleton.{succ u1} (Quotient.{succ u1} α s)) (Eq.{succ u1} (Setoid.{succ u1} α) s (Top.top.{u1} (Setoid.{succ u1} α) (CompleteLattice.toTop.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α))))
-Case conversion may be inaccurate. Consider using '#align quotient.subsingleton_iff Quotient.subsingleton_iffₓ'. -/
@[simp]
theorem Quotient.subsingleton_iff {s : Setoid α} : Subsingleton (Quotient s) ↔ s = ⊤ :=
by
@@ -665,12 +557,6 @@ theorem Quotient.subsingleton_iff {s : Setoid α} : Subsingleton (Quotient s)
exact Quotient.eq''
#align quotient.subsingleton_iff Quotient.subsingleton_iff
-/- warning: quot.subsingleton_iff -> Quot.subsingleton_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} (r : α -> α -> Prop), Iff (Subsingleton.{succ u1} (Quot.{succ u1} α r)) (Eq.{succ u1} (α -> α -> Prop) (EqvGen.{u1} α r) (Top.top.{u1} (α -> α -> Prop) (Pi.hasTop.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.hasTop.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteLattice.toHasTop.{0} Prop Prop.completeLattice)))))
-but is expected to have type
- forall {α : Type.{u1}} (r : α -> α -> Prop), Iff (Subsingleton.{succ u1} (Quot.{succ u1} α r)) (Eq.{succ u1} (α -> α -> Prop) (EqvGen.{u1} α r) (Top.top.{u1} (α -> α -> Prop) (Pi.instTopForAll.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.instTopForAll.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteLattice.toTop.{0} Prop Prop.completeLattice)))))
-Case conversion may be inaccurate. Consider using '#align quot.subsingleton_iff Quot.subsingleton_iffₓ'. -/
theorem Quot.subsingleton_iff (r : α → α → Prop) : Subsingleton (Quot r) ↔ EqvGen r = ⊤ :=
by
simp only [subsingleton_iff, _root_.eq_top_iff, Pi.le_def, Pi.top_apply, forall_const]
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -216,11 +216,8 @@ instance : InfSet (Setoid α) :=
#print Setoid.sInf_def /-
/-- The underlying binary operation of the infimum of a set of equivalence relations
is the infimum of the set's image under the map to the underlying binary operation. -/
-theorem sInf_def {s : Set (Setoid α)} : (sInf s).Rel = sInf (Rel '' s) :=
- by
- ext
- simp only [sInf_image, iInf_apply, iInf_Prop_eq]
- rfl
+theorem sInf_def {s : Set (Setoid α)} : (sInf s).Rel = sInf (Rel '' s) := by ext;
+ simp only [sInf_image, iInf_apply, iInf_Prop_eq]; rfl
#align setoid.Inf_def Setoid.sInf_def
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -213,15 +213,15 @@ instance : InfSet (Setoid α) :=
⟨fun x r hr => r.refl' x, fun _ _ h r hr => r.symm' <| h r hr, fun _ _ _ h1 h2 r hr =>
r.trans' (h1 r hr) <| h2 r hr⟩⟩⟩
-#print Setoid.infₛ_def /-
+#print Setoid.sInf_def /-
/-- The underlying binary operation of the infimum of a set of equivalence relations
is the infimum of the set's image under the map to the underlying binary operation. -/
-theorem infₛ_def {s : Set (Setoid α)} : (infₛ s).Rel = infₛ (Rel '' s) :=
+theorem sInf_def {s : Set (Setoid α)} : (sInf s).Rel = sInf (Rel '' s) :=
by
ext
- simp only [infₛ_image, infᵢ_apply, infᵢ_Prop_eq]
+ simp only [sInf_image, iInf_apply, iInf_Prop_eq]
rfl
-#align setoid.Inf_def Setoid.infₛ_def
+#align setoid.Inf_def Setoid.sInf_def
-/
instance : PartialOrder (Setoid α) where
@@ -287,12 +287,12 @@ theorem eq_top_iff {s : Setoid α} : s = (⊤ : Setoid α) ↔ ∀ x y : α, s.R
/-- The inductively defined equivalence closure of a binary relation r is the infimum
of the set of all equivalence relations containing r. -/
theorem eqvGen_eq (r : α → α → Prop) :
- EqvGen.Setoid r = infₛ { s : Setoid α | ∀ ⦃x y⦄, r x y → s.Rel x y } :=
+ EqvGen.Setoid r = sInf { s : Setoid α | ∀ ⦃x y⦄, r x y → s.Rel x y } :=
le_antisymm
(fun _ _ H =>
EqvGen.ndrec (fun _ _ h _ hs => hs h) (refl' _) (fun _ _ _ => symm' _)
(fun _ _ _ _ _ => trans' _) H)
- (infₛ_le fun _ _ h => EqvGen.rel _ _ h)
+ (sInf_le fun _ _ h => EqvGen.rel _ _ h)
#align setoid.eqv_gen_eq Setoid.eqvGen_eq
-/
@@ -323,44 +323,44 @@ theorem sup_def {r s : Setoid α} : r ⊔ s = EqvGen.Setoid (r.Rel ⊔ s.Rel) :=
rw [sup_eq_eqv_gen] <;> rfl
#align setoid.sup_def Setoid.sup_def
-/- warning: setoid.Sup_eq_eqv_gen -> Setoid.supₛ_eq_eqvGen is a dubious translation:
+/- warning: setoid.Sup_eq_eqv_gen -> Setoid.sSup_eq_eqvGen is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} (S : Set.{u1} (Setoid.{succ u1} α)), Eq.{succ u1} (Setoid.{succ u1} α) (SupSet.supₛ.{u1} (Setoid.{succ u1} α) (CompleteSemilatticeSup.toHasSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toCompleteSemilatticeSup.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α))) S) (EqvGen.Setoid.{u1} α (fun (x : α) (y : α) => Exists.{succ u1} (Setoid.{succ u1} α) (fun (r : Setoid.{succ u1} α) => And (Membership.Mem.{u1, u1} (Setoid.{succ u1} α) (Set.{u1} (Setoid.{succ u1} α)) (Set.hasMem.{u1} (Setoid.{succ u1} α)) r S) (Setoid.Rel.{u1} α r x y))))
+ forall {α : Type.{u1}} (S : Set.{u1} (Setoid.{succ u1} α)), Eq.{succ u1} (Setoid.{succ u1} α) (SupSet.sSup.{u1} (Setoid.{succ u1} α) (CompleteSemilatticeSup.toHasSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toCompleteSemilatticeSup.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α))) S) (EqvGen.Setoid.{u1} α (fun (x : α) (y : α) => Exists.{succ u1} (Setoid.{succ u1} α) (fun (r : Setoid.{succ u1} α) => And (Membership.Mem.{u1, u1} (Setoid.{succ u1} α) (Set.{u1} (Setoid.{succ u1} α)) (Set.hasMem.{u1} (Setoid.{succ u1} α)) r S) (Setoid.Rel.{u1} α r x y))))
but is expected to have type
- forall {α : Type.{u1}} (S : Set.{u1} (Setoid.{succ u1} α)), Eq.{succ u1} (Setoid.{succ u1} α) (SupSet.supₛ.{u1} (Setoid.{succ u1} α) (CompleteLattice.toSupSet.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)) S) (EqvGen.Setoid.{u1} α (fun (x : α) (y : α) => Exists.{succ u1} (Setoid.{succ u1} α) (fun (r : Setoid.{succ u1} α) => And (Membership.mem.{u1, u1} (Setoid.{succ u1} α) (Set.{u1} (Setoid.{succ u1} α)) (Set.instMembershipSet.{u1} (Setoid.{succ u1} α)) r S) (Setoid.Rel.{u1} α r x y))))
-Case conversion may be inaccurate. Consider using '#align setoid.Sup_eq_eqv_gen Setoid.supₛ_eq_eqvGenₓ'. -/
+ forall {α : Type.{u1}} (S : Set.{u1} (Setoid.{succ u1} α)), Eq.{succ u1} (Setoid.{succ u1} α) (SupSet.sSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toSupSet.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)) S) (EqvGen.Setoid.{u1} α (fun (x : α) (y : α) => Exists.{succ u1} (Setoid.{succ u1} α) (fun (r : Setoid.{succ u1} α) => And (Membership.mem.{u1, u1} (Setoid.{succ u1} α) (Set.{u1} (Setoid.{succ u1} α)) (Set.instMembershipSet.{u1} (Setoid.{succ u1} α)) r S) (Setoid.Rel.{u1} α r x y))))
+Case conversion may be inaccurate. Consider using '#align setoid.Sup_eq_eqv_gen Setoid.sSup_eq_eqvGenₓ'. -/
/-- The supremum of a set S of equivalence relations is the equivalence closure of the binary
relation `there exists r ∈ S relating x and y`. -/
-theorem supₛ_eq_eqvGen (S : Set (Setoid α)) :
- supₛ S = EqvGen.Setoid fun x y => ∃ r : Setoid α, r ∈ S ∧ r.Rel x y :=
+theorem sSup_eq_eqvGen (S : Set (Setoid α)) :
+ sSup S = EqvGen.Setoid fun x y => ∃ r : Setoid α, r ∈ S ∧ r.Rel x y :=
by
rw [eqv_gen_eq]
apply congr_arg Inf
simp only [upperBounds, le_def, and_imp, exists_imp]
ext
exact ⟨fun H x y r hr => H hr, fun H r hr x y => H r hr⟩
-#align setoid.Sup_eq_eqv_gen Setoid.supₛ_eq_eqvGen
+#align setoid.Sup_eq_eqv_gen Setoid.sSup_eq_eqvGen
-/- warning: setoid.Sup_def -> Setoid.supₛ_def is a dubious translation:
+/- warning: setoid.Sup_def -> Setoid.sSup_def is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {s : Set.{u1} (Setoid.{succ u1} α)}, Eq.{succ u1} (Setoid.{succ u1} α) (SupSet.supₛ.{u1} (Setoid.{succ u1} α) (CompleteSemilatticeSup.toHasSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toCompleteSemilatticeSup.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α))) s) (EqvGen.Setoid.{u1} α (SupSet.supₛ.{u1} (α -> α -> Prop) (Pi.supSet.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.supSet.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteSemilatticeSup.toHasSup.{0} Prop (CompleteLattice.toCompleteSemilatticeSup.{0} Prop Prop.completeLattice)))) (Set.image.{u1, u1} (Setoid.{succ u1} α) (α -> α -> Prop) (Setoid.Rel.{u1} α) s)))
+ forall {α : Type.{u1}} {s : Set.{u1} (Setoid.{succ u1} α)}, Eq.{succ u1} (Setoid.{succ u1} α) (SupSet.sSup.{u1} (Setoid.{succ u1} α) (CompleteSemilatticeSup.toHasSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toCompleteSemilatticeSup.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α))) s) (EqvGen.Setoid.{u1} α (SupSet.sSup.{u1} (α -> α -> Prop) (Pi.supSet.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.supSet.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteSemilatticeSup.toHasSup.{0} Prop (CompleteLattice.toCompleteSemilatticeSup.{0} Prop Prop.completeLattice)))) (Set.image.{u1, u1} (Setoid.{succ u1} α) (α -> α -> Prop) (Setoid.Rel.{u1} α) s)))
but is expected to have type
- forall {α : Type.{u1}} {s : Set.{u1} (Setoid.{succ u1} α)}, Eq.{succ u1} (Setoid.{succ u1} α) (SupSet.supₛ.{u1} (Setoid.{succ u1} α) (CompleteLattice.toSupSet.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)) s) (EqvGen.Setoid.{u1} α (SupSet.supₛ.{u1} (α -> α -> Prop) (Pi.supSet.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.supSet.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteLattice.toSupSet.{0} Prop Prop.completeLattice))) (Set.image.{u1, u1} (Setoid.{succ u1} α) (α -> α -> Prop) (Setoid.Rel.{u1} α) s)))
-Case conversion may be inaccurate. Consider using '#align setoid.Sup_def Setoid.supₛ_defₓ'. -/
+ forall {α : Type.{u1}} {s : Set.{u1} (Setoid.{succ u1} α)}, Eq.{succ u1} (Setoid.{succ u1} α) (SupSet.sSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toSupSet.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)) s) (EqvGen.Setoid.{u1} α (SupSet.sSup.{u1} (α -> α -> Prop) (Pi.supSet.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.supSet.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => CompleteLattice.toSupSet.{0} Prop Prop.completeLattice))) (Set.image.{u1, u1} (Setoid.{succ u1} α) (α -> α -> Prop) (Setoid.Rel.{u1} α) s)))
+Case conversion may be inaccurate. Consider using '#align setoid.Sup_def Setoid.sSup_defₓ'. -/
/-- The supremum of a set of equivalence relations is the equivalence closure of the
supremum of the set's image under the map to the underlying binary operation. -/
-theorem supₛ_def {s : Set (Setoid α)} : supₛ s = EqvGen.Setoid (supₛ (Rel '' s)) :=
+theorem sSup_def {s : Set (Setoid α)} : sSup s = EqvGen.Setoid (sSup (Rel '' s)) :=
by
- rw [Sup_eq_eqv_gen, supₛ_image]
+ rw [Sup_eq_eqv_gen, sSup_image]
congr with (x y)
- simp only [supᵢ_apply, supᵢ_Prop_eq, exists_prop]
-#align setoid.Sup_def Setoid.supₛ_def
+ simp only [iSup_apply, iSup_Prop_eq, exists_prop]
+#align setoid.Sup_def Setoid.sSup_def
#print Setoid.eqvGen_of_setoid /-
/-- The equivalence closure of an equivalence relation r is r. -/
@[simp]
theorem eqvGen_of_setoid (r : Setoid α) : EqvGen.Setoid r.R = r :=
- le_antisymm (by rw [eqv_gen_eq] <;> exact infₛ_le fun _ _ => id) EqvGen.rel
+ le_antisymm (by rw [eqv_gen_eq] <;> exact sInf_le fun _ _ => id) EqvGen.rel
#align setoid.eqv_gen_of_setoid Setoid.eqvGen_of_setoid
-/
@@ -376,7 +376,7 @@ theorem eqvGen_idem (r : α → α → Prop) : EqvGen.Setoid (EqvGen.Setoid r).R
/-- The equivalence closure of a binary relation r is contained in any equivalence
relation containing r. -/
theorem eqvGen_le {r : α → α → Prop} {s : Setoid α} (h : ∀ x y, r x y → s.Rel x y) :
- EqvGen.Setoid r ≤ s := by rw [eqv_gen_eq] <;> exact infₛ_le h
+ EqvGen.Setoid r ≤ s := by rw [eqv_gen_eq] <;> exact sInf_le h
#align setoid.eqv_gen_le Setoid.eqvGen_le
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/9da1b3534b65d9661eb8f42443598a92bbb49211
@@ -178,7 +178,7 @@ protected def prod (r : Setoid α) (s : Setoid β) : Setoid (α × β)
-/
/-- The infimum of two equivalence relations. -/
-instance : HasInf (Setoid α) :=
+instance : Inf (Setoid α) :=
⟨fun r s =>
⟨fun x y => r.Rel x y ∧ s.Rel x y,
⟨fun x => ⟨r.refl' x, s.refl' x⟩, fun _ _ h => ⟨r.symm' h.1, s.symm' h.2⟩, fun _ _ _ h1 h2 =>
@@ -186,9 +186,9 @@ instance : HasInf (Setoid α) :=
/- warning: setoid.inf_def -> Setoid.inf_def is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {r : Setoid.{succ u1} α} {s : Setoid.{succ u1} α}, Eq.{succ u1} (α -> α -> Prop) (Setoid.Rel.{u1} α (HasInf.inf.{u1} (Setoid.{succ u1} α) (Setoid.hasInf.{u1} α) r s)) (HasInf.inf.{u1} (α -> α -> Prop) (Pi.hasInf.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.hasInf.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => SemilatticeInf.toHasInf.{0} Prop (Lattice.toSemilatticeInf.{0} Prop (CompleteLattice.toLattice.{0} Prop Prop.completeLattice))))) (Setoid.Rel.{u1} α r) (Setoid.Rel.{u1} α s))
+ forall {α : Type.{u1}} {r : Setoid.{succ u1} α} {s : Setoid.{succ u1} α}, Eq.{succ u1} (α -> α -> Prop) (Setoid.Rel.{u1} α (Inf.inf.{u1} (Setoid.{succ u1} α) (Setoid.hasInf.{u1} α) r s)) (Inf.inf.{u1} (α -> α -> Prop) (Pi.hasInf.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.hasInf.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => SemilatticeInf.toHasInf.{0} Prop (Lattice.toSemilatticeInf.{0} Prop (CompleteLattice.toLattice.{0} Prop Prop.completeLattice))))) (Setoid.Rel.{u1} α r) (Setoid.Rel.{u1} α s))
but is expected to have type
- forall {α : Type.{u1}} {r : Setoid.{succ u1} α} {s : Setoid.{succ u1} α}, Eq.{succ u1} (α -> α -> Prop) (Setoid.Rel.{u1} α (HasInf.inf.{u1} (Setoid.{succ u1} α) (Setoid.instHasInfSetoid.{u1} α) r s)) (HasInf.inf.{u1} (α -> α -> Prop) (Pi.instHasInfForAll.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.instHasInfForAll.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => Lattice.toHasInf.{0} Prop (CompleteLattice.toLattice.{0} Prop Prop.completeLattice)))) (Setoid.Rel.{u1} α r) (Setoid.Rel.{u1} α s))
+ forall {α : Type.{u1}} {r : Setoid.{succ u1} α} {s : Setoid.{succ u1} α}, Eq.{succ u1} (α -> α -> Prop) (Setoid.Rel.{u1} α (Inf.inf.{u1} (Setoid.{succ u1} α) (Setoid.instInfSetoid.{u1} α) r s)) (Inf.inf.{u1} (α -> α -> Prop) (Pi.instInfForAll.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.instInfForAll.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => Lattice.toInf.{0} Prop (CompleteLattice.toLattice.{0} Prop Prop.completeLattice)))) (Setoid.Rel.{u1} α r) (Setoid.Rel.{u1} α s))
Case conversion may be inaccurate. Consider using '#align setoid.inf_def Setoid.inf_defₓ'. -/
/-- The infimum of 2 equivalence relations r and s is the same relation as the infimum
of the underlying binary operations. -/
@@ -198,9 +198,9 @@ theorem inf_def {r s : Setoid α} : (r ⊓ s).Rel = r.Rel ⊓ s.Rel :=
/- warning: setoid.inf_iff_and -> Setoid.inf_iff_and is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {r : Setoid.{succ u1} α} {s : Setoid.{succ u1} α} {x : α} {y : α}, Iff (Setoid.Rel.{u1} α (HasInf.inf.{u1} (Setoid.{succ u1} α) (Setoid.hasInf.{u1} α) r s) x y) (And (Setoid.Rel.{u1} α r x y) (Setoid.Rel.{u1} α s x y))
+ forall {α : Type.{u1}} {r : Setoid.{succ u1} α} {s : Setoid.{succ u1} α} {x : α} {y : α}, Iff (Setoid.Rel.{u1} α (Inf.inf.{u1} (Setoid.{succ u1} α) (Setoid.hasInf.{u1} α) r s) x y) (And (Setoid.Rel.{u1} α r x y) (Setoid.Rel.{u1} α s x y))
but is expected to have type
- forall {α : Type.{u1}} {r : Setoid.{succ u1} α} {s : Setoid.{succ u1} α} {x : α} {y : α}, Iff (Setoid.Rel.{u1} α (HasInf.inf.{u1} (Setoid.{succ u1} α) (Setoid.instHasInfSetoid.{u1} α) r s) x y) (And (Setoid.Rel.{u1} α r x y) (Setoid.Rel.{u1} α s x y))
+ forall {α : Type.{u1}} {r : Setoid.{succ u1} α} {s : Setoid.{succ u1} α} {x : α} {y : α}, Iff (Setoid.Rel.{u1} α (Inf.inf.{u1} (Setoid.{succ u1} α) (Setoid.instInfSetoid.{u1} α) r s) x y) (And (Setoid.Rel.{u1} α r x y) (Setoid.Rel.{u1} α s x y))
Case conversion may be inaccurate. Consider using '#align setoid.inf_iff_and Setoid.inf_iff_andₓ'. -/
theorem inf_iff_and {r s : Setoid α} {x y} : (r ⊓ s).Rel x y ↔ r.Rel x y ∧ s.Rel x y :=
Iff.rfl
@@ -240,7 +240,7 @@ instance completeLattice : CompleteLattice (Setoid α) :=
completeLatticeOfInf (Setoid α) fun s =>
⟨fun r hr x y h => h _ hr, fun r hr x y h r' hr' =>
hr hr' h⟩ with
- inf := HasInf.inf
+ inf := Inf.inf
inf_le_left := fun _ _ _ _ h => h.1
inf_le_right := fun _ _ _ _ h => h.2
le_inf := fun _ _ _ h1 h2 _ _ h => ⟨h1 h, h2 h⟩
@@ -296,7 +296,12 @@ theorem eqvGen_eq (r : α → α → Prop) :
#align setoid.eqv_gen_eq Setoid.eqvGen_eq
-/
-#print Setoid.sup_eq_eqvGen /-
+/- warning: setoid.sup_eq_eqv_gen -> Setoid.sup_eq_eqvGen is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} (r : Setoid.{succ u1} α) (s : Setoid.{succ u1} α), Eq.{succ u1} (Setoid.{succ u1} α) (Sup.sup.{u1} (Setoid.{succ u1} α) (SemilatticeSup.toHasSup.{u1} (Setoid.{succ u1} α) (Lattice.toSemilatticeSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toLattice.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)))) r s) (EqvGen.Setoid.{u1} α (fun (x : α) (y : α) => Or (Setoid.Rel.{u1} α r x y) (Setoid.Rel.{u1} α s x y)))
+but is expected to have type
+ forall {α : Type.{u1}} (r : Setoid.{succ u1} α) (s : Setoid.{succ u1} α), Eq.{succ u1} (Setoid.{succ u1} α) (Sup.sup.{u1} (Setoid.{succ u1} α) (SemilatticeSup.toSup.{u1} (Setoid.{succ u1} α) (Lattice.toSemilatticeSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toLattice.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)))) r s) (EqvGen.Setoid.{u1} α (fun (x : α) (y : α) => Or (Setoid.Rel.{u1} α r x y) (Setoid.Rel.{u1} α s x y)))
+Case conversion may be inaccurate. Consider using '#align setoid.sup_eq_eqv_gen Setoid.sup_eq_eqvGenₓ'. -/
/-- The supremum of two equivalence relations r and s is the equivalence closure of the binary
relation `x is related to y by r or s`. -/
theorem sup_eq_eqvGen (r s : Setoid α) : r ⊔ s = EqvGen.Setoid fun x y => r.Rel x y ∨ s.Rel x y :=
@@ -305,15 +310,18 @@ theorem sup_eq_eqvGen (r s : Setoid α) : r ⊔ s = EqvGen.Setoid fun x y => r.R
apply congr_arg Inf
simp only [le_def, or_imp, ← forall_and]
#align setoid.sup_eq_eqv_gen Setoid.sup_eq_eqvGen
--/
-#print Setoid.sup_def /-
+/- warning: setoid.sup_def -> Setoid.sup_def is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {r : Setoid.{succ u1} α} {s : Setoid.{succ u1} α}, Eq.{succ u1} (Setoid.{succ u1} α) (Sup.sup.{u1} (Setoid.{succ u1} α) (SemilatticeSup.toHasSup.{u1} (Setoid.{succ u1} α) (Lattice.toSemilatticeSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toLattice.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)))) r s) (EqvGen.Setoid.{u1} α (Sup.sup.{u1} (α -> α -> Prop) (Pi.hasSup.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.hasSup.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => SemilatticeSup.toHasSup.{0} Prop (Lattice.toSemilatticeSup.{0} Prop (CompleteLattice.toLattice.{0} Prop Prop.completeLattice))))) (Setoid.Rel.{u1} α r) (Setoid.Rel.{u1} α s)))
+but is expected to have type
+ forall {α : Type.{u1}} {r : Setoid.{succ u1} α} {s : Setoid.{succ u1} α}, Eq.{succ u1} (Setoid.{succ u1} α) (Sup.sup.{u1} (Setoid.{succ u1} α) (SemilatticeSup.toSup.{u1} (Setoid.{succ u1} α) (Lattice.toSemilatticeSup.{u1} (Setoid.{succ u1} α) (CompleteLattice.toLattice.{u1} (Setoid.{succ u1} α) (Setoid.completeLattice.{u1} α)))) r s) (EqvGen.Setoid.{u1} α (Sup.sup.{u1} (α -> α -> Prop) (Pi.instSupForAll.{u1, u1} α (fun (ᾰ : α) => α -> Prop) (fun (i : α) => Pi.instSupForAll.{u1, 0} α (fun (ᾰ : α) => Prop) (fun (i : α) => SemilatticeSup.toSup.{0} Prop (Lattice.toSemilatticeSup.{0} Prop (CompleteLattice.toLattice.{0} Prop Prop.completeLattice))))) (Setoid.Rel.{u1} α r) (Setoid.Rel.{u1} α s)))
+Case conversion may be inaccurate. Consider using '#align setoid.sup_def Setoid.sup_defₓ'. -/
/-- The supremum of 2 equivalence relations r and s is the equivalence closure of the
supremum of the underlying binary operations. -/
theorem sup_def {r s : Setoid α} : r ⊔ s = EqvGen.Setoid (r.Rel ⊔ s.Rel) := by
rw [sup_eq_eqv_gen] <;> rfl
#align setoid.sup_def Setoid.sup_def
--/
/- warning: setoid.Sup_eq_eqv_gen -> Setoid.supₛ_eq_eqvGen is a dubious translation:
lean 3 declaration is
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Given two equivalence relations with r ≤ s
, define an equivalence between a sigma type for the sum of the quotients by r
on each equivalence class by s
, and the quotient by r
.
The motivating example is bijecting between orbits of an action by a subgroup: the orbits considered within each orbit of the action by the full group are equivalent to the orbits when the subgroup acts directly on the whole space. This is a generic version for an arbitrary pair of setoids with r ≤ s
, to be used in defining the version for orbits.
Feel free to golf or suggest a better name for the equivalence.
From AperiodicMonotilesLean.
@@ -443,6 +443,15 @@ def correspondence (r : Setoid α) : { s // r ≤ s } ≃o Setoid (Quotient r) w
⟨fun h x y hs ↦ @h ⟦x⟧ ⟦y⟧ hs, fun h x y ↦ Quotient.inductionOn₂ x y fun _ _ hs ↦ h hs⟩
#align setoid.correspondence Setoid.correspondence
+/-- Given two equivalence relations with `r ≤ s`, a bijection between the sum of the quotients by
+`r` on each equivalence class by `s` and the quotient by `r`. -/
+def sigmaQuotientEquivOfLe {r s : Setoid α} (hle : r ≤ s) :
+ (Σ q : Quotient s, Quotient (r.comap (Subtype.val : Quotient.mk s ⁻¹' {q} → α))) ≃
+ Quotient r :=
+ .trans (.symm <| .sigmaCongrRight fun _ ↦ .subtypeQuotientEquivQuotientSubtype
+ (s₁ := r) (s₂ := r.comap Subtype.val) _ (fun _ ↦ Iff.rfl) fun _ _ ↦ Iff.rfl)
+ (.sigmaFiberEquiv fun a ↦ a.lift (Quotient.mk s) fun _ _ h ↦ Quotient.sound <| hle h)
+
end Setoid
@[simp]
inst
prefix to instance names (#11238)
This is not exhaustive; it largely does not rename instances that relate to algebra, and only focuses on the "core" order files.
@@ -460,6 +460,5 @@ theorem Quot.subsingleton_iff (r : α → α → Prop) : Subsingleton (Quot r)
refine' (surjective_quot_mk _).forall.trans (forall_congr' fun a => _)
refine' (surjective_quot_mk _).forall.trans (forall_congr' fun b => _)
rw [Quot.eq]
- simp only [forall_const, le_Prop_eq, OrderTop.toTop, Pi.orderTop, Pi.top_apply,
- Prop.top_eq_true, true_implies]
+ simp only [forall_const, le_Prop_eq, Pi.top_apply, Prop.top_eq_true, true_implies]
#align quot.subsingleton_iff Quot.subsingleton_iff
@@ -431,26 +431,16 @@ open Quotient
/-- Given an equivalence relation `r` on `α`, the order-preserving bijection between the set of
equivalence relations containing `r` and the equivalence relations on the quotient of `α` by `r`. -/
def correspondence (r : Setoid α) : { s // r ≤ s } ≃o Setoid (Quotient r) where
- toFun s := mapOfSurjective s.1 Quotient.mk'' ((ker_mk_eq r).symm ▸ s.2) exists_rep
+ toFun s := ⟨Quotient.lift₂ s.1.1 fun _ _ _ _ h₁ h₂ ↦ Eq.propIntro
+ (fun h ↦ s.1.trans' (s.1.trans' (s.1.symm' (s.2 h₁)) h) (s.2 h₂))
+ (fun h ↦ s.1.trans' (s.1.trans' (s.2 h₁) h) (s.1.symm' (s.2 h₂))),
+ ⟨Quotient.ind s.1.2.1, @fun x y ↦ Quotient.inductionOn₂ x y fun _ _ ↦ s.1.2.2,
+ @fun x y z ↦ Quotient.inductionOn₃ x y z fun _ _ _ ↦ s.1.2.3⟩⟩
invFun s := ⟨comap Quotient.mk' s, fun x y h => by rw [comap_rel, eq_rel.2 h]⟩
- left_inv s := by
- ext
- refine ⟨?_, fun h => ⟨_, _, rfl, rfl, h⟩⟩
- intro ⟨a, b, hx, hy, H⟩
- refine s.1.trans' (s.1.symm' <| s.2 <| eq_rel.1 hx) (s.1.trans' H <| s.2 <| (eq_rel.1 hy))
- right_inv s :=
- ext' fun x y =>
- ⟨fun h => let ⟨_, _, hx, hy, H⟩ := h; hx ▸ hy ▸ H,
- Quotient.inductionOn₂ x y fun w z h => ⟨w, z, rfl, rfl, h⟩⟩
- map_rel_iff' := by
- intro s t
- refine ⟨?_, ?_⟩
- · intro h x y hs
- let ⟨a, b, hx, hy, ht⟩ := h ⟨x, y, rfl, rfl, hs⟩
- exact t.1.trans' (t.1.symm' <| t.2 <| eq_rel.1 hx) <| t.1.trans' ht <| t.2 <| eq_rel.1 hy
- · intro h x y hs
- let ⟨a, b, hx, hy, Hs⟩ := hs
- exact ⟨a, b, hx, hy, h Hs⟩
+ left_inv s := rfl
+ right_inv s := ext fun x y ↦ Quotient.inductionOn₂ x y fun _ _ ↦ Iff.rfl
+ map_rel_iff' :=
+ ⟨fun h x y hs ↦ @h ⟦x⟧ ⟦y⟧ hs, fun h x y ↦ Quotient.inductionOn₂ x y fun _ _ hs ↦ h hs⟩
#align setoid.correspondence Setoid.correspondence
end Setoid
The mathlib3 lemma is about quotient.mk, which takes an instance argument and is translated into mathlib4 as Quotient.mk'.
@@ -459,9 +459,9 @@ end Setoid
theorem Quotient.subsingleton_iff {s : Setoid α} : Subsingleton (Quotient s) ↔ s = ⊤ := by
simp only [_root_.subsingleton_iff, eq_top_iff, Setoid.le_def, Setoid.top_def, Pi.top_apply,
forall_const]
- refine' (surjective_quotient_mk _).forall.trans (forall_congr' fun a => _)
- refine' (surjective_quotient_mk _).forall.trans (forall_congr' fun b => _)
- simp_rw [←Quotient.mk''_eq_mk, Prop.top_eq_true, true_implies, Quotient.eq'']
+ refine' (surjective_quotient_mk' _).forall.trans (forall_congr' fun a => _)
+ refine' (surjective_quotient_mk' _).forall.trans (forall_congr' fun b => _)
+ simp_rw [Prop.top_eq_true, true_implies, Quotient.eq']
rfl
#align quotient.subsingleton_iff Quotient.subsingleton_iff
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -34,7 +34,7 @@ reason about them using the existing `Setoid` and its infrastructure.
setoid, equivalence, iseqv, relation, equivalence relation
-/
-variable {α : Type _} {β : Type _}
+variable {α : Type*} {β : Type*}
/-- A version of `Setoid.r` that takes the equivalence relation as an explicit argument. -/
def Setoid.Rel (r : Setoid α) : α → α → Prop :=
@@ -2,15 +2,12 @@
Copyright (c) 2019 Amelia Livingston. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Amelia Livingston, Bryan Gin-ge Chen
-
-! This file was ported from Lean 3 source module data.setoid.basic
-! leanprover-community/mathlib commit bbeb185db4ccee8ed07dc48449414ebfa39cb821
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Logic.Relation
import Mathlib.Order.GaloisConnection
+#align_import data.setoid.basic from "leanprover-community/mathlib"@"bbeb185db4ccee8ed07dc48449414ebfa39cb821"
+
/-!
# Equivalence relations
sSup
/iSup
(#3938)
As discussed on Zulip
supₛ
→ sSup
infₛ
→ sInf
supᵢ
→ iSup
infᵢ
→ iInf
bsupₛ
→ bsSup
binfₛ
→ bsInf
bsupᵢ
→ biSup
binfᵢ
→ biInf
csupₛ
→ csSup
cinfₛ
→ csInf
csupᵢ
→ ciSup
cinfᵢ
→ ciInf
unionₛ
→ sUnion
interₛ
→ sInter
unionᵢ
→ iUnion
interᵢ
→ iInter
bunionₛ
→ bsUnion
binterₛ
→ bsInter
bunionᵢ
→ biUnion
binterᵢ
→ biInter
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
@@ -155,11 +155,11 @@ instance : InfSet (Setoid α) :=
/-- The underlying binary operation of the infimum of a set of equivalence relations
is the infimum of the set's image under the map to the underlying binary operation. -/
-theorem infₛ_def {s : Set (Setoid α)} : (infₛ s).Rel = infₛ (Rel '' s) := by
+theorem sInf_def {s : Set (Setoid α)} : (sInf s).Rel = sInf (Rel '' s) := by
ext
- simp only [infₛ_image, infᵢ_apply, infᵢ_Prop_eq]
+ simp only [sInf_image, iInf_apply, iInf_Prop_eq]
rfl
-#align setoid.Inf_def Setoid.infₛ_def
+#align setoid.Inf_def Setoid.sInf_def
instance : PartialOrder (Setoid α) where
le := (· ≤ ·)
@@ -202,12 +202,12 @@ theorem eq_top_iff {s : Setoid α} : s = (⊤ : Setoid α) ↔ ∀ x y : α, s.R
/-- The inductively defined equivalence closure of a binary relation r is the infimum
of the set of all equivalence relations containing r. -/
theorem eqvGen_eq (r : α → α → Prop) :
- EqvGen.Setoid r = infₛ { s : Setoid α | ∀ ⦃x y⦄, r x y → s.Rel x y } :=
+ EqvGen.Setoid r = sInf { s : Setoid α | ∀ ⦃x y⦄, r x y → s.Rel x y } :=
le_antisymm
(fun _ _ H =>
EqvGen.rec (fun _ _ h _ hs => hs h) (refl' _) (fun _ _ _ => symm' _)
(fun _ _ _ _ _ => trans' _) H)
- (infₛ_le fun _ _ h => EqvGen.rel _ _ h)
+ (sInf_le fun _ _ h => EqvGen.rel _ _ h)
#align setoid.eqv_gen_eq Setoid.eqvGen_eq
/-- The supremum of two equivalence relations r and s is the equivalence closure of the binary
@@ -215,7 +215,7 @@ theorem eqvGen_eq (r : α → α → Prop) :
theorem sup_eq_eqvGen (r s : Setoid α) :
r ⊔ s = EqvGen.Setoid fun x y => r.Rel x y ∨ s.Rel x y := by
rw [eqvGen_eq]
- apply congr_arg infₛ
+ apply congr_arg sInf
simp only [le_def, or_imp, ← forall_and]
#align setoid.sup_eq_eqv_gen Setoid.sup_eq_eqvGen
@@ -227,27 +227,27 @@ theorem sup_def {r s : Setoid α} : r ⊔ s = EqvGen.Setoid (r.Rel ⊔ s.Rel) :=
/-- The supremum of a set S of equivalence relations is the equivalence closure of the binary
relation `there exists r ∈ S relating x and y`. -/
-theorem supₛ_eq_eqvGen (S : Set (Setoid α)) :
- supₛ S = EqvGen.Setoid fun x y => ∃ r : Setoid α, r ∈ S ∧ r.Rel x y := by
+theorem sSup_eq_eqvGen (S : Set (Setoid α)) :
+ sSup S = EqvGen.Setoid fun x y => ∃ r : Setoid α, r ∈ S ∧ r.Rel x y := by
rw [eqvGen_eq]
- apply congr_arg infₛ
+ apply congr_arg sInf
simp only [upperBounds, le_def, and_imp, exists_imp]
ext
exact ⟨fun H x y r hr => H hr, fun H r hr x y => H r hr⟩
-#align setoid.Sup_eq_eqv_gen Setoid.supₛ_eq_eqvGen
+#align setoid.Sup_eq_eqv_gen Setoid.sSup_eq_eqvGen
/-- The supremum of a set of equivalence relations is the equivalence closure of the
supremum of the set's image under the map to the underlying binary operation. -/
-theorem supₛ_def {s : Set (Setoid α)} : supₛ s = EqvGen.Setoid (supₛ (Rel '' s)) := by
- rw [supₛ_eq_eqvGen, supₛ_image]
+theorem sSup_def {s : Set (Setoid α)} : sSup s = EqvGen.Setoid (sSup (Rel '' s)) := by
+ rw [sSup_eq_eqvGen, sSup_image]
congr with (x y)
- simp only [supᵢ_apply, supᵢ_Prop_eq, exists_prop]
-#align setoid.Sup_def Setoid.supₛ_def
+ simp only [iSup_apply, iSup_Prop_eq, exists_prop]
+#align setoid.Sup_def Setoid.sSup_def
/-- The equivalence closure of an equivalence relation r is r. -/
@[simp]
theorem eqvGen_of_setoid (r : Setoid α) : EqvGen.Setoid r.r = r :=
- le_antisymm (by rw [eqvGen_eq]; exact infₛ_le fun _ _ => id) EqvGen.rel
+ le_antisymm (by rw [eqvGen_eq]; exact sInf_le fun _ _ => id) EqvGen.rel
#align setoid.eqv_gen_of_setoid Setoid.eqvGen_of_setoid
/-- Equivalence closure is idempotent. -/
@@ -259,7 +259,7 @@ theorem eqvGen_idem (r : α → α → Prop) : EqvGen.Setoid (EqvGen.Setoid r).R
/-- The equivalence closure of a binary relation r is contained in any equivalence
relation containing r. -/
theorem eqvGen_le {r : α → α → Prop} {s : Setoid α} (h : ∀ x y, r x y → s.Rel x y) :
- EqvGen.Setoid r ≤ s := by rw [eqvGen_eq]; exact infₛ_le h
+ EqvGen.Setoid r ≤ s := by rw [eqvGen_eq]; exact sInf_le h
#align setoid.eqv_gen_le Setoid.eqvGen_le
/-- Equivalence closure of binary relations is monotone. -/
@@ -130,7 +130,7 @@ protected def prod (r : Setoid α) (s : Setoid β) :
#align setoid.prod Setoid.prod
/-- The infimum of two equivalence relations. -/
-instance : HasInf (Setoid α) :=
+instance : Inf (Setoid α) :=
⟨fun r s =>
⟨fun x y => r.Rel x y ∧ s.Rel x y,
⟨fun x => ⟨r.refl' x, s.refl' x⟩, fun h => ⟨r.symm' h.1, s.symm' h.2⟩, fun h1 h2 =>
@@ -174,7 +174,7 @@ instance : PartialOrder (Setoid α) where
instance completeLattice : CompleteLattice (Setoid α) :=
{ (completeLatticeOfInf (Setoid α)) fun _ =>
⟨fun _ hr _ _ h => h _ hr, fun _ hr _ _ h _ hr' => hr hr' h⟩ with
- inf := HasInf.inf
+ inf := Inf.inf
inf_le_left := fun _ _ _ _ h => h.1
inf_le_right := fun _ _ _ _ h => h.2
le_inf := fun _ _ _ h1 h2 _ _ h => ⟨h1 h, h2 h⟩
This PR is the result of a slight variant on the following "algorithm"
_
and make all uppercase letters into lowercase_
and make all uppercase letters into lowercase(original_lean3_name, OriginalLean4Name)
#align
statement just before the next empty line#align
statement to have been inserted too early)@@ -346,6 +346,8 @@ def quotientKerEquivOfRightInverse (g : β → α) (hf : Function.RightInverse g
left_inv a := Quotient.inductionOn' a fun a => Quotient.sound' <| hf (f a)
right_inv := hf
#align setoid.quotient_ker_equiv_of_right_inverse Setoid.quotientKerEquivOfRightInverse
+#align setoid.quotient_ker_equiv_of_right_inverse_symm_apply Setoid.quotientKerEquivOfRightInverse_symm_apply
+#align setoid.quotient_ker_equiv_of_right_inverse_apply Setoid.quotientKerEquivOfRightInverse_apply
/-- The quotient of α by the kernel of a surjective function f bijects with f's codomain.
@@ -462,7 +462,7 @@ theorem Quotient.subsingleton_iff {s : Setoid α} : Subsingleton (Quotient s)
forall_const]
refine' (surjective_quotient_mk _).forall.trans (forall_congr' fun a => _)
refine' (surjective_quotient_mk _).forall.trans (forall_congr' fun b => _)
- simp_rw [←Quotient.mk''_eq_mk, Prop.top_eq_true, true_implies, Quotient.eq']
+ simp_rw [←Quotient.mk''_eq_mk, Prop.top_eq_true, true_implies, Quotient.eq'']
rfl
#align quotient.subsingleton_iff Quotient.subsingleton_iff
This was done semi-automatically with some regular expressions in vim in contrast to the fully automatic https://github.com/leanprover-community/mathlib4/pull/1523.
Co-authored-by: Moritz Firsching <firsching@google.com>
@@ -212,8 +212,8 @@ theorem eqvGen_eq (r : α → α → Prop) :
/-- The supremum of two equivalence relations r and s is the equivalence closure of the binary
relation `x is related to y by r or s`. -/
-theorem sup_eq_eqvGen (r s : Setoid α) : r ⊔ s = EqvGen.Setoid fun x y => r.Rel x y ∨ s.Rel x y :=
- by
+theorem sup_eq_eqvGen (r s : Setoid α) :
+ r ⊔ s = EqvGen.Setoid fun x y => r.Rel x y ∨ s.Rel x y := by
rw [eqvGen_eq]
apply congr_arg infₛ
simp only [le_def, or_imp, ← forall_and]
set_option autoImplicit false
(#1608)
These were mostly added in the process of porting and weren't removed at the end. There was one that may have been needed, let's see what CI says.
@@ -37,8 +37,6 @@ reason about them using the existing `Setoid` and its infrastructure.
setoid, equivalence, iseqv, relation, equivalence relation
-/
-set_option autoImplicit false
-
variable {α : Type _} {β : Type _}
/-- A version of `Setoid.r` that takes the equivalence relation as an explicit argument. -/
@@ -107,11 +107,7 @@ theorem ker_mk_eq (r : Setoid α) : ker (@Quotient.mk'' _ r) = r :=
ext' fun _ _ => Quotient.eq
#align setoid.ker_mk_eq Setoid.ker_mk_eq
-theorem ker_apply_mk_out {f : α → β} (a : α) :
- (f
- haveI := Setoid.ker f
- ⟦a⟧.out) =
- f a :=
+theorem ker_apply_mk_out {f : α → β} (a : α) : f (haveI := Setoid.ker f; ⟦a⟧.out) = f a :=
@Quotient.mk_out _ (Setoid.ker f) a
#align setoid.ker_apply_mk_out Setoid.ker_apply_mk_out
@@ -298,9 +294,7 @@ theorem ker_iff_mem_preimage {f : α → β} {x y} : (ker f).Rel x y ↔ x ∈ f
/-- Equivalence between functions `α → β` such that `r x y → f x = f y` and functions
`quotient r → β`. -/
-def liftEquiv (r : Setoid α) :
- { f : α → β // r ≤ ker f } ≃
- (Quotient r → β) where
+def liftEquiv (r : Setoid α) : { f : α → β // r ≤ ker f } ≃ (Quotient r → β) where
toFun f := Quotient.lift (f : α → β) f.2
invFun f := ⟨f ∘ Quotient.mk'', fun x y h => by simp [ker_def, Quotient.sound' h]⟩
left_inv := fun ⟨f, hf⟩ => Subtype.eq <| funext fun x => rfl
@@ -348,8 +342,7 @@ noncomputable def quotientKerEquivRange : Quotient (ker f) ≃ Set.range f :=
domain. -/
@[simps]
def quotientKerEquivOfRightInverse (g : β → α) (hf : Function.RightInverse g f) :
- Quotient (ker f) ≃
- β where
+ Quotient (ker f) ≃ β where
toFun a := (Quotient.liftOn' a f) fun _ _ => id
invFun b := Quotient.mk'' (g b)
left_inv a := Quotient.inductionOn' a fun a => Quotient.sound' <| hf (f a)
Fix a lot of wrong casing mostly in the docstrings but also sometimes in def/theorem names. E.g. fin 2 --> Fin 2
, add_monoid_hom --> AddMonoidHom
Remove \n
from to_additive
docstrings that were inserted by mathport.
Move files and directories with Gcd
and Smul
to GCD
and SMul
@@ -358,7 +358,7 @@ def quotientKerEquivOfRightInverse (g : β → α) (hf : Function.RightInverse g
/-- The quotient of α by the kernel of a surjective function f bijects with f's codomain.
-If a specific right-inverse of `f` is known, `setoid.quotient_ker_equiv_of_right_inverse` can be
+If a specific right-inverse of `f` is known, `Setoid.quotientKerEquivOfRightInverse` can be
definitionally more useful. -/
noncomputable def quotientKerEquivOfSurjective (hf : Surjective f) : Quotient (ker f) ≃ β :=
quotientKerEquivOfRightInverse _ (Function.surjInv hf) (rightInverse_surjInv hf)
All dependencies are ported!