@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Aaron Anderson
5
5
-/
6
6
import order.well_founded_set
7
- import algebra.big_operators
7
+ import algebra.big_operators.finprod
8
8
import ring_theory.valuation.basic
9
9
import algebra.module.pi
10
10
import ring_theory.power_series.basic
@@ -743,8 +743,7 @@ variables (Γ) (R) [partial_order Γ] [add_comm_monoid R]
743
743
structure summable_family (α : Type *) :=
744
744
(to_fun : α → hahn_series Γ R)
745
745
(is_pwo_Union_support' : set.is_pwo (⋃ (a : α), (to_fun a).support))
746
- (co_support : Γ → finset α)
747
- (mem_co_support' : ∀ (a : α) (g : Γ), a ∈ co_support g ↔ (to_fun a).coeff g ≠ 0 )
746
+ (finite_co_support' : ∀ (g : Γ), ({a | (to_fun a).coeff g ≠ 0 }).finite)
748
747
749
748
end
750
749
@@ -759,19 +758,15 @@ instance : has_coe_to_fun (summable_family Γ R α) :=
759
758
lemma is_pwo_Union_support (s : summable_family Γ R α) : set.is_pwo (⋃ (a : α), (s a).support) :=
760
759
s.is_pwo_Union_support'
761
760
762
- @[simp]
763
- lemma mem_co_support {s : summable_family Γ R α} {a : α} {g : Γ} :
764
- a ∈ s.co_support g ↔ (s a).coeff g ≠ 0 := mem_co_support' _ _ _
761
+ lemma finite_co_support (s : summable_family Γ R α) (g : Γ) :
762
+ (function.support (λ a, (s a).coeff g)).finite :=
763
+ s.finite_co_support' g
765
764
766
765
lemma coe_injective : @function.injective (summable_family Γ R α) (α → hahn_series Γ R) coe_fn
767
- | ⟨f1, hU1, c1, hc1 ⟩ ⟨f2, hU2, c2, hc2 ⟩ h :=
766
+ | ⟨f1, hU1, hf1 ⟩ ⟨f2, hU2, hf2 ⟩ h :=
768
767
begin
769
768
change f1 = f2 at h,
770
769
subst h,
771
- simp only,
772
- refine ⟨rfl, _⟩,
773
- ext g a,
774
- rw [hc1, hc2]
775
770
end
776
771
777
772
@[ext]
@@ -784,18 +779,16 @@ instance : has_add (summable_family Γ R α) :=
784
779
rw ← set.Union_union_distrib,
785
780
exact set.Union_subset_Union (λ a, support_add_subset)
786
781
end ),
787
- co_support := λ g, ((x.co_support g) ∪ (y.co_support g)).filter
788
- (λ a, (x a).coeff g + (y a).coeff g ≠ 0 ),
789
- mem_co_support' := λ a g, begin
790
- simp only [mem_union, mem_filter, mem_co_support, and_iff_right_iff_imp,
791
- pi.add_apply, ne.def, add_coeff'],
792
- contrapose!,
793
- rintro ⟨hx, hy⟩,
794
- simp [hx, hy],
782
+ finite_co_support' := λ g, ((x.finite_co_support g).union (y.finite_co_support g)).subset begin
783
+ intros a ha,
784
+ change (x a).coeff g + (y a).coeff g ≠ 0 at ha,
785
+ rw [set.mem_union, function.mem_support, function.mem_support],
786
+ contrapose! ha,
787
+ rw [ha.1 , ha.2 , add_zero]
795
788
end }⟩
796
789
797
790
instance : has_zero (summable_family Γ R α) :=
798
- ⟨⟨0 , by simp, λ _, ∅, by simp⟩⟩
791
+ ⟨⟨0 , by simp, by simp⟩⟩
799
792
800
793
instance : inhabited (summable_family Γ R α) := ⟨0 ⟩
801
794
@@ -820,46 +813,34 @@ instance : add_comm_monoid (summable_family Γ R α) :=
820
813
/-- The infinite sum of a `summable_family` of Hahn series. -/
821
814
def hsum (s : summable_family Γ R α) :
822
815
hahn_series Γ R :=
823
- { coeff := λ g, ∑ i in s.co_support g , (s i).coeff g,
816
+ { coeff := λ g, ∑ᶠ i , (s i).coeff g,
824
817
is_pwo_support' := s.is_pwo_Union_support.mono (λ g, begin
825
818
contrapose,
826
819
rw [set.mem_Union, not_exists, function.mem_support, not_not],
827
820
simp_rw [mem_support, not_not],
828
- exact λ h, sum_eq_zero (λ a ha, h _),
821
+ intro h,
822
+ rw [finsum_congr h, finsum_zero],
829
823
end ) }
830
824
831
825
@[simp]
832
826
lemma hsum_coeff {s : summable_family Γ R α} {g : Γ} :
833
- s.hsum.coeff g = ∑ i in s.co_support g , (s i).coeff g := rfl
827
+ s.hsum.coeff g = ∑ᶠ i , (s i).coeff g := rfl
834
828
835
829
lemma support_hsum_subset {s : summable_family Γ R α} :
836
830
s.hsum.support ⊆ ⋃ (a : α), (s a).support :=
837
831
λ g hg, begin
838
- rw [mem_support, hsum_coeff] at hg,
832
+ rw [mem_support, hsum_coeff, finsum_eq_sum _ (s.finite_co_support _) ] at hg,
839
833
obtain ⟨a, h1, h2⟩ := exists_ne_zero_of_sum_ne_zero hg,
840
834
rw [set.mem_Union],
841
835
exact ⟨a, h2⟩,
842
836
end
843
837
844
- lemma co_support_add_subset {s t : summable_family Γ R α} {g : Γ} :
845
- (s + t).co_support g ⊆ s.co_support g ∪ t.co_support g :=
846
- λ a ha, begin
847
- rw mem_co_support at ha,
848
- rw [mem_union, mem_co_support, mem_co_support],
849
- contrapose! ha,
850
- obtain ⟨hs, ht⟩ := ha,
851
- simp [hs, ht],
852
- end
853
-
854
838
@[simp]
855
839
lemma hsum_add {s t : summable_family Γ R α} : (s + t).hsum = s.hsum + t.hsum :=
856
840
begin
857
841
ext g,
858
- simp only [add_apply, pi.add_apply, hsum_coeff, ne.def, add_coeff'],
859
- rw [sum_subset co_support_add_subset, finset.sum_add_distrib,
860
- ← sum_subset (subset_union_left _ _), ← sum_subset (subset_union_right _ _)];
861
- { intros x h1 h2,
862
- rwa [mem_co_support, not_not] at h2, }
842
+ simp only [hsum_coeff, add_coeff, add_apply],
843
+ exact finsum_add_distrib (s.finite_co_support _) (t.finite_co_support _)
863
844
end
864
845
865
846
end add_comm_monoid
@@ -870,8 +851,8 @@ variables [partial_order Γ] [add_comm_group R] {α : Type*} {s t : summable_fam
870
851
instance : add_comm_group (summable_family Γ R α) :=
871
852
{ neg := λ s, { to_fun := λ a, - s a,
872
853
is_pwo_Union_support' := by { simp_rw [support_neg], exact s.is_pwo_Union_support' },
873
- co_support := s.co_support ,
874
- mem_co_support' := by simp },
854
+ finite_co_support' := λ g, by { simp only [neg_coeff', pi.neg_apply, ne.def, neg_eq_zero] ,
855
+ exact s.finite_co_support g } },
875
856
add_left_neg := λ a, by { ext, apply add_left_neg },
876
857
.. summable_family.add_comm_monoid }
877
858
@@ -899,22 +880,15 @@ instance : has_scalar (hahn_series Γ R) (summable_family Γ R α) :=
899
880
simp only [set.mem_Union, exists_imp_distrib],
900
881
exact λ a ha, (set.add_subset_add (set.subset.refl _) (set.subset_Union _ a)) ha,
901
882
end ,
902
- co_support := λ g, ((add_antidiagonal x.is_pwo_support s.is_pwo_Union_support g).bUnion
903
- (λ ij, s.co_support ij.snd)).filter (λ a, (x * (s a)).coeff g ≠ 0 ),
904
- mem_co_support' := λ a g, begin
905
- rw [mem_filter],
906
- apply and_iff_right_of_imp,
907
- simp only [mem_bUnion, exists_prop, set.mem_Union, mem_add_antidiagonal, mem_co_support,
908
- mul_coeff, ne.def, mem_support, is_pwo_support, prod.exists],
909
- contrapose!,
910
- intro h,
911
- rw sum_eq_zero,
912
- rintros ⟨i, j⟩ hij,
913
- rw [mem_add_antidiagonal, mem_support] at hij,
914
- by_cases he : ∃ (b : α), (s b).coeff j ≠ 0 ,
915
- { rw [h i j ⟨hij.1 , hij.2 .1 , he⟩, mul_zero] },
916
- simp_rw [not_exists, ne.def, not_not] at he,
917
- rw [he a, mul_zero],
883
+ finite_co_support' := λ g, begin
884
+ refine ((add_antidiagonal x.is_pwo_support s.is_pwo_Union_support g).finite_to_set.bUnion
885
+ (λ ij hij, _)).subset (λ a ha, _),
886
+ { exact λ ij hij, function.support (λ a, (s a).coeff ij.2 ) },
887
+ { apply s.finite_co_support },
888
+ { obtain ⟨i, j, hi, hj, rfl⟩ := support_mul_subset_add_support ha,
889
+ simp only [exists_prop, set.mem_Union, mem_add_antidiagonal,
890
+ mul_coeff, ne.def, mem_support, is_pwo_support, prod.exists],
891
+ refine ⟨i, j, mem_coe.2 (mem_add_antidiagonal.2 ⟨rfl, hi, set.mem_Union.2 ⟨a, hj⟩⟩), hj⟩, }
918
892
end } }
919
893
920
894
@[simp]
@@ -935,47 +909,31 @@ lemma hsum_smul {x : hahn_series Γ R} {s : summable_family Γ R α} :
935
909
(x • s).hsum = x * s.hsum :=
936
910
begin
937
911
ext g,
938
- rw [mul_coeff, sum_subset (add_antidiagonal_mono_right support_hsum_subset)],
939
- { rw hsum_coeff,
940
- have h : (x • s).co_support g ⊆ (add_antidiagonal x.is_pwo_support s.is_pwo_Union_support
941
- g).bUnion (λ ij, s.co_support ij.snd),
942
- { intros a ha,
943
- rw [mem_co_support, smul_apply, mul_coeff] at ha,
944
- obtain ⟨ij, h1, h2⟩ := exists_ne_zero_of_sum_ne_zero ha,
945
- rw mem_bUnion,
946
- exact ⟨ij, add_antidiagonal_mono_right (set.subset_Union _ a) h1,
947
- mem_co_support.2 (right_ne_zero_of_mul h2)⟩ },
948
- refine eq.trans (sum_subset h _) _,
949
- { apply is_pwo_Union_support },
950
- { intros a h1 h2,
951
- contrapose! h2,
952
- rw [mem_co_support],
953
- exact h2 },
954
- have h' : ∀ a, ((x • s) a).coeff g =
955
- ∑ (ij : Γ × Γ) in add_antidiagonal x.is_pwo_support s.is_pwo_Union_support g,
956
- x.coeff ij.fst * (s a).coeff ij.snd,
957
- { intro a,
958
- rw [smul_apply, mul_coeff],
959
- apply sum_subset (add_antidiagonal_mono_right
960
- (set.subset_Union (support ∘ s) a)),
961
- intros ij h1 h2,
962
- rw [mem_add_antidiagonal] at *,
963
- have h : ¬ ij.snd ∈ (s a).support := λ c, h2 ⟨h1.1 , h1.2 .1 , c⟩,
964
- rw [mem_support, not_not] at h,
965
- rw [h, mul_zero] },
966
- rw [sum_congr rfl (λ a ha, h' a), sum_comm],
967
- refine sum_congr rfl (λ ij hij, _),
968
- rw [hsum_coeff, ← mul_sum],
969
- apply congr rfl (sum_subset (subset_bUnion_of_mem _ hij) _).symm,
970
- intros a h1 h2,
971
- contrapose! h2,
972
- rw [mem_co_support],
973
- exact h2 },
974
- { intros ij h1 h2,
912
+ simp only [mul_coeff, hsum_coeff, smul_apply],
913
+ have h : ∀ i, (s i).support ⊆ ⋃ j, (s j).support := set.subset_Union _,
914
+ refine (eq.trans (finsum_congr (λ a, _))
915
+ (finsum_sum_comm (add_antidiagonal x.is_pwo_support s.is_pwo_Union_support g)
916
+ (λ i ij, x.coeff (prod.fst ij) * (s i).coeff ij.snd) _)).trans _,
917
+ { refine sum_subset (add_antidiagonal_mono_right (set.subset_Union _ a)) _,
918
+ rintro ⟨i, j⟩ hU ha,
975
919
rw mem_add_antidiagonal at *,
976
- have h : ¬ ij.snd ∈ s.hsum.support := λ con, h2 ⟨h1.1 , h1.2 .1 , con⟩,
977
- rw [mem_support, not_not] at h,
978
- simp [h] },
920
+ rw [not_not.1 (λ con, ha ⟨hU.1 , hU.2 .1 , con⟩), mul_zero] },
921
+ { rintro ⟨i, j⟩ hij,
922
+ refine (s.finite_co_support j).subset _,
923
+ simp_rw [function.support_subset_iff', function.mem_support, not_not],
924
+ intros a ha,
925
+ rw [ha, mul_zero] },
926
+ { refine (sum_congr rfl _).trans (sum_subset (add_antidiagonal_mono_right _) _).symm,
927
+ { rintro ⟨i, j⟩ hij,
928
+ rw mul_finsum,
929
+ apply s.finite_co_support, },
930
+ { intros x hx,
931
+ simp only [set.mem_Union, ne.def, mem_support],
932
+ contrapose! hx,
933
+ simp [hx] },
934
+ { rintro ⟨i, j⟩ hU ha,
935
+ rw mem_add_antidiagonal at *,
936
+ rw [← hsum_coeff, not_not.1 (λ con, ha ⟨hU.1 , hU.2 .1 , con⟩), mul_zero] } }
979
937
end
980
938
981
939
/-- The summation of a `summable_family` as a `linear_map`. -/
@@ -1003,31 +961,29 @@ def of_finsupp (f : α →₀ (hahn_series Γ R)) :
1003
961
have h : (λ i, (f i).support) a ≤ _ := le_sup haf,
1004
962
exact h ha,
1005
963
end ,
1006
- co_support := λ g, f.support.filter (λ a, (f a).coeff g ≠ 0 ),
1007
- mem_co_support' := λ a g, begin
1008
- simp only [mem_filter, and_iff_right_iff_imp , finsupp.mem_support_iff, ne.def] ,
1009
- contrapose! ,
1010
- intro h ,
1011
- simp [h ]
964
+ finite_co_support' := λ g, begin
965
+ refine f.support.finite_to_set.subset ( λ a ha, _),
966
+ simp only [coeff.add_monoid_hom_apply, mem_coe , finsupp.mem_support_iff,
967
+ ne.def, function.mem_support] ,
968
+ contrapose! ha ,
969
+ simp [ha ]
1012
970
end }
1013
971
1014
972
@[simp]
1015
973
lemma coe_of_finsupp {f : α →₀ (hahn_series Γ R)} : ⇑(summable_family.of_finsupp f) = f := rfl
1016
974
1017
- @[simp]
1018
- lemma co_support_of_finsupp {f : α →₀ (hahn_series Γ R)} {g : Γ} :
1019
- (summable_family.of_finsupp f).co_support g = f.support.filter (λ a, (f a).coeff g ≠ 0 ) := rfl
1020
-
1021
975
@[simp]
1022
976
lemma hsum_of_finsupp {f : α →₀ (hahn_series Γ R)} :
1023
977
(of_finsupp f).hsum = f.sum (λ a, id) :=
1024
978
begin
1025
979
ext g,
1026
- simp only [filter_congr_decidable, hsum_coeff, coe_of_finsupp, ne.def, co_support_of_finsupp],
1027
- rw [sum_filter_ne_zero],
1028
- simp_rw [← coeff.add_monoid_hom_apply],
1029
- rw ← add_monoid_hom.map_sum,
1030
- refl
980
+ simp only [hsum_coeff, coe_of_finsupp, finsupp.sum, ne.def],
981
+ simp_rw [← coeff.add_monoid_hom_apply, id.def],
982
+ rw [add_monoid_hom.map_sum, finsum_eq_sum_of_support_subset],
983
+ intros x h,
984
+ simp only [coeff.add_monoid_hom_apply, mem_coe, finsupp.mem_support_iff, ne.def],
985
+ contrapose! h,
986
+ simp [h]
1031
987
end
1032
988
1033
989
end of_finsupp
0 commit comments