data.prod.tprodMathlib.Data.Prod.TProd

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)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

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

chore(data/set/pairwise): split (#17880)

This PR will split most of the lemmas in data.set.pairwise which are independent of the data.set.lattice. It makes a lot of files no longer depend on data.set.lattice.

Zulip

mathlib4 PR: https://github.com/leanprover-community/mathlib4/pull/1184

Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>

Diff
@@ -144,7 +144,7 @@ end
 lemma elim_preimage_pi [decidable_eq ι] {l : list ι} (hnd : l.nodup) (h : ∀ i, i ∈ l)
   (t : Π i, set (α i)) : tprod.elim' h ⁻¹' pi univ t = set.tprod l t :=
 begin
-  have : { i | i ∈ l} = univ, { ext i, simp [h] },
+  have : { i | i ∈ l } = univ, { ext i, simp [h] },
   rw [← this, ← mk_preimage_tprod, preimage_preimage],
   convert preimage_id, simp [tprod.mk_elim hnd h, id_def]
 end

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -186,7 +186,7 @@ theorem mk_preimage_tprod :
   | i :: l, t => by
     ext f
     have : f ∈ tprod.mk l ⁻¹' Set.tprod l t ↔ f ∈ {x | x ∈ l}.pi t := by rw [mk_preimage_tprod l t]
-    change tprod.mk l f ∈ Set.tprod l t ↔ ∀ i : ι, i ∈ l → f i ∈ t i at this 
+    change tprod.mk l f ∈ Set.tprod l t ↔ ∀ i : ι, i ∈ l → f i ∈ t i at this
     -- `simp [set.tprod, tprod.mk, this]` can close this goal but is slow.
     rw [Set.tprod, tprod.mk, mem_preimage, mem_pi, prod_mk_mem_set_prod_eq]
     simp_rw [mem_set_of_eq, mem_cons_iff]
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2020 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 -/
-import Mathbin.Data.List.Nodup
+import Data.List.Nodup
 
 #align_import data.prod.tprod from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0"
 
Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2020 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
-
-! This file was ported from Lean 3 source module data.prod.tprod
-! leanprover-community/mathlib commit c227d107bbada5d0d9d20287e3282c0a7f1651a0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.List.Nodup
 
+#align_import data.prod.tprod from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0"
+
 /-!
 # Finite products of types
 
Diff
@@ -50,10 +50,12 @@ namespace List
 
 variable (α)
 
+#print List.TProd /-
 /-- The product of a family of types over a list. -/
 def TProd (l : List ι) : Type _ :=
   l.foldr (fun i β => α i × β) PUnit
 #align list.tprod List.TProd
+-/
 
 variable {α}
 
@@ -61,56 +63,73 @@ namespace Tprod
 
 open List
 
+#print List.TProd.mk /-
 /-- Turning a function `f : Π i, α i` into an element of the iterated product `tprod α l`. -/
 protected def mk : ∀ (l : List ι) (f : ∀ i, α i), TProd α l
   | [] => fun f => PUnit.unit
   | i :: is => fun f => (f i, mk is f)
 #align list.tprod.mk List.TProd.mk
+-/
 
 instance [∀ i, Inhabited (α i)] : Inhabited (TProd α l) :=
   ⟨TProd.mk l default⟩
 
+#print List.TProd.fst_mk /-
 @[simp]
 theorem fst_mk (i : ι) (l : List ι) (f : ∀ i, α i) : (TProd.mk (i :: l) f).1 = f i :=
   rfl
 #align list.tprod.fst_mk List.TProd.fst_mk
+-/
 
+#print List.TProd.snd_mk /-
 @[simp]
 theorem snd_mk (i : ι) (l : List ι) (f : ∀ i, α i) : (TProd.mk (i :: l) f).2 = TProd.mk l f :=
   rfl
 #align list.tprod.snd_mk List.TProd.snd_mk
+-/
 
 variable [DecidableEq ι]
 
+#print List.TProd.elim /-
 /-- Given an element of the iterated product `l.prod α`, take a projection into direction `i`.
   If `i` appears multiple times in `l`, this chooses the first component in direction `i`. -/
 protected def elim : ∀ {l : List ι} (v : TProd α l) {i : ι} (hi : i ∈ l), α i
   | i :: is, v, j, hj =>
     if hji : j = i then by subst hji; exact v.1 else elim v.2 (hj.resolve_left hji)
 #align list.tprod.elim List.TProd.elim
+-/
 
+#print List.TProd.elim_self /-
 @[simp]
 theorem elim_self (v : TProd α (i :: l)) : v.elim (l.mem_cons_self i) = v.1 := by simp [tprod.elim]
 #align list.tprod.elim_self List.TProd.elim_self
+-/
 
+#print List.TProd.elim_of_ne /-
 @[simp]
 theorem elim_of_ne (hj : j ∈ i :: l) (hji : j ≠ i) (v : TProd α (i :: l)) :
     v.elim hj = TProd.elim v.2 (hj.resolve_left hji) := by simp [tprod.elim, hji]
 #align list.tprod.elim_of_ne List.TProd.elim_of_ne
+-/
 
+#print List.TProd.elim_of_mem /-
 @[simp]
 theorem elim_of_mem (hl : (i :: l).Nodup) (hj : j ∈ l) (v : TProd α (i :: l)) :
     v.elim (mem_cons_of_mem _ hj) = TProd.elim v.2 hj := by apply elim_of_ne; rintro rfl;
   exact hl.not_mem hj
 #align list.tprod.elim_of_mem List.TProd.elim_of_mem
+-/
 
+#print List.TProd.elim_mk /-
 theorem elim_mk : ∀ (l : List ι) (f : ∀ i, α i) {i : ι} (hi : i ∈ l), (TProd.mk l f).elim hi = f i
   | i :: is, f, j, hj => by
     by_cases hji : j = i
     · subst hji; simp
     · rw [elim_of_ne _ hji, snd_mk, elim_mk]
 #align list.tprod.elim_mk List.TProd.elim_mk
+-/
 
+#print List.TProd.ext /-
 @[ext]
 theorem ext :
     ∀ {l : List ι} (hl : l.Nodup) {v w : TProd α l}
@@ -121,22 +140,29 @@ theorem ext :
     refine' ext (nodup_cons.mp hl).2 fun j hj => _
     rw [← elim_of_mem hl, hvw, elim_of_mem hl]
 #align list.tprod.ext List.TProd.ext
+-/
 
+#print List.TProd.elim' /-
 /-- A version of `tprod.elim` when `l` contains all elements. In this case we get a function into
   `Π i, α i`. -/
 @[simp]
 protected def elim' (h : ∀ i, i ∈ l) (v : TProd α l) (i : ι) : α i :=
   v.elim (h i)
 #align list.tprod.elim' List.TProd.elim'
+-/
 
+#print List.TProd.mk_elim /-
 theorem mk_elim (hnd : l.Nodup) (h : ∀ i, i ∈ l) (v : TProd α l) : TProd.mk l (v.elim' h) = v :=
   TProd.ext hnd fun i hi => by simp [elim_mk]
 #align list.tprod.mk_elim List.TProd.mk_elim
+-/
 
+#print List.TProd.piEquivTProd /-
 /-- Pi-types are equivalent to iterated products. -/
 def piEquivTProd (hnd : l.Nodup) (h : ∀ i, i ∈ l) : (∀ i, α i) ≃ TProd α l :=
   ⟨TProd.mk l, TProd.elim' h, fun f => funext fun i => elim_mk l f (h i), mk_elim hnd h⟩
 #align list.tprod.pi_equiv_tprod List.TProd.piEquivTProd
+-/
 
 end Tprod
 
@@ -147,13 +173,16 @@ namespace Set
 open List
 
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print Set.tprod /-
 /-- A product of sets in `tprod α l`. -/
 @[simp]
 protected def tprod : ∀ (l : List ι) (t : ∀ i, Set (α i)), Set (TProd α l)
   | [], t => univ
   | i :: is, t => t i ×ˢ tprod is t
 #align set.tprod Set.tprod
+-/
 
+#print Set.mk_preimage_tprod /-
 theorem mk_preimage_tprod :
     ∀ (l : List ι) (t : ∀ i, Set (α i)), TProd.mk l ⁻¹' Set.tprod l t = {i | i ∈ l}.pi t
   | [], t => by simp [Set.tprod]
@@ -167,7 +196,9 @@ theorem mk_preimage_tprod :
     rw [forall_eq_or_imp, and_congr_right_iff]
     exact fun _ => this
 #align set.mk_preimage_tprod Set.mk_preimage_tprod
+-/
 
+#print Set.elim_preimage_pi /-
 theorem elim_preimage_pi [DecidableEq ι] {l : List ι} (hnd : l.Nodup) (h : ∀ i, i ∈ l)
     (t : ∀ i, Set (α i)) : TProd.elim' h ⁻¹' pi univ t = Set.tprod l t :=
   by
@@ -175,6 +206,7 @@ theorem elim_preimage_pi [DecidableEq ι] {l : List ι} (hnd : l.Nodup) (h : ∀
   rw [← this, ← mk_preimage_tprod, preimage_preimage]
   convert preimage_id; simp [tprod.mk_elim hnd h, id_def]
 #align set.elim_preimage_pi Set.elim_preimage_pi
+-/
 
 end Set
 
Diff
@@ -155,12 +155,11 @@ protected def tprod : ∀ (l : List ι) (t : ∀ i, Set (α i)), Set (TProd α l
 #align set.tprod Set.tprod
 
 theorem mk_preimage_tprod :
-    ∀ (l : List ι) (t : ∀ i, Set (α i)), TProd.mk l ⁻¹' Set.tprod l t = { i | i ∈ l }.pi t
+    ∀ (l : List ι) (t : ∀ i, Set (α i)), TProd.mk l ⁻¹' Set.tprod l t = {i | i ∈ l}.pi t
   | [], t => by simp [Set.tprod]
   | i :: l, t => by
     ext f
-    have : f ∈ tprod.mk l ⁻¹' Set.tprod l t ↔ f ∈ { x | x ∈ l }.pi t := by
-      rw [mk_preimage_tprod l t]
+    have : f ∈ tprod.mk l ⁻¹' Set.tprod l t ↔ f ∈ {x | x ∈ l}.pi t := by rw [mk_preimage_tprod l t]
     change tprod.mk l f ∈ Set.tprod l t ↔ ∀ i : ι, i ∈ l → f i ∈ t i at this 
     -- `simp [set.tprod, tprod.mk, this]` can close this goal but is slow.
     rw [Set.tprod, tprod.mk, mem_preimage, mem_pi, prod_mk_mem_set_prod_eq]
@@ -172,7 +171,7 @@ theorem mk_preimage_tprod :
 theorem elim_preimage_pi [DecidableEq ι] {l : List ι} (hnd : l.Nodup) (h : ∀ i, i ∈ l)
     (t : ∀ i, Set (α i)) : TProd.elim' h ⁻¹' pi univ t = Set.tprod l t :=
   by
-  have : { i | i ∈ l } = univ := by ext i; simp [h]
+  have : {i | i ∈ l} = univ := by ext i; simp [h]
   rw [← this, ← mk_preimage_tprod, preimage_preimage]
   convert preimage_id; simp [tprod.mk_elim hnd h, id_def]
 #align set.elim_preimage_pi Set.elim_preimage_pi
Diff
@@ -161,7 +161,7 @@ theorem mk_preimage_tprod :
     ext f
     have : f ∈ tprod.mk l ⁻¹' Set.tprod l t ↔ f ∈ { x | x ∈ l }.pi t := by
       rw [mk_preimage_tprod l t]
-    change tprod.mk l f ∈ Set.tprod l t ↔ ∀ i : ι, i ∈ l → f i ∈ t i at this
+    change tprod.mk l f ∈ Set.tprod l t ↔ ∀ i : ι, i ∈ l → f i ∈ t i at this 
     -- `simp [set.tprod, tprod.mk, this]` can close this goal but is slow.
     rw [Set.tprod, tprod.mk, mem_preimage, mem_pi, prod_mk_mem_set_prod_eq]
     simp_rw [mem_set_of_eq, mem_cons_iff]
Diff
@@ -50,12 +50,6 @@ namespace List
 
 variable (α)
 
-/- warning: list.tprod -> List.TProd is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u_1}}, (ι -> Type.{u_2}) -> (List.{u_1} ι) -> Type.{max u_2 u_3}
-but is expected to have type
-  forall {ι : Type.{u}}, (ι -> Type.{v}) -> (List.{u} ι) -> Type.{v}
-Case conversion may be inaccurate. Consider using '#align list.tprod List.TProdₓ'. -/
 /-- The product of a family of types over a list. -/
 def TProd (l : List ι) : Type _ :=
   l.foldr (fun i β => α i × β) PUnit
@@ -67,12 +61,6 @@ namespace Tprod
 
 open List
 
-/- warning: list.tprod.mk -> List.TProd.mk is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u_1}} {α : ι -> Type.{u_2}} (l : List.{u_1} ι), (forall (i : ι), α i) -> (List.TProd.{u_1, u_2, u_3} ι α l)
-but is expected to have type
-  forall {ι : Type.{u}} {α : ι -> Type.{v}} (l : List.{u} ι), (forall (i : ι), α i) -> (List.TProd.{u, v} ι α l)
-Case conversion may be inaccurate. Consider using '#align list.tprod.mk List.TProd.mkₓ'. -/
 /-- Turning a function `f : Π i, α i` into an element of the iterated product `tprod α l`. -/
 protected def mk : ∀ (l : List ι) (f : ∀ i, α i), TProd α l
   | [] => fun f => PUnit.unit
