File size: 3,257 Bytes
4a56cd6 | 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 | import Mathlib.LinearAlgebra.FiniteDimensional.Lemmas
import Mathlib.LinearAlgebra.Dimension.Free
import Mathlib.LinearAlgebra.Basis.VectorSpace
import Mathlib.Algebra.BigOperators.Group.Finset.Pi
import Mathlib.Basic.Real.Basic
import Lean.Elab.Tactic.Omega
namespace OAI
noncomputable section
namespace Zarankiewicz
open Module Submodule
open scoped BigOperators
variable {W : Type*} [AddCommGroup W] [Module β W] [FiniteDimensional β W]
theorem exists_adapted_family (E : β β Submodule β W) (hE : Monotone E) (hzero : E 0 = β₯)
(h : β) :
β (v : Fin (finrank β (E h)) β W) (d : Fin (finrank β (E h)) β β),
LinearIndependent β v β§ span β (Set.range v) = E h β§
(β i, d i < h β§ v i β E (d i+1)) β§
(β i, d i) = β e β Finset.range h, e * (finrank β (E (e+1)) - finrank β (E e)) := by
classical
induction h with
| zero =>
have hd : finrank β (E 0) = 0 := by simp [hzero]
rw [hd]
refine β¨Fin.elim0, Fin.elim0, linearIndependent_empty_type, ?_, ?_, ?_β©
Β· simp [hzero]
Β· intro i
exact Fin.elim0 i
Β· simp
| succ h ih =>
obtain β¨v, d, hli, hspan, hmem, hsumβ© := ih
obtain β¨C, hdisj, hsupβ© := IsModularLattice.exists_disjoint_and_sup_eq (hE (Nat.le_succ h))
have hCle : C β€ E (h+1) := by rw [β hsup]; exact le_sup_right
have hdim : finrank β (E h) + finrank β C = finrank β (E (h+1)) := by
have hh := Submodule.finrank_sup_add_finrank_inf_eq (E h) C
rw [hsup, hdisj.eq_bot, finrank_bot, add_zero] at hh
exact hh.symm
have hCdim : finrank β C = finrank β (E (h+1)) - finrank β (E h) := by omega
let b := finBasis β C
let w : Fin (finrank β C) β W := fun i => C.subtype (b i)
have hwli : LinearIndependent β w := b.linearIndependent.map' C.subtype (Submodule.ker_subtype C)
have hwspan : span β (Set.range w) = C := by
change span β (Set.range (C.subtype β b)) = C
rw [Set.range_comp, Submodule.span_image, b.span_eq, Submodule.map_subtype_top]
let v' := Sum.elim v w
let d' := Sum.elim d (fun _ : Fin (finrank β C) => h)
have hv' : LinearIndependent β v' :=
hli.sum_type hwli (by rwa [hspan, hwspan])
let e : Fin (finrank β (E (h+1))) β
(Fin (finrank β (E h)) β Fin (finrank β C)) :=
Fintype.equivOfCardEq (by simp [hdim])
refine β¨v' β e, d' β e, hv'.comp e e.injective, ?_, ?_, ?_β©
Β· rw [Set.range_comp, e.surjective.range_eq, Set.image_univ]
change span β (Set.range (Sum.elim v w)) = E (h+1)
rw [Set.Sum.elim_range, span_union, hspan, hwspan, hsup]
Β· intro i
change d' (e i) < h+1 β§ v' (e i) β E (d' (e i)+1)
cases he : e i with
| inl j =>
change d j < h+1 β§ v j β E (d j+1)
exact β¨(hmem j).1.trans (Nat.lt_succ_self h), (hmem j).2β©
| inr j =>
change h < h+1 β§ w j β E (h+1)
exact β¨Nat.lt_succ_self h, hCle (b j).propertyβ©
Β· change (β i, d' (e i)) = _
rw [e.sum_comp, Fintype.sum_sum_type, Finset.sum_range_succ]
change (β i, d i) + (β _ : Fin (finrank β C), h) = _
rw [hsum]
simp [hCdim, Nat.mul_comm]
end Zarankiewicz
end
end OAI
|