Added the definition of the contravariant functors to abelian groups.

This commit is contained in:
Sayantan Khan 2017-04-13 22:23:34 +05:30
parent dff24cc9e2
commit 3f3fc5c785
2 changed files with 38 additions and 1 deletions

3
.gitignore vendored
View file

@ -23,4 +23,5 @@ CMakeFiles/
doc/html
make.deps
src/emacs/dependencies
compile_commands.json
compile_commands.json
*.hlean#

View file

@ -0,0 +1,36 @@
/-
Authors: Sayantan Khan
Contravariant functors from (pointed?) Types to Abelian groups.
-/
import algebra.group algebra.homomorphism
import types.pointed
open algebra
open sigma.ops
open function
open pointed
structure type_ab_functor : Type :=
(fun_ty : Type → Type)
(target_ab : Π (A), add_ab_group(fun_ty(A)))
(fun_arr : Π {A B}, (A → B) → (Σ (f : fun_ty(B) → fun_ty(A)), is_add_hom(f)))
(respect_id : Π {A}, pr₁(fun_arr (@id A)) = id)
(respect_comp : Π {A B C}, Π (f : A → B), Π (g : B → C),
(pr₁(fun_arr (g ∘ f))) = ((pr₁ (fun_arr(f))) ∘ (pr₁ (fun_arr(g)))))
attribute [coercion] type_ab_functor.fun_ty
lemma extract_add : Π (A : Type), ab_group(A) → has_add(A) :=
λ A proofOfAbGroup, has_add.mk(algebra.ab_group.mul)
structure Type_ab_functor : Type :=
(fun_ty : Type* → Type)
(target_ab : Π (A), add_ab_group(fun_ty(A)))
(fun_arr : Π {A B : Type*}, (A →* B) → (Σ (f : fun_ty(B) → fun_ty(A)), is_add_hom(f)))
(respect_id : Π {A}, pr₁(fun_arr (pid A)) = id)
(respect_comp : Π {A B C}, Π (f : A →* B), Π (g : B →* C),
(pr₁(fun_arr (g ∘* f))) = ((pr₁ (fun_arr(f))) ∘ (pr₁ (fun_arr(g)))))
attribute [coercion] Type_ab_functor.fun_ty