@@ -82,23 +70,11 @@ protected def mk : ∀ (l : List ι) (f : ∀ i, α i), TProd α l
 instance [∀ i, Inhabited (α i)] : Inhabited (TProd α l) :=
   ⟨TProd.mk l default⟩
 
-/- warning: list.tprod.fst_mk -> List.TProd.fst_mk is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u_1}} {α : ι -> Type.{u_2}} (i : ι) (l : List.{u_1} ι) (f : forall (i : ι), α i), Eq.{succ u_2} (α i) (Prod.fst.{u_2, max u_2 u_3} (α i) (List.foldr.{u_1, succ (max u_2 u_3)} ι Type.{max u_2 u_3} (fun (i : ι) (β : Type.{max u_2 u_3}) => Prod.{u_2, max u_2 u_3} (α i) β) PUnit.{succ (max u_2 u_3)} l) (List.TProd.mk.{u_1, u_2, u_3} ι (fun (i : ι) => α i) (List.cons.{u_1} ι i l) f)) (f i)
-but is expected to have type
-  forall {ι : Type.{u}} {α : ι -> Type.{v}} (i : ι) (l : List.{u} ι) (f : forall (i : ι), α i), Eq.{succ v} ((fun (i : ι) => α i) i) (Prod.fst.{v, v} ((fun (i : ι) => α i) i) (List.foldr.{u, succ v} ι Type.{v} (fun (i : ι) (β : Type.{v}) => Prod.{v, v} ((fun (i : ι) => α i) i) β) PUnit.{succ v} l) (List.TProd.mk.{u, v} ι (fun (i : ι) => α i) (List.cons.{u} ι i l) f)) (f i)
-Case conversion may be inaccurate. Consider using '#align list.tprod.fst_mk List.TProd.fst_mkₓ'. -/
 @[simp]
 theorem fst_mk (i : ι) (l : List ι) (f : ∀ i, α i) : (TProd.mk (i :: l) f).1 = f i :=
   rfl
 #align list.tprod.fst_mk List.TProd.fst_mk
 
