Skip to content

Commit b89b83c

Browse files
committed
remove private congr annotation, see issue #11436
1 parent ff547b6 commit b89b83c

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

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

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,19 +73,11 @@ private theorem cons_lex_cons [BEq α] {lt : α → α → Bool} {a b : α} {xs
7373
(lt a b || a == b && xs.lex ys lt) := by
7474
simp only [lex, size_append, List.size_toArray, List.length_cons, List.length_nil, Nat.zero_add,
7575
Nat.add_min_add_left, Nat.add_lt_add_iff_left, Std.Rco.forIn'_eq_forIn'_toList]
76-
conv =>
77-
lhs; congr; congr
78-
rw [cons_lex_cons.forIn'_congr_aux Std.Rco.toList_eq_if_roo rfl (fun _ _ _ => rfl)]
79-
simp only [bind_pure_comp, map_pure]
80-
rw [cons_lex_cons.forIn'_congr_aux (if_pos (by omega)) rfl (fun _ _ _ => rfl)]
81-
simp only [Std.toList_roo_eq_toList_rco_of_isSome_succ? (lo := 0) (h := rfl),
82-
Std.PRange.UpwardEnumerable.succ?, Nat.add_comm 1, Std.PRange.Nat.toList_rco_succ_succ,
83-
Option.get_some, List.forIn'_cons, List.size_toArray, List.length_cons, List.length_nil,
84-
Nat.lt_add_one, getElem_append_left, List.getElem_toArray, List.getElem_cons_zero]
85-
cases lt a b
86-
· rw [bne]
87-
cases a == b <;> simp
88-
· simp
76+
rw [cons_lex_cons.forIn'_congr_aux (Nat.toList_rco_eq_cons (by omega)) rfl (fun _ _ _ => rfl)]
77+
simp only [bind_pure_comp, map_pure, Nat.toList_rco_succ_succ, Nat.add_comm 1]
78+
cases h : lt a b
79+
· cases h' : a == b <;> simp [bne, *]
80+
· simp [*]
8981

9082
@[simp, grind =] theorem _root_.List.lex_toArray [BEq α] {lt : α → α → Bool} {l₁ l₂ : List α} :
9183
l₁.toArray.lex l₂.toArray lt = l₁.lex l₂ lt := by

0 commit comments

Comments
 (0)