File size: 9,701 Bytes
ae00908
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
import Mathlib
import OAI.Algebra.FrobeniusObstruction.TensorCohomology
import OAI.Algebra.FrobeniusObstruction.CycleTransfer

namespace OAI

noncomputable section
open scoped BigOperators TensorProduct

namespace BoundaryOnly.FormalObstruction

variable {k : Type*} [Field k]

private theorem generalized_inverse {V : Type*} [AddCommGroup V] [Module k V]
    (S : V →ₗ[k] V) : ∃ L : V →ₗ[k] V, ∀ x, S (L (S x)) = S x := by
  obtain ⟨g,hg⟩ := S.rangeRestrict.exists_rightInverse_of_surjective S.range_rangeRestrict
  obtain ⟨h,hh⟩ := S.range.subtype.exists_leftInverse_of_injective S.range.ker_subtype
  refine ⟨g.comp h, fun x => ?_⟩
  have hx : h (S x) = S.rangeRestrict x :=
    LinearMap.congr_fun hh (S.rangeRestrict x)
  change S (g (h (S x))) = S x
  rw [hx]
  exact congrArg Subtype.val (LinearMap.congr_fun hg (S.rangeRestrict x))

variable {ι : Type*} [Fintype ι] [DecidableEq ι]
variable (V : ι → Type*) [∀ i, AddCommGroup (V i)] [∀ i, Module k (V i)]

                                                                       
                             
def kernelTensorSpace (S : ∀ i, V i →ₗ[k] V i) (J : Finset ι) :
    Submodule k (⨂[k] i, V i) :=
  Submodule.span k {z | ∃ m : ∀ i, V i,
    (∀ i ∈ J, S i (m i) = 0) ∧ PiTensorProduct.tprod k m = z}

                                         
def tensorAction (S : ∀ i, V i →ₗ[k] V i) (I : Finset ι) :
    (⨂[k] i, V i) →ₗ[k] (⨂[k] i, V i) :=
  PiTensorProduct.map fun i => if i ∈ I then S i else LinearMap.id

                                                                             
                                                                            
                                                                        
