data.pi.intervalMathlib.Data.Pi.Interval

This file has been ported!

Changes since the initial port

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.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

feat(data/*/interval): finset.uIcc on concrete structures (#18838)

Calculate the size of finset.uIcc in , , fin, prod, pi, multiset, finset...

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -19,14 +19,14 @@ order are locally finite and calculates the cardinality of their intervals.
 open finset fintype
 open_locale big_operators
 
-variables {ι : Type*} {α : ι → Type*}
-
+variables {ι : Type*} {α : ι → Type*} [fintype ι] [decidable_eq ι] [Π i, decidable_eq (α i)]
 
 namespace pi
+section partial_order
+variables [Π i, partial_order (α i)]
 
-section locally_finite
-variables [decidable_eq ι] [fintype ι] [Π i, decidable_eq (α i)]
-  [Π i, partial_order (α i)] [Π i, locally_finite_order (α i)]
+section locally_finite_order
+variables [Π i, locally_finite_order (α i)]
 
 instance : locally_finite_order (Π i, α i) :=
 locally_finite_order.of_Icc _
@@ -39,21 +39,18 @@ lemma Icc_eq : Icc a b = pi_finset (λ i, Icc (a i) (b i)) := rfl
 
 lemma card_Icc : (Icc a b).card = ∏ i, (Icc (a i) (b i)).card := card_pi_finset _
 
-lemma card_Ico : (Ico a b).card = (∏ i, (Icc (a i) (b i)).card) - 1 :=
+lemma card_Ico : (Ico a b).card = ∏ i, (Icc (a i) (b i)).card - 1 :=
 by rw [card_Ico_eq_card_Icc_sub_one, card_Icc]
 
-lemma card_Ioc : (Ioc a b).card = (∏ i, (Icc (a i) (b i)).card) - 1 :=
+lemma card_Ioc : (Ioc a b).card = ∏ i, (Icc (a i) (b i)).card - 1 :=
 by rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
 
-lemma card_Ioo : (Ioo a b).card = (∏ i, (Icc (a i) (b i)).card) - 2 :=
+lemma card_Ioo : (Ioo a b).card = ∏ i, (Icc (a i) (b i)).card - 2 :=
 by rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
 
-end locally_finite
-
-section bounded
-variables [decidable_eq ι] [fintype ι] [Π i, decidable_eq (α i)] [Π i, partial_order (α i)]
+end locally_finite_order
 
-section bot
+section locally_finite_order_bot
 variables [Π i, locally_finite_order_bot (α i)] (b : Π i, α i)
 
 instance : locally_finite_order_bot (Π i, α i) :=
@@ -63,12 +60,12 @@ locally_finite_order_top.of_Iic _
 
 lemma card_Iic : (Iic b).card = ∏ i, (Iic (b i)).card := card_pi_finset _
 
-lemma card_Iio : (Iio b).card = (∏ i, (Iic (b i)).card) - 1 :=
+lemma card_Iio : (Iio b).card = ∏ i, (Iic (b i)).card - 1 :=
 by rw [card_Iio_eq_card_Iic_sub_one, card_Iic]
 
-end bot
+end locally_finite_order_bot
 
-section top
+section locally_finite_order_top
 variables [Π i, locally_finite_order_top (α i)] (a : Π i, α i)
 
 instance : locally_finite_order_top (Π i, α i) :=
@@ -76,13 +73,19 @@ locally_finite_order_top.of_Ici _
   (λ a, pi_finset $ λ i, Ici (a i))
   (λ a x, by simp_rw [mem_pi_finset, mem_Ici, le_def])
 
-lemma card_Ici : (Ici a).card = (∏ i, (Ici (a i)).card) := card_pi_finset _
+lemma card_Ici : (Ici a).card = ∏ i, (Ici (a i)).card := card_pi_finset _
 
-lemma card_Ioi : (Ioi a).card = (∏ i, (Ici (a i)).card) - 1 :=
+lemma card_Ioi : (Ioi a).card = ∏ i, (Ici (a i)).card - 1 :=
 by rw [card_Ioi_eq_card_Ici_sub_one, card_Ici]
 
-end top
+end locally_finite_order_top
+end partial_order
+
+section lattice
+variables [Π i, lattice (α i)] [Π i, locally_finite_order (α i)] (a b : Π i, α i)
 
-end bounded
+lemma uIcc_eq : uIcc a b = pi_finset (λ i, uIcc (a i) (b i)) := rfl
+lemma card_uIcc : (uIcc a b).card = ∏ i, (uIcc (a i) (b i)).card := card_Icc _ _
 
+end lattice
 end pi

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,7 +3,7 @@ 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 Data.Finset.LocallyFinite.Basic
+import Order.Interval.Finset.Basic
 import Data.Fintype.BigOperators
 
 #align_import data.pi.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
Diff
@@ -3,7 +3,7 @@ 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 Data.Finset.LocallyFinite
+import Data.Finset.LocallyFinite.Basic
 import Data.Fintype.BigOperators
 
 #align_import data.pi.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
Diff
@@ -78,7 +78,7 @@ section LocallyFiniteOrderBot
 variable [∀ i, LocallyFiniteOrderBot (α i)] (b : ∀ i, α i)
 
 instance : LocallyFiniteOrderBot (∀ i, α i) :=
-  LocallyFiniteOrderTop.ofIic _ (fun b => piFinset fun i => Iic (b i)) fun b x => by
+  LocallyFiniteOrderBot.ofIic _ (fun b => piFinset fun i => Iic (b i)) fun b x => by
     simp_rw [mem_pi_finset, mem_Iic, le_def]
 
 #print Pi.card_Iic /-
Diff
@@ -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.Finset.LocallyFinite
-import Mathbin.Data.Fintype.BigOperators
+import Data.Finset.LocallyFinite
+import Data.Fintype.BigOperators
 
 #align_import data.pi.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
 
Diff
@@ -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.pi.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.Finset.LocallyFinite
 import Mathbin.Data.Fintype.BigOperators
 
+#align_import data.pi.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
+
 /-!
 # Intervals in a pi type
 
Diff
@@ -126,13 +126,17 @@ section Lattice
 
 variable [∀ i, Lattice (α i)] [∀ i, LocallyFiniteOrder (α i)] (a b : ∀ i, α i)
 
+#print Pi.uIcc_eq /-
 theorem uIcc_eq : uIcc a b = piFinset fun i => uIcc (a i) (b i) :=
   rfl
 #align pi.uIcc_eq Pi.uIcc_eq
+-/
 
+#print Pi.card_uIcc /-
 theorem card_uIcc : (uIcc a b).card = ∏ i, (uIcc (a i) (b i)).card :=
   card_Icc _ _
 #align pi.card_uIcc Pi.card_uIcc
+-/
 
 end Lattice
 
Diff
@@ -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.pi.interval
-! leanprover-community/mathlib commit ad0089aca372256fe53dde13ca0dfea569bf5ac7
+! leanprover-community/mathlib commit 1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -26,14 +26,17 @@ open Finset Fintype
 
 open scoped BigOperators
 
-variable {ι : Type _} {α : ι → Type _}
+variable {ι : Type _} {α : ι → Type _} [Fintype ι] [DecidableEq ι] [∀ i, DecidableEq (α i)]
 
 namespace Pi
 
-section LocallyFinite
+section PartialOrder
 
-variable [DecidableEq ι] [Fintype ι] [∀ i, DecidableEq (α i)] [∀ i, PartialOrder (α i)]
-  [∀ i, LocallyFiniteOrder (α i)]
+variable [∀ i, PartialOrder (α i)]
+
+section LocallyFiniteOrder
+
+variable [∀ i, LocallyFiniteOrder (α i)]
 
 instance : LocallyFiniteOrder (∀ i, α i) :=
   LocallyFiniteOrder.ofIcc _ (fun a b => piFinset fun i => Icc (a i) (b i)) fun a b x => by
@@ -71,13 +74,9 @@ theorem card_Ioo : (Ioo a b).card = ∏ i, (Icc (a i) (b i)).card - 2 := by
 #align pi.card_Ioo Pi.card_Ioo
 -/
 
-end LocallyFinite
-
-section Bounded
+end LocallyFiniteOrder
 
-variable [DecidableEq ι] [Fintype ι] [∀ i, DecidableEq (α i)] [∀ i, PartialOrder (α i)]
-
-section Bot
+section LocallyFiniteOrderBot
 
 variable [∀ i, LocallyFiniteOrderBot (α i)] (b : ∀ i, α i)
 
@@ -97,9 +96,9 @@ theorem card_Iio : (Iio b).card = ∏ i, (Iic (b i)).card - 1 := by
 #align pi.card_Iio Pi.card_Iio
 -/
 
-end Bot
+end LocallyFiniteOrderBot
 
-section Top
+section LocallyFiniteOrderTop
 
 variable [∀ i, LocallyFiniteOrderTop (α i)] (a : ∀ i, α i)
 
@@ -119,9 +118,23 @@ theorem card_Ioi : (Ioi a).card = ∏ i, (Ici (a i)).card - 1 := by
 #align pi.card_Ioi Pi.card_Ioi
 -/
 
-end Top
+end LocallyFiniteOrderTop
+
+end PartialOrder
+
+section Lattice
+
+variable [∀ i, Lattice (α i)] [∀ i, LocallyFiniteOrder (α i)] (a b : ∀ i, α i)
+
+theorem uIcc_eq : uIcc a b = piFinset fun i => uIcc (a i) (b i) :=
+  rfl
+#align pi.uIcc_eq Pi.uIcc_eq
+
+theorem card_uIcc : (uIcc a b).card = ∏ i, (uIcc (a i) (b i)).card :=
+  card_Icc _ _
+#align pi.card_uIcc Pi.card_uIcc
 
-end Bounded
+end Lattice
 
 end Pi
 
Diff
@@ -41,25 +41,35 @@ instance : LocallyFiniteOrder (∀ i, α i) :=
 
 variable (a b : ∀ i, α i)
 
+#print Pi.Icc_eq /-
 theorem Icc_eq : Icc a b = piFinset fun i => Icc (a i) (b i) :=
   rfl
 #align pi.Icc_eq Pi.Icc_eq
+-/
 
+#print Pi.card_Icc /-
 theorem card_Icc : (Icc a b).card = ∏ i, (Icc (a i) (b i)).card :=
   card_piFinset _
 #align pi.card_Icc Pi.card_Icc
+-/
 
+#print Pi.card_Ico /-
 theorem card_Ico : (Ico a b).card = ∏ i, (Icc (a i) (b i)).card - 1 := by
   rw [card_Ico_eq_card_Icc_sub_one, card_Icc]
 #align pi.card_Ico Pi.card_Ico
+-/
 
+#print Pi.card_Ioc /-
 theorem card_Ioc : (Ioc a b).card = ∏ i, (Icc (a i) (b i)).card - 1 := by
   rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
 #align pi.card_Ioc Pi.card_Ioc
+-/
 
+#print Pi.card_Ioo /-
 theorem card_Ioo : (Ioo a b).card = ∏ i, (Icc (a i) (b i)).card - 2 := by
   rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
 #align pi.card_Ioo Pi.card_Ioo
+-/
 
 end LocallyFinite
 
@@ -75,13 +85,17 @@ instance : LocallyFiniteOrderBot (∀ i, α i) :=
   LocallyFiniteOrderTop.ofIic _ (fun b => piFinset fun i => Iic (b i)) fun b x => by
     simp_rw [mem_pi_finset, mem_Iic, le_def]
 
+#print Pi.card_Iic /-
 theorem card_Iic : (Iic b).card = ∏ i, (Iic (b i)).card :=
   card_piFinset _
 #align pi.card_Iic Pi.card_Iic
+-/
 
+#print Pi.card_Iio /-
 theorem card_Iio : (Iio b).card = ∏ i, (Iic (b i)).card - 1 := by
   rw [card_Iio_eq_card_Iic_sub_one, card_Iic]
 #align pi.card_Iio Pi.card_Iio
+-/
 
 end Bot
 
@@ -93,13 +107,17 @@ instance : LocallyFiniteOrderTop (∀ i, α i) :=
   LocallyFiniteOrderTop.ofIci _ (fun a => piFinset fun i => Ici (a i)) fun a x => by
     simp_rw [mem_pi_finset, mem_Ici, le_def]
 
+#print Pi.card_Ici /-
 theorem card_Ici : (Ici a).card = ∏ i, (Ici (a i)).card :=
   card_piFinset _
 #align pi.card_Ici Pi.card_Ici
+-/
 
+#print Pi.card_Ioi /-
 theorem card_Ioi : (Ioi a).card = ∏ i, (Ici (a i)).card - 1 := by
   rw [card_Ioi_eq_card_Ici_sub_one, card_Ici]
 #align pi.card_Ioi Pi.card_Ioi
+-/
 
 end Top
 
Diff
@@ -49,15 +49,15 @@ theorem card_Icc : (Icc a b).card = ∏ i, (Icc (a i) (b i)).card :=
   card_piFinset _
 #align pi.card_Icc Pi.card_Icc
 
-theorem card_Ico : (Ico a b).card = (∏ i, (Icc (a i) (b i)).card) - 1 := by
+theorem card_Ico : (Ico a b).card = ∏ i, (Icc (a i) (b i)).card - 1 := by
   rw [card_Ico_eq_card_Icc_sub_one, card_Icc]
 #align pi.card_Ico Pi.card_Ico
 
-theorem card_Ioc : (Ioc a b).card = (∏ i, (Icc (a i) (b i)).card) - 1 := by
+theorem card_Ioc : (Ioc a b).card = ∏ i, (Icc (a i) (b i)).card - 1 := by
   rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
 #align pi.card_Ioc Pi.card_Ioc
 
-theorem card_Ioo : (Ioo a b).card = (∏ i, (Icc (a i) (b i)).card) - 2 := by
+theorem card_Ioo : (Ioo a b).card = ∏ i, (Icc (a i) (b i)).card - 2 := by
   rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
 #align pi.card_Ioo Pi.card_Ioo
 
@@ -79,7 +79,7 @@ theorem card_Iic : (Iic b).card = ∏ i, (Iic (b i)).card :=
   card_piFinset _
 #align pi.card_Iic Pi.card_Iic
 
-theorem card_Iio : (Iio b).card = (∏ i, (Iic (b i)).card) - 1 := by
+theorem card_Iio : (Iio b).card = ∏ i, (Iic (b i)).card - 1 := by
   rw [card_Iio_eq_card_Iic_sub_one, card_Iic]
 #align pi.card_Iio Pi.card_Iio
 
@@ -97,7 +97,7 @@ theorem card_Ici : (Ici a).card = ∏ i, (Ici (a i)).card :=
   card_piFinset _
 #align pi.card_Ici Pi.card_Ici
 
-theorem card_Ioi : (Ioi a).card = (∏ i, (Ici (a i)).card) - 1 := by
+theorem card_Ioi : (Ioi a).card = ∏ i, (Ici (a i)).card - 1 := by
   rw [card_Ioi_eq_card_Ici_sub_one, card_Ici]
 #align pi.card_Ioi Pi.card_Ioi
 
Diff
@@ -24,7 +24,7 @@ order are locally finite and calculates the cardinality of their intervals.
 
 open Finset Fintype
 
-open BigOperators
+open scoped BigOperators
 
 variable {ι : Type _} {α : ι → Type _}
 
Diff
@@ -41,52 +41,22 @@ instance : LocallyFiniteOrder (∀ i, α i) :=
 
 variable (a b : ∀ i, α i)
 
-/- warning: pi.Icc_eq -> Pi.Icc_eq is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Fintype.{u1} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))] (a : forall (i : ι), α i) (b : forall (i : ι), α i), Eq.{succ (max u1 u2)} (Finset.{max u1 u2} (forall (i : ι), α i)) (Finset.Icc.{max u1 u2} (forall (i : ι), α i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))) (Pi.locallyFiniteOrder.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) a b) (Fintype.piFinset.{u1, u2} ι (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) => α i) (fun (i : ι) => Finset.Icc.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i)) (_inst_5 i) (a i) (b i)))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : Fintype.{u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u1} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))] (a : forall (i : ι), α i) (b : forall (i : ι), α i), Eq.{max (succ u2) (succ u1)} (Finset.{max u2 u1} (forall (i : ι), α i)) (Finset.Icc.{max u2 u1} (forall (i : ι), α i) (Pi.preorder.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))) (Pi.instLocallyFiniteOrderForAllPreorderToPreorder.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) a b) (Fintype.piFinset.{u2, u1} ι (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) => α i) (fun (i : ι) => Finset.Icc.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i)) (_inst_5 i) (a i) (b i)))
-Case conversion may be inaccurate. Consider using '#align pi.Icc_eq Pi.Icc_eqₓ'. -/
 theorem Icc_eq : Icc a b = piFinset fun i => Icc (a i) (b i) :=
   rfl
 #align pi.Icc_eq Pi.Icc_eq
 
-/- warning: pi.card_Icc -> Pi.card_Icc is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Fintype.{u1} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))] (a : forall (i : ι), α i) (b : forall (i : ι), α i), Eq.{1} Nat (Finset.card.{max u1 u2} (forall (i : ι), α i) (Finset.Icc.{max u1 u2} (forall (i : ι), α i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))) (Pi.locallyFiniteOrder.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) a b)) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => Finset.card.{u2} (α i) (Finset.Icc.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i)) (_inst_5 i) (a i) (b i))))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : Fintype.{u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u1} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))] (a : forall (i : ι), α i) (b : forall (i : ι), α i), Eq.{1} Nat (Finset.card.{max u2 u1} (forall (i : ι), α i) (Finset.Icc.{max u2 u1} (forall (i : ι), α i) (Pi.preorder.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))) (Pi.instLocallyFiniteOrderForAllPreorderToPreorder.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) a b)) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => Finset.card.{u1} (α i) (Finset.Icc.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i)) (_inst_5 i) (a i) (b i))))
-Case conversion may be inaccurate. Consider using '#align pi.card_Icc Pi.card_Iccₓ'. -/
 theorem card_Icc : (Icc a b).card = ∏ i, (Icc (a i) (b i)).card :=
   card_piFinset _
 #align pi.card_Icc Pi.card_Icc
 
-/- warning: pi.card_Ico -> Pi.card_Ico is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Fintype.{u1} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))] (a : forall (i : ι), α i) (b : forall (i : ι), α i), Eq.{1} Nat (Finset.card.{max u1 u2} (forall (i : ι), α i) (Finset.Ico.{max u1 u2} (forall (i : ι), α i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))) (Pi.locallyFiniteOrder.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => Finset.card.{u2} (α i) (Finset.Icc.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i)) (_inst_5 i) (a i) (b i)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : Fintype.{u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u1} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))] (a : forall (i : ι), α i) (b : forall (i : ι), α i), Eq.{1} Nat (Finset.card.{max u2 u1} (forall (i : ι), α i) (Finset.Ico.{max u2 u1} (forall (i : ι), α i) (Pi.preorder.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))) (Pi.instLocallyFiniteOrderForAllPreorderToPreorder.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => Finset.card.{u1} (α i) (Finset.Icc.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i)) (_inst_5 i) (a i) (b i)))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
-Case conversion may be inaccurate. Consider using '#align pi.card_Ico Pi.card_Icoₓ'. -/
 theorem card_Ico : (Ico a b).card = (∏ i, (Icc (a i) (b i)).card) - 1 := by
   rw [card_Ico_eq_card_Icc_sub_one, card_Icc]
 #align pi.card_Ico Pi.card_Ico
 
-/- warning: pi.card_Ioc -> Pi.card_Ioc is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Fintype.{u1} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))] (a : forall (i : ι), α i) (b : forall (i : ι), α i), Eq.{1} Nat (Finset.card.{max u1 u2} (forall (i : ι), α i) (Finset.Ioc.{max u1 u2} (forall (i : ι), α i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))) (Pi.locallyFiniteOrder.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => Finset.card.{u2} (α i) (Finset.Icc.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i)) (_inst_5 i) (a i) (b i)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : Fintype.{u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u1} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))] (a : forall (i : ι), α i) (b : forall (i : ι), α i), Eq.{1} Nat (Finset.card.{max u2 u1} (forall (i : ι), α i) (Finset.Ioc.{max u2 u1} (forall (i : ι), α i) (Pi.preorder.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))) (Pi.instLocallyFiniteOrderForAllPreorderToPreorder.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => Finset.card.{u1} (α i) (Finset.Icc.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i)) (_inst_5 i) (a i) (b i)))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
-Case conversion may be inaccurate. Consider using '#align pi.card_Ioc Pi.card_Iocₓ'. -/
 theorem card_Ioc : (Ioc a b).card = (∏ i, (Icc (a i) (b i)).card) - 1 := by
   rw [card_Ioc_eq_card_Icc_sub_one, card_Icc]
 #align pi.card_Ioc Pi.card_Ioc
 
-/- warning: pi.card_Ioo -> Pi.card_Ioo is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Fintype.{u1} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))] (a : forall (i : ι), α i) (b : forall (i : ι), α i), Eq.{1} Nat (Finset.card.{max u1 u2} (forall (i : ι), α i) (Finset.Ioo.{max u1 u2} (forall (i : ι), α i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))) (Pi.locallyFiniteOrder.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => Finset.card.{u2} (α i) (Finset.Icc.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i)) (_inst_5 i) (a i) (b i)))) (OfNat.ofNat.{0} Nat 2 (OfNat.mk.{0} Nat 2 (bit0.{0} Nat Nat.hasAdd (One.one.{0} Nat Nat.hasOne)))))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : Fintype.{u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u1} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrder.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))] (a : forall (i : ι), α i) (b : forall (i : ι), α i), Eq.{1} Nat (Finset.card.{max u2 u1} (forall (i : ι), α i) (Finset.Ioo.{max u2 u1} (forall (i : ι), α i) (Pi.preorder.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))) (Pi.instLocallyFiniteOrderForAllPreorderToPreorder.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) a b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => Finset.card.{u1} (α i) (Finset.Icc.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i)) (_inst_5 i) (a i) (b i)))) (OfNat.ofNat.{0} Nat 2 (instOfNatNat 2)))
-Case conversion may be inaccurate. Consider using '#align pi.card_Ioo Pi.card_Iooₓ'. -/
 theorem card_Ioo : (Ioo a b).card = (∏ i, (Icc (a i) (b i)).card) - 2 := by
   rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
 #align pi.card_Ioo Pi.card_Ioo
@@ -105,22 +75,10 @@ instance : LocallyFiniteOrderBot (∀ i, α i) :=
   LocallyFiniteOrderTop.ofIic _ (fun b => piFinset fun i => Iic (b i)) fun b x => by
     simp_rw [mem_pi_finset, mem_Iic, le_def]
 
-/- warning: pi.card_Iic -> Pi.card_Iic is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Fintype.{u1} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrderBot.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))] (b : forall (i : ι), α i), Eq.{1} Nat (Finset.card.{max u1 u2} (forall (i : ι), α i) (Finset.Iic.{max u1 u2} (forall (i : ι), α i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))) (Pi.locallyFiniteOrderBot.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) b)) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => Finset.card.{u2} (α i) (Finset.Iic.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i)) (_inst_5 i) (b i))))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : Fintype.{u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u1} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrderBot.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))] (b : forall (i : ι), α i), Eq.{1} Nat (Finset.card.{max u2 u1} (forall (i : ι), α i) (Finset.Iic.{max u2 u1} (forall (i : ι), α i) (Pi.preorder.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))) (Pi.instLocallyFiniteOrderBotForAllPreorderToPreorder.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) b)) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => Finset.card.{u1} (α i) (Finset.Iic.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i)) (_inst_5 i) (b i))))
-Case conversion may be inaccurate. Consider using '#align pi.card_Iic Pi.card_Iicₓ'. -/
 theorem card_Iic : (Iic b).card = ∏ i, (Iic (b i)).card :=
   card_piFinset _
 #align pi.card_Iic Pi.card_Iic
 
-/- warning: pi.card_Iio -> Pi.card_Iio is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Fintype.{u1} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrderBot.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))] (b : forall (i : ι), α i), Eq.{1} Nat (Finset.card.{max u1 u2} (forall (i : ι), α i) (Finset.Iio.{max u1 u2} (forall (i : ι), α i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))) (Pi.locallyFiniteOrderBot.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => Finset.card.{u2} (α i) (Finset.Iic.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i)) (_inst_5 i) (b i)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : Fintype.{u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u1} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrderBot.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))] (b : forall (i : ι), α i), Eq.{1} Nat (Finset.card.{max u2 u1} (forall (i : ι), α i) (Finset.Iio.{max u2 u1} (forall (i : ι), α i) (Pi.preorder.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))) (Pi.instLocallyFiniteOrderBotForAllPreorderToPreorder.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) b)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => Finset.card.{u1} (α i) (Finset.Iic.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i)) (_inst_5 i) (b i)))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
-Case conversion may be inaccurate. Consider using '#align pi.card_Iio Pi.card_Iioₓ'. -/
 theorem card_Iio : (Iio b).card = (∏ i, (Iic (b i)).card) - 1 := by
   rw [card_Iio_eq_card_Iic_sub_one, card_Iic]
 #align pi.card_Iio Pi.card_Iio
@@ -135,22 +93,10 @@ instance : LocallyFiniteOrderTop (∀ i, α i) :=
   LocallyFiniteOrderTop.ofIci _ (fun a => piFinset fun i => Ici (a i)) fun a x => by
     simp_rw [mem_pi_finset, mem_Ici, le_def]
 
-/- warning: pi.card_Ici -> Pi.card_Ici is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Fintype.{u1} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrderTop.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))] (a : forall (i : ι), α i), Eq.{1} Nat (Finset.card.{max u1 u2} (forall (i : ι), α i) (Finset.Ici.{max u1 u2} (forall (i : ι), α i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))) (Pi.locallyFiniteOrderTop.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) a)) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => Finset.card.{u2} (α i) (Finset.Ici.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i)) (_inst_5 i) (a i))))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : Fintype.{u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u1} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrderTop.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))] (a : forall (i : ι), α i), Eq.{1} Nat (Finset.card.{max u2 u1} (forall (i : ι), α i) (Finset.Ici.{max u2 u1} (forall (i : ι), α i) (Pi.preorder.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))) (Pi.instLocallyFiniteOrderTopForAllPreorderToPreorder.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) a)) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => Finset.card.{u1} (α i) (Finset.Ici.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i)) (_inst_5 i) (a i))))
-Case conversion may be inaccurate. Consider using '#align pi.card_Ici Pi.card_Iciₓ'. -/
 theorem card_Ici : (Ici a).card = ∏ i, (Ici (a i)).card :=
   card_piFinset _
 #align pi.card_Ici Pi.card_Ici
 
-/- warning: pi.card_Ioi -> Pi.card_Ioi is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u1}} {α : ι -> Type.{u2}} [_inst_1 : DecidableEq.{succ u1} ι] [_inst_2 : Fintype.{u1} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u2} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u2} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrderTop.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))] (a : forall (i : ι), α i), Eq.{1} Nat (Finset.card.{max u1 u2} (forall (i : ι), α i) (Finset.Ioi.{max u1 u2} (forall (i : ι), α i) (Pi.preorder.{u1, u2} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u2} (α i) (_inst_4 i))) (Pi.locallyFiniteOrderTop.{u1, u2} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) a)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat Nat.hasSub) (Finset.prod.{0, u1} Nat ι Nat.commMonoid (Finset.univ.{u1} ι _inst_2) (fun (i : ι) => Finset.card.{u2} (α i) (Finset.Ici.{u2} (α i) (PartialOrder.toPreorder.{u2} (α i) (_inst_4 i)) (_inst_5 i) (a i)))) (OfNat.ofNat.{0} Nat 1 (OfNat.mk.{0} Nat 1 (One.one.{0} Nat Nat.hasOne))))
-but is expected to have type
-  forall {ι : Type.{u2}} {α : ι -> Type.{u1}} [_inst_1 : DecidableEq.{succ u2} ι] [_inst_2 : Fintype.{u2} ι] [_inst_3 : forall (i : ι), DecidableEq.{succ u1} (α i)] [_inst_4 : forall (i : ι), PartialOrder.{u1} (α i)] [_inst_5 : forall (i : ι), LocallyFiniteOrderTop.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))] (a : forall (i : ι), α i), Eq.{1} Nat (Finset.card.{max u2 u1} (forall (i : ι), α i) (Finset.Ioi.{max u2 u1} (forall (i : ι), α i) (Pi.preorder.{u2, u1} ι (fun (i : ι) => α i) (fun (i : ι) => PartialOrder.toPreorder.{u1} (α i) (_inst_4 i))) (Pi.instLocallyFiniteOrderTopForAllPreorderToPreorder.{u2, u1} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) _inst_2 (fun (i : ι) (a : α i) (b : α i) => _inst_3 i a b) (fun (i : ι) => _inst_4 i) (fun (i : ι) => _inst_5 i)) a)) (HSub.hSub.{0, 0, 0} Nat Nat Nat (instHSub.{0} Nat instSubNat) (Finset.prod.{0, u2} Nat ι Nat.commMonoid (Finset.univ.{u2} ι _inst_2) (fun (i : ι) => Finset.card.{u1} (α i) (Finset.Ici.{u1} (α i) (PartialOrder.toPreorder.{u1} (α i) (_inst_4 i)) (_inst_5 i) (a i)))) (OfNat.ofNat.{0} Nat 1 (instOfNatNat 1)))
-Case conversion may be inaccurate. Consider using '#align pi.card_Ioi Pi.card_Ioiₓ'. -/
 theorem card_Ioi : (Ioi a).card = (∏ i, (Ici (a i)).card) - 1 := by
   rw [card_Ioi_eq_card_Ici_sub_one, card_Ici]
 #align pi.card_Ioi Pi.card_Ioi

Changes in mathlib4

mathlib3
mathlib4
chore: Move intervals (#11765)

Move Set.Ixx, Finset.Ixx, Multiset.Ixx together under two different folders:

  • Order.Interval for their definition and basic properties
  • Algebra.Order.Interval for their algebraic properties

Move 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.

Diff
@@ -3,7 +3,7 @@ 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 Mathlib.Data.Finset.LocallyFinite.Basic
+import Mathlib.Order.Interval.Finset.Basic
 import Mathlib.Data.Fintype.BigOperators
 
 #align_import data.pi.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
fix: rename LocallyFiniteOrderTop.ofIic to LocallyFiniteOrderBot (#11371)

It's about LocallyFiniteOrderBot, so the current name is simply wrong.

Also fix documentation mistakes. These errors were already present in Mathlib 3, before the port.

Co-authored-by: Richard Copley <rcopley@gmail.com>

Diff
@@ -61,7 +61,7 @@ section LocallyFiniteOrderBot
 variable [∀ i, LocallyFiniteOrderBot (α i)] (b : ∀ i, α i)
 
 instance instLocallyFiniteOrderBot : LocallyFiniteOrderBot (∀ i, α i) :=
-  LocallyFiniteOrderTop.ofIic _ (fun b => piFinset fun i => Iic (b i)) fun b x => by
+  .ofIic _ (fun b => piFinset fun i => Iic (b i)) fun b x => by
     simp_rw [mem_piFinset, mem_Iic, le_def]
 
 theorem card_Iic : (Iic b).card = ∏ i, (Iic (b i)).card :=
chore: Rename LocallyFiniteOrder instances (#11076)

The generated names were too long

Diff
@@ -29,7 +29,7 @@ variable [∀ i, PartialOrder (α i)]
 section LocallyFiniteOrder
 variable [∀ i, LocallyFiniteOrder (α i)]
 
-instance : LocallyFiniteOrder (∀ i, α i) :=
+instance instLocallyFiniteOrder : LocallyFiniteOrder (∀ i, α i) :=
   LocallyFiniteOrder.ofIcc _ (fun a b => piFinset fun i => Icc (a i) (b i)) fun a b x => by
     simp_rw [mem_piFinset, mem_Icc, le_def, forall_and]
 
@@ -60,7 +60,7 @@ end LocallyFiniteOrder
 section LocallyFiniteOrderBot
 variable [∀ i, LocallyFiniteOrderBot (α i)] (b : ∀ i, α i)
 
-instance : LocallyFiniteOrderBot (∀ i, α i) :=
+instance instLocallyFiniteOrderBot : LocallyFiniteOrderBot (∀ i, α i) :=
   LocallyFiniteOrderTop.ofIic _ (fun b => piFinset fun i => Iic (b i)) fun b x => by
     simp_rw [mem_piFinset, mem_Iic, le_def]
 
@@ -77,7 +77,7 @@ end LocallyFiniteOrderBot
 section LocallyFiniteOrderTop
 variable [∀ i, LocallyFiniteOrderTop (α i)] (a : ∀ i, α i)
 
-instance : LocallyFiniteOrderTop (∀ i, α i) :=
+instance instLocallyFiniteOrderTop : LocallyFiniteOrderTop (∀ i, α i) :=
   LocallyFiniteOrderTop.ofIci _ (fun a => piFinset fun i => Ici (a i)) fun a x => by
     simp_rw [mem_piFinset, mem_Ici, le_def]
 
feat: Boxes in locally finite ordered rings (#10506)

Define the sequence of "hollow boxes" indexed by natural numbers as the successive differences of the "boxes" Icc (-n) n.

Diff
@@ -3,7 +3,7 @@ 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 Mathlib.Data.Finset.LocallyFinite
+import Mathlib.Data.Finset.LocallyFinite.Basic
 import Mathlib.Data.Fintype.BigOperators
 
 #align_import data.pi.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -20,7 +20,7 @@ open Finset Fintype
 
 open BigOperators
 
-variable {ι : Type _} {α : ι → Type _} [Fintype ι] [DecidableEq ι] [∀ i, DecidableEq (α i)]
+variable {ι : Type*} {α : ι → Type*} [Fintype ι] [DecidableEq ι] [∀ i, DecidableEq (α i)]
 
 namespace Pi
 section PartialOrder
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -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.pi.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.Finset.LocallyFinite
 import Mathlib.Data.Fintype.BigOperators
 
+#align_import data.pi.interval from "leanprover-community/mathlib"@"1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29"
+
 /-!
 # Intervals in a pi type
 
feat: 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>

Diff
@@ -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.pi.interval
-! leanprover-community/mathlib commit d101e93197bb5f6ea89bd7ba386b7f7dff1f3903
+! leanprover-community/mathlib commit 1d29de43a5ba4662dd33b5cfeecfc2a27a5a8a29
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -23,14 +23,14 @@ open Finset Fintype
 
 open BigOperators
 
-variable {ι : Type _} {α : ι → Type _}
+variable {ι : Type _} {α : ι → Type _} [Fintype ι] [DecidableEq ι] [∀ i, DecidableEq (α i)]
 
 namespace Pi
+section PartialOrder
+variable [∀ i, PartialOrder (α i)]
 
-section LocallyFinite
-
-variable [DecidableEq ι] [Fintype ι] [∀ i, DecidableEq (α i)] [∀ i, PartialOrder (α i)]
-  [∀ i, LocallyFiniteOrder (α i)]
+section LocallyFiniteOrder
+variable [∀ i, LocallyFiniteOrder (α i)]
 
 instance : LocallyFiniteOrder (∀ i, α i) :=
   LocallyFiniteOrder.ofIcc _ (fun a b => piFinset fun i => Icc (a i) (b i)) fun a b x => by
@@ -58,14 +58,9 @@ theorem card_Ioo : (Ioo a b).card = (∏ i, (Icc (a i) (b i)).card) - 2 := by
   rw [card_Ioo_eq_card_Icc_sub_two, card_Icc]
 #align pi.card_Ioo Pi.card_Ioo
 
-end LocallyFinite
-
-section Bounded
-
-variable [DecidableEq ι] [Fintype ι] [∀ i, DecidableEq (α i)] [∀ i, PartialOrder (α i)]
-
-section Bot
+end LocallyFiniteOrder
 
+section LocallyFiniteOrderBot
 variable [∀ i, LocallyFiniteOrderBot (α i)] (b : ∀ i, α i)
 
 instance : LocallyFiniteOrderBot (∀ i, α i) :=
@@ -80,10 +75,9 @@ theorem card_Iio : (Iio b).card = (∏ i, (Iic (b i)).card) - 1 := by
   rw [card_Iio_eq_card_Iic_sub_one, card_Iic]
 #align pi.card_Iio Pi.card_Iio
 
-end Bot
-
-section Top
+end LocallyFiniteOrderBot
 
+section LocallyFiniteOrderTop
 variable [∀ i, LocallyFiniteOrderTop (α i)] (a : ∀ i, α i)
 
 instance : LocallyFiniteOrderTop (∀ i, α i) :=
@@ -98,8 +92,17 @@ theorem card_Ioi : (Ioi a).card = (∏ i, (Ici (a i)).card) - 1 := by
   rw [card_Ioi_eq_card_Ici_sub_one, card_Ici]
 #align pi.card_Ioi Pi.card_Ioi
 
-end Top
+end LocallyFiniteOrderTop
+end PartialOrder
+
+section Lattice
+variable [∀ i, Lattice (α i)] [∀ i, LocallyFiniteOrder (α i)] (a b : ∀ i, α i)
+
+theorem uIcc_eq : uIcc a b = piFinset fun i => uIcc (a i) (b i) := rfl
+#align pi.uIcc_eq Pi.uIcc_eq
 
-end Bounded
+theorem card_uIcc : (uIcc a b).card = ∏ i, (uIcc (a i) (b i)).card := card_Icc _ _
+#align pi.card_uIcc Pi.card_uIcc
 
+end Lattice
 end Pi
feat: port Data.Pi.Interval (#2177)

This also fixes a mis-port of card_piFinset from #1742, which used Fintype.card instead of the correct Finset.card.

After this change the port is just a single name fix.

Co-authored-by: Moritz Firsching <firsching@google.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Dependencies 7 + 234

235 files ported (97.1%)
101377 lines ported (97.1%)
Show graph

The unported dependencies are