2015-03-03 21:35:51 +00:00
|
|
|
/-
|
2015-04-19 19:58:13 +00:00
|
|
|
Copyright (c) 2015 Floris van Doorn. All rights reserved.
|
2015-03-03 21:35:51 +00:00
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
Author: Floris van Doorn
|
|
|
|
|
|
|
|
Ported from Coq HoTT
|
|
|
|
Theorems about fibers
|
|
|
|
-/
|
|
|
|
|
2015-09-22 16:01:55 +00:00
|
|
|
import .sigma .eq .pi .pointed
|
2015-03-03 21:35:51 +00:00
|
|
|
|
|
|
|
structure fiber {A B : Type} (f : A → B) (b : B) :=
|
|
|
|
(point : A)
|
|
|
|
(point_eq : f point = b)
|
|
|
|
|
2015-09-22 16:01:55 +00:00
|
|
|
open equiv sigma sigma.ops eq pi
|
2015-03-03 21:35:51 +00:00
|
|
|
|
|
|
|
namespace fiber
|
2015-03-04 05:10:48 +00:00
|
|
|
variables {A B : Type} {f : A → B} {b : B}
|
2015-03-03 21:35:51 +00:00
|
|
|
|
2015-09-22 16:01:55 +00:00
|
|
|
protected definition sigma_char [constructor]
|
|
|
|
(f : A → B) (b : B) : fiber f b ≃ (Σ(a : A), f a = b) :=
|
2015-03-03 21:35:51 +00:00
|
|
|
begin
|
|
|
|
fapply equiv.MK,
|
|
|
|
{intro x, exact ⟨point x, point_eq x⟩},
|
|
|
|
{intro x, exact (fiber.mk x.1 x.2)},
|
|
|
|
{intro x, cases x, apply idp},
|
|
|
|
{intro x, cases x, apply idp},
|
|
|
|
end
|
|
|
|
|
2015-04-27 21:29:56 +00:00
|
|
|
definition fiber_eq_equiv (x y : fiber f b)
|
2015-03-03 21:35:51 +00:00
|
|
|
: (x = y) ≃ (Σ(p : point x = point y), point_eq x = ap f p ⬝ point_eq y) :=
|
|
|
|
begin
|
|
|
|
apply equiv.trans,
|
2015-09-22 16:01:55 +00:00
|
|
|
apply eq_equiv_fn_eq_of_equiv, apply fiber.sigma_char,
|
2015-03-03 21:35:51 +00:00
|
|
|
apply equiv.trans,
|
2015-08-06 20:37:52 +00:00
|
|
|
apply sigma_eq_equiv,
|
2015-03-03 21:35:51 +00:00
|
|
|
apply sigma_equiv_sigma_id,
|
|
|
|
intro p,
|
2015-05-22 08:35:44 +00:00
|
|
|
apply pathover_eq_equiv_Fl,
|
2015-03-03 21:35:51 +00:00
|
|
|
end
|
|
|
|
|
2015-04-19 19:58:13 +00:00
|
|
|
definition fiber_eq {x y : fiber f b} (p : point x = point y)
|
|
|
|
(q : point_eq x = ap f p ⬝ point_eq y) : x = y :=
|
2015-04-27 21:29:56 +00:00
|
|
|
to_inv !fiber_eq_equiv ⟨p, q⟩
|
2015-03-03 21:35:51 +00:00
|
|
|
|
2015-09-22 16:01:55 +00:00
|
|
|
open is_trunc
|
|
|
|
definition fiber_pr1 (B : A → Type) (a : A) : fiber (pr1 : (Σa, B a) → A) a ≃ B a :=
|
|
|
|
calc
|
|
|
|
fiber pr1 a ≃ Σu, u.1 = a : fiber.sigma_char
|
|
|
|
... ≃ Σa' (b : B a'), a' = a : sigma_assoc_equiv
|
|
|
|
... ≃ Σa' (p : a' = a), B a' : sigma_equiv_sigma_id (λa', !comm_equiv_nondep)
|
|
|
|
... ≃ Σu, B u.1 : sigma_assoc_equiv
|
|
|
|
... ≃ B a : !sigma_equiv_of_is_contr_left
|
|
|
|
|
|
|
|
definition sigma_fiber_equiv (f : A → B) : (Σb, fiber f b) ≃ A :=
|
|
|
|
calc
|
|
|
|
(Σb, fiber f b) ≃ Σb a, f a = b : sigma_equiv_sigma_id (λb, !fiber.sigma_char)
|
|
|
|
... ≃ Σa b, f a = b : sigma_comm_equiv
|
|
|
|
... ≃ A : sigma_equiv_of_is_contr_right
|
|
|
|
|
|
|
|
definition is_pointed_fiber [instance] [constructor] (f : A → B) (a : A)
|
|
|
|
: pointed (fiber f (f a)) :=
|
|
|
|
pointed.mk (fiber.mk a idp)
|
|
|
|
|
|
|
|
definition pointed_fiber [constructor] (f : A → B) (a : A) : Type* :=
|
|
|
|
Pointed.mk (fiber.mk a (idpath (f a)))
|
|
|
|
|
2015-11-05 17:51:59 +00:00
|
|
|
definition is_trunc_fun [reducible] (n : trunc_index) (f : A → B) :=
|
|
|
|
Π(b : B), is_trunc n (fiber f b)
|
|
|
|
definition is_contr_fun [reducible] (f : A → B) := is_trunc_fun -2 f
|
|
|
|
|
2015-03-04 05:10:48 +00:00
|
|
|
end fiber
|
2015-09-26 22:01:33 +00:00
|
|
|
|
2015-09-26 23:35:58 +00:00
|
|
|
open unit is_trunc
|
|
|
|
|
|
|
|
namespace fiber
|
|
|
|
|
|
|
|
definition fiber_star_equiv (A : Type) : fiber (λx : A, star) star ≃ A :=
|
|
|
|
begin
|
|
|
|
fapply equiv.MK,
|
|
|
|
{ intro f, cases f with a H, exact a },
|
|
|
|
{ intro a, apply fiber.mk a, reflexivity },
|
|
|
|
{ intro a, reflexivity },
|
|
|
|
{ intro f, cases f with a H, change fiber.mk a (refl star) = fiber.mk a H,
|
|
|
|
rewrite [is_hset.elim H (refl star)] }
|
|
|
|
end
|
|
|
|
|
2015-11-05 19:37:46 +00:00
|
|
|
definition fiber_const_equiv (A : Type) (a₀ : A) (a : A)
|
|
|
|
: fiber (λz : unit, a₀) a ≃ a₀ = a :=
|
|
|
|
calc
|
|
|
|
fiber (λz : unit, a₀) a
|
|
|
|
≃ Σz : unit, a₀ = a : fiber.sigma_char
|
|
|
|
... ≃ a₀ = a : sigma_unit_left
|
|
|
|
|
2015-09-26 23:35:58 +00:00
|
|
|
end fiber
|
|
|
|
|
|
|
|
open function is_equiv
|
2015-09-26 22:01:33 +00:00
|
|
|
|
|
|
|
namespace fiber
|
|
|
|
/- Theorem 4.7.6 -/
|
|
|
|
variables {A : Type} {P Q : A → Type}
|
2015-09-27 00:23:39 +00:00
|
|
|
variable (f : Πa, P a → Q a)
|
2015-09-26 22:01:33 +00:00
|
|
|
|
2015-09-27 00:23:39 +00:00
|
|
|
definition fiber_total_equiv {a : A} (q : Q a)
|
2015-11-05 17:51:59 +00:00
|
|
|
: fiber (total f) ⟨a , q⟩ ≃ fiber (f a) q :=
|
2015-09-26 22:01:33 +00:00
|
|
|
calc
|
2015-11-05 17:51:59 +00:00
|
|
|
fiber (total f) ⟨a , q⟩
|
2015-09-26 22:01:33 +00:00
|
|
|
≃ Σ(w : Σx, P x), ⟨w.1 , f w.1 w.2 ⟩ = ⟨a , q⟩
|
2015-09-27 21:08:58 +00:00
|
|
|
: fiber.sigma_char
|
2015-09-26 22:01:33 +00:00
|
|
|
... ≃ Σ(x : A), Σ(p : P x), ⟨x , f x p⟩ = ⟨a , q⟩
|
|
|
|
: sigma_assoc_equiv
|
|
|
|
... ≃ Σ(x : A), Σ(p : P x), Σ(H : x = a), f x p =[H] q
|
|
|
|
:
|
|
|
|
begin
|
|
|
|
apply sigma_equiv_sigma_id, intro x,
|
|
|
|
apply sigma_equiv_sigma_id, intro p,
|
|
|
|
apply sigma_eq_equiv
|
|
|
|
end
|
|
|
|
... ≃ Σ(x : A), Σ(H : x = a), Σ(p : P x), f x p =[H] q
|
|
|
|
:
|
|
|
|
begin
|
|
|
|
apply sigma_equiv_sigma_id, intro x,
|
|
|
|
apply sigma_comm_equiv
|
|
|
|
end
|
|
|
|
... ≃ Σ(w : Σx, x = a), Σ(p : P w.1), f w.1 p =[w.2] q
|
|
|
|
: sigma_assoc_equiv
|
|
|
|
... ≃ Σ(p : P (center (Σx, x=a)).1), f (center (Σx, x=a)).1 p =[(center (Σx, x=a)).2] q
|
|
|
|
: sigma_equiv_of_is_contr_left
|
|
|
|
... ≃ Σ(p : P a), f a p =[idpath a] q
|
|
|
|
: equiv_of_eq idp
|
|
|
|
... ≃ Σ(p : P a), f a p = q
|
|
|
|
:
|
|
|
|
begin
|
|
|
|
apply sigma_equiv_sigma_id, intro p,
|
|
|
|
apply pathover_idp
|
|
|
|
end
|
|
|
|
... ≃ fiber (f a) q
|
2015-09-27 21:08:58 +00:00
|
|
|
: fiber.sigma_char
|
2015-09-26 22:01:33 +00:00
|
|
|
|
|
|
|
end fiber
|