Commit 2023-02-01 05:31 f2c39613

View on Github →

feat: port Data.Finsupp.Basic (#1949) porting notes:

  1. simps was not working in various places due to the noncomputable, so I had to manually add some lemmas it would have generated. See here: https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/finding.20.60simps.60.20lemmas
  2. Lean 4 really had trouble inferring arguments to mapRange_comp for some reason as compared to Lean 3
  3. In several places I had to manually supply decidability instances (from Classical). This should probably be investigated.
  4. It looks like the Sigma.mk.inj auto-generated lemma was never created. Why?
  5. In one place, ext didn't fire the same way in Lean 3 versus Lean 4; I just copied the output of ext? from Lean 3, but we should understand what went wrong.

Estimated changes

added theorem Finsupp.coe_smul
added theorem Finsupp.coe_sumElim
added theorem Finsupp.comapSMul_def
added theorem Finsupp.curry_apply
added theorem Finsupp.domCongr_refl
added theorem Finsupp.domCongr_symm
added theorem Finsupp.domCongr_trans
added theorem Finsupp.erase_neg
added theorem Finsupp.erase_sub
added def Finsupp.filter
added theorem Finsupp.filter_add
added theorem Finsupp.filter_apply
added theorem Finsupp.filter_curry
added theorem Finsupp.filter_eq_sum
added theorem Finsupp.filter_neg
added theorem Finsupp.filter_smul
added theorem Finsupp.filter_sub
added theorem Finsupp.filter_sum
added theorem Finsupp.filter_zero
added def Finsupp.frange
added theorem Finsupp.frange_single
added def Finsupp.graph
added theorem Finsupp.graph_eq_empty
added theorem Finsupp.graph_inj
added theorem Finsupp.graph_zero
added theorem Finsupp.mapDomain_add
added theorem Finsupp.mapDomain_comp
added theorem Finsupp.mapDomain_id
added theorem Finsupp.mapDomain_smul
added theorem Finsupp.mapDomain_sum
added theorem Finsupp.mapDomain_zero
added theorem Finsupp.mapRange_smul
added theorem Finsupp.mem_frange
added theorem Finsupp.mem_graph_iff
added theorem Finsupp.mk_mem_graph
added theorem Finsupp.sigma_sum
added theorem Finsupp.sigma_support
added theorem Finsupp.single_neg
added theorem Finsupp.single_smul
added theorem Finsupp.single_sub
added theorem Finsupp.smul_apply
added theorem Finsupp.smul_single'
added theorem Finsupp.smul_single
added def Finsupp.some
added theorem Finsupp.some_add
added theorem Finsupp.some_apply
added theorem Finsupp.some_zero
added def Finsupp.split
added theorem Finsupp.split_apply
added def Finsupp.sumElim
added theorem Finsupp.sumElim_apply
added theorem Finsupp.sumElim_inl
added theorem Finsupp.sumElim_inr
added theorem Finsupp.sum_smul_index
added theorem Finsupp.sum_update_add
added theorem Finsupp.support_curry
added theorem Finsupp.support_filter
added theorem Finsupp.support_smul
added theorem Int.cast_finsupp_prod
added theorem Int.cast_finsupp_sum
added theorem IsSMulRegular.finsupp
added theorem Nat.cast_finsupp_prod
added theorem Nat.cast_finsupp_sum
added theorem Rat.cast_finsupp_prod
added theorem Rat.cast_finsupp_sum