This files defines equivalences between subsets of given types. An element e of local_equiv α β is made of two maps e.to_fun and e.inv_fun respectively from α to β and from β to α (just like equivs), which are inverse to each other on the subsets e.source and e.target of respectively α and β.
They are designed in particular to define charts on manifolds.
The main functionality is e.trans f, which composes the two local equivalences by restricting the source and target to the maximal set where the composition makes sense.
Contrary to equivs, we do not register the coercion to functions and we use explicitly to_fun and inv_fun: coercions create numerous unification problems for manifolds.
equiv.to_local_equiv: associating a local equiv to an equiv, with source = target = univ local_equiv.symm : the inverse of a local equiv local_equiv.trans : the composition of two local equivs local_equiv.refl : the identity local equiv local_equiv.of_set : the identity on a set s eq_on_source : equivalence relation describing the "right" notion of equality for local equivs (see below in implementation notes)
There are at least three possible implementations of local equivalences:
Each of these implementations has pros and cons.
Local equivalence between subsets source and target of α and β respectively. The (global) maps to_fun : α → β and inv_fun : β → α map source to target and conversely, and are inverse to each other there. The values of to_fun outside of source and of inv_fun outside of target are irrelevant.
Associating a local_equiv to an equiv
Associating to a local_equiv an equiv between the source and the target
The inverse of a local equiv
A local equiv induces a bijection between its source and target
Two local equivs that have the same source, same to_fun and same inv_fun, coincide.
Restricting a local equivalence to e.source ∩ s
The identity local equiv
The identity local equiv on a set s
Composing two local equivs if the target of the first coincides with the source of the second.
Composing two local equivs, by restricting to the maximal domain where their composition is well defined.
eq_on_source e e' means that e and e' have the same source, and coincide there. Then e and e' should really be considered the same local equiv.
eq_on_source is an equivalence relation
If two local equivs are equivalent, so are their inverses
Two equivalent local equivs have the same source
Two equivalent local equivs have the same target
Two equivalent local equivs coincide on the source
Two equivalent local equivs have coinciding inverses on the target
Composition of local equivs respects equivalence
Restriction of local equivs respects equivalence
Preimages are respected by equivalence
Composition of a local equiv and its inverse is equivalent to the restriction of the identity to the source
Composition of the inverse of a local equiv and this local equiv is equivalent to the restriction of the identity to the target
Two equivalent local equivs are equal when the source and target are univ
The product of two local equivs, as a local equiv on the product.