Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up Cohomology Ring #845

Merged
merged 129 commits into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
3f62a82
Fix Direct-sum :
thomas-lamiaux Apr 6, 2022
620bfc5
Merge branch 'agda:master' into master
thomas-lamiaux Apr 6, 2022
1f12e1f
add the definition of the cohomology ring
thomas-lamiaux Apr 6, 2022
3bee7f0
some progress for the graded property
thomas-lamiaux Apr 7, 2022
a075003
module name changes
thomas-lamiaux Apr 7, 2022
0ee0210
Add gradedComm proof :
thomas-lamiaux Apr 7, 2022
015710b
uniformisation of the notation
thomas-lamiaux Apr 7, 2022
ecad958
Computation of H*(Unit) cong Z
thomas-lamiaux Apr 8, 2022
d4adcc7
Proof in a more general setting :
thomas-lamiaux Apr 9, 2022
37342d4
Simplification
thomas-lamiaux Apr 9, 2022
22f07e7
Renaming
thomas-lamiaux Apr 9, 2022
4e45548
correct trailing-whitespaces and one path
thomas-lamiaux Apr 9, 2022
67d21cf
Fix dependencies :
thomas-lamiaux Apr 9, 2022
d38d370
Fix dependecies
thomas-lamiaux Apr 9, 2022
53d1962
fix dependecies
thomas-lamiaux Apr 9, 2022
c3ea1cb
fix dependencies
thomas-lamiaux Apr 9, 2022
cb88096
Fix dependency brunerie
thomas-lamiaux Apr 9, 2022
b21dc11
Add a recursor for the special case A / < a, ..., c >
thomas-lamiaux Apr 9, 2022
39ccad1
moved files
thomas-lamiaux Apr 9, 2022
7721b8b
Add a special recursor for polynomes :
thomas-lamiaux Apr 9, 2022
3b1e38c
delete trailing-white-spaces
thomas-lamiaux Apr 9, 2022
b4b3685
Begining to build a general framework ot the example of unit
thomas-lamiaux Apr 10, 2022
1167e9c
H*-Unit->Z[x] is a ring morphism
thomas-lamiaux Apr 10, 2022
4df89fa
Add functions H* Unit <-> Z[X]/X
thomas-lamiaux Apr 10, 2022
6c385a4
Builds all the framework except e-sect
thomas-lamiaux Apr 10, 2022
5696cae
Fix : commented a part
thomas-lamiaux Apr 10, 2022
c24276c
Compute H* Unit in a generalisable way
thomas-lamiaux Apr 10, 2022
86af319
A simplification
thomas-lamiaux Apr 12, 2022
a1861b2
Add the functions for S1 in both sens and stat proving some properties
thomas-lamiaux Apr 12, 2022
f3d2c17
Add the following :
thomas-lamiaux Apr 13, 2022
1938cb6
Add a proof of e-sect
thomas-lamiaux Apr 13, 2022
5b5d11f
Proof of the ring morphism for the case H0 H0
thomas-lamiaux Apr 14, 2022
a17e98f
stuck on filing squares in the ring morphism part
thomas-lamiaux Apr 14, 2022
e4815fc
First complete computation of H*(S¹) equiv Z[X]/X²
thomas-lamiaux Apr 15, 2022
c3419d7
clean up
thomas-lamiaux Apr 15, 2022
49ed72d
Add direct prod for rings
thomas-lamiaux Apr 18, 2022
d7c30ea
Add Direct Prod for CommRing
thomas-lamiaux Apr 18, 2022
d6d6104
Merge branch 'agda:master' into master
thomas-lamiaux Apr 20, 2022
6dcf4b0
Partially add Coproduct
thomas-lamiaux Apr 20, 2022
11c9cce
Coproduct : add proof of sect
thomas-lamiaux Apr 20, 2022
7d4284f
Add morphism on the cup product
thomas-lamiaux Apr 20, 2022
efc74ed
Coproduct : Add H*(X coprod Y) equiv H*(X) x H*(Y)
thomas-lamiaux Apr 20, 2022
2ad2efb
Coproduct : clean up
thomas-lamiaux Apr 20, 2022
05ae65d
small clean up Unit
thomas-lamiaux Apr 20, 2022
514a50f
S0 : refine doesn't type check in time
thomas-lamiaux Apr 20, 2022
d763231
Same issue
thomas-lamiaux Apr 21, 2022
dc1dd58
Clean up but still fails computing :
thomas-lamiaux Apr 21, 2022
fc7902c
Uniformisation of the files
thomas-lamiaux Apr 22, 2022
8e41dad
Clean up :
thomas-lamiaux Apr 22, 2022
fb60c60
clean up on S0, still issue
thomas-lamiaux Apr 22, 2022
67ce7d3
Fix for S0 !
thomas-lamiaux Apr 22, 2022
78d5668
Add notation for the polynomial ring
thomas-lamiaux Apr 22, 2022
4e4c217
Fix : forgot to add a file
thomas-lamiaux Apr 22, 2022
2e0cea6
Sn : Partition + transport + functions in both sens
thomas-lamiaux Apr 23, 2022
9ee3cd1
S1 : Big issue what to do in the case 0 < k < Sn and 0 < l < Sn ?
thomas-lamiaux Apr 23, 2022
6e2aa4b
Sn : Fix the wronfull traduction + Add / Miss :
thomas-lamiaux Apr 24, 2022
72941a6
Sn : Add secction and retraction, Missing computation rule
thomas-lamiaux Apr 25, 2022
0e1dadd
Sn : change the partition
thomas-lamiaux Apr 25, 2022
774f49a
Sn : change the partition
thomas-lamiaux Apr 25, 2022
e4a40da
Sn : computed !
thomas-lamiaux Apr 25, 2022
afed64c
CP2 : All but cup product morpism on H2 -> H2 -> H4
thomas-lamiaux Apr 26, 2022
516c5ae
CP2 : All except but cup product morphism H2 -> H2 -> H4
thomas-lamiaux Apr 26, 2022
1cf0b2b
Renaming + add some encode-decode proof
thomas-lamiaux Apr 27, 2022
28c243d
Remove CP2 from pull request + Continue adding lemma
thomas-lamiaux Apr 28, 2022
4a95228
add a file
thomas-lamiaux Apr 28, 2022
42b6e63
Adding lemma for vec to prove the equivalence
thomas-lamiaux Apr 29, 2022
b306cc7
Add PA->A-cancel
thomas-lamiaux Apr 30, 2022
559a91a
Add lemma -> entirely prove PA->A-cancel
thomas-lamiaux Apr 30, 2022
4e3b821
Fit an offet issue between 1k0 on Vec and FinVec
thomas-lamiaux May 2, 2022
eaaceda
Complete the proof of A[X1,...,Xn]/<X1,...,Xn> equiv A
thomas-lamiaux May 3, 2022
574ce6d
Merge branch 'agda:master' into master
thomas-lamiaux May 3, 2022
7b14401
Merge branch 'master' into cup-product
thomas-lamiaux May 3, 2022
99c9d7a
Fix some merging issues
thomas-lamiaux May 3, 2022
8a0291a
Add an explicit equivalence for the previous commit
thomas-lamiaux May 3, 2022
5678778
Add A[X]/X equiv A
thomas-lamiaux May 4, 2022
3283566
Add a H*(Unit) = Z + fix a bug
thomas-lamiaux May 4, 2022
64efe74
Merge branch 'agda:master' into master
thomas-lamiaux May 5, 2022
a1a5e86
Merge branch 'master' into cup-product
thomas-lamiaux May 5, 2022
f53b681
Enfonce new convention for importing module
thomas-lamiaux May 5, 2022
1eb2d11
Enforce module import convention
thomas-lamiaux May 5, 2022
b52322f
Enforcing using bot.rec rather then rec-bot
thomas-lamiaux May 5, 2022
41fe5b1
clean up importing module + enforcing rec, elim import
thomas-lamiaux May 5, 2022
0802720
clean up
thomas-lamiaux May 5, 2022
e182ade
enforce notation pred...
thomas-lamiaux May 5, 2022
f8cd307
Enforece pres... notation
thomas-lamiaux May 5, 2022
9cbb571
Enforce pres... notation
thomas-lamiaux May 5, 2022
0b29d54
Enforcing Algebra convention
thomas-lamiaux May 5, 2022
06fe36e
Fix pull request
thomas-lamiaux May 6, 2022
fc4d006
fix trailing white spaces
thomas-lamiaux May 6, 2022
a4fa9af
Merge branch 'agda:master' into master
thomas-lamiaux May 7, 2022
e833b03
Merge branch 'master' into cup-product
thomas-lamiaux May 7, 2022
e711dde
Merge branch 'agda:master' into master
thomas-lamiaux May 7, 2022
48480fc
Merge branch 'master' into cup-product
thomas-lamiaux May 7, 2022
30e5f5e
Add theframework around CP2
thomas-lamiaux May 7, 2022
fdf9af8
Merge branch 'agda:master' into master
thomas-lamiaux May 9, 2022
39c4855
Merge branch 'agda:master' into master
thomas-lamiaux May 13, 2022
1c66581
Merge branch 'master' into cup-product
thomas-lamiaux May 13, 2022
99f978c
update CP2
thomas-lamiaux May 13, 2022
79538ca
Merge branch 'agda:master' into master
thomas-lamiaux May 29, 2022
737cef0
Merge branch 'master' into cup-product
thomas-lamiaux May 29, 2022
db9a22b
A sketch of proof for CP2
thomas-lamiaux May 30, 2022
271992c
Try introducing notation
thomas-lamiaux May 31, 2022
aff3c90
Why isn't working ?
thomas-lamiaux May 31, 2022
4b7bc8d
Improve package of the proof
thomas-lamiaux May 31, 2022
5a11c79
Add a lemma file
thomas-lamiaux Jun 1, 2022
71204a1
Weird issue
thomas-lamiaux Jun 1, 2022
4bb13ca
Merge branch 'agda:master' into master
thomas-lamiaux Jun 3, 2022
53d8b56
Merge branch 'agda:master' into master
thomas-lamiaux Jun 8, 2022
b02cd00
Merge branch 'agda:master' into master
thomas-lamiaux Jun 13, 2022
58c0b83
Merge branch 'agda:master' into master
thomas-lamiaux Jun 16, 2022
9c0b869
Merge branch 'master' into cup-product
thomas-lamiaux Jun 17, 2022
11a976f
Adding CP2 + cleaning Unit
thomas-lamiaux Jun 19, 2022
d7fbba6
cleaning S1
thomas-lamiaux Jun 19, 2022
250ad2b
Fix a dependency
thomas-lamiaux Jun 19, 2022
e7b9a9e
Begin doing Sn
thomas-lamiaux Jun 19, 2022
c2112bc
Clean Sn
thomas-lamiaux Jun 19, 2022
13514c9
Delete useless diff
thomas-lamiaux Jun 19, 2022
5f2ff89
Delete CP2
thomas-lamiaux Jun 19, 2022
660f800
Fix issue
thomas-lamiaux Jun 19, 2022
f11e34c
Forgot to delete something
thomas-lamiaux Jun 19, 2022
8d4ffb8
Merge branch 'agda:master' into master
thomas-lamiaux Jul 22, 2022
01df9d9
Cosmetic changes
thomas-lamiaux Aug 14, 2022
5fbf63e
Some renaming
thomas-lamiaux Aug 15, 2022
303e1a6
Small fix
thomas-lamiaux Aug 15, 2022
bd1891c
reverse a change
thomas-lamiaux Aug 15, 2022
388b834
Issue version ?
thomas-lamiaux Aug 15, 2022
a8c066a
Merge branch 'agda:master' into master
thomas-lamiaux Aug 16, 2022
7753250
Merge branch 'master' into cup-product
thomas-lamiaux Aug 16, 2022
0b6cd3e
Fix all dep ?
thomas-lamiaux Aug 16, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions Cubical/Algebra/DirectSum/DirectSumHIT/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,20 @@ module SubstLemma

