2016-03-28 20:33:33 +00:00
|
|
|
/-
|
|
|
|
Copyright (c) 2016 Floris van Doorn. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
Authors: Floris van Doorn
|
|
|
|
|
|
|
|
The definition of pointed types. This file is here to avoid circularities in the import graph
|
|
|
|
-/
|
|
|
|
|
|
|
|
prelude
|
|
|
|
import init.trunc
|
|
|
|
|
|
|
|
open eq equiv is_equiv is_trunc
|
|
|
|
|
|
|
|
structure pointed [class] (A : Type) :=
|
|
|
|
(point : A)
|
|
|
|
|
|
|
|
structure pType :=
|
|
|
|
(carrier : Type)
|
|
|
|
(Point : carrier)
|
|
|
|
|
|
|
|
notation `Type*` := pType
|
|
|
|
|
|
|
|
namespace pointed
|
|
|
|
attribute pType.carrier [coercion]
|
|
|
|
variables {A : Type}
|
|
|
|
|
|
|
|
definition pt [reducible] [unfold 2] [H : pointed A] := point A
|
|
|
|
definition Point [reducible] [unfold 1] (A : Type*) := pType.Point A
|
2016-11-23 22:59:13 +00:00
|
|
|
definition carrier [reducible] [unfold 1] (A : Type*) := pType.carrier A
|
2016-03-28 20:33:33 +00:00
|
|
|
protected definition Mk [constructor] {A : Type} (a : A) := pType.mk A a
|
|
|
|
protected definition MK [constructor] (A : Type) (a : A) := pType.mk A a
|
|
|
|
protected definition mk' [constructor] (A : Type) [H : pointed A] : Type* :=
|
|
|
|
pType.mk A (point A)
|
|
|
|
definition pointed_carrier [instance] [constructor] (A : Type*) : pointed A :=
|
|
|
|
pointed.mk (Point A)
|
|
|
|
|
|
|
|
end pointed
|
|
|
|
open pointed
|
|
|
|
|
|
|
|
section
|
|
|
|
universe variable u
|
2016-11-23 22:59:13 +00:00
|
|
|
structure ptrunctype (n : ℕ₋₂) extends trunctype.{u} n, pType.{u}
|
2016-04-11 17:11:59 +00:00
|
|
|
|
|
|
|
definition is_trunc_ptrunctype [instance] {n : ℕ₋₂} (X : ptrunctype n)
|
|
|
|
: is_trunc n (ptrunctype.to_pType X) :=
|
|
|
|
trunctype.struct X
|
|
|
|
|
2016-03-28 20:33:33 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
notation n `-Type*` := ptrunctype n
|
|
|
|
abbreviation pSet [parsing_only] := 0-Type*
|
|
|
|
notation `Set*` := pSet
|
|
|
|
|
|
|
|
namespace pointed
|
|
|
|
|
2016-11-23 22:59:13 +00:00
|
|
|
protected definition ptrunctype.mk' [constructor] (n : ℕ₋₂)
|
2016-03-28 20:33:33 +00:00
|
|
|
(A : Type) [pointed A] [is_trunc n A] : n-Type* :=
|
|
|
|
ptrunctype.mk A _ pt
|
|
|
|
|
|
|
|
protected definition pSet.mk [constructor] := @ptrunctype.mk (-1.+1)
|
|
|
|
protected definition pSet.mk' [constructor] := ptrunctype.mk' (-1.+1)
|
|
|
|
|
2016-11-23 22:59:13 +00:00
|
|
|
definition ptrunctype_of_trunctype [constructor] {n : ℕ₋₂} (A : n-Type) (a : A)
|
|
|
|
: n-Type* :=
|
2016-03-28 20:33:33 +00:00
|
|
|
ptrunctype.mk A _ a
|
|
|
|
|
2016-11-23 22:59:13 +00:00
|
|
|
definition ptrunctype_of_pType [constructor] {n : ℕ₋₂} (A : Type*) (H : is_trunc n A)
|
2016-03-28 20:33:33 +00:00
|
|
|
: n-Type* :=
|
|
|
|
ptrunctype.mk A _ pt
|
|
|
|
|
|
|
|
definition pSet_of_Set [constructor] (A : Set) (a : A) : Set* :=
|
|
|
|
ptrunctype.mk A _ a
|
|
|
|
|
|
|
|
definition pSet_of_pType [constructor] (A : Type*) (H : is_set A) : Set* :=
|
|
|
|
ptrunctype.mk A _ pt
|
|
|
|
|
|
|
|
attribute ptrunctype._trans_of_to_pType ptrunctype.to_pType ptrunctype.to_trunctype [unfold 2]
|
|
|
|
|
2016-04-22 19:12:25 +00:00
|
|
|
-- Any contractible type is pointed
|
|
|
|
definition pointed_of_is_contr [instance] [priority 800] [constructor]
|
|
|
|
(A : Type) [H : is_contr A] : pointed A :=
|
|
|
|
pointed.mk !center
|
|
|
|
|
2016-03-28 20:33:33 +00:00
|
|
|
end pointed
|
|
|
|
|
|
|
|
/- pointed maps -/
|
2017-06-17 21:20:04 +00:00
|
|
|
structure ppi_gen {A : Type*} (P : A → Type) (x₀ : P pt) :=
|
2016-11-23 22:59:13 +00:00
|
|
|
(to_fun : Π a : A, P a)
|
2017-06-17 21:20:04 +00:00
|
|
|
(resp_pt : to_fun (Point A) = x₀)
|
|
|
|
|
|
|
|
definition ppi {A : Type*} (P : A → Type*) : Type :=
|
|
|
|
ppi_gen P pt
|
2016-11-23 22:59:13 +00:00
|
|
|
|
2017-03-08 03:49:06 +00:00
|
|
|
-- We could try to define pmap as a special case of ppi
|
2016-11-23 22:59:13 +00:00
|
|
|
-- definition pmap (A B : Type*) := @ppi A (λa, B)
|
2016-03-28 20:33:33 +00:00
|
|
|
structure pmap (A B : Type*) :=
|
|
|
|
(to_fun : A → B)
|
|
|
|
(resp_pt : to_fun (Point A) = Point B)
|
|
|
|
|
|
|
|
namespace pointed
|
2017-06-17 21:20:04 +00:00
|
|
|
definition ppi.mk [constructor] [reducible] {A : Type*} {P : A → Type*} (f : Πa, P a)
|
|
|
|
(p : f pt = pt) : ppi P :=
|
|
|
|
ppi_gen.mk f p
|
|
|
|
|
|
|
|
definition ppi.to_fun [unfold 3] [coercion] [reducible] {A : Type*} {P : A → Type*} (f : ppi P)
|
|
|
|
(a : A) : P a :=
|
|
|
|
ppi_gen.to_fun f a
|
|
|
|
|
|
|
|
definition ppi.resp_pt [unfold 3] [reducible] {A : Type*} {P : A → Type*} (f : ppi P) :
|
|
|
|
f pt = pt :=
|
|
|
|
ppi_gen.resp_pt f
|
|
|
|
|
2016-03-28 20:33:33 +00:00
|
|
|
abbreviation respect_pt [unfold 3] := @pmap.resp_pt
|
|
|
|
notation `map₊` := pmap
|
2017-07-20 14:13:43 +00:00
|
|
|
infix ` →* `:28 := pmap
|
2017-06-17 21:20:04 +00:00
|
|
|
attribute pmap.to_fun ppi_gen.to_fun [coercion]
|
|
|
|
-- notation `Π*` binders `, ` r:(scoped P, ppi _ P) := r
|
2016-11-23 22:59:13 +00:00
|
|
|
-- definition pmap.mk [constructor] {A B : Type*} (f : A → B) (p : f pt = pt) : A →* B :=
|
|
|
|
-- ppi.mk f p
|
|
|
|
-- definition pmap.to_fun [coercion] [unfold 3] {A B : Type*} (f : A →* B) : A → B := f
|
|
|
|
|
2016-03-28 20:33:33 +00:00
|
|
|
end pointed open pointed
|
|
|
|
|
|
|
|
/- pointed homotopies -/
|
2017-06-17 21:20:04 +00:00
|
|
|
definition phomotopy {A B : Type*} (f g : A →* B) : Type :=
|
|
|
|
ppi_gen (λa, f a = g a) (respect_pt f ⬝ (respect_pt g)⁻¹)
|
|
|
|
|
|
|
|
-- structure phomotopy {A B : Type*} (f g : A →* B) : Type :=
|
|
|
|
-- (homotopy : f ~ g)
|
|
|
|
-- (homotopy_pt : homotopy pt ⬝ respect_pt g = respect_pt f)
|
2016-03-28 20:33:33 +00:00
|
|
|
|
|
|
|
namespace pointed
|
|
|
|
variables {A B : Type*} {f g : A →* B}
|
|
|
|
|
|
|
|
infix ` ~* `:50 := phomotopy
|
2017-06-17 21:20:04 +00:00
|
|
|
definition phomotopy.mk [reducible] [constructor] (h : f ~ g)
|
|
|
|
(p : h pt ⬝ respect_pt g = respect_pt f) : f ~* g :=
|
|
|
|
ppi_gen.mk h (eq_con_inv_of_con_eq p)
|
|
|
|
|
|
|
|
definition to_homotopy [coercion] [unfold 5] [reducible] (p : f ~* g) : Πa, f a = g a := p
|
|
|
|
definition to_homotopy_pt [unfold 5] [reducible] (p : f ~* g) :
|
|
|
|
p pt ⬝ respect_pt g = respect_pt f :=
|
|
|
|
con_eq_of_eq_con_inv (ppi_gen.resp_pt p)
|
|
|
|
|
2016-03-28 20:33:33 +00:00
|
|
|
|
|
|
|
end pointed
|