refactor(trunc): rename namespace is_trunc.trunc_index to trunc_index
This commit is contained in:
parent
e2b31a9b33
commit
1903601ba5
7 changed files with 239 additions and 228 deletions
|
@ -22,7 +22,7 @@ The rows indicate the chapters, the columns the sections.
|
||||||
| Ch 5 | - | . | ½ | - | - | . | . | ½ | | | | | | | |
|
| Ch 5 | - | . | ½ | - | - | . | . | ½ | | | | | | | |
|
||||||
| Ch 6 | . | + | + | + | + | ½ | ½ | + | ¾ | ¼ | ¾ | + | . | | |
|
| Ch 6 | . | + | + | + | + | ½ | ½ | + | ¾ | ¼ | ¾ | + | . | | |
|
||||||
| Ch 7 | + | + | + | - | ¾ | - | - | | | | | | | | |
|
| Ch 7 | + | + | + | - | ¾ | - | - | | | | | | | | |
|
||||||
| Ch 8 | ¾ | ¾ | - | - | ¼ | ¼ | - | - | - | - | | | | | |
|
| Ch 8 | + | + | - | - | ¼ | ¼ | - | - | - | - | | | | | |
|
||||||
| Ch 9 | ¾ | + | + | ½ | ¾ | ½ | - | - | - | | | | | | |
|
| Ch 9 | ¾ | + | + | ½ | ¾ | ½ | - | - | - | | | | | | |
|
||||||
| Ch 10 | - | - | - | - | - | | | | | | | | | | |
|
| Ch 10 | - | - | - | - | - | | | | | | | | | | |
|
||||||
| Ch 11 | - | - | - | - | - | - | | | | | | | | | |
|
| Ch 11 | - | - | - | - | - | - | | | | | | | | | |
|
||||||
|
@ -141,7 +141,7 @@ Chapter 8: Homotopy theory
|
||||||
|
|
||||||
Unless otherwise noted, the files are in the folder [homotopy](homotopy/homotopy.md)
|
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.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.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
|
- 8.4 (Fiber sequences and the long exact sequence): not formalized
|
||||||
|
|
|
@ -275,7 +275,7 @@ namespace homotopy
|
||||||
end
|
end
|
||||||
|
|
||||||
open trunc_index
|
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
|
begin
|
||||||
induction n with n IH,
|
induction n with n IH,
|
||||||
{ apply is_trunc_trunc},
|
{ apply is_trunc_trunc},
|
||||||
|
|
|
@ -8,7 +8,7 @@ The Smash Product of Types
|
||||||
|
|
||||||
import hit.pushout .wedge .cofiber .susp .sphere
|
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 :=
|
definition product_of_wedge [constructor] (A B : Type*) : pwedge A B →* A ×* B :=
|
||||||
begin
|
begin
|
||||||
|
|
|
@ -74,9 +74,10 @@ namespace sphere_index
|
||||||
definition sub_one [reducible] (n : ℕ) : ℕ₋₁ :=
|
definition sub_one [reducible] (n : ℕ) : ℕ₋₁ :=
|
||||||
nat.rec_on n -1 (λ n k, k.+1)
|
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
|
idp
|
||||||
|
|
||||||
end sphere_index
|
end sphere_index
|
||||||
|
@ -85,15 +86,15 @@ open sphere_index
|
||||||
namespace trunc_index
|
namespace trunc_index
|
||||||
definition sub_one [reducible] (n : ℕ₋₁) : ℕ₋₂ :=
|
definition sub_one [reducible] (n : ℕ₋₁) : ℕ₋₂ :=
|
||||||
sphere_index.rec_on n -2 (λ n k, k.+1)
|
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 : ℕ₋₁) : ℕ₋₂ :=
|
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)
|
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
|
idp
|
||||||
|
|
||||||
definition of_sphere_index_of_nat (n : ℕ)
|
definition of_sphere_index_of_nat (n : ℕ)
|
||||||
|
@ -114,6 +115,8 @@ definition sphere : ℕ₋₁ → Type₀
|
||||||
|
|
||||||
namespace sphere
|
namespace sphere
|
||||||
|
|
||||||
|
export [notation] [coercion] sphere_index
|
||||||
|
|
||||||
definition base {n : ℕ} : sphere n := north
|
definition base {n : ℕ} : sphere n := north
|
||||||
definition pointed_sphere [instance] [constructor] (n : ℕ) : pointed (sphere n) :=
|
definition pointed_sphere [instance] [constructor] (n : ℕ) : pointed (sphere n) :=
|
||||||
pointed.mk base
|
pointed.mk base
|
||||||
|
|
|
@ -7,7 +7,7 @@ The Wedge Sum of Two pType Types
|
||||||
-/
|
-/
|
||||||
import hit.pointed_pushout .connectedness
|
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)
|
definition pwedge (A B : Type*) : Type* := ppushout (pconst punit A) (pconst punit B)
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,6 @@ import .nat .logic .equiv .pathover
|
||||||
open eq nat sigma unit sigma.ops
|
open eq nat sigma unit sigma.ops
|
||||||
--set_option class.force_new true
|
--set_option class.force_new true
|
||||||
|
|
||||||
namespace is_trunc
|
|
||||||
|
|
||||||
/- Truncation levels -/
|
/- Truncation levels -/
|
||||||
|
|
||||||
inductive trunc_index : Type₀ :=
|
inductive trunc_index : Type₀ :=
|
||||||
|
@ -27,10 +25,7 @@ namespace is_trunc
|
||||||
notation for trunc_index is -2, -1, 0, 1, ...
|
notation for trunc_index is -2, -1, 0, 1, ...
|
||||||
from 0 and up this comes from a coercion from num to trunc_index (via ℕ)
|
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
|
notation `ℕ₋₂` := trunc_index -- input using \N-2
|
||||||
|
|
||||||
definition has_zero_trunc_index [instance] [priority 2000] : has_zero ℕ₋₂ :=
|
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)))
|
has_one.mk (succ (succ (succ minus_two)))
|
||||||
|
|
||||||
namespace trunc_index
|
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
|
--addition, where we add two to the result
|
||||||
definition add_plus_two [reducible] (n m : ℕ₋₂) : ℕ₋₂ :=
|
definition add_plus_two [reducible] (n m : ℕ₋₂) : ℕ₋₂ :=
|
||||||
trunc_index.rec_on m n (λ k l, l .+1)
|
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
|
-- addition of trunc_indices, where results smaller than -2 are changed to -2
|
||||||
protected definition add (n m : ℕ₋₂) : ℕ₋₂ :=
|
protected definition add (n m : ℕ₋₂) : ℕ₋₂ :=
|
||||||
trunc_index.cases_on m
|
trunc_index.cases_on m
|
||||||
|
@ -64,10 +67,12 @@ namespace is_trunc
|
||||||
has_le.mk trunc_index.le
|
has_le.mk trunc_index.le
|
||||||
|
|
||||||
attribute trunc_index.add [reducible]
|
attribute trunc_index.add [reducible]
|
||||||
infix ` +2+ `:65 := trunc_index.add_plus_two
|
|
||||||
definition has_add_trunc_index [instance] [priority 2000] : has_add ℕ₋₂ :=
|
definition has_add_trunc_index [instance] [priority 2000] : has_add ℕ₋₂ :=
|
||||||
has_add.mk trunc_index.add
|
has_add.mk trunc_index.add
|
||||||
|
|
||||||
|
namespace trunc_index
|
||||||
|
|
||||||
definition sub_two [reducible] (n : ℕ) : ℕ₋₂ :=
|
definition sub_two [reducible] (n : ℕ) : ℕ₋₂ :=
|
||||||
nat.rec_on n -2 (λ n k, k.+1)
|
nat.rec_on n -2 (λ n k, k.+1)
|
||||||
|
|
||||||
|
@ -77,10 +82,9 @@ namespace is_trunc
|
||||||
postfix `.-2`:(max+1) := sub_two
|
postfix `.-2`:(max+1) := sub_two
|
||||||
postfix `.-1`:(max+1) := λn, (n .-2 .+1)
|
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
|
n.-2.+2
|
||||||
|
|
||||||
namespace trunc_index
|
|
||||||
definition succ_le_succ {n m : ℕ₋₂} (H : n ≤ m) : n.+1 ≤ m.+1 :=
|
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
|
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 :=
|
protected definition le_refl (n : ℕ₋₂) : n ≤ n :=
|
||||||
le.tr_refl n
|
le.tr_refl n
|
||||||
|
|
||||||
end trunc_index
|
end trunc_index open trunc_index
|
||||||
|
|
||||||
|
namespace is_trunc
|
||||||
|
|
||||||
|
export [notation] [coercion] trunc_index
|
||||||
|
|
||||||
/- truncated types -/
|
/- truncated types -/
|
||||||
|
|
||||||
|
@ -112,7 +120,7 @@ end is_trunc open is_trunc
|
||||||
structure is_trunc [class] (n : ℕ₋₂) (A : Type) :=
|
structure is_trunc [class] (n : ℕ₋₂) (A : Type) :=
|
||||||
(to_internal : is_trunc_internal n A)
|
(to_internal : is_trunc_internal n A)
|
||||||
|
|
||||||
open nat num is_trunc.trunc_index
|
open nat num trunc_index
|
||||||
|
|
||||||
namespace is_trunc
|
namespace is_trunc
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,7 @@ Properties of is_trunc and trunctype
|
||||||
import .pointed2 ..function algebra.order types.nat.order
|
import .pointed2 ..function algebra.order types.nat.order
|
||||||
|
|
||||||
open eq sigma sigma.ops pi function equiv trunctype
|
open eq sigma sigma.ops pi function equiv trunctype
|
||||||
is_equiv prod is_trunc.trunc_index pointed nat is_trunc algebra
|
is_equiv prod pointed nat is_trunc algebra
|
||||||
|
|
||||||
namespace is_trunc
|
|
||||||
|
|
||||||
namespace trunc_index
|
namespace trunc_index
|
||||||
|
|
||||||
|
@ -201,6 +199,8 @@ namespace is_trunc
|
||||||
|
|
||||||
end trunc_index open trunc_index
|
end trunc_index open trunc_index
|
||||||
|
|
||||||
|
namespace is_trunc
|
||||||
|
|
||||||
variables {A B : Type} {n : ℕ₋₂}
|
variables {A B : Type} {n : ℕ₋₂}
|
||||||
|
|
||||||
/- theorems about trunctype -/
|
/- theorems about trunctype -/
|
||||||
|
@ -374,7 +374,7 @@ namespace is_trunc
|
||||||
{ apply is_trunc_eq}
|
{ apply is_trunc_eq}
|
||||||
end
|
end
|
||||||
|
|
||||||
end is_trunc open is_trunc is_trunc.trunc_index
|
end is_trunc open is_trunc
|
||||||
|
|
||||||
namespace trunc
|
namespace trunc
|
||||||
variable {A : Type}
|
variable {A : Type}
|
||||||
|
|
Loading…
Reference in a new issue