open AbGroupStr

subst0g : {l k : Idx} → (p : lk) → subst G p (0g (Gstr l)) ≡ 0g (Gstr k)
subst0g {l} {k} p = J (λ k p → subst G p (0g (Gstr l)) ≡ 0g (Gstr k)) (transportRefl _) p
substG : {k l : Idx} → (x : kl) → (a : G k) → G l
substG x a = subst G x a

subst+ : {l : Idx} → (a b : G l) → {k : Idx} → (p : l ≡ k) →
Gstr k ._+_ (subst G p a) (subst G p b) ≡ subst G p (Gstr l ._+_ a b)
subst+ {l} a b {k} p = J (λ k p → Gstr k ._+_ (subst G p a) (subst G p b) ≡ subst G p (Gstr l ._+_ a b))
(cong₂ (Gstr l ._+_) (transportRefl _) (transportRefl _) ∙ sym (transportRefl _))
substG0 : {k l : Idx} → (p : k ≡ l) → subst G p (0g (Gstr k)) ≡ 0g (Gstr l)
substG0 {k} {l} p = J (λ l p → subst G p (0g (Gstr k)) ≡ 0g (Gstr l)) (transportRefl _) p

substG+ : {k : Idx} → (a b : G k) → {l : Idx} → (p : k ≡ l) →
Gstr l ._+_ (subst G p a) (subst G p b) ≡ subst G p (Gstr k ._+_ a b)
substG+ {k} a b {l} p = J (λ l p → Gstr l ._+_ (subst G p a) (subst G p b) ≡ subst G p (Gstr k ._+_ a b))
(cong₂ (Gstr k ._+_) (transportRefl _) (transportRefl _) ∙ sym (transportRefl _))
p



