2015-06-04 01:41:21 +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
|
|
|
|
|
2015-06-04 17:55:02 +00:00
|
|
|
Theorems about the unit type
|
2015-06-04 01:41:21 +00:00
|
|
|
-/
|
|
|
|
|
2016-06-23 20:49:54 +00:00
|
|
|
open is_equiv equiv option eq pointed is_trunc function
|
2015-06-04 01:41:21 +00:00
|
|
|
|
|
|
|
namespace unit
|
|
|
|
|
2015-10-22 22:41:55 +00:00
|
|
|
protected definition eta : Π(u : unit), ⋆ = u
|
|
|
|
| eta ⋆ := idp
|
|
|
|
|
2016-03-01 04:37:03 +00:00
|
|
|
definition unit_equiv_option_empty [constructor] : unit ≃ option empty :=
|
2015-06-04 01:41:21 +00:00
|
|
|
begin
|
|
|
|
fapply equiv.MK,
|
|
|
|
{ intro u, exact none},
|
|
|
|
{ intro e, exact star},
|
|
|
|
{ intro e, cases e, reflexivity, contradiction},
|
|
|
|
{ intro u, cases u, reflexivity},
|
|
|
|
end
|
|
|
|
|
2016-03-01 04:37:03 +00:00
|
|
|
-- equivalences involving unit and other type constructors are in the file
|
|
|
|
-- of the other constructor
|
2015-06-04 01:41:21 +00:00
|
|
|
|
2016-04-22 19:12:25 +00:00
|
|
|
/- pointed and truncated unit -/
|
|
|
|
|
|
|
|
definition punit [constructor] : Set* :=
|
|
|
|
pSet.mk' unit
|
|
|
|
|
|
|
|
notation `unit*` := punit
|
|
|
|
|
2016-06-23 20:49:54 +00:00
|
|
|
definition unit_arrow_eq {X : Type} (f : unit → X) : (λx, f ⋆) = f :=
|
|
|
|
by apply eq_of_homotopy; intro u; induction u; reflexivity
|
|
|
|
|
|
|
|
open funext
|
|
|
|
definition unit_arrow_eq_compose {X Y : Type} (g : X → Y) (f : unit → X) :
|
|
|
|
unit_arrow_eq (g ∘ f) = ap (λf, g ∘ f) (unit_arrow_eq f) :=
|
|
|
|
begin
|
|
|
|
apply eq_of_fn_eq_fn' apd10,
|
|
|
|
refine right_inv apd10 _ ⬝ _,
|
|
|
|
refine _ ⬝ ap apd10 (!compose_eq_of_homotopy)⁻¹,
|
|
|
|
refine _ ⬝ (right_inv apd10 _)⁻¹,
|
|
|
|
apply eq_of_homotopy, intro u, induction u, reflexivity
|
|
|
|
end
|
|
|
|
|
2015-06-04 01:41:21 +00:00
|
|
|
end unit
|
2015-11-18 23:08:38 +00:00
|
|
|
|
|
|
|
open unit is_trunc
|