-
Notifications
You must be signed in to change notification settings - Fork 298
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(data/equiv/functor): map_equiv (#1026)
* feat(data/equiv/functor): map_equiv * golf proofs
- Loading branch information
1 parent
02857d5
commit e7b64c5
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/- | ||
Copyright (c) 2019 Johan Commelin. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Johan Commelin, Simon Hudon | ||
-/ | ||
|
||
import data.equiv.basic | ||
|
||
universes u v | ||
|
||
variables {α β : Type u} {f : Type u → Type v} [functor f] [is_lawful_functor f] | ||
open functor equiv function is_lawful_functor | ||
|
||
def functor.map_equiv (h : α ≃ β) : f α ≃ f β := | ||
{ to_fun := map h, | ||
inv_fun := map h.symm, | ||
left_inv := λ x, | ||
by { rw map_map, convert is_lawful_functor.id_map x, ext a, apply symm_apply_apply }, | ||
right_inv := λ x, | ||
by { rw map_map, convert is_lawful_functor.id_map x, ext a, apply apply_symm_apply } } |