module DecIndec-BaseProperties
(Idx : Type ℓ)
(decIdx : Discrete Idx)
Expand Down Expand Up @@ -108,12 +113,12 @@ module DecIndec-BaseProperties

base-neutral-eq : _
base-neutral-eq l with decIdx l k
... | yes p = subst0g p
... | yes p = substG0 p
... | no ¬p = refl

base-add-eq : _
base-add-eq l a b with decIdx l k
... | yes p = subst+ a b p
... | yes p = substG+ a b p
... | no ¬p = +IdR (Gstr k) _

πₖ-id : {k : Idx} → (a : G k) → πₖ k (base k a) ≡ a
Expand Down
14 changes: 6 additions & 8 deletions Cubical/Algebra/DirectSum/Equiv-DSHIT-DSFun.agda
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ module Equiv-Properties

open SubstLemma ℕ G Gstr

substG : (g : (n : ℕ) → G n) → {k n : ℕ} → (p : k ≡ n) → subst G p (g k) ≡ g n
substG g {k} {n} p = J (λ n p → subst G p (g k) ≡ g n) (transportRefl _) p
substG-fct : (g : (n : ℕ) → G n) → {k n : ℕ} → (p : k ≡ n) → subst G p (g k) ≡ g n
substG-fct g {k} {n} p = J (λ n p → subst G p (g k) ≡ g n) (transportRefl _) p


