Setoid.Functions.Bijective¶
Bijective functions on setoids¶
This is the Setoid.Functions.Bijective module of the agda-algebras library.
A bijective function from a setoid ๐จ = (A, โโ) to a setoid ๐ฉ = (B, โโ) is a function f : ๐จ โถ ๐ฉ that is both injective and surjective. (See the definitions in Setoid.Functions.Injective and Setoid.Functions.Surjective.
IsBijective : (๐จ โถ ๐ฉ) โ Type (ฮฑ โ ฮฒ โ ฯแต โ ฯแต) IsBijective f = IsInjective f ร IsSurjective f BijInv : (f : ๐จ โถ ๐ฉ) โ IsBijective f โ ๐ฉ โถ ๐จ BijInv f (fM , fE) = record { to = finv ; cong = c } where finv : B โ A finv b = Inv f fE handler : โ {bโ bโ}(iโ : Image f โ bโ)(iโ : Image f โ bโ) โ bโ โโ bโ โ (Inv f iโ) โโ (Inv f iโ) handler (eq a x) (eq aโ xโ) bโโbโ = fM (trans (sym x) (trans bโโbโ xโ)) c : โ {bโ bโ} โ bโ โโ bโ โ (finv bโ) โโ (finv bโ) c bโโbโ = handler fE fE bโโbโ