Download data/lean/OAI/Algebra/Finitistic/Encoding/DirectedBound.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 11.5 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/Finitistic/Encoding/DirectedBound.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Algebra/Finitistic/Encoding/DirectedBound.lean
-
curl -L -o DirectedBound.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/Finitistic/Encoding/DirectedBound.lean
11.5 kB
| import Mathlib.Algebra.Category.ModuleCat.ProjectiveDimension | |
| import Mathlib.LinearAlgebra.TensorProduct.Tower | |
| import Mathlib.LinearAlgebra.Basis.VectorSpace | |
| import Mathlib.Algebra.Algebra.Opposite | |
| import Mathlib.Data.Fin.Rev | |
| import Mathlib.LinearAlgebra.FiniteDimensional.Defs | |
| namespace OAI | |
| noncomputable section | |
| open scoped TensorProduct | |
| open TensorProduct | |
| namespace LittleFinitistic.DirectedBound | |
| universe u v | |
| variable {k A : Type u} [Field k] [Ring A] [Algebra k A] {n : β} | |
| /-- The displayed algebraic hypotheses of Section 3, Lemma directed-bound. | |
| The field and algebra are unital; zero idempotents are allowed by the source. -/ | |
| structure DirectedSystem (k A : Type u) [Field k] [Ring A] [Algebra k A] (n : β) where | |
| e : Fin n β A | |
| idem : β i, e i * e i = e i | |
| orthogonal : β i j, i β j β e i * e j = 0 | |
| complete : β i, e i = 1 | |
| diagonal : β i a, β c : k, e i * a * e i = c β’ e i | |
| directed : β i j, j < i β β a, e j * a * e i = 0 | |
| namespace DirectedSystem | |
| variable (D : DirectedSystem k A n) | |
| variable (M : Type v) [AddCommGroup M] [Module A M] [Module k M] | |
| [IsScalarTower k A M] | |
| /-- Vanishing of vertex components below p, for arbitrary modules. -/ | |
| def Supported (p : β) : Prop := β j : Fin n, j.val < p β β m : M, D.e j β’ m = 0 | |
| /-- Evaluation of the free induced module. -/ | |
| def evaluation (_D : DirectedSystem k A n) : A β[k] M ββ[A] M := AlgebraTensorModule.lift | |
| { toFun := fun a => | |
| { toFun := fun m => a β’ m | |
| map_add' := smul_add a | |
| map_smul' := fun c m => smul_comm a c m } | |
| map_add' := fun a b => by ext m; exact add_smul a b m | |
| map_smul' := fun a b => by ext m; exact mul_smul a b m } | |
| @[simp] theorem evaluation_tmul (a : A) (m : M) : | |
| evaluation M D (a ββ[k] m) = a β’ m := rfl | |
| /-- One summand of the separable diagonal projection. -/ | |
| def vertexProjection (i : Fin n) : A β[k] M ββ[A] A β[k] M := | |
| AlgebraTensorModule.lift | |
| { toFun := fun a => | |
| { toFun := fun m => (a * D.e i) ββ[k] (D.e i β’ m) | |
| map_add' := fun x y => by simp [smul_add, tmul_add] | |
| map_smul' := fun c m => by | |
| simp only [RingHom.id_apply, smul_comm (D.e i) c, tmul_smul] } | |
| map_add' := fun a b => by ext m; simp [add_mul, add_tmul] | |
| map_smul' := fun a b => by | |
| ext m | |
| change ((a * b) * D.e i) ββ[k] (D.e i β’ m) = | |
| a β’ ((b * D.e i) ββ[k] (D.e i β’ m)) | |
| rw [smul_tmul', smul_eq_mul, mul_assoc] } | |
| @[simp] theorem vertexProjection_tmul (i : Fin n) (a : A) (m : M) : | |
| D.vertexProjection M i (a ββ[k] m) = (a * D.e i) ββ[k] (D.e i β’ m) := rfl | |
| def projection : A β[k] M ββ[A] A β[k] M := β i, D.vertexProjection M i | |
| @[simp] theorem projection_tmul (a : A) (m : M) : | |
| D.projection M (a ββ[k] m) = β i, (a * D.e i) ββ[k] (D.e i β’ m) := by | |
| simp [projection] | |
| lemma projection_vertexTensor (i : Fin n) (a : A) (m : M) : | |
| D.projection M ((a * D.e i) ββ[k] (D.e i β’ m)) = | |
| (a * D.e i) ββ[k] (D.e i β’ m) := by | |
| rw [projection_tmul, Finset.sum_eq_single i] | |
| Β· simp only [mul_assoc, D.idem, β mul_smul] | |
| Β· intro j _ hji | |
| rw [mul_assoc, D.orthogonal i j hji.symm, mul_zero, zero_tmul] | |
| Β· simp | |
| lemma projection_idempotent (x : A β[k] M) : | |
| D.projection M (D.projection M x) = D.projection M x := by | |
| induction x using TensorProduct.inductionOn with | |
| | tmul a m => | |
| rw [projection_tmul, map_sum] | |
| simp only [projection_vertexTensor] | |
| | add x y hx hy => simp only [map_add, hx, hy] | |
| lemma evaluation_projection (x : A β[k] M) : | |
| evaluation M D (D.projection M x) = evaluation M D x := by | |
| induction x using TensorProduct.inductionOn with | |
| | tmul a m => | |
| simp only [projection_tmul, map_sum, evaluation_tmul, β mul_smul, mul_assoc, D.idem] | |
| rw [β Finset.sum_smul, β Finset.mul_sum, D.complete, mul_one] | |
| | add x y hx hy => simp only [map_add, hx, hy] | |
| /-- The manuscript's projective cover, realized as an actual direct summand. -/ | |
| abbrev Cover := LinearMap.range (D.projection M) | |
| instance cover_addCommGroup : AddCommGroup (D.Cover M) := | |
| Submodule.addCommGroup _ | |
| instance cover_projective : Module.Projective A (D.Cover M) := by | |
| apply Module.Projective.of_split (D.projection M).range.subtype | |
| (D.projection M).rangeRestrict | |
| ext x | |
| obtain β¨t, htβ© := x.property | |
| change D.projection M x.val = x.val | |
| rw [β ht, projection_idempotent] | |
| /-- Evaluation restricted to the projective summand. -/ | |
| abbrev coverMap : D.Cover M ββ[A] M := | |
| (evaluation M D).comp (D.projection M).range.subtype | |
| lemma coverMap_surjective : Function.Surjective (D.coverMap M) := by | |
| intro m | |
| refine β¨(D.projection M).rangeRestrict (1 ββ[k] m), ?_β© | |
| change evaluation M D (D.projection M (1 ββ[k] m)) = m | |
| rw [evaluation_projection, evaluation_tmul, one_smul] | |
| lemma low_tensor {p : β} (hM : D.Supported M p) (j : Fin n) (hj : j.val β€ p) | |
| (i : Fin n) (a : A) (m : M) : | |
| (D.e j * a * D.e i) ββ[k] (D.e i β’ m) = | |
| D.e j ββ[k] ((D.e j * a * D.e i) β’ (D.e i β’ m)) := by | |
| by_cases hij : i = j | |
| Β· subst i | |
| obtain β¨c, hcβ© := D.diagonal j a | |
| rw [hc, smul_tmul, smul_assoc, β mul_smul, D.idem, tmul_smul] | |
| Β· rcases lt_or_gt_of_ne hij with hij | hij | |
| Β· have hz := hM i (by omega) m | |
| simp [hz] | |
| Β· rw [D.directed i j hij a] | |
| simp | |
| lemma low_projection {p : β} (hM : D.Supported M p) (j : Fin n) (hj : j.val β€ p) | |
| (x : A β[k] M) : | |
| D.e j β’ D.projection M x = | |
| D.e j ββ[k] evaluation M D (D.e j β’ D.projection M x) := by | |
| induction x using TensorProduct.inductionOn with | |
| | tmul a m => | |
| simp only [projection_tmul, Finset.smul_sum, smul_tmul', smul_eq_mul, map_sum, | |
| evaluation_tmul, tmul_sum] | |
| apply Finset.sum_congr rfl | |
| intro i _ | |
| simpa only [β mul_assoc] using D.low_tensor M hM j hj i a m | |
| | add x y hx hy => | |
| simp only [map_add, smul_add, tmul_add] | |
| exact congrArgβ (Β· + Β·) hx hy | |
| /-- One syzygy raises the lower bound on the support by one. -/ | |
| lemma kernel_supported {p : β} (hM : D.Supported M p) : | |
| D.Supported (LinearMap.ker (D.coverMap M)) (p + 1) := by | |
| intro j hj x | |
| apply Subtype.ext | |
| apply Subtype.ext | |
| change D.e j β’ x.val.val = 0 | |
| obtain β¨t, htβ© := x.val.property | |
| have h := D.low_projection M hM j (by omega) t | |
| rw [ht] at h | |
| rw [h, map_smul] | |
| have hz : evaluation M D x.val.val = 0 := x.property | |
| rw [hz, smul_zero, tmul_zero] | |
| open CategoryTheory | |
| omit [Module k M] [IsScalarTower k A M] in | |
| lemma supported_subsingleton (hM : D.Supported M n) : Subsingleton M := by | |
| have hz (m : M) : m = 0 := by | |
| calc | |
| m = (1 : A) β’ m := (one_smul A m).symm | |
| _ = (β i, D.e i) β’ m := by rw [D.complete] | |
| _ = β i, D.e i β’ m := Finset.sum_smul | |
| _ = 0 := Finset.sum_eq_zero (fun i _ => hM i i.isLt m) | |
| exact β¨fun x y => (hz x).trans (hz y).symmβ© | |
| /-- The support induction uses genuine projective dimensions (vanishing Ext), | |
| via mathlib's short exact sequence dimension-shifting theorem. -/ | |
| theorem supported_projectiveDimensionLT (r : β) : | |
| β (p : β), p + r = n β β (N : Type (max u v)) | |
| [AddCommGroup N] [Module A N] [Module k N] [IsScalarTower k A N], | |
| D.Supported N p β HasProjectiveDimensionLT (ModuleCat.of A N) r := by | |
| induction r with | |
| | zero => | |
| intro p hp N _ _ _ _ hN | |
| have hp' : p = n := by omega | |
| subst p | |
| have := D.supported_subsingleton N hN | |
| exact (ModuleCat.isZero_iff_subsingleton.mpr inferInstance).hasProjectiveDimensionLT_zero | |
| | succ r ih => | |
| intro p hp N _ _ _ _ hN | |
| have hK := ih (p + 1) (by omega) (LinearMap.ker (D.coverMap N)) | |
| (D.kernel_supported N hN) | |
| have hP : HasProjectiveDimensionLT (ModuleCat.of A (D.Cover N)) (r + 1) := | |
| hasProjectiveDimensionLT_of_ge _ 1 (r + 1) (by omega) | |
| exact (LinearMap.shortExact_shortComplexKer (D.coverMap_surjective N)).hasProjectiveDimensionLT_Xβ r hK hP | |
| include D | |
| /-- Every left module is covered, with no finite generation restriction. -/ | |
| theorem all_modules_projectiveDimensionLT (N : ModuleCat.{max u v} A) : | |
| HasProjectiveDimensionLT N n := by | |
| let : Module k N := Module.compHom N (algebraMap k A) | |
| let : IsScalarTower k A N := IsScalarTower.of_compHom k A N | |
| exact D.supported_projectiveDimensionLT n 0 (by omega) N (by | |
| intro j hj | |
| omega) | |
| theorem all_modules_projectiveDimension_le (N : ModuleCat.{max u v} A) : | |
| projectiveDimension N β€ (n - 1 : β) := by | |
| have := D.all_modules_projectiveDimensionLT N | |
| apply (projectiveDimension_le_iff N (n - 1)).mpr | |
| exact hasProjectiveDimensionLT_of_ge N n ((n - 1) + 1) (by omega) | |
| /-- Reversing the vertices transfers exactly the hypotheses to right modules. -/ | |
| def opposite : DirectedSystem k Aα΅α΅α΅ n where | |
| e i := MulOpposite.op (D.e i.rev) | |
| idem i := by | |
| apply MulOpposite.unop_injective | |
| exact D.idem i.rev | |
| orthogonal i j hij := by | |
| apply MulOpposite.unop_injective | |
| exact D.orthogonal j.rev i.rev (fun h => hij (Fin.rev_injective h.symm)) | |
| complete := by | |
| apply MulOpposite.unop_injective | |
| change (MulOpposite.opAddEquiv.symm : Aα΅α΅α΅ β+ A) | |
| (β i : Fin n, MulOpposite.op (D.e i.rev)) = 1 | |
| rw [map_sum] | |
| change (β i : Fin n, D.e i.rev) = 1 | |
| calc | |
| β i : Fin n, D.e i.rev = β i, D.e i := Equiv.sum_comp Fin.revPerm D.e | |
| _ = 1 := D.complete | |
| diagonal i a := by | |
| obtain β¨c, hcβ© := D.diagonal i.rev a.unop | |
| refine β¨c, ?_β© | |
| apply MulOpposite.unop_injective | |
| simpa only [MulOpposite.unop_mul, MulOpposite.unop_op, MulOpposite.unop_smul, | |
| mul_assoc] using hc | |
| directed i j hij a := by | |
| apply MulOpposite.unop_injective | |
| simpa only [MulOpposite.unop_mul, MulOpposite.unop_op, MulOpposite.unop_zero, | |
| mul_assoc] using D.directed j.rev i.rev (Fin.rev_lt_rev.mpr hij) a.unop | |
| /-- Both sides, quantified over arbitrary modules in any larger universe. -/ | |
| theorem both_sides_projectiveDimension_le : | |
| (β N : ModuleCat.{max u v} A, projectiveDimension N β€ (n - 1 : β)) β§ | |
| (β N : ModuleCat.{max u v} Aα΅α΅α΅, projectiveDimension N β€ (n - 1 : β)) := | |
| β¨D.all_modules_projectiveDimension_le, D.opposite.all_modules_projectiveDimension_leβ© | |
| /-- The global dimensions are the suprema of the actual module projective dimensions. -/ | |
| theorem both_sides_globalDimension_le : | |
| (β¨ N : ModuleCat.{max u v} A, projectiveDimension N) β€ (n - 1 : β) β§ | |
| (β¨ N : ModuleCat.{max u v} Aα΅α΅α΅, projectiveDimension N) β€ (n - 1 : β) := | |
| β¨iSup_le D.all_modules_projectiveDimension_le, | |
| iSup_le D.opposite.all_modules_projectiveDimension_leβ© | |
| end DirectedSystem | |
| open CategoryTheory | |
| /-- Section 3, Lemma directed-bound, with its displayed hypotheses expanded. | |
| Finite dimensionality is retained here although the proof proves a stronger result. -/ | |
| theorem directed_bound [FiniteDimensional k A] (e : Fin n β A) | |
| (idem : β i, e i * e i = e i) | |
| (orthogonal : β i j, i β j β e i * e j = 0) | |
| (complete : β i, e i = 1) | |
| (diagonal : β i a, β c : k, e i * a * e i = c β’ e i) | |
| (directed : β i j, j < i β β a, e j * a * e i = 0) : | |
| (β¨ N : ModuleCat.{max u v} A, projectiveDimension N) β€ (n - 1 : β) β§ | |
| (β¨ N : ModuleCat.{max u v} Aα΅α΅α΅, projectiveDimension N) β€ (n - 1 : β) := | |
| (DirectedSystem.mk e idem orthogonal complete diagonal directed).both_sides_globalDimension_le | |
| end LittleFinitistic.DirectedBound | |
| end | |
| end OAI | |