-----------------------------------------------------------------------------
Expand Down Expand Up @@ -140,14 +140,14 @@ module Equiv-Properties
where
base0-eq : (k : ℕ) → (n : ℕ) → fun-trad k (0g (Gstr k)) n ≡ 0g (Gstr n)
base0-eq k n with (discreteℕ k n)
... | yes p = subst0g _
... | yes p = substG0 _
... | no ¬p = refl

base-add-eq : (k : ℕ) → (a b : G k) → (n : ℕ) →
PathP (λ _ → G n) (Gstr n ._+_ (fun-trad k a n) (fun-trad k b n))
(fun-trad k ((Gstr k + a) b) n)
base-add-eq k a b n with (discreteℕ k n)
... | yes p = subst+ _ _ _
... | yes p = substG+ _ _ _
... | no ¬p = +IdR (Gstr n)_

⊕HIT→Fun-pres0 : ⊕HIT→Fun 0⊕HIT ≡ 0Fun
Expand Down Expand Up @@ -239,8 +239,6 @@ module Equiv-Properties
sumFunTail {m} a b dva dvb x n with discreteℕ m n
... | yes p = sumFun dva n ≡⟨ sym (substSumFun dva n p) ⟩
subst G p (sumFun dva m) ≡⟨ cong (subst G p) (sumFun< dva m ≤-refl) ⟩
subst G p (0g (Gstr m)) ≡⟨ subst0g p ⟩
0g (Gstr n) ≡⟨ sym (subst0g p) ⟩
subst G p (0g (Gstr m)) ≡⟨ sym (cong (subst G p) (sumFun< dvb m ≤-refl)) ⟩
subst G p (sumFun dvb m) ≡⟨ substSumFun dvb n p ⟩
sumFun dvb n ∎
Expand Down Expand Up @@ -321,10 +319,10 @@ module Equiv-Properties
if n ≢ suc m, then it is in the rest of the sum => recursive call -}
Strad-n≤m : (g : (n : ℕ) → G n) → (m : ℕ) → (n : ℕ) → (r : n ≤ m) → ⊕HIT→Fun (Strad g m) n ≡ g n
Strad-n≤m g zero n r with discreteℕ 0 n
... | yes p = substG g p
... | yes p = substG-fct g p
... | no ¬p = ⊥.rec (¬p (sym (≤0→≡0 r)))
Strad-n≤m g (suc m) n r with discreteℕ (suc m) n
... | yes p = cong₂ ((Gstr n)._+_) (substG g p) (Strad-m<n g m n (0 , p)) ∙ +IdR (Gstr n) _
... | yes p = cong₂ ((Gstr n)._+_) (substG-fct g p) (Strad-m<n g m n (0 , p)) ∙ +IdR (Gstr n) _
... | no ¬p = +IdL (Gstr n) _ ∙ Strad-n≤m g m n (≤-suc-≢ r λ x → ¬p (sym x))