-/- warning: list.tprod.snd_mk -> List.TProd.snd_mk is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u_1}} {α : ι -> Type.{u_2}} (i : ι) (l : List.{u_1} ι) (f : forall (i : ι), α i), Eq.{succ (max u_2 u_3)} (List.foldr.{u_1, succ (max u_2 u_3)} ι Type.{max u_2 u_3} (fun (i : ι) (β : Type.{max u_2 u_3}) => Prod.{u_2, max u_2 u_3} (α i) β) PUnit.{succ (max u_2 u_3)} l) (Prod.snd.{u_2, max u_2 u_3} (α i) (List.foldr.{u_1, succ (max u_2 u_3)} ι Type.{max u_2 u_3} (fun (i : ι) (β : Type.{max u_2 u_3}) => Prod.{u_2, max u_2 u_3} (α i) β) PUnit.{succ (max u_2 u_3)} l) (List.TProd.mk.{u_1, u_2, u_3} ι (fun (i : ι) => α i) (List.cons.{u_1} ι i l) f)) (List.TProd.mk.{u_1, u_2, u_3} ι (fun (i : ι) => α i) l f)
-but is expected to have type
-  forall {ι : Type.{u}} {α : ι -> Type.{v}} (i : ι) (l : List.{u} ι) (f : forall (i : ι), α i), Eq.{succ v} (List.foldr.{u, succ v} ι Type.{v} (fun (i : ι) (β : Type.{v}) => Prod.{v, v} ((fun (i : ι) => α i) i) β) PUnit.{succ v} l) (Prod.snd.{v, v} ((fun (i : ι) => α i) i) (List.foldr.{u, succ v} ι Type.{v} (fun (i : ι) (β : Type.{v}) => Prod.{v, v} ((fun (i : ι) => α i) i) β) PUnit.{succ v} l) (List.TProd.mk.{u, v} ι (fun (i : ι) => α i) (List.cons.{u} ι i l) f)) (List.TProd.mk.{u, v} ι (fun (i : ι) => α i) l f)
-Case conversion may be inaccurate. Consider using '#align list.tprod.snd_mk List.TProd.snd_mkₓ'. -/
 @[simp]
 theorem snd_mk (i : ι) (l : List ι) (f : ∀ i, α i) : (TProd.mk (i :: l) f).2 = TProd.mk l f :=
   rfl
@@ -106,12 +82,6 @@ theorem snd_mk (i : ι) (l : List ι) (f : ∀ i, α i) : (TProd.mk (i :: l) f).
 
 variable [DecidableEq ι]
 
-/- warning: list.tprod.elim -> List.TProd.elim is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u_1}} {α : ι -> Type.{u_2}} [_inst_1 : DecidableEq.{succ u_1} ι] {l : List.{u_1} ι}, (List.TProd.{u_1, u_2, u_3} ι α l) -> (forall {i : ι}, (Membership.Mem.{u_1, u_1} ι (List.{u_1} ι) (List.hasMem.{u_1} ι) i l) -> (α i))
-but is expected to have type
-  forall {ι : Type.{u}} {α : ι -> Type.{v}} [_inst_1 : DecidableEq.{succ u} ι] {l : List.{u} ι}, (List.TProd.{u, v} ι α l) -> (forall {i : ι}, (Membership.mem.{u, u} ι (List.{u} ι) (List.instMembershipList.{u} ι) i l) -> (α i))
-Case conversion may be inaccurate. Consider using '#align list.tprod.elim List.TProd.elimₓ'. -/
 /-- Given an element of the iterated product `l.prod α`, take a projection into direction `i`.
   If `i` appears multiple times in `l`, this chooses the first component in direction `i`. -/
 protected def elim : ∀ {l : List ι} (v : TProd α l) {i : ι} (hi : i ∈ l), α i
@@ -119,45 +89,21 @@ protected def elim : ∀ {l : List ι} (v : TProd α l) {i : ι} (hi : i ∈ l),
     if hji : j = i then by subst hji; exact v.1 else elim v.2 (hj.resolve_left hji)
 #align list.tprod.elim List.TProd.elim
 
