data.finset.sigma
⟷
Mathlib.Data.Finset.Sigma
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, Yaël Dillies, Bhavik Mehta
-/
-import Mathbin.Data.Finset.Lattice
-import Mathbin.Data.Set.Sigma
+import Data.Finset.Lattice
+import Data.Set.Sigma
#align_import data.finset.sigma from "leanprover-community/mathlib"@"cc70d9141824ea8982d1562ce009952f2c3ece30"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, Yaël Dillies, Bhavik Mehta
-
-! This file was ported from Lean 3 source module data.finset.sigma
-! leanprover-community/mathlib commit cc70d9141824ea8982d1562ce009952f2c3ece30
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Finset.Lattice
import Mathbin.Data.Set.Sigma
+#align_import data.finset.sigma from "leanprover-community/mathlib"@"cc70d9141824ea8982d1562ce009952f2c3ece30"
+
/-!
# Finite sets in a sigma type
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -53,33 +53,44 @@ protected def sigma : Finset (Σ i, α i) :=
variable {s s₁ s₂ t t₁ t₂}
+#print Finset.mem_sigma /-
@[simp]
theorem mem_sigma {a : Σ i, α i} : a ∈ s.Sigma t ↔ a.1 ∈ s ∧ a.2 ∈ t a.1 :=
mem_sigma
#align finset.mem_sigma Finset.mem_sigma
+-/
+#print Finset.coe_sigma /-
@[simp, norm_cast]
theorem coe_sigma (s : Finset ι) (t : ∀ i, Finset (α i)) :
(s.Sigma t : Set (Σ i, α i)) = (s : Set ι).Sigma fun i => t i :=
Set.ext fun _ => mem_sigma
#align finset.coe_sigma Finset.coe_sigma
+-/
+#print Finset.sigma_nonempty /-
@[simp]
theorem sigma_nonempty : (s.Sigma t).Nonempty ↔ ∃ i ∈ s, (t i).Nonempty := by simp [Finset.Nonempty]
#align finset.sigma_nonempty Finset.sigma_nonempty
+-/
+#print Finset.sigma_eq_empty /-
@[simp]
theorem sigma_eq_empty : s.Sigma t = ∅ ↔ ∀ i ∈ s, t i = ∅ := by
simp only [← not_nonempty_iff_eq_empty, sigma_nonempty, not_exists]
#align finset.sigma_eq_empty Finset.sigma_eq_empty
+-/
+#print Finset.sigma_mono /-
@[mono]
theorem sigma_mono (hs : s₁ ⊆ s₂) (ht : ∀ i, t₁ i ⊆ t₂ i) : s₁.Sigma t₁ ⊆ s₂.Sigma t₂ :=
fun ⟨i, a⟩ h =>
let ⟨hi, ha⟩ := mem_sigma.1 h
mem_sigma.2 ⟨hs hi, ht i ha⟩
#align finset.sigma_mono Finset.sigma_mono
+-/
+#print Finset.pairwiseDisjoint_map_sigmaMk /-
theorem pairwiseDisjoint_map_sigmaMk :
(s : Set ι).PairwiseDisjoint fun i => (t i).map (Embedding.sigmaMk i) :=
by
@@ -89,13 +100,16 @@ theorem pairwiseDisjoint_map_sigmaMk :
rintro _ ⟨y, hy, rfl⟩ ⟨z, hz, hz'⟩
exact hij (congr_arg Sigma.fst hz'.symm)
#align finset.pairwise_disjoint_map_sigma_mk Finset.pairwiseDisjoint_map_sigmaMk
+-/
+#print Finset.disjiUnion_map_sigma_mk /-
@[simp]
theorem disjiUnion_map_sigma_mk :
s.disjUnionₓ (fun i => (t i).map (Embedding.sigmaMk i)) pairwiseDisjoint_map_sigmaMk =
s.Sigma t :=
rfl
#align finset.disj_Union_map_sigma_mk Finset.disjiUnion_map_sigma_mk
+-/
#print Finset.sigma_eq_biUnion /-
theorem sigma_eq_biUnion [DecidableEq (Σ i, α i)] (s : Finset ι) (t : ∀ i, Finset (α i)) :
@@ -106,6 +120,7 @@ theorem sigma_eq_biUnion [DecidableEq (Σ i, α i)] (s : Finset ι) (t : ∀ i,
variable (s t) (f : (Σ i, α i) → β)
+#print Finset.sup_sigma /-
theorem sup_sigma [SemilatticeSup β] [OrderBot β] :
(s.Sigma t).sup f = s.sup fun i => (t i).sup fun b => f ⟨i, b⟩ :=
by
@@ -114,11 +129,14 @@ theorem sup_sigma [SemilatticeSup β] [OrderBot β] :
⟨fun i a hi ha => (le_sup hi).trans' <| le_sup ha, fun i hi a ha =>
le_sup <| mem_sigma.2 ⟨hi, ha⟩⟩
#align finset.sup_sigma Finset.sup_sigma
+-/
+#print Finset.inf_sigma /-
theorem inf_sigma [SemilatticeInf β] [OrderTop β] :
(s.Sigma t).inf f = s.inf fun i => (t i).inf fun b => f ⟨i, b⟩ :=
@sup_sigma _ _ βᵒᵈ _ _ _ _ _
#align finset.inf_sigma Finset.inf_sigma
+-/
end Sigma
@@ -134,6 +152,7 @@ def sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α)
#align finset.sigma_lift Finset.sigmaLift
-/
+#print Finset.mem_sigmaLift /-
theorem mem_sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α) (b : Sigma β)
(x : Sigma γ) :
x ∈ sigmaLift f a b ↔ ∃ (ha : a.1 = x.1) (hb : b.1 = x.1), x.2 ∈ f (ha.rec a.2) (hb.rec b.2) :=
@@ -152,7 +171,9 @@ theorem mem_sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Si
rintro ⟨⟨⟩, ⟨⟩, _⟩
exact h rfl
#align finset.mem_sigma_lift Finset.mem_sigmaLift
+-/
+#print Finset.mk_mem_sigmaLift /-
theorem mk_mem_sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (i : ι) (a : α i) (b : β i)
(x : γ i) : (⟨i, x⟩ : Sigma γ) ∈ sigmaLift f ⟨i, a⟩ ⟨i, b⟩ ↔ x ∈ f a b :=
by
@@ -161,19 +182,25 @@ theorem mk_mem_sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (i :
rintro ⟨x, hx, _, rfl⟩
exact hx
#align finset.mk_mem_sigma_lift Finset.mk_mem_sigmaLift
+-/
+#print Finset.not_mem_sigmaLift_of_ne_left /-
theorem not_mem_sigmaLift_of_ne_left (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α)
(b : Sigma β) (x : Sigma γ) (h : a.1 ≠ x.1) : x ∉ sigmaLift f a b := by rw [mem_sigma_lift];
exact fun H => h H.fst
#align finset.not_mem_sigma_lift_of_ne_left Finset.not_mem_sigmaLift_of_ne_left
+-/
+#print Finset.not_mem_sigmaLift_of_ne_right /-
theorem not_mem_sigmaLift_of_ne_right (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) {a : Sigma α}
(b : Sigma β) {x : Sigma γ} (h : b.1 ≠ x.1) : x ∉ sigmaLift f a b := by rw [mem_sigma_lift];
exact fun H => h H.snd.fst
#align finset.not_mem_sigma_lift_of_ne_right Finset.not_mem_sigmaLift_of_ne_right
+-/
variable {f g : ∀ ⦃i⦄, α i → β i → Finset (γ i)} {a : Σ i, α i} {b : Σ i, β i}
+#print Finset.sigmaLift_nonempty /-
theorem sigmaLift_nonempty :
(sigmaLift f a b).Nonempty ↔ ∃ h : a.1 = b.1, (f (h.rec a.2) b.2).Nonempty :=
by
@@ -183,13 +210,17 @@ theorem sigmaLift_nonempty :
simp_rw [← nonempty_iff_ne_empty]
exact map_nonempty.symm
#align finset.sigma_lift_nonempty Finset.sigmaLift_nonempty
+-/
+#print Finset.sigmaLift_eq_empty /-
theorem sigmaLift_eq_empty : sigmaLift f a b = ∅ ↔ ∀ h : a.1 = b.1, f (h.rec a.2) b.2 = ∅ :=
by
convert dite_eq_right_iff
exact forall_congr fun h => propext map_eq_empty.symm
#align finset.sigma_lift_eq_empty Finset.sigmaLift_eq_empty
+-/
+#print Finset.sigmaLift_mono /-
theorem sigmaLift_mono (h : ∀ ⦃i⦄ ⦃a : α i⦄ ⦃b : β i⦄, f a b ⊆ g a b) (a : Σ i, α i)
(b : Σ i, β i) : sigmaLift f a b ⊆ sigmaLift g a b :=
by
@@ -198,13 +229,16 @@ theorem sigmaLift_mono (h : ∀ ⦃i⦄ ⦃a : α i⦄ ⦃b : β i⦄, f a b ⊆
obtain ⟨ha, hb, hx⟩ := hx
exact ⟨ha, hb, h hx⟩
#align finset.sigma_lift_mono Finset.sigmaLift_mono
+-/
variable (f a b)
+#print Finset.card_sigmaLift /-
theorem card_sigmaLift :
(sigmaLift f a b).card = dite (a.1 = b.1) (fun h => (f (h.rec a.2) b.2).card) fun _ => 0 := by
convert apply_dite _ _ _ _; ext h; exact (card_map _).symm
#align finset.card_sigma_lift Finset.card_sigmaLift
+-/
end SigmaLift
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -46,7 +46,7 @@ variable {α : ι → Type _} {β : Type _} (s s₁ s₂ : Finset ι) (t t₁ t
#print Finset.sigma /-
/-- `s.sigma t` is the finset of dependent pairs `⟨i, a⟩` such that `i ∈ s` and `a ∈ t i`. -/
-protected def sigma : Finset (Σi, α i) :=
+protected def sigma : Finset (Σ i, α i) :=
⟨_, s.Nodup.Sigma fun i => (t i).Nodup⟩
#align finset.sigma Finset.sigma
-/
@@ -54,13 +54,13 @@ protected def sigma : Finset (Σi, α i) :=
variable {s s₁ s₂ t t₁ t₂}
@[simp]
-theorem mem_sigma {a : Σi, α i} : a ∈ s.Sigma t ↔ a.1 ∈ s ∧ a.2 ∈ t a.1 :=
+theorem mem_sigma {a : Σ i, α i} : a ∈ s.Sigma t ↔ a.1 ∈ s ∧ a.2 ∈ t a.1 :=
mem_sigma
#align finset.mem_sigma Finset.mem_sigma
@[simp, norm_cast]
theorem coe_sigma (s : Finset ι) (t : ∀ i, Finset (α i)) :
- (s.Sigma t : Set (Σi, α i)) = (s : Set ι).Sigma fun i => t i :=
+ (s.Sigma t : Set (Σ i, α i)) = (s : Set ι).Sigma fun i => t i :=
Set.ext fun _ => mem_sigma
#align finset.coe_sigma Finset.coe_sigma
@@ -98,13 +98,13 @@ theorem disjiUnion_map_sigma_mk :
#align finset.disj_Union_map_sigma_mk Finset.disjiUnion_map_sigma_mk
#print Finset.sigma_eq_biUnion /-
-theorem sigma_eq_biUnion [DecidableEq (Σi, α i)] (s : Finset ι) (t : ∀ i, Finset (α i)) :
+theorem sigma_eq_biUnion [DecidableEq (Σ i, α i)] (s : Finset ι) (t : ∀ i, Finset (α i)) :
s.Sigma t = s.biUnion fun i => (t i).map <| Embedding.sigmaMk i := by ext ⟨x, y⟩;
simp [and_left_comm]
#align finset.sigma_eq_bUnion Finset.sigma_eq_biUnion
-/
-variable (s t) (f : (Σi, α i) → β)
+variable (s t) (f : (Σ i, α i) → β)
theorem sup_sigma [SemilatticeSup β] [OrderBot β] :
(s.Sigma t).sup f = s.sup fun i => (t i).sup fun b => f ⟨i, b⟩ :=
@@ -136,7 +136,7 @@ def sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α)
theorem mem_sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α) (b : Sigma β)
(x : Sigma γ) :
- x ∈ sigmaLift f a b ↔ ∃ (ha : a.1 = x.1)(hb : b.1 = x.1), x.2 ∈ f (ha.rec a.2) (hb.rec b.2) :=
+ x ∈ sigmaLift f a b ↔ ∃ (ha : a.1 = x.1) (hb : b.1 = x.1), x.2 ∈ f (ha.rec a.2) (hb.rec b.2) :=
by
obtain ⟨⟨i, a⟩, j, b⟩ := a, b
obtain rfl | h := Decidable.eq_or_ne i j
@@ -172,7 +172,7 @@ theorem not_mem_sigmaLift_of_ne_right (f : ∀ ⦃i⦄, α i → β i → Finset
exact fun H => h H.snd.fst
#align finset.not_mem_sigma_lift_of_ne_right Finset.not_mem_sigmaLift_of_ne_right
-variable {f g : ∀ ⦃i⦄, α i → β i → Finset (γ i)} {a : Σi, α i} {b : Σi, β i}
+variable {f g : ∀ ⦃i⦄, α i → β i → Finset (γ i)} {a : Σ i, α i} {b : Σ i, β i}
theorem sigmaLift_nonempty :
(sigmaLift f a b).Nonempty ↔ ∃ h : a.1 = b.1, (f (h.rec a.2) b.2).Nonempty :=
@@ -190,10 +190,11 @@ theorem sigmaLift_eq_empty : sigmaLift f a b = ∅ ↔ ∀ h : a.1 = b.1, f (h.r
exact forall_congr fun h => propext map_eq_empty.symm
#align finset.sigma_lift_eq_empty Finset.sigmaLift_eq_empty
-theorem sigmaLift_mono (h : ∀ ⦃i⦄ ⦃a : α i⦄ ⦃b : β i⦄, f a b ⊆ g a b) (a : Σi, α i) (b : Σi, β i) :
- sigmaLift f a b ⊆ sigmaLift g a b := by
+theorem sigmaLift_mono (h : ∀ ⦃i⦄ ⦃a : α i⦄ ⦃b : β i⦄, f a b ⊆ g a b) (a : Σ i, α i)
+ (b : Σ i, β i) : sigmaLift f a b ⊆ sigmaLift g a b :=
+ by
rintro x hx
- rw [mem_sigma_lift] at hx⊢
+ rw [mem_sigma_lift] at hx ⊢
obtain ⟨ha, hb, hx⟩ := hx
exact ⟨ha, hb, h hx⟩
#align finset.sigma_lift_mono Finset.sigmaLift_mono
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -53,56 +53,26 @@ protected def sigma : Finset (Σi, α i) :=
variable {s s₁ s₂ t t₁ t₂}
-/- warning: finset.mem_sigma -> Finset.mem_sigma is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {s : Finset.{u1} ι} {t : forall (i : ι), Finset.{u2} (α i)} {a : Sigma.{u1, u2} ι (fun (i : ι) => α i)}, Iff (Membership.Mem.{max u1 u2, max u1 u2} (Sigma.{u1, u2} ι (fun (i : ι) => α i)) (Finset.{max u1 u2} (Sigma.{u1, u2} ι (fun (i : ι) => α i))) (Finset.hasMem.{max u1 u2} (Sigma.{u1, u2} ι (fun (i : ι) => α i))) a (Finset.sigma.{u1, u2} ι (fun (i : ι) => α i) s t)) (And (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) s) (Membership.Mem.{u2, u2} (α (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a)) (Finset.{u2} (α (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a))) (Finset.hasMem.{u2} (α (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a))) (Sigma.snd.{u1, u2} ι (fun (i : ι) => α i) a) (t (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a))))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} {s : Finset.{u2} ι} {t : forall (i : ι), Finset.{u1} (α i)} {a : Sigma.{u2, u1} ι (fun (i : ι) => α i)}, Iff (Membership.mem.{max u2 u1, max u2 u1} (Sigma.{u2, u1} ι (fun (i : ι) => α i)) (Finset.{max u1 u2} (Sigma.{u2, u1} ι (fun (i : ι) => α i))) (Finset.instMembershipFinset.{max u2 u1} (Sigma.{u2, u1} ι (fun (i : ι) => α i))) a (Finset.sigma.{u2, u1} ι (fun (i : ι) => α i) s t)) (And (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) (Sigma.fst.{u2, u1} ι (fun (i : ι) => α i) a) s) (Membership.mem.{u1, u1} (α (Sigma.fst.{u2, u1} ι (fun (i : ι) => α i) a)) (Finset.{u1} (α (Sigma.fst.{u2, u1} ι (fun (i : ι) => α i) a))) (Finset.instMembershipFinset.{u1} (α (Sigma.fst.{u2, u1} ι (fun (i : ι) => α i) a))) (Sigma.snd.{u2, u1} ι (fun (i : ι) => α i) a) (t (Sigma.fst.{u2, u1} ι (fun (i : ι) => α i) a))))
-Case conversion may be inaccurate. Consider using '#align finset.mem_sigma Finset.mem_sigmaₓ'. -/
@[simp]
theorem mem_sigma {a : Σi, α i} : a ∈ s.Sigma t ↔ a.1 ∈ s ∧ a.2 ∈ t a.1 :=
mem_sigma
#align finset.mem_sigma Finset.mem_sigma
-/- warning: finset.coe_sigma -> Finset.coe_sigma is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} (s : Finset.{u1} ι) (t : forall (i : ι), Finset.{u2} (α i)), Eq.{succ (max u1 u2)} (Set.{max u1 u2} (Sigma.{u1, u2} ι (fun (i : ι) => α i))) ((fun (a : Type.{max u1 u2}) (b : Type.{max u1 u2}) [self : HasLiftT.{succ (max u1 u2), succ (max u1 u2)} a b] => self.0) (Finset.{max u1 u2} (Sigma.{u1, u2} ι (fun (i : ι) => α i))) (Set.{max u1 u2} (Sigma.{u1, u2} ι (fun (i : ι) => α i))) (HasLiftT.mk.{succ (max u1 u2), succ (max u1 u2)} (Finset.{max u1 u2} (Sigma.{u1, u2} ι (fun (i : ι) => α i))) (Set.{max u1 u2} (Sigma.{u1, u2} ι (fun (i : ι) => α i))) (CoeTCₓ.coe.{succ (max u1 u2), succ (max u1 u2)} (Finset.{max u1 u2} (Sigma.{u1, u2} ι (fun (i : ι) => α i))) (Set.{max u1 u2} (Sigma.{u1, u2} ι (fun (i : ι) => α i))) (Finset.Set.hasCoeT.{max u1 u2} (Sigma.{u1, u2} ι (fun (i : ι) => α i))))) (Finset.sigma.{u1, u2} ι (fun (i : ι) => α i) s t)) (Set.Sigma.{u1, u2} ι (fun (i : ι) => α i) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s) (fun (i : ι) => (fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) (Finset.{u2} (α i)) (Set.{u2} (α i)) (HasLiftT.mk.{succ u2, succ u2} (Finset.{u2} (α i)) (Set.{u2} (α i)) (CoeTCₓ.coe.{succ u2, succ u2} (Finset.{u2} (α i)) (Set.{u2} (α i)) (Finset.Set.hasCoeT.{u2} (α i)))) (t i)))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} (s : Finset.{u2} ι) (t : forall (i : ι), Finset.{u1} (α i)), Eq.{max (succ u2) (succ u1)} (Set.{max u2 u1} (Sigma.{u2, u1} ι (fun (i : ι) => α i))) (Finset.toSet.{max u2 u1} (Sigma.{u2, u1} ι (fun (i : ι) => α i)) (Finset.sigma.{u2, u1} ι (fun (i : ι) => α i) s t)) (Set.Sigma.{u2, u1} ι (fun (i : ι) => α i) (Finset.toSet.{u2} ι s) (fun (i : ι) => Finset.toSet.{u1} (α i) (t i)))
-Case conversion may be inaccurate. Consider using '#align finset.coe_sigma Finset.coe_sigmaₓ'. -/
@[simp, norm_cast]
theorem coe_sigma (s : Finset ι) (t : ∀ i, Finset (α i)) :
(s.Sigma t : Set (Σi, α i)) = (s : Set ι).Sigma fun i => t i :=
Set.ext fun _ => mem_sigma
#align finset.coe_sigma Finset.coe_sigma
-/- warning: finset.sigma_nonempty -> Finset.sigma_nonempty is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {s : Finset.{u1} ι} {t : forall (i : ι), Finset.{u2} (α i)}, Iff (Finset.Nonempty.{max u1 u2} (Sigma.{u1, u2} ι (fun (i : ι) => α i)) (Finset.sigma.{u1, u2} ι (fun (i : ι) => α i) s t)) (Exists.{succ u1} ι (fun (i : ι) => Exists.{0} (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) (fun (H : Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) => Finset.Nonempty.{u2} (α i) (t i))))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} {s : Finset.{u2} ι} {t : forall (i : ι), Finset.{u1} (α i)}, Iff (Finset.Nonempty.{max u2 u1} (Sigma.{u2, u1} ι (fun (i : ι) => α i)) (Finset.sigma.{u2, u1} ι (fun (i : ι) => α i) s t)) (Exists.{succ u2} ι (fun (i : ι) => And (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) i s) (Finset.Nonempty.{u1} (α i) (t i))))
-Case conversion may be inaccurate. Consider using '#align finset.sigma_nonempty Finset.sigma_nonemptyₓ'. -/
@[simp]
theorem sigma_nonempty : (s.Sigma t).Nonempty ↔ ∃ i ∈ s, (t i).Nonempty := by simp [Finset.Nonempty]
#align finset.sigma_nonempty Finset.sigma_nonempty
-/- warning: finset.sigma_eq_empty -> Finset.sigma_eq_empty is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {s : Finset.{u1} ι} {t : forall (i : ι), Finset.{u2} (α i)}, Iff (Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (Sigma.{u1, u2} ι (fun (i : ι) => α i))) (Finset.sigma.{u1, u2} ι (fun (i : ι) => α i) s t) (EmptyCollection.emptyCollection.{max u1 u2} (Finset.{max u1 u2} (Sigma.{u1, u2} ι (fun (i : ι) => α i))) (Finset.hasEmptyc.{max u1 u2} (Sigma.{u1, u2} ι (fun (i : ι) => α i))))) (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) -> (Eq.{succ u2} (Finset.{u2} (α i)) (t i) (EmptyCollection.emptyCollection.{u2} (Finset.{u2} (α i)) (Finset.hasEmptyc.{u2} (α i)))))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} {s : Finset.{u2} ι} {t : forall (i : ι), Finset.{u1} (α i)}, Iff (Eq.{max (succ u2) (succ u1)} (Finset.{max u1 u2} (Sigma.{u2, u1} ι (fun (i : ι) => α i))) (Finset.sigma.{u2, u1} ι (fun (i : ι) => α i) s t) (EmptyCollection.emptyCollection.{max u2 u1} (Finset.{max u1 u2} (Sigma.{u2, u1} ι (fun (i : ι) => α i))) (Finset.instEmptyCollectionFinset.{max u2 u1} (Sigma.{u2, u1} ι (fun (i : ι) => α i))))) (forall (i : ι), (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) i s) -> (Eq.{succ u1} (Finset.{u1} (α i)) (t i) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} (α i)) (Finset.instEmptyCollectionFinset.{u1} (α i)))))
-Case conversion may be inaccurate. Consider using '#align finset.sigma_eq_empty Finset.sigma_eq_emptyₓ'. -/
@[simp]
theorem sigma_eq_empty : s.Sigma t = ∅ ↔ ∀ i ∈ s, t i = ∅ := by
simp only [← not_nonempty_iff_eq_empty, sigma_nonempty, not_exists]
#align finset.sigma_eq_empty Finset.sigma_eq_empty
-/- warning: finset.sigma_mono -> Finset.sigma_mono is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {s₁ : Finset.{u1} ι} {s₂ : Finset.{u1} ι} {t₁ : forall (i : ι), Finset.{u2} (α i)} {t₂ : forall (i : ι), Finset.{u2} (α i)}, (HasSubset.Subset.{u1} (Finset.{u1} ι) (Finset.hasSubset.{u1} ι) s₁ s₂) -> (forall (i : ι), HasSubset.Subset.{u2} (Finset.{u2} (α i)) (Finset.hasSubset.{u2} (α i)) (t₁ i) (t₂ i)) -> (HasSubset.Subset.{max u1 u2} (Finset.{max u1 u2} (Sigma.{u1, u2} ι (fun (i : ι) => α i))) (Finset.hasSubset.{max u1 u2} (Sigma.{u1, u2} ι (fun (i : ι) => α i))) (Finset.sigma.{u1, u2} ι (fun (i : ι) => α i) s₁ t₁) (Finset.sigma.{u1, u2} ι (fun (i : ι) => α i) s₂ t₂))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} {s₁ : Finset.{u2} ι} {s₂ : Finset.{u2} ι} {t₁ : forall (i : ι), Finset.{u1} (α i)} {t₂ : forall (i : ι), Finset.{u1} (α i)}, (HasSubset.Subset.{u2} (Finset.{u2} ι) (Finset.instHasSubsetFinset.{u2} ι) s₁ s₂) -> (forall (i : ι), HasSubset.Subset.{u1} (Finset.{u1} (α i)) (Finset.instHasSubsetFinset.{u1} (α i)) (t₁ i) (t₂ i)) -> (HasSubset.Subset.{max u2 u1} (Finset.{max u1 u2} (Sigma.{u2, u1} ι (fun (i : ι) => α i))) (Finset.instHasSubsetFinset.{max u2 u1} (Sigma.{u2, u1} ι (fun (i : ι) => α i))) (Finset.sigma.{u2, u1} ι (fun (i : ι) => α i) s₁ t₁) (Finset.sigma.{u2, u1} ι (fun (i : ι) => α i) s₂ t₂))
-Case conversion may be inaccurate. Consider using '#align finset.sigma_mono Finset.sigma_monoₓ'. -/
@[mono]
theorem sigma_mono (hs : s₁ ⊆ s₂) (ht : ∀ i, t₁ i ⊆ t₂ i) : s₁.Sigma t₁ ⊆ s₂.Sigma t₂ :=
fun ⟨i, a⟩ h =>
@@ -110,12 +80,6 @@ theorem sigma_mono (hs : s₁ ⊆ s₂) (ht : ∀ i, t₁ i ⊆ t₂ i) : s₁.S
mem_sigma.2 ⟨hs hi, ht i ha⟩
#align finset.sigma_mono Finset.sigma_mono
-/- warning: finset.pairwise_disjoint_map_sigma_mk -> Finset.pairwiseDisjoint_map_sigmaMk is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {s : Finset.{u1} ι} {t : forall (i : ι), Finset.{u2} (α i)}, Set.PairwiseDisjoint.{max u1 u2, u1} (Finset.{max u1 u2} (Sigma.{u1, u2} ι (fun (x : ι) => α x))) ι (Finset.partialOrder.{max u1 u2} (Sigma.{u1, u2} ι (fun (x : ι) => α x))) (Finset.orderBot.{max u1 u2} (Sigma.{u1, u2} ι (fun (x : ι) => α x))) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) (Finset.{u1} ι) (Set.{u1} ι) (HasLiftT.mk.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (CoeTCₓ.coe.{succ u1, succ u1} (Finset.{u1} ι) (Set.{u1} ι) (Finset.Set.hasCoeT.{u1} ι))) s) (fun (i : ι) => Finset.map.{u2, max u1 u2} (α i) (Sigma.{u1, u2} ι (fun (x : ι) => α x)) (Function.Embedding.sigmaMk.{u1, u2} ι α i) (t i))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} {s : Finset.{u2} ι} {t : forall (i : ι), Finset.{u1} (α i)}, Set.PairwiseDisjoint.{max u2 u1, u2} (Finset.{max u2 u1} (Sigma.{u2, u1} ι (fun (x : ι) => α x))) ι (Finset.partialOrder.{max u2 u1} (Sigma.{u2, u1} ι (fun (x : ι) => α x))) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{max u2 u1} (Sigma.{u2, u1} ι (fun (x : ι) => α x))) (Finset.toSet.{u2} ι s) (fun (i : ι) => Finset.map.{u1, max u2 u1} (α i) (Sigma.{u2, u1} ι (fun (x : ι) => α x)) (Function.Embedding.sigmaMk.{u2, u1} ι (fun (i : ι) => α i) i) (t i))
-Case conversion may be inaccurate. Consider using '#align finset.pairwise_disjoint_map_sigma_mk Finset.pairwiseDisjoint_map_sigmaMkₓ'. -/
theorem pairwiseDisjoint_map_sigmaMk :
(s : Set ι).PairwiseDisjoint fun i => (t i).map (Embedding.sigmaMk i) :=
by
@@ -126,12 +90,6 @@ theorem pairwiseDisjoint_map_sigmaMk :
exact hij (congr_arg Sigma.fst hz'.symm)
#align finset.pairwise_disjoint_map_sigma_mk Finset.pairwiseDisjoint_map_sigmaMk
-/- warning: finset.disj_Union_map_sigma_mk -> Finset.disjiUnion_map_sigma_mk is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {s : Finset.{u1} ι} {t : forall (i : ι), Finset.{u2} (α i)}, Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (Sigma.{u1, u2} ι (fun (x : ι) => α x))) (Finset.disjUnionₓ.{u1, max u1 u2} ι (Sigma.{u1, u2} ι (fun (x : ι) => α x)) s (fun (i : ι) => Finset.map.{u2, max u1 u2} (α i) (Sigma.{u1, u2} ι (fun (x : ι) => α x)) (Function.Embedding.sigmaMk.{u1, u2} ι α i) (t i)) (Finset.pairwiseDisjoint_map_sigmaMk.{u1, u2} ι α s (fun (i : ι) => t i))) (Finset.sigma.{u1, u2} ι (fun (x : ι) => α x) s t)
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} {s : Finset.{u2} ι} {t : forall (i : ι), Finset.{u1} (α i)}, Eq.{max (succ u2) (succ u1)} (Finset.{max u2 u1} (Sigma.{u2, u1} ι (fun (x : ι) => α x))) (Finset.disjiUnion.{u2, max u2 u1} ι (Sigma.{u2, u1} ι (fun (x : ι) => α x)) s (fun (i : ι) => Finset.map.{u1, max u2 u1} (α i) (Sigma.{u2, u1} ι (fun (x : ι) => α x)) (Function.Embedding.sigmaMk.{u2, u1} ι (fun (i : ι) => α i) i) (t i)) (Finset.pairwiseDisjoint_map_sigmaMk.{u1, u2} ι (fun (i : ι) => α i) s (fun (i : ι) => t i))) (Finset.sigma.{u2, u1} ι (fun (x : ι) => α x) s t)
-Case conversion may be inaccurate. Consider using '#align finset.disj_Union_map_sigma_mk Finset.disjiUnion_map_sigma_mkₓ'. -/
@[simp]
theorem disjiUnion_map_sigma_mk :
s.disjUnionₓ (fun i => (t i).map (Embedding.sigmaMk i)) pairwiseDisjoint_map_sigmaMk =
@@ -148,12 +106,6 @@ theorem sigma_eq_biUnion [DecidableEq (Σi, α i)] (s : Finset ι) (t : ∀ i, F
variable (s t) (f : (Σi, α i) → β)
-/- warning: finset.sup_sigma -> Finset.sup_sigma is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : Type.{u3}} (s : Finset.{u1} ι) (t : forall (i : ι), Finset.{u2} (α i)) (f : (Sigma.{u1, u2} ι (fun (i : ι) => α i)) -> β) [_inst_1 : SemilatticeSup.{u3} β] [_inst_2 : OrderBot.{u3} β (Preorder.toHasLe.{u3} β (PartialOrder.toPreorder.{u3} β (SemilatticeSup.toPartialOrder.{u3} β _inst_1)))], Eq.{succ u3} β (Finset.sup.{u3, max u1 u2} β (Sigma.{u1, u2} ι (fun (i : ι) => α i)) _inst_1 _inst_2 (Finset.sigma.{u1, u2} ι (fun (i : ι) => α i) s t) f) (Finset.sup.{u3, u1} β ι _inst_1 _inst_2 s (fun (i : ι) => Finset.sup.{u3, u2} β (α i) _inst_1 _inst_2 (t i) (fun (b : α i) => f (Sigma.mk.{u1, u2} ι (fun (i : ι) => α i) i b))))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} {β : Type.{u3}} (s : Finset.{u2} ι) (t : forall (i : ι), Finset.{u1} (α i)) (f : (Sigma.{u2, u1} ι (fun (i : ι) => α i)) -> β) [_inst_1 : SemilatticeSup.{u3} β] [_inst_2 : OrderBot.{u3} β (Preorder.toLE.{u3} β (PartialOrder.toPreorder.{u3} β (SemilatticeSup.toPartialOrder.{u3} β _inst_1)))], Eq.{succ u3} β (Finset.sup.{u3, max u2 u1} β (Sigma.{u2, u1} ι (fun (i : ι) => α i)) _inst_1 _inst_2 (Finset.sigma.{u2, u1} ι (fun (i : ι) => α i) s t) f) (Finset.sup.{u3, u2} β ι _inst_1 _inst_2 s (fun (i : ι) => Finset.sup.{u3, u1} β (α i) _inst_1 _inst_2 (t i) (fun (b : α i) => f (Sigma.mk.{u2, u1} ι (fun (i : ι) => α i) i b))))
-Case conversion may be inaccurate. Consider using '#align finset.sup_sigma Finset.sup_sigmaₓ'. -/
theorem sup_sigma [SemilatticeSup β] [OrderBot β] :
(s.Sigma t).sup f = s.sup fun i => (t i).sup fun b => f ⟨i, b⟩ :=
by
@@ -163,12 +115,6 @@ theorem sup_sigma [SemilatticeSup β] [OrderBot β] :
le_sup <| mem_sigma.2 ⟨hi, ha⟩⟩
#align finset.sup_sigma Finset.sup_sigma
-/- warning: finset.inf_sigma -> Finset.inf_sigma is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : Type.{u3}} (s : Finset.{u1} ι) (t : forall (i : ι), Finset.{u2} (α i)) (f : (Sigma.{u1, u2} ι (fun (i : ι) => α i)) -> β) [_inst_1 : SemilatticeInf.{u3} β] [_inst_2 : OrderTop.{u3} β (Preorder.toHasLe.{u3} β (PartialOrder.toPreorder.{u3} β (SemilatticeInf.toPartialOrder.{u3} β _inst_1)))], Eq.{succ u3} β (Finset.inf.{u3, max u1 u2} β (Sigma.{u1, u2} ι (fun (i : ι) => α i)) _inst_1 _inst_2 (Finset.sigma.{u1, u2} ι (fun (i : ι) => α i) s t) f) (Finset.inf.{u3, u1} β ι _inst_1 _inst_2 s (fun (i : ι) => Finset.inf.{u3, u2} β (α i) _inst_1 _inst_2 (t i) (fun (b : α i) => f (Sigma.mk.{u1, u2} ι (fun (i : ι) => α i) i b))))
-but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} {β : Type.{u3}} (s : Finset.{u2} ι) (t : forall (i : ι), Finset.{u1} (α i)) (f : (Sigma.{u2, u1} ι (fun (i : ι) => α i)) -> β) [_inst_1 : SemilatticeInf.{u3} β] [_inst_2 : OrderTop.{u3} β (Preorder.toLE.{u3} β (PartialOrder.toPreorder.{u3} β (SemilatticeInf.toPartialOrder.{u3} β _inst_1)))], Eq.{succ u3} β (Finset.inf.{u3, max u2 u1} β (Sigma.{u2, u1} ι (fun (i : ι) => α i)) _inst_1 _inst_2 (Finset.sigma.{u2, u1} ι (fun (i : ι) => α i) s t) f) (Finset.inf.{u3, u2} β ι _inst_1 _inst_2 s (fun (i : ι) => Finset.inf.{u3, u1} β (α i) _inst_1 _inst_2 (t i) (fun (b : α i) => f (Sigma.mk.{u2, u1} ι (fun (i : ι) => α i) i b))))
-Case conversion may be inaccurate. Consider using '#align finset.inf_sigma Finset.inf_sigmaₓ'. -/
theorem inf_sigma [SemilatticeInf β] [OrderTop β] :
(s.Sigma t).inf f = s.inf fun i => (t i).inf fun b => f ⟨i, b⟩ :=
@sup_sigma _ _ βᵒᵈ _ _ _ _ _
@@ -188,12 +134,6 @@ def sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α)
#align finset.sigma_lift Finset.sigmaLift
-/
-/- warning: finset.mem_sigma_lift -> Finset.mem_sigmaLift is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : ι -> Type.{u3}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u1} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))) (a : Sigma.{u1, u2} ι α) (b : Sigma.{u1, u3} ι β) (x : Sigma.{u1, u4} ι γ), Iff (Membership.Mem.{max u1 u4, max u1 u4} (Sigma.{u1, u4} ι γ) (Finset.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))) (Finset.hasMem.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))) x (Finset.sigmaLift.{u1, u2, u3, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)) (Exists.{0} (Eq.{succ u1} ι (Sigma.fst.{u1, u2} ι α a) (Sigma.fst.{u1, u4} ι γ x)) (fun (ha : Eq.{succ u1} ι (Sigma.fst.{u1, u2} ι α a) (Sigma.fst.{u1, u4} ι γ x)) => Exists.{0} (Eq.{succ u1} ι (Sigma.fst.{u1, u3} ι β b) (Sigma.fst.{u1, u4} ι γ x)) (fun (hb : Eq.{succ u1} ι (Sigma.fst.{u1, u3} ι β b) (Sigma.fst.{u1, u4} ι γ x)) => Membership.Mem.{u4, u4} (γ (Sigma.fst.{u1, u4} ι γ x)) (Finset.{u4} (γ (Sigma.fst.{u1, u4} ι γ x))) (Finset.hasMem.{u4} (γ (Sigma.fst.{u1, u4} ι γ x))) (Sigma.snd.{u1, u4} ι γ x) (f (Sigma.fst.{u1, u4} ι γ x) (Eq.ndrec.{succ u2, succ u1} ι (Sigma.fst.{u1, u2} ι α a) α (Sigma.snd.{u1, u2} ι α a) (Sigma.fst.{u1, u4} ι γ x) ha) (Eq.ndrec.{succ u3, succ u1} ι (Sigma.fst.{u1, u3} ι β b) β (Sigma.snd.{u1, u3} ι β b) (Sigma.fst.{u1, u4} ι γ x) hb)))))
-but is expected to have type
- forall {ι : Type.{u3}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u3} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))) (a : Sigma.{u3, u2} ι α) (b : Sigma.{u3, u1} ι β) (x : Sigma.{u3, u4} ι γ), Iff (Membership.mem.{max u3 u4, max u4 u3} (Sigma.{u3, u4} ι γ) (Finset.{max u4 u3} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) (Finset.instMembershipFinset.{max u3 u4} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) x (Finset.sigmaLift.{u3, u2, u1, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)) (Exists.{0} (Eq.{succ u3} ι (Sigma.fst.{u3, u2} ι α a) (Sigma.fst.{u3, u4} ι γ x)) (fun (ha : Eq.{succ u3} ι (Sigma.fst.{u3, u2} ι α a) (Sigma.fst.{u3, u4} ι γ x)) => Exists.{0} (Eq.{succ u3} ι (Sigma.fst.{u3, u1} ι β b) (Sigma.fst.{u3, u4} ι γ x)) (fun (hb : Eq.{succ u3} ι (Sigma.fst.{u3, u1} ι β b) (Sigma.fst.{u3, u4} ι γ x)) => Membership.mem.{u4, u4} (γ (Sigma.fst.{u3, u4} ι γ x)) (Finset.{u4} (γ (Sigma.fst.{u3, u4} ι γ x))) (Finset.instMembershipFinset.{u4} (γ (Sigma.fst.{u3, u4} ι γ x))) (Sigma.snd.{u3, u4} ι γ x) (f (Sigma.fst.{u3, u4} ι γ x) (Eq.rec.{succ u2, succ u3} ι (Sigma.fst.{u3, u2} ι α a) (fun (x._@.Mathlib.Data.Finset.Sigma._hyg.1288 : ι) (h._@.Mathlib.Data.Finset.Sigma._hyg.1289 : Eq.{succ u3} ι (Sigma.fst.{u3, u2} ι α a) x._@.Mathlib.Data.Finset.Sigma._hyg.1288) => α x._@.Mathlib.Data.Finset.Sigma._hyg.1288) (Sigma.snd.{u3, u2} ι α a) (Sigma.fst.{u3, u4} ι γ x) ha) (Eq.rec.{succ u1, succ u3} ι (Sigma.fst.{u3, u1} ι β b) (fun (x._@.Mathlib.Data.Finset.Sigma._hyg.1293 : ι) (h._@.Mathlib.Data.Finset.Sigma._hyg.1294 : Eq.{succ u3} ι (Sigma.fst.{u3, u1} ι β b) x._@.Mathlib.Data.Finset.Sigma._hyg.1293) => β x._@.Mathlib.Data.Finset.Sigma._hyg.1293) (Sigma.snd.{u3, u1} ι β b) (Sigma.fst.{u3, u4} ι γ x) hb)))))
-Case conversion may be inaccurate. Consider using '#align finset.mem_sigma_lift Finset.mem_sigmaLiftₓ'. -/
theorem mem_sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α) (b : Sigma β)
(x : Sigma γ) :
x ∈ sigmaLift f a b ↔ ∃ (ha : a.1 = x.1)(hb : b.1 = x.1), x.2 ∈ f (ha.rec a.2) (hb.rec b.2) :=
@@ -213,12 +153,6 @@ theorem mem_sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Si
exact h rfl
#align finset.mem_sigma_lift Finset.mem_sigmaLift
-/- warning: finset.mk_mem_sigma_lift -> Finset.mk_mem_sigmaLift is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : ι -> Type.{u3}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u1} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))) (i : ι) (a : α i) (b : β i) (x : γ i), Iff (Membership.Mem.{max u1 u4, max u1 u4} (Sigma.{u1, u4} ι γ) (Finset.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))) (Finset.hasMem.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))) (Sigma.mk.{u1, u4} ι γ i x) (Finset.sigmaLift.{u1, u2, u3, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f (Sigma.mk.{u1, u2} ι (fun (i : ι) => α i) i a) (Sigma.mk.{u1, u3} ι (fun (i : ι) => β i) i b))) (Membership.Mem.{u4, u4} (γ i) (Finset.{u4} (γ i)) (Finset.hasMem.{u4} (γ i)) x (f i a b))
-but is expected to have type
- forall {ι : Type.{u3}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u3} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))) (i : ι) (a : α i) (b : β i) (x : γ i), Iff (Membership.mem.{max u3 u4, max u4 u3} (Sigma.{u3, u4} ι γ) (Finset.{max u4 u3} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) (Finset.instMembershipFinset.{max u3 u4} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) (Sigma.mk.{u3, u4} ι γ i x) (Finset.sigmaLift.{u3, u2, u1, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f (Sigma.mk.{u3, u2} ι (fun (i : ι) => α i) i a) (Sigma.mk.{u3, u1} ι (fun (i : ι) => β i) i b))) (Membership.mem.{u4, u4} (γ i) (Finset.{u4} (γ i)) (Finset.instMembershipFinset.{u4} (γ i)) x (f i a b))
-Case conversion may be inaccurate. Consider using '#align finset.mk_mem_sigma_lift Finset.mk_mem_sigmaLiftₓ'. -/
theorem mk_mem_sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (i : ι) (a : α i) (b : β i)
(x : γ i) : (⟨i, x⟩ : Sigma γ) ∈ sigmaLift f ⟨i, a⟩ ⟨i, b⟩ ↔ x ∈ f a b :=
by
@@ -228,23 +162,11 @@ theorem mk_mem_sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (i :
exact hx
#align finset.mk_mem_sigma_lift Finset.mk_mem_sigmaLift
-/- warning: finset.not_mem_sigma_lift_of_ne_left -> Finset.not_mem_sigmaLift_of_ne_left is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : ι -> Type.{u3}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u1} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))) (a : Sigma.{u1, u2} ι α) (b : Sigma.{u1, u3} ι β) (x : Sigma.{u1, u4} ι γ), (Ne.{succ u1} ι (Sigma.fst.{u1, u2} ι α a) (Sigma.fst.{u1, u4} ι γ x)) -> (Not (Membership.Mem.{max u1 u4, max u1 u4} (Sigma.{u1, u4} ι γ) (Finset.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))) (Finset.hasMem.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))) x (Finset.sigmaLift.{u1, u2, u3, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)))
-but is expected to have type
- forall {ι : Type.{u3}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u3} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))) (a : Sigma.{u3, u2} ι α) (b : Sigma.{u3, u1} ι β) (x : Sigma.{u3, u4} ι γ), (Ne.{succ u3} ι (Sigma.fst.{u3, u2} ι α a) (Sigma.fst.{u3, u4} ι γ x)) -> (Not (Membership.mem.{max u3 u4, max u4 u3} (Sigma.{u3, u4} ι γ) (Finset.{max u4 u3} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) (Finset.instMembershipFinset.{max u3 u4} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) x (Finset.sigmaLift.{u3, u2, u1, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)))
-Case conversion may be inaccurate. Consider using '#align finset.not_mem_sigma_lift_of_ne_left Finset.not_mem_sigmaLift_of_ne_leftₓ'. -/
theorem not_mem_sigmaLift_of_ne_left (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α)
(b : Sigma β) (x : Sigma γ) (h : a.1 ≠ x.1) : x ∉ sigmaLift f a b := by rw [mem_sigma_lift];
exact fun H => h H.fst
#align finset.not_mem_sigma_lift_of_ne_left Finset.not_mem_sigmaLift_of_ne_left
-/- warning: finset.not_mem_sigma_lift_of_ne_right -> Finset.not_mem_sigmaLift_of_ne_right is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : ι -> Type.{u3}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u1} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))) {a : Sigma.{u1, u2} ι α} (b : Sigma.{u1, u3} ι β) {x : Sigma.{u1, u4} ι γ}, (Ne.{succ u1} ι (Sigma.fst.{u1, u3} ι β b) (Sigma.fst.{u1, u4} ι γ x)) -> (Not (Membership.Mem.{max u1 u4, max u1 u4} (Sigma.{u1, u4} ι γ) (Finset.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))) (Finset.hasMem.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))) x (Finset.sigmaLift.{u1, u2, u3, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)))
-but is expected to have type
- forall {ι : Type.{u3}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u3} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))) {a : Sigma.{u3, u2} ι α} (b : Sigma.{u3, u1} ι β) {x : Sigma.{u3, u4} ι γ}, (Ne.{succ u3} ι (Sigma.fst.{u3, u1} ι β b) (Sigma.fst.{u3, u4} ι γ x)) -> (Not (Membership.mem.{max u3 u4, max u4 u3} (Sigma.{u3, u4} ι γ) (Finset.{max u4 u3} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) (Finset.instMembershipFinset.{max u3 u4} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) x (Finset.sigmaLift.{u3, u2, u1, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)))
-Case conversion may be inaccurate. Consider using '#align finset.not_mem_sigma_lift_of_ne_right Finset.not_mem_sigmaLift_of_ne_rightₓ'. -/
theorem not_mem_sigmaLift_of_ne_right (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) {a : Sigma α}
(b : Sigma β) {x : Sigma γ} (h : b.1 ≠ x.1) : x ∉ sigmaLift f a b := by rw [mem_sigma_lift];
exact fun H => h H.snd.fst
@@ -252,12 +174,6 @@ theorem not_mem_sigmaLift_of_ne_right (f : ∀ ⦃i⦄, α i → β i → Finset
variable {f g : ∀ ⦃i⦄, α i → β i → Finset (γ i)} {a : Σi, α i} {b : Σi, β i}
-/- warning: finset.sigma_lift_nonempty -> Finset.sigmaLift_nonempty is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : ι -> Type.{u3}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u1} ι] {f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))} {a : Sigma.{u1, u2} ι (fun (i : ι) => α i)} {b : Sigma.{u1, u3} ι (fun (i : ι) => β i)}, Iff (Finset.Nonempty.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i)) (Finset.sigmaLift.{u1, u2, u3, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)) (Exists.{0} (Eq.{succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)) (fun (h : Eq.{succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)) => Finset.Nonempty.{u4} (γ (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)) (f (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b) (Eq.ndrec.{succ u2, succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) α (Sigma.snd.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b) h) (Sigma.snd.{u1, u3} ι (fun (i : ι) => β i) b))))
-but is expected to have type
- forall {ι : Type.{u4}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u3}} [_inst_1 : DecidableEq.{succ u4} ι] {f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u3} (γ i))} {a : Sigma.{u4, u2} ι (fun (i : ι) => α i)} {b : Sigma.{u4, u1} ι (fun (i : ι) => β i)}, Iff (Finset.Nonempty.{max u4 u3} (Sigma.{u4, u3} ι (fun (i : ι) => γ i)) (Finset.sigmaLift.{u4, u2, u1, u3} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)) (Exists.{0} (Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (fun (h : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) => Finset.Nonempty.{u3} (γ (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (f (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) (Eq.rec.{succ u2, succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (fun (x._@.Mathlib.Data.Finset.Sigma._hyg.1909 : ι) (h._@.Mathlib.Data.Finset.Sigma._hyg.1910 : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) x._@.Mathlib.Data.Finset.Sigma._hyg.1909) => α x._@.Mathlib.Data.Finset.Sigma._hyg.1909) (Sigma.snd.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) h) (Sigma.snd.{u4, u1} ι (fun (i : ι) => β i) b))))
-Case conversion may be inaccurate. Consider using '#align finset.sigma_lift_nonempty Finset.sigmaLift_nonemptyₓ'. -/
theorem sigmaLift_nonempty :
(sigmaLift f a b).Nonempty ↔ ∃ h : a.1 = b.1, (f (h.rec a.2) b.2).Nonempty :=
by
@@ -268,24 +184,12 @@ theorem sigmaLift_nonempty :
exact map_nonempty.symm
#align finset.sigma_lift_nonempty Finset.sigmaLift_nonempty
-/- warning: finset.sigma_lift_eq_empty -> Finset.sigmaLift_eq_empty is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : ι -> Type.{u3}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u1} ι] {f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))} {a : Sigma.{u1, u2} ι (fun (i : ι) => α i)} {b : Sigma.{u1, u3} ι (fun (i : ι) => β i)}, Iff (Eq.{succ (max u1 u4)} (Finset.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))) (Finset.sigmaLift.{u1, u2, u3, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b) (EmptyCollection.emptyCollection.{max u1 u4} (Finset.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))) (Finset.hasEmptyc.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))))) (forall (h : Eq.{succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)), Eq.{succ u4} (Finset.{u4} (γ (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b))) (f (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b) (Eq.ndrec.{succ u2, succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) α (Sigma.snd.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b) h) (Sigma.snd.{u1, u3} ι (fun (i : ι) => β i) b)) (EmptyCollection.emptyCollection.{u4} (Finset.{u4} (γ (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b))) (Finset.hasEmptyc.{u4} (γ (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)))))
-but is expected to have type
- forall {ι : Type.{u4}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u3}} [_inst_1 : DecidableEq.{succ u4} ι] {f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u3} (γ i))} {a : Sigma.{u4, u2} ι (fun (i : ι) => α i)} {b : Sigma.{u4, u1} ι (fun (i : ι) => β i)}, Iff (Eq.{max (succ u4) (succ u3)} (Finset.{max u3 u4} (Sigma.{u4, u3} ι (fun (i : ι) => γ i))) (Finset.sigmaLift.{u4, u2, u1, u3} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b) (EmptyCollection.emptyCollection.{max u4 u3} (Finset.{max u3 u4} (Sigma.{u4, u3} ι (fun (i : ι) => γ i))) (Finset.instEmptyCollectionFinset.{max u4 u3} (Sigma.{u4, u3} ι (fun (i : ι) => γ i))))) (forall (h : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)), Eq.{succ u3} (Finset.{u3} (γ (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b))) (f (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) (Eq.rec.{succ u2, succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (fun (x._@.Mathlib.Data.Finset.Sigma._hyg.2024 : ι) (h._@.Mathlib.Data.Finset.Sigma._hyg.2025 : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) x._@.Mathlib.Data.Finset.Sigma._hyg.2024) => α x._@.Mathlib.Data.Finset.Sigma._hyg.2024) (Sigma.snd.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) h) (Sigma.snd.{u4, u1} ι (fun (i : ι) => β i) b)) (EmptyCollection.emptyCollection.{u3} (Finset.{u3} (γ (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b))) (Finset.instEmptyCollectionFinset.{u3} (γ (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)))))
-Case conversion may be inaccurate. Consider using '#align finset.sigma_lift_eq_empty Finset.sigmaLift_eq_emptyₓ'. -/
theorem sigmaLift_eq_empty : sigmaLift f a b = ∅ ↔ ∀ h : a.1 = b.1, f (h.rec a.2) b.2 = ∅ :=
by
convert dite_eq_right_iff
exact forall_congr fun h => propext map_eq_empty.symm
#align finset.sigma_lift_eq_empty Finset.sigmaLift_eq_empty
-/- warning: finset.sigma_lift_mono -> Finset.sigmaLift_mono is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : ι -> Type.{u3}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u1} ι] {f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))} {g : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))}, (forall {{i : ι}} {{a : α i}} {{b : β i}}, HasSubset.Subset.{u4} (Finset.{u4} (γ i)) (Finset.hasSubset.{u4} (γ i)) (f i a b) (g i a b)) -> (forall (a : Sigma.{u1, u2} ι (fun (i : ι) => α i)) (b : Sigma.{u1, u3} ι (fun (i : ι) => β i)), HasSubset.Subset.{max u1 u4} (Finset.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))) (Finset.hasSubset.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))) (Finset.sigmaLift.{u1, u2, u3, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b) (Finset.sigmaLift.{u1, u2, u3, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) g a b))
-but is expected to have type
- forall {ι : Type.{u3}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u3} ι] {f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))} {g : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))}, (forall {{i : ι}} {{a : α i}} {{b : β i}}, HasSubset.Subset.{u4} (Finset.{u4} (γ i)) (Finset.instHasSubsetFinset.{u4} (γ i)) (f i a b) (g i a b)) -> (forall (a : Sigma.{u3, u2} ι (fun (i : ι) => α i)) (b : Sigma.{u3, u1} ι (fun (i : ι) => β i)), HasSubset.Subset.{max u4 u3} (Finset.{max u4 u3} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) (Finset.instHasSubsetFinset.{max u3 u4} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) (Finset.sigmaLift.{u3, u2, u1, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b) (Finset.sigmaLift.{u3, u2, u1, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) g a b))
-Case conversion may be inaccurate. Consider using '#align finset.sigma_lift_mono Finset.sigmaLift_monoₓ'. -/
theorem sigmaLift_mono (h : ∀ ⦃i⦄ ⦃a : α i⦄ ⦃b : β i⦄, f a b ⊆ g a b) (a : Σi, α i) (b : Σi, β i) :
sigmaLift f a b ⊆ sigmaLift g a b := by
rintro x hx
@@ -296,12 +200,6 @@ theorem sigmaLift_mono (h : ∀ ⦃i⦄ ⦃a : α i⦄ ⦃b : β i⦄, f a b ⊆
variable (f a b)
-/- warning: finset.card_sigma_lift -> Finset.card_sigmaLift is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : ι -> Type.{u3}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u1} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))) (a : Sigma.{u1, u2} ι (fun (i : ι) => α i)) (b : Sigma.{u1, u3} ι (fun (i : ι) => β i)), Eq.{1} Nat (Finset.card.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i)) (Finset.sigmaLift.{u1, u2, u3, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)) (dite.{1} Nat (Eq.{succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)) (_inst_1 (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)) (fun (h : Eq.{succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)) => Finset.card.{u4} (γ (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)) (f (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b) (Eq.ndrec.{succ u2, succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) α (Sigma.snd.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b) h) (Sigma.snd.{u1, u3} ι (fun (i : ι) => β i) b))) (fun (_x : Not (Eq.{succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b))) => OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))))
-but is expected to have type
- forall {ι : Type.{u4}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u3}} [_inst_1 : DecidableEq.{succ u4} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u3} (γ i))) (a : Sigma.{u4, u2} ι (fun (i : ι) => α i)) (b : Sigma.{u4, u1} ι (fun (i : ι) => β i)), Eq.{1} Nat (Finset.card.{max u4 u3} (Sigma.{u4, u3} ι (fun (i : ι) => γ i)) (Finset.sigmaLift.{u4, u2, u1, u3} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)) (dite.{1} Nat (Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (_inst_1 (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (fun (h : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) => Finset.card.{u3} (γ (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (f (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) (Eq.rec.{succ u2, succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (fun (x._@.Mathlib.Data.Finset.Sigma._hyg.2353 : ι) (h._@.Mathlib.Data.Finset.Sigma._hyg.2354 : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) x._@.Mathlib.Data.Finset.Sigma._hyg.2353) => α x._@.Mathlib.Data.Finset.Sigma._hyg.2353) (Sigma.snd.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) h) (Sigma.snd.{u4, u1} ι (fun (i : ι) => β i) b))) (fun (_x : Not (Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b))) => OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)))
-Case conversion may be inaccurate. Consider using '#align finset.card_sigma_lift Finset.card_sigmaLiftₓ'. -/
theorem card_sigmaLift :
(sigmaLift f a b).card = dite (a.1 = b.1) (fun h => (f (h.rec a.2) b.2).card) fun _ => 0 := by
convert apply_dite _ _ _ _; ext h; exact (card_map _).symm
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -141,9 +141,7 @@ theorem disjiUnion_map_sigma_mk :
#print Finset.sigma_eq_biUnion /-
theorem sigma_eq_biUnion [DecidableEq (Σi, α i)] (s : Finset ι) (t : ∀ i, Finset (α i)) :
- s.Sigma t = s.biUnion fun i => (t i).map <| Embedding.sigmaMk i :=
- by
- ext ⟨x, y⟩
+ s.Sigma t = s.biUnion fun i => (t i).map <| Embedding.sigmaMk i := by ext ⟨x, y⟩;
simp [and_left_comm]
#align finset.sigma_eq_bUnion Finset.sigma_eq_biUnion
-/
@@ -237,9 +235,7 @@ but is expected to have type
forall {ι : Type.{u3}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u3} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))) (a : Sigma.{u3, u2} ι α) (b : Sigma.{u3, u1} ι β) (x : Sigma.{u3, u4} ι γ), (Ne.{succ u3} ι (Sigma.fst.{u3, u2} ι α a) (Sigma.fst.{u3, u4} ι γ x)) -> (Not (Membership.mem.{max u3 u4, max u4 u3} (Sigma.{u3, u4} ι γ) (Finset.{max u4 u3} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) (Finset.instMembershipFinset.{max u3 u4} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) x (Finset.sigmaLift.{u3, u2, u1, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)))
Case conversion may be inaccurate. Consider using '#align finset.not_mem_sigma_lift_of_ne_left Finset.not_mem_sigmaLift_of_ne_leftₓ'. -/
theorem not_mem_sigmaLift_of_ne_left (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α)
- (b : Sigma β) (x : Sigma γ) (h : a.1 ≠ x.1) : x ∉ sigmaLift f a b :=
- by
- rw [mem_sigma_lift]
+ (b : Sigma β) (x : Sigma γ) (h : a.1 ≠ x.1) : x ∉ sigmaLift f a b := by rw [mem_sigma_lift];
exact fun H => h H.fst
#align finset.not_mem_sigma_lift_of_ne_left Finset.not_mem_sigmaLift_of_ne_left
@@ -250,9 +246,7 @@ but is expected to have type
forall {ι : Type.{u3}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u3} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))) {a : Sigma.{u3, u2} ι α} (b : Sigma.{u3, u1} ι β) {x : Sigma.{u3, u4} ι γ}, (Ne.{succ u3} ι (Sigma.fst.{u3, u1} ι β b) (Sigma.fst.{u3, u4} ι γ x)) -> (Not (Membership.mem.{max u3 u4, max u4 u3} (Sigma.{u3, u4} ι γ) (Finset.{max u4 u3} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) (Finset.instMembershipFinset.{max u3 u4} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) x (Finset.sigmaLift.{u3, u2, u1, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)))
Case conversion may be inaccurate. Consider using '#align finset.not_mem_sigma_lift_of_ne_right Finset.not_mem_sigmaLift_of_ne_rightₓ'. -/
theorem not_mem_sigmaLift_of_ne_right (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) {a : Sigma α}
- (b : Sigma β) {x : Sigma γ} (h : b.1 ≠ x.1) : x ∉ sigmaLift f a b :=
- by
- rw [mem_sigma_lift]
+ (b : Sigma β) {x : Sigma γ} (h : b.1 ≠ x.1) : x ∉ sigmaLift f a b := by rw [mem_sigma_lift];
exact fun H => h H.snd.fst
#align finset.not_mem_sigma_lift_of_ne_right Finset.not_mem_sigmaLift_of_ne_right
@@ -309,11 +303,8 @@ but is expected to have type
forall {ι : Type.{u4}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u3}} [_inst_1 : DecidableEq.{succ u4} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u3} (γ i))) (a : Sigma.{u4, u2} ι (fun (i : ι) => α i)) (b : Sigma.{u4, u1} ι (fun (i : ι) => β i)), Eq.{1} Nat (Finset.card.{max u4 u3} (Sigma.{u4, u3} ι (fun (i : ι) => γ i)) (Finset.sigmaLift.{u4, u2, u1, u3} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)) (dite.{1} Nat (Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (_inst_1 (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (fun (h : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) => Finset.card.{u3} (γ (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (f (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) (Eq.rec.{succ u2, succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (fun (x._@.Mathlib.Data.Finset.Sigma._hyg.2353 : ι) (h._@.Mathlib.Data.Finset.Sigma._hyg.2354 : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) x._@.Mathlib.Data.Finset.Sigma._hyg.2353) => α x._@.Mathlib.Data.Finset.Sigma._hyg.2353) (Sigma.snd.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) h) (Sigma.snd.{u4, u1} ι (fun (i : ι) => β i) b))) (fun (_x : Not (Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b))) => OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)))
Case conversion may be inaccurate. Consider using '#align finset.card_sigma_lift Finset.card_sigmaLiftₓ'. -/
theorem card_sigmaLift :
- (sigmaLift f a b).card = dite (a.1 = b.1) (fun h => (f (h.rec a.2) b.2).card) fun _ => 0 :=
- by
- convert apply_dite _ _ _ _
- ext h
- exact (card_map _).symm
+ (sigmaLift f a b).card = dite (a.1 = b.1) (fun h => (f (h.rec a.2) b.2).card) fun _ => 0 := by
+ convert apply_dite _ _ _ _; ext h; exact (card_map _).symm
#align finset.card_sigma_lift Finset.card_sigmaLift
end SigmaLift
mathlib commit https://github.com/leanprover-community/mathlib/commit/0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8
@@ -152,7 +152,7 @@ variable (s t) (f : (Σi, α i) → β)
/- warning: finset.sup_sigma -> Finset.sup_sigma is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : Type.{u3}} (s : Finset.{u1} ι) (t : forall (i : ι), Finset.{u2} (α i)) (f : (Sigma.{u1, u2} ι (fun (i : ι) => α i)) -> β) [_inst_1 : SemilatticeSup.{u3} β] [_inst_2 : OrderBot.{u3} β (Preorder.toLE.{u3} β (PartialOrder.toPreorder.{u3} β (SemilatticeSup.toPartialOrder.{u3} β _inst_1)))], Eq.{succ u3} β (Finset.sup.{u3, max u1 u2} β (Sigma.{u1, u2} ι (fun (i : ι) => α i)) _inst_1 _inst_2 (Finset.sigma.{u1, u2} ι (fun (i : ι) => α i) s t) f) (Finset.sup.{u3, u1} β ι _inst_1 _inst_2 s (fun (i : ι) => Finset.sup.{u3, u2} β (α i) _inst_1 _inst_2 (t i) (fun (b : α i) => f (Sigma.mk.{u1, u2} ι (fun (i : ι) => α i) i b))))
+ forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : Type.{u3}} (s : Finset.{u1} ι) (t : forall (i : ι), Finset.{u2} (α i)) (f : (Sigma.{u1, u2} ι (fun (i : ι) => α i)) -> β) [_inst_1 : SemilatticeSup.{u3} β] [_inst_2 : OrderBot.{u3} β (Preorder.toHasLe.{u3} β (PartialOrder.toPreorder.{u3} β (SemilatticeSup.toPartialOrder.{u3} β _inst_1)))], Eq.{succ u3} β (Finset.sup.{u3, max u1 u2} β (Sigma.{u1, u2} ι (fun (i : ι) => α i)) _inst_1 _inst_2 (Finset.sigma.{u1, u2} ι (fun (i : ι) => α i) s t) f) (Finset.sup.{u3, u1} β ι _inst_1 _inst_2 s (fun (i : ι) => Finset.sup.{u3, u2} β (α i) _inst_1 _inst_2 (t i) (fun (b : α i) => f (Sigma.mk.{u1, u2} ι (fun (i : ι) => α i) i b))))
but is expected to have type
forall {ι : Type.{u2}} {α : ι -> Type.{u1}} {β : Type.{u3}} (s : Finset.{u2} ι) (t : forall (i : ι), Finset.{u1} (α i)) (f : (Sigma.{u2, u1} ι (fun (i : ι) => α i)) -> β) [_inst_1 : SemilatticeSup.{u3} β] [_inst_2 : OrderBot.{u3} β (Preorder.toLE.{u3} β (PartialOrder.toPreorder.{u3} β (SemilatticeSup.toPartialOrder.{u3} β _inst_1)))], Eq.{succ u3} β (Finset.sup.{u3, max u2 u1} β (Sigma.{u2, u1} ι (fun (i : ι) => α i)) _inst_1 _inst_2 (Finset.sigma.{u2, u1} ι (fun (i : ι) => α i) s t) f) (Finset.sup.{u3, u2} β ι _inst_1 _inst_2 s (fun (i : ι) => Finset.sup.{u3, u1} β (α i) _inst_1 _inst_2 (t i) (fun (b : α i) => f (Sigma.mk.{u2, u1} ι (fun (i : ι) => α i) i b))))
Case conversion may be inaccurate. Consider using '#align finset.sup_sigma Finset.sup_sigmaₓ'. -/
@@ -167,7 +167,7 @@ theorem sup_sigma [SemilatticeSup β] [OrderBot β] :
/- warning: finset.inf_sigma -> Finset.inf_sigma is a dubious translation:
lean 3 declaration is
- forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : Type.{u3}} (s : Finset.{u1} ι) (t : forall (i : ι), Finset.{u2} (α i)) (f : (Sigma.{u1, u2} ι (fun (i : ι) => α i)) -> β) [_inst_1 : SemilatticeInf.{u3} β] [_inst_2 : OrderTop.{u3} β (Preorder.toLE.{u3} β (PartialOrder.toPreorder.{u3} β (SemilatticeInf.toPartialOrder.{u3} β _inst_1)))], Eq.{succ u3} β (Finset.inf.{u3, max u1 u2} β (Sigma.{u1, u2} ι (fun (i : ι) => α i)) _inst_1 _inst_2 (Finset.sigma.{u1, u2} ι (fun (i : ι) => α i) s t) f) (Finset.inf.{u3, u1} β ι _inst_1 _inst_2 s (fun (i : ι) => Finset.inf.{u3, u2} β (α i) _inst_1 _inst_2 (t i) (fun (b : α i) => f (Sigma.mk.{u1, u2} ι (fun (i : ι) => α i) i b))))
+ forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : Type.{u3}} (s : Finset.{u1} ι) (t : forall (i : ι), Finset.{u2} (α i)) (f : (Sigma.{u1, u2} ι (fun (i : ι) => α i)) -> β) [_inst_1 : SemilatticeInf.{u3} β] [_inst_2 : OrderTop.{u3} β (Preorder.toHasLe.{u3} β (PartialOrder.toPreorder.{u3} β (SemilatticeInf.toPartialOrder.{u3} β _inst_1)))], Eq.{succ u3} β (Finset.inf.{u3, max u1 u2} β (Sigma.{u1, u2} ι (fun (i : ι) => α i)) _inst_1 _inst_2 (Finset.sigma.{u1, u2} ι (fun (i : ι) => α i) s t) f) (Finset.inf.{u3, u1} β ι _inst_1 _inst_2 s (fun (i : ι) => Finset.inf.{u3, u2} β (α i) _inst_1 _inst_2 (t i) (fun (b : α i) => f (Sigma.mk.{u1, u2} ι (fun (i : ι) => α i) i b))))
but is expected to have type
forall {ι : Type.{u2}} {α : ι -> Type.{u1}} {β : Type.{u3}} (s : Finset.{u2} ι) (t : forall (i : ι), Finset.{u1} (α i)) (f : (Sigma.{u2, u1} ι (fun (i : ι) => α i)) -> β) [_inst_1 : SemilatticeInf.{u3} β] [_inst_2 : OrderTop.{u3} β (Preorder.toLE.{u3} β (PartialOrder.toPreorder.{u3} β (SemilatticeInf.toPartialOrder.{u3} β _inst_1)))], Eq.{succ u3} β (Finset.inf.{u3, max u2 u1} β (Sigma.{u2, u1} ι (fun (i : ι) => α i)) _inst_1 _inst_2 (Finset.sigma.{u2, u1} ι (fun (i : ι) => α i) s t) f) (Finset.inf.{u3, u2} β ι _inst_1 _inst_2 s (fun (i : ι) => Finset.inf.{u3, u1} β (α i) _inst_1 _inst_2 (t i) (fun (b : α i) => f (Sigma.mk.{u2, u1} ι (fun (i : ι) => α i) i b))))
Case conversion may be inaccurate. Consider using '#align finset.inf_sigma Finset.inf_sigmaₓ'. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -126,26 +126,26 @@ theorem pairwiseDisjoint_map_sigmaMk :
exact hij (congr_arg Sigma.fst hz'.symm)
#align finset.pairwise_disjoint_map_sigma_mk Finset.pairwiseDisjoint_map_sigmaMk
-/- warning: finset.disj_Union_map_sigma_mk -> Finset.disjUnionᵢ_map_sigma_mk is a dubious translation:
+/- warning: finset.disj_Union_map_sigma_mk -> Finset.disjiUnion_map_sigma_mk is a dubious translation:
lean 3 declaration is
forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {s : Finset.{u1} ι} {t : forall (i : ι), Finset.{u2} (α i)}, Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (Sigma.{u1, u2} ι (fun (x : ι) => α x))) (Finset.disjUnionₓ.{u1, max u1 u2} ι (Sigma.{u1, u2} ι (fun (x : ι) => α x)) s (fun (i : ι) => Finset.map.{u2, max u1 u2} (α i) (Sigma.{u1, u2} ι (fun (x : ι) => α x)) (Function.Embedding.sigmaMk.{u1, u2} ι α i) (t i)) (Finset.pairwiseDisjoint_map_sigmaMk.{u1, u2} ι α s (fun (i : ι) => t i))) (Finset.sigma.{u1, u2} ι (fun (x : ι) => α x) s t)
but is expected to have type
- forall {ι : Type.{u2}} {α : ι -> Type.{u1}} {s : Finset.{u2} ι} {t : forall (i : ι), Finset.{u1} (α i)}, Eq.{max (succ u2) (succ u1)} (Finset.{max u2 u1} (Sigma.{u2, u1} ι (fun (x : ι) => α x))) (Finset.disjUnionᵢ.{u2, max u2 u1} ι (Sigma.{u2, u1} ι (fun (x : ι) => α x)) s (fun (i : ι) => Finset.map.{u1, max u2 u1} (α i) (Sigma.{u2, u1} ι (fun (x : ι) => α x)) (Function.Embedding.sigmaMk.{u2, u1} ι (fun (i : ι) => α i) i) (t i)) (Finset.pairwiseDisjoint_map_sigmaMk.{u1, u2} ι (fun (i : ι) => α i) s (fun (i : ι) => t i))) (Finset.sigma.{u2, u1} ι (fun (x : ι) => α x) s t)
-Case conversion may be inaccurate. Consider using '#align finset.disj_Union_map_sigma_mk Finset.disjUnionᵢ_map_sigma_mkₓ'. -/
+ forall {ι : Type.{u2}} {α : ι -> Type.{u1}} {s : Finset.{u2} ι} {t : forall (i : ι), Finset.{u1} (α i)}, Eq.{max (succ u2) (succ u1)} (Finset.{max u2 u1} (Sigma.{u2, u1} ι (fun (x : ι) => α x))) (Finset.disjiUnion.{u2, max u2 u1} ι (Sigma.{u2, u1} ι (fun (x : ι) => α x)) s (fun (i : ι) => Finset.map.{u1, max u2 u1} (α i) (Sigma.{u2, u1} ι (fun (x : ι) => α x)) (Function.Embedding.sigmaMk.{u2, u1} ι (fun (i : ι) => α i) i) (t i)) (Finset.pairwiseDisjoint_map_sigmaMk.{u1, u2} ι (fun (i : ι) => α i) s (fun (i : ι) => t i))) (Finset.sigma.{u2, u1} ι (fun (x : ι) => α x) s t)
+Case conversion may be inaccurate. Consider using '#align finset.disj_Union_map_sigma_mk Finset.disjiUnion_map_sigma_mkₓ'. -/
@[simp]
-theorem disjUnionᵢ_map_sigma_mk :
+theorem disjiUnion_map_sigma_mk :
s.disjUnionₓ (fun i => (t i).map (Embedding.sigmaMk i)) pairwiseDisjoint_map_sigmaMk =
s.Sigma t :=
rfl
-#align finset.disj_Union_map_sigma_mk Finset.disjUnionᵢ_map_sigma_mk
+#align finset.disj_Union_map_sigma_mk Finset.disjiUnion_map_sigma_mk
-#print Finset.sigma_eq_bunionᵢ /-
-theorem sigma_eq_bunionᵢ [DecidableEq (Σi, α i)] (s : Finset ι) (t : ∀ i, Finset (α i)) :
- s.Sigma t = s.bunionᵢ fun i => (t i).map <| Embedding.sigmaMk i :=
+#print Finset.sigma_eq_biUnion /-
+theorem sigma_eq_biUnion [DecidableEq (Σi, α i)] (s : Finset ι) (t : ∀ i, Finset (α i)) :
+ s.Sigma t = s.biUnion fun i => (t i).map <| Embedding.sigmaMk i :=
by
ext ⟨x, y⟩
simp [and_left_comm]
-#align finset.sigma_eq_bUnion Finset.sigma_eq_bunionᵢ
+#align finset.sigma_eq_bUnion Finset.sigma_eq_biUnion
-/
variable (s t) (f : (Σi, α i) → β)
mathlib commit https://github.com/leanprover-community/mathlib/commit/36b8aa61ea7c05727161f96a0532897bd72aedab
@@ -194,7 +194,7 @@ def sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α)
lean 3 declaration is
forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : ι -> Type.{u3}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u1} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))) (a : Sigma.{u1, u2} ι α) (b : Sigma.{u1, u3} ι β) (x : Sigma.{u1, u4} ι γ), Iff (Membership.Mem.{max u1 u4, max u1 u4} (Sigma.{u1, u4} ι γ) (Finset.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))) (Finset.hasMem.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))) x (Finset.sigmaLift.{u1, u2, u3, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)) (Exists.{0} (Eq.{succ u1} ι (Sigma.fst.{u1, u2} ι α a) (Sigma.fst.{u1, u4} ι γ x)) (fun (ha : Eq.{succ u1} ι (Sigma.fst.{u1, u2} ι α a) (Sigma.fst.{u1, u4} ι γ x)) => Exists.{0} (Eq.{succ u1} ι (Sigma.fst.{u1, u3} ι β b) (Sigma.fst.{u1, u4} ι γ x)) (fun (hb : Eq.{succ u1} ι (Sigma.fst.{u1, u3} ι β b) (Sigma.fst.{u1, u4} ι γ x)) => Membership.Mem.{u4, u4} (γ (Sigma.fst.{u1, u4} ι γ x)) (Finset.{u4} (γ (Sigma.fst.{u1, u4} ι γ x))) (Finset.hasMem.{u4} (γ (Sigma.fst.{u1, u4} ι γ x))) (Sigma.snd.{u1, u4} ι γ x) (f (Sigma.fst.{u1, u4} ι γ x) (Eq.ndrec.{succ u2, succ u1} ι (Sigma.fst.{u1, u2} ι α a) α (Sigma.snd.{u1, u2} ι α a) (Sigma.fst.{u1, u4} ι γ x) ha) (Eq.ndrec.{succ u3, succ u1} ι (Sigma.fst.{u1, u3} ι β b) β (Sigma.snd.{u1, u3} ι β b) (Sigma.fst.{u1, u4} ι γ x) hb)))))
but is expected to have type
- forall {ι : Type.{u3}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u3} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))) (a : Sigma.{u3, u2} ι α) (b : Sigma.{u3, u1} ι β) (x : Sigma.{u3, u4} ι γ), Iff (Membership.mem.{max u3 u4, max u4 u3} (Sigma.{u3, u4} ι γ) (Finset.{max u4 u3} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) (Finset.instMembershipFinset.{max u3 u4} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) x (Finset.sigmaLift.{u3, u2, u1, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)) (Exists.{0} (Eq.{succ u3} ι (Sigma.fst.{u3, u2} ι α a) (Sigma.fst.{u3, u4} ι γ x)) (fun (ha : Eq.{succ u3} ι (Sigma.fst.{u3, u2} ι α a) (Sigma.fst.{u3, u4} ι γ x)) => Exists.{0} (Eq.{succ u3} ι (Sigma.fst.{u3, u1} ι β b) (Sigma.fst.{u3, u4} ι γ x)) (fun (hb : Eq.{succ u3} ι (Sigma.fst.{u3, u1} ι β b) (Sigma.fst.{u3, u4} ι γ x)) => Membership.mem.{u4, u4} (γ (Sigma.fst.{u3, u4} ι γ x)) (Finset.{u4} (γ (Sigma.fst.{u3, u4} ι γ x))) (Finset.instMembershipFinset.{u4} (γ (Sigma.fst.{u3, u4} ι γ x))) (Sigma.snd.{u3, u4} ι γ x) (f (Sigma.fst.{u3, u4} ι γ x) (Eq.rec.{succ u2, succ u3} ι (Sigma.fst.{u3, u2} ι α a) (fun (x._@.Mathlib.Data.Finset.Sigma._hyg.1290 : ι) (h._@.Mathlib.Data.Finset.Sigma._hyg.1291 : Eq.{succ u3} ι (Sigma.fst.{u3, u2} ι α a) x._@.Mathlib.Data.Finset.Sigma._hyg.1290) => α x._@.Mathlib.Data.Finset.Sigma._hyg.1290) (Sigma.snd.{u3, u2} ι α a) (Sigma.fst.{u3, u4} ι γ x) ha) (Eq.rec.{succ u1, succ u3} ι (Sigma.fst.{u3, u1} ι β b) (fun (x._@.Mathlib.Data.Finset.Sigma._hyg.1295 : ι) (h._@.Mathlib.Data.Finset.Sigma._hyg.1296 : Eq.{succ u3} ι (Sigma.fst.{u3, u1} ι β b) x._@.Mathlib.Data.Finset.Sigma._hyg.1295) => β x._@.Mathlib.Data.Finset.Sigma._hyg.1295) (Sigma.snd.{u3, u1} ι β b) (Sigma.fst.{u3, u4} ι γ x) hb)))))
+ forall {ι : Type.{u3}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u3} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))) (a : Sigma.{u3, u2} ι α) (b : Sigma.{u3, u1} ι β) (x : Sigma.{u3, u4} ι γ), Iff (Membership.mem.{max u3 u4, max u4 u3} (Sigma.{u3, u4} ι γ) (Finset.{max u4 u3} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) (Finset.instMembershipFinset.{max u3 u4} (Sigma.{u3, u4} ι (fun (i : ι) => γ i))) x (Finset.sigmaLift.{u3, u2, u1, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)) (Exists.{0} (Eq.{succ u3} ι (Sigma.fst.{u3, u2} ι α a) (Sigma.fst.{u3, u4} ι γ x)) (fun (ha : Eq.{succ u3} ι (Sigma.fst.{u3, u2} ι α a) (Sigma.fst.{u3, u4} ι γ x)) => Exists.{0} (Eq.{succ u3} ι (Sigma.fst.{u3, u1} ι β b) (Sigma.fst.{u3, u4} ι γ x)) (fun (hb : Eq.{succ u3} ι (Sigma.fst.{u3, u1} ι β b) (Sigma.fst.{u3, u4} ι γ x)) => Membership.mem.{u4, u4} (γ (Sigma.fst.{u3, u4} ι γ x)) (Finset.{u4} (γ (Sigma.fst.{u3, u4} ι γ x))) (Finset.instMembershipFinset.{u4} (γ (Sigma.fst.{u3, u4} ι γ x))) (Sigma.snd.{u3, u4} ι γ x) (f (Sigma.fst.{u3, u4} ι γ x) (Eq.rec.{succ u2, succ u3} ι (Sigma.fst.{u3, u2} ι α a) (fun (x._@.Mathlib.Data.Finset.Sigma._hyg.1288 : ι) (h._@.Mathlib.Data.Finset.Sigma._hyg.1289 : Eq.{succ u3} ι (Sigma.fst.{u3, u2} ι α a) x._@.Mathlib.Data.Finset.Sigma._hyg.1288) => α x._@.Mathlib.Data.Finset.Sigma._hyg.1288) (Sigma.snd.{u3, u2} ι α a) (Sigma.fst.{u3, u4} ι γ x) ha) (Eq.rec.{succ u1, succ u3} ι (Sigma.fst.{u3, u1} ι β b) (fun (x._@.Mathlib.Data.Finset.Sigma._hyg.1293 : ι) (h._@.Mathlib.Data.Finset.Sigma._hyg.1294 : Eq.{succ u3} ι (Sigma.fst.{u3, u1} ι β b) x._@.Mathlib.Data.Finset.Sigma._hyg.1293) => β x._@.Mathlib.Data.Finset.Sigma._hyg.1293) (Sigma.snd.{u3, u1} ι β b) (Sigma.fst.{u3, u4} ι γ x) hb)))))
Case conversion may be inaccurate. Consider using '#align finset.mem_sigma_lift Finset.mem_sigmaLiftₓ'. -/
theorem mem_sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α) (b : Sigma β)
(x : Sigma γ) :
@@ -262,7 +262,7 @@ variable {f g : ∀ ⦃i⦄, α i → β i → Finset (γ i)} {a : Σi, α i} {b
lean 3 declaration is
forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : ι -> Type.{u3}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u1} ι] {f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))} {a : Sigma.{u1, u2} ι (fun (i : ι) => α i)} {b : Sigma.{u1, u3} ι (fun (i : ι) => β i)}, Iff (Finset.Nonempty.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i)) (Finset.sigmaLift.{u1, u2, u3, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)) (Exists.{0} (Eq.{succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)) (fun (h : Eq.{succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)) => Finset.Nonempty.{u4} (γ (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)) (f (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b) (Eq.ndrec.{succ u2, succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) α (Sigma.snd.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b) h) (Sigma.snd.{u1, u3} ι (fun (i : ι) => β i) b))))
but is expected to have type
- forall {ι : Type.{u4}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u3}} [_inst_1 : DecidableEq.{succ u4} ι] {f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u3} (γ i))} {a : Sigma.{u4, u2} ι (fun (i : ι) => α i)} {b : Sigma.{u4, u1} ι (fun (i : ι) => β i)}, Iff (Finset.Nonempty.{max u4 u3} (Sigma.{u4, u3} ι (fun (i : ι) => γ i)) (Finset.sigmaLift.{u4, u2, u1, u3} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)) (Exists.{0} (Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (fun (h : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) => Finset.Nonempty.{u3} (γ (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (f (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) (Eq.rec.{succ u2, succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (fun (x._@.Mathlib.Data.Finset.Sigma._hyg.1918 : ι) (h._@.Mathlib.Data.Finset.Sigma._hyg.1919 : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) x._@.Mathlib.Data.Finset.Sigma._hyg.1918) => α x._@.Mathlib.Data.Finset.Sigma._hyg.1918) (Sigma.snd.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) h) (Sigma.snd.{u4, u1} ι (fun (i : ι) => β i) b))))
+ forall {ι : Type.{u4}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u3}} [_inst_1 : DecidableEq.{succ u4} ι] {f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u3} (γ i))} {a : Sigma.{u4, u2} ι (fun (i : ι) => α i)} {b : Sigma.{u4, u1} ι (fun (i : ι) => β i)}, Iff (Finset.Nonempty.{max u4 u3} (Sigma.{u4, u3} ι (fun (i : ι) => γ i)) (Finset.sigmaLift.{u4, u2, u1, u3} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)) (Exists.{0} (Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (fun (h : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) => Finset.Nonempty.{u3} (γ (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (f (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) (Eq.rec.{succ u2, succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (fun (x._@.Mathlib.Data.Finset.Sigma._hyg.1909 : ι) (h._@.Mathlib.Data.Finset.Sigma._hyg.1910 : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) x._@.Mathlib.Data.Finset.Sigma._hyg.1909) => α x._@.Mathlib.Data.Finset.Sigma._hyg.1909) (Sigma.snd.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) h) (Sigma.snd.{u4, u1} ι (fun (i : ι) => β i) b))))
Case conversion may be inaccurate. Consider using '#align finset.sigma_lift_nonempty Finset.sigmaLift_nonemptyₓ'. -/
theorem sigmaLift_nonempty :
(sigmaLift f a b).Nonempty ↔ ∃ h : a.1 = b.1, (f (h.rec a.2) b.2).Nonempty :=
@@ -278,7 +278,7 @@ theorem sigmaLift_nonempty :
lean 3 declaration is
forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : ι -> Type.{u3}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u1} ι] {f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))} {a : Sigma.{u1, u2} ι (fun (i : ι) => α i)} {b : Sigma.{u1, u3} ι (fun (i : ι) => β i)}, Iff (Eq.{succ (max u1 u4)} (Finset.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))) (Finset.sigmaLift.{u1, u2, u3, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b) (EmptyCollection.emptyCollection.{max u1 u4} (Finset.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))) (Finset.hasEmptyc.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i))))) (forall (h : Eq.{succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)), Eq.{succ u4} (Finset.{u4} (γ (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b))) (f (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b) (Eq.ndrec.{succ u2, succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) α (Sigma.snd.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b) h) (Sigma.snd.{u1, u3} ι (fun (i : ι) => β i) b)) (EmptyCollection.emptyCollection.{u4} (Finset.{u4} (γ (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b))) (Finset.hasEmptyc.{u4} (γ (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)))))
but is expected to have type
- forall {ι : Type.{u4}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u3}} [_inst_1 : DecidableEq.{succ u4} ι] {f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u3} (γ i))} {a : Sigma.{u4, u2} ι (fun (i : ι) => α i)} {b : Sigma.{u4, u1} ι (fun (i : ι) => β i)}, Iff (Eq.{max (succ u4) (succ u3)} (Finset.{max u3 u4} (Sigma.{u4, u3} ι (fun (i : ι) => γ i))) (Finset.sigmaLift.{u4, u2, u1, u3} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b) (EmptyCollection.emptyCollection.{max u4 u3} (Finset.{max u3 u4} (Sigma.{u4, u3} ι (fun (i : ι) => γ i))) (Finset.instEmptyCollectionFinset.{max u4 u3} (Sigma.{u4, u3} ι (fun (i : ι) => γ i))))) (forall (h : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)), Eq.{succ u3} (Finset.{u3} (γ (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b))) (f (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) (Eq.rec.{succ u2, succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (fun (x._@.Mathlib.Data.Finset.Sigma._hyg.2035 : ι) (h._@.Mathlib.Data.Finset.Sigma._hyg.2036 : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) x._@.Mathlib.Data.Finset.Sigma._hyg.2035) => α x._@.Mathlib.Data.Finset.Sigma._hyg.2035) (Sigma.snd.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) h) (Sigma.snd.{u4, u1} ι (fun (i : ι) => β i) b)) (EmptyCollection.emptyCollection.{u3} (Finset.{u3} (γ (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b))) (Finset.instEmptyCollectionFinset.{u3} (γ (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)))))
+ forall {ι : Type.{u4}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u3}} [_inst_1 : DecidableEq.{succ u4} ι] {f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u3} (γ i))} {a : Sigma.{u4, u2} ι (fun (i : ι) => α i)} {b : Sigma.{u4, u1} ι (fun (i : ι) => β i)}, Iff (Eq.{max (succ u4) (succ u3)} (Finset.{max u3 u4} (Sigma.{u4, u3} ι (fun (i : ι) => γ i))) (Finset.sigmaLift.{u4, u2, u1, u3} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b) (EmptyCollection.emptyCollection.{max u4 u3} (Finset.{max u3 u4} (Sigma.{u4, u3} ι (fun (i : ι) => γ i))) (Finset.instEmptyCollectionFinset.{max u4 u3} (Sigma.{u4, u3} ι (fun (i : ι) => γ i))))) (forall (h : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)), Eq.{succ u3} (Finset.{u3} (γ (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b))) (f (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) (Eq.rec.{succ u2, succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (fun (x._@.Mathlib.Data.Finset.Sigma._hyg.2024 : ι) (h._@.Mathlib.Data.Finset.Sigma._hyg.2025 : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) x._@.Mathlib.Data.Finset.Sigma._hyg.2024) => α x._@.Mathlib.Data.Finset.Sigma._hyg.2024) (Sigma.snd.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) h) (Sigma.snd.{u4, u1} ι (fun (i : ι) => β i) b)) (EmptyCollection.emptyCollection.{u3} (Finset.{u3} (γ (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b))) (Finset.instEmptyCollectionFinset.{u3} (γ (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)))))
Case conversion may be inaccurate. Consider using '#align finset.sigma_lift_eq_empty Finset.sigmaLift_eq_emptyₓ'. -/
theorem sigmaLift_eq_empty : sigmaLift f a b = ∅ ↔ ∀ h : a.1 = b.1, f (h.rec a.2) b.2 = ∅ :=
by
@@ -306,7 +306,7 @@ variable (f a b)
lean 3 declaration is
forall {ι : Type.{u1}} {α : ι -> Type.{u2}} {β : ι -> Type.{u3}} {γ : ι -> Type.{u4}} [_inst_1 : DecidableEq.{succ u1} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u4} (γ i))) (a : Sigma.{u1, u2} ι (fun (i : ι) => α i)) (b : Sigma.{u1, u3} ι (fun (i : ι) => β i)), Eq.{1} Nat (Finset.card.{max u1 u4} (Sigma.{u1, u4} ι (fun (i : ι) => γ i)) (Finset.sigmaLift.{u1, u2, u3, u4} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)) (dite.{1} Nat (Eq.{succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)) (_inst_1 (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)) (fun (h : Eq.{succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)) => Finset.card.{u4} (γ (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b)) (f (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b) (Eq.ndrec.{succ u2, succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) α (Sigma.snd.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b) h) (Sigma.snd.{u1, u3} ι (fun (i : ι) => β i) b))) (fun (_x : Not (Eq.{succ u1} ι (Sigma.fst.{u1, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u1, u3} ι (fun (i : ι) => β i) b))) => OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))))
but is expected to have type
- forall {ι : Type.{u4}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u3}} [_inst_1 : DecidableEq.{succ u4} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u3} (γ i))) (a : Sigma.{u4, u2} ι (fun (i : ι) => α i)) (b : Sigma.{u4, u1} ι (fun (i : ι) => β i)), Eq.{1} Nat (Finset.card.{max u4 u3} (Sigma.{u4, u3} ι (fun (i : ι) => γ i)) (Finset.sigmaLift.{u4, u2, u1, u3} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)) (dite.{1} Nat (Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (_inst_1 (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (fun (h : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) => Finset.card.{u3} (γ (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (f (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) (Eq.rec.{succ u2, succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (fun (x._@.Mathlib.Data.Finset.Sigma._hyg.2367 : ι) (h._@.Mathlib.Data.Finset.Sigma._hyg.2368 : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) x._@.Mathlib.Data.Finset.Sigma._hyg.2367) => α x._@.Mathlib.Data.Finset.Sigma._hyg.2367) (Sigma.snd.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) h) (Sigma.snd.{u4, u1} ι (fun (i : ι) => β i) b))) (fun (_x : Not (Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b))) => OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)))
+ forall {ι : Type.{u4}} {α : ι -> Type.{u2}} {β : ι -> Type.{u1}} {γ : ι -> Type.{u3}} [_inst_1 : DecidableEq.{succ u4} ι] (f : forall {{i : ι}}, (α i) -> (β i) -> (Finset.{u3} (γ i))) (a : Sigma.{u4, u2} ι (fun (i : ι) => α i)) (b : Sigma.{u4, u1} ι (fun (i : ι) => β i)), Eq.{1} Nat (Finset.card.{max u4 u3} (Sigma.{u4, u3} ι (fun (i : ι) => γ i)) (Finset.sigmaLift.{u4, u2, u1, u3} ι (fun (i : ι) => α i) (fun (i : ι) => β i) (fun (i : ι) => γ i) (fun (a : ι) (b : ι) => _inst_1 a b) f a b)) (dite.{1} Nat (Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (_inst_1 (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (fun (h : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) => Finset.card.{u3} (γ (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b)) (f (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) (Eq.rec.{succ u2, succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (fun (x._@.Mathlib.Data.Finset.Sigma._hyg.2353 : ι) (h._@.Mathlib.Data.Finset.Sigma._hyg.2354 : Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) x._@.Mathlib.Data.Finset.Sigma._hyg.2353) => α x._@.Mathlib.Data.Finset.Sigma._hyg.2353) (Sigma.snd.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b) h) (Sigma.snd.{u4, u1} ι (fun (i : ι) => β i) b))) (fun (_x : Not (Eq.{succ u4} ι (Sigma.fst.{u4, u2} ι (fun (i : ι) => α i) a) (Sigma.fst.{u4, u1} ι (fun (i : ι) => β i) b))) => OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)))
Case conversion may be inaccurate. Consider using '#align finset.card_sigma_lift Finset.card_sigmaLiftₓ'. -/
theorem card_sigmaLift :
(sigmaLift f a b).card = dite (a.1 = b.1) (fun h => (f (h.rec a.2) b.2).card) fun _ => 0 :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -56,7 +56,7 @@ theorem coe_sigma (s : Finset ι) (t : ∀ i, Finset (α i)) :
Set.ext fun _ => mem_sigma
#align finset.coe_sigma Finset.coe_sigma
-@[simp, aesop safe apply (rule_sets [finsetNonempty])]
+@[simp, aesop safe apply (rule_sets := [finsetNonempty])]
theorem sigma_nonempty : (s.sigma t).Nonempty ↔ ∃ i ∈ s, (t i).Nonempty := by simp [Finset.Nonempty]
#align finset.sigma_nonempty Finset.sigma_nonempty
Finset.sum
(#10538)
Also define a new aesop
rule-set and an auxiliary metaprogram proveFinsetNonempty
for dealing with Finset.Nonempty
conditions.
From LeanAPAP
Co-authored-by: Alex J. Best <alex.j.best@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Alex J Best <alex.j.best@gmail.com>
@@ -56,7 +56,7 @@ theorem coe_sigma (s : Finset ι) (t : ∀ i, Finset (α i)) :
Set.ext fun _ => mem_sigma
#align finset.coe_sigma Finset.coe_sigma
-@[simp]
+@[simp, aesop safe apply (rule_sets [finsetNonempty])]
theorem sigma_nonempty : (s.sigma t).Nonempty ↔ ∃ i ∈ s, (t i).Nonempty := by simp [Finset.Nonempty]
#align finset.sigma_nonempty Finset.sigma_nonempty
@@ -109,6 +109,38 @@ theorem inf_sigma [SemilatticeInf β] [OrderTop β] :
@sup_sigma _ _ βᵒᵈ _ _ _ _ _
#align finset.inf_sigma Finset.inf_sigma
+theorem _root_.biSup_finsetSigma [CompleteLattice β] (s : Finset ι) (t : ∀ i, Finset (α i))
+ (f : Sigma α → β) : ⨆ ij ∈ s.sigma t, f ij = ⨆ (i ∈ s) (j ∈ t i), f ⟨i, j⟩ :=
+ by simp_rw [← Finset.iSup_coe, Finset.coe_sigma, biSup_sigma]
+
+theorem _root_.biSup_finsetSigma' [CompleteLattice β] (s : Finset ι) (t : ∀ i, Finset (α i))
+ (f : ∀ i, α i → β) : ⨆ (i ∈ s) (j ∈ t i), f i j = ⨆ ij ∈ s.sigma t, f ij.fst ij.snd :=
+ Eq.symm (biSup_finsetSigma _ _ _)
+
+theorem _root_.biInf_finsetSigma [CompleteLattice β] (s : Finset ι) (t : ∀ i, Finset (α i))
+ (f : Sigma α → β) : ⨅ ij ∈ s.sigma t, f ij = ⨅ (i ∈ s) (j ∈ t i), f ⟨i, j⟩ :=
+ biSup_finsetSigma (β := βᵒᵈ) _ _ _
+
+theorem _root_.biInf_finsetSigma' [CompleteLattice β] (s : Finset ι) (t : ∀ i, Finset (α i))
+ (f : ∀ i, α i → β) : ⨅ (i ∈ s) (j ∈ t i), f i j = ⨅ ij ∈ s.sigma t, f ij.fst ij.snd :=
+ Eq.symm (biInf_finsetSigma _ _ _)
+
+theorem _root_.Set.biUnion_finsetSigma (s : Finset ι) (t : ∀ i, Finset (α i))
+ (f : Sigma α → Set β) : ⋃ ij ∈ s.sigma t, f ij = ⋃ i ∈ s, ⋃ j ∈ t i, f ⟨i, j⟩ :=
+ biSup_finsetSigma _ _ _
+
+theorem _root_.Set.biUnion_finsetSigma' (s : Finset ι) (t : ∀ i, Finset (α i))
+ (f : ∀ i, α i → Set β) : ⋃ i ∈ s, ⋃ j ∈ t i, f i j = ⋃ ij ∈ s.sigma t, f ij.fst ij.snd :=
+ biSup_finsetSigma' _ _ _
+
+theorem _root_.Set.biInter_finsetSigma (s : Finset ι) (t : ∀ i, Finset (α i))
+ (f : Sigma α → Set β) : ⋂ ij ∈ s.sigma t, f ij = ⋂ i ∈ s, ⋂ j ∈ t i, f ⟨i, j⟩ :=
+ biInf_finsetSigma _ _ _
+
+theorem _root_.Set.biInter_finsetSigma' (s : Finset ι) (t : ∀ i, Finset (α i))
+ (f : ∀ i, α i → Set β) : ⋂ i ∈ s, ⋂ j ∈ t i, f i j = ⋂ ij ∈ s.sigma t, f ij.1 ij.2 :=
+ biInf_finsetSigma' _ _ _
+
end Sigma
section SigmaLift
Set.Sigma
to Set.sigma
(#8927)
This was a misport.
Also adds missing whitespace after some Σ
s while we're here, and some other arbitrary lime re-wrappings.
@@ -52,7 +52,7 @@ theorem mem_sigma {a : Σi, α i} : a ∈ s.sigma t ↔ a.1 ∈ s ∧ a.2 ∈ t
@[simp, norm_cast]
theorem coe_sigma (s : Finset ι) (t : ∀ i, Finset (α i)) :
- (s.sigma t : Set (Σi, α i)) = (s : Set ι).Sigma fun i => (t i : Set (α i)) :=
+ (s.sigma t : Set (Σ i, α i)) = (s : Set ι).sigma fun i ↦ (t i : Set (α i)) :=
Set.ext fun _ => mem_sigma
#align finset.coe_sigma Finset.coe_sigma
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -30,13 +30,13 @@ is computable and universe-polymorphic.
open Function Multiset
-variable {ι : Type _}
+variable {ι : Type*}
namespace Finset
section Sigma
-variable {α : ι → Type _} {β : Type _} (s s₁ s₂ : Finset ι) (t t₁ t₂ : ∀ i, Finset (α i))
+variable {α : ι → Type*} {β : Type*} (s s₁ s₂ : Finset ι) (t t₁ t₂ : ∀ i, Finset (α i))
/-- `s.sigma t` is the finset of dependent pairs `⟨i, a⟩` such that `i ∈ s` and `a ∈ t i`. -/
protected def sigma : Finset (Σi, α i) :=
@@ -113,7 +113,7 @@ end Sigma
section SigmaLift
-variable {α β γ : ι → Type _} [DecidableEq ι]
+variable {α β γ : ι → Type*} [DecidableEq ι]
/-- Lifts maps `α i → β i → Finset (γ i)` to a map `Σ i, α i → Σ i, β i → Finset (Σ i, γ i)`. -/
def sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α) (b : Sigma β) :
@@ -2,15 +2,12 @@
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, Yaël Dillies, Bhavik Mehta
-
-! This file was ported from Lean 3 source module data.finset.sigma
-! leanprover-community/mathlib commit 9003f28797c0664a49e4179487267c494477d853
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Finset.Lattice
import Mathlib.Data.Set.Sigma
+#align_import data.finset.sigma from "leanprover-community/mathlib"@"9003f28797c0664a49e4179487267c494477d853"
+
/-!
# Finite sets in a sigma type
This PR is the result of running
find . -type f -name "*.lean" -exec sed -i -E 's/^( +)\. /\1· /' {} \;
find . -type f -name "*.lean" -exec sed -i -E 'N;s/^( +·)\n +(.*)$/\1 \2/;P;D' {} \;
which firstly replaces .
focusing dots with ·
and secondly removes isolated instances of such dots, unifying them with the following line. A new rule is placed in the style linter to verify this.
@@ -175,8 +175,8 @@ theorem sigmaLift_nonempty :
theorem sigmaLift_eq_empty : sigmaLift f a b = ∅ ↔ ∀ h : a.1 = b.1, f (h ▸ a.2) b.2 = ∅ := by
simp_rw [sigmaLift]
split_ifs with h
- . simp [h, forall_prop_of_true h]
- . simp [h, forall_prop_of_false h]
+ · simp [h, forall_prop_of_true h]
+ · simp [h, forall_prop_of_false h]
#align finset.sigma_lift_eq_empty Finset.sigmaLift_eq_empty
theorem sigmaLift_mono (h : ∀ ⦃i⦄ ⦃a : α i⦄ ⦃b : β i⦄, f a b ⊆ g a b) (a : Σi, α i) (b : Σi, β i) :
at
and goals (#5387)
Changes are of the form
some_tactic at h⊢
-> some_tactic at h ⊢
some_tactic at h
-> some_tactic at h
@@ -182,7 +182,7 @@ theorem sigmaLift_eq_empty : sigmaLift f a b = ∅ ↔ ∀ h : a.1 = b.1, f (h
theorem sigmaLift_mono (h : ∀ ⦃i⦄ ⦃a : α i⦄ ⦃b : β i⦄, f a b ⊆ g a b) (a : Σi, α i) (b : Σi, β i) :
sigmaLift f a b ⊆ sigmaLift g a b := by
rintro x hx
- rw [mem_sigmaLift] at hx⊢
+ rw [mem_sigmaLift] at hx ⊢
obtain ⟨ha, hb, hx⟩ := hx
exact ⟨ha, hb, h hx⟩
#align finset.sigma_lift_mono Finset.sigmaLift_mono
@@ -126,7 +126,7 @@ def sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α)
theorem mem_sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α) (b : Sigma β)
(x : Sigma γ) :
- x ∈ sigmaLift f a b ↔ ∃ (ha : a.1 = x.1)(hb : b.1 = x.1), x.2 ∈ f (ha ▸ a.2) (hb ▸ b.2) := by
+ x ∈ sigmaLift f a b ↔ ∃ (ha : a.1 = x.1) (hb : b.1 = x.1), x.2 ∈ f (ha ▸ a.2) (hb ▸ b.2) := by
obtain ⟨⟨i, a⟩, j, b⟩ := a, b
obtain rfl | h := Decidable.eq_or_ne i j
· constructor
sSup
/iSup
(#3938)
As discussed on Zulip
supₛ
→ sSup
infₛ
→ sInf
supᵢ
→ iSup
infᵢ
→ iInf
bsupₛ
→ bsSup
binfₛ
→ bsInf
bsupᵢ
→ biSup
binfᵢ
→ biInf
csupₛ
→ csSup
cinfₛ
→ csInf
csupᵢ
→ ciSup
cinfᵢ
→ ciInf
unionₛ
→ sUnion
interₛ
→ sInter
unionᵢ
→ iUnion
interᵢ
→ iInter
bunionₛ
→ bsUnion
binterₛ
→ bsInter
bunionᵢ
→ biUnion
binterᵢ
→ biInter
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
@@ -85,17 +85,17 @@ theorem pairwiseDisjoint_map_sigmaMk :
#align finset.pairwise_disjoint_map_sigma_mk Finset.pairwiseDisjoint_map_sigmaMk
@[simp]
-theorem disjUnionᵢ_map_sigma_mk :
- s.disjUnionᵢ (fun i => (t i).map (Embedding.sigmaMk i)) pairwiseDisjoint_map_sigmaMk =
+theorem disjiUnion_map_sigma_mk :
+ s.disjiUnion (fun i => (t i).map (Embedding.sigmaMk i)) pairwiseDisjoint_map_sigmaMk =
s.sigma t :=
rfl
-#align finset.disj_Union_map_sigma_mk Finset.disjUnionᵢ_map_sigma_mk
+#align finset.disj_Union_map_sigma_mk Finset.disjiUnion_map_sigma_mk
-theorem sigma_eq_bunionᵢ [DecidableEq (Σi, α i)] (s : Finset ι) (t : ∀ i, Finset (α i)) :
- s.sigma t = s.bunionᵢ fun i => (t i).map <| Embedding.sigmaMk i := by
+theorem sigma_eq_biUnion [DecidableEq (Σi, α i)] (s : Finset ι) (t : ∀ i, Finset (α i)) :
+ s.sigma t = s.biUnion fun i => (t i).map <| Embedding.sigmaMk i := by
ext ⟨x, y⟩
simp [and_left_comm]
-#align finset.sigma_eq_bUnion Finset.sigma_eq_bunionᵢ
+#align finset.sigma_eq_bUnion Finset.sigma_eq_biUnion
variable (s t) (f : (Σi, α i) → β)
by
s! (#3825)
This PR puts, with one exception, every single remaining by
that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh
. The exception is when the by
begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.
Essentially this is s/\n *by$/ by/g
, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated by
s".
@@ -100,8 +100,7 @@ theorem sigma_eq_bunionᵢ [DecidableEq (Σi, α i)] (s : Finset ι) (t : ∀ i,
variable (s t) (f : (Σi, α i) → β)
theorem sup_sigma [SemilatticeSup β] [OrderBot β] :
- (s.sigma t).sup f = s.sup fun i => (t i).sup fun b => f ⟨i, b⟩ :=
- by
+ (s.sigma t).sup f = s.sup fun i => (t i).sup fun b => f ⟨i, b⟩ := by
simp only [le_antisymm_iff, Finset.sup_le_iff, mem_sigma, and_imp, Sigma.forall]
exact
⟨fun i a hi ha => (le_sup hi).trans' <| le_sup (f := fun a => f ⟨i, a⟩) ha, fun i hi a ha =>
@@ -127,8 +126,7 @@ def sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α)
theorem mem_sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α) (b : Sigma β)
(x : Sigma γ) :
- x ∈ sigmaLift f a b ↔ ∃ (ha : a.1 = x.1)(hb : b.1 = x.1), x.2 ∈ f (ha ▸ a.2) (hb ▸ b.2) :=
- by
+ x ∈ sigmaLift f a b ↔ ∃ (ha : a.1 = x.1)(hb : b.1 = x.1), x.2 ∈ f (ha ▸ a.2) (hb ▸ b.2) := by
obtain ⟨⟨i, a⟩, j, b⟩ := a, b
obtain rfl | h := Decidable.eq_or_ne i j
· constructor
@@ -147,8 +145,7 @@ theorem mem_sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Si
#align finset.mem_sigma_lift Finset.mem_sigmaLift
theorem mk_mem_sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (i : ι) (a : α i) (b : β i)
- (x : γ i) : (⟨i, x⟩ : Sigma γ) ∈ sigmaLift f ⟨i, a⟩ ⟨i, b⟩ ↔ x ∈ f a b :=
- by
+ (x : γ i) : (⟨i, x⟩ : Sigma γ) ∈ sigmaLift f ⟨i, a⟩ ⟨i, b⟩ ↔ x ∈ f a b := by
rw [sigmaLift, dif_pos rfl, mem_map]
refine' ⟨_, fun hx => ⟨_, hx, rfl⟩⟩
rintro ⟨x, hx, _, rfl⟩
closes #3680, see https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Stepping.20through.20simp_rw/near/326712986
@@ -132,7 +132,7 @@ theorem mem_sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Si
obtain ⟨⟨i, a⟩, j, b⟩ := a, b
obtain rfl | h := Decidable.eq_or_ne i j
· constructor
- · simp_rw [sigmaLift, dif_pos rfl, mem_map, Embedding.sigmaMk_apply]
+ · simp_rw [sigmaLift]
simp only [dite_eq_ite, ite_true, mem_map, Embedding.sigmaMk_apply, forall_exists_index,
and_imp]
rintro x hx rfl
@@ -176,7 +176,7 @@ theorem sigmaLift_nonempty :
#align finset.sigma_lift_nonempty Finset.sigmaLift_nonempty
theorem sigmaLift_eq_empty : sigmaLift f a b = ∅ ↔ ∀ h : a.1 = b.1, f (h ▸ a.2) b.2 = ∅ := by
- simp_rw [nonempty_iff_ne_empty, sigmaLift]
+ simp_rw [sigmaLift]
split_ifs with h
. simp [h, forall_prop_of_true h]
. simp [h, forall_prop_of_false h]
@@ -194,7 +194,7 @@ variable (f a b)
theorem card_sigmaLift :
(sigmaLift f a b).card = dite (a.1 = b.1) (fun h => (f (h ▸ a.2) b.2).card) fun _ => 0 := by
- simp_rw [nonempty_iff_ne_empty, sigmaLift]
+ simp_rw [sigmaLift]
split_ifs with h <;> simp [h]
#align finset.card_sigma_lift Finset.card_sigmaLift
This is an extremely partial port of the mono*
tactic from Lean 3, implemented as a macro on top of solve_by_elim
. The original mono
had many configuration options and no documentation, so quite a bit is missing (and almost all the Lean 3 tests fail). Nonetheless I think it's worth merging this, because
@[mono]
mono
will succeed fairly often in the port even though it fails nearly all the testsCo-authored-by: thorimur <68410468+thorimur@users.noreply.github.com>
@@ -68,7 +68,7 @@ theorem sigma_eq_empty : s.sigma t = ∅ ↔ ∀ i ∈ s, t i = ∅ := by
simp only [← not_nonempty_iff_eq_empty, sigma_nonempty, not_exists, not_and]
#align finset.sigma_eq_empty Finset.sigma_eq_empty
---@[mono] Porting note: not implemented yet
+@[mono]
theorem sigma_mono (hs : s₁ ⊆ s₂) (ht : ∀ i, t₁ i ⊆ t₂ i) : s₁.sigma t₁ ⊆ s₂.sigma t₂ :=
fun ⟨i, _⟩ h =>
let ⟨hi, ha⟩ := mem_sigma.1 h
@@ -20,8 +20,8 @@ This file defines a few `Finset` constructions on `Σ i, α i`.
* `Finset.sigma`: Given a finset `s` in `ι` and finsets `t i` in each `α i`, `s.sigma t` is the
finset of the dependent sum `Σ i, α i`
-* `Finset.sigmaLift`: Lifts maps `α i → β i → finset (γ i)` to a map
- `Σ i, α i → Σ i, β i → finset (Σ i, γ i)`.
+* `Finset.sigmaLift`: Lifts maps `α i → β i → Finset (γ i)` to a map
+ `Σ i, α i → Σ i, β i → Finset (Σ i, γ i)`.
## TODO
@@ -119,7 +119,7 @@ section SigmaLift
variable {α β γ : ι → Type _} [DecidableEq ι]
-/-- Lifts maps `α i → β i → finset (γ i)` to a map `Σ i, α i → Σ i, β i → finset (Σ i, γ i)`. -/
+/-- Lifts maps `α i → β i → Finset (γ i)` to a map `Σ i, α i → Σ i, β i → Finset (Σ i, γ i)`. -/
def sigmaLift (f : ∀ ⦃i⦄, α i → β i → Finset (γ i)) (a : Sigma α) (b : Sigma β) :
Finset (Sigma γ) :=
dite (a.1 = b.1) (fun h => (f (h ▸ a.2) b.2).map <| Embedding.sigmaMk _) fun _ => ∅
The unported dependencies are