theorem joint_tensor_kernel (S : ∀ i, V i →ₗ[k] V i) (active : Finset ι) :
    (⨅ (I : Finset ι) (_ : I ⊆ active) (_ : I.card = 3),
      LinearMap.ker (tensorAction V S I)) =
    (⨆ (J : Finset ι) (_ : J ⊆ active) (_ : (active \ J).card ≤ 2),
      kernelTensorSpace V S J) := by
  classical
  let R := ⨆ (J : Finset ι) (_ : J ⊆ active) (_ : (active \ J).card ≤ 2),
      kernelTensorSpace V S J
  have hR (J : Finset ι) (hJ : J ⊆ active) (hc : (active \ J).card ≤ 2) :
      kernelTensorSpace V S J ≤ R := le_iSup_of_le J (le_iSup_of_le hJ (le_iSup_of_le hc le_rfl))
  apply le_antisymm
  · intro x hx
    have hz (I : Finset ι) (hI : I ⊆ active) (hcard : I.card = 3) :
        tensorAction V S I x = 0 := by
      exact ((Submodule.mem_iInf _).mp ((Submodule.mem_iInf _).mp ((Submodule.mem_iInf _).mp hx I) hI) hcard)
    choose L hL using fun i => generalized_inverse (S i)
    let Q (i : ι) := (L i).comp (S i)
    let P (i : ι) := LinearMap.id - Q i
    have hSP (i : ι) (v : V i) : S i (P i v) = 0 := by
      change S i (v - L i (S i v)) = 0
      rw [map_sub, hL, sub_self]
    let F (A : Finset ι) := PiTensorProduct.map fun i => if i ∈ A then Q i else P i
    have hsum : ∑ A : Finset ι, F A = LinearMap.id := by
      apply PiTensorProduct.ext
      ext m
      simp only [LinearMap.compMultilinearMap_apply, LinearMap.sum_apply, LinearMap.id_apply]
      simp only [F, PiTensorProduct.map_tprod]
      have hm : (fun i => Q i (m i)) + (fun i => P i (m i)) = m := by
        funext i
        change Q i (m i) + (m i - Q i (m i)) = m i
        abel
      conv_rhs => rw [← hm, (PiTensorProduct.tprod k).map_add_univ]
      apply Finset.sum_congr rfl
      intro A ha
      congr 1
      funext i
      simp only [Finset.piecewise]
      split_ifs <;> rfl
    have hFx (A : Finset ι) : F A x ∈ R := by
      by_cases hc : (active ∩ A).card ≤ 2
      · let J := active \ A
        have hJ : J ⊆ active := Finset.sdiff_subset
        have hjc : (active \ J).card ≤ 2 := by
          simpa only [J, Finset.sdiff_sdiff_self_left] using hc
        apply hR J hJ hjc
        clear hx hz
        induction x using PiTensorProduct.induction_on with
        | smul_tprod c m =>
          rw [map_smul]
          apply Submodule.smul_mem
          apply Submodule.subset_span
          refine ⟨fun i => (if i ∈ A then Q i else P i) (m i), ?_, ?_⟩
          · intro i hi
            have hiA : i ∉ A := (Finset.mem_sdiff.mp hi).2
            simpa only [ite_eq_right hiA] using hSP i (m i)
          · exact (PiTensorProduct.map_tprod _ _).symm
        | add x y hx hy =>
          rw [map_add]
          exact Submodule.add_mem _ hx hy
      · have hc' : 3 ≤ (active ∩ A).card := by omega
        obtain ⟨I,hI,hcard⟩ := Finset.exists_subset_card_eq hc'
        have hIa : I ⊆ active := fun i hi => (Finset.mem_inter.mp (hI hi)).1
        have hIA : I ⊆ A := fun i hi => (Finset.mem_inter.mp (hI hi)).2
        let H := PiTensorProduct.map fun i =>
          if i ∈ I then L i else if i ∈ A then Q i else P i
        have hcomp : F A = H.comp (tensorAction V S I) := by
          dsimp only [F, H, tensorAction]
          rw [← PiTensorProduct.map_comp]
          congr 1
          funext i
          by_cases hi : i ∈ I
          · simp only [ite_eq_left hi, ite_eq_left (hIA hi), Q]
          · simp only [ite_eq_right hi, LinearMap.comp_id]
        rw [hcomp, LinearMap.comp_apply, hz I hIa hcard, map_zero]
        exact R.zero_mem
    change x ∈ R
    have hsx := LinearMap.congr_fun hsum x
    simp only [LinearMap.sum_apply, LinearMap.id_apply] at hsx
    rw [← hsx]
    exact Submodule.sum_mem R (fun A _ => hFx A)
  · refine iSup_le fun J => iSup_le fun hJ => iSup_le fun hc => ?_
    refine le_iInf fun I => le_iInf fun hI => le_iInf fun hcard => ?_
    apply Submodule.span_le.mpr
    rintro z ⟨m,hm,rfl⟩
    have hex : ∃ i ∈ I, i ∈ J := by
      by_contra hn
      have hsub : I ⊆ active \ J := by
        intro i hi
        exact Finset.mem_sdiff.mpr ⟨hI hi, fun hij => hn ⟨i,hi,hij⟩⟩
      have := Finset.card_le_card hsub
      omega
    obtain ⟨i,hiI,hiJ⟩ := hex
    change tensorAction V S I (PiTensorProduct.tprod k m) = 0
    rw [tensorAction, PiTensorProduct.map_tprod]
    apply (PiTensorProduct.tprod k).map_coord_zero i
    simpa only [ite_eq_left hiI] using hm i hiJ

end BoundaryOnly.FormalObstruction

namespace BoundaryOnly.FormalObstruction
open scoped BigOperators TensorProduct

