data.fin.interval
⟷
Mathlib.Data.Fin.Interval
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)
@@ -16,6 +16,16 @@ This file proves that `fin n` is a `locally_finite_order` and calculates the car
intervals as finsets and fintypes.
-/
+namespace fin
+variables {n : ℕ} (a b : fin n)
+
+@[simp, norm_cast] lemma coe_sup : (↑(a ⊔ b) : ℕ) = a ⊔ b := rfl
+@[simp, norm_cast] lemma coe_inf : (↑(a ⊓ b) : ℕ) = a ⊓ b := rfl
+@[simp, norm_cast] lemma coe_max : (↑(max a b) : ℕ) = max a b := rfl
+@[simp, norm_cast] lemma coe_min : (↑(min a b) : ℕ) = min a b := rfl
+
+end fin
+
open finset fin function
open_locale big_operators
@@ -39,6 +49,7 @@ lemma Icc_eq_finset_subtype : Icc a b = (Icc (a : ℕ) b).fin n := rfl
lemma Ico_eq_finset_subtype : Ico a b = (Ico (a : ℕ) b).fin n := rfl
lemma Ioc_eq_finset_subtype : Ioc a b = (Ioc (a : ℕ) b).fin n := rfl
lemma Ioo_eq_finset_subtype : Ioo a b = (Ioo (a : ℕ) b).fin n := rfl
+lemma uIcc_eq_finset_subtype : uIcc a b = (uIcc (a : ℕ) b).fin n := rfl
@[simp] lemma map_subtype_embedding_Icc : (Icc a b).map fin.coe_embedding = Icc a b :=
by simp [Icc_eq_finset_subtype, finset.fin, finset.map_map, Icc_filter_lt_of_lt_right]
@@ -52,6 +63,9 @@ by simp [Ioc_eq_finset_subtype, finset.fin, finset.map_map, Ioc_filter_lt_of_lt_
@[simp] lemma map_subtype_embedding_Ioo : (Ioo a b).map fin.coe_embedding = Ioo a b :=
by simp [Ioo_eq_finset_subtype, finset.fin, finset.map_map]
+@[simp] lemma map_subtype_embedding_uIcc : (uIcc a b).map coe_embedding = uIcc a b :=
+map_subtype_embedding_Icc _ _
+
@[simp] lemma card_Icc : (Icc a b).card = b + 1 - a :=
by rw [←nat.card_Icc, ←map_subtype_embedding_Icc, card_map]
@@ -64,6 +78,9 @@ by rw [←nat.card_Ioc, ←map_subtype_embedding_Ioc, card_map]
@[simp] lemma card_Ioo : (Ioo a b).card = b - a - 1 :=
by rw [←nat.card_Ioo, ←map_subtype_embedding_Ioo, card_map]
+@[simp] lemma card_uIcc : (uIcc a b).card = (b - a : ℤ).nat_abs + 1 :=
+by rw [coe_coe, coe_coe, ←nat.card_uIcc, ←map_subtype_embedding_uIcc, card_map]
+
@[simp] lemma card_fintype_Icc : fintype.card (set.Icc a b) = b + 1 - a :=
by rw [←card_Icc, fintype.card_of_finset]
@@ -76,6 +93,9 @@ by rw [←card_Ioc, fintype.card_of_finset]
@[simp] lemma card_fintype_Ioo : fintype.card (set.Ioo a b) = b - a - 1 :=
by rw [←card_Ioo, fintype.card_of_finset]
+@[simp] lemma card_fintype_uIcc : fintype.card (set.uIcc a b) = (b - a : ℤ).nat_abs + 1 :=
+by rw [←card_uIcc, fintype.card_of_finset]
+
lemma Ici_eq_finset_subtype : Ici a = (Icc (a : ℕ) n).fin n := by { ext, simp }
lemma Ioi_eq_finset_subtype : Ioi a = (Ioc (a : ℕ) n).fin n := by { ext, simp }
lemma Iic_eq_finset_subtype : Iic b = (Iic (b : ℕ)).fin n := rfl
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
import Data.Nat.Interval
-import Data.Finset.LocallyFinite.Basic
+import Order.Interval.Finset.Basic
#align_import data.fin.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
import Data.Nat.Interval
-import Data.Finset.LocallyFinite
+import Data.Finset.LocallyFinite.Basic
#align_import data.fin.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2021 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
-import Mathbin.Data.Nat.Interval
-import Mathbin.Data.Finset.LocallyFinite
+import Data.Nat.Interval
+import Data.Finset.LocallyFinite
#align_import data.fin.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2021 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-
-! This file was ported from Lean 3 source module data.fin.interval
-! leanprover-community/mathlib commit 1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Nat.Interval
import Mathbin.Data.Finset.LocallyFinite
+#align_import data.fin.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
+
/-!
# Finite intervals in `fin n`
mathlib commit https://github.com/leanprover-community/mathlib/commit/bf2428c9486c407ca38b5b3fb10b87dad0bc99fa
@@ -26,25 +26,33 @@ namespace Fin
variable {n : ℕ} (a b : Fin n)
+#print Fin.coe_sup /-
@[simp, norm_cast]
theorem coe_sup : (↑(a ⊔ b) : ℕ) = a ⊔ b :=
rfl
#align fin.coe_sup Fin.coe_sup
+-/
+#print Fin.coe_inf /-
@[simp, norm_cast]
theorem coe_inf : (↑(a ⊓ b) : ℕ) = a ⊓ b :=
rfl
#align fin.coe_inf Fin.coe_inf
+-/
+#print Fin.coe_max /-
@[simp, norm_cast]
theorem coe_max : (↑(max a b) : ℕ) = max a b :=
rfl
#align fin.coe_max Fin.coe_max
+-/
+#print Fin.coe_min /-
@[simp, norm_cast]
theorem coe_min : (↑(min a b) : ℕ) = min a b :=
rfl
#align fin.coe_min Fin.coe_min
+-/
end Fin
@@ -92,9 +100,11 @@ theorem Ioo_eq_finset_subtype : Ioo a b = (Ioo (a : ℕ) b).Fin n :=
#align fin.Ioo_eq_finset_subtype Fin.Ioo_eq_finset_subtype
-/
+#print Fin.uIcc_eq_finset_subtype /-
theorem uIcc_eq_finset_subtype : uIcc a b = (uIcc (a : ℕ) b).Fin n :=
rfl
#align fin.uIcc_eq_finset_subtype Fin.uIcc_eq_finset_subtype
+-/
#print Fin.map_valEmbedding_Icc /-
@[simp]
@@ -124,10 +134,12 @@ theorem map_valEmbedding_Ioo : (Ioo a b).map Fin.valEmbedding = Ioo a b := by
#align fin.map_subtype_embedding_Ioo Fin.map_valEmbedding_Ioo
-/
+#print Fin.map_subtype_embedding_uIcc /-
@[simp]
theorem map_subtype_embedding_uIcc : (uIcc a b).map valEmbedding = uIcc a b :=
map_valEmbedding_Icc _ _
#align fin.map_subtype_embedding_uIcc Fin.map_subtype_embedding_uIcc
+-/
#print Fin.card_Icc /-
@[simp]
@@ -157,10 +169,12 @@ theorem card_Ioo : (Ioo a b).card = b - a - 1 := by
#align fin.card_Ioo Fin.card_Ioo
-/
+#print Fin.card_uIcc /-
@[simp]
theorem card_uIcc : (uIcc a b).card = (b - a : ℤ).natAbs + 1 := by
rw [coe_coe, coe_coe, ← Nat.card_uIcc, ← map_subtype_embedding_uIcc, card_map]
#align fin.card_uIcc Fin.card_uIcc
+-/
#print Fin.card_fintypeIcc /-
@[simp]
@@ -190,10 +204,12 @@ theorem card_fintypeIoo : Fintype.card (Set.Ioo a b) = b - a - 1 := by
#align fin.card_fintype_Ioo Fin.card_fintypeIoo
-/
+#print Fin.card_fintype_uIcc /-
@[simp]
-theorem card_fintypeUIcc : Fintype.card (Set.uIcc a b) = (b - a : ℤ).natAbs + 1 := by
+theorem card_fintype_uIcc : Fintype.card (Set.uIcc a b) = (b - a : ℤ).natAbs + 1 := by
rw [← card_uIcc, Fintype.card_ofFinset]
-#align fin.card_fintype_uIcc Fin.card_fintypeUIcc
+#align fin.card_fintype_uIcc Fin.card_fintype_uIcc
+-/
#print Fin.Ici_eq_finset_subtype /-
theorem Ici_eq_finset_subtype : Ici a = (Icc (a : ℕ) n).Fin n := by ext; simp
mathlib commit https://github.com/leanprover-community/mathlib/commit/2fe465deb81bcd7ccafa065bb686888a82f15372
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
! This file was ported from Lean 3 source module data.fin.interval
-! leanprover-community/mathlib commit a11f9106a169dd302a285019e5165f8ab32ff433
+! leanprover-community/mathlib commit 1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -22,6 +22,32 @@ intervals as finsets and fintypes.
-/
+namespace Fin
+
+variable {n : ℕ} (a b : Fin n)
+
+@[simp, norm_cast]
+theorem coe_sup : (↑(a ⊔ b) : ℕ) = a ⊔ b :=
+ rfl
+#align fin.coe_sup Fin.coe_sup
+
+@[simp, norm_cast]
+theorem coe_inf : (↑(a ⊓ b) : ℕ) = a ⊓ b :=
+ rfl
+#align fin.coe_inf Fin.coe_inf
+
+@[simp, norm_cast]
+theorem coe_max : (↑(max a b) : ℕ) = max a b :=
+ rfl
+#align fin.coe_max Fin.coe_max
+
+@[simp, norm_cast]
+theorem coe_min : (↑(min a b) : ℕ) = min a b :=
+ rfl
+#align fin.coe_min Fin.coe_min
+
+end Fin
+
open Finset Fin Function
open scoped BigOperators
@@ -66,6 +92,10 @@ theorem Ioo_eq_finset_subtype : Ioo a b = (Ioo (a : ℕ) b).Fin n :=
#align fin.Ioo_eq_finset_subtype Fin.Ioo_eq_finset_subtype
-/
+theorem uIcc_eq_finset_subtype : uIcc a b = (uIcc (a : ℕ) b).Fin n :=
+ rfl
+#align fin.uIcc_eq_finset_subtype Fin.uIcc_eq_finset_subtype
+
#print Fin.map_valEmbedding_Icc /-
@[simp]
theorem map_valEmbedding_Icc : (Icc a b).map Fin.valEmbedding = Icc a b := by
@@ -94,6 +124,11 @@ theorem map_valEmbedding_Ioo : (Ioo a b).map Fin.valEmbedding = Ioo a b := by
#align fin.map_subtype_embedding_Ioo Fin.map_valEmbedding_Ioo
-/
+@[simp]
+theorem map_subtype_embedding_uIcc : (uIcc a b).map valEmbedding = uIcc a b :=
+ map_valEmbedding_Icc _ _
+#align fin.map_subtype_embedding_uIcc Fin.map_subtype_embedding_uIcc
+
#print Fin.card_Icc /-
@[simp]
theorem card_Icc : (Icc a b).card = b + 1 - a := by
@@ -122,6 +157,11 @@ theorem card_Ioo : (Ioo a b).card = b - a - 1 := by
#align fin.card_Ioo Fin.card_Ioo
-/
+@[simp]
+theorem card_uIcc : (uIcc a b).card = (b - a : ℤ).natAbs + 1 := by
+ rw [coe_coe, coe_coe, ← Nat.card_uIcc, ← map_subtype_embedding_uIcc, card_map]
+#align fin.card_uIcc Fin.card_uIcc
+
#print Fin.card_fintypeIcc /-
@[simp]
theorem card_fintypeIcc : Fintype.card (Set.Icc a b) = b + 1 - a := by
@@ -150,6 +190,11 @@ theorem card_fintypeIoo : Fintype.card (Set.Ioo a b) = b - a - 1 := by
#align fin.card_fintype_Ioo Fin.card_fintypeIoo
-/
+@[simp]
+theorem card_fintypeUIcc : Fintype.card (Set.uIcc a b) = (b - a : ℤ).natAbs + 1 := by
+ rw [← card_uIcc, Fintype.card_ofFinset]
+#align fin.card_fintype_uIcc Fin.card_fintypeUIcc
+
#print Fin.Ici_eq_finset_subtype /-
theorem Ici_eq_finset_subtype : Ici a = (Icc (a : ℕ) n).Fin n := by ext; simp
#align fin.Ici_eq_finset_subtype Fin.Ici_eq_finset_subtype
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -42,96 +42,137 @@ namespace Fin
variable {n} (a b : Fin n)
+#print Fin.Icc_eq_finset_subtype /-
theorem Icc_eq_finset_subtype : Icc a b = (Icc (a : ℕ) b).Fin n :=
rfl
#align fin.Icc_eq_finset_subtype Fin.Icc_eq_finset_subtype
+-/
+#print Fin.Ico_eq_finset_subtype /-
theorem Ico_eq_finset_subtype : Ico a b = (Ico (a : ℕ) b).Fin n :=
rfl
#align fin.Ico_eq_finset_subtype Fin.Ico_eq_finset_subtype
+-/
+#print Fin.Ioc_eq_finset_subtype /-
theorem Ioc_eq_finset_subtype : Ioc a b = (Ioc (a : ℕ) b).Fin n :=
rfl
#align fin.Ioc_eq_finset_subtype Fin.Ioc_eq_finset_subtype
+-/
+#print Fin.Ioo_eq_finset_subtype /-
theorem Ioo_eq_finset_subtype : Ioo a b = (Ioo (a : ℕ) b).Fin n :=
rfl
#align fin.Ioo_eq_finset_subtype Fin.Ioo_eq_finset_subtype
+-/
+#print Fin.map_valEmbedding_Icc /-
@[simp]
theorem map_valEmbedding_Icc : (Icc a b).map Fin.valEmbedding = Icc a b := by
simp [Icc_eq_finset_subtype, Finset.fin, Finset.map_map, Icc_filter_lt_of_lt_right]
#align fin.map_subtype_embedding_Icc Fin.map_valEmbedding_Icc
+-/
+#print Fin.map_valEmbedding_Ico /-
@[simp]
theorem map_valEmbedding_Ico : (Ico a b).map Fin.valEmbedding = Ico a b := by
simp [Ico_eq_finset_subtype, Finset.fin, Finset.map_map]
#align fin.map_subtype_embedding_Ico Fin.map_valEmbedding_Ico
+-/
+#print Fin.map_valEmbedding_Ioc /-
@[simp]
theorem map_valEmbedding_Ioc : (Ioc a b).map Fin.valEmbedding = Ioc a b := by
simp [Ioc_eq_finset_subtype, Finset.fin, Finset.map_map, Ioc_filter_lt_of_lt_right]
#align fin.map_subtype_embedding_Ioc Fin.map_valEmbedding_Ioc
+-/
+#print Fin.map_valEmbedding_Ioo /-
@[simp]
theorem map_valEmbedding_Ioo : (Ioo a b).map Fin.valEmbedding = Ioo a b := by
simp [Ioo_eq_finset_subtype, Finset.fin, Finset.map_map]
#align fin.map_subtype_embedding_Ioo Fin.map_valEmbedding_Ioo
+-/
+#print Fin.card_Icc /-
@[simp]
theorem card_Icc : (Icc a b).card = b + 1 - a := by
rw [← Nat.card_Icc, ← map_subtype_embedding_Icc, card_map]
#align fin.card_Icc Fin.card_Icc
+-/
+#print Fin.card_Ico /-
@[simp]
theorem card_Ico : (Ico a b).card = b - a := by
rw [← Nat.card_Ico, ← map_subtype_embedding_Ico, card_map]
#align fin.card_Ico Fin.card_Ico
+-/
+#print Fin.card_Ioc /-
@[simp]
theorem card_Ioc : (Ioc a b).card = b - a := by
rw [← Nat.card_Ioc, ← map_subtype_embedding_Ioc, card_map]
#align fin.card_Ioc Fin.card_Ioc
+-/
+#print Fin.card_Ioo /-
@[simp]
theorem card_Ioo : (Ioo a b).card = b - a - 1 := by
rw [← Nat.card_Ioo, ← map_subtype_embedding_Ioo, card_map]
#align fin.card_Ioo Fin.card_Ioo
+-/
+#print Fin.card_fintypeIcc /-
@[simp]
theorem card_fintypeIcc : Fintype.card (Set.Icc a b) = b + 1 - a := by
rw [← card_Icc, Fintype.card_ofFinset]
#align fin.card_fintype_Icc Fin.card_fintypeIcc
+-/
+#print Fin.card_fintypeIco /-
@[simp]
theorem card_fintypeIco : Fintype.card (Set.Ico a b) = b - a := by
rw [← card_Ico, Fintype.card_ofFinset]
#align fin.card_fintype_Ico Fin.card_fintypeIco
+-/
+#print Fin.card_fintypeIoc /-
@[simp]
theorem card_fintypeIoc : Fintype.card (Set.Ioc a b) = b - a := by
rw [← card_Ioc, Fintype.card_ofFinset]
#align fin.card_fintype_Ioc Fin.card_fintypeIoc
+-/
+#print Fin.card_fintypeIoo /-
@[simp]
theorem card_fintypeIoo : Fintype.card (Set.Ioo a b) = b - a - 1 := by
rw [← card_Ioo, Fintype.card_ofFinset]
#align fin.card_fintype_Ioo Fin.card_fintypeIoo
+-/
+#print Fin.Ici_eq_finset_subtype /-
theorem Ici_eq_finset_subtype : Ici a = (Icc (a : ℕ) n).Fin n := by ext; simp
#align fin.Ici_eq_finset_subtype Fin.Ici_eq_finset_subtype
+-/
+#print Fin.Ioi_eq_finset_subtype /-
theorem Ioi_eq_finset_subtype : Ioi a = (Ioc (a : ℕ) n).Fin n := by ext; simp
#align fin.Ioi_eq_finset_subtype Fin.Ioi_eq_finset_subtype
+-/
+#print Fin.Iic_eq_finset_subtype /-
theorem Iic_eq_finset_subtype : Iic b = (Iic (b : ℕ)).Fin n :=
rfl
#align fin.Iic_eq_finset_subtype Fin.Iic_eq_finset_subtype
+-/
+#print Fin.Iio_eq_finset_subtype /-
theorem Iio_eq_finset_subtype : Iio b = (Iio (b : ℕ)).Fin n :=
rfl
#align fin.Iio_eq_finset_subtype Fin.Iio_eq_finset_subtype
+-/
+#print Fin.map_valEmbedding_Ici /-
@[simp]
theorem map_valEmbedding_Ici : (Ici a).map Fin.valEmbedding = Icc a (n - 1) :=
by
@@ -144,7 +185,9 @@ theorem map_valEmbedding_Ici : (Ici a).map Fin.valEmbedding = Icc a (n - 1) :=
· exact Fin.elim0 a
· exact fun hx => ⟨⟨x, Nat.lt_succ_iff.2 hx.2⟩, hx.1, rfl⟩
#align fin.map_subtype_embedding_Ici Fin.map_valEmbedding_Ici
+-/
+#print Fin.map_valEmbedding_Ioi /-
@[simp]
theorem map_valEmbedding_Ioi : (Ioi a).map Fin.valEmbedding = Ioc a (n - 1) :=
by
@@ -157,55 +200,76 @@ theorem map_valEmbedding_Ioi : (Ioi a).map Fin.valEmbedding = Ioc a (n - 1) :=
· exact Fin.elim0 a
· exact fun hx => ⟨⟨x, Nat.lt_succ_iff.2 hx.2⟩, hx.1, rfl⟩
#align fin.map_subtype_embedding_Ioi Fin.map_valEmbedding_Ioi
+-/
+#print Fin.map_valEmbedding_Iic /-
@[simp]
theorem map_valEmbedding_Iic : (Iic b).map Fin.valEmbedding = Iic b := by
simp [Iic_eq_finset_subtype, Finset.fin, Finset.map_map, Iic_filter_lt_of_lt_right]
#align fin.map_subtype_embedding_Iic Fin.map_valEmbedding_Iic
+-/
+#print Fin.map_valEmbedding_Iio /-
@[simp]
theorem map_valEmbedding_Iio : (Iio b).map Fin.valEmbedding = Iio b := by
simp [Iio_eq_finset_subtype, Finset.fin, Finset.map_map]
#align fin.map_subtype_embedding_Iio Fin.map_valEmbedding_Iio
+-/
+#print Fin.card_Ici /-
@[simp]
theorem card_Ici : (Ici a).card = n - a := by cases n; · exact Fin.elim0 a;
rw [← card_map, map_subtype_embedding_Ici, Nat.card_Icc]; rfl
#align fin.card_Ici Fin.card_Ici
+-/
+#print Fin.card_Ioi /-
@[simp]
theorem card_Ioi : (Ioi a).card = n - 1 - a := by
rw [← card_map, map_subtype_embedding_Ioi, Nat.card_Ioc]
#align fin.card_Ioi Fin.card_Ioi
+-/
+#print Fin.card_Iic /-
@[simp]
theorem card_Iic : (Iic b).card = b + 1 := by
rw [← Nat.card_Iic b, ← map_subtype_embedding_Iic, card_map]
#align fin.card_Iic Fin.card_Iic
+-/
+#print Fin.card_Iio /-
@[simp]
theorem card_Iio : (Iio b).card = b := by
rw [← Nat.card_Iio b, ← map_subtype_embedding_Iio, card_map]
#align fin.card_Iio Fin.card_Iio
+-/
+#print Fin.card_fintypeIci /-
@[simp]
theorem card_fintypeIci : Fintype.card (Set.Ici a) = n - a := by
rw [Fintype.card_ofFinset, card_Ici]
#align fin.card_fintype_Ici Fin.card_fintypeIci
+-/
+#print Fin.card_fintypeIoi /-
@[simp]
theorem card_fintypeIoi : Fintype.card (Set.Ioi a) = n - 1 - a := by
rw [Fintype.card_ofFinset, card_Ioi]
#align fin.card_fintype_Ioi Fin.card_fintypeIoi
+-/
+#print Fin.card_fintypeIic /-
@[simp]
theorem card_fintypeIic : Fintype.card (Set.Iic b) = b + 1 := by
rw [Fintype.card_ofFinset, card_Iic]
#align fin.card_fintype_Iic Fin.card_fintypeIic
+-/
+#print Fin.card_fintypeIio /-
@[simp]
theorem card_fintypeIio : Fintype.card (Set.Iio b) = b := by rw [Fintype.card_ofFinset, card_Iio]
#align fin.card_fintype_Iio Fin.card_fintypeIio
+-/
end Fin
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -24,7 +24,7 @@ intervals as finsets and fintypes.
open Finset Fin Function
-open BigOperators
+open scoped BigOperators
variable (n : ℕ)
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -42,222 +42,96 @@ namespace Fin
variable {n} (a b : Fin n)
-/- warning: fin.Icc_eq_finset_subtype -> Fin.Icc_eq_finset_subtype is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Icc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b) (Finset.fin n (Finset.Icc.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b)))
-but is expected to have type
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Icc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b) (Finset.fin n (Finset.Icc.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) (Fin.val n b)))
-Case conversion may be inaccurate. Consider using '#align fin.Icc_eq_finset_subtype Fin.Icc_eq_finset_subtypeₓ'. -/
theorem Icc_eq_finset_subtype : Icc a b = (Icc (a : ℕ) b).Fin n :=
rfl
#align fin.Icc_eq_finset_subtype Fin.Icc_eq_finset_subtype
-/- warning: fin.Ico_eq_finset_subtype -> Fin.Ico_eq_finset_subtype is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Ico.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b) (Finset.fin n (Finset.Ico.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b)))
-but is expected to have type
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Ico.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b) (Finset.fin n (Finset.Ico.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) (Fin.val n b)))
-Case conversion may be inaccurate. Consider using '#align fin.Ico_eq_finset_subtype Fin.Ico_eq_finset_subtypeₓ'. -/
theorem Ico_eq_finset_subtype : Ico a b = (Ico (a : ℕ) b).Fin n :=
rfl
#align fin.Ico_eq_finset_subtype Fin.Ico_eq_finset_subtype
-/- warning: fin.Ioc_eq_finset_subtype -> Fin.Ioc_eq_finset_subtype is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Ioc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b) (Finset.fin n (Finset.Ioc.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b)))
-but is expected to have type
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Ioc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b) (Finset.fin n (Finset.Ioc.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) (Fin.val n b)))
-Case conversion may be inaccurate. Consider using '#align fin.Ioc_eq_finset_subtype Fin.Ioc_eq_finset_subtypeₓ'. -/
theorem Ioc_eq_finset_subtype : Ioc a b = (Ioc (a : ℕ) b).Fin n :=
rfl
#align fin.Ioc_eq_finset_subtype Fin.Ioc_eq_finset_subtype
-/- warning: fin.Ioo_eq_finset_subtype -> Fin.Ioo_eq_finset_subtype is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Ioo.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b) (Finset.fin n (Finset.Ioo.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b)))
-but is expected to have type
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Ioo.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b) (Finset.fin n (Finset.Ioo.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) (Fin.val n b)))
-Case conversion may be inaccurate. Consider using '#align fin.Ioo_eq_finset_subtype Fin.Ioo_eq_finset_subtypeₓ'. -/
theorem Ioo_eq_finset_subtype : Ioo a b = (Ioo (a : ℕ) b).Fin n :=
rfl
#align fin.Ioo_eq_finset_subtype Fin.Ioo_eq_finset_subtype
-/- warning: fin.map_subtype_embedding_Icc -> Fin.map_valEmbedding_Icc is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Icc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b)) (Finset.Icc.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b))
-but is expected to have type
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Icc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b)) (Finset.Icc.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) (Fin.val n b))
-Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Icc Fin.map_valEmbedding_Iccₓ'. -/
@[simp]
theorem map_valEmbedding_Icc : (Icc a b).map Fin.valEmbedding = Icc a b := by
simp [Icc_eq_finset_subtype, Finset.fin, Finset.map_map, Icc_filter_lt_of_lt_right]
#align fin.map_subtype_embedding_Icc Fin.map_valEmbedding_Icc
-/- warning: fin.map_subtype_embedding_Ico -> Fin.map_valEmbedding_Ico is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ico.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b)) (Finset.Ico.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b))
-but is expected to have type
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ico.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b)) (Finset.Ico.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) (Fin.val n b))
-Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Ico Fin.map_valEmbedding_Icoₓ'. -/
@[simp]
theorem map_valEmbedding_Ico : (Ico a b).map Fin.valEmbedding = Ico a b := by
simp [Ico_eq_finset_subtype, Finset.fin, Finset.map_map]
#align fin.map_subtype_embedding_Ico Fin.map_valEmbedding_Ico
-/- warning: fin.map_subtype_embedding_Ioc -> Fin.map_valEmbedding_Ioc is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ioc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b)) (Finset.Ioc.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b))
-but is expected to have type
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ioc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b)) (Finset.Ioc.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) (Fin.val n b))
-Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Ioc Fin.map_valEmbedding_Iocₓ'. -/
@[simp]
theorem map_valEmbedding_Ioc : (Ioc a b).map Fin.valEmbedding = Ioc a b := by
simp [Ioc_eq_finset_subtype, Finset.fin, Finset.map_map, Ioc_filter_lt_of_lt_right]
#align fin.map_subtype_embedding_Ioc Fin.map_valEmbedding_Ioc
-/- warning: fin.map_subtype_embedding_Ioo -> Fin.map_valEmbedding_Ioo is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ioo.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b)) (Finset.Ioo.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b))
-but is expected to have type
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ioo.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b)) (Finset.Ioo.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) (Fin.val n b))
-Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Ioo Fin.map_valEmbedding_Iooₓ'. -/
@[simp]
theorem map_valEmbedding_Ioo : (Ioo a b).map Fin.valEmbedding = Ioo a b := by
simp [Ioo_eq_finset_subtype, Finset.fin, Finset.map_map]
#align fin.map_subtype_embedding_Ioo Fin.map_valEmbedding_Ioo
-/- warning: fin.card_Icc -> Fin.card_Icc is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} Nat (Finset.card.{0} (Fin n) (Finset.Icc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a))
-but is expected to have type
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} Nat (Finset.card.{0} (Fin n) (Finset.Icc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (Fin.val n b) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) (Fin.val n a))
-Case conversion may be inaccurate. Consider using '#align fin.card_Icc Fin.card_Iccₓ'. -/
@[simp]
theorem card_Icc : (Icc a b).card = b + 1 - a := by
rw [← Nat.card_Icc, ← map_subtype_embedding_Icc, card_map]
#align fin.card_Icc Fin.card_Icc
-/- warning: fin.card_Ico -> Fin.card_Ico is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} Nat (Finset.card.{0} (Fin n) (Finset.Ico.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a))
-but is expected to have type
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} Nat (Finset.card.{0} (Fin n) (Finset.Ico.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Fin.val n b) (Fin.val n a))
-Case conversion may be inaccurate. Consider using '#align fin.card_Ico Fin.card_Icoₓ'. -/
@[simp]
theorem card_Ico : (Ico a b).card = b - a := by
rw [← Nat.card_Ico, ← map_subtype_embedding_Ico, card_map]
#align fin.card_Ico Fin.card_Ico
-/- warning: fin.card_Ioc -> Fin.card_Ioc is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} Nat (Finset.card.{0} (Fin n) (Finset.Ioc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a))
-but is expected to have type
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} Nat (Finset.card.{0} (Fin n) (Finset.Ioc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Fin.val n b) (Fin.val n a))
-Case conversion may be inaccurate. Consider using '#align fin.card_Ioc Fin.card_Iocₓ'. -/
@[simp]
theorem card_Ioc : (Ioc a b).card = b - a := by
rw [← Nat.card_Ioc, ← map_subtype_embedding_Ioc, card_map]
#align fin.card_Ioc Fin.card_Ioc
-/- warning: fin.card_Ioo -> Fin.card_Ioo is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} Nat (Finset.card.{0} (Fin n) (Finset.Ioo.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a)) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
-but is expected to have type
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} Nat (Finset.card.{0} (Fin n) (Finset.Ioo.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Fin.val n b) (Fin.val n a)) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
-Case conversion may be inaccurate. Consider using '#align fin.card_Ioo Fin.card_Iooₓ'. -/
@[simp]
theorem card_Ioo : (Ioo a b).card = b - a - 1 := by
rw [← Nat.card_Ioo, ← map_subtype_embedding_Ioo, card_map]
#align fin.card_Ioo Fin.card_Ioo
-/- warning: fin.card_fintype_Icc -> Fin.card_fintypeIcc is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} Nat (Fintype.card.{0} (coeSort.{1, 2} (Set.{0} (Fin n)) Type (Set.hasCoeToSort.{0} (Fin n)) (Set.Icc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) a b)) (Set.fintypeIcc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a))
-but is expected to have type
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} Nat (Fintype.card.{0} (Set.Elem.{0} (Fin n) (Set.Icc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) a b)) (Set.fintypeIcc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (Fin.val n b) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) (Fin.val n a))
-Case conversion may be inaccurate. Consider using '#align fin.card_fintype_Icc Fin.card_fintypeIccₓ'. -/
@[simp]
theorem card_fintypeIcc : Fintype.card (Set.Icc a b) = b + 1 - a := by
rw [← card_Icc, Fintype.card_ofFinset]
#align fin.card_fintype_Icc Fin.card_fintypeIcc
-/- warning: fin.card_fintype_Ico -> Fin.card_fintypeIco is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} Nat (Fintype.card.{0} (coeSort.{1, 2} (Set.{0} (Fin n)) Type (Set.hasCoeToSort.{0} (Fin n)) (Set.Ico.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) a b)) (Set.fintypeIco.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a))
-but is expected to have type
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} Nat (Fintype.card.{0} (Set.Elem.{0} (Fin n) (Set.Ico.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) a b)) (Set.fintypeIco.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Fin.val n b) (Fin.val n a))
-Case conversion may be inaccurate. Consider using '#align fin.card_fintype_Ico Fin.card_fintypeIcoₓ'. -/
@[simp]
theorem card_fintypeIco : Fintype.card (Set.Ico a b) = b - a := by
rw [← card_Ico, Fintype.card_ofFinset]
#align fin.card_fintype_Ico Fin.card_fintypeIco
-/- warning: fin.card_fintype_Ioc -> Fin.card_fintypeIoc is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} Nat (Fintype.card.{0} (coeSort.{1, 2} (Set.{0} (Fin n)) Type (Set.hasCoeToSort.{0} (Fin n)) (Set.Ioc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) a b)) (Set.fintypeIoc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a))
-but is expected to have type
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} Nat (Fintype.card.{0} (Set.Elem.{0} (Fin n) (Set.Ioc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) a b)) (Set.fintypeIoc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Fin.val n b) (Fin.val n a))
-Case conversion may be inaccurate. Consider using '#align fin.card_fintype_Ioc Fin.card_fintypeIocₓ'. -/
@[simp]
theorem card_fintypeIoc : Fintype.card (Set.Ioc a b) = b - a := by
rw [← card_Ioc, Fintype.card_ofFinset]
#align fin.card_fintype_Ioc Fin.card_fintypeIoc
-/- warning: fin.card_fintype_Ioo -> Fin.card_fintypeIoo is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} Nat (Fintype.card.{0} (coeSort.{1, 2} (Set.{0} (Fin n)) Type (Set.hasCoeToSort.{0} (Fin n)) (Set.Ioo.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) a b)) (Set.fintypeIoo.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a)) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
-but is expected to have type
- forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} Nat (Fintype.card.{0} (Set.Elem.{0} (Fin n) (Set.Ioo.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) a b)) (Set.fintypeIoo.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Fin.val n b) (Fin.val n a)) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
-Case conversion may be inaccurate. Consider using '#align fin.card_fintype_Ioo Fin.card_fintypeIooₓ'. -/
@[simp]
theorem card_fintypeIoo : Fintype.card (Set.Ioo a b) = b - a - 1 := by
rw [← card_Ioo, Fintype.card_ofFinset]
#align fin.card_fintype_Ioo Fin.card_fintypeIoo
-/- warning: fin.Ici_eq_finset_subtype -> Fin.Ici_eq_finset_subtype is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Ici.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderTop n) a) (Finset.fin n (Finset.Icc.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) n))
-but is expected to have type
- forall {n : Nat} (a : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Ici.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instForAllNatLocallyFiniteOrderTopFinToPreorderInstPartialOrderFin n) a) (Finset.fin n (Finset.Icc.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) n))
-Case conversion may be inaccurate. Consider using '#align fin.Ici_eq_finset_subtype Fin.Ici_eq_finset_subtypeₓ'. -/
theorem Ici_eq_finset_subtype : Ici a = (Icc (a : ℕ) n).Fin n := by ext; simp
#align fin.Ici_eq_finset_subtype Fin.Ici_eq_finset_subtype
-/- warning: fin.Ioi_eq_finset_subtype -> Fin.Ioi_eq_finset_subtype is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Ioi.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderTop n) a) (Finset.fin n (Finset.Ioc.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) n))
-but is expected to have type
- forall {n : Nat} (a : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Ioi.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instForAllNatLocallyFiniteOrderTopFinToPreorderInstPartialOrderFin n) a) (Finset.fin n (Finset.Ioc.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) n))
-Case conversion may be inaccurate. Consider using '#align fin.Ioi_eq_finset_subtype Fin.Ioi_eq_finset_subtypeₓ'. -/
theorem Ioi_eq_finset_subtype : Ioi a = (Ioc (a : ℕ) n).Fin n := by ext; simp
#align fin.Ioi_eq_finset_subtype Fin.Ioi_eq_finset_subtype
-/- warning: fin.Iic_eq_finset_subtype -> Fin.Iic_eq_finset_subtype is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (b : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Iic.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderBot n) b) (Finset.fin n (Finset.Iic.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.orderBot Nat.locallyFiniteOrder) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b)))
-but is expected to have type
- forall {n : Nat} (b : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Iic.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderBotFinToPreorderInstPartialOrderFin n) b) (Finset.fin n (Finset.Iic.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) Nat.orderBot instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring) (Fin.val n b)))
-Case conversion may be inaccurate. Consider using '#align fin.Iic_eq_finset_subtype Fin.Iic_eq_finset_subtypeₓ'. -/
theorem Iic_eq_finset_subtype : Iic b = (Iic (b : ℕ)).Fin n :=
rfl
#align fin.Iic_eq_finset_subtype Fin.Iic_eq_finset_subtype
-/- warning: fin.Iio_eq_finset_subtype -> Fin.Iio_eq_finset_subtype is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (b : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Iio.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderBot n) b) (Finset.fin n (Finset.Iio.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.orderBot Nat.locallyFiniteOrder) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b)))
-but is expected to have type
- forall {n : Nat} (b : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Iio.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderBotFinToPreorderInstPartialOrderFin n) b) (Finset.fin n (Finset.Iio.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) Nat.orderBot instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring) (Fin.val n b)))
-Case conversion may be inaccurate. Consider using '#align fin.Iio_eq_finset_subtype Fin.Iio_eq_finset_subtypeₓ'. -/
theorem Iio_eq_finset_subtype : Iio b = (Iio (b : ℕ)).Fin n :=
rfl
#align fin.Iio_eq_finset_subtype Fin.Iio_eq_finset_subtype
-/- warning: fin.map_subtype_embedding_Ici -> Fin.map_valEmbedding_Ici is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ici.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderTop n) a)) (Finset.Icc.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))
-but is expected to have type
- forall {n : Nat} (a : Fin n), (Fin n) -> (Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ici.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instForAllNatLocallyFiniteOrderTopFinToPreorderInstPartialOrderFin n) a)) (Finset.Icc.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))))
-Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Ici Fin.map_valEmbedding_Iciₓ'. -/
@[simp]
theorem map_valEmbedding_Ici : (Ici a).map Fin.valEmbedding = Icc a (n - 1) :=
by
@@ -271,12 +145,6 @@ theorem map_valEmbedding_Ici : (Ici a).map Fin.valEmbedding = Icc a (n - 1) :=
· exact fun hx => ⟨⟨x, Nat.lt_succ_iff.2 hx.2⟩, hx.1, rfl⟩
#align fin.map_subtype_embedding_Ici Fin.map_valEmbedding_Ici
-/- warning: fin.map_subtype_embedding_Ioi -> Fin.map_valEmbedding_Ioi is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ioi.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderTop n) a)) (Finset.Ioc.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))
-but is expected to have type
- forall {n : Nat} (a : Fin n), (Fin n) -> (Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ioi.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instForAllNatLocallyFiniteOrderTopFinToPreorderInstPartialOrderFin n) a)) (Finset.Ioc.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))))
-Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Ioi Fin.map_valEmbedding_Ioiₓ'. -/
@[simp]
theorem map_valEmbedding_Ioi : (Ioi a).map Fin.valEmbedding = Ioc a (n - 1) :=
by
@@ -290,111 +158,51 @@ theorem map_valEmbedding_Ioi : (Ioi a).map Fin.valEmbedding = Ioc a (n - 1) :=
· exact fun hx => ⟨⟨x, Nat.lt_succ_iff.2 hx.2⟩, hx.1, rfl⟩
#align fin.map_subtype_embedding_Ioi Fin.map_valEmbedding_Ioi
-/- warning: fin.map_subtype_embedding_Iic -> Fin.map_valEmbedding_Iic is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Iic.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderBot n) b)) (Finset.Iic.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.orderBot Nat.locallyFiniteOrder) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b))
-but is expected to have type
- forall {n : Nat} (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Iic.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderBotFinToPreorderInstPartialOrderFin n) b)) (Finset.Iic.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) Nat.orderBot instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring) (Fin.val n b))
-Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Iic Fin.map_valEmbedding_Iicₓ'. -/
@[simp]
theorem map_valEmbedding_Iic : (Iic b).map Fin.valEmbedding = Iic b := by
simp [Iic_eq_finset_subtype, Finset.fin, Finset.map_map, Iic_filter_lt_of_lt_right]
#align fin.map_subtype_embedding_Iic Fin.map_valEmbedding_Iic
-/- warning: fin.map_subtype_embedding_Iio -> Fin.map_valEmbedding_Iio is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Iio.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderBot n) b)) (Finset.Iio.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.orderBot Nat.locallyFiniteOrder) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b))
-but is expected to have type
- forall {n : Nat} (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Iio.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderBotFinToPreorderInstPartialOrderFin n) b)) (Finset.Iio.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) Nat.orderBot instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring) (Fin.val n b))
-Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Iio Fin.map_valEmbedding_Iioₓ'. -/
@[simp]
theorem map_valEmbedding_Iio : (Iio b).map Fin.valEmbedding = Iio b := by
simp [Iio_eq_finset_subtype, Finset.fin, Finset.map_map]
#align fin.map_subtype_embedding_Iio Fin.map_valEmbedding_Iio
-/- warning: fin.card_Ici -> Fin.card_Ici is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n), Eq.{1} Nat (Finset.card.{0} (Fin n) (Finset.Ici.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderTop n) a)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) n ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a))
-but is expected to have type
- forall {n : Nat} (a : Fin n), (Fin n) -> (Eq.{1} Nat (Finset.card.{0} (Fin n) (Finset.Ici.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instForAllNatLocallyFiniteOrderTopFinToPreorderInstPartialOrderFin n) a)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) n (Fin.val n a)))
-Case conversion may be inaccurate. Consider using '#align fin.card_Ici Fin.card_Iciₓ'. -/
@[simp]
theorem card_Ici : (Ici a).card = n - a := by cases n; · exact Fin.elim0 a;
rw [← card_map, map_subtype_embedding_Ici, Nat.card_Icc]; rfl
#align fin.card_Ici Fin.card_Ici
-/- warning: fin.card_Ioi -> Fin.card_Ioi is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n), Eq.{1} Nat (Finset.card.{0} (Fin n) (Finset.Ioi.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderTop n) a)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a))
-but is expected to have type
- forall {n : Nat} (a : Fin n), (Fin n) -> (Eq.{1} Nat (Finset.card.{0} (Fin n) (Finset.Ioi.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instForAllNatLocallyFiniteOrderTopFinToPreorderInstPartialOrderFin n) a)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) (Fin.val n a)))
-Case conversion may be inaccurate. Consider using '#align fin.card_Ioi Fin.card_Ioiₓ'. -/
@[simp]
theorem card_Ioi : (Ioi a).card = n - 1 - a := by
rw [← card_map, map_subtype_embedding_Ioi, Nat.card_Ioc]
#align fin.card_Ioi Fin.card_Ioi
-/- warning: fin.card_Iic -> Fin.card_Iic is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (b : Fin n), Eq.{1} Nat (Finset.card.{0} (Fin n) (Finset.Iic.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderBot n) b)) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
-but is expected to have type
- forall {n : Nat} (b : Fin n), Eq.{1} Nat (Finset.card.{0} (Fin n) (Finset.Iic.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderBotFinToPreorderInstPartialOrderFin n) b)) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (Fin.val n b) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
-Case conversion may be inaccurate. Consider using '#align fin.card_Iic Fin.card_Iicₓ'. -/
@[simp]
theorem card_Iic : (Iic b).card = b + 1 := by
rw [← Nat.card_Iic b, ← map_subtype_embedding_Iic, card_map]
#align fin.card_Iic Fin.card_Iic
-/- warning: fin.card_Iio -> Fin.card_Iio is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (b : Fin n), Eq.{1} Nat (Finset.card.{0} (Fin n) (Finset.Iio.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderBot n) b)) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b)
-but is expected to have type
- forall {n : Nat} (b : Fin n), Eq.{1} Nat (Finset.card.{0} (Fin n) (Finset.Iio.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderBotFinToPreorderInstPartialOrderFin n) b)) (Fin.val n b)
-Case conversion may be inaccurate. Consider using '#align fin.card_Iio Fin.card_Iioₓ'. -/
@[simp]
theorem card_Iio : (Iio b).card = b := by
rw [← Nat.card_Iio b, ← map_subtype_embedding_Iio, card_map]
#align fin.card_Iio Fin.card_Iio
-/- warning: fin.card_fintype_Ici -> Fin.card_fintypeIci is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n), Eq.{1} Nat (Fintype.card.{0} (coeSort.{1, 2} (Set.{0} (Fin n)) Type (Set.hasCoeToSort.{0} (Fin n)) (Set.Ici.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) a)) (Set.fintypeIci.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderTop n) a)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) n ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a))
-but is expected to have type
- forall {n : Nat} (a : Fin n), (Fin n) -> (Eq.{1} Nat (Fintype.card.{0} (Set.Elem.{0} (Fin n) (Set.Ici.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) a)) (Set.fintypeIci.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instForAllNatLocallyFiniteOrderTopFinToPreorderInstPartialOrderFin n) a)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) n (Fin.val n a)))
-Case conversion may be inaccurate. Consider using '#align fin.card_fintype_Ici Fin.card_fintypeIciₓ'. -/
@[simp]
theorem card_fintypeIci : Fintype.card (Set.Ici a) = n - a := by
rw [Fintype.card_ofFinset, card_Ici]
#align fin.card_fintype_Ici Fin.card_fintypeIci
-/- warning: fin.card_fintype_Ioi -> Fin.card_fintypeIoi is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (a : Fin n), Eq.{1} Nat (Fintype.card.{0} (coeSort.{1, 2} (Set.{0} (Fin n)) Type (Set.hasCoeToSort.{0} (Fin n)) (Set.Ioi.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) a)) (Set.fintypeIoi.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderTop n) a)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a))
-but is expected to have type
- forall {n : Nat} (a : Fin n), (Fin n) -> (Eq.{1} Nat (Fintype.card.{0} (Set.Elem.{0} (Fin n) (Set.Ioi.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) a)) (Set.fintypeIoi.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instForAllNatLocallyFiniteOrderTopFinToPreorderInstPartialOrderFin n) a)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1))) (Fin.val n a)))
-Case conversion may be inaccurate. Consider using '#align fin.card_fintype_Ioi Fin.card_fintypeIoiₓ'. -/
@[simp]
theorem card_fintypeIoi : Fintype.card (Set.Ioi a) = n - 1 - a := by
rw [Fintype.card_ofFinset, card_Ioi]
#align fin.card_fintype_Ioi Fin.card_fintypeIoi
-/- warning: fin.card_fintype_Iic -> Fin.card_fintypeIic is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (b : Fin n), Eq.{1} Nat (Fintype.card.{0} (coeSort.{1, 2} (Set.{0} (Fin n)) Type (Set.hasCoeToSort.{0} (Fin n)) (Set.Iic.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) b)) (Set.fintypeIic.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderBot n) b)) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat Nat.hasAdd) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
-but is expected to have type
- forall {n : Nat} (b : Fin n), Eq.{1} Nat (Fintype.card.{0} (Set.Elem.{0} (Fin n) (Set.Iic.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) b)) (Set.fintypeIic.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderBotFinToPreorderInstPartialOrderFin n) b)) (HAdd.hAdd.{0, 0, 0} Nat Nat Nat (instHAdd.{0} Nat instAddNat) (Fin.val n b) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
-Case conversion may be inaccurate. Consider using '#align fin.card_fintype_Iic Fin.card_fintypeIicₓ'. -/
@[simp]
theorem card_fintypeIic : Fintype.card (Set.Iic b) = b + 1 := by
rw [Fintype.card_ofFinset, card_Iic]
#align fin.card_fintype_Iic Fin.card_fintypeIic
-/- warning: fin.card_fintype_Iio -> Fin.card_fintypeIio is a dubious translation:
-lean 3 declaration is
- forall {n : Nat} (b : Fin n), Eq.{1} Nat (Fintype.card.{0} (coeSort.{1, 2} (Set.{0} (Fin n)) Type (Set.hasCoeToSort.{0} (Fin n)) (Set.Iio.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) b)) (Set.fintypeIio.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderBot n) b)) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b)
-but is expected to have type
- forall {n : Nat} (b : Fin n), Eq.{1} Nat (Fintype.card.{0} (Set.Elem.{0} (Fin n) (Set.Iio.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) b)) (Set.fintypeIio.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderBotFinToPreorderInstPartialOrderFin n) b)) (Fin.val n b)
-Case conversion may be inaccurate. Consider using '#align fin.card_fintype_Iio Fin.card_fintypeIioₓ'. -/
@[simp]
theorem card_fintypeIio : Fintype.card (Set.Iio b) = b := by rw [Fintype.card_ofFinset, card_Iio]
#align fin.card_fintype_Iio Fin.card_fintypeIio
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -220,10 +220,7 @@ lean 3 declaration is
but is expected to have type
forall {n : Nat} (a : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Ici.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instForAllNatLocallyFiniteOrderTopFinToPreorderInstPartialOrderFin n) a) (Finset.fin n (Finset.Icc.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) n))
Case conversion may be inaccurate. Consider using '#align fin.Ici_eq_finset_subtype Fin.Ici_eq_finset_subtypeₓ'. -/
-theorem Ici_eq_finset_subtype : Ici a = (Icc (a : ℕ) n).Fin n :=
- by
- ext
- simp
+theorem Ici_eq_finset_subtype : Ici a = (Icc (a : ℕ) n).Fin n := by ext; simp
#align fin.Ici_eq_finset_subtype Fin.Ici_eq_finset_subtype
/- warning: fin.Ioi_eq_finset_subtype -> Fin.Ioi_eq_finset_subtype is a dubious translation:
@@ -232,10 +229,7 @@ lean 3 declaration is
but is expected to have type
forall {n : Nat} (a : Fin n), Eq.{1} (Finset.{0} (Fin n)) (Finset.Ioi.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instForAllNatLocallyFiniteOrderTopFinToPreorderInstPartialOrderFin n) a) (Finset.fin n (Finset.Ioc.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) n))
Case conversion may be inaccurate. Consider using '#align fin.Ioi_eq_finset_subtype Fin.Ioi_eq_finset_subtypeₓ'. -/
-theorem Ioi_eq_finset_subtype : Ioi a = (Ioc (a : ℕ) n).Fin n :=
- by
- ext
- simp
+theorem Ioi_eq_finset_subtype : Ioi a = (Ioc (a : ℕ) n).Fin n := by ext; simp
#align fin.Ioi_eq_finset_subtype Fin.Ioi_eq_finset_subtype
/- warning: fin.Iic_eq_finset_subtype -> Fin.Iic_eq_finset_subtype is a dubious translation:
@@ -325,11 +319,8 @@ but is expected to have type
forall {n : Nat} (a : Fin n), (Fin n) -> (Eq.{1} Nat (Finset.card.{0} (Fin n) (Finset.Ici.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instForAllNatLocallyFiniteOrderTopFinToPreorderInstPartialOrderFin n) a)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) n (Fin.val n a)))
Case conversion may be inaccurate. Consider using '#align fin.card_Ici Fin.card_Iciₓ'. -/
@[simp]
-theorem card_Ici : (Ici a).card = n - a := by
- cases n
- · exact Fin.elim0 a
- rw [← card_map, map_subtype_embedding_Ici, Nat.card_Icc]
- rfl
+theorem card_Ici : (Ici a).card = n - a := by cases n; · exact Fin.elim0 a;
+ rw [← card_map, map_subtype_embedding_Ici, Nat.card_Icc]; rfl
#align fin.card_Ici Fin.card_Ici
/- warning: fin.card_Ioi -> Fin.card_Ioi is a dubious translation:
mathlib commit https://github.com/leanprover-community/mathlib/commit/290a7ba01fbcab1b64757bdaa270d28f4dcede35
@@ -82,49 +82,49 @@ theorem Ioo_eq_finset_subtype : Ioo a b = (Ioo (a : ℕ) b).Fin n :=
rfl
#align fin.Ioo_eq_finset_subtype Fin.Ioo_eq_finset_subtype
-/- warning: fin.map_subtype_embedding_Icc -> Fin.map_subtype_embedding_Icc is a dubious translation:
+/- warning: fin.map_subtype_embedding_Icc -> Fin.map_valEmbedding_Icc is a dubious translation:
lean 3 declaration is
forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Icc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b)) (Finset.Icc.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b))
but is expected to have type
forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Icc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b)) (Finset.Icc.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) (Fin.val n b))
-Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Icc Fin.map_subtype_embedding_Iccₓ'. -/
+Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Icc Fin.map_valEmbedding_Iccₓ'. -/
@[simp]
-theorem map_subtype_embedding_Icc : (Icc a b).map Fin.valEmbedding = Icc a b := by
+theorem map_valEmbedding_Icc : (Icc a b).map Fin.valEmbedding = Icc a b := by
simp [Icc_eq_finset_subtype, Finset.fin, Finset.map_map, Icc_filter_lt_of_lt_right]
-#align fin.map_subtype_embedding_Icc Fin.map_subtype_embedding_Icc
+#align fin.map_subtype_embedding_Icc Fin.map_valEmbedding_Icc
-/- warning: fin.map_subtype_embedding_Ico -> Fin.map_subtype_embedding_Ico is a dubious translation:
+/- warning: fin.map_subtype_embedding_Ico -> Fin.map_valEmbedding_Ico is a dubious translation:
lean 3 declaration is
forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ico.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b)) (Finset.Ico.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b))
but is expected to have type
forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ico.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b)) (Finset.Ico.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) (Fin.val n b))
-Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Ico Fin.map_subtype_embedding_Icoₓ'. -/
+Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Ico Fin.map_valEmbedding_Icoₓ'. -/
@[simp]
-theorem map_subtype_embedding_Ico : (Ico a b).map Fin.valEmbedding = Ico a b := by
+theorem map_valEmbedding_Ico : (Ico a b).map Fin.valEmbedding = Ico a b := by
simp [Ico_eq_finset_subtype, Finset.fin, Finset.map_map]
-#align fin.map_subtype_embedding_Ico Fin.map_subtype_embedding_Ico
+#align fin.map_subtype_embedding_Ico Fin.map_valEmbedding_Ico
-/- warning: fin.map_subtype_embedding_Ioc -> Fin.map_subtype_embedding_Ioc is a dubious translation:
+/- warning: fin.map_subtype_embedding_Ioc -> Fin.map_valEmbedding_Ioc is a dubious translation:
lean 3 declaration is
forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ioc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b)) (Finset.Ioc.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b))
but is expected to have type
forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ioc.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b)) (Finset.Ioc.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) (Fin.val n b))
-Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Ioc Fin.map_subtype_embedding_Iocₓ'. -/
+Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Ioc Fin.map_valEmbedding_Iocₓ'. -/
@[simp]
-theorem map_subtype_embedding_Ioc : (Ioc a b).map Fin.valEmbedding = Ioc a b := by
+theorem map_valEmbedding_Ioc : (Ioc a b).map Fin.valEmbedding = Ioc a b := by
simp [Ioc_eq_finset_subtype, Finset.fin, Finset.map_map, Ioc_filter_lt_of_lt_right]
-#align fin.map_subtype_embedding_Ioc Fin.map_subtype_embedding_Ioc
+#align fin.map_subtype_embedding_Ioc Fin.map_valEmbedding_Ioc
-/- warning: fin.map_subtype_embedding_Ioo -> Fin.map_subtype_embedding_Ioo is a dubious translation:
+/- warning: fin.map_subtype_embedding_Ioo -> Fin.map_valEmbedding_Ioo is a dubious translation:
lean 3 declaration is
forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ioo.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrder n) a b)) (Finset.Ioo.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b))
but is expected to have type
forall {n : Nat} (a : Fin n) (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ioo.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderFinToPreorderInstPartialOrderFin n) a b)) (Finset.Ioo.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) (Fin.val n b))
-Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Ioo Fin.map_subtype_embedding_Iooₓ'. -/
+Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Ioo Fin.map_valEmbedding_Iooₓ'. -/
@[simp]
-theorem map_subtype_embedding_Ioo : (Ioo a b).map Fin.valEmbedding = Ioo a b := by
+theorem map_valEmbedding_Ioo : (Ioo a b).map Fin.valEmbedding = Ioo a b := by
simp [Ioo_eq_finset_subtype, Finset.fin, Finset.map_map]
-#align fin.map_subtype_embedding_Ioo Fin.map_subtype_embedding_Ioo
+#align fin.map_subtype_embedding_Ioo Fin.map_valEmbedding_Ioo
/- warning: fin.card_Icc -> Fin.card_Icc is a dubious translation:
lean 3 declaration is
@@ -258,14 +258,14 @@ theorem Iio_eq_finset_subtype : Iio b = (Iio (b : ℕ)).Fin n :=
rfl
#align fin.Iio_eq_finset_subtype Fin.Iio_eq_finset_subtype
-/- warning: fin.map_subtype_embedding_Ici -> Fin.map_subtype_embedding_Ici is a dubious translation:
+/- warning: fin.map_subtype_embedding_Ici -> Fin.map_valEmbedding_Ici is a dubious translation:
lean 3 declaration is
forall {n : Nat} (a : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ici.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderTop n) a)) (Finset.Icc.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))
but is expected to have type
forall {n : Nat} (a : Fin n), (Fin n) -> (Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ici.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instForAllNatLocallyFiniteOrderTopFinToPreorderInstPartialOrderFin n) a)) (Finset.Icc.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))))
-Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Ici Fin.map_subtype_embedding_Iciₓ'. -/
+Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Ici Fin.map_valEmbedding_Iciₓ'. -/
@[simp]
-theorem map_subtype_embedding_Ici : (Ici a).map Fin.valEmbedding = Icc a (n - 1) :=
+theorem map_valEmbedding_Ici : (Ici a).map Fin.valEmbedding = Icc a (n - 1) :=
by
ext x
simp only [exists_prop, embedding.coe_subtype, mem_Ici, mem_map, mem_Icc]
@@ -275,16 +275,16 @@ theorem map_subtype_embedding_Ici : (Ici a).map Fin.valEmbedding = Icc a (n - 1)
cases n
· exact Fin.elim0 a
· exact fun hx => ⟨⟨x, Nat.lt_succ_iff.2 hx.2⟩, hx.1, rfl⟩
-#align fin.map_subtype_embedding_Ici Fin.map_subtype_embedding_Ici
+#align fin.map_subtype_embedding_Ici Fin.map_valEmbedding_Ici
-/- warning: fin.map_subtype_embedding_Ioi -> Fin.map_subtype_embedding_Ioi is a dubious translation:
+/- warning: fin.map_subtype_embedding_Ioi -> Fin.map_valEmbedding_Ioi is a dubious translation:
lean 3 declaration is
forall {n : Nat} (a : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ioi.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderTop n) a)) (Finset.Ioc.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.locallyFiniteOrder ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) a) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) n (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne)))))
but is expected to have type
forall {n : Nat} (a : Fin n), (Fin n) -> (Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Ioi.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instForAllNatLocallyFiniteOrderTopFinToPreorderInstPartialOrderFin n) a)) (Finset.Ioc.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring (Fin.val n a) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) n (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))))
-Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Ioi Fin.map_subtype_embedding_Ioiₓ'. -/
+Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Ioi Fin.map_valEmbedding_Ioiₓ'. -/
@[simp]
-theorem map_subtype_embedding_Ioi : (Ioi a).map Fin.valEmbedding = Ioc a (n - 1) :=
+theorem map_valEmbedding_Ioi : (Ioi a).map Fin.valEmbedding = Ioc a (n - 1) :=
by
ext x
simp only [exists_prop, embedding.coe_subtype, mem_Ioi, mem_map, mem_Ioc]
@@ -294,29 +294,29 @@ theorem map_subtype_embedding_Ioi : (Ioi a).map Fin.valEmbedding = Ioc a (n - 1)
cases n
· exact Fin.elim0 a
· exact fun hx => ⟨⟨x, Nat.lt_succ_iff.2 hx.2⟩, hx.1, rfl⟩
-#align fin.map_subtype_embedding_Ioi Fin.map_subtype_embedding_Ioi
+#align fin.map_subtype_embedding_Ioi Fin.map_valEmbedding_Ioi
-/- warning: fin.map_subtype_embedding_Iic -> Fin.map_subtype_embedding_Iic is a dubious translation:
+/- warning: fin.map_subtype_embedding_Iic -> Fin.map_valEmbedding_Iic is a dubious translation:
lean 3 declaration is
forall {n : Nat} (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Iic.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderBot n) b)) (Finset.Iic.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.orderBot Nat.locallyFiniteOrder) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b))
but is expected to have type
forall {n : Nat} (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Iic.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderBotFinToPreorderInstPartialOrderFin n) b)) (Finset.Iic.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) Nat.orderBot instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring) (Fin.val n b))
-Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Iic Fin.map_subtype_embedding_Iicₓ'. -/
+Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Iic Fin.map_valEmbedding_Iicₓ'. -/
@[simp]
-theorem map_subtype_embedding_Iic : (Iic b).map Fin.valEmbedding = Iic b := by
+theorem map_valEmbedding_Iic : (Iic b).map Fin.valEmbedding = Iic b := by
simp [Iic_eq_finset_subtype, Finset.fin, Finset.map_map, Iic_filter_lt_of_lt_right]
-#align fin.map_subtype_embedding_Iic Fin.map_subtype_embedding_Iic
+#align fin.map_subtype_embedding_Iic Fin.map_valEmbedding_Iic
-/- warning: fin.map_subtype_embedding_Iio -> Fin.map_subtype_embedding_Iio is a dubious translation:
+/- warning: fin.map_subtype_embedding_Iio -> Fin.map_valEmbedding_Iio is a dubious translation:
lean 3 declaration is
forall {n : Nat} (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Iio.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.partialOrder n)) (Fin.locallyFiniteOrderBot n) b)) (Finset.Iio.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))) Nat.orderBot Nat.locallyFiniteOrder) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin n) Nat (HasLiftT.mk.{1, 1} (Fin n) Nat (CoeTCₓ.coe.{1, 1} (Fin n) Nat (coeBase.{1, 1} (Fin n) Nat (Fin.coeToNat n)))) b))
but is expected to have type
forall {n : Nat} (b : Fin n), Eq.{1} (Finset.{0} Nat) (Finset.map.{0, 0} (Fin n) Nat (Fin.valEmbedding n) (Finset.Iio.{0} (Fin n) (PartialOrder.toPreorder.{0} (Fin n) (Fin.instPartialOrderFin n)) (instLocallyFiniteOrderBotFinToPreorderInstPartialOrderFin n) b)) (Finset.Iio.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) (Finset.LocallyFiniteOrder.toLocallyFiniteOrderBot.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)) Nat.orderBot instLocallyFiniteOrderNatToPreorderToPartialOrderStrictOrderedSemiring) (Fin.val n b))
-Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Iio Fin.map_subtype_embedding_Iioₓ'. -/
+Case conversion may be inaccurate. Consider using '#align fin.map_subtype_embedding_Iio Fin.map_valEmbedding_Iioₓ'. -/
@[simp]
-theorem map_subtype_embedding_Iio : (Iio b).map Fin.valEmbedding = Iio b := by
+theorem map_valEmbedding_Iio : (Iio b).map Fin.valEmbedding = Iio b := by
simp [Iio_eq_finset_subtype, Finset.fin, Finset.map_map]
-#align fin.map_subtype_embedding_Iio Fin.map_subtype_embedding_Iio
+#align fin.map_subtype_embedding_Iio Fin.map_valEmbedding_Iio
/- warning: fin.card_Ici -> Fin.card_Ici is a dubious translation:
lean 3 declaration is
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Move Set.Ixx
, Finset.Ixx
, Multiset.Ixx
together under two different folders:
Order.Interval
for their definition and basic propertiesAlgebra.Order.Interval
for their algebraic propertiesMove the definitions of Multiset.Ixx
to what is now Order.Interval.Multiset
. I believe we could just delete this file in a later PR as nothing uses it (and I already had doubts when defining Multiset.Ixx
three years ago).
Move the algebraic results out of what is now Order.Interval.Finset.Basic
to a new file Algebra.Order.Interval.Finset.Basic
.
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
import Mathlib.Data.Nat.Interval
-import Mathlib.Data.Finset.LocallyFinite.Basic
+import Mathlib.Order.Interval.Finset.Basic
#align_import data.fin.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
Finset.preimage
not depend on Finset.sum
(#11601)
and Data.Finset.LocallyFinite
not depend on Finset.sum
too
@@ -39,8 +39,6 @@ end Fin
open Finset Fin Function
-open BigOperators
-
namespace Fin
variable (n : ℕ)
@@ -41,20 +41,20 @@ open Finset Fin Function
open BigOperators
+namespace Fin
+
variable (n : ℕ)
-instance : LocallyFiniteOrder (Fin n) :=
+instance instLocallyFiniteOrder : LocallyFiniteOrder (Fin n) :=
OrderIso.locallyFiniteOrder Fin.orderIsoSubtype
-instance : LocallyFiniteOrderBot (Fin n) :=
+instance instLocallyFiniteOrderBot : LocallyFiniteOrderBot (Fin n) :=
OrderIso.locallyFiniteOrderBot Fin.orderIsoSubtype
-instance : ∀ n, LocallyFiniteOrderTop (Fin n)
+instance instLocallyFiniteOrderTop : ∀ n, LocallyFiniteOrderTop (Fin n)
| 0 => IsEmpty.toLocallyFiniteOrderTop
| _ + 1 => inferInstance
-namespace Fin
-
variable {n} (a b : Fin n)
theorem Icc_eq_finset_subtype : Icc a b = (Icc (a : ℕ) b).fin n :=
@@ -126,25 +126,25 @@ theorem card_uIcc : (uIcc a b).card = (b - a : ℤ).natAbs + 1 := by
rw [← Nat.card_uIcc, ← map_subtype_embedding_uIcc, card_map]
#align fin.card_uIcc Fin.card_uIcc
--- Porting note: simp can prove this
+-- Porting note (#10618): simp can prove this
-- @[simp]
theorem card_fintypeIcc : Fintype.card (Set.Icc a b) = b + 1 - a := by
rw [← card_Icc, Fintype.card_ofFinset]
#align fin.card_fintype_Icc Fin.card_fintypeIcc
--- Porting note: simp can prove this
+-- Porting note (#10618): simp can prove this
-- @[simp]
theorem card_fintypeIco : Fintype.card (Set.Ico a b) = b - a := by
rw [← card_Ico, Fintype.card_ofFinset]
#align fin.card_fintype_Ico Fin.card_fintypeIco
--- Porting note: simp can prove this
+-- Porting note (#10618): simp can prove this
-- @[simp]
theorem card_fintypeIoc : Fintype.card (Set.Ioc a b) = b - a := by
rw [← card_Ioc, Fintype.card_ofFinset]
#align fin.card_fintype_Ioc Fin.card_fintypeIoc
--- Porting note: simp can prove this
+-- Porting note (#10618): simp can prove this
-- @[simp]
theorem card_fintypeIoo : Fintype.card (Set.Ioo a b) = b - a - 1 := by
rw [← card_Ioo, Fintype.card_ofFinset]
@@ -237,25 +237,25 @@ theorem card_Iio : (Iio b).card = b := by
rw [← Nat.card_Iio b, ← map_valEmbedding_Iio, card_map]
#align fin.card_Iio Fin.card_Iio
--- Porting note: simp can prove this
+-- Porting note (#10618): simp can prove this
-- @[simp]
theorem card_fintypeIci : Fintype.card (Set.Ici a) = n - a := by
rw [Fintype.card_ofFinset, card_Ici]
#align fin.card_fintype_Ici Fin.card_fintypeIci
--- Porting note: simp can prove this
+-- Porting note (#10618): simp can prove this
-- @[simp]
theorem card_fintypeIoi : Fintype.card (Set.Ioi a) = n - 1 - a := by
rw [Fintype.card_ofFinset, card_Ioi]
#align fin.card_fintype_Ioi Fin.card_fintypeIoi
--- Porting note: simp can prove this
+-- Porting note (#10618): simp can prove this
-- @[simp]
theorem card_fintypeIic : Fintype.card (Set.Iic b) = b + 1 := by
rw [Fintype.card_ofFinset, card_Iic]
#align fin.card_fintype_Iic Fin.card_fintypeIic
--- Porting note: simp can prove this
+-- Porting note (#10618): simp can prove this
-- @[simp]
theorem card_fintypeIio : Fintype.card (Set.Iio b) = b := by
rw [Fintype.card_ofFinset, card_Iio]
Define the sequence of "hollow boxes" indexed by natural numbers as the successive differences of the "boxes" Icc (-n) n
.
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-/
import Mathlib.Data.Nat.Interval
-import Mathlib.Data.Finset.LocallyFinite
+import Mathlib.Data.Finset.LocallyFinite.Basic
#align_import data.fin.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
@@ -219,7 +219,7 @@ theorem card_Ici : (Ici a).card = n - a := by
cases n with
| zero => exact Fin.elim0 a
| succ =>
- rw [← card_map, map_valEmbedding_Ici, Nat.card_Icc, Nat.succ_sub_one]
+ rw [← card_map, map_valEmbedding_Ici, Nat.card_Icc, Nat.add_one_sub_one]
#align fin.card_Ici Fin.card_Ici
@[simp]
@@ -2,15 +2,12 @@
Copyright (c) 2021 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
-
-! This file was ported from Lean 3 source module data.fin.interval
-! leanprover-community/mathlib commit 1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Nat.Interval
import Mathlib.Data.Finset.LocallyFinite
+#align_import data.fin.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
+
/-!
# Finite intervals in `Fin n`
finset.uIcc
on concrete structures (#5946)
Match https://github.com/leanprover-community/mathlib/pull/18838
Co-authored-by: Scott Morrison <scott@tqft.net> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies
! This file was ported from Lean 3 source module data.fin.interval
-! leanprover-community/mathlib commit f93c11933efbc3c2f0299e47b8ff83e9b539cbf6
+! leanprover-community/mathlib commit 1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -18,6 +18,27 @@ This file proves that `Fin n` is a `LocallyFiniteOrder` and calculates the cardi
intervals as Finsets and Fintypes.
-/
+namespace Fin
+
+variable {n : ℕ} (a b : Fin n)
+
+@[simp, norm_cast]
+theorem coe_sup : ↑(a ⊔ b) = (a ⊔ b : ℕ) := rfl
+#align fin.coe_sup Fin.coe_sup
+
+@[simp, norm_cast]
+theorem coe_inf : ↑(a ⊓ b) = (a ⊓ b : ℕ) := rfl
+#align fin.coe_inf Fin.coe_inf
+
+@[simp, norm_cast]
+theorem coe_max : ↑(max a b) = (max a b : ℕ) := rfl
+#align fin.coe_max Fin.coe_max
+
+@[simp, norm_cast]
+theorem coe_min : ↑(min a b) = (min a b : ℕ) := rfl
+#align fin.coe_min Fin.coe_min
+
+end Fin
open Finset Fin Function
@@ -55,6 +76,9 @@ theorem Ioo_eq_finset_subtype : Ioo a b = (Ioo (a : ℕ) b).fin n :=
rfl
#align fin.Ioo_eq_finset_subtype Fin.Ioo_eq_finset_subtype
+theorem uIcc_eq_finset_subtype : uIcc a b = (uIcc (a : ℕ) b).fin n := rfl
+#align fin.uIcc_eq_finset_subtype Fin.uIcc_eq_finset_subtype
+
@[simp]
theorem map_valEmbedding_Icc : (Icc a b).map Fin.valEmbedding = Icc ↑a ↑b := by
simp [Icc_eq_finset_subtype, Finset.fin, Finset.map_map, Icc_filter_lt_of_lt_right]
@@ -75,6 +99,11 @@ theorem map_valEmbedding_Ioo : (Ioo a b).map Fin.valEmbedding = Ioo ↑a ↑b :=
simp [Ioo_eq_finset_subtype, Finset.fin, Finset.map_map]
#align fin.map_subtype_embedding_Ioo Fin.map_valEmbedding_Ioo
+@[simp]
+theorem map_subtype_embedding_uIcc : (uIcc a b).map valEmbedding = uIcc ↑a ↑b :=
+ map_valEmbedding_Icc _ _
+#align fin.map_subtype_embedding_uIcc Fin.map_subtype_embedding_uIcc
+
@[simp]
theorem card_Icc : (Icc a b).card = b + 1 - a := by
rw [← Nat.card_Icc, ← map_valEmbedding_Icc, card_map]
@@ -95,6 +124,11 @@ theorem card_Ioo : (Ioo a b).card = b - a - 1 := by
rw [← Nat.card_Ioo, ← map_valEmbedding_Ioo, card_map]
#align fin.card_Ioo Fin.card_Ioo
+@[simp]
+theorem card_uIcc : (uIcc a b).card = (b - a : ℤ).natAbs + 1 := by
+ rw [← Nat.card_uIcc, ← map_subtype_embedding_uIcc, card_map]
+#align fin.card_uIcc Fin.card_uIcc
+
-- Porting note: simp can prove this
-- @[simp]
theorem card_fintypeIcc : Fintype.card (Set.Icc a b) = b + 1 - a := by
@@ -119,6 +153,10 @@ theorem card_fintypeIoo : Fintype.card (Set.Ioo a b) = b - a - 1 := by
rw [← card_Ioo, Fintype.card_ofFinset]
#align fin.card_fintype_Ioo Fin.card_fintypeIoo
+theorem card_fintype_uIcc : Fintype.card (Set.uIcc a b) = (b - a : ℤ).natAbs + 1 := by
+ rw [← card_uIcc, Fintype.card_ofFinset]
+#align fin.card_fintype_uIcc Fin.card_fintype_uIcc
+
theorem Ici_eq_finset_subtype : Ici a = (Icc (a : ℕ) n).fin n := by
ext
simp
@@ -139,6 +139,9 @@ theorem Iio_eq_finset_subtype : Iio b = (Iio (b : ℕ)).fin n :=
@[simp]
theorem map_valEmbedding_Ici : (Ici a).map Fin.valEmbedding = Icc ↑a (n - 1) := by
+-- Porting note: without `clear b` Lean includes `b` in the statement (because the `rfl`) in the
+-- `rintro` below acts on it.
+ clear b
ext x
simp only [exists_prop, Embedding.coe_subtype, mem_Ici, mem_map, mem_Icc]
constructor
@@ -151,6 +154,9 @@ theorem map_valEmbedding_Ici : (Ici a).map Fin.valEmbedding = Icc ↑a (n - 1) :
@[simp]
theorem map_valEmbedding_Ioi : (Ioi a).map Fin.valEmbedding = Ioc ↑a (n - 1) := by
+-- Porting note: without `clear b` Lean includes `b` in the statement (because the `rfl`) in the
+-- `rintro` below acts on it.
+ clear b
ext x
simp only [exists_prop, Embedding.coe_subtype, mem_Ioi, mem_map, mem_Ioc]
constructor
@@ -173,17 +179,17 @@ theorem map_valEmbedding_Iio : (Iio b).map Fin.valEmbedding = Iio ↑b := by
@[simp]
theorem card_Ici : (Ici a).card = n - a := by
+-- Porting note: without `clear b` Lean includes `b` in the statement.
+ clear b
cases n with
| zero => exact Fin.elim0 a
| succ =>
rw [← card_map, map_valEmbedding_Ici, Nat.card_Icc, Nat.succ_sub_one]
- assumption
#align fin.card_Ici Fin.card_Ici
@[simp]
theorem card_Ioi : (Ioi a).card = n - 1 - a := by
rw [← card_map, map_valEmbedding_Ioi, Nat.card_Ioc]
- assumption
#align fin.card_Ioi Fin.card_Ioi
@[simp]
@@ -200,14 +206,12 @@ theorem card_Iio : (Iio b).card = b := by
-- @[simp]
theorem card_fintypeIci : Fintype.card (Set.Ici a) = n - a := by
rw [Fintype.card_ofFinset, card_Ici]
- assumption
#align fin.card_fintype_Ici Fin.card_fintypeIci
-- Porting note: simp can prove this
-- @[simp]
theorem card_fintypeIoi : Fintype.card (Set.Ioi a) = n - 1 - a := by
rw [Fintype.card_ofFinset, card_Ioi]
- assumption
#align fin.card_fintype_Ioi Fin.card_fintypeIoi
-- Porting note: simp can prove this
These lemmas are about valEmbedding
, not a non-existant subtype_embedding
. The mathlib3 name was wrong too, but there's no need to backport this thanks to #align
. At any rate, the correct mathlib3 name would have been coe_embedding
.
@@ -56,43 +56,43 @@ theorem Ioo_eq_finset_subtype : Ioo a b = (Ioo (a : ℕ) b).fin n :=
#align fin.Ioo_eq_finset_subtype Fin.Ioo_eq_finset_subtype
@[simp]
-theorem map_subtype_embedding_Icc : (Icc a b).map Fin.valEmbedding = Icc ↑a ↑b := by
+theorem map_valEmbedding_Icc : (Icc a b).map Fin.valEmbedding = Icc ↑a ↑b := by
simp [Icc_eq_finset_subtype, Finset.fin, Finset.map_map, Icc_filter_lt_of_lt_right]
-#align fin.map_subtype_embedding_Icc Fin.map_subtype_embedding_Icc
+#align fin.map_subtype_embedding_Icc Fin.map_valEmbedding_Icc
@[simp]
-theorem map_subtype_embedding_Ico : (Ico a b).map Fin.valEmbedding = Ico ↑a ↑b := by
+theorem map_valEmbedding_Ico : (Ico a b).map Fin.valEmbedding = Ico ↑a ↑b := by
simp [Ico_eq_finset_subtype, Finset.fin, Finset.map_map]
-#align fin.map_subtype_embedding_Ico Fin.map_subtype_embedding_Ico
+#align fin.map_subtype_embedding_Ico Fin.map_valEmbedding_Ico
@[simp]
-theorem map_subtype_embedding_Ioc : (Ioc a b).map Fin.valEmbedding = Ioc ↑a ↑b := by
+theorem map_valEmbedding_Ioc : (Ioc a b).map Fin.valEmbedding = Ioc ↑a ↑b := by
simp [Ioc_eq_finset_subtype, Finset.fin, Finset.map_map, Ioc_filter_lt_of_lt_right]
-#align fin.map_subtype_embedding_Ioc Fin.map_subtype_embedding_Ioc
+#align fin.map_subtype_embedding_Ioc Fin.map_valEmbedding_Ioc
@[simp]
-theorem map_subtype_embedding_Ioo : (Ioo a b).map Fin.valEmbedding = Ioo ↑a ↑b := by
+theorem map_valEmbedding_Ioo : (Ioo a b).map Fin.valEmbedding = Ioo ↑a ↑b := by
simp [Ioo_eq_finset_subtype, Finset.fin, Finset.map_map]
-#align fin.map_subtype_embedding_Ioo Fin.map_subtype_embedding_Ioo
+#align fin.map_subtype_embedding_Ioo Fin.map_valEmbedding_Ioo
@[simp]
theorem card_Icc : (Icc a b).card = b + 1 - a := by
- rw [← Nat.card_Icc, ← map_subtype_embedding_Icc, card_map]
+ rw [← Nat.card_Icc, ← map_valEmbedding_Icc, card_map]
#align fin.card_Icc Fin.card_Icc
@[simp]
theorem card_Ico : (Ico a b).card = b - a := by
- rw [← Nat.card_Ico, ← map_subtype_embedding_Ico, card_map]
+ rw [← Nat.card_Ico, ← map_valEmbedding_Ico, card_map]
#align fin.card_Ico Fin.card_Ico
@[simp]
theorem card_Ioc : (Ioc a b).card = b - a := by
- rw [← Nat.card_Ioc, ← map_subtype_embedding_Ioc, card_map]
+ rw [← Nat.card_Ioc, ← map_valEmbedding_Ioc, card_map]
#align fin.card_Ioc Fin.card_Ioc
@[simp]
theorem card_Ioo : (Ioo a b).card = b - a - 1 := by
- rw [← Nat.card_Ioo, ← map_subtype_embedding_Ioo, card_map]
+ rw [← Nat.card_Ioo, ← map_valEmbedding_Ioo, card_map]
#align fin.card_Ioo Fin.card_Ioo
-- Porting note: simp can prove this
@@ -138,7 +138,7 @@ theorem Iio_eq_finset_subtype : Iio b = (Iio (b : ℕ)).fin n :=
#align fin.Iio_eq_finset_subtype Fin.Iio_eq_finset_subtype
@[simp]
-theorem map_subtype_embedding_Ici : (Ici a).map Fin.valEmbedding = Icc ↑a (n - 1) := by
+theorem map_valEmbedding_Ici : (Ici a).map Fin.valEmbedding = Icc ↑a (n - 1) := by
ext x
simp only [exists_prop, Embedding.coe_subtype, mem_Ici, mem_map, mem_Icc]
constructor
@@ -147,10 +147,10 @@ theorem map_subtype_embedding_Ici : (Ici a).map Fin.valEmbedding = Icc ↑a (n -
cases n
· exact Fin.elim0 a
· exact fun hx => ⟨⟨x, Nat.lt_succ_iff.2 hx.2⟩, hx.1, rfl⟩
-#align fin.map_subtype_embedding_Ici Fin.map_subtype_embedding_Ici
+#align fin.map_subtype_embedding_Ici Fin.map_valEmbedding_Ici
@[simp]
-theorem map_subtype_embedding_Ioi : (Ioi a).map Fin.valEmbedding = Ioc ↑a (n - 1) := by
+theorem map_valEmbedding_Ioi : (Ioi a).map Fin.valEmbedding = Ioc ↑a (n - 1) := by
ext x
simp only [exists_prop, Embedding.coe_subtype, mem_Ioi, mem_map, mem_Ioc]
constructor
@@ -159,41 +159,41 @@ theorem map_subtype_embedding_Ioi : (Ioi a).map Fin.valEmbedding = Ioc ↑a (n -
cases n
· exact Fin.elim0 a
· exact fun hx => ⟨⟨x, Nat.lt_succ_iff.2 hx.2⟩, hx.1, rfl⟩
-#align fin.map_subtype_embedding_Ioi Fin.map_subtype_embedding_Ioi
+#align fin.map_subtype_embedding_Ioi Fin.map_valEmbedding_Ioi
@[simp]
-theorem map_subtype_embedding_Iic : (Iic b).map Fin.valEmbedding = Iic ↑b := by
+theorem map_valEmbedding_Iic : (Iic b).map Fin.valEmbedding = Iic ↑b := by
simp [Iic_eq_finset_subtype, Finset.fin, Finset.map_map, Iic_filter_lt_of_lt_right]
-#align fin.map_subtype_embedding_Iic Fin.map_subtype_embedding_Iic
+#align fin.map_subtype_embedding_Iic Fin.map_valEmbedding_Iic
@[simp]
-theorem map_subtype_embedding_Iio : (Iio b).map Fin.valEmbedding = Iio ↑b := by
+theorem map_valEmbedding_Iio : (Iio b).map Fin.valEmbedding = Iio ↑b := by
simp [Iio_eq_finset_subtype, Finset.fin, Finset.map_map]
-#align fin.map_subtype_embedding_Iio Fin.map_subtype_embedding_Iio
+#align fin.map_subtype_embedding_Iio Fin.map_valEmbedding_Iio
@[simp]
theorem card_Ici : (Ici a).card = n - a := by
cases n with
| zero => exact Fin.elim0 a
| succ =>
- rw [← card_map, map_subtype_embedding_Ici, Nat.card_Icc, Nat.succ_sub_one]
+ rw [← card_map, map_valEmbedding_Ici, Nat.card_Icc, Nat.succ_sub_one]
assumption
#align fin.card_Ici Fin.card_Ici
@[simp]
theorem card_Ioi : (Ioi a).card = n - 1 - a := by
- rw [← card_map, map_subtype_embedding_Ioi, Nat.card_Ioc]
+ rw [← card_map, map_valEmbedding_Ioi, Nat.card_Ioc]
assumption
#align fin.card_Ioi Fin.card_Ioi
@[simp]
theorem card_Iic : (Iic b).card = b + 1 := by
- rw [← Nat.card_Iic b, ← map_subtype_embedding_Iic, card_map]
+ rw [← Nat.card_Iic b, ← map_valEmbedding_Iic, card_map]
#align fin.card_Iic Fin.card_Iic
@[simp]
theorem card_Iio : (Iio b).card = b := by
- rw [← Nat.card_Iio b, ← map_subtype_embedding_Iio, card_map]
+ rw [← Nat.card_Iio b, ← map_valEmbedding_Iio, card_map]
#align fin.card_Iio Fin.card_Iio
-- Porting note: simp can prove this
@@ -21,8 +21,7 @@ intervals as Finsets and Fintypes.
open Finset Fin Function
--- Porting note: Uncomment once localised BigOperators is fixed:
--- open BigOperators
+open BigOperators
variable (n : ℕ)
The unported dependencies are