statement
stringlengths
1
2.88k
proof
stringlengths
0
13.9k
type
stringclasses
10 values
symbolic_name
stringlengths
1
131
library
stringclasses
417 values
filename
stringlengths
17
80
imports
listlengths
0
16
deps
listlengths
0
64
docstring
stringlengths
0
10.2k
source_url
stringclasses
1 value
commit
stringclasses
1 value
rel_hom {α β : Type*} (r : α → α → Prop) (s : β → β → Prop)
(to_fun : α → β) (map_rel' : ∀ {a b}, r a b → s (to_fun a) (to_fun b))
structure
rel_hom
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
A relation homomorphism with respect to a given pair of relations `r` and `s` is a function `f : α → β` such that `r a b → s (f a) (f b)`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
rel_hom_class (F : Type*) {α β : out_param $ Type*} (r : out_param $ α → α → Prop) (s : out_param $ β → β → Prop) extends fun_like F α (λ _, β)
(map_rel : ∀ (f : F) {a b}, r a b → s (f a) (f b))
class
rel_hom_class
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "fun_like" ]
`rel_hom_class F r s` asserts that `F` is a type of functions such that all `f : F` satisfy `r a b → s (f a) (f b)`. The relations `r` and `s` are `out_param`s since figuring them out from a goal is a higher-order matching problem that Lean usually can't do unaided.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_irrefl [rel_hom_class F r s] (f : F) : ∀ [is_irrefl β s], is_irrefl α r
| ⟨H⟩ := ⟨λ a h, H _ (map_rel f h)⟩
theorem
rel_hom_class.is_irrefl
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "rel_hom_class" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_asymm [rel_hom_class F r s] (f : F) : ∀ [is_asymm β s], is_asymm α r
| ⟨H⟩ := ⟨λ a b h₁ h₂, H _ _ (map_rel f h₁) (map_rel f h₂)⟩
theorem
rel_hom_class.is_asymm
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "rel_hom_class" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
acc [rel_hom_class F r s] (f : F) (a : α) : acc s (f a) → acc r a
begin generalize h : f a = b, intro ac, induction ac with _ H IH generalizing a, subst h, exact ⟨_, λ a' h, IH (f a') (map_rel f h) _ rfl⟩ end
theorem
rel_hom_class.acc
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "rel_hom_class" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
well_founded [rel_hom_class F r s] (f : F) : ∀ (h : well_founded s), well_founded r
| ⟨H⟩ := ⟨λ a, rel_hom_class.acc f _ (H _)⟩
theorem
rel_hom_class.well_founded
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "rel_hom_class", "rel_hom_class.acc" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
map_rel (f : r →r s) {a b} : r a b → s (f a) (f b)
f.map_rel'
theorem
rel_hom.map_rel
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_fn_mk (f : α → β) (o) : (@rel_hom.mk _ _ r s f o : α → β) = f
rfl
theorem
rel_hom.coe_fn_mk
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_fn_to_fun (f : r →r s) : (f.to_fun : α → β) = f
rfl
theorem
rel_hom.coe_fn_to_fun
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_fn_injective : @function.injective (r →r s) (α → β) coe_fn
fun_like.coe_injective
theorem
rel_hom.coe_fn_injective
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "fun_like.coe_injective" ]
The map `coe_fn : (r →r s) → (α → β)` is injective.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ext ⦃f g : r →r s⦄ (h : ∀ x, f x = g x) : f = g
fun_like.ext f g h
theorem
rel_hom.ext
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "fun_like.ext" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ext_iff {f g : r →r s} : f = g ↔ ∀ x, f x = g x
fun_like.ext_iff
theorem
rel_hom.ext_iff
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "fun_like.ext_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
id (r : α → α → Prop) : r →r r
⟨λ x, x, λ a b x, x⟩
def
rel_hom.id
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
Identity map is a relation homomorphism.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
comp (g : s →r t) (f : r →r s) : r →r t
⟨λ x, g (f x), λ a b h, g.2 (f.2 h)⟩
def
rel_hom.comp
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
Composition of two relation homomorphisms is a relation homomorphism.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
swap (f : r →r s) : swap r →r swap s
⟨f, λ a b, f.map_rel⟩
def
rel_hom.swap
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
A relation homomorphism is also a relation homomorphism between dual relations.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
preimage (f : α → β) (s : β → β → Prop) : f ⁻¹'o s →r s
⟨f, λ a b, id⟩
def
rel_hom.preimage
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
A function is a relation homomorphism from the preimage relation of `s` to `s`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
injective_of_increasing (r : α → α → Prop) (s : β → β → Prop) [is_trichotomous α r] [is_irrefl β s] (f : α → β) (hf : ∀ {x y}, r x y → s (f x) (f y)) : injective f
begin intros x y hxy, rcases trichotomous_of r x y with h | h | h, have := hf h, rw hxy at this, exfalso, exact irrefl_of s (f y) this, exact h, have := hf h, rw hxy at this, exfalso, exact irrefl_of s (f y) this end
lemma
injective_of_increasing
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
An increasing function is injective
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
rel_hom.injective_of_increasing [is_trichotomous α r] [is_irrefl β s] (f : r →r s) : injective f
injective_of_increasing r s f (λ x y, f.map_rel)
lemma
rel_hom.injective_of_increasing
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "injective_of_increasing" ]
An increasing function is injective
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
surjective.well_founded_iff {f : α → β} (hf : surjective f) (o : ∀ {a b}, r a b ↔ s (f a) (f b)) : well_founded r ↔ well_founded s
iff.intro (begin refine rel_hom_class.well_founded (rel_hom.mk _ _ : s →r r), { exact classical.some hf.has_right_inverse }, intros a b h, apply o.2, convert h, iterate 2 { apply classical.some_spec hf.has_right_inverse }, end) (rel_hom_class.well_founded (⟨f, λ _ _, o.1⟩ : r →r s))
theorem
surjective.well_founded_iff
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "rel_hom_class.well_founded" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
rel_embedding {α β : Type*} (r : α → α → Prop) (s : β → β → Prop) extends α ↪ β
(map_rel_iff' : ∀ {a b}, s (to_embedding a) (to_embedding b) ↔ r a b)
structure
rel_embedding
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
A relation embedding with respect to a given pair of relations `r` and `s` is an embedding `f : α ↪ β` such that `r a b ↔ s (f a) (f b)`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
subtype.rel_embedding {X : Type*} (r : X → X → Prop) (p : X → Prop) : ((subtype.val : subtype p → X) ⁻¹'o r) ↪r r
⟨embedding.subtype p, λ x y, iff.rfl⟩
definition
subtype.rel_embedding
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
The induced relation on a subtype is an embedding under the natural inclusion.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
preimage_equivalence {α β} (f : α → β) {s : β → β → Prop} (hs : equivalence s) : equivalence (f ⁻¹'o s)
⟨λ a, hs.1 _, λ a b h, hs.2.1 h, λ a b c h₁ h₂, hs.2.2 h₁ h₂⟩
theorem
preimage_equivalence
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_rel_hom (f : r ↪r s) : (r →r s)
{ to_fun := f.to_embedding.to_fun, map_rel' := λ x y, (map_rel_iff' f).mpr }
def
rel_embedding.to_rel_hom
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
A relation embedding is also a relation homomorphism
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
simps.apply (h : r ↪r s) : α → β
h initialize_simps_projections rel_embedding (to_embedding_to_fun → apply, -to_embedding)
def
rel_embedding.simps.apply
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "rel_embedding" ]
See Note [custom simps projection]. We need to specify this projection explicitly in this case, because it is a composition of multiple projections.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_rel_hom_eq_coe (f : r ↪r s) : f.to_rel_hom = f
rfl
lemma
rel_embedding.to_rel_hom_eq_coe
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_coe_fn (f : r ↪r s) : ((f : r →r s) : α → β) = f
rfl
lemma
rel_embedding.coe_coe_fn
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
injective (f : r ↪r s) : injective f
f.inj'
theorem
rel_embedding.injective
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
inj (f : r ↪r s) {a b} : f a = f b ↔ a = b
f.injective.eq_iff
theorem
rel_embedding.inj
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
map_rel_iff (f : r ↪r s) {a b} : s (f a) (f b) ↔ r a b
f.map_rel_iff'
theorem
rel_embedding.map_rel_iff
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_fn_mk (f : α ↪ β) (o) : (@rel_embedding.mk _ _ r s f o : α → β) = f
rfl
theorem
rel_embedding.coe_fn_mk
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_fn_to_embedding (f : r ↪r s) : (f.to_embedding : α → β) = f
rfl
theorem
rel_embedding.coe_fn_to_embedding
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_fn_injective : @function.injective (r ↪r s) (α → β) coe_fn
fun_like.coe_injective
theorem
rel_embedding.coe_fn_injective
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "fun_like.coe_injective" ]
The map `coe_fn : (r ↪r s) → (α → β)` is injective.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ext ⦃f g : r ↪r s⦄ (h : ∀ x, f x = g x) : f = g
fun_like.ext _ _ h
theorem
rel_embedding.ext
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "fun_like.ext" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ext_iff {f g : r ↪r s} : f = g ↔ ∀ x, f x = g x
fun_like.ext_iff
theorem
rel_embedding.ext_iff
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "fun_like.ext_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
refl (r : α → α → Prop) : r ↪r r
⟨embedding.refl _, λ a b, iff.rfl⟩
def
rel_embedding.refl
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
Identity map is a relation embedding.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
trans (f : r ↪r s) (g : s ↪r t) : r ↪r t
⟨f.1.trans g.1, λ a b, by simp [f.map_rel_iff, g.map_rel_iff]⟩
def
rel_embedding.trans
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
Composition of two relation embeddings is a relation embedding.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
trans_apply (f : r ↪r s) (g : s ↪r t) (a : α) : (f.trans g) a = g (f a)
rfl
theorem
rel_embedding.trans_apply
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_trans (f : r ↪r s) (g : s ↪r t) : ⇑(f.trans g) = g ∘ f
rfl
theorem
rel_embedding.coe_trans
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
swap (f : r ↪r s) : swap r ↪r swap s
⟨f.to_embedding, λ a b, f.map_rel_iff⟩
def
rel_embedding.swap
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
A relation embedding is also a relation embedding between dual relations.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
preimage (f : α ↪ β) (s : β → β → Prop) : f ⁻¹'o s ↪r s
⟨f, λ a b, iff.rfl⟩
def
rel_embedding.preimage
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
If `f` is injective, then it is a relation embedding from the preimage relation of `s` to `s`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
eq_preimage (f : r ↪r s) : r = f ⁻¹'o s
by { ext a b, exact f.map_rel_iff.symm }
theorem
rel_embedding.eq_preimage
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_irrefl (f : r ↪r s) [is_irrefl β s] : is_irrefl α r
⟨λ a, mt f.map_rel_iff.2 (irrefl (f a))⟩
theorem
rel_embedding.is_irrefl
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_refl (f : r ↪r s) [is_refl β s] : is_refl α r
⟨λ a, f.map_rel_iff.1 $ refl _⟩
theorem
rel_embedding.is_refl
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_symm (f : r ↪r s) [is_symm β s] : is_symm α r
⟨λ a b, imp_imp_imp f.map_rel_iff.2 f.map_rel_iff.1 symm⟩
theorem
rel_embedding.is_symm
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "imp_imp_imp" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_asymm (f : r ↪r s) [is_asymm β s] : is_asymm α r
⟨λ a b h₁ h₂, asymm (f.map_rel_iff.2 h₁) (f.map_rel_iff.2 h₂)⟩
theorem
rel_embedding.is_asymm
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_antisymm : ∀ (f : r ↪r s) [is_antisymm β s], is_antisymm α r
| ⟨f, o⟩ ⟨H⟩ := ⟨λ a b h₁ h₂, f.inj' (H _ _ (o.2 h₁) (o.2 h₂))⟩
theorem
rel_embedding.is_antisymm
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_trans : ∀ (f : r ↪r s) [is_trans β s], is_trans α r
| ⟨f, o⟩ ⟨H⟩ := ⟨λ a b c h₁ h₂, o.1 (H _ _ _ (o.2 h₁) (o.2 h₂))⟩
theorem
rel_embedding.is_trans
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_total : ∀ (f : r ↪r s) [is_total β s], is_total α r
| ⟨f, o⟩ ⟨H⟩ := ⟨λ a b, (or_congr o o).1 (H _ _)⟩
theorem
rel_embedding.is_total
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_preorder : ∀ (f : r ↪r s) [is_preorder β s], is_preorder α r
| f H := by exactI {..f.is_refl, ..f.is_trans}
theorem
rel_embedding.is_preorder
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_partial_order : ∀ (f : r ↪r s) [is_partial_order β s], is_partial_order α r
| f H := by exactI {..f.is_preorder, ..f.is_antisymm}
theorem
rel_embedding.is_partial_order
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_linear_order : ∀ (f : r ↪r s) [is_linear_order β s], is_linear_order α r
| f H := by exactI {..f.is_partial_order, ..f.is_total}
theorem
rel_embedding.is_linear_order
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_strict_order : ∀ (f : r ↪r s) [is_strict_order β s], is_strict_order α r
| f H := by exactI {..f.is_irrefl, ..f.is_trans}
theorem
rel_embedding.is_strict_order
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_trichotomous : ∀ (f : r ↪r s) [is_trichotomous β s], is_trichotomous α r
| ⟨f, o⟩ ⟨H⟩ := ⟨λ a b, (or_congr o (or_congr f.inj'.eq_iff o)).1 (H _ _)⟩
theorem
rel_embedding.is_trichotomous
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_strict_total_order : ∀ (f : r ↪r s) [is_strict_total_order β s], is_strict_total_order α r
| f H := by exactI {..f.is_trichotomous, ..f.is_strict_order}
theorem
rel_embedding.is_strict_total_order
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
acc (f : r ↪r s) (a : α) : acc s (f a) → acc r a
begin generalize h : f a = b, intro ac, induction ac with _ H IH generalizing a, subst h, exact ⟨_, λ a' h, IH (f a') (f.map_rel_iff.2 h) _ rfl⟩ end
theorem
rel_embedding.acc
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
well_founded : ∀ (f : r ↪r s) (h : well_founded s), well_founded r
| f ⟨H⟩ := ⟨λ a, f.acc _ (H _)⟩
theorem
rel_embedding.well_founded
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_well_founded (f : r ↪r s) [is_well_founded β s] : is_well_founded α r
⟨f.well_founded is_well_founded.wf⟩
theorem
rel_embedding.is_well_founded
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "is_well_founded" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_well_order : ∀ (f : r ↪r s) [is_well_order β s], is_well_order α r
| f H := by exactI {wf := f.well_founded H.wf, ..f.is_strict_total_order}
theorem
rel_embedding.is_well_order
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "is_well_order" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
subtype.well_founded_lt [has_lt α] [well_founded_lt α] (p : α → Prop) : well_founded_lt (subtype p)
(subtype.rel_embedding (<) p).is_well_founded
instance
subtype.well_founded_lt
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "is_well_founded", "subtype.rel_embedding", "well_founded_lt" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
subtype.well_founded_gt [has_lt α] [well_founded_gt α] (p : α → Prop) : well_founded_gt (subtype p)
(subtype.rel_embedding (>) p).is_well_founded
instance
subtype.well_founded_gt
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "is_well_founded", "subtype.rel_embedding", "well_founded_gt" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
quotient.mk_rel_hom [setoid α] {r : α → α → Prop} (H) : r →r quotient.lift₂ r H
⟨@quotient.mk α _, λ _ _, id⟩
def
quotient.mk_rel_hom
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
`quotient.mk` as a relation homomorphism between the relation and the lift of a relation.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
quotient.out_rel_embedding [setoid α] {r : α → α → Prop} (H) : quotient.lift₂ r H ↪r r
⟨embedding.quotient_out α, begin refine λ x y, quotient.induction_on₂ x y (λ a b, _), apply iff_iff_eq.2 (H _ _ _ _ _ _); apply quotient.mk_out end⟩
def
quotient.out_rel_embedding
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "quotient.mk_out" ]
`quotient.out` as a relation embedding between the lift of a relation and the relation.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
quotient.out'_rel_embedding {s : setoid α} {r : α → α → Prop} (H) : (λ a b, quotient.lift_on₂' a b r H) ↪r r
{ to_fun := quotient.out', ..quotient.out_rel_embedding _ }
def
quotient.out'_rel_embedding
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "quotient.lift_on₂'", "quotient.out'", "quotient.out_rel_embedding" ]
`quotient.out'` as a relation embedding between the lift of a relation and the relation.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
acc_lift₂_iff [setoid α] {r : α → α → Prop} {H} {a} : acc (quotient.lift₂ r H) ⟦a⟧ ↔ acc r a
begin split, { exact rel_hom_class.acc (quotient.mk_rel_hom H) a, }, { intro ac, induction ac with _ H IH, dsimp at IH, refine ⟨_, λ q h, _⟩, obtain ⟨a', rfl⟩ := q.exists_rep, exact IH a' h, }, end
theorem
acc_lift₂_iff
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "quotient.mk_rel_hom", "rel_hom_class.acc" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
acc_lift_on₂'_iff {s : setoid α} {r : α → α → Prop} {H} {a} : acc (λ x y, quotient.lift_on₂' x y r H) (quotient.mk' a : quotient s) ↔ acc r a
acc_lift₂_iff
theorem
acc_lift_on₂'_iff
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "acc_lift₂_iff", "quotient.lift_on₂'", "quotient.mk'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
well_founded_lift₂_iff [setoid α] {r : α → α → Prop} {H} : well_founded (quotient.lift₂ r H) ↔ well_founded r
begin split, { exact rel_hom_class.well_founded (quotient.mk_rel_hom H), }, { refine λ wf, ⟨λ q, _⟩, obtain ⟨a, rfl⟩ := q.exists_rep, exact acc_lift₂_iff.2 (wf.apply a), }, end
theorem
well_founded_lift₂_iff
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "quotient.mk_rel_hom", "rel_hom_class.well_founded" ]
A relation is well founded iff its lift to a quotient is.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
well_founded_lift_on₂'_iff {s : setoid α} {r : α → α → Prop} {H} : well_founded (λ x y : quotient s, quotient.lift_on₂' x y r H) ↔ well_founded r
well_founded_lift₂_iff
theorem
well_founded_lift_on₂'_iff
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "quotient.lift_on₂'", "well_founded_lift₂_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_map_rel_iff (f : α → β) [is_antisymm α r] [is_refl β s] (hf : ∀ a b, s (f a) (f b) ↔ r a b) : r ↪r s
{ to_fun := f, inj' := λ x y h, antisymm ((hf _ _).1 (h ▸ refl _)) ((hf _ _).1 (h ▸ refl _)), map_rel_iff' := hf }
def
rel_embedding.of_map_rel_iff
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
To define an relation embedding from an antisymmetric relation `r` to a reflexive relation `s` it suffices to give a function together with a proof that it satisfies `s (f a) (f b) ↔ r a b`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_map_rel_iff_coe (f : α → β) [is_antisymm α r] [is_refl β s] (hf : ∀ a b, s (f a) (f b) ↔ r a b) : ⇑(of_map_rel_iff f hf : r ↪r s) = f
rfl
lemma
rel_embedding.of_map_rel_iff_coe
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_monotone [is_trichotomous α r] [is_asymm β s] (f : α → β) (H : ∀ a b, r a b → s (f a) (f b)) : r ↪r s
begin haveI := @is_asymm.is_irrefl β s _, refine ⟨⟨f, λ a b e, _⟩, λ a b, ⟨λ h, _, H _ _⟩⟩, { refine ((@trichotomous _ r _ a b).resolve_left _).resolve_right _; exact λ h, @irrefl _ s _ _ (by simpa [e] using H _ _ h) }, { refine (@trichotomous _ r _ a b).resolve_right (or.rec (λ e, _) (λ h', _)), { subs...
def
rel_embedding.of_monotone
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "is_asymm.is_irrefl" ]
It suffices to prove `f` is monotone between strict relations to show it is a relation embedding.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_monotone_coe [is_trichotomous α r] [is_asymm β s] (f : α → β) (H) : (@of_monotone _ _ r s _ _ f H : α → β) = f
rfl
theorem
rel_embedding.of_monotone_coe
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
of_is_empty (r : α → α → Prop) (s : β → β → Prop) [is_empty α] : r ↪r s
⟨embedding.of_is_empty, is_empty_elim⟩
def
rel_embedding.of_is_empty
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "is_empty" ]
A relation embedding from an empty type.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sum_lift_rel_inl (r : α → α → Prop) (s : β → β → Prop) : r ↪r sum.lift_rel r s
{ to_fun := sum.inl, inj' := sum.inl_injective, map_rel_iff' := λ a b, sum.lift_rel_inl_inl }
def
rel_embedding.sum_lift_rel_inl
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "sum.inl_injective", "sum.lift_rel", "sum.lift_rel_inl_inl" ]
`sum.inl` as a relation embedding into `sum.lift_rel r s`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sum_lift_rel_inr (r : α → α → Prop) (s : β → β → Prop) : s ↪r sum.lift_rel r s
{ to_fun := sum.inr, inj' := sum.inr_injective, map_rel_iff' := λ a b, sum.lift_rel_inr_inr }
def
rel_embedding.sum_lift_rel_inr
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "sum.inr_injective", "sum.lift_rel", "sum.lift_rel_inr_inr" ]
`sum.inr` as a relation embedding into `sum.lift_rel r s`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sum_lift_rel_map (f : r ↪r s) (g : t ↪r u) : sum.lift_rel r t ↪r sum.lift_rel s u
{ to_fun := sum.map f g, inj' := f.injective.sum_map g.injective, map_rel_iff' := by { rintro (a | b) (c | d); simp [f.map_rel_iff, g.map_rel_iff] } }
def
rel_embedding.sum_lift_rel_map
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "sum.lift_rel", "sum.map" ]
`sum.map` as a relation embedding between `sum.lift_rel` relations.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sum_lex_inl (r : α → α → Prop) (s : β → β → Prop) : r ↪r sum.lex r s
{ to_fun := sum.inl, inj' := sum.inl_injective, map_rel_iff' := λ a b, sum.lex_inl_inl }
def
rel_embedding.sum_lex_inl
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "sum.inl_injective", "sum.lex", "sum.lex_inl_inl" ]
`sum.inl` as a relation embedding into `sum.lex r s`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sum_lex_inr (r : α → α → Prop) (s : β → β → Prop) : s ↪r sum.lex r s
{ to_fun := sum.inr, inj' := sum.inr_injective, map_rel_iff' := λ a b, sum.lex_inr_inr }
def
rel_embedding.sum_lex_inr
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "sum.inr_injective", "sum.lex", "sum.lex_inr_inr" ]
`sum.inr` as a relation embedding into `sum.lex r s`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sum_lex_map (f : r ↪r s) (g : t ↪r u) : sum.lex r t ↪r sum.lex s u
{ to_fun := sum.map f g, inj' := f.injective.sum_map g.injective, map_rel_iff' := by { rintro (a | b) (c | d); simp [f.map_rel_iff, g.map_rel_iff] } }
def
rel_embedding.sum_lex_map
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "sum.lex", "sum.map" ]
`sum.map` as a relation embedding between `sum.lex` relations.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
prod_lex_mk_left (s : β → β → Prop) {a : α} (h : ¬ r a a) : s ↪r prod.lex r s
{ to_fun := prod.mk a, inj' := prod.mk.inj_left a, map_rel_iff' := λ b₁ b₂, by simp [prod.lex_def, h] }
def
rel_embedding.prod_lex_mk_left
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "prod.lex_def", "prod.mk.inj_left" ]
`λ b, prod.mk a b` as a relation embedding.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
prod_lex_mk_right (r : α → α → Prop) {b : β} (h : ¬ s b b) : r ↪r prod.lex r s
{ to_fun := λ a, (a, b), inj' := prod.mk.inj_right b, map_rel_iff' := λ a₁ a₂, by simp [prod.lex_def, h] }
def
rel_embedding.prod_lex_mk_right
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "prod.lex_def", "prod.mk.inj_right" ]
`λ a, prod.mk a b` as a relation embedding.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
prod_lex_map (f : r ↪r s) (g : t ↪r u) : prod.lex r t ↪r prod.lex s u
{ to_fun := prod.map f g, inj' := f.injective.prod_map g.injective, map_rel_iff' := λ a b, by simp [prod.lex_def, f.map_rel_iff, g.map_rel_iff] }
def
rel_embedding.prod_lex_map
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "prod.lex_def" ]
`prod.map` as a relation embedding.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
rel_iso {α β : Type*} (r : α → α → Prop) (s : β → β → Prop) extends α ≃ β
(map_rel_iff' : ∀ {a b}, s (to_equiv a) (to_equiv b) ↔ r a b)
structure
rel_iso
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
A relation isomorphism is an equivalence that is also a relation embedding.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_rel_embedding (f : r ≃r s) : r ↪r s
⟨f.to_equiv.to_embedding, λ _ _, f.map_rel_iff'⟩
def
rel_iso.to_rel_embedding
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
Convert an `rel_iso` to an `rel_embedding`. This function is also available as a coercion but often it is easier to write `f.to_rel_embedding` than to write explicitly `r` and `s` in the target type.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_equiv_injective : injective (to_equiv : (r ≃r s) → α ≃ β)
| ⟨e₁, o₁⟩ ⟨e₂, o₂⟩ h := by { congr, exact h }
theorem
rel_iso.to_equiv_injective
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
to_rel_embedding_eq_coe (f : r ≃r s) : f.to_rel_embedding = f
rfl
lemma
rel_iso.to_rel_embedding_eq_coe
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_coe_fn (f : r ≃r s) : ((f : r ↪r s) : α → β) = f
rfl
lemma
rel_iso.coe_coe_fn
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
map_rel_iff (f : r ≃r s) {a b} : s (f a) (f b) ↔ r a b
f.map_rel_iff'
theorem
rel_iso.map_rel_iff
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_fn_mk (f : α ≃ β) (o : ∀ ⦃a b⦄, s (f a) (f b) ↔ r a b) : (rel_iso.mk f o : α → β) = f
rfl
theorem
rel_iso.coe_fn_mk
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_fn_to_equiv (f : r ≃r s) : (f.to_equiv : α → β) = f
rfl
theorem
rel_iso.coe_fn_to_equiv
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_fn_injective : @function.injective (r ≃r s) (α → β) coe_fn
fun_like.coe_injective
theorem
rel_iso.coe_fn_injective
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "fun_like.coe_injective" ]
The map `coe_fn : (r ≃r s) → (α → β)` is injective. Lean fails to parse `function.injective (λ e : r ≃r s, (e : α → β))`, so we use a trick to say the same.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ext ⦃f g : r ≃r s⦄ (h : ∀ x, f x = g x) : f = g
fun_like.ext f g h
theorem
rel_iso.ext
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "fun_like.ext" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ext_iff {f g : r ≃r s} : f = g ↔ ∀ x, f x = g x
fun_like.ext_iff
theorem
rel_iso.ext_iff
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "fun_like.ext_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
symm (f : r ≃r s) : s ≃r r
⟨f.to_equiv.symm, λ a b, by erw [← f.map_rel_iff, f.1.apply_symm_apply, f.1.apply_symm_apply]⟩
def
rel_iso.symm
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
Inverse map of a relation isomorphism is a relation isomorphism.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
simps.apply (h : r ≃r s) : α → β
h
def
rel_iso.simps.apply
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
See Note [custom simps projection]. We need to specify this projection explicitly in this case, because it is a composition of multiple projections.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
simps.symm_apply (h : r ≃r s) : β → α
h.symm initialize_simps_projections rel_iso (to_equiv_to_fun → apply, to_equiv_inv_fun → symm_apply, -to_equiv)
def
rel_iso.simps.symm_apply
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "rel_iso" ]
See Note [custom simps projection].
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
refl (r : α → α → Prop) : r ≃r r
⟨equiv.refl _, λ a b, iff.rfl⟩
def
rel_iso.refl
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
Identity map is a relation isomorphism.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
trans (f₁ : r ≃r s) (f₂ : s ≃r t) : r ≃r t
⟨f₁.to_equiv.trans f₂.to_equiv, λ a b, f₂.map_rel_iff.trans f₁.map_rel_iff⟩
def
rel_iso.trans
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
Composition of two relation isomorphisms is a relation isomorphism.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
default_def (r : α → α → Prop) : default = rel_iso.refl r
rfl
lemma
rel_iso.default_def
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "rel_iso.refl" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
cast {α β : Type u} {r : α → α → Prop} {s : β → β → Prop} (h₁ : α = β) (h₂ : r == s) : r ≃r s
⟨equiv.cast h₁, λ a b, by { subst h₁, rw eq_of_heq h₂, refl }⟩
def
rel_iso.cast
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[]
A relation isomorphism between equal relations on equal types.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
cast_symm {α β : Type u} {r : α → α → Prop} {s : β → β → Prop} (h₁ : α = β) (h₂ : r == s) : (rel_iso.cast h₁ h₂).symm = rel_iso.cast h₁.symm h₂.symm
rfl
theorem
rel_iso.cast_symm
order.rel_iso
src/order/rel_iso/basic.lean
[ "data.fun_like.basic", "logic.embedding.basic", "order.rel_classes" ]
[ "rel_iso.cast" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83