variable {k ι : Type*} [Field k] [Fintype ι] [LinearOrder ι]
variable {V : ι → Type*} [∀ i, AddCommGroup (V i)] [∀ i, Module k (V i)]

                                                                       
                                                                       
                                                                           
theorem select_special_fiber_tensor
    (S P D r h : SignedTensor.EndFamily (k := k) V)
    (active : Finset ι) (hcard : 5 ≤ active.card)
    (hP2 : ∀ i, P i * P i = 1)
    (hDP : ∀ i, D i * P i = -(P i * D i))
    (hDr : ∀ i, D i * r i = r i * D i)
    (hPr : ∀ i, P i * r i = r i * P i)
    (hPh : ∀ i, P i * h i = -(h i * P i))
    (hDh : ∀ i, D i * h i + h i * D i = 1 - r i)
    (hNr : ∀ i ∈ active, ∀ x, S i x = 0 →
      S i (r i x) = 0 ∧ S i (D i (r i x)) = 0)
    (φ : (⨂[k] i, V i) →ₗ[k] k)
    (hφD : ∀ x, φ (SignedTensor.differential V P D x) = 0)
    (z : ⨂[k] i, V i)
    (hDz : SignedTensor.differential V P D z = 0)
    (hφz : φ z ≠ 0)
    (hz : ∀ I : Finset ι, I ⊆ active → I.card = 3 → tensorAction V S I z = 0) :
    ∃ (J : Finset ι) (m : ∀ i, V i),
      J ⊆ active ∧ 3 ≤ J.card ∧
      (∀ i ∈ J, S i (m i) = 0 ∧ S i (D i (m i)) = 0) ∧
      φ (PiTensorProduct.tprod k m) ≠ 0 := by
  classical
  let Good : Set (⨂[k] i, V i) := {x | ∃ (J : Finset ι) (m : ∀ i, V i),
    J ⊆ active ∧ (active \ J).card ≤ 2 ∧
    (∀ i ∈ J, S i (m i) = 0 ∧ S i (D i (m i)) = 0) ∧
    PiTensorProduct.tprod k m = x}
  let T := Submodule.span k Good
  have hm : (⨅ (I : Finset ι) (_ : I ⊆ active) (_ : I.card = 3),
      LinearMap.ker (tensorAction V S I)) ≤ T.comap (PiTensorProduct.map r) := by
    rw [joint_tensor_kernel]
    refine iSup_le fun J => iSup_le fun hJ => iSup_le fun hJc => ?_
    apply Submodule.span_le.mpr
    rintro _ ⟨m,hm,rfl⟩
    change PiTensorProduct.map r (PiTensorProduct.tprod k m) ∈ T
    rw [PiTensorProduct.map_tprod]
    apply Submodule.subset_span
    refine ⟨J,fun i => r i (m i),hJ,hJc,?_,rfl⟩
    intro i hi
    exact hNr i (hJ hi) (m i) (hm i hi)
  have hzmem : z ∈ (⨅ (I : Finset ι) (_ : I ⊆ active) (_ : I.card = 3),
      LinearMap.ker (tensorAction V S I)) := by
    simp only [Submodule.mem_iInf, LinearMap.mem_ker]
    exact hz
  have hRz : PiTensorProduct.map r z ∈ T := hm hzmem
  have hpair : φ (PiTensorProduct.map r z) = φ z := by
    have H := LinearMap.congr_fun
      (SignedTensor.tensor_homotopy P D r h hP2 hDP hDr hPr hPh hDh) z
    change SignedTensor.differential V P D (SignedTensor.homotopy V P r h z) +
      SignedTensor.homotopy V P r h (SignedTensor.differential V P D z) =
        z - PiTensorProduct.map r z at H
    have Hφ := congrArg φ H
    rw [hDz, map_zero, add_zero, hφD, map_sub] at Hφ
    exact (sub_eq_zero.mp Hφ.symm).symm
  have hex : ∃ x ∈ Good, φ x ≠ 0 := by
    by_contra hn
    have hle : T ≤ LinearMap.ker φ := by
      apply Submodule.span_le.mpr
      intro x hx
      change φ x = 0
      by_contra hnx
      exact hn ⟨x,hx,hnx⟩
    apply hφz
    rw [← hpair]
    exact hle hRz
  obtain ⟨_,⟨J,m,hJ,hJc,hm,rfl⟩,hp⟩ := hex
  refine ⟨J,m,hJ,?_,hm,hp⟩
  have hc := Finset.card_sdiff_of_subset hJ
  have hle := Finset.card_le_card hJ
  omega

end BoundaryOnly.FormalObstruction

end

end OAI