Relation lifting to sets #
Mirror of Mathlib/Data/Set/Functor.lean: the relation lifting of the powerset functor.
Set.LiftRel r s t holds when every member of s is r-related to some member of t and every
member of t is r-related from some member of s. This is the Egli–Milner lifting, the Set
counterpart of Computation.LiftRel, and at a homogeneous relation the functor-level
Functor.Liftr. [UPSTREAM]
Main definitions #
Set.LiftRel r s t: every member ofshas anr-partner int, and conversely.
Main results #
Set.liftRel_iff_subset_preimage_image,Set.liftRel_iff_exists_dom_cod,Set.liftRel_iff_biTotal,Set.liftRel_iff_liftr: the lifting as twoSetRelimage inclusions, as a subrelation with the given domain and codomain, as bitotality of the restriction, and asFunctor.Liftr.Set.liftRel_eq,Set.liftRel_comp: the lifting sends equality to equality and relational composition to composition.Set.LiftRel.union,Set.LiftRel.biUnion: closure under unions, and under the indexed unions of related families, thebindofComputation.liftRel_bind.- The lifting of a reflexive, symmetric or transitive relation is reflexive, symmetric or
transitive, and
Set.LiftRel.equivfor equivalences.
Implementation notes #
By liftRel_eq and liftRel_comp the lifting is a functor from relations to relations; a lift of
dynamic meanings to plural states is an instance, and inherits identity and sequencing from here.
The relation lifting of r to sets: every member of s is r-related to some member of t,
and every member of t is r-related from some member of s.
Equations
- Set.LiftRel r s t = ((∀ a ∈ s, ∃ b ∈ t, r a b) ∧ ∀ b ∈ t, ∃ a ∈ s, r a b)
Instances For
At a homogeneous relation, the lifting is the functor-level Functor.Liftr of Set.
Lifted families over lifted index sets: if s and t are related and related indices carry
related sets, the indexed unions are related.