Skip to content

Commit ed73cdd

Browse files
committed
more renamings
1 parent 1578d42 commit ed73cdd

File tree

3 files changed

+33
-13
lines changed

3 files changed

+33
-13
lines changed

src/Init/Data/Array/Lex/Lemmas.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private theorem cons_lex_cons [BEq α] {lt : α → α → Bool} {a b : α} {xs
6868
simp only [bind_pure_comp, map_pure]
6969
rw [cons_lex_cons.forIn'_congr_aux (if_pos (by omega)) rfl (fun _ _ _ => rfl)]
7070
simp only [Std.toList_roo_eq_toList_rco_of_isSome_succ? (lo := 0) (h := rfl),
71-
Std.PRange.UpwardEnumerable.succ?, Nat.add_comm 1, Std.PRange.Nat.toList_Rco_succ_succ,
71+
Std.PRange.UpwardEnumerable.succ?, Nat.add_comm 1, Std.PRange.Nat.toList_rco_succ_succ,
7272
Option.get_some, List.forIn'_cons, List.size_toArray, List.length_cons, List.length_nil,
7373
Nat.lt_add_one, getElem_append_left, List.getElem_toArray, List.getElem_cons_zero]
7474
cases lt a b

src/Init/Data/Range/Polymorphic/NatLemmas.lean

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,44 +16,64 @@ namespace Std.PRange.Nat
1616
theorem succ_eq {n : Nat} : succ n = n + 1 :=
1717
rfl
1818

19-
theorem toList_Rco_succ_succ {m n : Nat} :
19+
theorem toList_rco_succ_succ {m n : Nat} :
2020
((m+1)...(n+1)).toList = (m...n).toList.map (· + 1) := by
2121
simp only [← succ_eq]
2222
rw [Std.Rco.toList_succ_succ_eq_map]
2323

24-
@[deprecated toList_Rco_succ_succ (since := "2025-08-22")]
25-
theorem ClosedOpen.toList_succ_succ {m n : Nat} :
26-
((m+1)...(n+1)).toList = (m...n).toList.map (· + 1) := toList_Rco_succ_succ
24+
@[deprecated toList_rco_succ_succ (since := "2025-10-30")]
25+
def toList_Rco_succ_succ := @toList_rco_succ_succ
26+
27+
@[deprecated toList_rco_succ_succ (since := "2025-08-22")]
28+
def ClosedOpen.toList_succ_succ := @toList_rco_succ_succ
2729

2830
@[simp]
29-
theorem size_Rcc {a b : Nat} :
31+
theorem size_rcc {a b : Nat} :
3032
(a...=b).size = b + 1 - a := by
3133
simp [Rcc.size, Rxc.HasSize.size]
3234

35+
@[deprecated size_rcc (since := "2025-10-30")]
36+
def size_Rcc := @size_rcc
37+
3338
@[simp]
34-
theorem size_Rco {a b : Nat} :
39+
theorem size_rco {a b : Nat} :
3540
(a...b).size = b - a := by
3641
simp only [Rco.size, Rxo.HasSize.size, Rxc.HasSize.size]
3742
omega
3843

44+
@[deprecated size_rco (since := "2025-10-30")]
45+
def size_Rco := @size_rco
46+
3947
@[simp]
40-
theorem size_Roc {a b : Nat} :
48+
theorem size_roc {a b : Nat} :
4149
(a<...=b).size = b - a := by
4250
simp [Roc.size, Rxc.HasSize.size]
4351

52+
@[deprecated size_roc (since := "2025-10-30")]
53+
def size_Roc := @size_roc
54+
4455
@[simp]
45-
theorem size_Roo {a b : Nat} :
56+
theorem size_roo {a b : Nat} :
4657
(a<...b).size = b - a - 1 := by
4758
simp [Roo.size, Rxo.HasSize.size, Rxc.HasSize.size]
4859

60+
@[deprecated size_roo (since := "2025-10-30")]
61+
def size_Roo := @size_roo
62+
4963
@[simp]
50-
theorem size_Ric {b : Nat} :
64+
theorem size_ric {b : Nat} :
5165
(*...=b).size = b + 1 := by
5266
simp [Ric.size, Rxc.HasSize.size]
5367

68+
@[deprecated size_ric (since := "2025-10-30")]
69+
def size_Ric := @size_ric
70+
5471
@[simp]
55-
theorem size_Rio {b : Nat} :
72+
theorem size_rio {b : Nat} :
5673
(*...b).size = b := by
5774
simp [Rio.size, Rxo.HasSize.size, Rxc.HasSize.size]
5875

76+
@[deprecated size_rio (since := "2025-10-30")]
77+
def size_Rio := @size_rio
78+
5979
end Std.PRange.Nat

src/Init/Data/Slice/Array/Lemmas.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ open Std.Iterators Std.PRange
2020

2121
namespace Std.Slice.Array
2222

23-
theorem internalIter_Rco_eq {α : Type u} {s : Subarray α} :
23+
theorem internalIter_rco_eq {α : Type u} {s : Subarray α} :
2424
Internal.iter s = (Rco.Internal.iter (s.start...<s.stop)
2525
|>.attachWith (· < s.array.size)
2626
(fun out h => h
@@ -40,7 +40,7 @@ theorem toList_internalIter {α : Type u} {s : Subarray α} :
4040
|> Rco.lt_upper_of_mem
4141
|> (Nat.lt_of_lt_of_le · s.stop_le_array_size))
4242
|>.map fun i => s.array[i.1]) := by
43-
rw [internalIter_Rco_eq, Iter.toList_map, Iter.toList_uLift, Iter.toList_attachWith]
43+
rw [internalIter_rco_eq, Iter.toList_map, Iter.toList_uLift, Iter.toList_attachWith]
4444
simp [Rco.toList]
4545

4646
public instance : LawfulSliceSize (Internal.SubarrayData α) where

0 commit comments

Comments
 (0)