Module docstring
{"# Equivalence between types
In this file we define two types:
Equiv α βa.k.a.α ≃ β: a bijective mapα → βbundled with its inverse map; we use this (and not equality!) to express that variousTypes orSorts are equivalent.Equiv.Perm α: the group of permutationsα ≃ α. More lemmas aboutEquiv.Permcan be found inMathlib.GroupTheory.Perm.
Then we define
canonical isomorphisms between various types: e.g.,
Equiv.refl αis the identity map interpreted asα ≃ α;
operations on equivalences: e.g.,
Equiv.symm e : β ≃ αis the inverse ofe : α ≃ β;Equiv.trans e₁ e₂ : α ≃ γis the composition ofe₁ : α ≃ βande₂ : β ≃ γ(note the order of the arguments!);
definitions that transfer some instances along an equivalence. By convention, we transfer instances from right to left.
Equiv.inhabitedtakese : α ≃ βand[Inhabited β]and returnsInhabited α;Equiv.uniquetakese : α ≃ βand[Unique β]and returnsUnique α;Equiv.decidableEqtakese : α ≃ βand[DecidableEq β]and returnsDecidableEq α.
More definitions of this kind can be found in other files. E.g.,
Mathlib.Algebra.Equiv.TransferInstancedoes it for many algebraic type classes likeGroup,Module, etc.
Many more such isomorphisms and operations are defined in Mathlib.Logic.Equiv.Basic.
Tags
equivalence, congruence, bijective map "}