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.
Equations
Creates a pequiv that is the identity on s, and none outside of it.
Equations
- pequiv.inhabited = {default := ⊥}
Create a pequiv which sends a to b and b to a, but is otherwise none.
Equations
- pequiv.semilattice_inf = {inf := λ (f g : α ≃. β), {to_fun := λ (a : α), ite (⇑f a = ⇑g a) (⇑f a) none, inv_fun := λ (b : β), ite (⇑(f.symm) b = ⇑(g.symm) b) (⇑(f.symm) b) 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 := _}