Partial Equivalences #
In this file, we define partial equivalences pequiv, which are a bijection between a subset of α
and a subset of β. Notationally, a pequiv is denoted by "≃." (note that the full stop is part
of the notation). The way we store these internally is with two functions f : α → option β and
the reverse function g : β → option α, with the condition that if f a is option.some b,
then g b is option.some a.
Main results #
pequiv.of_set: creates apequivfrom a sets, which sends an element to itself if it is ins.pequiv.single: given two elementsa : αandb : β, create apequivthat sends them to each other, and ignores all other elements.pequiv.injective_of_forall_ne_is_some/injective_of_forall_is_some: If the domain of apequivis all ofα(except possibly one point), itsto_funis injective.
Canonical order #
pequiv is canonically ordered by inclusion; that is, if a function f defined on a subset s
is equal to g on that subset, but g is also defined on a larger set, then f ≤ g. We also have
a definition of ⊥, which is the empty pequiv (sends all to none), which in the end gives us a
semilattice_inf with an order_bot instance.
Tags #
pequiv, partial equivalence
- to_fun : α → option β
- inv_fun : β → option α
- inv : ∀ (a : α) (b : β), a ∈ self.inv_fun b ↔ b ∈ self.to_fun a
A pequiv is a partial equivalence, a representation of a bijection between a subset
of α and a subset of β. See also local_equiv for a version that requires to_fun and
inv_fun to be globally defined functions and has source and target sets as extra fields.
Instances for pequiv
- pequiv.has_sizeof_inst
- pequiv.has_coe_to_fun
- pequiv.has_bot
- pequiv.inhabited
- pequiv.partial_order
- pequiv.order_bot
- pequiv.semilattice_inf
Equations
The identity map as a partial equivalence.
Equations
- pequiv.refl α = {to_fun := option.some α, inv_fun := option.some α, inv := _}
Composition of partial equivalences f : α ≃. β and g : β ≃. γ.
Creates a pequiv that is the identity on s, and none outside of it.
Equations
- pequiv.of_set s = {to_fun := λ (a : α), ite (a ∈ s) (option.some a) option.none, inv_fun := λ (a : α), ite (a ∈ s) (option.some a) option.none, inv := _}
Equations
- pequiv.has_bot = {bot := {to_fun := λ (_x : α), option.none, inv_fun := λ (_x : β), option.none, inv := _}}
Equations
- pequiv.inhabited = {default := ⊥}
Create a pequiv which sends a to b and b to a, but is otherwise none.
Equations
- pequiv.single a b = {to_fun := λ (x : α), ite (x = a) (option.some b) option.none, inv_fun := λ (x : β), ite (x = b) (option.some a) option.none, inv := _}
Equations
- pequiv.semilattice_inf = {inf := λ (f g : α ≃. β), {to_fun := λ (a : α), ite (⇑f a = ⇑g a) (⇑f a) option.none, inv_fun := λ (b : β), ite (⇑(f.symm) b = ⇑(g.symm) b) (⇑(f.symm) b) option.none, inv := _}, le := partial_order.le pequiv.partial_order, lt := partial_order.lt pequiv.partial_order, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, inf_le_left := _, inf_le_right := _, le_inf := _}