Skip to content

Commit 1fa9ebf

Browse files
committed
feat(Algebra/InfiniteSum): drop [T2Space _] assumption (#10060)
* Add `CanLift` instance for `Function.Embedding`. * Assume `Injective i` instead of an equivalent condition in `hasSum_iff_hasSum_of_ne_zero_bij`. * Add `tsum_eq_sum'`, a version of `tsum_eq_sum` that explicitly mentions `support f`. * Add `Function.Injective.tsum_eq`, use it to drop `[T2Space _]` assumption in - `Equiv.tsum_eq`; - `tsum_subtype_eq_of_support_subset`; - `tsum_subtype_support`; - `tsum_subtype`; - `tsum_univ`; - `tsum_image`; - `tsum_range`; - `tsum_setElem_eq_tsum_setElem_diff`; - `tsum_eq_tsum_diff_singleton`; - `tsum_eq_tsum_of_ne_zero_bij`; - `Equiv.tsum_eq_tsum_of_support`; - `tsum_extend_zero`; * Golf some proofs. * Drop `Equiv.Set.prod_singleton_left` and `Equiv.Set.prod_singleton_right` added in #10038. @MichaelStollBayreuth, if you need these `Equiv`s, then please - restore them in `Logic/Equiv/Set`, not in `Data/Set/Prod`; - call them `Equiv.Set.singletonProd` and `Equiv.Set.prodSingleton`, following the `lowerCamelCase` naming convention for `def`s; - reuse the existing `Equiv.Set.prod` and `Equiv.prodUnique`/`Equiv.uniqueProd` in the definitions.
1 parent 1da1e9e commit 1fa9ebf

File tree

3 files changed

+125
-155
lines changed

3 files changed

+125
-155
lines changed

Mathlib/Data/Set/Prod.lean

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1002,21 +1002,3 @@ theorem sumPiEquivProdPi_symm_preimage_univ_pi (π : ι ⊕ ι' → Type*) (t :
10021002
· rintro ⟨h₁, h₂⟩ (i|i) <;> simp <;> apply_assumption
10031003

10041004
end Equiv
1005-
1006-
namespace Equiv.Set
1007-
1008-
/-- The canonical equivalence between `{a} ×ˢ t` and `t`, considered as types. -/
1009-
def prod_singleton_left {α β : Type*} (a : α) (t : Set β) : ↑({a} ×ˢ t) ≃ ↑t where
1010-
toFun := fun x ↦ ⟨x.val.snd, (Set.mem_prod.mp x.prop).2
1011-
invFun := fun b ↦ ⟨(a, b.val), Set.mem_prod.mpr ⟨Set.mem_singleton a, Subtype.mem b⟩⟩
1012-
left_inv := by simp [Function.LeftInverse]
1013-
right_inv := by simp [Function.RightInverse, Function.LeftInverse]
1014-
1015-
/-- The canonical equivalence between `s ×ˢ {b}` and `s`, considered as types. -/
1016-
def prod_singleton_right {α β : Type*} (s : Set α) (b : β) : ↑(s ×ˢ {b}) ≃ ↑s where
1017-
toFun := fun x ↦ ⟨x.val.fst, (Set.mem_prod.mp x.prop).1
1018-
invFun := fun a ↦ ⟨(a.val, b), Set.mem_prod.mpr ⟨Subtype.mem a, Set.mem_singleton b⟩⟩
1019-
left_inv := by simp [Function.LeftInverse]
1020-
right_inv := by simp [Function.RightInverse, Function.LeftInverse]
1021-
1022-
end Equiv.Set

Mathlib/Logic/Embedding/Basic.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ theorem exists_surjective_iff :
4747
fun ⟨f, h⟩ ↦ ⟨⟨f⟩, ⟨⟨_, injective_surjInv h⟩⟩⟩, fun ⟨h, ⟨e⟩⟩ ↦ (nonempty_fun.mp h).elim
4848
(fun _ ↦ ⟨isEmptyElim, (isEmptyElim <| e ·)⟩) fun _ ↦ ⟨_, invFun_surjective e.inj'⟩⟩
4949

50+
instance : CanLift (α → β) (α ↪ β) (↑) Injective where
51+
prf _ h := ⟨⟨_, h⟩, rfl⟩
52+
5053
end Function
5154

5255
section Equiv

0 commit comments

Comments
 (0)