Relation homomorphisms, embeddings, isomorphisms #
This file defines relation homomorphisms, embeddings, isomorphisms and order embeddings and isomorphisms.
Main declarations #
RelHom: Relation homomorphism. ARelHom r sis a functionf : α → βsuch thatr a b → s (f a) (f b).RelEmbedding: Relation embedding. ARelEmbedding r sis an embeddingf : α ↪ βsuch thatr a b ↔ s (f a) (f b).RelIso: Relation isomorphism. ARelIso r sis an equivalencef : α ≃ βsuch thatr a b ↔ s (f a) (f b).sumLexCongr,prodLexCongr: Creates a relation homomorphism between twoSum.Lexor twoProd.Lexfrom relation homomorphisms between their arguments.
Notation #
→r:RelHom↪r:RelEmbedding≃r:RelIso
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).
Instances For
RelHomClass 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 outParams since figuring them out from a goal is a higher-order
matching problem that Lean usually can't do unaided.
- map_rel (f : F) {a b : α} : r a b → s (f a) (f b)
A
RelHomClasssends related elements to related elements
Instances
Alias of RelHomClass.irrefl.
Alias of RelHomClass.asymm.
A function is a relation homomorphism from the preimage relation of s to s.
Instances For
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).
- toFun : α → β
- map_rel_iff' {a b : α} : s (self.toEmbedding a) (self.toEmbedding b) ↔ r a b
Elements are related iff they are related after apply a
RelEmbedding
Instances For
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).
Instances For
Identity map is a relation embedding.
Instances For
If f is injective, then it is a relation embedding from the
preimage relation of s to s.
Instances For
Alias of RelEmbedding.irrefl.
Alias of RelEmbedding.stdRefl.
Alias of RelEmbedding.symm.
Alias of RelEmbedding.asymm.
Alias of RelEmbedding.antisymm.
Alias of RelEmbedding.total.
Alias of RelEmbedding.trichotomous.
The induced relation on a subtype is an embedding under the natural inclusion.
Instances For
Quotient.mk as a relation homomorphism between the relation and the lift of a relation.
Instances For
Quotient.out as a relation embedding between the lift of a relation and the relation.
Instances For
A relation is well founded iff its lift to a quotient is.
Alias of the reverse direction of wellFounded_lift₂_iff.
A relation is well founded iff its lift to a quotient is.
Alias of the forward direction of wellFounded_lift₂_iff.
A relation is well founded iff its lift to a quotient is.
Alias of the reverse direction of wellFounded_liftOn₂'_iff.
Alias of the forward direction of wellFounded_liftOn₂'_iff.
To define a 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.
Instances For
It suffices to prove f is monotone between strict relations
to show it is a relation embedding.
Instances For
Sum.inl as a relation embedding into Sum.LiftRel r s.
Instances For
Sum.inr as a relation embedding into Sum.LiftRel r s.
Instances For
A relation isomorphism is an equivalence that is also a relation embedding.
Instances For
Convert a RelIso to a RelEmbedding. This function is also available as a coercion
but often it is easier to write f.toRelEmbedding than to write explicitly r and s
in the target type.
Instances For
The map DFunLike.coe : (r ≃r s) → (α → β) is injective.
Identity map is a relation isomorphism.
Instances For
A relation isomorphism between equal relations on equal types.
Instances For
Any equivalence lifts to a relation isomorphism between s and its preimage.
Instances For
Transport a RelHom across a pair of RelIsos, by pre- and post-composition.
This is Equiv.arrowCongr for RelHom.
Instances For
Given relation isomorphisms r₁ ≃r s₁ and r₂ ≃r s₂, construct a relation isomorphism for the
lexicographic orders on the sum.
Instances For
Given relation isomorphisms r₁ ≃r s₁ and r₂ ≃r s₂, construct a relation isomorphism for the
lexicographic orders on the product.