-/- warning: list.tprod.elim_self -> List.TProd.elim_self is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u_1}} {α : ι -> Type.{u_2}} {i : ι} {l : List.{u_1} ι} [_inst_1 : DecidableEq.{succ u_1} ι] (v : List.TProd.{u_1, u_2, u_3} ι α (List.cons.{u_1} ι i l)), Eq.{succ u_2} (α i) (List.TProd.elim.{u_1, u_2, u_3} ι α (fun (a : ι) (b : ι) => _inst_1 a b) (List.cons.{u_1} ι i l) v i (List.mem_cons_self.{u_1} ι i l)) (Prod.fst.{u_2, max u_2 u_3} (α i) (List.foldr.{u_1, succ (max u_2 u_3)} ι Type.{max u_2 u_3} (fun (i : ι) (β : Type.{max u_2 u_3}) => Prod.{u_2, max u_2 u_3} (α i) β) PUnit.{succ (max u_2 u_3)} l) v)
-but is expected to have type
-  forall {ι : Type.{u}} {α : ι -> Type.{v}} {i : ι} {l : List.{u} ι} [_inst_1 : DecidableEq.{succ u} ι] (v : List.TProd.{u, v} ι α (List.cons.{u} ι i l)), Eq.{succ v} (α i) (List.TProd.elim.{u, v} ι α (fun (a : ι) (b : ι) => _inst_1 a b) (List.cons.{u} ι i l) v i (List.mem_cons_self.{u} ι i l)) (Prod.fst.{v, v} (α i) (List.foldr.{u, succ v} ι Type.{v} (fun (i : ι) (β : Type.{v}) => Prod.{v, v} (α i) β) PUnit.{succ v} l) v)
-Case conversion may be inaccurate. Consider using '#align list.tprod.elim_self List.TProd.elim_selfₓ'. -/
 @[simp]
 theorem elim_self (v : TProd α (i :: l)) : v.elim (l.mem_cons_self i) = v.1 := by simp [tprod.elim]
 #align list.tprod.elim_self List.TProd.elim_self
 
-/- warning: list.tprod.elim_of_ne -> List.TProd.elim_of_ne is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u_1}} {α : ι -> Type.{u_2}} {i : ι} {j : ι} {l : List.{u_1} ι} [_inst_1 : DecidableEq.{succ u_1} ι] (hj : Membership.Mem.{u_1, u_1} ι (List.{u_1} ι) (List.hasMem.{u_1} ι) j (List.cons.{u_1} ι i l)) (hji : Ne.{succ u_1} ι j i) (v : List.TProd.{u_1, u_2, u_3} ι α (List.cons.{u_1} ι i l)), Eq.{succ u_2} (α j) (List.TProd.elim.{u_1, u_2, u_3} ι α (fun (a : ι) (b : ι) => _inst_1 a b) (List.cons.{u_1} ι i l) v j hj) (List.TProd.elim.{u_1, u_2, u_3} ι α (fun (a : ι) (b : ι) => _inst_1 a b) l (Prod.snd.{u_2, max u_2 u_3} (α i) (List.foldr.{u_1, succ (max u_2 u_3)} ι Type.{max u_2 u_3} (fun (i : ι) (β : Type.{max u_2 u_3}) => Prod.{u_2, max u_2 u_3} (α i) β) PUnit.{succ (max u_2 u_3)} l) v) j (Or.resolve_left (Eq.{succ u_1} ι j i) (List.Mem.{u_1} ι j l) hj hji))
-but is expected to have type
-  forall {ι : Type.{u}} {α : ι -> Type.{v}} {i : ι} {j : ι} {l : List.{u} ι} [_inst_1 : DecidableEq.{succ u} ι] (hj : Membership.mem.{u, u} ι (List.{u} ι) (List.instMembershipList.{u} ι) j (List.cons.{u} ι i l)) (hji : Ne.{succ u} ι j i) (v : List.TProd.{u, v} ι α (List.cons.{u} ι i l)), Eq.{succ v} (α j) (List.TProd.elim.{u, v} ι α (fun (a : ι) (b : ι) => _inst_1 a b) (List.cons.{u} ι i l) v j hj) (List.TProd.elim.{u, v} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) l (Prod.snd.{v, v} (α i) (List.foldr.{u, succ v} ι Type.{v} (fun (i : ι) (β : Type.{v}) => Prod.{v, v} (α i) β) PUnit.{succ v} l) v) j (Or.resolve_left (Eq.{succ u} ι j i) (Membership.mem.{u, u} ι (List.{u} ι) (List.instMembershipList.{u} ι) j l) (Iff.mp (Membership.mem.{u, u} ι (List.{u} ι) (List.instMembershipList.{u} ι) j (List.cons.{u} ι i l)) (Or (Eq.{succ u} ι j i) (Membership.mem.{u, u} ι (List.{u} ι) (List.instMembershipList.{u} ι) j l)) (List.mem_cons.{u} ι j i l) hj) hji))
-Case conversion may be inaccurate. Consider using '#align list.tprod.elim_of_ne List.TProd.elim_of_neₓ'. -/
 @[simp]
 theorem elim_of_ne (hj : j ∈ i :: l) (hji : j ≠ i) (v : TProd α (i :: l)) :
     v.elim hj = TProd.elim v.2 (hj.resolve_left hji) := by simp [tprod.elim, hji]
 #align list.tprod.elim_of_ne List.TProd.elim_of_ne
 
-/- warning: list.tprod.elim_of_mem -> List.TProd.elim_of_mem is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u_1}} {α : ι -> Type.{u_2}} {i : ι} {j : ι} {l : List.{u_1} ι} [_inst_1 : DecidableEq.{succ u_1} ι], (List.Nodup.{u_1} ι (List.cons.{u_1} ι i l)) -> (forall (hj : Membership.Mem.{u_1, u_1} ι (List.{u_1} ι) (List.hasMem.{u_1} ι) j l) (v : List.TProd.{u_1, u_2, u_3} ι α (List.cons.{u_1} ι i l)), Eq.{succ u_2} (α j) (List.TProd.elim.{u_1, u_2, u_3} ι α (fun (a : ι) (b : ι) => _inst_1 a b) (List.cons.{u_1} ι i l) v j (List.mem_cons_of_mem.{u_1} ι i j l hj)) (List.TProd.elim.{u_1, u_2, u_3} ι α (fun (a : ι) (b : ι) => _inst_1 a b) l (Prod.snd.{u_2, max u_2 u_3} (α i) (List.foldr.{u_1, succ (max u_2 u_3)} ι Type.{max u_2 u_3} (fun (i : ι) (β : Type.{max u_2 u_3}) => Prod.{u_2, max u_2 u_3} (α i) β) PUnit.{succ (max u_2 u_3)} l) v) j hj))
-but is expected to have type
-  forall {ι : Type.{u}} {α : ι -> Type.{v}} {i : ι} {j : ι} {l : List.{u} ι} [_inst_1 : DecidableEq.{succ u} ι], (List.Nodup.{u} ι (List.cons.{u} ι i l)) -> (forall (hj : Membership.mem.{u, u} ι (List.{u} ι) (List.instMembershipList.{u} ι) j l) (v : List.TProd.{u, v} ι α (List.cons.{u} ι i l)), Eq.{succ v} (α j) (List.TProd.elim.{u, v} ι α (fun (a : ι) (b : ι) => _inst_1 a b) (List.cons.{u} ι i l) v j (List.mem_cons_of_mem.{u} ι i j l hj)) (List.TProd.elim.{u, v} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) l (Prod.snd.{v, v} (α i) (List.foldr.{u, succ v} ι Type.{v} (fun (i : ι) (β : Type.{v}) => Prod.{v, v} (α i) β) PUnit.{succ v} l) v) j hj))
-Case conversion may be inaccurate. Consider using '#align list.tprod.elim_of_mem List.TProd.elim_of_memₓ'. -/
 @[simp]
 theorem elim_of_mem (hl : (i :: l).Nodup) (hj : j ∈ l) (v : TProd α (i :: l)) :
     v.elim (mem_cons_of_mem _ hj) = TProd.elim v.2 hj := by apply elim_of_ne; rintro rfl;
   exact hl.not_mem hj
 #align list.tprod.elim_of_mem List.TProd.elim_of_mem
 
