data.finset.pi
⟷
Mathlib.Data.Finset.Pi
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)
(last sync)
multiset.pi_cons_injective
is about multiset.pi.cons
so should have a .
in its name.multiset.pi.cons_ext
is not an ext lemma, but more closely resembles eta-reduction.This also groups together the lemmas about pi.cons
.
@@ -58,10 +58,10 @@ lemma pi.cons_ne {s : finset α} {a a' : α} {b : δ a} {f : Πa, a ∈ s → δ
pi.cons s a b f a' h = f a' ((mem_insert.1 h).resolve_left ha.symm) :=
multiset.pi.cons_ne _ _
-lemma pi_cons_injective {a : α} {b : δ a} {s : finset α} (hs : a ∉ s) :
+lemma pi.cons_injective {a : α} {b : δ a} {s : finset α} (hs : a ∉ s) :
function.injective (pi.cons s a b) :=
assume e₁ e₂ eq,
-@multiset.pi_cons_injective α _ δ a b s.1 hs _ _ $
+@multiset.pi.cons_injective α _ δ a b s.1 hs _ _ $
funext $ assume e, funext $ assume h,
have pi.cons s a b e₁ e (by simpa only [multiset.mem_cons, mem_insert] using h) =
pi.cons s a b e₂ e (by simpa only [multiset.mem_cons, mem_insert] using h),
@@ -84,7 +84,7 @@ begin
subst s', rw pi_cons,
congr, funext b,
refine ((pi s t).nodup.map _).dedup.symm,
- exact multiset.pi_cons_injective ha,
+ exact multiset.pi.cons_injective ha,
end
lemma pi_singletons {β : Type*} (s : finset α) (f : α → β) :
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
Type
to Sort
(#18429)
Everything in this file about multiset.pi.cons
generalizes to Sort
.
The parts of the file which don't generalize now use β
instead.
This is motivated by #18417, though I do not know if supporting Sort
is actually important there.
Forward-ported as https://github.com/leanprover-community/mathlib4/pull/2220
@@ -25,18 +25,18 @@ satisfied. -/
def pi.empty (β : α → Sort*) (a : α) (h : a ∈ (∅ : finset α)) : β a :=
multiset.pi.empty β a h
-variables {δ : α → Type*} [decidable_eq α]
+variables {β : α → Type*} {δ : α → Sort*} [decidable_eq α]
/-- Given a finset `s` of `α` and for all `a : α` a finset `t a` of `δ a`, then one can define the
finset `s.pi t` of all functions defined on elements of `s` taking values in `t a` for `a ∈ s`.
Note that the elements of `s.pi t` are only partially defined, on `s`. -/
-def pi (s : finset α) (t : Πa, finset (δ a)) : finset (Πa∈s, δ a) :=
+def pi (s : finset α) (t : Πa, finset (β a)) : finset (Πa∈s, β a) :=
⟨s.1.pi (λ a, (t a).1), s.nodup.pi $ λ a _, (t a).nodup⟩
-@[simp] lemma pi_val (s : finset α) (t : Πa, finset (δ a)) :
+@[simp] lemma pi_val (s : finset α) (t : Πa, finset (β a)) :
(s.pi t).1 = s.1.pi (λ a, (t a).1) := rfl
-@[simp] lemma mem_pi {s : finset α} {t : Πa, finset (δ a)} {f : Πa∈s, δ a} :
+@[simp] lemma mem_pi {s : finset α} {t : Πa, finset (β a)} {f : Πa∈s, β a} :
f ∈ s.pi t ↔ (∀a (h : a ∈ s), f a h ∈ t a) :=
mem_pi _ _ _
@@ -68,11 +68,11 @@ assume e₁ e₂ eq,
{ rw [eq] },
this
-@[simp] lemma pi_empty {t : Πa:α, finset (δ a)} :
- pi (∅ : finset α) t = singleton (pi.empty δ) := rfl
+@[simp] lemma pi_empty {t : Πa:α, finset (β a)} :
+ pi (∅ : finset α) t = singleton (pi.empty β) := rfl
-@[simp] lemma pi_insert [∀a, decidable_eq (δ a)]
- {s : finset α} {t : Πa:α, finset (δ a)} {a : α} (ha : a ∉ s) :
+@[simp] lemma pi_insert [∀a, decidable_eq (β a)]
+ {s : finset α} {t : Πa:α, finset (β a)} {a : α} (ha : a ∉ s) :
pi (insert a s) t = (t a).bUnion (λb, (pi s t).image (pi.cons s a b)) :=
begin
apply eq_of_veq,
@@ -83,7 +83,8 @@ begin
λ f a' h', multiset.pi.cons s.1 a b f a' (h ▸ h')))) _ (insert_val_of_not_mem ha),
subst s', rw pi_cons,
congr, funext b,
- exact ((pi s t).nodup.map $ multiset.pi_cons_injective ha).dedup.symm,
+ refine ((pi s t).nodup.map _).dedup.symm,
+ exact multiset.pi_cons_injective ha,
end
lemma pi_singletons {β : Type*} (s : finset α) (f : α → β) :
@@ -102,7 +103,7 @@ lemma pi_const_singleton {β : Type*} (s : finset α) (i : β) :
s.pi (λ _, ({i} : finset β)) = {λ _ _, i} :=
pi_singletons s (λ _, i)
-lemma pi_subset {s : finset α} (t₁ t₂ : Πa, finset (δ a)) (h : ∀ a ∈ s, t₁ a ⊆ t₂ a) :
+lemma pi_subset {s : finset α} (t₁ t₂ : Πa, finset (β a)) (h : ∀ a ∈ s, t₁ a ⊆ t₂ a) :
s.pi t₁ ⊆ s.pi t₂ :=
λ g hg, mem_pi.2 $ λ a ha, h a ha (mem_pi.mp hg a ha)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(first ported)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -141,7 +141,7 @@ theorem pi_singletons {β : Type _} (s : Finset α) (f : α → β) :
· simp
intro a ha
ext i hi
- rw [mem_pi] at ha
+ rw [mem_pi] at ha
simpa using ha i hi
#align finset.pi_singletons Finset.pi_singletons
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2018 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
-/
-import Mathbin.Data.Finset.Image
-import Mathbin.Data.Multiset.Pi
+import Data.Finset.Image
+import Data.Multiset.Pi
#align_import data.finset.pi from "leanprover-community/mathlib"@"b2c89893177f66a48daf993b7ba5ef7cddeff8c9"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2018 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
-
-! This file was ported from Lean 3 source module data.finset.pi
-! leanprover-community/mathlib commit b2c89893177f66a48daf993b7ba5ef7cddeff8c9
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Finset.Image
import Mathbin.Data.Multiset.Pi
+#align_import data.finset.pi from "leanprover-community/mathlib"@"b2c89893177f66a48daf993b7ba5ef7cddeff8c9"
+
/-!
# The cartesian product of finsets
mathlib commit https://github.com/leanprover-community/mathlib/commit/2a0ce625dbb0ffbc7d1316597de0b25c1ec75303
@@ -143,7 +143,7 @@ theorem pi_singletons {β : Type _} (s : Finset α) (f : α → β) :
constructor
· simp
intro a ha
- ext (i hi)
+ ext i hi
rw [mem_pi] at ha
simpa using ha i hi
#align finset.pi_singletons Finset.pi_singletons
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -40,24 +40,31 @@ def Pi.empty (β : α → Sort _) (a : α) (h : a ∈ (∅ : Finset α)) : β a
variable {β : α → Type _} {δ : α → Sort _} [DecidableEq α]
+#print Finset.pi /-
/-- Given a finset `s` of `α` and for all `a : α` a finset `t a` of `δ a`, then one can define the
finset `s.pi t` of all functions defined on elements of `s` taking values in `t a` for `a ∈ s`.
Note that the elements of `s.pi t` are only partially defined, on `s`. -/
def pi (s : Finset α) (t : ∀ a, Finset (β a)) : Finset (∀ a ∈ s, β a) :=
⟨s.1.pi fun a => (t a).1, s.Nodup.pi fun a _ => (t a).Nodup⟩
#align finset.pi Finset.pi
+-/
+#print Finset.pi_val /-
@[simp]
theorem pi_val (s : Finset α) (t : ∀ a, Finset (β a)) : (s.pi t).1 = s.1.pi fun a => (t a).1 :=
rfl
#align finset.pi_val Finset.pi_val
+-/
+#print Finset.mem_pi /-
@[simp]
theorem mem_pi {s : Finset α} {t : ∀ a, Finset (β a)} {f : ∀ a ∈ s, β a} :
f ∈ s.pi t ↔ ∀ (a) (h : a ∈ s), f a h ∈ t a :=
mem_pi _ _ _
#align finset.mem_pi Finset.mem_pi
+-/
+#print Finset.Pi.cons /-
/-- Given a function `f` defined on a finset `s`, define a new function on the finset `s ∪ {a}`,
equal to `f` on `s` and sending `a` to a given value `b`. This function is denoted
`s.pi.cons a b f`. If `a` already belongs to `s`, the new function takes the value `b` at `a`
@@ -66,18 +73,24 @@ def Pi.cons (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (a
δ a' :=
Multiset.Pi.cons s.1 a b f _ (Multiset.mem_cons.2 <| mem_insert.symm.2 h)
#align finset.pi.cons Finset.Pi.cons
+-/
+#print Finset.Pi.cons_same /-
@[simp]
theorem Pi.cons_same (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (h : a ∈ insert a s) :
Pi.cons s a b f a h = b :=
Multiset.Pi.cons_same _
#align finset.pi.cons_same Finset.Pi.cons_same
+-/
+#print Finset.Pi.cons_ne /-
theorem Pi.cons_ne {s : Finset α} {a a' : α} {b : δ a} {f : ∀ a, a ∈ s → δ a} {h : a' ∈ insert a s}
(ha : a ≠ a') : Pi.cons s a b f a' h = f a' ((mem_insert.1 h).resolve_left ha.symm) :=
Multiset.Pi.cons_ne _ _
#align finset.pi.cons_ne Finset.Pi.cons_ne
+-/
+#print Finset.Pi.cons_injective /-
theorem Pi.cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
Function.Injective (Pi.cons s a b) := fun e₁ e₂ eq =>
@Multiset.Pi.cons_injective α _ δ a b s.1 hs _ _ <|
@@ -89,12 +102,16 @@ theorem Pi.cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
by rw [Eq]
this
#align finset.pi.cons_injective Finset.Pi.cons_injective
+-/
+#print Finset.pi_empty /-
@[simp]
theorem pi_empty {t : ∀ a : α, Finset (β a)} : pi (∅ : Finset α) t = singleton (Pi.empty β) :=
rfl
#align finset.pi_empty Finset.pi_empty
+-/
+#print Finset.pi_insert /-
@[simp]
theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, Finset (β a)} {a : α}
(ha : a ∉ s) : pi (insert a s) t = (t a).biUnion fun b => (pi s t).image (Pi.cons s a b) :=
@@ -116,7 +133,9 @@ theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, F
refine' ((pi s t).Nodup.map _).dedup.symm
exact Multiset.Pi.cons_injective ha
#align finset.pi_insert Finset.pi_insert
+-/
+#print Finset.pi_singletons /-
theorem pi_singletons {β : Type _} (s : Finset α) (f : α → β) :
(s.pi fun a => ({f a} : Finset β)) = {fun a _ => f a} :=
by
@@ -128,22 +147,29 @@ theorem pi_singletons {β : Type _} (s : Finset α) (f : α → β) :
rw [mem_pi] at ha
simpa using ha i hi
#align finset.pi_singletons Finset.pi_singletons
+-/
+#print Finset.pi_const_singleton /-
theorem pi_const_singleton {β : Type _} (s : Finset α) (i : β) :
(s.pi fun _ => ({i} : Finset β)) = {fun _ _ => i} :=
pi_singletons s fun _ => i
#align finset.pi_const_singleton Finset.pi_const_singleton
+-/
+#print Finset.pi_subset /-
theorem pi_subset {s : Finset α} (t₁ t₂ : ∀ a, Finset (β a)) (h : ∀ a ∈ s, t₁ a ⊆ t₂ a) :
s.pi t₁ ⊆ s.pi t₂ := fun g hg => mem_pi.2 fun a ha => h a ha (mem_pi.mp hg a ha)
#align finset.pi_subset Finset.pi_subset
+-/
+#print Finset.pi_disjoint_of_disjoint /-
theorem pi_disjoint_of_disjoint {δ : α → Type _} {s : Finset α} (t₁ t₂ : ∀ a, Finset (δ a)) {a : α}
(ha : a ∈ s) (h : Disjoint (t₁ a) (t₂ a)) : Disjoint (s.pi t₁) (s.pi t₂) :=
disjoint_iff_ne.2 fun f₁ hf₁ f₂ hf₂ eq₁₂ =>
disjoint_iff_ne.1 h (f₁ a ha) (mem_pi.mp hf₁ a ha) (f₂ a ha) (mem_pi.mp hf₂ a ha) <|
congr_fun (congr_fun eq₁₂ a) ha
#align finset.pi_disjoint_of_disjoint Finset.pi_disjoint_of_disjoint
+-/
end Pi
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -112,7 +112,7 @@ theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, F
Multiset.Pi.cons s.1 a b f a' (h ▸ h'))))
_ (insert_val_of_not_mem ha)
subst s'; rw [pi_cons]
- congr ; funext b
+ congr; funext b
refine' ((pi s t).Nodup.map _).dedup.symm
exact Multiset.Pi.cons_injective ha
#align finset.pi_insert Finset.pi_insert
@@ -125,7 +125,7 @@ theorem pi_singletons {β : Type _} (s : Finset α) (f : α → β) :
· simp
intro a ha
ext (i hi)
- rw [mem_pi] at ha
+ rw [mem_pi] at ha
simpa using ha i hi
#align finset.pi_singletons Finset.pi_singletons
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -40,12 +40,6 @@ def Pi.empty (β : α → Sort _) (a : α) (h : a ∈ (∅ : Finset α)) : β a
variable {β : α → Type _} {δ : α → Sort _} [DecidableEq α]
-/- warning: finset.pi -> Finset.pi is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α), (forall (a : α), Finset.{u2} (β a)) -> (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)))
-but is expected to have type
- forall {α : Type.{u2}} {β : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] (s : Finset.{u2} α), (forall (a : α), Finset.{u1} (β a)) -> (Finset.{max u1 u2} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a)))
-Case conversion may be inaccurate. Consider using '#align finset.pi Finset.piₓ'. -/
/-- Given a finset `s` of `α` and for all `a : α` a finset `t a` of `δ a`, then one can define the
finset `s.pi t` of all functions defined on elements of `s` taking values in `t a` for `a ∈ s`.
Note that the elements of `s.pi t` are only partially defined, on `s`. -/
@@ -53,35 +47,17 @@ def pi (s : Finset α) (t : ∀ a, Finset (β a)) : Finset (∀ a ∈ s, β a) :
⟨s.1.pi fun a => (t a).1, s.Nodup.pi fun a _ => (t a).Nodup⟩
#align finset.pi Finset.pi
-/- warning: finset.pi_val -> Finset.pi_val is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : forall (a : α), Finset.{u2} (β a)), Eq.{succ (max u1 u2)} (Multiset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a))) (Finset.val.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (Multiset.pi.{u1, u2} α (fun (a : α) (b : α) => _inst_1 a b) (fun (a : α) => β a) (Finset.val.{u1} α s) (fun (a : α) => Finset.val.{u2} (β a) (t a)))
-but is expected to have type
- forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : forall (a : α), Finset.{u2} (β a)), Eq.{max (succ u2) (succ u1)} (Multiset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a))) (Finset.val.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a)) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (Multiset.pi.{u2, u1} α (fun (a : α) (b : α) => _inst_1 a b) (fun (a : α) => β a) (Finset.val.{u1} α s) (fun (a : α) => Finset.val.{u2} (β a) (t a)))
-Case conversion may be inaccurate. Consider using '#align finset.pi_val Finset.pi_valₓ'. -/
@[simp]
theorem pi_val (s : Finset α) (t : ∀ a, Finset (β a)) : (s.pi t).1 = s.1.pi fun a => (t a).1 :=
rfl
#align finset.pi_val Finset.pi_val
-/- warning: finset.mem_pi -> Finset.mem_pi is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {f : forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)}, Iff (Membership.Mem.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)) (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a))) (Finset.hasMem.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a))) f (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (forall (a : α) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s), Membership.Mem.{u2, u2} (β a) (Finset.{u2} (β a)) (Finset.hasMem.{u2} (β a)) (f a h) (t a))
-but is expected to have type
- forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {f : forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a)}, Iff (Membership.mem.{max u2 u1, max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a)) (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a))) (Finset.instMembershipFinset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a))) f (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (forall (a : α) (h : Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s), Membership.mem.{u2, u2} (β a) (Finset.{u2} (β a)) (Finset.instMembershipFinset.{u2} (β a)) (f a h) (t a))
-Case conversion may be inaccurate. Consider using '#align finset.mem_pi Finset.mem_piₓ'. -/
@[simp]
theorem mem_pi {s : Finset α} {t : ∀ a, Finset (β a)} {f : ∀ a ∈ s, β a} :
f ∈ s.pi t ↔ ∀ (a) (h : a ∈ s), f a h ∈ t a :=
mem_pi _ _ _
#align finset.mem_pi Finset.mem_pi
-/- warning: finset.pi.cons -> Finset.Pi.cons is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (a : α), (δ a) -> (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) -> (forall (a' : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a'))
-but is expected to have type
- forall {α : Type.{u2}} {δ : α -> Sort.{u1}} [_inst_1 : DecidableEq.{succ u2} α] (s : Finset.{u2} α) (a : α), (δ a) -> (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a)) -> (forall (a' : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a'))
-Case conversion may be inaccurate. Consider using '#align finset.pi.cons Finset.Pi.consₓ'. -/
/-- Given a function `f` defined on a finset `s`, define a new function on the finset `s ∪ {a}`,
equal to `f` on `s` and sending `a` to a given value `b`. This function is denoted
`s.pi.cons a b f`. If `a` already belongs to `s`, the new function takes the value `b` at `a`
@@ -91,35 +67,17 @@ def Pi.cons (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (a
Multiset.Pi.cons s.1 a b f _ (Multiset.mem_cons.2 <| mem_insert.symm.2 h)
#align finset.pi.cons Finset.Pi.cons
-/- warning: finset.pi.cons_same -> Finset.Pi.cons_same is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (a : α) (b : δ a) (f : forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)), Eq.{u2} (δ a) (Finset.Pi.cons.{u1, u2} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b f a h) b
-but is expected to have type
- forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (a : α) (b : δ a) (f : forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a)) (h : Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)), Eq.{u2} (δ a) (Finset.Pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b f a h) b
-Case conversion may be inaccurate. Consider using '#align finset.pi.cons_same Finset.Pi.cons_sameₓ'. -/
@[simp]
theorem Pi.cons_same (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (h : a ∈ insert a s) :
Pi.cons s a b f a h = b :=
Multiset.Pi.cons_same _
#align finset.pi.cons_same Finset.Pi.cons_same
-/- warning: finset.pi.cons_ne -> Finset.Pi.cons_ne is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {a : α} {a' : α} {b : δ a} {f : forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)} {h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)} (ha : Ne.{succ u1} α a a'), Eq.{u2} (δ a') (Finset.Pi.cons.{u1, u2} α (fun {a : α} => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b f a' h) (f a' (Or.resolve_left (Eq.{succ u1} α a' a) (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' s) (Iff.mp (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) (Or (Eq.{succ u1} α a' a) (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' s)) (Finset.mem_insert.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s a' a) h) (Ne.symm.{succ u1} α a a' ha)))
-but is expected to have type
- forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {a : α} {a' : α} {b : δ a} {f : forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a)} {h : Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)} (ha : Ne.{succ u1} α a a'), Eq.{u2} (δ a') (Finset.Pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b f a' h) (f a' (Or.resolve_left (Eq.{succ u1} α a' a) (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a' s) (Iff.mp (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) (Or (Eq.{succ u1} α a' a) (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a' s)) (Finset.mem_insert.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s a' a) h) (Ne.symm.{succ u1} α a a' ha)))
-Case conversion may be inaccurate. Consider using '#align finset.pi.cons_ne Finset.Pi.cons_neₓ'. -/
theorem Pi.cons_ne {s : Finset α} {a a' : α} {b : δ a} {f : ∀ a, a ∈ s → δ a} {h : a' ∈ insert a s}
(ha : a ≠ a') : Pi.cons s a b f a' h = f a' ((mem_insert.1 h).resolve_left ha.symm) :=
Multiset.Pi.cons_ne _ _
#align finset.pi.cons_ne Finset.Pi.cons_ne
-/- warning: finset.pi.cons_injective -> Finset.Pi.cons_injective is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {a : α} {b : δ a} {s : Finset.{u1} α}, (Not (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s)) -> (Function.Injective.{imax (succ u1) u2, imax (succ u1) u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) (forall (a' : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a')) (Finset.Pi.cons.{u1, u2} α (fun {a : α} => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b))
-but is expected to have type
- forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {a : α} {b : δ a} {s : Finset.{u1} α}, (Not (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s)) -> (Function.Injective.{imax (succ u1) u2, imax (succ u1) u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a)) (forall (a' : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a')) (Finset.Pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b))
-Case conversion may be inaccurate. Consider using '#align finset.pi.cons_injective Finset.Pi.cons_injectiveₓ'. -/
theorem Pi.cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
Function.Injective (Pi.cons s a b) := fun e₁ e₂ eq =>
@Multiset.Pi.cons_injective α _ δ a b s.1 hs _ _ <|
@@ -132,23 +90,11 @@ theorem Pi.cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
this
#align finset.pi.cons_injective Finset.Pi.cons_injective
-/- warning: finset.pi_empty -> Finset.pi_empty is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {t : forall (a : α), Finset.{u2} (β a)}, Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.hasEmptyc.{u1} α))) -> (β a))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.hasEmptyc.{u1} α)) t) (Singleton.singleton.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.hasEmptyc.{u1} α))) -> (β a)) (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.hasEmptyc.{u1} α))) -> (β a))) (Finset.hasSingleton.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.hasEmptyc.{u1} α))) -> (β a))) (Finset.Pi.empty.{u1, succ u2} α β))
-but is expected to have type
- forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {t : forall (a : α), Finset.{u2} (β a)}, Eq.{max (succ u2) (succ u1)} (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a))) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α)) t) (Singleton.singleton.{max u2 u1, max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a)) (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a))) (Finset.instSingletonFinset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a))) (Finset.Pi.empty.{u1, succ u2} α β))
-Case conversion may be inaccurate. Consider using '#align finset.pi_empty Finset.pi_emptyₓ'. -/
@[simp]
theorem pi_empty {t : ∀ a : α, Finset (β a)} : pi (∅ : Finset α) t = singleton (Pi.empty β) :=
rfl
#align finset.pi_empty Finset.pi_empty
-/- warning: finset.pi_insert -> Finset.pi_insert is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : forall (a : α), DecidableEq.{succ u2} (β a)] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {a : α}, (Not (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s)) -> (Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) t) (Finset.biUnion.{u2, max u1 u2} (β a) (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a_1 b) (t a) (fun (b : β a) => Finset.image.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)) (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a_1 b) (Finset.Pi.cons.{u1, succ u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s a b) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t))))
-but is expected to have type
- forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : forall (a : α), DecidableEq.{succ u2} (β a)] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {a : α}, (Not (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s)) -> (Eq.{max (succ u2) (succ u1)} (Finset.{max u2 u1} (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1))) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) t) (Finset.biUnion.{u2, max u2 u1} (β a) (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) => (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a) a_1 b) (t a) (fun (b : β a) => Finset.image.{max u2 u1, max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a)) (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) => (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a) a_1 b) (Finset.Pi.cons.{succ u2, u1} α β (fun (a : α) (b : α) => _inst_1 a b) s a b) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t))))
-Case conversion may be inaccurate. Consider using '#align finset.pi_insert Finset.pi_insertₓ'. -/
@[simp]
theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, Finset (β a)} {a : α}
(ha : a ∉ s) : pi (insert a s) t = (t a).biUnion fun b => (pi s t).image (Pi.cons s a b) :=
@@ -171,12 +117,6 @@ theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, F
exact Multiset.Pi.cons_injective ha
#align finset.pi_insert Finset.pi_insert
-/- warning: finset.pi_singletons -> Finset.pi_singletons is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {β : Type.{u2}} (s : Finset.{u1} α) (f : α -> β), Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> β)) (Finset.pi.{u1, u2} α (fun (a : α) => β) (fun (a : α) (b : α) => _inst_1 a b) s (fun (a : α) => Singleton.singleton.{u2, u2} β (Finset.{u2} β) (Finset.hasSingleton.{u2} β) (f a))) (Singleton.singleton.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> β) (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> β)) (Finset.hasSingleton.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> β)) (fun (a : α) (_x : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) => f a))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {β : Type.{u2}} (s : Finset.{u1} α) (f : α -> β), Eq.{max (succ u1) (succ u2)} (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> β)) (Finset.pi.{u2, u1} α (fun (a : α) => β) (fun (a : α) (b : α) => _inst_1 a b) s (fun (a : α) => Singleton.singleton.{u2, u2} β (Finset.{u2} β) (Finset.instSingletonFinset.{u2} β) (f a))) (Singleton.singleton.{max u1 u2, max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> β) (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> β)) (Finset.instSingletonFinset.{max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> β)) (fun (a : α) (_x : Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) => f a))
-Case conversion may be inaccurate. Consider using '#align finset.pi_singletons Finset.pi_singletonsₓ'. -/
theorem pi_singletons {β : Type _} (s : Finset α) (f : α → β) :
(s.pi fun a => ({f a} : Finset β)) = {fun a _ => f a} :=
by
@@ -189,33 +129,15 @@ theorem pi_singletons {β : Type _} (s : Finset α) (f : α → β) :
simpa using ha i hi
#align finset.pi_singletons Finset.pi_singletons
-/- warning: finset.pi_const_singleton -> Finset.pi_const_singleton is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {β : Type.{u2}} (s : Finset.{u1} α) (i : β), Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> β)) (Finset.pi.{u1, u2} α (fun (_x : α) => β) (fun (a : α) (b : α) => _inst_1 a b) s (fun (_x : α) => Singleton.singleton.{u2, u2} β (Finset.{u2} β) (Finset.hasSingleton.{u2} β) i)) (Singleton.singleton.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> β) (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> β)) (Finset.hasSingleton.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> β)) (fun (_x : α) (_x : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) _x s) => i))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {β : Type.{u2}} (s : Finset.{u1} α) (i : β), Eq.{max (succ u1) (succ u2)} (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> β)) (Finset.pi.{u2, u1} α (fun (_x : α) => β) (fun (a : α) (b : α) => _inst_1 a b) s (fun (_x : α) => Singleton.singleton.{u2, u2} β (Finset.{u2} β) (Finset.instSingletonFinset.{u2} β) i)) (Singleton.singleton.{max u1 u2, max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> β) (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> β)) (Finset.instSingletonFinset.{max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> β)) (fun (_x : α) (_x : Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) _x s) => i))
-Case conversion may be inaccurate. Consider using '#align finset.pi_const_singleton Finset.pi_const_singletonₓ'. -/
theorem pi_const_singleton {β : Type _} (s : Finset α) (i : β) :
(s.pi fun _ => ({i} : Finset β)) = {fun _ _ => i} :=
pi_singletons s fun _ => i
#align finset.pi_const_singleton Finset.pi_const_singleton
-/- warning: finset.pi_subset -> Finset.pi_subset is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} (t₁ : forall (a : α), Finset.{u2} (β a)) (t₂ : forall (a : α), Finset.{u2} (β a)), (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (HasSubset.Subset.{u2} (Finset.{u2} (β a)) (Finset.hasSubset.{u2} (β a)) (t₁ a) (t₂ a))) -> (HasSubset.Subset.{max u1 u2} (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a))) (Finset.hasSubset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t₁) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t₂))
-but is expected to have type
- forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} (t₁ : forall (a : α), Finset.{u2} (β a)) (t₂ : forall (a : α), Finset.{u2} (β a)), (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (HasSubset.Subset.{u2} (Finset.{u2} (β a)) (Finset.instHasSubsetFinset.{u2} (β a)) (t₁ a) (t₂ a))) -> (HasSubset.Subset.{max u1 u2} (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a))) (Finset.instHasSubsetFinset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a))) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t₁) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t₂))
-Case conversion may be inaccurate. Consider using '#align finset.pi_subset Finset.pi_subsetₓ'. -/
theorem pi_subset {s : Finset α} (t₁ t₂ : ∀ a, Finset (β a)) (h : ∀ a ∈ s, t₁ a ⊆ t₂ a) :
s.pi t₁ ⊆ s.pi t₂ := fun g hg => mem_pi.2 fun a ha => h a ha (mem_pi.mp hg a ha)
#align finset.pi_subset Finset.pi_subset
-/- warning: finset.pi_disjoint_of_disjoint -> Finset.pi_disjoint_of_disjoint is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {δ : α -> Type.{u2}} {s : Finset.{u1} α} (t₁ : forall (a : α), Finset.{u2} (δ a)) (t₂ : forall (a : α), Finset.{u2} (δ a)) {a : α}, (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (Disjoint.{u2} (Finset.{u2} (δ a)) (Finset.partialOrder.{u2} (δ a)) (Finset.orderBot.{u2} (δ a)) (t₁ a) (t₂ a)) -> (Disjoint.{max u1 u2} (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a))) (Finset.partialOrder.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a))) (Finset.orderBot.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a))) (Finset.pi.{u1, u2} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t₁) (Finset.pi.{u1, u2} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t₂))
-but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {δ : α -> Type.{u2}} {s : Finset.{u1} α} (t₁ : forall (a : α), Finset.{u2} (δ a)) (t₂ : forall (a : α), Finset.{u2} (δ a)) {a : α}, (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (Disjoint.{u2} (Finset.{u2} (δ a)) (Finset.partialOrder.{u2} (δ a)) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u2} (δ a)) (t₁ a) (t₂ a)) -> (Disjoint.{max u1 u2} (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a))) (Finset.partialOrder.{max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a))) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a))) (Finset.pi.{u2, u1} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t₁) (Finset.pi.{u2, u1} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t₂))
-Case conversion may be inaccurate. Consider using '#align finset.pi_disjoint_of_disjoint Finset.pi_disjoint_of_disjointₓ'. -/
theorem pi_disjoint_of_disjoint {δ : α → Type _} {s : Finset α} (t₁ t₂ : ∀ a, Finset (δ a)) {a : α}
(ha : a ∈ s) (h : Disjoint (t₁ a) (t₂ a)) : Disjoint (s.pi t₁) (s.pi t₂) :=
disjoint_iff_ne.2 fun f₁ hf₁ f₂ hf₂ eq₁₂ =>
mathlib commit https://github.com/leanprover-community/mathlib/commit/75e7fca56381d056096ce5d05e938f63a6567828
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
! This file was ported from Lean 3 source module data.finset.pi
-! leanprover-community/mathlib commit 4c586d291f189eecb9d00581aeb3dd998ac34442
+! leanprover-community/mathlib commit b2c89893177f66a48daf993b7ba5ef7cddeff8c9
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -114,15 +114,15 @@ theorem Pi.cons_ne {s : Finset α} {a a' : α} {b : δ a} {f : ∀ a, a ∈ s
Multiset.Pi.cons_ne _ _
#align finset.pi.cons_ne Finset.Pi.cons_ne
-/- warning: finset.pi_cons_injective -> Finset.pi_cons_injective is a dubious translation:
+/- warning: finset.pi.cons_injective -> Finset.Pi.cons_injective is a dubious translation:
lean 3 declaration is
forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {a : α} {b : δ a} {s : Finset.{u1} α}, (Not (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s)) -> (Function.Injective.{imax (succ u1) u2, imax (succ u1) u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) (forall (a' : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a')) (Finset.Pi.cons.{u1, u2} α (fun {a : α} => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b))
but is expected to have type
forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {a : α} {b : δ a} {s : Finset.{u1} α}, (Not (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s)) -> (Function.Injective.{imax (succ u1) u2, imax (succ u1) u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a)) (forall (a' : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a')) (Finset.Pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b))
-Case conversion may be inaccurate. Consider using '#align finset.pi_cons_injective Finset.pi_cons_injectiveₓ'. -/
-theorem pi_cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
+Case conversion may be inaccurate. Consider using '#align finset.pi.cons_injective Finset.Pi.cons_injectiveₓ'. -/
+theorem Pi.cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
Function.Injective (Pi.cons s a b) := fun e₁ e₂ eq =>
- @Multiset.pi_cons_injective α _ δ a b s.1 hs _ _ <|
+ @Multiset.Pi.cons_injective α _ δ a b s.1 hs _ _ <|
funext fun e =>
funext fun h =>
have :
@@ -130,7 +130,7 @@ theorem pi_cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
Pi.cons s a b e₂ e (by simpa only [Multiset.mem_cons, mem_insert] using h) :=
by rw [Eq]
this
-#align finset.pi_cons_injective Finset.pi_cons_injective
+#align finset.pi.cons_injective Finset.Pi.cons_injective
/- warning: finset.pi_empty -> Finset.pi_empty is a dubious translation:
lean 3 declaration is
@@ -168,7 +168,7 @@ theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, F
subst s'; rw [pi_cons]
congr ; funext b
refine' ((pi s t).Nodup.map _).dedup.symm
- exact Multiset.pi_cons_injective ha
+ exact Multiset.Pi.cons_injective ha
#align finset.pi_insert Finset.pi_insert
/- warning: finset.pi_singletons -> Finset.pi_singletons is a dubious translation:
mathlib commit https://github.com/leanprover-community/mathlib/commit/e3fb84046afd187b710170887195d50bada934ee
@@ -145,13 +145,13 @@ theorem pi_empty {t : ∀ a : α, Finset (β a)} : pi (∅ : Finset α) t = sing
/- warning: finset.pi_insert -> Finset.pi_insert is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : forall (a : α), DecidableEq.{succ u2} (β a)] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {a : α}, (Not (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s)) -> (Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) t) (Finset.bunionᵢ.{u2, max u1 u2} (β a) (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a_1 b) (t a) (fun (b : β a) => Finset.image.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)) (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a_1 b) (Finset.Pi.cons.{u1, succ u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s a b) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t))))
+ forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : forall (a : α), DecidableEq.{succ u2} (β a)] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {a : α}, (Not (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s)) -> (Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) t) (Finset.biUnion.{u2, max u1 u2} (β a) (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a_1 b) (t a) (fun (b : β a) => Finset.image.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)) (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a_1 b) (Finset.Pi.cons.{u1, succ u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s a b) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t))))
but is expected to have type
- forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : forall (a : α), DecidableEq.{succ u2} (β a)] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {a : α}, (Not (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s)) -> (Eq.{max (succ u2) (succ u1)} (Finset.{max u2 u1} (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1))) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) t) (Finset.bunionᵢ.{u2, max u2 u1} (β a) (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) => (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a) a_1 b) (t a) (fun (b : β a) => Finset.image.{max u2 u1, max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a)) (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) => (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a) a_1 b) (Finset.Pi.cons.{succ u2, u1} α β (fun (a : α) (b : α) => _inst_1 a b) s a b) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t))))
+ forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : forall (a : α), DecidableEq.{succ u2} (β a)] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {a : α}, (Not (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s)) -> (Eq.{max (succ u2) (succ u1)} (Finset.{max u2 u1} (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1))) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) t) (Finset.biUnion.{u2, max u2 u1} (β a) (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) => (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a) a_1 b) (t a) (fun (b : β a) => Finset.image.{max u2 u1, max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a)) (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) => (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a) a_1 b) (Finset.Pi.cons.{succ u2, u1} α β (fun (a : α) (b : α) => _inst_1 a b) s a b) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t))))
Case conversion may be inaccurate. Consider using '#align finset.pi_insert Finset.pi_insertₓ'. -/
@[simp]
theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, Finset (β a)} {a : α}
- (ha : a ∉ s) : pi (insert a s) t = (t a).bunionᵢ fun b => (pi s t).image (Pi.cons s a b) :=
+ (ha : a ∉ s) : pi (insert a s) t = (t a).biUnion fun b => (pi s t).image (Pi.cons s a b) :=
by
apply eq_of_veq
rw [← (pi (insert a s) t).2.dedup]
mathlib commit https://github.com/leanprover-community/mathlib/commit/1f4705ccdfe1e557fc54a0ce081a05e33d2e6240
@@ -30,34 +30,34 @@ section Pi
variable {α : Type _}
-/- warning: finset.pi.empty -> Finset.Pi.empty is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} (β : α -> Sort.{u2}) (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.hasEmptyc.{u1} α))) -> (β a)
-but is expected to have type
- forall {α : Type.{u1}} (β : α -> Type.{u2}) (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a)
-Case conversion may be inaccurate. Consider using '#align finset.pi.empty Finset.Pi.emptyₓ'. -/
+#print Finset.Pi.empty /-
/-- The empty dependent product function, defined on the empty set. The assumption `a ∈ ∅` is never
satisfied. -/
def Pi.empty (β : α → Sort _) (a : α) (h : a ∈ (∅ : Finset α)) : β a :=
Multiset.Pi.empty β a h
#align finset.pi.empty Finset.Pi.empty
+-/
variable {β : α → Type _} {δ : α → Sort _} [DecidableEq α]
-#print Finset.pi /-
+/- warning: finset.pi -> Finset.pi is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α), (forall (a : α), Finset.{u2} (β a)) -> (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)))
+but is expected to have type
+ forall {α : Type.{u2}} {β : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] (s : Finset.{u2} α), (forall (a : α), Finset.{u1} (β a)) -> (Finset.{max u1 u2} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a)))
+Case conversion may be inaccurate. Consider using '#align finset.pi Finset.piₓ'. -/
/-- Given a finset `s` of `α` and for all `a : α` a finset `t a` of `δ a`, then one can define the
finset `s.pi t` of all functions defined on elements of `s` taking values in `t a` for `a ∈ s`.
Note that the elements of `s.pi t` are only partially defined, on `s`. -/
def pi (s : Finset α) (t : ∀ a, Finset (β a)) : Finset (∀ a ∈ s, β a) :=
⟨s.1.pi fun a => (t a).1, s.Nodup.pi fun a _ => (t a).Nodup⟩
#align finset.pi Finset.pi
--/
/- warning: finset.pi_val -> Finset.pi_val is a dubious translation:
lean 3 declaration is
forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : forall (a : α), Finset.{u2} (β a)), Eq.{succ (max u1 u2)} (Multiset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a))) (Finset.val.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (Multiset.pi.{u1, u2} α (fun (a : α) (b : α) => _inst_1 a b) (fun (a : α) => β a) (Finset.val.{u1} α s) (fun (a : α) => Finset.val.{u2} (β a) (t a)))
but is expected to have type
- forall {α : Type.{u2}} {β : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] (s : Finset.{u2} α) (t : forall (a : α), Finset.{u1} (β a)), Eq.{max (succ u2) (succ u1)} (Multiset.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a))) (Finset.val.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a)) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (Multiset.pi.{u2, u1} α (fun (a : α) (b : α) => _inst_1 a b) (fun (a : α) => β a) (Finset.val.{u2} α s) (fun (a : α) => Finset.val.{u1} (β a) (t a)))
+ forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : forall (a : α), Finset.{u2} (β a)), Eq.{max (succ u2) (succ u1)} (Multiset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a))) (Finset.val.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a)) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (Multiset.pi.{u2, u1} α (fun (a : α) (b : α) => _inst_1 a b) (fun (a : α) => β a) (Finset.val.{u1} α s) (fun (a : α) => Finset.val.{u2} (β a) (t a)))
Case conversion may be inaccurate. Consider using '#align finset.pi_val Finset.pi_valₓ'. -/
@[simp]
theorem pi_val (s : Finset α) (t : ∀ a, Finset (β a)) : (s.pi t).1 = s.1.pi fun a => (t a).1 :=
@@ -68,7 +68,7 @@ theorem pi_val (s : Finset α) (t : ∀ a, Finset (β a)) : (s.pi t).1 = s.1.pi
lean 3 declaration is
forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {f : forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)}, Iff (Membership.Mem.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)) (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a))) (Finset.hasMem.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a))) f (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (forall (a : α) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s), Membership.Mem.{u2, u2} (β a) (Finset.{u2} (β a)) (Finset.hasMem.{u2} (β a)) (f a h) (t a))
but is expected to have type
- forall {α : Type.{u2}} {β : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] {s : Finset.{u2} α} {t : forall (a : α), Finset.{u1} (β a)} {f : forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a)}, Iff (Membership.mem.{max u2 u1, max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a)) (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a))) (Finset.instMembershipFinset.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a))) f (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (forall (a : α) (h : Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s), Membership.mem.{u1, u1} (β a) (Finset.{u1} (β a)) (Finset.instMembershipFinset.{u1} (β a)) (f a h) (t a))
+ forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {f : forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a)}, Iff (Membership.mem.{max u2 u1, max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a)) (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a))) (Finset.instMembershipFinset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a))) f (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (forall (a : α) (h : Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s), Membership.mem.{u2, u2} (β a) (Finset.{u2} (β a)) (Finset.instMembershipFinset.{u2} (β a)) (f a h) (t a))
Case conversion may be inaccurate. Consider using '#align finset.mem_pi Finset.mem_piₓ'. -/
@[simp]
theorem mem_pi {s : Finset α} {t : ∀ a, Finset (β a)} {f : ∀ a ∈ s, β a} :
@@ -80,7 +80,7 @@ theorem mem_pi {s : Finset α} {t : ∀ a, Finset (β a)} {f : ∀ a ∈ s, β a
lean 3 declaration is
forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (a : α), (δ a) -> (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) -> (forall (a' : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a'))
but is expected to have type
- forall {α : Type.{u1}} {δ : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (a : α), (δ a) -> (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a)) -> (forall (a' : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a'))
+ forall {α : Type.{u2}} {δ : α -> Sort.{u1}} [_inst_1 : DecidableEq.{succ u2} α] (s : Finset.{u2} α) (a : α), (δ a) -> (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a)) -> (forall (a' : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a'))
Case conversion may be inaccurate. Consider using '#align finset.pi.cons Finset.Pi.consₓ'. -/
/-- Given a function `f` defined on a finset `s`, define a new function on the finset `s ∪ {a}`,
equal to `f` on `s` and sending `a` to a given value `b`. This function is denoted
@@ -95,7 +95,7 @@ def Pi.cons (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (a
lean 3 declaration is
forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (a : α) (b : δ a) (f : forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)), Eq.{u2} (δ a) (Finset.Pi.cons.{u1, u2} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b f a h) b
but is expected to have type
- forall {α : Type.{u2}} {δ : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] (s : Finset.{u2} α) (a : α) (b : δ a) (f : forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a)) (h : Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)), Eq.{succ u1} (δ a) (Finset.Pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b f a h) b
+ forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (a : α) (b : δ a) (f : forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a)) (h : Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)), Eq.{u2} (δ a) (Finset.Pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b f a h) b
Case conversion may be inaccurate. Consider using '#align finset.pi.cons_same Finset.Pi.cons_sameₓ'. -/
@[simp]
theorem Pi.cons_same (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (h : a ∈ insert a s) :
@@ -107,7 +107,7 @@ theorem Pi.cons_same (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s →
lean 3 declaration is
forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {a : α} {a' : α} {b : δ a} {f : forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)} {h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)} (ha : Ne.{succ u1} α a a'), Eq.{u2} (δ a') (Finset.Pi.cons.{u1, u2} α (fun {a : α} => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b f a' h) (f a' (Or.resolve_left (Eq.{succ u1} α a' a) (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' s) (Iff.mp (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) (Or (Eq.{succ u1} α a' a) (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' s)) (Finset.mem_insert.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s a' a) h) (Ne.symm.{succ u1} α a a' ha)))
but is expected to have type
- forall {α : Type.{u2}} {δ : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] {s : Finset.{u2} α} {a : α} {a' : α} {b : δ a} {f : forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a)} {h : Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)} (ha : Ne.{succ u2} α a a'), Eq.{succ u1} (δ a') (Finset.Pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b f a' h) (f a' (Or.resolve_left (Eq.{succ u2} α a' a) (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' s) (Iff.mp (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) (Or (Eq.{succ u2} α a' a) (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' s)) (Finset.mem_insert.{u2} α (fun (a : α) (b : α) => _inst_1 a b) s a' a) h) (Ne.symm.{succ u2} α a a' ha)))
+ forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {a : α} {a' : α} {b : δ a} {f : forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a)} {h : Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)} (ha : Ne.{succ u1} α a a'), Eq.{u2} (δ a') (Finset.Pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b f a' h) (f a' (Or.resolve_left (Eq.{succ u1} α a' a) (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a' s) (Iff.mp (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) (Or (Eq.{succ u1} α a' a) (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a' s)) (Finset.mem_insert.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s a' a) h) (Ne.symm.{succ u1} α a a' ha)))
Case conversion may be inaccurate. Consider using '#align finset.pi.cons_ne Finset.Pi.cons_neₓ'. -/
theorem Pi.cons_ne {s : Finset α} {a a' : α} {b : δ a} {f : ∀ a, a ∈ s → δ a} {h : a' ∈ insert a s}
(ha : a ≠ a') : Pi.cons s a b f a' h = f a' ((mem_insert.1 h).resolve_left ha.symm) :=
@@ -118,7 +118,7 @@ theorem Pi.cons_ne {s : Finset α} {a a' : α} {b : δ a} {f : ∀ a, a ∈ s
lean 3 declaration is
forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {a : α} {b : δ a} {s : Finset.{u1} α}, (Not (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s)) -> (Function.Injective.{imax (succ u1) u2, imax (succ u1) u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) (forall (a' : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a')) (Finset.Pi.cons.{u1, u2} α (fun {a : α} => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b))
but is expected to have type
- forall {α : Type.{u2}} {δ : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] {a : α} {b : δ a} {s : Finset.{u2} α}, (Not (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s)) -> (Function.Injective.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a)) (forall (a' : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a')) (Finset.Pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b))
+ forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {a : α} {b : δ a} {s : Finset.{u1} α}, (Not (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s)) -> (Function.Injective.{imax (succ u1) u2, imax (succ u1) u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a)) (forall (a' : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a')) (Finset.Pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b))
Case conversion may be inaccurate. Consider using '#align finset.pi_cons_injective Finset.pi_cons_injectiveₓ'. -/
theorem pi_cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
Function.Injective (Pi.cons s a b) := fun e₁ e₂ eq =>
@@ -136,7 +136,7 @@ theorem pi_cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
lean 3 declaration is
forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {t : forall (a : α), Finset.{u2} (β a)}, Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.hasEmptyc.{u1} α))) -> (β a))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.hasEmptyc.{u1} α)) t) (Singleton.singleton.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.hasEmptyc.{u1} α))) -> (β a)) (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.hasEmptyc.{u1} α))) -> (β a))) (Finset.hasSingleton.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.hasEmptyc.{u1} α))) -> (β a))) (Finset.Pi.empty.{u1, succ u2} α β))
but is expected to have type
- forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {t : forall (a : α), Finset.{u2} (β a)}, Eq.{max (succ u1) (succ u2)} (Finset.{max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α)) t) (Singleton.singleton.{max u1 u2, max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a)) (Finset.{max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a))) (Finset.instSingletonFinset.{max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a))) (Finset.Pi.empty.{u1, u2} α β))
+ forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {t : forall (a : α), Finset.{u2} (β a)}, Eq.{max (succ u2) (succ u1)} (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a))) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α)) t) (Singleton.singleton.{max u2 u1, max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a)) (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a))) (Finset.instSingletonFinset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a))) (Finset.Pi.empty.{u1, succ u2} α β))
Case conversion may be inaccurate. Consider using '#align finset.pi_empty Finset.pi_emptyₓ'. -/
@[simp]
theorem pi_empty {t : ∀ a : α, Finset (β a)} : pi (∅ : Finset α) t = singleton (Pi.empty β) :=
@@ -147,7 +147,7 @@ theorem pi_empty {t : ∀ a : α, Finset (β a)} : pi (∅ : Finset α) t = sing
lean 3 declaration is
forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : forall (a : α), DecidableEq.{succ u2} (β a)] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {a : α}, (Not (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s)) -> (Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) t) (Finset.bunionᵢ.{u2, max u1 u2} (β a) (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a_1 b) (t a) (fun (b : β a) => Finset.image.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)) (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a_1 b) (Finset.Pi.cons.{u1, succ u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s a b) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t))))
but is expected to have type
- forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : forall (a : α), DecidableEq.{succ u2} (β a)] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {a : α}, (Not (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s)) -> (Eq.{max (succ u1) (succ u2)} (Finset.{max u1 u2} (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) t) (Finset.bunionᵢ.{u2, max u1 u2} (β a) (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) => (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a) a_1 b) (t a) (fun (b : β a) => Finset.image.{max u1 u2, max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a)) (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) => (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a) a_1 b) (Finset.Pi.cons.{u1, u2} α β (fun (a : α) (b : α) => _inst_1 a b) s a b) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t))))
+ forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : forall (a : α), DecidableEq.{succ u2} (β a)] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {a : α}, (Not (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s)) -> (Eq.{max (succ u2) (succ u1)} (Finset.{max u2 u1} (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1))) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) t) (Finset.bunionᵢ.{u2, max u2 u1} (β a) (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) => (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a) a_1 b) (t a) (fun (b : β a) => Finset.image.{max u2 u1, max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a)) (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) => (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a) a_1 b) (Finset.Pi.cons.{succ u2, u1} α β (fun (a : α) (b : α) => _inst_1 a b) s a b) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t))))
Case conversion may be inaccurate. Consider using '#align finset.pi_insert Finset.pi_insertₓ'. -/
@[simp]
theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, Finset (β a)} {a : α}
@@ -171,7 +171,12 @@ theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, F
exact Multiset.pi_cons_injective ha
#align finset.pi_insert Finset.pi_insert
-#print Finset.pi_singletons /-
+/- warning: finset.pi_singletons -> Finset.pi_singletons is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {β : Type.{u2}} (s : Finset.{u1} α) (f : α -> β), Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> β)) (Finset.pi.{u1, u2} α (fun (a : α) => β) (fun (a : α) (b : α) => _inst_1 a b) s (fun (a : α) => Singleton.singleton.{u2, u2} β (Finset.{u2} β) (Finset.hasSingleton.{u2} β) (f a))) (Singleton.singleton.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> β) (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> β)) (Finset.hasSingleton.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> β)) (fun (a : α) (_x : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) => f a))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {β : Type.{u2}} (s : Finset.{u1} α) (f : α -> β), Eq.{max (succ u1) (succ u2)} (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> β)) (Finset.pi.{u2, u1} α (fun (a : α) => β) (fun (a : α) (b : α) => _inst_1 a b) s (fun (a : α) => Singleton.singleton.{u2, u2} β (Finset.{u2} β) (Finset.instSingletonFinset.{u2} β) (f a))) (Singleton.singleton.{max u1 u2, max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> β) (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> β)) (Finset.instSingletonFinset.{max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> β)) (fun (a : α) (_x : Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) => f a))
+Case conversion may be inaccurate. Consider using '#align finset.pi_singletons Finset.pi_singletonsₓ'. -/
theorem pi_singletons {β : Type _} (s : Finset α) (f : α → β) :
(s.pi fun a => ({f a} : Finset β)) = {fun a _ => f a} :=
by
@@ -183,20 +188,23 @@ theorem pi_singletons {β : Type _} (s : Finset α) (f : α → β) :
rw [mem_pi] at ha
simpa using ha i hi
#align finset.pi_singletons Finset.pi_singletons
--/
-#print Finset.pi_const_singleton /-
+/- warning: finset.pi_const_singleton -> Finset.pi_const_singleton is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {β : Type.{u2}} (s : Finset.{u1} α) (i : β), Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> β)) (Finset.pi.{u1, u2} α (fun (_x : α) => β) (fun (a : α) (b : α) => _inst_1 a b) s (fun (_x : α) => Singleton.singleton.{u2, u2} β (Finset.{u2} β) (Finset.hasSingleton.{u2} β) i)) (Singleton.singleton.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> β) (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> β)) (Finset.hasSingleton.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> β)) (fun (_x : α) (_x : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) _x s) => i))
+but is expected to have type
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {β : Type.{u2}} (s : Finset.{u1} α) (i : β), Eq.{max (succ u1) (succ u2)} (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> β)) (Finset.pi.{u2, u1} α (fun (_x : α) => β) (fun (a : α) (b : α) => _inst_1 a b) s (fun (_x : α) => Singleton.singleton.{u2, u2} β (Finset.{u2} β) (Finset.instSingletonFinset.{u2} β) i)) (Singleton.singleton.{max u1 u2, max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> β) (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> β)) (Finset.instSingletonFinset.{max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> β)) (fun (_x : α) (_x : Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) _x s) => i))
+Case conversion may be inaccurate. Consider using '#align finset.pi_const_singleton Finset.pi_const_singletonₓ'. -/
theorem pi_const_singleton {β : Type _} (s : Finset α) (i : β) :
(s.pi fun _ => ({i} : Finset β)) = {fun _ _ => i} :=
pi_singletons s fun _ => i
#align finset.pi_const_singleton Finset.pi_const_singleton
--/
/- warning: finset.pi_subset -> Finset.pi_subset is a dubious translation:
lean 3 declaration is
forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} (t₁ : forall (a : α), Finset.{u2} (β a)) (t₂ : forall (a : α), Finset.{u2} (β a)), (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (HasSubset.Subset.{u2} (Finset.{u2} (β a)) (Finset.hasSubset.{u2} (β a)) (t₁ a) (t₂ a))) -> (HasSubset.Subset.{max u1 u2} (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a))) (Finset.hasSubset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t₁) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t₂))
but is expected to have type
- forall {α : Type.{u2}} {β : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] {s : Finset.{u2} α} (t₁ : forall (a : α), Finset.{u1} (β a)) (t₂ : forall (a : α), Finset.{u1} (β a)), (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (HasSubset.Subset.{u1} (Finset.{u1} (β a)) (Finset.instHasSubsetFinset.{u1} (β a)) (t₁ a) (t₂ a))) -> (HasSubset.Subset.{max u2 u1} (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a))) (Finset.instHasSubsetFinset.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a))) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t₁) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t₂))
+ forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} (t₁ : forall (a : α), Finset.{u2} (β a)) (t₂ : forall (a : α), Finset.{u2} (β a)), (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (HasSubset.Subset.{u2} (Finset.{u2} (β a)) (Finset.instHasSubsetFinset.{u2} (β a)) (t₁ a) (t₂ a))) -> (HasSubset.Subset.{max u1 u2} (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a))) (Finset.instHasSubsetFinset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a))) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t₁) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t₂))
Case conversion may be inaccurate. Consider using '#align finset.pi_subset Finset.pi_subsetₓ'. -/
theorem pi_subset {s : Finset α} (t₁ t₂ : ∀ a, Finset (β a)) (h : ∀ a ∈ s, t₁ a ⊆ t₂ a) :
s.pi t₁ ⊆ s.pi t₂ := fun g hg => mem_pi.2 fun a ha => h a ha (mem_pi.mp hg a ha)
@@ -206,7 +214,7 @@ theorem pi_subset {s : Finset α} (t₁ t₂ : ∀ a, Finset (β a)) (h : ∀ a
lean 3 declaration is
forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {δ : α -> Type.{u2}} {s : Finset.{u1} α} (t₁ : forall (a : α), Finset.{u2} (δ a)) (t₂ : forall (a : α), Finset.{u2} (δ a)) {a : α}, (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (Disjoint.{u2} (Finset.{u2} (δ a)) (Finset.partialOrder.{u2} (δ a)) (Finset.orderBot.{u2} (δ a)) (t₁ a) (t₂ a)) -> (Disjoint.{max u1 u2} (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a))) (Finset.partialOrder.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a))) (Finset.orderBot.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a))) (Finset.pi.{u1, u2} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t₁) (Finset.pi.{u1, u2} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t₂))
but is expected to have type
- forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {δ : α -> Type.{u2}} {s : Finset.{u1} α} (t₁ : forall (a : α), Finset.{u2} (δ a)) (t₂ : forall (a : α), Finset.{u2} (δ a)) {a : α}, (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (Disjoint.{u2} (Finset.{u2} (δ a)) (Finset.partialOrder.{u2} (δ a)) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u2} (δ a)) (t₁ a) (t₂ a)) -> (Disjoint.{max u1 u2} (Finset.{max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a))) (Finset.partialOrder.{max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a))) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a))) (Finset.pi.{u1, u2} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t₁) (Finset.pi.{u1, u2} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t₂))
+ forall {α : Type.{u1}} [_inst_1 : DecidableEq.{succ u1} α] {δ : α -> Type.{u2}} {s : Finset.{u1} α} (t₁ : forall (a : α), Finset.{u2} (δ a)) (t₂ : forall (a : α), Finset.{u2} (δ a)) {a : α}, (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (Disjoint.{u2} (Finset.{u2} (δ a)) (Finset.partialOrder.{u2} (δ a)) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{u2} (δ a)) (t₁ a) (t₂ a)) -> (Disjoint.{max u1 u2} (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a))) (Finset.partialOrder.{max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a))) (Finset.instOrderBotFinsetToLEToPreorderPartialOrder.{max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a))) (Finset.pi.{u2, u1} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t₁) (Finset.pi.{u2, u1} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t₂))
Case conversion may be inaccurate. Consider using '#align finset.pi_disjoint_of_disjoint Finset.pi_disjoint_of_disjointₓ'. -/
theorem pi_disjoint_of_disjoint {δ : α → Type _} {s : Finset α} (t₁ t₂ : ∀ a, Finset (δ a)) {a : α}
(ha : a ∈ s) (h : Disjoint (t₁ a) (t₂ a)) : Disjoint (s.pi t₁) (s.pi t₂) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/4c586d291f189eecb9d00581aeb3dd998ac34442
@@ -76,58 +76,58 @@ theorem mem_pi {s : Finset α} {t : ∀ a, Finset (β a)} {f : ∀ a ∈ s, β a
mem_pi _ _ _
#align finset.mem_pi Finset.mem_pi
-/- warning: finset.pi.cons -> Finset.pi.cons is a dubious translation:
+/- warning: finset.pi.cons -> Finset.Pi.cons is a dubious translation:
lean 3 declaration is
forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (a : α), (δ a) -> (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) -> (forall (a' : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a'))
but is expected to have type
forall {α : Type.{u1}} {δ : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (a : α), (δ a) -> (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a)) -> (forall (a' : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a'))
-Case conversion may be inaccurate. Consider using '#align finset.pi.cons Finset.pi.consₓ'. -/
+Case conversion may be inaccurate. Consider using '#align finset.pi.cons Finset.Pi.consₓ'. -/
/-- Given a function `f` defined on a finset `s`, define a new function on the finset `s ∪ {a}`,
equal to `f` on `s` and sending `a` to a given value `b`. This function is denoted
`s.pi.cons a b f`. If `a` already belongs to `s`, the new function takes the value `b` at `a`
anyway. -/
-def pi.cons (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (a' : α) (h : a' ∈ insert a s) :
+def Pi.cons (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (a' : α) (h : a' ∈ insert a s) :
δ a' :=
Multiset.Pi.cons s.1 a b f _ (Multiset.mem_cons.2 <| mem_insert.symm.2 h)
-#align finset.pi.cons Finset.pi.cons
+#align finset.pi.cons Finset.Pi.cons
-/- warning: finset.pi.cons_same -> Finset.pi.cons_same is a dubious translation:
+/- warning: finset.pi.cons_same -> Finset.Pi.cons_same is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (a : α) (b : δ a) (f : forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)), Eq.{u2} (δ a) (Finset.pi.cons.{u1, u2} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b f a h) b
+ forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (a : α) (b : δ a) (f : forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)), Eq.{u2} (δ a) (Finset.Pi.cons.{u1, u2} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b f a h) b
but is expected to have type
- forall {α : Type.{u2}} {δ : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] (s : Finset.{u2} α) (a : α) (b : δ a) (f : forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a)) (h : Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)), Eq.{succ u1} (δ a) (Finset.pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b f a h) b
-Case conversion may be inaccurate. Consider using '#align finset.pi.cons_same Finset.pi.cons_sameₓ'. -/
+ forall {α : Type.{u2}} {δ : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] (s : Finset.{u2} α) (a : α) (b : δ a) (f : forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a)) (h : Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)), Eq.{succ u1} (δ a) (Finset.Pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b f a h) b
+Case conversion may be inaccurate. Consider using '#align finset.pi.cons_same Finset.Pi.cons_sameₓ'. -/
@[simp]
-theorem pi.cons_same (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (h : a ∈ insert a s) :
- pi.cons s a b f a h = b :=
+theorem Pi.cons_same (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (h : a ∈ insert a s) :
+ Pi.cons s a b f a h = b :=
Multiset.Pi.cons_same _
-#align finset.pi.cons_same Finset.pi.cons_same
+#align finset.pi.cons_same Finset.Pi.cons_same
-/- warning: finset.pi.cons_ne -> Finset.pi.cons_ne is a dubious translation:
+/- warning: finset.pi.cons_ne -> Finset.Pi.cons_ne is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {a : α} {a' : α} {b : δ a} {f : forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)} {h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)} (ha : Ne.{succ u1} α a a'), Eq.{u2} (δ a') (Finset.pi.cons.{u1, u2} α (fun {a : α} => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b f a' h) (f a' (Or.resolve_left (Eq.{succ u1} α a' a) (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' s) (Iff.mp (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) (Or (Eq.{succ u1} α a' a) (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' s)) (Finset.mem_insert.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s a' a) h) (Ne.symm.{succ u1} α a a' ha)))
+ forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {a : α} {a' : α} {b : δ a} {f : forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)} {h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)} (ha : Ne.{succ u1} α a a'), Eq.{u2} (δ a') (Finset.Pi.cons.{u1, u2} α (fun {a : α} => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b f a' h) (f a' (Or.resolve_left (Eq.{succ u1} α a' a) (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' s) (Iff.mp (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) (Or (Eq.{succ u1} α a' a) (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' s)) (Finset.mem_insert.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s a' a) h) (Ne.symm.{succ u1} α a a' ha)))
but is expected to have type
- forall {α : Type.{u2}} {δ : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] {s : Finset.{u2} α} {a : α} {a' : α} {b : δ a} {f : forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a)} {h : Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)} (ha : Ne.{succ u2} α a a'), Eq.{succ u1} (δ a') (Finset.pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b f a' h) (f a' (Or.resolve_left (Eq.{succ u2} α a' a) (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' s) (Iff.mp (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) (Or (Eq.{succ u2} α a' a) (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' s)) (Finset.mem_insert.{u2} α (fun (a : α) (b : α) => _inst_1 a b) s a' a) h) (Ne.symm.{succ u2} α a a' ha)))
-Case conversion may be inaccurate. Consider using '#align finset.pi.cons_ne Finset.pi.cons_neₓ'. -/
-theorem pi.cons_ne {s : Finset α} {a a' : α} {b : δ a} {f : ∀ a, a ∈ s → δ a} {h : a' ∈ insert a s}
- (ha : a ≠ a') : pi.cons s a b f a' h = f a' ((mem_insert.1 h).resolve_left ha.symm) :=
+ forall {α : Type.{u2}} {δ : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] {s : Finset.{u2} α} {a : α} {a' : α} {b : δ a} {f : forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a)} {h : Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)} (ha : Ne.{succ u2} α a a'), Eq.{succ u1} (δ a') (Finset.Pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b f a' h) (f a' (Or.resolve_left (Eq.{succ u2} α a' a) (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' s) (Iff.mp (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) (Or (Eq.{succ u2} α a' a) (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' s)) (Finset.mem_insert.{u2} α (fun (a : α) (b : α) => _inst_1 a b) s a' a) h) (Ne.symm.{succ u2} α a a' ha)))
+Case conversion may be inaccurate. Consider using '#align finset.pi.cons_ne Finset.Pi.cons_neₓ'. -/
+theorem Pi.cons_ne {s : Finset α} {a a' : α} {b : δ a} {f : ∀ a, a ∈ s → δ a} {h : a' ∈ insert a s}
+ (ha : a ≠ a') : Pi.cons s a b f a' h = f a' ((mem_insert.1 h).resolve_left ha.symm) :=
Multiset.Pi.cons_ne _ _
-#align finset.pi.cons_ne Finset.pi.cons_ne
+#align finset.pi.cons_ne Finset.Pi.cons_ne
/- warning: finset.pi_cons_injective -> Finset.pi_cons_injective is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {a : α} {b : δ a} {s : Finset.{u1} α}, (Not (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s)) -> (Function.Injective.{imax (succ u1) u2, imax (succ u1) u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) (forall (a' : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a')) (Finset.pi.cons.{u1, u2} α (fun {a : α} => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b))
+ forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {a : α} {b : δ a} {s : Finset.{u1} α}, (Not (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s)) -> (Function.Injective.{imax (succ u1) u2, imax (succ u1) u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) (forall (a' : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a')) (Finset.Pi.cons.{u1, u2} α (fun {a : α} => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b))
but is expected to have type
- forall {α : Type.{u2}} {δ : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] {a : α} {b : δ a} {s : Finset.{u2} α}, (Not (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s)) -> (Function.Injective.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a)) (forall (a' : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a')) (Finset.pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b))
+ forall {α : Type.{u2}} {δ : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] {a : α} {b : δ a} {s : Finset.{u2} α}, (Not (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s)) -> (Function.Injective.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a)) (forall (a' : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a')) (Finset.Pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b))
Case conversion may be inaccurate. Consider using '#align finset.pi_cons_injective Finset.pi_cons_injectiveₓ'. -/
theorem pi_cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
- Function.Injective (pi.cons s a b) := fun e₁ e₂ eq =>
+ Function.Injective (Pi.cons s a b) := fun e₁ e₂ eq =>
@Multiset.pi_cons_injective α _ δ a b s.1 hs _ _ <|
funext fun e =>
funext fun h =>
have :
- pi.cons s a b e₁ e (by simpa only [Multiset.mem_cons, mem_insert] using h) =
- pi.cons s a b e₂ e (by simpa only [Multiset.mem_cons, mem_insert] using h) :=
+ Pi.cons s a b e₁ e (by simpa only [Multiset.mem_cons, mem_insert] using h) =
+ Pi.cons s a b e₂ e (by simpa only [Multiset.mem_cons, mem_insert] using h) :=
by rw [Eq]
this
#align finset.pi_cons_injective Finset.pi_cons_injective
@@ -145,13 +145,13 @@ theorem pi_empty {t : ∀ a : α, Finset (β a)} : pi (∅ : Finset α) t = sing
/- warning: finset.pi_insert -> Finset.pi_insert is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : forall (a : α), DecidableEq.{succ u2} (β a)] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {a : α}, (Not (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s)) -> (Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) t) (Finset.bunionᵢ.{u2, max u1 u2} (β a) (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a_1 b) (t a) (fun (b : β a) => Finset.image.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)) (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a_1 b) (Finset.pi.cons.{u1, succ u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s a b) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t))))
+ forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : forall (a : α), DecidableEq.{succ u2} (β a)] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {a : α}, (Not (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s)) -> (Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) t) (Finset.bunionᵢ.{u2, max u1 u2} (β a) (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a_1 b) (t a) (fun (b : β a) => Finset.image.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)) (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a_1 b) (Finset.Pi.cons.{u1, succ u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s a b) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t))))
but is expected to have type
- forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : forall (a : α), DecidableEq.{succ u2} (β a)] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {a : α}, (Not (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s)) -> (Eq.{max (succ u1) (succ u2)} (Finset.{max u1 u2} (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) t) (Finset.bunionᵢ.{u2, max u1 u2} (β a) (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) => (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a) a_1 b) (t a) (fun (b : β a) => Finset.image.{max u1 u2, max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a)) (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) => (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a) a_1 b) (Finset.pi.cons.{u1, u2} α β (fun (a : α) (b : α) => _inst_1 a b) s a b) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t))))
+ forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : forall (a : α), DecidableEq.{succ u2} (β a)] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {a : α}, (Not (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s)) -> (Eq.{max (succ u1) (succ u2)} (Finset.{max u1 u2} (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) t) (Finset.bunionᵢ.{u2, max u1 u2} (β a) (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) => (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a) a_1 b) (t a) (fun (b : β a) => Finset.image.{max u1 u2, max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a)) (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) => (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a) a_1 b) (Finset.Pi.cons.{u1, u2} α β (fun (a : α) (b : α) => _inst_1 a b) s a b) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t))))
Case conversion may be inaccurate. Consider using '#align finset.pi_insert Finset.pi_insertₓ'. -/
@[simp]
theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, Finset (β a)} {a : α}
- (ha : a ∉ s) : pi (insert a s) t = (t a).bunionᵢ fun b => (pi s t).image (pi.cons s a b) :=
+ (ha : a ∉ s) : pi (insert a s) t = (t a).bunionᵢ fun b => (pi s t).image (Pi.cons s a b) :=
by
apply eq_of_veq
rw [← (pi (insert a s) t).2.dedup]
mathlib commit https://github.com/leanprover-community/mathlib/commit/4c586d291f189eecb9d00581aeb3dd998ac34442
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
! This file was ported from Lean 3 source module data.finset.pi
-! leanprover-community/mathlib commit e04043d6bf7264a3c84bc69711dc354958ca4516
+! leanprover-community/mathlib commit 4c586d291f189eecb9d00581aeb3dd998ac34442
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -30,49 +30,58 @@ section Pi
variable {α : Type _}
-#print Finset.Pi.empty /-
+/- warning: finset.pi.empty -> Finset.Pi.empty is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} (β : α -> Sort.{u2}) (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.hasEmptyc.{u1} α))) -> (β a)
+but is expected to have type
+ forall {α : Type.{u1}} (β : α -> Type.{u2}) (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a)
+Case conversion may be inaccurate. Consider using '#align finset.pi.empty Finset.Pi.emptyₓ'. -/
/-- The empty dependent product function, defined on the empty set. The assumption `a ∈ ∅` is never
satisfied. -/
def Pi.empty (β : α → Sort _) (a : α) (h : a ∈ (∅ : Finset α)) : β a :=
Multiset.Pi.empty β a h
#align finset.pi.empty Finset.Pi.empty
--/
-variable {δ : α → Type _} [DecidableEq α]
+variable {β : α → Type _} {δ : α → Sort _} [DecidableEq α]
#print Finset.pi /-
/-- Given a finset `s` of `α` and for all `a : α` a finset `t a` of `δ a`, then one can define the
finset `s.pi t` of all functions defined on elements of `s` taking values in `t a` for `a ∈ s`.
Note that the elements of `s.pi t` are only partially defined, on `s`. -/
-def pi (s : Finset α) (t : ∀ a, Finset (δ a)) : Finset (∀ a ∈ s, δ a) :=
+def pi (s : Finset α) (t : ∀ a, Finset (β a)) : Finset (∀ a ∈ s, β a) :=
⟨s.1.pi fun a => (t a).1, s.Nodup.pi fun a _ => (t a).Nodup⟩
#align finset.pi Finset.pi
-/
/- warning: finset.pi_val -> Finset.pi_val is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {δ : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : forall (a : α), Finset.{u2} (δ a)), Eq.{succ (max u1 u2)} (Multiset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a))) (Finset.val.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) (Finset.pi.{u1, u2} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (Multiset.pi.{u1, u2} α (fun (a : α) (b : α) => _inst_1 a b) (fun (a : α) => δ a) (Finset.val.{u1} α s) (fun (a : α) => Finset.val.{u2} (δ a) (t a)))
+ forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (t : forall (a : α), Finset.{u2} (β a)), Eq.{succ (max u1 u2)} (Multiset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a))) (Finset.val.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (Multiset.pi.{u1, u2} α (fun (a : α) (b : α) => _inst_1 a b) (fun (a : α) => β a) (Finset.val.{u1} α s) (fun (a : α) => Finset.val.{u2} (β a) (t a)))
but is expected to have type
- forall {α : Type.{u2}} {δ : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] (s : Finset.{u2} α) (t : forall (a : α), Finset.{u1} (δ a)), Eq.{max (succ u2) (succ u1)} (Multiset.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a))) (Finset.val.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a)) (Finset.pi.{u2, u1} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (Multiset.pi.{u2, u1} α (fun (a : α) (b : α) => _inst_1 a b) (fun (a : α) => δ a) (Finset.val.{u2} α s) (fun (a : α) => Finset.val.{u1} (δ a) (t a)))
+ forall {α : Type.{u2}} {β : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] (s : Finset.{u2} α) (t : forall (a : α), Finset.{u1} (β a)), Eq.{max (succ u2) (succ u1)} (Multiset.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a))) (Finset.val.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a)) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (Multiset.pi.{u2, u1} α (fun (a : α) (b : α) => _inst_1 a b) (fun (a : α) => β a) (Finset.val.{u2} α s) (fun (a : α) => Finset.val.{u1} (β a) (t a)))
Case conversion may be inaccurate. Consider using '#align finset.pi_val Finset.pi_valₓ'. -/
@[simp]
-theorem pi_val (s : Finset α) (t : ∀ a, Finset (δ a)) : (s.pi t).1 = s.1.pi fun a => (t a).1 :=
+theorem pi_val (s : Finset α) (t : ∀ a, Finset (β a)) : (s.pi t).1 = s.1.pi fun a => (t a).1 :=
rfl
#align finset.pi_val Finset.pi_val
/- warning: finset.mem_pi -> Finset.mem_pi is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {δ : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (δ a)} {f : forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)}, Iff (Membership.Mem.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a))) (Finset.hasMem.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a))) f (Finset.pi.{u1, u2} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (forall (a : α) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s), Membership.Mem.{u2, u2} (δ a) (Finset.{u2} (δ a)) (Finset.hasMem.{u2} (δ a)) (f a h) (t a))
+ forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {f : forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)}, Iff (Membership.Mem.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)) (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a))) (Finset.hasMem.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a))) f (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (forall (a : α) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s), Membership.Mem.{u2, u2} (β a) (Finset.{u2} (β a)) (Finset.hasMem.{u2} (β a)) (f a h) (t a))
but is expected to have type
- forall {α : Type.{u2}} {δ : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] {s : Finset.{u2} α} {t : forall (a : α), Finset.{u1} (δ a)} {f : forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a)}, Iff (Membership.mem.{max u2 u1, max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a)) (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a))) (Finset.instMembershipFinset.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a))) f (Finset.pi.{u2, u1} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (forall (a : α) (h : Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s), Membership.mem.{u1, u1} (δ a) (Finset.{u1} (δ a)) (Finset.instMembershipFinset.{u1} (δ a)) (f a h) (t a))
+ forall {α : Type.{u2}} {β : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] {s : Finset.{u2} α} {t : forall (a : α), Finset.{u1} (β a)} {f : forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a)}, Iff (Membership.mem.{max u2 u1, max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a)) (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a))) (Finset.instMembershipFinset.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a))) f (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t)) (forall (a : α) (h : Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s), Membership.mem.{u1, u1} (β a) (Finset.{u1} (β a)) (Finset.instMembershipFinset.{u1} (β a)) (f a h) (t a))
Case conversion may be inaccurate. Consider using '#align finset.mem_pi Finset.mem_piₓ'. -/
@[simp]
-theorem mem_pi {s : Finset α} {t : ∀ a, Finset (δ a)} {f : ∀ a ∈ s, δ a} :
+theorem mem_pi {s : Finset α} {t : ∀ a, Finset (β a)} {f : ∀ a ∈ s, β a} :
f ∈ s.pi t ↔ ∀ (a) (h : a ∈ s), f a h ∈ t a :=
mem_pi _ _ _
#align finset.mem_pi Finset.mem_pi
-#print Finset.pi.cons /-
+/- warning: finset.pi.cons -> Finset.pi.cons is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (a : α), (δ a) -> (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) -> (forall (a' : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a'))
+but is expected to have type
+ forall {α : Type.{u1}} {δ : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (a : α), (δ a) -> (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (δ a)) -> (forall (a' : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a'))
+Case conversion may be inaccurate. Consider using '#align finset.pi.cons Finset.pi.consₓ'. -/
/-- Given a function `f` defined on a finset `s`, define a new function on the finset `s ∪ {a}`,
equal to `f` on `s` and sending `a` to a given value `b`. This function is denoted
`s.pi.cons a b f`. If `a` already belongs to `s`, the new function takes the value `b` at `a`
@@ -81,11 +90,10 @@ def pi.cons (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (a
δ a' :=
Multiset.Pi.cons s.1 a b f _ (Multiset.mem_cons.2 <| mem_insert.symm.2 h)
#align finset.pi.cons Finset.pi.cons
--/
/- warning: finset.pi.cons_same -> Finset.pi.cons_same is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {δ : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (a : α) (b : δ a) (f : forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)), Eq.{succ u2} (δ a) (Finset.pi.cons.{u1, u2} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b f a h) b
+ forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] (s : Finset.{u1} α) (a : α) (b : δ a) (f : forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) (h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)), Eq.{u2} (δ a) (Finset.pi.cons.{u1, u2} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b f a h) b
but is expected to have type
forall {α : Type.{u2}} {δ : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] (s : Finset.{u2} α) (a : α) (b : δ a) (f : forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a)) (h : Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)), Eq.{succ u1} (δ a) (Finset.pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b f a h) b
Case conversion may be inaccurate. Consider using '#align finset.pi.cons_same Finset.pi.cons_sameₓ'. -/
@@ -97,7 +105,7 @@ theorem pi.cons_same (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s →
/- warning: finset.pi.cons_ne -> Finset.pi.cons_ne is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {δ : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {a : α} {a' : α} {b : δ a} {f : forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)} {h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)} (ha : Ne.{succ u1} α a a'), Eq.{succ u2} (δ a') (Finset.pi.cons.{u1, u2} α (fun {a : α} => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b f a' h) (f a' (Or.resolve_left (Eq.{succ u1} α a' a) (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' s) (Iff.mp (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) (Or (Eq.{succ u1} α a' a) (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' s)) (Finset.mem_insert.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s a' a) h) (Ne.symm.{succ u1} α a a' ha)))
+ forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} {a : α} {a' : α} {b : δ a} {f : forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)} {h : Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)} (ha : Ne.{succ u1} α a a'), Eq.{u2} (δ a') (Finset.pi.cons.{u1, u2} α (fun {a : α} => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b f a' h) (f a' (Or.resolve_left (Eq.{succ u1} α a' a) (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' s) (Iff.mp (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) (Or (Eq.{succ u1} α a' a) (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' s)) (Finset.mem_insert.{u1} α (fun (a : α) (b : α) => _inst_1 a b) s a' a) h) (Ne.symm.{succ u1} α a a' ha)))
but is expected to have type
forall {α : Type.{u2}} {δ : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] {s : Finset.{u2} α} {a : α} {a' : α} {b : δ a} {f : forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a)} {h : Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)} (ha : Ne.{succ u2} α a a'), Eq.{succ u1} (δ a') (Finset.pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b f a' h) (f a' (Or.resolve_left (Eq.{succ u2} α a' a) (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' s) (Iff.mp (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) (Or (Eq.{succ u2} α a' a) (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' s)) (Finset.mem_insert.{u2} α (fun (a : α) (b : α) => _inst_1 a b) s a' a) h) (Ne.symm.{succ u2} α a a' ha)))
Case conversion may be inaccurate. Consider using '#align finset.pi.cons_ne Finset.pi.cons_neₓ'. -/
@@ -108,7 +116,7 @@ theorem pi.cons_ne {s : Finset α} {a a' : α} {b : δ a} {f : ∀ a, a ∈ s
/- warning: finset.pi_cons_injective -> Finset.pi_cons_injective is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {δ : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {a : α} {b : δ a} {s : Finset.{u1} α}, (Not (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s)) -> (Function.Injective.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) (forall (a' : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a')) (Finset.pi.cons.{u1, u2} α (fun {a : α} => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b))
+ forall {α : Type.{u1}} {δ : α -> Sort.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {a : α} {b : δ a} {s : Finset.{u1} α}, (Not (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s)) -> (Function.Injective.{imax (succ u1) u2, imax (succ u1) u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a)) (forall (a' : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a' (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a')) (Finset.pi.cons.{u1, u2} α (fun {a : α} => δ a) (fun (a : α) (b : α) => _inst_1 a b) s a b))
but is expected to have type
forall {α : Type.{u2}} {δ : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] {a : α} {b : δ a} {s : Finset.{u2} α}, (Not (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s)) -> (Function.Injective.{max (succ u2) (succ u1), max (succ u2) (succ u1)} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a)) (forall (a' : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a' (Insert.insert.{u2, u2} α (Finset.{u2} α) (Finset.instInsertFinset.{u2} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (δ a')) (Finset.pi.cons.{u2, u1} α δ (fun (a : α) (b : α) => _inst_1 a b) s a b))
Case conversion may be inaccurate. Consider using '#align finset.pi_cons_injective Finset.pi_cons_injectiveₓ'. -/
@@ -124,16 +132,25 @@ theorem pi_cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
this
#align finset.pi_cons_injective Finset.pi_cons_injective
-#print Finset.pi_empty /-
+/- warning: finset.pi_empty -> Finset.pi_empty is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {t : forall (a : α), Finset.{u2} (β a)}, Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.hasEmptyc.{u1} α))) -> (β a))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.hasEmptyc.{u1} α)) t) (Singleton.singleton.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.hasEmptyc.{u1} α))) -> (β a)) (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.hasEmptyc.{u1} α))) -> (β a))) (Finset.hasSingleton.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.hasEmptyc.{u1} α))) -> (β a))) (Finset.Pi.empty.{u1, succ u2} α β))
+but is expected to have type
+ forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {t : forall (a : α), Finset.{u2} (β a)}, Eq.{max (succ u1) (succ u2)} (Finset.{max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α)) t) (Singleton.singleton.{max u1 u2, max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a)) (Finset.{max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a))) (Finset.instSingletonFinset.{max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a (EmptyCollection.emptyCollection.{u1} (Finset.{u1} α) (Finset.instEmptyCollectionFinset.{u1} α))) -> (β a))) (Finset.Pi.empty.{u1, u2} α β))
+Case conversion may be inaccurate. Consider using '#align finset.pi_empty Finset.pi_emptyₓ'. -/
@[simp]
-theorem pi_empty {t : ∀ a : α, Finset (δ a)} : pi (∅ : Finset α) t = singleton (Pi.empty δ) :=
+theorem pi_empty {t : ∀ a : α, Finset (β a)} : pi (∅ : Finset α) t = singleton (Pi.empty β) :=
rfl
#align finset.pi_empty Finset.pi_empty
--/
-#print Finset.pi_insert /-
+/- warning: finset.pi_insert -> Finset.pi_insert is a dubious translation:
+lean 3 declaration is
+ forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : forall (a : α), DecidableEq.{succ u2} (β a)] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {a : α}, (Not (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s)) -> (Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) t) (Finset.bunionᵢ.{u2, max u1 u2} (β a) (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a_1 b) (t a) (fun (b : β a) => Finset.image.{max u1 u2, max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a)) (forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.hasInsert.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a_1 b) (Finset.pi.cons.{u1, succ u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s a b) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t))))
+but is expected to have type
+ forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] [_inst_2 : forall (a : α), DecidableEq.{succ u2} (β a)] {s : Finset.{u1} α} {t : forall (a : α), Finset.{u2} (β a)} {a : α}, (Not (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s)) -> (Eq.{max (succ u1) (succ u2)} (Finset.{max u1 u2} (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) t) (Finset.bunionᵢ.{u2, max u1 u2} (β a) (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) => (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a) a_1 b) (t a) (fun (b : β a) => Finset.image.{max u1 u2, max u1 u2} (forall (a : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a s) -> (β a)) (forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (fun (a_1 : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) (b : forall (a_1 : α), (Membership.mem.{u1, u1} α (Finset.{u1} α) (Finset.instMembershipFinset.{u1} α) a_1 (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s)) -> (β a_1)) => Finset.decidableEqPiFinset.{u1, u2} α (Insert.insert.{u1, u1} α (Finset.{u1} α) (Finset.instInsertFinset.{u1} α (fun (a : α) (b : α) => _inst_1 a b)) a s) (fun (a : α) => β a) (fun (a : α) => (fun (a : α) (a_1 : β a) (b : β a) => _inst_2 a a_1 b) a) a_1 b) (Finset.pi.cons.{u1, u2} α β (fun (a : α) (b : α) => _inst_1 a b) s a b) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t))))
+Case conversion may be inaccurate. Consider using '#align finset.pi_insert Finset.pi_insertₓ'. -/
@[simp]
-theorem pi_insert [∀ a, DecidableEq (δ a)] {s : Finset α} {t : ∀ a : α, Finset (δ a)} {a : α}
+theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, Finset (β a)} {a : α}
(ha : a ∉ s) : pi (insert a s) t = (t a).bunionᵢ fun b => (pi s t).image (pi.cons s a b) :=
by
apply eq_of_veq
@@ -150,9 +167,9 @@ theorem pi_insert [∀ a, DecidableEq (δ a)] {s : Finset α} {t : ∀ a : α, F
_ (insert_val_of_not_mem ha)
subst s'; rw [pi_cons]
congr ; funext b
- exact ((pi s t).Nodup.map <| Multiset.pi_cons_injective ha).dedup.symm
+ refine' ((pi s t).Nodup.map _).dedup.symm
+ exact Multiset.pi_cons_injective ha
#align finset.pi_insert Finset.pi_insert
--/
#print Finset.pi_singletons /-
theorem pi_singletons {β : Type _} (s : Finset α) (f : α → β) :
@@ -177,11 +194,11 @@ theorem pi_const_singleton {β : Type _} (s : Finset α) (i : β) :
/- warning: finset.pi_subset -> Finset.pi_subset is a dubious translation:
lean 3 declaration is
- forall {α : Type.{u1}} {δ : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} (t₁ : forall (a : α), Finset.{u2} (δ a)) (t₂ : forall (a : α), Finset.{u2} (δ a)), (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (HasSubset.Subset.{u2} (Finset.{u2} (δ a)) (Finset.hasSubset.{u2} (δ a)) (t₁ a) (t₂ a))) -> (HasSubset.Subset.{max u1 u2} (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a))) (Finset.hasSubset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (δ a))) (Finset.pi.{u1, u2} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t₁) (Finset.pi.{u1, u2} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t₂))
+ forall {α : Type.{u1}} {β : α -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} α] {s : Finset.{u1} α} (t₁ : forall (a : α), Finset.{u2} (β a)) (t₂ : forall (a : α), Finset.{u2} (β a)), (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (HasSubset.Subset.{u2} (Finset.{u2} (β a)) (Finset.hasSubset.{u2} (β a)) (t₁ a) (t₂ a))) -> (HasSubset.Subset.{max u1 u2} (Finset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a))) (Finset.hasSubset.{max u1 u2} (forall (a : α), (Membership.Mem.{u1, u1} α (Finset.{u1} α) (Finset.hasMem.{u1} α) a s) -> (β a))) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t₁) (Finset.pi.{u1, u2} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t₂))
but is expected to have type
- forall {α : Type.{u2}} {δ : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] {s : Finset.{u2} α} (t₁ : forall (a : α), Finset.{u1} (δ a)) (t₂ : forall (a : α), Finset.{u1} (δ a)), (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (HasSubset.Subset.{u1} (Finset.{u1} (δ a)) (Finset.instHasSubsetFinset.{u1} (δ a)) (t₁ a) (t₂ a))) -> (HasSubset.Subset.{max u2 u1} (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a))) (Finset.instHasSubsetFinset.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (δ a))) (Finset.pi.{u2, u1} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t₁) (Finset.pi.{u2, u1} α (fun (a : α) => δ a) (fun (a : α) (b : α) => _inst_1 a b) s t₂))
+ forall {α : Type.{u2}} {β : α -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} α] {s : Finset.{u2} α} (t₁ : forall (a : α), Finset.{u1} (β a)) (t₂ : forall (a : α), Finset.{u1} (β a)), (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (HasSubset.Subset.{u1} (Finset.{u1} (β a)) (Finset.instHasSubsetFinset.{u1} (β a)) (t₁ a) (t₂ a))) -> (HasSubset.Subset.{max u2 u1} (Finset.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a))) (Finset.instHasSubsetFinset.{max u2 u1} (forall (a : α), (Membership.mem.{u2, u2} α (Finset.{u2} α) (Finset.instMembershipFinset.{u2} α) a s) -> (β a))) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t₁) (Finset.pi.{u2, u1} α (fun (a : α) => β a) (fun (a : α) (b : α) => _inst_1 a b) s t₂))
Case conversion may be inaccurate. Consider using '#align finset.pi_subset Finset.pi_subsetₓ'. -/
-theorem pi_subset {s : Finset α} (t₁ t₂ : ∀ a, Finset (δ a)) (h : ∀ a ∈ s, t₁ a ⊆ t₂ a) :
+theorem pi_subset {s : Finset α} (t₁ t₂ : ∀ a, Finset (β a)) (h : ∀ a ∈ s, t₁ a ⊆ t₂ a) :
s.pi t₁ ⊆ s.pi t₂ := fun g hg => mem_pi.2 fun a ha => h a ha (mem_pi.mp hg a ha)
#align finset.pi_subset Finset.pi_subset
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
@@ -88,7 +88,7 @@ theorem pi_empty {t : ∀ a : α, Finset (β a)} : pi (∅ : Finset α) t = sing
rfl
#align finset.pi_empty Finset.pi_empty
-@[simp, aesop safe apply (rule_sets [finsetNonempty])]
+@[simp, aesop safe apply (rule_sets := [finsetNonempty])]
lemma pi_nonempty : (s.pi t).Nonempty ↔ ∀ a ∈ s, (t a).Nonempty := by
simp [Finset.Nonempty, Classical.skolem]
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>
@@ -88,7 +88,8 @@ theorem pi_empty {t : ∀ a : α, Finset (β a)} : pi (∅ : Finset α) t = sing
rfl
#align finset.pi_empty Finset.pi_empty
-@[simp] lemma pi_nonempty : (s.pi t).Nonempty ↔ ∀ a ∈ s, (t a).Nonempty := by
+@[simp, aesop safe apply (rule_sets [finsetNonempty])]
+lemma pi_nonempty : (s.pi t).Nonempty ↔ ∀ a ∈ s, (t a).Nonempty := by
simp [Finset.Nonempty, Classical.skolem]
@[simp]
(a • s)⁻¹ = s⁻¹ • a⁻¹
(#9199)
and other simple pointwise lemmas for Set
and Finset
. Also add supporting Fintype.piFinset
lemmas and fix the names of two lemmas.
From LeanAPAP and LeanCamCombi
@@ -31,7 +31,7 @@ def Pi.empty (β : α → Sort*) (a : α) (h : a ∈ (∅ : Finset α)) : β a :
#align finset.pi.empty Finset.Pi.empty
universe u v
-variable {β : α → Type u} {δ : α → Sort v} [DecidableEq α]
+variable {β : α → Type u} {δ : α → Sort v} [DecidableEq α] {s : Finset α} {t : ∀ a, Finset (β a)}
/-- Given a finset `s` of `α` and for all `a : α` a finset `t a` of `δ a`, then one can define the
finset `s.pi t` of all functions defined on elements of `s` taking values in `t a` for `a ∈ s`.
@@ -88,6 +88,9 @@ theorem pi_empty {t : ∀ a : α, Finset (β a)} : pi (∅ : Finset α) t = sing
rfl
#align finset.pi_empty Finset.pi_empty
+@[simp] lemma pi_nonempty : (s.pi t).Nonempty ↔ ∀ a ∈ s, (t a).Nonempty := by
+ simp [Finset.Nonempty, Classical.skolem]
+
@[simp]
theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, Finset (β a)} {a : α}
(ha : a ∉ s) : pi (insert a s) t = (t a).biUnion fun b => (pi s t).image (Pi.cons s a b) := by
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -22,11 +22,11 @@ open Multiset
section Pi
-variable {α : Type _}
+variable {α : Type*}
/-- The empty dependent product function, defined on the empty set. The assumption `a ∈ ∅` is never
satisfied. -/
-def Pi.empty (β : α → Sort _) (a : α) (h : a ∈ (∅ : Finset α)) : β a :=
+def Pi.empty (β : α → Sort*) (a : α) (h : a ∈ (∅ : Finset α)) : β a :=
Multiset.Pi.empty β a h
#align finset.pi.empty Finset.Pi.empty
@@ -108,7 +108,7 @@ theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, F
exact ((pi s t).nodup.map <| Multiset.Pi.cons_injective ha).dedup.symm
#align finset.pi_insert Finset.pi_insert
-theorem pi_singletons {β : Type _} (s : Finset α) (f : α → β) :
+theorem pi_singletons {β : Type*} (s : Finset α) (f : α → β) :
(s.pi fun a => ({f a} : Finset β)) = {fun a _ => f a} := by
rw [eq_singleton_iff_unique_mem]
constructor
@@ -119,7 +119,7 @@ theorem pi_singletons {β : Type _} (s : Finset α) (f : α → β) :
simpa using ha i hi
#align finset.pi_singletons Finset.pi_singletons
-theorem pi_const_singleton {β : Type _} (s : Finset α) (i : β) :
+theorem pi_const_singleton {β : Type*} (s : Finset α) (i : β) :
(s.pi fun _ => ({i} : Finset β)) = {fun _ _ => i} :=
pi_singletons s fun _ => i
#align finset.pi_const_singleton Finset.pi_const_singleton
@@ -128,7 +128,7 @@ theorem pi_subset {s : Finset α} (t₁ t₂ : ∀ a, Finset (β a)) (h : ∀ a
s.pi t₁ ⊆ s.pi t₂ := fun _ hg => mem_pi.2 fun a ha => h a ha (mem_pi.mp hg a ha)
#align finset.pi_subset Finset.pi_subset
-theorem pi_disjoint_of_disjoint {δ : α → Type _} {s : Finset α} (t₁ t₂ : ∀ a, Finset (δ a)) {a : α}
+theorem pi_disjoint_of_disjoint {δ : α → Type*} {s : Finset α} (t₁ t₂ : ∀ a, Finset (δ a)) {a : α}
(ha : a ∈ s) (h : Disjoint (t₁ a) (t₂ a)) : Disjoint (s.pi t₁) (s.pi t₂) :=
disjoint_iff_ne.2 fun f₁ hf₁ f₂ hf₂ eq₁₂ =>
disjoint_iff_ne.1 h (f₁ a ha) (mem_pi.mp hf₁ a ha) (f₂ a ha) (mem_pi.mp hf₂ a ha) <|
@@ -2,15 +2,12 @@
Copyright (c) 2018 Johannes Hölzl. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
-
-! This file was ported from Lean 3 source module data.finset.pi
-! leanprover-community/mathlib commit b2c89893177f66a48daf993b7ba5ef7cddeff8c9
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Pi
+#align_import data.finset.pi from "leanprover-community/mathlib"@"b2c89893177f66a48daf993b7ba5ef7cddeff8c9"
+
/-!
# The cartesian product of finsets
-/
This is the second half of the changes originally in #5699, removing all occurrences of ;
after a space and implementing a linter rule to enforce it.
In most cases this 2-character substring has a space after it, so the following command was run first:
find . -type f -name "*.lean" -exec sed -i -E 's/ ; /; /g' {} \;
The remaining cases were few enough in number that they were done manually.
@@ -107,7 +107,7 @@ theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, F
Multiset.Pi.cons s.1 a b f a' (h ▸ h'))))
_ (insert_val_of_not_mem ha)
subst s'; rw [pi_cons]
- congr ; funext b
+ congr; funext b
exact ((pi s t).nodup.map <| Multiset.Pi.cons_injective ha).dedup.symm
#align finset.pi_insert Finset.pi_insert
ext
(#5258)
Co-authored-by: Xavier Roblot <46200072+xroblot@users.noreply.github.com> Co-authored-by: Joël Riou <joel.riou@universite-paris-saclay.fr> Co-authored-by: Riccardo Brasca <riccardo.brasca@gmail.com> Co-authored-by: Yury G. Kudryashov <urkud@urkud.name> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com> Co-authored-by: Pol'tta / Miyahara Kō <pol_tta@outlook.jp> Co-authored-by: Jason Yuen <jason_yuen2007@hotmail.com> Co-authored-by: Mario Carneiro <di.gama@gmail.com> Co-authored-by: Jireh Loreaux <loreaujy@gmail.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: Heather Macbeth <25316162+hrmacbeth@users.noreply.github.com> Co-authored-by: Jujian Zhang <jujian.zhang1998@outlook.com> Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
@@ -117,7 +117,7 @@ theorem pi_singletons {β : Type _} (s : Finset α) (f : α → β) :
constructor
· simp
intro a ha
- ext (i hi)
+ ext i hi
rw [mem_pi] at ha
simpa using ha i hi
#align finset.pi_singletons Finset.pi_singletons
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
! This file was ported from Lean 3 source module data.finset.pi
-! leanprover-community/mathlib commit 4c586d291f189eecb9d00581aeb3dd998ac34442
+! leanprover-community/mathlib commit b2c89893177f66a48daf993b7ba5ef7cddeff8c9
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -74,9 +74,9 @@ theorem Pi.cons_ne {s : Finset α} {a a' : α} {b : δ a} {f : ∀ a, a ∈ s
Multiset.Pi.cons_ne _ (Ne.symm ha)
#align finset.pi.cons_ne Finset.Pi.cons_ne
-theorem pi_cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
+theorem Pi.cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
Function.Injective (Pi.cons s a b) := fun e₁ e₂ eq =>
- @Multiset.pi_cons_injective α _ δ a b s.1 hs _ _ <|
+ @Multiset.Pi.cons_injective α _ δ a b s.1 hs _ _ <|
funext fun e =>
funext fun h =>
have :
@@ -84,7 +84,7 @@ theorem pi_cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
Pi.cons s a b e₂ e (by simpa only [Multiset.mem_cons, mem_insert] using h) :=
by rw [eq]
this
-#align finset.pi_cons_injective Finset.pi_cons_injective
+#align finset.pi.cons_injective Finset.Pi.cons_injective
@[simp]
theorem pi_empty {t : ∀ a : α, Finset (β a)} : pi (∅ : Finset α) t = singleton (Pi.empty β) :=
@@ -108,7 +108,7 @@ theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, F
_ (insert_val_of_not_mem ha)
subst s'; rw [pi_cons]
congr ; funext b
- exact ((pi s t).nodup.map <| Multiset.pi_cons_injective ha).dedup.symm
+ exact ((pi s t).nodup.map <| Multiset.Pi.cons_injective ha).dedup.symm
#align finset.pi_insert Finset.pi_insert
theorem pi_singletons {β : Type _} (s : Finset α) (f : α → β) :
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>
@@ -93,7 +93,7 @@ theorem pi_empty {t : ∀ a : α, Finset (β a)} : pi (∅ : Finset α) t = sing
@[simp]
theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, Finset (β a)} {a : α}
- (ha : a ∉ s) : pi (insert a s) t = (t a).bunionᵢ fun b => (pi s t).image (Pi.cons s a b) := by
+ (ha : a ∉ s) : pi (insert a s) t = (t a).biUnion fun b => (pi s t).image (Pi.cons s a b) := by
apply eq_of_veq
rw [← (pi (insert a s) t).2.dedup]
refine'
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".
@@ -93,8 +93,7 @@ theorem pi_empty {t : ∀ a : α, Finset (β a)} : pi (∅ : Finset α) t = sing
@[simp]
theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, Finset (β a)} {a : α}
- (ha : a ∉ s) : pi (insert a s) t = (t a).bunionᵢ fun b => (pi s t).image (Pi.cons s a b) :=
- by
+ (ha : a ∉ s) : pi (insert a s) t = (t a).bunionᵢ fun b => (pi s t).image (Pi.cons s a b) := by
apply eq_of_veq
rw [← (pi (insert a s) t).2.dedup]
refine'
@@ -113,8 +112,7 @@ theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, F
#align finset.pi_insert Finset.pi_insert
theorem pi_singletons {β : Type _} (s : Finset α) (f : α → β) :
- (s.pi fun a => ({f a} : Finset β)) = {fun a _ => f a} :=
- by
+ (s.pi fun a => ({f a} : Finset β)) = {fun a _ => f a} := by
rw [eq_singleton_iff_unique_mem]
constructor
· simp
Also removes a duplicate lemma that was added by accident while porting.
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johannes Hölzl
! This file was ported from Lean 3 source module data.finset.pi
-! leanprover-community/mathlib commit 9003f28797c0664a49e4179487267c494477d853
+! leanprover-community/mathlib commit 4c586d291f189eecb9d00581aeb3dd998ac34442
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -33,22 +33,23 @@ def Pi.empty (β : α → Sort _) (a : α) (h : a ∈ (∅ : Finset α)) : β a
Multiset.Pi.empty β a h
#align finset.pi.empty Finset.Pi.empty
-variable {δ : α → Type _} [DecidableEq α]
+universe u v
+variable {β : α → Type u} {δ : α → Sort v} [DecidableEq α]
/-- Given a finset `s` of `α` and for all `a : α` a finset `t a` of `δ a`, then one can define the
finset `s.pi t` of all functions defined on elements of `s` taking values in `t a` for `a ∈ s`.
Note that the elements of `s.pi t` are only partially defined, on `s`. -/
-def pi (s : Finset α) (t : ∀ a, Finset (δ a)) : Finset (∀ a ∈ s, δ a) :=
+def pi (s : Finset α) (t : ∀ a, Finset (β a)) : Finset (∀ a ∈ s, β a) :=
⟨s.1.pi fun a => (t a).1, s.nodup.pi fun a _ => (t a).nodup⟩
#align finset.pi Finset.pi
@[simp]
-theorem pi_val (s : Finset α) (t : ∀ a, Finset (δ a)) : (s.pi t).1 = s.1.pi fun a => (t a).1 :=
+theorem pi_val (s : Finset α) (t : ∀ a, Finset (β a)) : (s.pi t).1 = s.1.pi fun a => (t a).1 :=
rfl
#align finset.pi_val Finset.pi_val
@[simp]
-theorem mem_pi {s : Finset α} {t : ∀ a, Finset (δ a)} {f : ∀ a ∈ s, δ a} :
+theorem mem_pi {s : Finset α} {t : ∀ a, Finset (β a)} {f : ∀ a ∈ s, β a} :
f ∈ s.pi t ↔ ∀ (a) (h : a ∈ s), f a h ∈ t a :=
Multiset.mem_pi _ _ _
#align finset.mem_pi Finset.mem_pi
@@ -86,12 +87,12 @@ theorem pi_cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
#align finset.pi_cons_injective Finset.pi_cons_injective
@[simp]
-theorem pi_empty {t : ∀ a : α, Finset (δ a)} : pi (∅ : Finset α) t = singleton (Pi.empty δ) :=
+theorem pi_empty {t : ∀ a : α, Finset (β a)} : pi (∅ : Finset α) t = singleton (Pi.empty β) :=
rfl
#align finset.pi_empty Finset.pi_empty
@[simp]
-theorem pi_insert [∀ a, DecidableEq (δ a)] {s : Finset α} {t : ∀ a : α, Finset (δ a)} {a : α}
+theorem pi_insert [∀ a, DecidableEq (β a)] {s : Finset α} {t : ∀ a : α, Finset (β a)} {a : α}
(ha : a ∉ s) : pi (insert a s) t = (t a).bunionᵢ fun b => (pi s t).image (Pi.cons s a b) :=
by
apply eq_of_veq
@@ -128,7 +129,7 @@ theorem pi_const_singleton {β : Type _} (s : Finset α) (i : β) :
pi_singletons s fun _ => i
#align finset.pi_const_singleton Finset.pi_const_singleton
-theorem pi_subset {s : Finset α} (t₁ t₂ : ∀ a, Finset (δ a)) (h : ∀ a ∈ s, t₁ a ⊆ t₂ a) :
+theorem pi_subset {s : Finset α} (t₁ t₂ : ∀ a, Finset (β a)) (h : ∀ a ∈ s, t₁ a ⊆ t₂ a) :
s.pi t₁ ⊆ s.pi t₂ := fun _ hg => mem_pi.2 fun a ha => h a ha (mem_pi.mp hg a ha)
#align finset.pi_subset Finset.pi_subset
@@ -55,32 +55,32 @@ theorem mem_pi {s : Finset α} {t : ∀ a, Finset (δ a)} {f : ∀ a ∈ s, δ a
/-- Given a function `f` defined on a finset `s`, define a new function on the finset `s ∪ {a}`,
equal to `f` on `s` and sending `a` to a given value `b`. This function is denoted
-`s.pi.cons a b f`. If `a` already belongs to `s`, the new function takes the value `b` at `a`
+`s.Pi.cons a b f`. If `a` already belongs to `s`, the new function takes the value `b` at `a`
anyway. -/
-def pi.cons (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (a' : α) (h : a' ∈ insert a s) :
+def Pi.cons (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (a' : α) (h : a' ∈ insert a s) :
δ a' :=
Multiset.Pi.cons s.1 a b f _ (Multiset.mem_cons.2 <| mem_insert.symm.2 h)
-#align finset.pi.cons Finset.pi.cons
+#align finset.pi.cons Finset.Pi.cons
@[simp]
-theorem pi.cons_same (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (h : a ∈ insert a s) :
- pi.cons s a b f a h = b :=
+theorem Pi.cons_same (s : Finset α) (a : α) (b : δ a) (f : ∀ a, a ∈ s → δ a) (h : a ∈ insert a s) :
+ Pi.cons s a b f a h = b :=
Multiset.Pi.cons_same _
-#align finset.pi.cons_same Finset.pi.cons_same
+#align finset.pi.cons_same Finset.Pi.cons_same
-theorem pi.cons_ne {s : Finset α} {a a' : α} {b : δ a} {f : ∀ a, a ∈ s → δ a} {h : a' ∈ insert a s}
- (ha : a ≠ a') : pi.cons s a b f a' h = f a' ((mem_insert.1 h).resolve_left ha.symm) :=
+theorem Pi.cons_ne {s : Finset α} {a a' : α} {b : δ a} {f : ∀ a, a ∈ s → δ a} {h : a' ∈ insert a s}
+ (ha : a ≠ a') : Pi.cons s a b f a' h = f a' ((mem_insert.1 h).resolve_left ha.symm) :=
Multiset.Pi.cons_ne _ (Ne.symm ha)
-#align finset.pi.cons_ne Finset.pi.cons_ne
+#align finset.pi.cons_ne Finset.Pi.cons_ne
theorem pi_cons_injective {a : α} {b : δ a} {s : Finset α} (hs : a ∉ s) :
- Function.Injective (pi.cons s a b) := fun e₁ e₂ eq =>
+ Function.Injective (Pi.cons s a b) := fun e₁ e₂ eq =>
@Multiset.pi_cons_injective α _ δ a b s.1 hs _ _ <|
funext fun e =>
funext fun h =>
have :
- pi.cons s a b e₁ e (by simpa only [Multiset.mem_cons, mem_insert] using h) =
- pi.cons s a b e₂ e (by simpa only [Multiset.mem_cons, mem_insert] using h) :=
+ Pi.cons s a b e₁ e (by simpa only [Multiset.mem_cons, mem_insert] using h) =
+ Pi.cons s a b e₂ e (by simpa only [Multiset.mem_cons, mem_insert] using h) :=
by rw [eq]
this
#align finset.pi_cons_injective Finset.pi_cons_injective
@@ -92,7 +92,7 @@ theorem pi_empty {t : ∀ a : α, Finset (δ a)} : pi (∅ : Finset α) t = sing
@[simp]
theorem pi_insert [∀ a, DecidableEq (δ a)] {s : Finset α} {t : ∀ a : α, Finset (δ a)} {a : α}
- (ha : a ∉ s) : pi (insert a s) t = (t a).bunionᵢ fun b => (pi s t).image (pi.cons s a b) :=
+ (ha : a ∉ s) : pi (insert a s) t = (t a).bunionᵢ fun b => (pi s t).image (Pi.cons s a b) :=
by
apply eq_of_veq
rw [← (pi (insert a s) t).2.dedup]
This works around https://github.com/leanprover/lean4/issues/2049. By manually adding compiler support for these recursors, we make a large number of porting notes redundant.
@@ -38,8 +38,7 @@ variable {δ : α → Type _} [DecidableEq α]
/-- Given a finset `s` of `α` and for all `a : α` a finset `t a` of `δ a`, then one can define the
finset `s.pi t` of all functions defined on elements of `s` taking values in `t a` for `a ∈ s`.
Note that the elements of `s.pi t` are only partially defined, on `s`. -/
---Porting note: marked noncomputable
-noncomputable def pi (s : Finset α) (t : ∀ a, Finset (δ a)) : Finset (∀ a ∈ s, δ a) :=
+def pi (s : Finset α) (t : ∀ a, Finset (δ a)) : Finset (∀ a ∈ s, δ a) :=
⟨s.1.pi fun a => (t a).1, s.nodup.pi fun a _ => (t a).nodup⟩
#align finset.pi Finset.pi
The unported dependencies are