data.set.listMathlib.Data.Set.List

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -44,14 +44,14 @@ theorem range_list_map_coe (s : Set α) : range (map (coe : s → α)) = {l | 
 #align set.range_list_map_coe Set.range_list_map_coe
 -/
 
-#print Set.range_list_nthLe /-
+#print Set.range_list_get /-
 @[simp]
-theorem range_list_nthLe : (range fun k : Fin l.length => l.nthLe k k.2) = {x | x ∈ l} :=
+theorem range_list_get : (range fun k : Fin l.length => l.nthLe k k.2) = {x | x ∈ l} :=
   by
   ext x
   rw [mem_set_of_eq, mem_iff_nth_le]
   exact ⟨fun ⟨⟨n, h₁⟩, h₂⟩ => ⟨n, h₁, h₂⟩, fun ⟨n, h₁, h₂⟩ => ⟨⟨n, h₁⟩, h₂⟩⟩
-#align set.range_list_nth_le Set.range_list_nthLe
+#align set.range_list_nth_le Set.range_list_get
 -/
 
 #print Set.range_list_get? /-
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2023 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 -/
-import Mathbin.Data.Set.Image
-import Mathbin.Data.List.Basic
-import Mathbin.Data.Fin.Basic
+import Data.Set.Image
+import Data.List.Basic
+import Data.Fin.Basic
 
 #align_import data.set.list from "leanprover-community/mathlib"@"31ca6f9cf5f90a6206092cd7f84b359dcb6d52e0"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2023 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
-
-! This file was ported from Lean 3 source module data.set.list
-! leanprover-community/mathlib commit 31ca6f9cf5f90a6206092cd7f84b359dcb6d52e0
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.Set.Image
 import Mathbin.Data.List.Basic
 import Mathbin.Data.Fin.Basic
 
+#align_import data.set.list from "leanprover-community/mathlib"@"31ca6f9cf5f90a6206092cd7f84b359dcb6d52e0"
+
 /-!
 # Lemmas about `list`s and `set.range`
 
Diff
@@ -75,7 +75,6 @@ theorem range_list_getD (d : α) : (range fun n => l.getD n d) = insert d {x | x
       simp only [← range_comp, (· ∘ ·), nthd_eq_get_or_else_nth]
     _ = insert d {x | x ∈ l} := by
       simp only [range_list_nth, image_insert_eq, Option.getD, image_image, image_id']
-    
 #align set.range_list_nthd Set.range_list_getD
 -/
 
Diff
@@ -29,7 +29,7 @@ variable {α β : Type _} (l : List α)
 namespace Set
 
 #print Set.range_list_map /-
-theorem range_list_map (f : α → β) : range (map f) = { l | ∀ x ∈ l, x ∈ range f } :=
+theorem range_list_map (f : α → β) : range (map f) = {l | ∀ x ∈ l, x ∈ range f} :=
   by
   refine'
     subset.antisymm (range_subset_iff.2 fun l => forall_mem_map_iff.2 fun y _ => mem_range_self _)
@@ -42,14 +42,14 @@ theorem range_list_map (f : α → β) : range (map f) = { l | ∀ x ∈ l, x 
 -/
 
 #print Set.range_list_map_coe /-
-theorem range_list_map_coe (s : Set α) : range (map (coe : s → α)) = { l | ∀ x ∈ l, x ∈ s } := by
+theorem range_list_map_coe (s : Set α) : range (map (coe : s → α)) = {l | ∀ x ∈ l, x ∈ s} := by
   rw [range_list_map, Subtype.range_coe]
 #align set.range_list_map_coe Set.range_list_map_coe
 -/
 
 #print Set.range_list_nthLe /-
 @[simp]
-theorem range_list_nthLe : (range fun k : Fin l.length => l.nthLe k k.2) = { x | x ∈ l } :=
+theorem range_list_nthLe : (range fun k : Fin l.length => l.nthLe k k.2) = {x | x ∈ l} :=
   by
   ext x
   rw [mem_set_of_eq, mem_iff_nth_le]
@@ -58,7 +58,7 @@ theorem range_list_nthLe : (range fun k : Fin l.length => l.nthLe k k.2) = { x |
 -/
 
 #print Set.range_list_get? /-
-theorem range_list_get? : range l.get? = insert none (some '' { x | x ∈ l }) :=
+theorem range_list_get? : range l.get? = insert none (some '' {x | x ∈ l}) :=
   by
   rw [← range_list_nth_le, ← range_comp]
   refine' (range_subset_iff.2 fun n => _).antisymm (insert_subset.2 ⟨_, _⟩)
@@ -69,11 +69,11 @@ theorem range_list_get? : range l.get? = insert none (some '' { x | x ∈ l }) :
 
 #print Set.range_list_getD /-
 @[simp]
-theorem range_list_getD (d : α) : (range fun n => l.getD n d) = insert d { x | x ∈ l } :=
+theorem range_list_getD (d : α) : (range fun n => l.getD n d) = insert d {x | x ∈ l} :=
   calc
     (range fun n => l.getD n d) = (fun o : Option α => o.getD d) '' range l.get? := by
       simp only [← range_comp, (· ∘ ·), nthd_eq_get_or_else_nth]
-    _ = insert d { x | x ∈ l } := by
+    _ = insert d {x | x ∈ l} := by
       simp only [range_list_nth, image_insert_eq, Option.getD, image_image, image_id']
     
 #align set.range_list_nthd Set.range_list_getD
@@ -81,7 +81,7 @@ theorem range_list_getD (d : α) : (range fun n => l.getD n d) = insert d { x |
 
 #print Set.range_list_getI /-
 @[simp]
-theorem range_list_getI [Inhabited α] (l : List α) : range l.getI = insert default { x | x ∈ l } :=
+theorem range_list_getI [Inhabited α] (l : List α) : range l.getI = insert default {x | x ∈ l} :=
   range_list_getD l default
 #align set.range_list_inth Set.range_list_getI
 -/
Diff
@@ -62,7 +62,7 @@ theorem range_list_get? : range l.get? = insert none (some '' { x | x ∈ l }) :
   by
   rw [← range_list_nth_le, ← range_comp]
   refine' (range_subset_iff.2 fun n => _).antisymm (insert_subset.2 ⟨_, _⟩)
-  exacts[(le_or_lt l.length n).imp nth_eq_none_iff.2 fun hlt => ⟨⟨_, _⟩, (nth_le_nth hlt).symm⟩,
+  exacts [(le_or_lt l.length n).imp nth_eq_none_iff.2 fun hlt => ⟨⟨_, _⟩, (nth_le_nth hlt).symm⟩,
     ⟨_, nth_eq_none_iff.2 le_rfl⟩, range_subset_iff.2 fun k => ⟨_, nth_le_nth _⟩]
 #align set.range_list_nth Set.range_list_get?
 -/
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 
 ! This file was ported from Lean 3 source module data.set.list
-! leanprover-community/mathlib commit 2ec920d35348cb2d13ac0e1a2ad9df0fdf1a76b4
+! leanprover-community/mathlib commit 31ca6f9cf5f90a6206092cd7f84b359dcb6d52e0
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -15,6 +15,9 @@ import Mathbin.Data.Fin.Basic
 /-!
 # Lemmas about `list`s and `set.range`
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file we prove lemmas about range of some operations on lists.
 -/
 
Diff
@@ -25,6 +25,7 @@ variable {α β : Type _} (l : List α)
 
 namespace Set
 
+#print Set.range_list_map /-
 theorem range_list_map (f : α → β) : range (map f) = { l | ∀ x ∈ l, x ∈ range f } :=
   by
   refine'
@@ -35,11 +36,15 @@ theorem range_list_map (f : α → β) : range (map f) = { l | ∀ x ∈ l, x 
   rcases hl a (mem_cons_self _ _) with ⟨a, rfl⟩
   exact ⟨a :: l, map_cons _ _ _⟩
 #align set.range_list_map Set.range_list_map
+-/
 
+#print Set.range_list_map_coe /-
 theorem range_list_map_coe (s : Set α) : range (map (coe : s → α)) = { l | ∀ x ∈ l, x ∈ s } := by
   rw [range_list_map, Subtype.range_coe]
 #align set.range_list_map_coe Set.range_list_map_coe
+-/
 
+#print Set.range_list_nthLe /-
 @[simp]
 theorem range_list_nthLe : (range fun k : Fin l.length => l.nthLe k k.2) = { x | x ∈ l } :=
   by
@@ -47,7 +52,9 @@ theorem range_list_nthLe : (range fun k : Fin l.length => l.nthLe k k.2) = { x |
   rw [mem_set_of_eq, mem_iff_nth_le]
   exact ⟨fun ⟨⟨n, h₁⟩, h₂⟩ => ⟨n, h₁, h₂⟩, fun ⟨n, h₁, h₂⟩ => ⟨⟨n, h₁⟩, h₂⟩⟩
 #align set.range_list_nth_le Set.range_list_nthLe
+-/
 
+#print Set.range_list_get? /-
 theorem range_list_get? : range l.get? = insert none (some '' { x | x ∈ l }) :=
   by
   rw [← range_list_nth_le, ← range_comp]
@@ -55,7 +62,9 @@ theorem range_list_get? : range l.get? = insert none (some '' { x | x ∈ l }) :
   exacts[(le_or_lt l.length n).imp nth_eq_none_iff.2 fun hlt => ⟨⟨_, _⟩, (nth_le_nth hlt).symm⟩,
     ⟨_, nth_eq_none_iff.2 le_rfl⟩, range_subset_iff.2 fun k => ⟨_, nth_le_nth _⟩]
 #align set.range_list_nth Set.range_list_get?
+-/
 
+#print Set.range_list_getD /-
 @[simp]
 theorem range_list_getD (d : α) : (range fun n => l.getD n d) = insert d { x | x ∈ l } :=
   calc
@@ -65,11 +74,14 @@ theorem range_list_getD (d : α) : (range fun n => l.getD n d) = insert d { x |
       simp only [range_list_nth, image_insert_eq, Option.getD, image_image, image_id']
     
 #align set.range_list_nthd Set.range_list_getD
+-/
 
+#print Set.range_list_getI /-
 @[simp]
 theorem range_list_getI [Inhabited α] (l : List α) : range l.getI = insert default { x | x ∈ l } :=
   range_list_getD l default
 #align set.range_list_inth Set.range_list_getI
+-/
 
 end Set
 

Changes in mathlib4

mathlib3
mathlib4
chore(Data/Set/List): nthLe -> get migration (#12398)

Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>

Diff
@@ -22,9 +22,8 @@ variable {α β : Type*} (l : List α)
 namespace Set
 
 theorem range_list_map (f : α → β) : range (map f) = { l | ∀ x ∈ l, x ∈ range f } := by
-  refine'
-    antisymm (range_subset_iff.2 fun l => forall_mem_map_iff.2 fun y _ => mem_range_self _)
-      fun l hl => _
+  refine antisymm (range_subset_iff.2 fun l => forall_mem_map_iff.2 fun y _ => mem_range_self _)
+      fun l hl => ?_
   induction' l with a l ihl; · exact ⟨[], rfl⟩
   rcases ihl fun x hx => hl x <| subset_cons _ _ hx with ⟨l, rfl⟩
   rcases hl a (mem_cons_self _ _) with ⟨a, rfl⟩
@@ -36,14 +35,14 @@ theorem range_list_map_coe (s : Set α) : range (map ((↑) : s → α)) = { l |
 #align set.range_list_map_coe Set.range_list_map_coe
 
 @[simp]
-theorem range_list_nthLe : (range fun k : Fin l.length => l.nthLe k k.2) = { x | x ∈ l } := by
+theorem range_list_get : range l.get = { x | x ∈ l } := by
   ext x
-  rw [mem_setOf_eq, mem_iff_get]
-  exact ⟨fun ⟨⟨n, h₁⟩, h₂⟩ => ⟨⟨n, h₁⟩, h₂⟩, fun ⟨⟨n, h₁⟩, h₂⟩ => ⟨⟨n, h₁⟩, h₂⟩⟩
-#align set.range_list_nth_le Set.range_list_nthLe
+  rw [mem_setOf_eq, mem_iff_get, mem_range]
+#align set.range_list_nth_le Set.range_list_get
+@[deprecated] alias range_list_nthLe := range_list_get -- 2024-04-22
 
 theorem range_list_get? : range l.get? = insert none (some '' { x | x ∈ l }) := by
-  rw [← range_list_nthLe, ← range_comp]
+  rw [← range_list_get, ← range_comp]
   refine' (range_subset_iff.2 fun n => _).antisymm (insert_subset_iff.2 ⟨_, _⟩)
   exacts [(le_or_lt l.length n).imp get?_eq_none.2 (fun hlt => ⟨⟨_, hlt⟩, (get?_eq_get hlt).symm⟩),
     ⟨_, get?_eq_none.2 le_rfl⟩, range_subset_iff.2 fun k => ⟨_, get?_eq_get _⟩]
chore: Split off getD/getI lemmas from Data.List.Basic (#10337)

Splits off some lemmas from the end of this file, reducing the size of what is currently the longest file in mathlib.

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
 -/
 import Mathlib.Data.Set.Image
-import Mathlib.Data.List.Basic
+import Mathlib.Data.List.GetD
 
 #align_import data.set.list from "leanprover-community/mathlib"@"2ec920d35348cb2d13ac0e1a2ad9df0fdf1a76b4"
 
chore: reduce imports (#9830)

This uses the improved shake script from #9772 to reduce imports across mathlib. The corresponding noshake.json file has been added to #9772.

Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -5,7 +5,6 @@ Authors: Yury Kudryashov
 -/
 import Mathlib.Data.Set.Image
 import Mathlib.Data.List.Basic
-import Mathlib.Data.Fin.Basic
 
 #align_import data.set.list from "leanprover-community/mathlib"@"2ec920d35348cb2d13ac0e1a2ad9df0fdf1a76b4"
 
chore(*): drop $/<| before fun (#9361)

Subset of #9319

Diff
@@ -47,7 +47,7 @@ theorem range_list_get? : range l.get? = insert none (some '' { x | x ∈ l }) :
   rw [← range_list_nthLe, ← range_comp]
   refine' (range_subset_iff.2 fun n => _).antisymm (insert_subset_iff.2 ⟨_, _⟩)
   exacts [(le_or_lt l.length n).imp get?_eq_none.2 (fun hlt => ⟨⟨_, hlt⟩, (get?_eq_get hlt).symm⟩),
-    ⟨_, get?_eq_none.2 le_rfl⟩, range_subset_iff.2 <| fun k => ⟨_, get?_eq_get _⟩]
+    ⟨_, get?_eq_none.2 le_rfl⟩, range_subset_iff.2 fun k => ⟨_, get?_eq_get _⟩]
 #align set.range_list_nth Set.range_list_get?
 
 @[simp]
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
@@ -18,7 +18,7 @@ In this file we prove lemmas about range of some operations on lists.
 
 open List
 
-variable {α β : Type _} (l : List α)
+variable {α β : Type*} (l : List α)
 
 namespace 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,16 +2,13 @@
 Copyright (c) 2023 Yury Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury Kudryashov
-
-! This file was ported from Lean 3 source module data.set.list
-! leanprover-community/mathlib commit 2ec920d35348cb2d13ac0e1a2ad9df0fdf1a76b4
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.Set.Image
 import Mathlib.Data.List.Basic
 import Mathlib.Data.Fin.Basic
 
+#align_import data.set.list from "leanprover-community/mathlib"@"2ec920d35348cb2d13ac0e1a2ad9df0fdf1a76b4"
+
 /-!
 # Lemmas about `List`s and `Set.range`
 
feat(Data.Set.Basic/Data.Finset.Basic): rename insert_subset (#5450)

Currently, (for both Set and Finset) insert_subset is an iff lemma stating that insert a s ⊆ t if and only if a ∈ t and s ⊆ t. For both types, this PR renames this lemma to insert_subset_iff, and adds an insert_subset lemma that gives the implication just in the reverse direction : namely theorem insert_subset (ha : a ∈ t) (hs : s ⊆ t) : insert a s ⊆ t .

This both aligns the naming with union_subset and union_subset_iff, and removes the need for the awkward insert_subset.mpr ⟨_,_⟩ idiom. It touches a lot of files (too many to list), but in a trivial way.

Diff
@@ -48,7 +48,7 @@ theorem range_list_nthLe : (range fun k : Fin l.length => l.nthLe k k.2) = { x |
 
 theorem range_list_get? : range l.get? = insert none (some '' { x | x ∈ l }) := by
   rw [← range_list_nthLe, ← range_comp]
-  refine' (range_subset_iff.2 fun n => _).antisymm (insert_subset.2 ⟨_, _⟩)
+  refine' (range_subset_iff.2 fun n => _).antisymm (insert_subset_iff.2 ⟨_, _⟩)
   exacts [(le_or_lt l.length n).imp get?_eq_none.2 (fun hlt => ⟨⟨_, hlt⟩, (get?_eq_get hlt).symm⟩),
     ⟨_, get?_eq_none.2 le_rfl⟩, range_subset_iff.2 <| fun k => ⟨_, get?_eq_get _⟩]
 #align set.range_list_nth Set.range_list_get?
feat: port Data.Set.List + leanprover-community/mathlib#18647 (#3203)

Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Dependencies 1 + 99

100 files ported (99.0%)
50197 lines ported (99.8%)
Show graph

The unported dependencies are