-/- warning: list.tprod.elim_mk -> List.TProd.elim_mk is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u_1}} {α : ι -> Type.{u_2}} [_inst_1 : DecidableEq.{succ u_1} ι] (l : List.{u_1} ι) (f : forall (i : ι), α i) {i : ι} (hi : Membership.Mem.{u_1, u_1} ι (List.{u_1} ι) (List.hasMem.{u_1} ι) i l), Eq.{succ u_2} (α i) (List.TProd.elim.{u_1, u_2, u_3} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) l (List.TProd.mk.{u_1, u_2, u_3} ι (fun (i : ι) => α i) l f) i hi) (f i)
-but is expected to have type
-  forall {ι : Type.{u}} {α : ι -> Type.{v}} [_inst_1 : DecidableEq.{succ u} ι] (l : List.{u} ι) (f : forall (i : ι), α i) {i : ι} (hi : Membership.mem.{u, u} ι (List.{u} ι) (List.instMembershipList.{u} ι) i l), Eq.{succ v} (α i) (List.TProd.elim.{u, v} ι (fun (i : ι) => α i) (fun (a : ι) (b : ι) => _inst_1 a b) l (List.TProd.mk.{u, v} ι (fun (i : ι) => α i) l f) i hi) (f i)
-Case conversion may be inaccurate. Consider using '#align list.tprod.elim_mk List.TProd.elim_mkₓ'. -/
 theorem elim_mk : ∀ (l : List ι) (f : ∀ i, α i) {i : ι} (hi : i ∈ l), (TProd.mk l f).elim hi = f i
   | i :: is, f, j, hj => by
     by_cases hji : j = i
@@ -165,12 +111,6 @@ theorem elim_mk : ∀ (l : List ι) (f : ∀ i, α i) {i : ι} (hi : i ∈ l), (
     · rw [elim_of_ne _ hji, snd_mk, elim_mk]
 #align list.tprod.elim_mk List.TProd.elim_mk
 
-/- warning: list.tprod.ext -> List.TProd.ext is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u_1}} {α : ι -> Type.{u_2}} [_inst_1 : DecidableEq.{succ u_1} ι] {l : List.{u_1} ι}, (List.Nodup.{u_1} ι l) -> (forall {v : List.TProd.{u_1, u_2, u_3} ι α l} {w : List.TProd.{u_1, u_2, u_3} ι α l}, (forall (i : ι) (hi : Membership.Mem.{u_1, u_1} ι (List.{u_1} ι) (List.hasMem.{u_1} ι) i l), Eq.{succ u_2} (α i) (List.TProd.elim.{u_1, u_2, u_3} ι α (fun (a : ι) (b : ι) => _inst_1 a b) l v i hi) (List.TProd.elim.{u_1, u_2, u_3} ι α (fun (a : ι) (b : ι) => _inst_1 a b) l w i hi)) -> (Eq.{succ (max u_2 u_3)} (List.TProd.{u_1, u_2, u_3} ι α l) v w))
-but is expected to have type
-  forall {ι : Type.{u}} {α : ι -> Type.{v}} [_inst_1 : DecidableEq.{succ u} ι] {l : List.{u} ι}, (List.Nodup.{u} ι l) -> (forall {v : List.TProd.{u, v} ι α l} {w : List.TProd.{u, v} ι α l}, (forall (i : ι) (hi : Membership.mem.{u, u} ι (List.{u} ι) (List.instMembershipList.{u} ι) i l), Eq.{succ v} (α i) (List.TProd.elim.{u, v} ι α (fun (a : ι) (b : ι) => _inst_1 a b) l v i hi) (List.TProd.elim.{u, v} ι α (fun (a : ι) (b : ι) => _inst_1 a b) l w i hi)) -> (Eq.{succ v} (List.TProd.{u, v} ι α l) v w))
-Case conversion may be inaccurate. Consider using '#align list.tprod.ext List.TProd.extₓ'. -/
 @[ext]
 theorem ext :
     ∀ {l : List ι} (hl : l.Nodup) {v w : TProd α l}
@@ -182,12 +122,6 @@ theorem ext :
     rw [← elim_of_mem hl, hvw, elim_of_mem hl]
 #align list.tprod.ext List.TProd.ext
 
-/- warning: list.tprod.elim' -> List.TProd.elim' is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u_1}} {α : ι -> Type.{u_2}} {l : List.{u_1} ι} [_inst_1 : DecidableEq.{succ u_1} ι], (forall (i : ι), Membership.Mem.{u_1, u_1} ι (List.{u_1} ι) (List.hasMem.{u_1} ι) i l) -> (List.TProd.{u_1, u_2, u_3} ι α l) -> (forall (i : ι), α i)
-but is expected to have type
-  forall {ι : Type.{u}} {α : ι -> Type.{v}} {l : List.{u} ι} [_inst_1 : DecidableEq.{succ u} ι], (forall (i : ι), Membership.mem.{u, u} ι (List.{u} ι) (List.instMembershipList.{u} ι) i l) -> (List.TProd.{u, v} ι α l) -> (forall (i : ι), α i)
-Case conversion may be inaccurate. Consider using '#align list.tprod.elim' List.TProd.elim'ₓ'. -/
 /-- A version of `tprod.elim` when `l` contains all elements. In this case we get a function into
   `Π i, α i`. -/
 @[simp]
@@ -195,22 +129,10 @@ protected def elim' (h : ∀ i, i ∈ l) (v : TProd α l) (i : ι) : α i :=
   v.elim (h i)
 #align list.tprod.elim' List.TProd.elim'
 
