2016-10-13 19:04:57 +00:00
|
|
|
|
/-
|
|
|
|
|
Copyright (c) 2015 Floris van Doorn. All rights reserved.
|
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
|
Authors: Floris van Doorn, Egbert Rijke
|
|
|
|
|
|
|
|
|
|
Constructions with groups
|
|
|
|
|
-/
|
|
|
|
|
|
2016-10-13 20:01:17 +00:00
|
|
|
|
import .quotient_group .free_commutative_group
|
|
|
|
|
|
2016-11-14 19:44:29 +00:00
|
|
|
|
open eq algebra is_trunc set_quotient relation sigma prod sum list trunc function equiv sigma.ops
|
2016-10-13 19:04:57 +00:00
|
|
|
|
|
|
|
|
|
namespace group
|
|
|
|
|
|
2017-04-07 19:56:37 +00:00
|
|
|
|
variables {G G' : AddGroup} (H : subgroup_rel G) (N : normal_subgroup_rel G) {g g' h h' k : G}
|
|
|
|
|
{A B : AddAbGroup}
|
2016-10-13 19:04:57 +00:00
|
|
|
|
|
|
|
|
|
variables (X : Set) {l l' : list (X ⊎ X)}
|
|
|
|
|
|
|
|
|
|
section
|
|
|
|
|
|
2017-04-07 19:56:37 +00:00
|
|
|
|
parameters {I : Set} (Y : I → AddAbGroup)
|
|
|
|
|
variables {A' : AddAbGroup} {Y' : I → AddAbGroup}
|
2016-10-13 19:04:57 +00:00
|
|
|
|
|
2017-04-07 19:56:37 +00:00
|
|
|
|
definition dirsum_carrier : AddAbGroup := free_ab_group (trunctype.mk (Σi, Y i) _)
|
2016-11-24 04:54:57 +00:00
|
|
|
|
local abbreviation ι [constructor] := @free_ab_group_inclusion
|
2016-10-13 19:04:57 +00:00
|
|
|
|
inductive dirsum_rel : dirsum_carrier → Type :=
|
2017-04-07 19:56:37 +00:00
|
|
|
|
| rmk : Πi y₁ y₂, dirsum_rel (ι ⟨i, y₁⟩ + ι ⟨i, y₂⟩ + -(ι ⟨i, y₁ + y₂⟩))
|
2016-10-13 19:04:57 +00:00
|
|
|
|
|
2017-03-31 22:21:02 +00:00
|
|
|
|
definition dirsum : AddAbGroup := quotient_ab_group_gen dirsum_carrier (λg, ∥dirsum_rel g∥)
|
2016-11-14 19:44:29 +00:00
|
|
|
|
|
2017-04-07 19:56:37 +00:00
|
|
|
|
-- definition dirsum_carrier_incl [constructor] (i : I) : Y i →a dirsum_carrier :=
|
2016-11-14 19:44:29 +00:00
|
|
|
|
|
2017-04-07 19:56:37 +00:00
|
|
|
|
definition dirsum_incl [constructor] (i : I) : Y i →a dirsum :=
|
|
|
|
|
add_homomorphism.mk (λy, class_of (ι ⟨i, y⟩))
|
2016-11-14 19:44:29 +00:00
|
|
|
|
begin intro g h, symmetry, apply gqg_eq_of_rel, apply tr, apply dirsum_rel.rmk end
|
|
|
|
|
|
2017-03-31 22:21:02 +00:00
|
|
|
|
parameter {Y}
|
|
|
|
|
definition dirsum.rec {P : dirsum → Type} [H : Πg, is_prop (P g)]
|
2017-04-07 19:56:37 +00:00
|
|
|
|
(h₁ : Πi (y : Y i), P (dirsum_incl i y)) (h₂ : P 0) (h₃ : Πg h, P g → P h → P (g + h)) :
|
2017-03-31 22:21:02 +00:00
|
|
|
|
Πg, P g :=
|
|
|
|
|
begin
|
|
|
|
|
refine @set_quotient.rec_prop _ _ _ H _,
|
|
|
|
|
refine @set_quotient.rec_prop _ _ _ (λx, !H) _,
|
|
|
|
|
esimp, intro l, induction l with s l ih,
|
|
|
|
|
exact h₂,
|
|
|
|
|
induction s with v v,
|
|
|
|
|
induction v with i y,
|
|
|
|
|
exact h₃ _ _ (h₁ i y) ih,
|
|
|
|
|
induction v with i y,
|
|
|
|
|
refine h₃ (gqg_map _ _ (class_of [inr ⟨i, y⟩])) _ _ ih,
|
2017-04-07 19:56:37 +00:00
|
|
|
|
refine transport P _ (h₁ i (-y)),
|
2017-03-31 22:21:02 +00:00
|
|
|
|
refine _ ⬝ !one_mul,
|
2017-04-07 19:56:37 +00:00
|
|
|
|
refine _ ⬝ ap (λx, mul x _) (to_respect_zero (dirsum_incl i)),
|
2017-03-31 22:21:02 +00:00
|
|
|
|
apply gqg_eq_of_rel',
|
|
|
|
|
apply tr, esimp,
|
2017-04-07 19:56:37 +00:00
|
|
|
|
refine transport dirsum_rel _ (dirsum_rel.rmk i (-y) y),
|
|
|
|
|
rewrite [add.left_inv, add.assoc],
|
2017-03-31 22:21:02 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-04-07 19:56:37 +00:00
|
|
|
|
definition dirsum_homotopy {φ ψ : dirsum →a A'}
|
2017-03-31 22:21:02 +00:00
|
|
|
|
(h : Πi (y : Y i), φ (dirsum_incl i y) = ψ (dirsum_incl i y)) : φ ~ ψ :=
|
|
|
|
|
begin
|
|
|
|
|
refine dirsum.rec _ _ _,
|
|
|
|
|
exact h,
|
2017-04-07 19:56:37 +00:00
|
|
|
|
refine !to_respect_zero ⬝ !to_respect_zero⁻¹,
|
2017-04-13 18:54:48 +00:00
|
|
|
|
intro g₁ g₂ h₁ h₂, rewrite [+ to_respect_add', h₁, h₂]
|
2017-03-31 22:21:02 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-04-07 19:56:37 +00:00
|
|
|
|
definition dirsum_elim_resp_quotient (f : Πi, Y i →a A') (g : dirsum_carrier)
|
2016-11-24 04:54:57 +00:00
|
|
|
|
(r : ∥dirsum_rel g∥) : free_ab_group_elim (λv, f v.1 v.2) g = 1 :=
|
2016-11-14 19:44:29 +00:00
|
|
|
|
begin
|
2016-11-18 20:20:22 +00:00
|
|
|
|
induction r with r, induction r,
|
2017-04-07 19:56:37 +00:00
|
|
|
|
rewrite [to_respect_add, to_respect_neg], apply add_neg_eq_of_eq_add,
|
2017-04-13 18:54:48 +00:00
|
|
|
|
rewrite [zero_add, to_respect_add, ▸*, ↑foldl, +one_mul, to_respect_add']
|
2016-11-14 19:44:29 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-04-07 19:56:37 +00:00
|
|
|
|
definition dirsum_elim [constructor] (f : Πi, Y i →a A') : dirsum →a A' :=
|
2016-11-24 04:54:57 +00:00
|
|
|
|
gqg_elim _ (free_ab_group_elim (λv, f v.1 v.2)) (dirsum_elim_resp_quotient f)
|
2016-11-18 20:20:22 +00:00
|
|
|
|
|
2017-04-07 19:56:37 +00:00
|
|
|
|
definition dirsum_elim_compute (f : Πi, Y i →a A') (i : I) :
|
2016-11-14 19:44:29 +00:00
|
|
|
|
dirsum_elim f ∘g dirsum_incl i ~ f i :=
|
|
|
|
|
begin
|
2017-04-07 19:56:37 +00:00
|
|
|
|
intro g, apply zero_add
|
2016-11-14 19:44:29 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-04-07 19:56:37 +00:00
|
|
|
|
definition dirsum_elim_unique (f : Πi, Y i →a A') (k : dirsum →a A')
|
2016-11-14 19:44:29 +00:00
|
|
|
|
(H : Πi, k ∘g dirsum_incl i ~ f i) : k ~ dirsum_elim f :=
|
2016-11-18 20:20:22 +00:00
|
|
|
|
begin
|
|
|
|
|
apply gqg_elim_unique,
|
2016-11-24 04:54:57 +00:00
|
|
|
|
apply free_ab_group_elim_unique,
|
2016-11-18 20:20:22 +00:00
|
|
|
|
intro x, induction x with i y, exact H i y
|
|
|
|
|
end
|
2016-11-14 19:44:29 +00:00
|
|
|
|
|
2017-03-31 22:21:02 +00:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
variables {I J : Set} {Y Y' Y'' : I → AddAbGroup}
|
2016-10-13 19:04:57 +00:00
|
|
|
|
|
2017-04-07 19:56:37 +00:00
|
|
|
|
definition dirsum_functor [constructor] (f : Πi, Y i →a Y' i) : dirsum Y →a dirsum Y' :=
|
2017-03-31 22:21:02 +00:00
|
|
|
|
dirsum_elim (λi, dirsum_incl Y' i ∘g f i)
|
|
|
|
|
|
2017-04-07 19:56:37 +00:00
|
|
|
|
theorem dirsum_functor_compose (f' : Πi, Y' i →a Y'' i) (f : Πi, Y i →a Y' i) :
|
|
|
|
|
dirsum_functor f' ∘a dirsum_functor f ~ dirsum_functor (λi, f' i ∘a f i) :=
|
2017-03-31 22:21:02 +00:00
|
|
|
|
begin
|
|
|
|
|
apply dirsum_homotopy,
|
|
|
|
|
intro i y, reflexivity,
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
variable (Y)
|
2017-04-07 19:56:37 +00:00
|
|
|
|
definition dirsum_functor_gid : dirsum_functor (λi, aid (Y i)) ~ aid (dirsum Y) :=
|
2017-03-31 22:21:02 +00:00
|
|
|
|
begin
|
|
|
|
|
apply dirsum_homotopy,
|
|
|
|
|
intro i y, reflexivity,
|
|
|
|
|
end
|
|
|
|
|
variable {Y}
|
|
|
|
|
|
2017-04-07 19:56:37 +00:00
|
|
|
|
definition dirsum_functor_add (f f' : Πi, Y i →a Y' i) :
|
2017-03-31 22:21:02 +00:00
|
|
|
|
homomorphism_add (dirsum_functor f) (dirsum_functor f') ~
|
|
|
|
|
dirsum_functor (λi, homomorphism_add (f i) (f' i)) :=
|
|
|
|
|
begin
|
|
|
|
|
apply dirsum_homotopy,
|
2017-04-14 00:39:04 +00:00
|
|
|
|
intro i y, esimp, exact sorry
|
2016-10-13 19:04:57 +00:00
|
|
|
|
end
|
|
|
|
|
|
2017-04-07 19:56:37 +00:00
|
|
|
|
definition dirsum_functor_homotopy {f f' : Πi, Y i →a Y' i} (p : f ~2 f') :
|
2017-03-31 22:21:02 +00:00
|
|
|
|
dirsum_functor f ~ dirsum_functor f' :=
|
|
|
|
|
begin
|
|
|
|
|
apply dirsum_homotopy,
|
|
|
|
|
intro i y, exact sorry
|
|
|
|
|
end
|
|
|
|
|
|
2017-04-07 19:56:37 +00:00
|
|
|
|
definition dirsum_functor_left [constructor] (f : J → I) : dirsum (Y ∘ f) →a dirsum Y :=
|
2017-03-31 22:21:02 +00:00
|
|
|
|
dirsum_elim (λj, dirsum_incl Y (f j))
|
|
|
|
|
|
2016-10-13 19:04:57 +00:00
|
|
|
|
end group
|