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-04-19 19:58:13 +00:00
|
|
|
import .sigma .eq
|
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)
|
|
|
|
|
|
|
|
open equiv sigma sigma.ops eq
|
|
|
|
|
|
|
|
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-03-04 05:10:48 +00:00
|
|
|
definition sigma_char (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,
|
|
|
|
{apply eq_equiv_fn_eq_of_equiv, apply sigma_char},
|
|
|
|
apply equiv.trans,
|
|
|
|
{apply equiv.symm, apply equiv_sigma_eq},
|
|
|
|
apply sigma_equiv_sigma_id,
|
|
|
|
intro p,
|
|
|
|
apply equiv_of_equiv_of_eq,
|
2015-03-13 01:07:55 +00:00
|
|
|
rotate 1,
|
2015-03-04 05:10:48 +00:00
|
|
|
apply inv_con_eq_equiv_eq_con,
|
2015-03-13 01:07:55 +00:00
|
|
|
{apply (ap (λx, x = _)), rewrite transport_eq_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-03-04 05:10:48 +00:00
|
|
|
end fiber
|