-/- warning: list.tprod.mk_elim -> List.TProd.mk_elim is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u_1}} {α : ι -> Type.{u_2}} {l : List.{u_1} ι} [_inst_1 : DecidableEq.{succ u_1} ι], (List.Nodup.{u_1} ι l) -> (forall (h : forall (i : ι), Membership.Mem.{u_1, u_1} ι (List.{u_1} ι) (List.hasMem.{u_1} ι) i l) (v : List.TProd.{u_1, u_2, u_3} ι α l), Eq.{succ (max u_2 u_3)} (List.TProd.{u_1, u_2, u_3} ι (fun (i : ι) => α i) l) (List.TProd.mk.{u_1, u_2, u_3} ι (fun (i : ι) => α i) l (List.TProd.elim'.{u_1, u_2, u_3} ι α l (fun (a : ι) (b : ι) => _inst_1 a b) h v)) v)
-but is expected to have type
-  forall {ι : Type.{u}} {α : ι -> Type.{v}} {l : List.{u} ι} [_inst_1 : DecidableEq.{succ u} ι], (List.Nodup.{u} ι l) -> (forall (h : forall (i : ι), Membership.mem.{u, u} ι (List.{u} ι) (List.instMembershipList.{u} ι) i l) (v : List.TProd.{u, v} ι α l), Eq.{succ v} (List.TProd.{u, v} ι (fun (i : ι) => α i) l) (List.TProd.mk.{u, v} ι (fun (i : ι) => α i) l (List.TProd.elim'.{u, v} ι α l (fun (a : ι) (b : ι) => _inst_1 a b) h v)) v)
-Case conversion may be inaccurate. Consider using '#align list.tprod.mk_elim List.TProd.mk_elimₓ'. -/
 theorem mk_elim (hnd : l.Nodup) (h : ∀ i, i ∈ l) (v : TProd α l) : TProd.mk l (v.elim' h) = v :=
   TProd.ext hnd fun i hi => by simp [elim_mk]
 #align list.tprod.mk_elim List.TProd.mk_elim
 
-/- warning: list.tprod.pi_equiv_tprod -> List.TProd.piEquivTProd is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u_1}} {α : ι -> Type.{u_2}} {l : List.{u_1} ι} [_inst_1 : DecidableEq.{succ u_1} ι], (List.Nodup.{u_1} ι l) -> (forall (i : ι), Membership.Mem.{u_1, u_1} ι (List.{u_1} ι) (List.hasMem.{u_1} ι) i l) -> (Equiv.{max (succ u_1) (succ u_2), succ (max u_2 u_3)} (forall (i : ι), α i) (List.TProd.{u_1, u_2, u_3} ι α l))
-but is expected to have type
-  forall {ι : Type.{u}} {α : ι -> Type.{v}} {l : List.{u} ι} [_inst_1 : DecidableEq.{succ u} ι], (List.Nodup.{u} ι l) -> (forall (i : ι), Membership.mem.{u, u} ι (List.{u} ι) (List.instMembershipList.{u} ι) i l) -> (Equiv.{max (succ u) (succ v), succ v} (forall (i : ι), α i) (List.TProd.{u, v} ι α l))
-Case conversion may be inaccurate. Consider using '#align list.tprod.pi_equiv_tprod List.TProd.piEquivTProdₓ'. -/
 /-- Pi-types are equivalent to iterated products. -/
 def piEquivTProd (hnd : l.Nodup) (h : ∀ i, i ∈ l) : (∀ i, α i) ≃ TProd α l :=
   ⟨TProd.mk l, TProd.elim' h, fun f => funext fun i => elim_mk l f (h i), mk_elim hnd h⟩
@@ -224,12 +146,6 @@ namespace Set
 
 open List
 
-/- warning: set.tprod -> Set.tprod is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u_1}} {α : ι -> Type.{u_2}} (l : List.{u_1} ι), (forall (i : ι), Set.{u_2} (α i)) -> (Set.{max u_2 u_3} (List.TProd.{u_1, u_2, u_3} ι α l))
-but is expected to have type
-  forall {ι : Type.{u}} {α : ι -> Type.{v}} (l : List.{u} ι), (forall (i : ι), Set.{v} (α i)) -> (Set.{v} (List.TProd.{u, v} ι α l))
-Case conversion may be inaccurate. Consider using '#align set.tprod Set.tprodₓ'. -/
 /- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
 /-- A product of sets in `tprod α l`. -/
 @[simp]
@@ -238,12 +154,6 @@ protected def tprod : ∀ (l : List ι) (t : ∀ i, Set (α i)), Set (TProd α l
   | i :: is, t => t i ×ˢ tprod is t
 #align set.tprod Set.tprod
 
-/- warning: set.mk_preimage_tprod -> Set.mk_preimage_tprod is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u_1}} {α : ι -> Type.{u_2}} (l : List.{u_1} ι) (t : forall (i : ι), Set.{u_2} (α i)), Eq.{max (succ (max u_1 u_2)) 1} (Set.{max u_1 u_2} (forall (i : ι), α i)) (Set.preimage.{max u_1 u_2, max u_2 u_3} (forall (i : ι), α i) (List.TProd.{u_1, u_2, u_3} ι (fun (i : ι) => α i) l) (List.TProd.mk.{u_1, u_2, u_3} ι (fun (i : ι) => α i) l) (Set.tprod.{u_1, u_2, u_3} ι (fun (i : ι) => α i) l t)) (Set.pi.{u_1, u_2} ι (fun (i : ι) => α i) (setOf.{u_1} ι (fun (i : ι) => Membership.Mem.{u_1, u_1} ι (List.{u_1} ι) (List.hasMem.{u_1} ι) i l)) t)
-but is expected to have type
-  forall {ι : Type.{u}} {α : ι -> Type.{v}} (l : List.{u} ι) (t : forall (i : ι), Set.{v} (α i)), Eq.{max (succ u) (succ v)} (Set.{max u v} (forall (i : ι), α i)) (Set.preimage.{max u v, v} (forall (i : ι), α i) (List.TProd.{u, v} ι (fun (i : ι) => α i) l) (List.TProd.mk.{u, v} ι (fun (i : ι) => α i) l) (Set.tprod.{u, v} ι (fun (i : ι) => α i) l t)) (Set.pi.{u, v} ι (fun (i : ι) => α i) (setOf.{u} ι (fun (i : ι) => Membership.mem.{u, u} ι (List.{u} ι) (List.instMembershipList.{u} ι) i l)) t)
-Case conversion may be inaccurate. Consider using '#align set.mk_preimage_tprod Set.mk_preimage_tprodₓ'. -/
 theorem mk_preimage_tprod :
     ∀ (l : List ι) (t : ∀ i, Set (α i)), TProd.mk l ⁻¹' Set.tprod l t = { i | i ∈ l }.pi t
   | [], t => by simp [Set.tprod]
@@ -259,12 +169,6 @@ theorem mk_preimage_tprod :
     exact fun _ => this
 #align set.mk_preimage_tprod Set.mk_preimage_tprod
 
-/- warning: set.elim_preimage_pi -> Set.elim_preimage_pi is a dubious translation:
-lean 3 declaration is
-  forall {ι : Type.{u_1}} {α : ι -> Type.{u_2}} [_inst_1 : DecidableEq.{succ u_1} ι] {l : List.{u_1} ι}, (List.Nodup.{u_1} ι l) -> (forall (h : forall (i : ι), Membership.Mem.{u_1, u_1} ι (List.{u_1} ι) (List.hasMem.{u_1} ι) i l) (t : forall (i : ι), Set.{u_2} (α i)), Eq.{max (succ (max u_2 u_3)) 1} (Set.{max u_2 u_3} (List.TProd.{u_1, u_2, u_3} ι (fun (i : ι) => α i) l)) (Set.preimage.{max u_2 u_3, max u_1 u_2} (List.TProd.{u_1, u_2, u_3} ι (fun (i : ι) => α i) l) (forall (i : ι), α i) (List.TProd.elim'.{u_1, u_2, u_3} ι (fun (i : ι) => α i) l (fun (a : ι) (b : ι) => _inst_1 a b) h) (Set.pi.{u_1, u_2} ι (fun (i : ι) => α i) (Set.univ.{u_1} ι) t)) (Set.tprod.{u_1, u_2, u_3} ι (fun (i : ι) => α i) l t))
-but is expected to have type
-  forall {ι : Type.{u}} {α : ι -> Type.{v}} [_inst_1 : DecidableEq.{succ u} ι] {l : List.{u} ι}, (List.Nodup.{u} ι l) -> (forall (h : forall (i : ι), Membership.mem.{u, u} ι (List.{u} ι) (List.instMembershipList.{u} ι) i l) (t : forall (i : ι), Set.{v} (α i)), Eq.{succ v} (Set.{v} (List.TProd.{u, v} ι (fun (i : ι) => α i) l)) (Set.preimage.{v, max v u} (List.TProd.{u, v} ι (fun (i : ι) => α i) l) (forall (i : ι), α i) (List.TProd.elim'.{u, v} ι (fun (i : ι) => α i) l (fun (a : ι) (b : ι) => _inst_1 a b) h) (Set.pi.{u, v} ι (fun (i : ι) => α i) (Set.univ.{u} ι) t)) (Set.tprod.{u, v} ι (fun (i : ι) => α i) l t))
-Case conversion may be inaccurate. Consider using '#align set.elim_preimage_pi Set.elim_preimage_piₓ'. -/
 theorem elim_preimage_pi [DecidableEq ι] {l : List ι} (hnd : l.Nodup) (h : ∀ i, i ∈ l)
     (t : ∀ i, Set (α i)) : TProd.elim' h ⁻¹' pi univ t = Set.tprod l t :=
   by
Diff
@@ -116,10 +116,7 @@ Case conversion may be inaccurate. Consider using '#align list.tprod.elim List.T
   If `i` appears multiple times in `l`, this chooses the first component in direction `i`. -/
 protected def elim : ∀ {l : List ι} (v : TProd α l) {i : ι} (hi : i ∈ l), α i
   | i :: is, v, j, hj =>
-    if hji : j = i then by
-      subst hji
-      exact v.1
-    else elim v.2 (hj.resolve_left hji)
+    if hji : j = i then by subst hji; exact v.1 else elim v.2 (hj.resolve_left hji)
 #align list.tprod.elim List.TProd.elim
 
 /- warning: list.tprod.elim_self -> List.TProd.elim_self is a dubious translation:
@@ -151,10 +148,7 @@ but is expected to have type
 Case conversion may be inaccurate. Consider using '#align list.tprod.elim_of_mem List.TProd.elim_of_memₓ'. -/
 @[simp]
 theorem elim_of_mem (hl : (i :: l).Nodup) (hj : j ∈ l) (v : TProd α (i :: l)) :
-    v.elim (mem_cons_of_mem _ hj) = TProd.elim v.2 hj :=
-  by
-  apply elim_of_ne
-  rintro rfl
+    v.elim (mem_cons_of_mem _ hj) = TProd.elim v.2 hj := by apply elim_of_ne; rintro rfl;
   exact hl.not_mem hj
 #align list.tprod.elim_of_mem List.TProd.elim_of_mem
 
@@ -167,8 +161,7 @@ Case conversion may be inaccurate. Consider using '#align list.tprod.elim_mk Lis
 theorem elim_mk : ∀ (l : List ι) (f : ∀ i, α i) {i : ι} (hi : i ∈ l), (TProd.mk l f).elim hi = f i
   | i :: is, f, j, hj => by
     by_cases hji : j = i
-    · subst hji
-      simp
+    · subst hji; simp
     · rw [elim_of_ne _ hji, snd_mk, elim_mk]
 #align list.tprod.elim_mk List.TProd.elim_mk
 
@@ -275,12 +268,9 @@ Case conversion may be inaccurate. Consider using '#align set.elim_preimage_pi S
 theorem elim_preimage_pi [DecidableEq ι] {l : List ι} (hnd : l.Nodup) (h : ∀ i, i ∈ l)
     (t : ∀ i, Set (α i)) : TProd.elim' h ⁻¹' pi univ t = Set.tprod l t :=
   by
-  have : { i | i ∈ l } = univ := by
-    ext i
-    simp [h]
+  have : { i | i ∈ l } = univ := by ext i; simp [h]
   rw [← this, ← mk_preimage_tprod, preimage_preimage]
-  convert preimage_id
-  simp [tprod.mk_elim hnd h, id_def]
+  convert preimage_id; simp [tprod.mk_elim hnd h, id_def]
 #align set.elim_preimage_pi Set.elim_preimage_pi
 
 end Set
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 
 ! This file was ported from Lean 3 source module data.prod.tprod
-! leanprover-community/mathlib commit 327c3c0d9232d80e250dc8f65e7835b82b266ea5
+! leanprover-community/mathlib commit c227d107bbada5d0d9d20287e3282c0a7f1651a0
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/

Changes in mathlib4

mathlib3
mathlib4
chore: adapt to multiple goal linter 1 (#12338)

A PR accompanying #12339.

Zulip discussion

Diff
@@ -117,7 +117,8 @@ theorem ext :
       (_ : ∀ (i) (hi : i ∈ l), v.elim hi = w.elim hi), v = w
   | [], _, v, w, _ => PUnit.ext v w
   | i :: is, hl, v, w, hvw => by
-    apply Prod.ext; rw [← elim_self v, hvw, elim_self]
+    apply Prod.ext
+    · rw [← elim_self v, hvw, elim_self]
     refine' ext (nodup_cons.mp hl).2 fun j hj => _
     rw [← elim_of_mem hl, hvw, elim_of_mem hl]
 #align list.tprod.ext List.TProd.ext
chore: remove unneeded decreasing_by and termination_by (#11386)

The termination checker has been getting more capable, and many of the termination_by or decreasing_by clauses in Mathlib are no longer needed.

(Note that termination_by? will show the automatically derived termination expression, so no information is being lost by removing these.)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -109,7 +109,6 @@ theorem elim_mk : ∀ (l : List ι) (f : ∀ i, α i) {i : ι} (hi : i ∈ l), (
     · subst hji
       simp
     · rw [TProd.elim_of_ne _ hji, snd_mk, elim_mk is]
-  termination_by l f j hj => l.length
 #align list.tprod.elim_mk List.TProd.elim_mk
 
 @[ext]
chore: replace λ by fun (#11301)

Per the style guidelines, λ is disallowed in mathlib. This is close to exhaustive; I left some tactic code alone when it seemed to me that tactic could be upstreamed soon.

Notes

  • In lines I was modifying anyway, I also converted => to .
  • Also contains some mild in-passing indentation fixes in Mathlib/Order/SupClosed.
  • Some doc comments still contained Lean 3 syntax λ x, , which I also replaced.
Diff
@@ -10,7 +10,7 @@ import Mathlib.Data.List.Nodup
 # Finite products of types
 
 This file defines the product of types over a list. For `l : List ι` and `α : ι → Type v` we define
-`List.TProd α l = l.foldr (λ i β, α i × β) PUnit`.
+`List.TProd α l = l.foldr (fun i β ↦ α i × β) PUnit`.
 This type should not be used if `∀ i, α i` or `∀ i ∈ l, α i` can be used instead
 (in the last expression, we could also replace the list `l` by a set or a finset).
 This type is used as an intermediary between binary products and finitary products.
chore: fix some Lean-3-isms in comments (#10240)
Diff
@@ -24,7 +24,7 @@ construction/theorem that is easier to define/prove on binary products than on f
 * Then we can use the equivalence `List.TProd.piEquivTProd` below (or enhanced versions of it,
   like a `MeasurableEquiv` for product measures) to get the construction on `∀ i : ι, α i`, at
   least when assuming `[Fintype ι] [Encodable ι]` (using `Encodable.sortedUniv`).
-  Using `local attribute [instance] Fintype.toEncodable` we can get rid of the argument
+  Using `attribute [local instance] Fintype.toEncodable` we can get rid of the argument
   `[Encodable ι]`.
 
 ## Main definitions
chore: move to v4.6.0-rc1, merging adaptations from bump/v4.6.0 (#10176)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Joachim Breitner <mail@joachim-breitner.de>

Diff
@@ -109,7 +109,7 @@ theorem elim_mk : ∀ (l : List ι) (f : ∀ i, α i) {i : ι} (hi : i ∈ l), (
     · subst hji
       simp
     · rw [TProd.elim_of_ne _ hji, snd_mk, elim_mk is]
-    termination_by elim_mk l f j hj => l.length
+  termination_by l f j hj => l.length
 #align list.tprod.elim_mk List.TProd.elim_mk
 
 @[ext]
chore: bump toolchain to v4.3.0-rc1 (#8051)

This incorporates changes from

  • #7845
  • #7847
  • #7853
  • #7872 (was never actually made to work, but the diffs in nightly-testing are unexciting: we need to fully qualify a few names)

They can all be closed when this is merged.

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

Diff
@@ -177,7 +177,7 @@ theorem elim_preimage_pi [DecidableEq ι] {l : List ι} (hnd : l.Nodup) (h : ∀
     simp [h]
   rw [← h2, ← mk_preimage_tprod, preimage_preimage]
   simp only [TProd.mk_elim hnd h]
-  dsimp; rfl
+  dsimp
 #align set.elim_preimage_pi Set.elim_preimage_pi
 
 end Set
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,13 +2,10 @@
 Copyright (c) 2020 Floris van Doorn. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
-
-! This file was ported from Lean 3 source module data.prod.tprod
-! leanprover-community/mathlib commit c227d107bbada5d0d9d20287e3282c0a7f1651a0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.List.Nodup
+
+#align_import data.prod.tprod from "leanprover-community/mathlib"@"c227d107bbada5d0d9d20287e3282c0a7f1651a0"
 /-!
 # Finite products of types
 
chore: bye-bye, solo bys! (#3825)

This PR puts, with one exception, every single remaining by that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh. The exception is when the by begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.

Essentially this is s/\n *by$/ by/g, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated bys".

Diff
@@ -100,8 +100,7 @@ theorem elim_of_ne (hj : j ∈ i :: l) (hji : j ≠ i) (v : TProd α (i :: l)) :
 
 @[simp]
 theorem elim_of_mem (hl : (i :: l).Nodup) (hj : j ∈ l) (v : TProd α (i :: l)) :
-    v.elim (mem_cons_of_mem _ hj) = TProd.elim v.2 hj :=
-  by
+    v.elim (mem_cons_of_mem _ hj) = TProd.elim v.2 hj := by
   apply elim_of_ne
   rintro rfl
   exact hl.not_mem hj
@@ -175,8 +174,7 @@ theorem mk_preimage_tprod :
 #align set.mk_preimage_tprod Set.mk_preimage_tprod
 
 theorem elim_preimage_pi [DecidableEq ι] {l : List ι} (hnd : l.Nodup) (h : ∀ i, i ∈ l)
-    (t : ∀ i, Set (α i)) : TProd.elim' h ⁻¹' pi univ t = Set.tprod l t :=
-  by
+    (t : ∀ i, Set (α i)) : TProd.elim' h ⁻¹' pi univ t = Set.tprod l t := by
   have h2 : { i | i ∈ l } = univ := by
     ext i
     simp [h]
chore: Split data.set.pairwise (#3117)

Match https://github.com/leanprover-community/mathlib/pull/17880

The new import of Mathlib.Data.Set.Lattice in Mathlib.Data.Finset.Basic was implied transitively from tactic imports present in Lean 3.

Co-authored-by: Parcly Taxel <reddeloostw@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com>

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Floris van Doorn
 
 ! This file was ported from Lean 3 source module data.prod.tprod
-! leanprover-community/mathlib commit 7b78d1776212a91ecc94cf601f83bdcc46b04213
+! leanprover-community/mathlib commit c227d107bbada5d0d9d20287e3282c0a7f1651a0
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
Feat: Port data.prod.tprod (#1464)

Port of data.prod.tprod

Dependencies 2 + 104

105 files ported (98.1%)
51310 lines ported (99.7%)
Show graph

The unported dependencies are