File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -247,12 +247,13 @@ theorem singleton_eq (x : α) : ({x} : List α) = [x] :=
247
247
rfl
248
248
#align list.singleton_eq List.singleton_eq
249
249
250
- theorem insert_neg [DecidableEq α] {x : α} {l : List α} (h : x ∉ l) : Insert.insert x l = x :: l :=
251
- if_neg h
250
+ theorem insert_neg [DecidableEq α] {x : α} {l : List α} (h : x ∉ l) :
251
+ Insert.insert x l = x :: l :=
252
+ insert_of_not_mem h
252
253
#align list.insert_neg List.insert_neg
253
254
254
255
theorem insert_pos [DecidableEq α] {x : α} {l : List α} (h : x ∈ l) : Insert.insert x l = l :=
255
- if_pos h
256
+ insert_of_mem h
256
257
#align list.insert_pos List.insert_pos
257
258
258
259
theorem doubleton_eq [DecidableEq α] {x y : α} (h : x ≠ y) : ({x, y} : List α) = [x, y] := by
Original file line number Diff line number Diff line change @@ -469,9 +469,10 @@ theorem insert_nil (a : α) : insert a nil = [a] :=
469
469
rfl
470
470
#align list.insert_nil List.insert_nil
471
471
472
- theorem insert.def (a : α) (l : List α) : insert a l = if a ∈ l then l else a :: l :=
472
+ theorem insert_eq_ite (a : α) (l : List α) : insert a l = if a ∈ l then l else a :: l := by
473
+ simp only [← elem_iff]
473
474
rfl
474
- #align list.insert.def List.insert.def
475
+ #align list.insert.def List.insert_eq_ite
475
476
476
477
#align list.insert_of_mem List.insert_of_mem
477
478
#align list.insert_of_not_mem List.insert_of_not_mem
Original file line number Diff line number Diff line change @@ -1217,8 +1217,6 @@ protected theorem Ne.ite_ne_right_iff (h : a ≠ b) : ite P a b ≠ b ↔ P :=
1217
1217
1218
1218
variable (P Q a b)
1219
1219
1220
- /-- A `dite` whose results do not actually depend on the condition may be reduced to an `ite`. -/
1221
- @[simp] theorem dite_eq_ite : (dite P (fun _ ↦ a) fun _ ↦ b) = ite P a b := rfl
1222
1220
#align dite_eq_ite dite_eq_ite
1223
1221
1224
1222
theorem dite_eq_or_eq : (∃ h, dite P A B = A h) ∨ ∃ h, dite P A B = B h :=
Original file line number Diff line number Diff line change 4
4
[{"url" : " https://github.com/leanprover/std4" ,
5
5
"type" : " git" ,
6
6
"subDir" : null ,
7
- "rev" : " 16d8352f7ed0d38cbc58ace03b3429d693cf50c6 " ,
7
+ "rev" : " 6b4cf96c89e53cfcd73350bbcd90333a051ff4f0 " ,
8
8
"name" : " std" ,
9
9
"manifestFile" : " lake-manifest.json" ,
10
10
"inputRev" : " main" ,
You can’t perform that action at this time.
0 commit comments