refactor(trunc): rename namespace is_trunc.trunc_index to trunc_index

This commit is contained in:
Floris van Doorn 2016-03-02 17:19:44 -05:00 committed by Leonardo de Moura
parent e2b31a9b33
commit 1903601ba5
7 changed files with 239 additions and 228 deletions

View file

@ -22,7 +22,7 @@ The rows indicate the chapters, the columns the sections.
| Ch 5 | - | . | ½ | - | - | . | . | ½ | | | | | | | |
| Ch 6 | . | + | + | + | + | ½ | ½ | + | ¾ | ¼ | ¾ | + | . | | |
| Ch 7 | + | + | + | - | ¾ | - | - | | | | | | | | |
| Ch 8 | ¾ | ¾ | - | - | ¼ | ¼ | - | - | - | - | | | | | |
| Ch 8 | + | + | - | - | ¼ | ¼ | - | - | - | - | | | | | |
| Ch 9 | ¾ | + | + | ½ | ¾ | ½ | - | - | - | | | | | | |
| Ch 10 | - | - | - | - | - | | | | | | | | | | |
| Ch 11 | - | - | - | - | - | - | | | | | | | | | |
@ -141,7 +141,7 @@ Chapter 8: Homotopy theory
Unless otherwise noted, the files are in the folder [homotopy](homotopy/homotopy.md)
- 8.1 (π_1(S^1)): [homotopy.circle](homotopy/circle.hlean) (only one of the proofs)
- 8.1 (π_1(S^1)): [homotopy.circle](homotopy/circle.hlean) (only the encode-decode proof)
- 8.2 (Connectedness of suspensions): [homotopy.connectedness](homotopy/connectedness.hlean) (different proof)
- 8.3 (πk≤n of an n-connected space and π_{k<n}(S^n)): not formalized
- 8.4 (Fiber sequences and the long exact sequence): not formalized

View file

@ -275,7 +275,7 @@ namespace homotopy
end
open trunc_index
theorem is_conn_sphere [instance] (n : ℕ₋₁) : is_conn (n.-1) (sphere n) :=
theorem is_conn_sphere [instance] (n : ℕ₋₁) : is_conn (n..-1) (sphere n) :=
begin
induction n with n IH,
{ apply is_trunc_trunc},

View file

@ -8,7 +8,7 @@ The Smash Product of Types
import hit.pushout .wedge .cofiber .susp .sphere
open eq pushout prod pointed pType is_trunc
open eq pushout prod pointed is_trunc
definition product_of_wedge [constructor] (A B : Type*) : pwedge A B →* A ×* B :=
begin

View file

@ -74,9 +74,10 @@ namespace sphere_index
definition sub_one [reducible] (n : ) : ℕ₋₁ :=
nat.rec_on n -1 (λ n k, k.+1)
postfix `.-1`:(max+1) := sub_one
postfix `..-1`:(max+1) := sub_one
-- we use a double dot to distinguish with the notation .-1 in trunc_index (of type → ℕ₋₂)
definition succ_sub_one (n : ) : (nat.succ n).-1 = n :> ℕ₋₁ :=
definition succ_sub_one (n : ) : (nat.succ n)..-1 = n :> ℕ₋₁ :=
idp
end sphere_index
@ -85,15 +86,15 @@ open sphere_index
namespace trunc_index
definition sub_one [reducible] (n : ℕ₋₁) : ℕ₋₂ :=
sphere_index.rec_on n -2 (λ n k, k.+1)
postfix `.-1`:(max+1) := sub_one
postfix `..-1`:(max+1) := sub_one
definition of_sphere_index [coercion] [reducible] (n : ℕ₋₁) : ℕ₋₂ :=
n.-1.+1
n..-1.+1
definition sub_two_eq_sub_one_sub_one (n : ) : n.-2 = n.-1.-1 :=
definition sub_two_eq_sub_one_sub_one (n : ) : n.-2 = n..-1..-1 :=
nat.rec_on n idp (λn p, ap trunc_index.succ p)
definition succ_sub_one (n : ℕ₋₁) : n.+1.-1 = n :> ℕ₋₂ :=
definition succ_sub_one (n : ℕ₋₁) : n.+1..-1 = n :> ℕ₋₂ :=
idp
definition of_sphere_index_of_nat (n : )
@ -114,6 +115,8 @@ definition sphere : ℕ₋₁ → Type₀
namespace sphere
export [notation] [coercion] sphere_index
definition base {n : } : sphere n := north
definition pointed_sphere [instance] [constructor] (n : ) : pointed (sphere n) :=
pointed.mk base

View file

