/-
Copyright (c) 2020 Kim Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kim Morrison
-/
module
public import Mathlib.Data.Fintype.OfMap
set_option doc.verso true
set_option doc.verso.suggestions false
/-!
# `EquivFunctor` instances
We derive some `EquivFunctor` instances, to enable `equiv_rw` to rewrite under these functions.
-/
public section
open Equiv
instance EquivFunctorUnique : EquivFunctor Unique where
map e := Equiv.uniqueCongr e
map_refl' α := by simp [eq_iff_true_of_subsingleton]
map_trans' := by simp [eq_iff_true_of_subsingleton]
instance EquivFunctorPerm : EquivFunctor Perm where
map e p := (e.symm.trans p).trans e
map_refl' α := by ext; simp
map_trans' _ _ := by ext; simp
-- There is a classical instance of `LawfulFunctor Finset` available,
-- but we provide this computable alternative separately.
instance EquivFunctorFinset : EquivFunctor Finset where
map e s := s.map e.toEmbedding
map_refl' α := by ext; simp
map_trans' k h := by ext; simp [-trans_toEmbedding]
instance EquivFunctorFintype : EquivFunctor Fintype where
map e _ := Fintype.ofBijective e e.bijective
map_refl' α := by ext; simp [eq_iff_true_of_subsingleton]
map_trans' := by simp [eq_iff_true_of_subsingleton]
¤ Dauer der Verarbeitung: 0.3 Sekunden
¤
*© Formatika GbR, Deutschland