2016-02-05 00:02:15 +00:00
|
|
|
|
import types.pointed types.int types.fiber
|
|
|
|
|
|
2016-02-09 17:38:23 +00:00
|
|
|
|
open algebra nat int pointed unit sigma fiber sigma.ops eq equiv prod is_trunc equiv.ops
|
2016-02-05 05:51:00 +00:00
|
|
|
|
|
2016-02-09 17:38:23 +00:00
|
|
|
|
namespace chain_complex
|
2016-02-05 00:02:15 +00:00
|
|
|
|
|
2016-02-09 17:38:23 +00:00
|
|
|
|
structure chain_complex : Type :=
|
2016-02-05 00:02:15 +00:00
|
|
|
|
(car : ℤ → Type*)
|
|
|
|
|
(fn : Π{n : ℤ}, car (n + 1) →* car n)
|
2016-02-09 17:38:23 +00:00
|
|
|
|
(is_chain_complex : Π{n : ℤ} (x : car ((n + 1) + 1)), fn (fn x) = pt)
|
2016-02-05 00:02:15 +00:00
|
|
|
|
|
2016-02-09 17:38:23 +00:00
|
|
|
|
structure left_chain_complex : Type := -- chain complex on the naturals with maps going down
|
2016-02-05 00:02:15 +00:00
|
|
|
|
(car : ℕ → Type*)
|
|
|
|
|
(fn : Π{n : ℕ}, car (n + 1) →* car n)
|
2016-02-09 17:38:23 +00:00
|
|
|
|
(is_chain_complex : Π{n : ℕ} (x : car ((n + 1) + 1)), fn (fn x) = pt)
|
2016-02-05 00:02:15 +00:00
|
|
|
|
|
2016-02-09 17:38:23 +00:00
|
|
|
|
structure right_chain_complex : Type := -- chain complex on the naturals with maps going up
|
2016-02-05 00:02:15 +00:00
|
|
|
|
(car : ℕ → Type*)
|
|
|
|
|
(fn : Π{n : ℕ}, car n →* car (n + 1))
|
2016-02-09 17:38:23 +00:00
|
|
|
|
(is_chain_complex : Π{n : ℕ} (x : car n), fn (fn x) = pt)
|
|
|
|
|
|
|
|
|
|
definition cc_to_car [coercion] := @chain_complex.car
|
|
|
|
|
definition cc_to_fn := @chain_complex.fn
|
|
|
|
|
definition cc_is_chain_complex := @chain_complex.is_chain_complex
|
|
|
|
|
definition lcc_to_car [coercion] := @left_chain_complex.car
|
|
|
|
|
definition lcc_to_fn := @left_chain_complex.fn
|
|
|
|
|
definition lcc_is_chain_complex := @left_chain_complex.is_chain_complex
|
|
|
|
|
definition rcc_to_car [coercion] := @right_chain_complex.car
|
|
|
|
|
definition rcc_to_fn := @right_chain_complex.fn
|
|
|
|
|
definition rcc_is_chain_complex := @right_chain_complex.is_chain_complex
|
|
|
|
|
|
|
|
|
|
-- note: these notions are shifted by one!
|
|
|
|
|
definition is_exact_at [reducible] (X : chain_complex) (n : ℤ) : Type :=
|
|
|
|
|
Π(x : X (n + 1)), cc_to_fn X x = pt → Σ(y : X ((n + 1) + 1)), cc_to_fn X y = x
|
|
|
|
|
definition is_exact_at_l [reducible] (X : left_chain_complex) (n : ℕ) : Type :=
|
|
|
|
|
Π(x : X (n + 1)), lcc_to_fn X x = pt → Σ(y : X ((n + 1) + 1)), lcc_to_fn X y = x
|
|
|
|
|
definition is_exact_at_r [reducible] (X : right_chain_complex) (n : ℕ) : Type :=
|
|
|
|
|
Π(x : X (n + 1)), rcc_to_fn X x = pt → Σ(y : X n), rcc_to_fn X y = x
|
|
|
|
|
|
|
|
|
|
definition is_exact [reducible] (X : chain_complex) : Type := Π(n : ℤ), is_exact_at X n
|
|
|
|
|
definition is_exact_l [reducible] (X : left_chain_complex) : Type := Π(n : ℕ), is_exact_at_l X n
|
|
|
|
|
definition is_exact_r [reducible] (X : right_chain_complex) : Type := Π(n : ℕ), is_exact_at_r X n
|
|
|
|
|
|
|
|
|
|
definition chain_complex_from_left (X : left_chain_complex) : chain_complex :=
|
|
|
|
|
chain_complex.mk (int.rec X (λn, Unit))
|
2016-02-05 00:02:15 +00:00
|
|
|
|
begin
|
|
|
|
|
intro n, fconstructor,
|
|
|
|
|
{ induction n with n n,
|
2016-02-09 17:38:23 +00:00
|
|
|
|
{ exact @lcc_to_fn X n},
|
2016-02-05 00:02:15 +00:00
|
|
|
|
{ esimp, intro x, exact star}},
|
|
|
|
|
{ induction n with n n,
|
|
|
|
|
{ apply respect_pt},
|
|
|
|
|
{ reflexivity}}
|
|
|
|
|
end
|
|
|
|
|
begin
|
|
|
|
|
intro n, induction n with n n,
|
2016-02-09 17:38:23 +00:00
|
|
|
|
{ exact lcc_is_chain_complex X},
|
2016-02-05 00:02:15 +00:00
|
|
|
|
{ esimp, intro x, reflexivity}
|
|
|
|
|
end
|
2016-02-05 05:51:00 +00:00
|
|
|
|
|
2016-02-09 17:38:23 +00:00
|
|
|
|
definition is_exact_from_left {X : left_chain_complex} {n : ℕ} (H : is_exact_at_l X n)
|
|
|
|
|
: is_exact_at (chain_complex_from_left X) n :=
|
|
|
|
|
H
|
|
|
|
|
|
|
|
|
|
-- move to pointed
|
|
|
|
|
definition pfiber [constructor] {X Y : Type*} (f : X →* Y) : Type* :=
|
2016-02-05 05:51:00 +00:00
|
|
|
|
pointed.MK (fiber f pt) (fiber.mk pt !respect_pt)
|
2016-02-05 00:02:15 +00:00
|
|
|
|
|
2016-02-09 17:38:23 +00:00
|
|
|
|
definition pequiv_of_equiv [constructor] {A B : Type*} (f : A ≃ B) (H : f pt = pt) : A ≃* B :=
|
|
|
|
|
pequiv.mk' (pmap.mk f H)
|
|
|
|
|
|
|
|
|
|
definition fiber_sequence_helper [constructor] (v : Σ(X Y : Type*), X →* Y)
|
|
|
|
|
: Σ(Z X : Type*), Z →* X :=
|
2016-02-05 05:51:00 +00:00
|
|
|
|
⟨pfiber v.2.2, v.1, pmap.mk point rfl⟩
|
|
|
|
|
|
|
|
|
|
definition fiber_sequence_carrier {X Y : Type*} (f : X →* Y) (n : ℕ) : Type* :=
|
|
|
|
|
nat.cases_on n Y (λk, (iterate fiber_sequence_helper k ⟨X, Y, f⟩).1)
|
|
|
|
|
|
2016-02-09 17:38:23 +00:00
|
|
|
|
definition fiber_sequence_fun {X Y : Type*} (f : X →* Y) (n : ℕ)
|
2016-02-05 05:51:00 +00:00
|
|
|
|
: fiber_sequence_carrier f (n + 1) →* fiber_sequence_carrier f n :=
|
|
|
|
|
nat.cases_on n f proof (λk, pmap.mk point rfl) qed
|
2016-02-05 00:02:15 +00:00
|
|
|
|
|
2016-02-05 05:51:00 +00:00
|
|
|
|
/- Definition 8.4.3 -/
|
2016-02-09 17:38:23 +00:00
|
|
|
|
definition fiber_sequence.{u} {X Y : Pointed.{u}} (f : X →* Y) : left_chain_complex.{u} :=
|
2016-02-05 00:02:15 +00:00
|
|
|
|
begin
|
|
|
|
|
fconstructor,
|
2016-02-05 05:51:00 +00:00
|
|
|
|
{ exact fiber_sequence_carrier f},
|
2016-02-09 17:38:23 +00:00
|
|
|
|
{ exact fiber_sequence_fun f},
|
2016-02-05 05:51:00 +00:00
|
|
|
|
{ intro n x, cases n with n,
|
|
|
|
|
{ exact point_eq x},
|
2016-02-09 17:38:23 +00:00
|
|
|
|
{ exact point_eq x}}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
definition is_exact_fiber_sequence {X Y : Type*} (f : X →* Y) : is_exact_l (fiber_sequence f) :=
|
|
|
|
|
begin
|
|
|
|
|
intro n x p, cases n with n,
|
|
|
|
|
{ exact ⟨fiber.mk x p, rfl⟩},
|
|
|
|
|
{ exact ⟨fiber.mk x p, rfl⟩}
|
2016-02-05 00:02:15 +00:00
|
|
|
|
end
|
|
|
|
|
|
2016-02-05 05:51:00 +00:00
|
|
|
|
-- move to types.sigma
|
2016-02-09 17:38:23 +00:00
|
|
|
|
definition sigma_assoc_comm_equiv [constructor] {A : Type} (B C : A → Type)
|
2016-02-05 05:51:00 +00:00
|
|
|
|
: (Σ(v : Σa, B a), C v.1) ≃ (Σ(u : Σa, C a), B u.1) :=
|
|
|
|
|
calc (Σ(v : Σa, B a), C v.1)
|
2016-02-09 17:38:23 +00:00
|
|
|
|
≃ (Σa (b : B a), C a) : !sigma_assoc_equiv⁻¹
|
2016-02-05 05:51:00 +00:00
|
|
|
|
... ≃ (Σa, B a × C a) : sigma_equiv_sigma_id (λa, !equiv_prod)
|
|
|
|
|
... ≃ (Σa, C a × B a) : sigma_equiv_sigma_id (λa, !prod_comm_equiv)
|
|
|
|
|
... ≃ (Σa (c : C a), B a) : sigma_equiv_sigma_id (λa, !equiv_prod)
|
|
|
|
|
... ≃ (Σ(u : Σa, C a), B u.1) : sigma_assoc_equiv
|
|
|
|
|
|
2016-02-09 17:38:23 +00:00
|
|
|
|
attribute is_equiv_sigma_functor is_equiv.is_equiv_id pequiv.mk' [constructor]
|
|
|
|
|
attribute sigma.eta [unfold 3]
|
|
|
|
|
|
|
|
|
|
-- set_option pp.notation false
|
2016-02-05 05:51:00 +00:00
|
|
|
|
/- Lemma 8.4.4(i) -/
|
|
|
|
|
definition fiber_sequence_carrier_equiv0.{u} {X Y : Pointed.{u}} (f : X →* Y)
|
2016-02-09 17:38:23 +00:00
|
|
|
|
: fiber_sequence_carrier f 3 ≃* Ω Y :=
|
|
|
|
|
pequiv_of_equiv
|
|
|
|
|
(calc
|
|
|
|
|
fiber_sequence_carrier f 3 ≃ fiber (fiber_sequence_fun f 1) pt : erfl
|
|
|
|
|
... ≃ Σ(x : fiber_sequence_carrier f 2), fiber_sequence_fun f 1 x = pt : fiber.sigma_char
|
|
|
|
|
... ≃ Σ(v : fiber f pt), fiber_sequence_fun f 1 v = pt : erfl
|
|
|
|
|
... ≃ Σ(v : Σ(x : X), f x = pt), fiber_sequence_fun f 1 (fiber.mk v.1 v.2) = pt
|
2016-02-05 05:51:00 +00:00
|
|
|
|
: sigma_equiv_sigma_left !fiber.sigma_char
|
|
|
|
|
... ≃ Σ(v : Σ(x : X), f x = pt), v.1 = pt : erfl
|
|
|
|
|
... ≃ Σ(v : Σ(x : X), x = pt), f v.1 = pt : sigma_assoc_comm_equiv
|
|
|
|
|
... ≃ f !center.1 = pt : sigma_equiv_of_is_contr_left _
|
|
|
|
|
... ≃ f pt = pt : erfl
|
|
|
|
|
... ≃ pt = pt : by exact !equiv_eq_closed_left !respect_pt
|
2016-02-09 17:38:23 +00:00
|
|
|
|
... ≃ Ω Y : erfl)
|
|
|
|
|
begin
|
|
|
|
|
change (respect_pt f)⁻¹ ⬝
|
|
|
|
|
((center_eq ⟨Pointed.Point X, refl (Pointed.Point X)⟩)⁻¹ ▸ respect_pt f) = idp,
|
|
|
|
|
rewrite tr_constant,
|
|
|
|
|
apply con.left_inv
|
|
|
|
|
end
|
2016-02-05 05:51:00 +00:00
|
|
|
|
|
|
|
|
|
/- (generalization of) Lemma 8.4.4(ii) -/
|
|
|
|
|
definition fiber_sequence_carrier_equiv1.{u} {X Y : Pointed.{u}} (f : X →* Y) (n : ℕ)
|
2016-02-09 17:38:23 +00:00
|
|
|
|
: fiber_sequence_carrier f (n+4) ≃* Ω(fiber_sequence_carrier f (n+1)) :=
|
|
|
|
|
pequiv_of_equiv
|
|
|
|
|
(calc
|
|
|
|
|
fiber_sequence_carrier f (n+4) ≃ fiber (fiber_sequence_fun f (n+2)) pt : erfl
|
|
|
|
|
... ≃ Σ(x : fiber_sequence_carrier f _), fiber_sequence_fun f (n+2) x = pt
|
2016-02-05 05:51:00 +00:00
|
|
|
|
: fiber.sigma_char
|
2016-02-09 17:38:23 +00:00
|
|
|
|
... ≃ Σ(x : fiber (fiber_sequence_fun f (n+1)) pt), fiber_sequence_fun f _ x = pt
|
2016-02-05 05:51:00 +00:00
|
|
|
|
: erfl
|
2016-02-09 17:38:23 +00:00
|
|
|
|
... ≃ Σ(v : Σ(x : fiber_sequence_carrier f _), fiber_sequence_fun f _ x = pt),
|
|
|
|
|
fiber_sequence_fun f _ (fiber.mk v.1 v.2) = pt
|
2016-02-05 05:51:00 +00:00
|
|
|
|
: by exact sigma_equiv_sigma !fiber.sigma_char (λa, erfl)
|
2016-02-09 17:38:23 +00:00
|
|
|
|
... ≃ Σ(v : Σ(x : fiber_sequence_carrier f _), fiber_sequence_fun f _ x = pt),
|
2016-02-05 05:51:00 +00:00
|
|
|
|
v.1 = pt
|
|
|
|
|
: erfl
|
|
|
|
|
... ≃ Σ(v : Σ(x : fiber_sequence_carrier f _), x = pt),
|
2016-02-09 17:38:23 +00:00
|
|
|
|
fiber_sequence_fun f _ v.1 = pt
|
2016-02-05 05:51:00 +00:00
|
|
|
|
: sigma_assoc_comm_equiv
|
2016-02-09 17:38:23 +00:00
|
|
|
|
... ≃ fiber_sequence_fun f _ !center.1 = pt
|
2016-02-05 05:51:00 +00:00
|
|
|
|
: @(sigma_equiv_of_is_contr_left _) !is_contr_sigma_eq'
|
2016-02-09 17:38:23 +00:00
|
|
|
|
... ≃ fiber_sequence_fun f _ pt = pt
|
2016-02-05 05:51:00 +00:00
|
|
|
|
: erfl
|
|
|
|
|
... ≃ pt = pt
|
|
|
|
|
: by exact !equiv_eq_closed_left !respect_pt
|
2016-02-09 17:38:23 +00:00
|
|
|
|
... ≃ Ω(fiber_sequence_carrier f (n+1)) : erfl)
|
|
|
|
|
begin reflexivity end
|
2016-02-05 05:51:00 +00:00
|
|
|
|
|
|
|
|
|
/- Lemma 8.4.4 (i)(ii), combined -/
|
|
|
|
|
definition fiber_sequence_carrier_equiv {X Y : Type*} (f : X →* Y) (n : ℕ)
|
2016-02-09 17:38:23 +00:00
|
|
|
|
: fiber_sequence_carrier f (n+3) ≃* Ω(fiber_sequence_carrier f n) :=
|
2016-02-05 05:51:00 +00:00
|
|
|
|
nat.cases_on n (fiber_sequence_carrier_equiv0 f) (fiber_sequence_carrier_equiv1 f)
|
2016-02-09 17:38:23 +00:00
|
|
|
|
exit
|
|
|
|
|
/- Lemma 8.4.4(iii) -/
|
|
|
|
|
definition fiber_sequence_function0 {X Y : Type*} (f : X →* Y)
|
|
|
|
|
: Π(x : fiber_sequence_carrier f 4), ap1 f (fiber_sequence_carrier_equiv f 1 x)⁻¹ᵖ =
|
|
|
|
|
fiber_sequence_carrier_equiv f 0 (fiber_sequence_fun f 3 x) :=
|
|
|
|
|
take (x : fiber (fiber_sequence_fun f 2) pt),
|
|
|
|
|
obtain (v : fiber (fiber_sequence_fun f 1) pt) (q : _), from x,
|
|
|
|
|
begin
|
|
|
|
|
unfold [fiber_sequence_carrier_equiv,fiber_sequence_carrier_equiv0,fiber_sequence_carrier_equiv1,equiv.trans, equiv.symm, pequiv._trans_of_to_pmap],
|
|
|
|
|
esimp [sigma_assoc_equiv, equiv.symm, equiv.trans], unfold [fiber_sequence_fun, fiber_sequence_carrier]
|
|
|
|
|
end
|
2016-02-05 05:51:00 +00:00
|
|
|
|
|
2016-02-09 17:38:23 +00:00
|
|
|
|
end chain_complex
|