@ -7,7 +7,7 @@ The Wedge Sum of Two pType Types
-/
import hit.pointed_pushout .connectedness
open eq pushout pointed unit is_trunc.trunc_index pType
open eq pushout pointed unit trunc_index
definition pwedge (A B : Type*) : Type* := ppushout (pconst punit A) (pconst punit B)

View file

@ -13,8 +13,6 @@ import .nat .logic .equiv .pathover
open eq nat sigma unit sigma.ops
--set_option class.force_new true
namespace is_trunc
/- Truncation levels -/
inductive trunc_index : Type₀ :=
@ -27,10 +25,7 @@ namespace is_trunc
notation for trunc_index is -2, -1, 0, 1, ...
from 0 and up this comes from a coercion from num to trunc_index (via )
-/
notation `-1` := trunc_index.succ trunc_index.minus_two -- ISSUE: -1 gets printed as -2.+1?
notation `-2` := trunc_index.minus_two
postfix `.+1`:(max+1) := trunc_index.succ
postfix `.+2`:(max+1) := λn, (n .+1 .+1)
notation `ℕ₋₂` := trunc_index -- input using \N-2
definition has_zero_trunc_index [instance] [priority 2000] : has_zero ℕ₋₂ :=
@ -40,10 +35,18 @@ namespace is_trunc
has_one.mk (succ (succ (succ minus_two)))
namespace trunc_index
notation `-1` := trunc_index.succ trunc_index.minus_two -- ISSUE: -1 gets printed as -2.+1?
notation `-2` := trunc_index.minus_two
postfix `.+1`:(max+1) := trunc_index.succ
postfix `.+2`:(max+1) := λn, (n .+1 .+1)
--addition, where we add two to the result
definition add_plus_two [reducible] (n m : ℕ₋₂) : ℕ₋₂ :=
trunc_index.rec_on m n (λ k l, l .+1)
infix ` +2+ `:65 := trunc_index.add_plus_two
-- addition of trunc_indices, where results smaller than -2 are changed to -2
protected definition add (n m : ℕ₋₂) : ℕ₋₂ :=
trunc_index.cases_on m
@ -64,10 +67,12 @@ namespace is_trunc
has_le.mk trunc_index.le
attribute trunc_index.add [reducible]
infix ` +2+ `:65 := trunc_index.add_plus_two
definition has_add_trunc_index [instance] [priority 2000] : has_add ℕ₋₂ :=
has_add.mk trunc_index.add
namespace trunc_index
definition sub_two [reducible] (n : ) : ℕ₋₂ :=
nat.rec_on n -2 (λ n k, k.+1)
@ -77,10 +82,9 @@ namespace is_trunc
postfix `.-2`:(max+1) := sub_two
postfix `.-1`:(max+1) := λn, (n .-2 .+1)
definition trunc_index.of_nat [coercion] [reducible] (n : ) : ℕ₋₂ :=
definition of_nat [coercion] [reducible] (n : ) : ℕ₋₂ :=
n.-2.+2
namespace trunc_index
definition succ_le_succ {n m : ℕ₋₂} (H : n ≤ m) : n.+1 ≤ m.+1 :=
by induction H with m H IH; apply le.tr_refl; exact le.step IH
@ -89,7 +93,11 @@ namespace is_trunc
protected definition le_refl (n : ℕ₋₂) : n ≤ n :=
le.tr_refl n
end trunc_index
end trunc_index open trunc_index
namespace is_trunc
export [notation] [coercion] trunc_index
/- truncated types -/
@ -112,7 +120,7 @@ end is_trunc open is_trunc
structure is_trunc [class] (n : ℕ₋₂) (A : Type) :=
(to_internal : is_trunc_internal n A)
open nat num is_trunc.trunc_index
open nat num trunc_index
namespace is_trunc

View file

@ -11,9 +11,7 @@ Properties of is_trunc and trunctype
import .pointed2 ..function algebra.order types.nat.order
open eq sigma sigma.ops pi function equiv trunctype
is_equiv prod is_trunc.trunc_index pointed nat is_trunc algebra
namespace is_trunc
is_equiv prod pointed nat is_trunc algebra
namespace trunc_index
@ -201,6 +199,8 @@ namespace is_trunc
end trunc_index open trunc_index
namespace is_trunc
variables {A B : Type} {n : ℕ₋₂}
/- theorems about trunctype -/
@ -374,7 +374,7 @@ namespace is_trunc
{ apply is_trunc_eq}
end
end is_trunc open is_trunc is_trunc.trunc_index
end is_trunc open is_trunc
namespace trunc
variable {A : Type}