-
Notifications
You must be signed in to change notification settings - Fork 355
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
chore: generalize more materials about linear independence over semirings #20497
base: master
Are you sure you want to change the base?
Conversation
PR summary ebfaf15931
|
File | Base Count | Head Count | Change |
---|---|---|---|
Mathlib.RingTheory.AlgebraTower | 886 | 885 | -1 (-0.11%) |
Import changes for all files
Files | Import difference |
---|---|
4 filesMathlib.RingTheory.AlgebraTower Mathlib.LinearAlgebra.Matrix.ToLin Mathlib.Data.Complex.Module Mathlib.RingTheory.TensorProduct.Free |
-1 |
Declarations diff
+ Finsupp.linearCombination_one_tmul
+ linearCombination_smul
+ linearIndependent_one_tmul
You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>
The doc-module for script/declarations_diff.sh
contains some details about this script.
No changes to technical debt.
You can run this locally as
./scripts/technical-debt-metrics.sh pr_summary
- The
relative
value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolute
value is therelative
value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
This PR/issue depends on:
|
theorem LinearIndependent.of_isLocalizedModule {ι : Type*} {v : ι → M} | ||
(hv : LinearIndependent R v) : LinearIndependent Rₛ (f ∘ v) := by | ||
rw [linearIndependent_iff'] at hv ⊢ | ||
intro t g hg i hi | ||
choose! a g' hg' using IsLocalization.exist_integer_multiples S t g | ||
have h0 : f (∑ i ∈ t, g' i • v i) = 0 := by | ||
apply_fun ((a : R) • ·) at hg | ||
rw [smul_zero, Finset.smul_sum] at hg | ||
rw [map_sum, ← hg] | ||
refine Finset.sum_congr rfl fun i hi => ?_ | ||
rw [← smul_assoc, ← hg' i hi, map_smul, Function.comp_apply, algebraMap_smul] | ||
obtain ⟨s, hs⟩ := (IsLocalizedModule.eq_zero_iff S f).mp h0 | ||
simp_rw [Finset.smul_sum, Submonoid.smul_def, smul_smul] at hs | ||
specialize hv t _ hs i hi | ||
rw [← (IsLocalization.map_units Rₛ a).mul_right_eq_zero, ← Algebra.smul_def, ← hg' i hi] | ||
exact (IsLocalization.map_eq_zero_iff S _ _).2 ⟨s, hv⟩ | ||
|
||
variable [Module Rₛ M] [IsScalarTower R Rₛ M] | ||
|
||
theorem LinearIndependent.localization {ι : Type*} {b : ι → M} (hli : LinearIndependent R b) : | ||
rw [linearIndependent_iff'ₛ] at hv ⊢ | ||
intro t g₁ g₂ eq i hi | ||
choose! a fg hfg using IsLocalization.exist_integer_multiples S (t.disjSum t) (Sum.elim g₁ g₂) | ||
simp_rw [Sum.forall, Finset.inl_mem_disjSum, Sum.elim_inl, Finset.inr_mem_disjSum, Sum.elim_inr, | ||
Subtype.forall'] at hfg | ||
apply_fun ((a : R) • ·) at eq | ||
simp_rw [← t.sum_coe_sort, Finset.smul_sum, ← smul_assoc, ← hfg, | ||
algebraMap_smul, Function.comp_def, ← map_smul, ← map_sum, | ||
t.sum_coe_sort (f := fun x ↦ fg (Sum.inl x) • v x), | ||
t.sum_coe_sort (f := fun x ↦ fg (Sum.inr x) • v x)] at eq | ||
have ⟨s, eq⟩ := IsLocalizedModule.exists_of_eq (S := S) eq | ||
simp_rw [Finset.smul_sum, Submonoid.smul_def, smul_smul] at eq | ||
have := congr(algebraMap R Rₛ $(hv t _ _ eq i hi)) | ||
simpa only [map_mul, (IsLocalization.map_units Rₛ s).mul_right_inj, hfg.1 ⟨i, hi⟩, hfg.2 ⟨i, hi⟩, | ||
Algebra.smul_def, (IsLocalization.map_units Rₛ a).mul_right_inj] using this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This proof can be golfed using that localizations are flat, but that would mean hundreds more transitive imports ...
Also add
Finsupp.linearCombination_one_tmul
andlinearIndependent_one_tmul
that connects linear independence to flatness.