Expand Down
43 changes: 21 additions & 22 deletions Cubical/Algebra/GradedRing/DirectSumFun.agda
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ module _

-- import for pres
open Equiv-Properties G Gstr using
( substG
; fun-trad
( fun-trad
; fun-trad-eq
; fun-trad-neq
; ⊕HIT→Fun
Expand Down Expand Up @@ -152,7 +151,7 @@ module _
where
sumF0 : (i n : ℕ) → (pp : k +ℕ l < n) → (r : i ≤ n) → sumFun i n r f g ≡ 0g (Gstr n)
sumF0 zero n pp r = cong (subst G (sameFiber r))
(cong (λ X → f 0 ⋆ X) (ng (n -ℕ zero) (<-k+-trans pp)) ∙ ⋆-0 _) ∙ subst0g _
(cong (λ X → f 0 ⋆ X) (ng (n -ℕ zero) (<-k+-trans pp)) ∙ ⋆-0 _) ∙ substG0 _
sumF0 (suc i) n pp r with splitℕ-≤ (suc i) k
... | inl x = cong₂ (Gstr n ._+_)
(cong (subst G (sameFiber r))
Expand All @@ -165,15 +164,15 @@ module _
∙ ⋆-0 (f (suc i))))
(sumF0 i n pp (≤-trans ≤-sucℕ r))
∙ +IdR (Gstr n) _
subst0g _
substG0 _

... | inr x = cong₂ (Gstr n ._+_)
(cong (subst G (sameFiber r))
(cong (λ X → X ⋆ g (n -ℕ (suc i))) (nf (suc i) x)
∙ 0-⋆ _))
(sumF0 i n pp (≤-trans ≤-sucℕ r))
∙ +IdR (Gstr n) _
subst0g _
substG0 _

_prodF_ : ⊕Fun G Gstr → ⊕Fun G Gstr → ⊕Fun G Gstr
_prodF_(f , Anf) (g , Ang) = (f prodFun g) , helper Anf Ang
Expand All @@ -190,33 +189,33 @@ module _
prodFunAnnihilL f = funExt (λ n → sumF0 n n ≤-refl)
where
sumF0 : (i n : ℕ) → (r : i ≤ n) → sumFun i n r 0Fun f ≡ 0g (Gstr n)
sumF0 zero n r = cong (subst G (sameFiber r)) (0-⋆ _) ∙ subst0g _
sumF0 zero n r = cong (subst G (sameFiber r)) (0-⋆ _) ∙ substG0 _
sumF0 (suc i) n r = cong₂ (Gstr n ._+_)
(cong (subst G (sameFiber r)) (0-⋆ _))
(sumF0 i n (≤-trans ≤-sucℕ r))
∙ +IdR (Gstr n) _
subst0g _
substG0 _


prodFunAnnihilR : (f : (n : ℕ) → (G n)) → f prodFun 0Fun ≡ 0Fun
prodFunAnnihilR f = funExt (λ n → sumF0 n n ≤-refl)
where
sumF0 : (i n : ℕ) → (r : i ≤ n) → sumFun i n r f 0Fun ≡ 0g (Gstr n)
sumF0 zero n r = cong (subst G (sameFiber r)) (⋆-0 _) ∙ subst0g _
sumF0 zero n r = cong (subst G (sameFiber r)) (⋆-0 _) ∙ substG0 _
sumF0 (suc i) n r = cong₂ (Gstr n ._+_)
(cong (subst G (sameFiber r)) (⋆-0 _))
(sumF0 i n (≤-trans ≤-sucℕ r))
∙ +IdR (Gstr n) _
subst0g _
substG0 _

prodFunDistR : (f g h : (n : ℕ) → G n) → f prodFun (g +Fun h) ≡ (f prodFun g) +Fun (f prodFun h)
prodFunDistR f g h = funExt (λ n → sumFAssoc n n ≤-refl)
where
sumFAssoc : (i n : ℕ) → (r : i ≤ n) → sumFun i n r f (g +Fun h) ≡ (Gstr n) ._+_ (sumFun i n r f g) (sumFun i n r f h)
sumFAssoc zero n r = cong (subst G (sameFiber r)) (⋆DistR+ _ _ _)
∙ sym (subst+ _ _ _)
∙ sym (substG+ _ _ _)
sumFAssoc (suc i) n r = cong₂ (Gstr n ._+_)
(cong (subst G (sameFiber r)) (⋆DistR+ _ _ _) ∙ sym (subst+ _ _ _))
(cong (subst G (sameFiber r)) (⋆DistR+ _ _ _) ∙ sym (substG+ _ _ _))
(sumFAssoc i n (≤-trans ≤-sucℕ r))
∙ comm-4 ((G n) , (Gstr n)) _ _ _ _

Expand All @@ -225,9 +224,9 @@ module _
where
sumFAssoc : (i n : ℕ) → (r : i ≤ n) → sumFun i n r (f +Fun g) h ≡ (Gstr n) ._+_ (sumFun i n r f h) (sumFun i n r g h)
sumFAssoc zero n r = cong (subst G (sameFiber r)) (⋆DistL+ _ _ _)
∙ sym (subst+ _ _ _)
∙ sym (substG+ _ _ _)
sumFAssoc (suc i) n r = cong₂ (Gstr n ._+_)
(cong (subst G (sameFiber r)) (⋆DistL+ _ _ _) ∙ sym (subst+ _ _ _))
(cong (subst G (sameFiber r)) (⋆DistL+ _ _ _) ∙ sym (substG+ _ _ _))
(sumFAssoc i n (≤-trans ≤-sucℕ r))
∙ comm-4 ((G n) , (Gstr n)) _ _ _ _

Expand All @@ -254,26 +253,26 @@ module _
sumFun i n r (fun-trad k a) (fun-trad l b) ≡ 0g (Gstr n)
sumFun≠ k a l b zero n r ¬pp with discreteℕ k 0 | discreteℕ l n
... | yes p | yes q = ⊥.rec (¬pp ((k +≡ l) ∙ cong₂ _+ℕ_ p q) )
... | yes p | no ¬q = cong (subst G (sameFiber r)) (⋆-0 _) ∙ subst0g _
... | no ¬p | yes q = cong (subst G (sameFiber r)) (0-⋆ _) ∙ subst0g _
... | no ¬p | no ¬q = cong (subst G (sameFiber r)) (0-⋆ _) ∙ subst0g _
... | yes p | no ¬q = cong (subst G (sameFiber r)) (⋆-0 _) ∙ substG0 _
... | no ¬p | yes q = cong (subst G (sameFiber r)) (0-⋆ _) ∙ substG0 _
... | no ¬p | no ¬q = cong (subst G (sameFiber r)) (0-⋆ _) ∙ substG0 _
sumFun≠ k a l b (suc i) n r ¬pp with discreteℕ k (suc i) | discreteℕ l (n -ℕ (suc i))
... | yes p | yes q = ⊥.rec (¬pp (cong₂ _+n_ p q ∙ sameFiber r))
... | yes p | no ¬q = cong₂ (Gstr n ._+_)
(cong (subst G (sameFiber r)) (⋆-0 _))
(sumFun≠ k a l b i n (≤-trans ≤-sucℕ r) ¬pp)
∙ +IdR (Gstr n) _
subst0g _
substG0 _
... | no ¬p | yes q = cong₂ (Gstr n ._+_)
(cong (subst G (sameFiber r)) (0-⋆ _))
(sumFun≠ k a l b i n (≤-trans ≤-sucℕ r) ¬pp)
∙ +IdR (Gstr n) _
subst0g _
substG0 _
... | no ¬p | no ¬q = cong₂ (Gstr n ._+_)
(cong (subst G (sameFiber r)) (0-⋆ _))
(sumFun≠ k a l b i n (≤-trans ≤-sucℕ r) ¬pp)
∙ +IdR (Gstr n) _
subst0g _
substG0 _


-- If k +n l ≡ n then, we unwrap the sum until we reach k.
Expand All @@ -283,14 +282,14 @@ module _
sumFun i n r (fun-trad k a) (fun-trad l b) ≡ 0g (Gstr n)
sumFun< k a l b zero n r pp with discreteℕ k 0
... | yes p = ⊥.rec (<→≢ pp (sym p))
... | no ¬p = cong (subst G (sameFiber r)) (0-⋆ _) ∙ subst0g _
... | no ¬p = cong (subst G (sameFiber r)) (0-⋆ _) ∙ substG0 _
sumFun< k a l b (suc i) n r pp with discreteℕ k (suc i)
... | yes p = ⊥.rec (<→≢ pp (sym p))
... | no ¬p = cong₂ (Gstr n ._+_)
(cong (subst G (sameFiber r)) (0-⋆ _))
(sumFun< k a l b i n (≤-trans ≤-sucℕ r) (<-trans ≤-refl pp))
∙ +IdR (Gstr n) _
subst0g _
substG0 _

sumFun≤ : (k : ℕ) → (a : G k) → (l : ℕ) → (b : G l ) →
(i n : ℕ) → (r : i ≤ n) → (pp : k +n l ≡ n) → (k ≤ i) →
Expand Down Expand Up @@ -321,7 +320,7 @@ module _
∙ sym (sameFiber r)
∙ ((suc i) +≡ (n -ℕ suc i)))))
... | no ¬p | no ¬q = cong₂ (Gstr n ._+_)
(cong (subst G (sameFiber r)) (0-⋆ _) ∙ subst0g _)
(cong (subst G (sameFiber r)) (0-⋆ _) ∙ substG0 _)
(sumFun≤ k a l b i n (≤-trans ≤-sucℕ r) pp (≤-suc-≢ rr ¬p))
∙ +IdL (Gstr n) _

