Skip to content

Commit a365570

Browse files
committed
feat(Algebra/Homology): boundaries of embeddings of complex shapes (#14650)
In this PR, we define the lower/upper boundaries of embeddings of complex shapes. These notions shall be important when constructing canonical truncations of homological complexes.
1 parent 068f9f4 commit a365570

File tree

4 files changed

+204
-0
lines changed

4 files changed

+204
-0
lines changed

Mathlib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ import Mathlib.Algebra.Homology.DerivedCategory.ShortExact
324324
import Mathlib.Algebra.Homology.DerivedCategory.SingleTriangle
325325
import Mathlib.Algebra.Homology.DifferentialObject
326326
import Mathlib.Algebra.Homology.Embedding.Basic
327+
import Mathlib.Algebra.Homology.Embedding.Boundary
327328
import Mathlib.Algebra.Homology.Embedding.Extend
328329
import Mathlib.Algebra.Homology.Embedding.IsSupported
329330
import Mathlib.Algebra.Homology.Embedding.Restriction

Mathlib/Algebra/Homology/ComplexShape.lean

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,22 @@ theorem prev_eq' (c : ComplexShape ι) {i j : ι} (h : c.Rel i j) : c.prev j = i
164164
exact Exists.choose_spec (⟨i, h⟩ : ∃ k, c.Rel k j)
165165
#align complex_shape.prev_eq' ComplexShape.prev_eq'
166166

167+
lemma next_eq_self' (c : ComplexShape ι) (j : ι) (hj : ∀ k, ¬ c.Rel j k) :
168+
c.next j = j :=
169+
dif_neg (by simpa using hj)
170+
171+
lemma prev_eq_self' (c : ComplexShape ι) (j : ι) (hj : ∀ i, ¬ c.Rel i j) :
172+
c.prev j = j :=
173+
dif_neg (by simpa using hj)
174+
175+
lemma next_eq_self (c : ComplexShape ι) (j : ι) (hj : ¬ c.Rel j (c.next j)) :
176+
c.next j = j :=
177+
c.next_eq_self' j (fun k hk' => hj (by simpa only [c.next_eq' hk'] using hk'))
178+
179+
lemma prev_eq_self (c : ComplexShape ι) (j : ι) (hj : ¬ c.Rel (c.prev j) j) :
180+
c.prev j = j :=
181+
c.prev_eq_self' j (fun k hk' => hj (by simpa only [c.prev_eq' hk'] using hk'))
182+
167183
/-- The `ComplexShape` allowing differentials from `X i` to `X (i+a)`.
168184
(For example when `a = 1`, a cohomology theory indexed by `ℕ` or `ℤ`)
169185
-/

Mathlib/Algebra/Homology/Embedding/Basic.lean

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,18 @@ class IsTruncGE extends e.IsRelIff : Prop where
106106
mem_next {j : ι} {k' : ι'} (h : c'.Rel (e.f j) k') :
107107
∃ k, e.f k = k'
108108

109+
lemma mem_next [e.IsTruncGE] {j : ι} {k' : ι'} (h : c'.Rel (e.f j) k') : ∃ k, e.f k = k' :=
110+
IsTruncGE.mem_next h
111+
109112
/-- The condition that the image of the map `e.f` of an embedding of
110113
complex shapes `e : Embedding c c'` is stable by `c'.prev`. -/
111114
class IsTruncLE extends e.IsRelIff : Prop where
112115
mem_prev {i' : ι'} {j : ι} (h : c'.Rel i' (e.f j)) :
113116
∃ i, e.f i = i'
114117

118+
lemma mem_prev [e.IsTruncLE] {i' : ι'} {j : ι} (h : c'.Rel i' (e.f j)) : ∃ i, e.f i = i' :=
119+
IsTruncLE.mem_prev h
120+
115121
open Classical in
116122
/-- The map `ι' → Option ι` which sends `e.f i` to `some i` and the other elements to `none`. -/
117123
noncomputable def r (i' : ι') : Option ι :=
Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
/-
2+
Copyright (c) 2024 Joël Riou. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: Joël Riou
5+
-/
6+
import Mathlib.Algebra.Homology.Embedding.Basic
7+
import Mathlib.Algebra.Homology.HomologicalComplex
8+
9+
/-!
10+
# Boundary of an embedding of complex shapes
11+
12+
In the file `Algebra.Homology.Embedding.Basic`, given `p : ℤ`, we have defined
13+
an embedding `embeddingUpIntGE p` of `ComplexShape.up ℕ` in `ComplexShape.up ℤ`
14+
which sends `n : ℕ` to `p + n`. The (canonical) truncation (`≥ p`) of
15+
`K : CochainComplex C ℤ` shall be defined as the extension to `ℤ`
16+
(see `Algebra.Homology.Embedding.Extend`) of
17+
a certain cochain complex indexed by `ℕ`:
18+
19+
`Q ⟶ K.X (p + 1) ⟶ K.X (p + 2) ⟶ K.X (p + 3) ⟶ ...`
20+
21+
where in degree `0`, the object `Q` identifies to the cokernel
22+
of `K.X (p - 1) ⟶ K.X p` (this is `K.opcycles p`). In this case,
23+
we see that the degree `0 : ℕ` needs a particular attention when
24+
constructing the truncation.
25+
26+
In this file, more generally, for `e : Embedding c c'`, we define
27+
a predicate `ι → Prop` named `e.BoundaryGE` which shall be relevant
28+
when constructing the truncation `K.truncGE e` when `e.IsTruncGE`.
29+
In the case of `embeddingUpIntGE p`, we show that `0 : ℕ` is the
30+
only element in this lower boundary. Similarly, we define
31+
`Embedding.BoundaryLE`.
32+
33+
-/
34+
35+
namespace ComplexShape
36+
37+
namespace Embedding
38+
39+
variable {ι ι' : Type*} (c : ComplexShape ι) (c' : ComplexShape ι') (e : Embedding c c')
40+
41+
/-- The lower boundary of an embedding `e : Embedding c c'`, as a predicate on `ι`.
42+
It is satisfied by `j : ι` when there exists `i' : ι'` not in the image of `e.f`
43+
such that `c'.Rel i' (e.f j)`. -/
44+
def BoundaryGE (j : ι) : Prop :=
45+
c'.Rel (c'.prev (e.f j)) (e.f j) ∧ ∀ i, ¬c'.Rel (e.f i) (e.f j)
46+
47+
lemma boundaryGE {i' : ι'} {j : ι} (hj : c'.Rel i' (e.f j)) (hi' : ∀ i, e.f i ≠ i') :
48+
e.BoundaryGE j := by
49+
constructor
50+
· simpa only [c'.prev_eq' hj] using hj
51+
· intro i hi
52+
apply hi' i
53+
rw [← c'.prev_eq' hj, c'.prev_eq' hi]
54+
55+
lemma not_boundaryGE_next [e.IsRelIff] {j k : ι} (hk : c.Rel j k) :
56+
¬ e.BoundaryGE k := by
57+
dsimp [BoundaryGE]
58+
simp only [not_and, not_forall, not_not]
59+
intro
60+
exact ⟨j, by simpa only [e.rel_iff] using hk⟩
61+
62+
lemma not_boundaryGE_next' [e.IsRelIff] {j k : ι} (hj : ¬ e.BoundaryGE j) (hk : c.next j = k) :
63+
¬ e.BoundaryGE k := by
64+
by_cases hjk : c.Rel j k
65+
· exact e.not_boundaryGE_next hjk
66+
· subst hk
67+
simpa only [c.next_eq_self j hjk] using hj
68+
69+
variable {e} in
70+
lemma BoundaryGE.not_mem {j : ι} (hj : e.BoundaryGE j) {i' : ι'} (hi' : c'.Rel i' (e.f j))
71+
(a : ι) : e.f a ≠ i' := fun ha =>
72+
hj.2 a (by simpa only [ha] using hi')
73+
74+
lemma prev_f_of_not_boundaryGE [e.IsRelIff] {i j : ι} (hij : c.prev j = i)
75+
(hj : ¬ e.BoundaryGE j) :
76+
c'.prev (e.f j) = e.f i := by
77+
by_cases hij' : c.Rel i j
78+
· exact c'.prev_eq' (by simpa only [e.rel_iff] using hij')
79+
· obtain rfl : j = i := by
80+
simpa only [c.prev_eq_self j (by simpa only [hij] using hij')] using hij
81+
apply c'.prev_eq_self
82+
intro hj'
83+
simp only [BoundaryGE, not_and, not_forall, not_not] at hj
84+
obtain ⟨i, hi⟩ := hj hj'
85+
rw [e.rel_iff] at hi
86+
rw [c.prev_eq' hi] at hij
87+
exact hij' (by simpa only [hij] using hi)
88+
89+
variable {e} in
90+
lemma BoundaryGE.false {j : ι} (hj : e.BoundaryGE j) [e.IsTruncLE] : False := by
91+
obtain ⟨i, hi⟩ := e.mem_prev hj.1
92+
exact hj.2 i (by simpa only [hi] using hj.1)
93+
94+
/-- The upper boundary of an embedding `e : Embedding c c'`, as a predicate on `ι`.
95+
It is satisfied by `j : ι` when there exists `k' : ι'` not in the image of `e.f`
96+
such that `c'.Rel (e.f j) k'`. -/
97+
def BoundaryLE (j : ι) : Prop :=
98+
c'.Rel (e.f j) (c'.next (e.f j)) ∧ ∀ k, ¬c'.Rel (e.f j) (e.f k)
99+
100+
lemma boundaryLE {k' : ι'} {j : ι} (hj : c'.Rel (e.f j) k') (hk' : ∀ i, e.f i ≠ k') :
101+
e.BoundaryLE j := by
102+
constructor
103+
· simpa only [c'.next_eq' hj] using hj
104+
· intro k hk
105+
apply hk' k
106+
rw [← c'.next_eq' hj, c'.next_eq' hk]
107+
108+
lemma not_boundaryLE_prev [e.IsRelIff] {i j : ι} (hi : c.Rel i j) :
109+
¬ e.BoundaryLE i := by
110+
dsimp [BoundaryLE]
111+
simp only [not_and, not_forall, not_not]
112+
intro
113+
exact ⟨j, by simpa only [e.rel_iff] using hi⟩
114+
115+
lemma not_boundaryLE_prev' [e.IsRelIff] {i j : ι} (hj : ¬ e.BoundaryLE j) (hk : c.prev j = i) :
116+
¬ e.BoundaryLE i := by
117+
by_cases hij : c.Rel i j
118+
· exact e.not_boundaryLE_prev hij
119+
· subst hk
120+
simpa only [c.prev_eq_self j hij] using hj
121+
122+
variable {e} in
123+
lemma BoundaryLE.not_mem {j : ι} (hj : e.BoundaryLE j) {k' : ι'} (hk' : c'.Rel (e.f j) k')
124+
(a : ι) : e.f a ≠ k' := fun ha =>
125+
hj.2 a (by simpa only [ha] using hk')
126+
127+
lemma next_f_of_not_boundaryLE [e.IsRelIff] {j k : ι} (hjk : c.next j = k)
128+
(hj : ¬ e.BoundaryLE j) :
129+
c'.next (e.f j) = e.f k := by
130+
by_cases hjk' : c.Rel j k
131+
· exact c'.next_eq' (by simpa only [e.rel_iff] using hjk')
132+
· obtain rfl : j = k := by
133+
simpa only [c.next_eq_self j (by simpa only [hjk] using hjk')] using hjk
134+
apply c'.next_eq_self
135+
intro hj'
136+
simp only [BoundaryLE, not_and, not_forall, not_not] at hj
137+
obtain ⟨k, hk⟩ := hj hj'
138+
rw [e.rel_iff] at hk
139+
rw [c.next_eq' hk] at hjk
140+
exact hjk' (by simpa only [hjk] using hk)
141+
142+
variable {e} in
143+
lemma BoundaryLE.false {j : ι} (hj : e.BoundaryLE j) [e.IsTruncGE] : False := by
144+
obtain ⟨k, hk⟩ := e.mem_next hj.1
145+
exact hj.2 k (by simpa only [hk] using hj.1)
146+
147+
end Embedding
148+
149+
lemma boundaryGE_embeddingUpIntGE_iff (p : ℤ) (n : ℕ) :
150+
(embeddingUpIntGE p).BoundaryGE n ↔ n = 0 := by
151+
constructor
152+
· intro h
153+
obtain _|n := n
154+
· rfl
155+
· have := h.2 n
156+
dsimp at this
157+
omega
158+
· rintro rfl
159+
constructor
160+
· simp
161+
· intro i hi
162+
dsimp at hi
163+
omega
164+
165+
lemma boundaryLE_embeddingUpIntLE_iff (p : ℤ) (n : ℕ) :
166+
(embeddingUpIntGE p).BoundaryGE n ↔ n = 0 := by
167+
constructor
168+
· intro h
169+
obtain _|n := n
170+
· rfl
171+
· have := h.2 n
172+
dsimp at this
173+
omega
174+
· rintro rfl
175+
constructor
176+
· simp
177+
· intro i hi
178+
dsimp at hi
179+
omega
180+
181+
end ComplexShape

0 commit comments

Comments
 (0)