Expand Down
8 changes: 8 additions & 0 deletions Cubical/Foundations/Transport.agda
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ transportTransport⁻ : ∀ {ℓ} {A B : Type ℓ} → (p : A ≡ B) → (b : B)
transport p (transport⁻ p b) ≡ b
transportTransport⁻ p b j = transport-fillerExt⁻ p j (transport⁻-fillerExt⁻ p j b)

subst⁻Subst : ∀ {ℓ ℓ'} {A : Type ℓ} {x y : A} (B : A → Type ℓ') (p : x ≡ y)
→ (u : B x) → subst⁻ B p (subst B p u) ≡ u
subst⁻Subst {x = x} {y = y} B p u = transport⁻Transport {A = B x} {B = B y} (cong B p) u

substSubst⁻ : ∀ {ℓ ℓ'} {A : Type ℓ} {x y : A} (B : A → Type ℓ') (p : x ≡ y)
→ (v : B y) → subst B p (subst⁻ B p v) ≡ v
substSubst⁻ {x = x} {y = y} B p v = transportTransport⁻ {A = B x} {B = B y} (cong B p) v

substEquiv : ∀ {ℓ ℓ'} {A : Type ℓ} {a a' : A} (P : A → Type ℓ') (p : a ≡ a') → P a ≃ P a'
substEquiv P p = (subst P p , isEquivTransport (λ i → P (p i)))

Expand Down
Loading