Skip to content

Commit cc171ac

Browse files
committed
chore(Data/S*): process a batch of porting notes (#22765)
1 parent e6b2db5 commit cc171ac

File tree

15 files changed

+87
-159
lines changed

15 files changed

+87
-159
lines changed

Mathlib/Data/Semiquot.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ predicate `S`) but are not completely determined.
2222
of the set `s`. The specific element of `s` that the VM computes
2323
is hidden by a quotient construction, allowing for the representation
2424
of nondeterministic functions. -/
25-
-- Porting note: removed universe parameter
2625
structure Semiquot (α : Type*) where mk' ::
2726
/-- Set containing some element of `α` -/
2827
s : Set α

Mathlib/Data/Seq/Computation.lean

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ variable {α : Type u} {β : Type v} {γ : Type w}
3535

3636
-- constructors
3737
/-- `pure a` is the computation that immediately terminates with result `a`. -/
38-
-- Porting note: `return` is reserved, so changed to `pure`
3938
def pure (a : α) : Computation α :=
4039
⟨Stream'.const (some a), fun _ _ => id⟩
4140

@@ -323,6 +322,10 @@ theorem ret_mem (a : α) : a ∈ pure a :=
323322
theorem eq_of_pure_mem {a a' : α} (h : a' ∈ pure a) : a' = a :=
324323
mem_unique h (ret_mem _)
325324

325+
@[simp]
326+
theorem mem_pure_iff (a b : α) : a ∈ pure b ↔ a = b :=
327+
⟨eq_of_pure_mem, fun h => h ▸ ret_mem _⟩
328+
326329
instance ret_terminates (a : α) : Terminates (pure a) :=
327330
terminates_of_mem (ret_mem _)
328331

@@ -628,16 +631,9 @@ theorem bind_pure (f : α → β) (s) : bind s (pure ∘ f) = map f s := by
628631
· simpa using Or.inr ⟨s, rfl, rfl⟩
629632
· exact Or.inr ⟨s, rfl, rfl⟩
630633

631-
-- Porting note: used to use `rw [bind_pure]`
632634
@[simp]
633635
theorem bind_pure' (s : Computation α) : bind s pure = s := by
634-
apply eq_of_bisim fun c₁ c₂ => c₁ = c₂ ∨ ∃ s, c₁ = bind s pure ∧ c₂ = s
635-
· intro c₁ c₂ h
636-
match c₁, c₂, h with
637-
| _, c₂, Or.inl (Eq.refl _) => rcases destruct c₂ with b | cb <;> simp
638-
| _, _, Or.inr ⟨s, rfl, rfl⟩ =>
639-
apply recOn s <;> intro s <;> simp
640-
· exact Or.inr ⟨s, rfl, rfl⟩
636+
simpa using bind_pure id s
641637

642638
@[simp]
643639
theorem bind_assoc (s : Computation α) (f : α → Computation β) (g : β → Computation γ) :
@@ -781,21 +777,18 @@ instance instAlternativeComputation : Alternative Computation :=
781777
orElse := @orElse
782778
failure := @empty }
783779

784-
-- Porting note: Added unfolds as the code does not work without it
785780
@[simp]
786781
theorem ret_orElse (a : α) (c₂ : Computation α) : (pure a <|> c₂) = pure a :=
787782
destruct_eq_pure <| by
788783
unfold_projs
789784
simp [orElse]
790785

791-
-- Porting note: Added unfolds as the code does not work without it
792786
@[simp]
793787
theorem orElse_pure (c₁ : Computation α) (a : α) : (think c₁ <|> pure a) = pure a :=
794788
destruct_eq_pure <| by
795789
unfold_projs
796790
simp [orElse]
797791

798-
-- Porting note: Added unfolds as the code does not work without it
799792
@[simp]
800793
theorem orElse_think (c₁ c₂ : Computation α) : (think c₁ <|> think c₂) = think (c₁ <|> c₂) :=
801794
destruct_eq_think <| by
@@ -995,13 +988,9 @@ theorem liftRel_pure_left (R : α → β → Prop) (a : α) (cb : Computation β
995988
theorem liftRel_pure_right (R : α → β → Prop) (ca : Computation α) (b : β) :
996989
LiftRel R ca (pure b) ↔ ∃ a, a ∈ ca ∧ R a b := by rw [LiftRel.swap, liftRel_pure_left]
997990

998-
-- Porting note: `simpNF` wants to simplify based on `liftRel_pure_right` but point is to prove
999-
-- a general invariant on `LiftRel`
1000-
@[simp, nolint simpNF]
1001991
theorem liftRel_pure (R : α → β → Prop) (a : α) (b : β) :
1002992
LiftRel R (pure a) (pure b) ↔ R a b := by
1003-
rw [liftRel_pure_left]
1004-
exact ⟨fun ⟨b', mb', ab'⟩ => by rwa [eq_of_pure_mem mb'] at ab', fun ab => ⟨_, ret_mem _, ab⟩⟩
993+
simp
1005994

1006995
@[simp]
1007996
theorem liftRel_think_left (R : α → β → Prop) (ca : Computation α) (cb : Computation β) :
@@ -1028,15 +1017,8 @@ theorem liftRel_congr {R : α → β → Prop} {ca ca' : Computation α} {cb cb'
10281017
theorem liftRel_map {δ} (R : α → β → Prop) (S : γ → δ → Prop) {s1 : Computation α}
10291018
{s2 : Computation β} {f1 : α → γ} {f2 : β → δ} (h1 : LiftRel R s1 s2)
10301019
(h2 : ∀ {a b}, R a b → S (f1 a) (f2 b)) : LiftRel S (map f1 s1) (map f2 s2) := by
1031-
-- Porting note: The line below was:
1032-
-- rw [← bind_pure, ← bind_pure]; apply lift_rel_bind _ _ h1; simp; exact @h2
1033-
--
1034-
-- The code fails to work on the last exact.
1035-
rw [← bind_pure, ← bind_pure]; apply liftRel_bind _ _ h1
1036-
simp only [comp_apply, liftRel_pure_right]
1037-
intros a b h; exact ⟨f1 a, ⟨ret_mem _, @h2 a b h⟩⟩
1020+
rw [← bind_pure, ← bind_pure]; apply liftRel_bind _ _ h1; simp; exact @h2
10381021

1039-
-- Porting note: deleted initial arguments `(_R : α → α → Prop) (_S : β → β → Prop)`: unused
10401022
theorem map_congr {s1 s2 : Computation α} {f : α → β}
10411023
(h1 : s1 ~ s2) : map f s1 ~ map f s2 := by
10421024
rw [← lift_eq_iff_equiv]
@@ -1052,9 +1034,6 @@ def LiftRelAux (R : α → β → Prop) (C : Computation α → Computation β
10521034

10531035
variable {R : α → β → Prop} {C : Computation α → Computation β → Prop}
10541036

1055-
-- Porting note: was attribute [simp] LiftRelAux
1056-
-- but right now `simp` on defs is a Lean 4 catastrophe
1057-
-- Instead we add the equation lemmas and tag them @[simp]
10581037
@[simp] lemma liftRelAux_inl_inl {a : α} {b : β} :
10591038
LiftRelAux R C (Sum.inl a) (Sum.inl b) = R a b := rfl
10601039
@[simp] lemma liftRelAux_inl_inr {a : α} {cb} :

Mathlib/Data/Seq/Parallel.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ theorem terminates_parallel.aux :
6060
simp only [parallel.aux1, rmap, corec_eq]
6161
rw [e]
6262
rw [this]
63-
-- Porting note: This line is required.
6463
exact ret_terminates a
6564
intro l S c m T
6665
revert l S

Mathlib/Data/Seq/Seq.lean

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,11 +1255,7 @@ theorem join_map_ret (s : Seq α) : Seq.join (Seq.map ret s) = s := by
12551255

12561256
@[simp]
12571257
theorem bind_ret (f : α → β) : ∀ s, bind s (ret ∘ f) = map f s
1258-
| ⟨a, s⟩ => by
1259-
dsimp [bind, map]
1260-
-- Porting note: Was `rw [map_comp]; simp [Function.comp, ret]`
1261-
rw [map_comp, ret]
1262-
simp
1258+
| ⟨a, s⟩ => by simp [bind, map, map_comp, ret]
12631259

12641260
@[simp]
12651261
theorem ret_bind (a : α) (f : α → Seq1 β) : bind (ret a) f = f a := by
@@ -1317,7 +1313,6 @@ theorem join_join (SS : Seq (Seq1 (Seq1 α))) :
13171313
theorem bind_assoc (s : Seq1 α) (f : α → Seq1 β) (g : β → Seq1 γ) :
13181314
bind (bind s f) g = bind s fun x : α => bind (f x) g := by
13191315
obtain ⟨a, s⟩ := s
1320-
-- Porting note (https://github.com/leanprover-community/mathlib4/issues/10745): was `simp [bind, map]`.
13211316
simp only [bind, map_pair, map_join]
13221317
rw [← map_comp]
13231318
simp only [show (fun x => join (map g (f x))) = join ∘ (map g ∘ f) from rfl]

Mathlib/Data/Seq/WSeq.lean

Lines changed: 14 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,6 @@ theorem liftRel_destruct_iff {R : α → β → Prop} {s : WSeq α} {t : WSeq β
453453
intro s t
454454
apply Or.inl⟩⟩
455455

456-
-- Porting note: To avoid ambiguous notation, `~` became `~ʷ`.
457456
@[inherit_doc] infixl:50 " ~ʷ " => Equiv
458457

459458
theorem destruct_congr {s t : WSeq α} :
@@ -851,10 +850,7 @@ theorem mem_of_mem_dropn {s : WSeq α} {a} : ∀ {n}, a ∈ drop s n → a ∈ s
851850

852851
theorem get?_mem {s : WSeq α} {a n} : some a ∈ get? s n → a ∈ s := by
853852
revert s; induction' n with n IH <;> intro s h
854-
· -- Porting note: This line is required to infer metavariables in
855-
-- `Computation.exists_of_mem_map`.
856-
dsimp only [get?, head] at h
857-
rcases Computation.exists_of_mem_map h with ⟨o, h1, h2⟩
853+
· rcases Computation.exists_of_mem_map h with ⟨o, h1, h2⟩
858854
rcases o with - | o
859855
· injection h2
860856
injection h2 with h'
@@ -904,17 +900,12 @@ theorem liftRel_dropn_destruct {R : α → β → Prop} {s t} (H : LiftRel R s t
904900
· apply liftRel_dropn_destruct H n
905901
exact fun {a b} o =>
906902
match a, b, o with
907-
| none, none, _ => by
908-
-- Porting note: These 2 theorems should be excluded.
909-
simp [-liftRel_pure_left, -liftRel_pure_right]
903+
| none, none, _ => by simp
910904
| some (a, s), some (b, t), ⟨_, h2⟩ => by simpa [tail.aux] using liftRel_destruct h2
911905

912906
theorem exists_of_liftRel_left {R : α → β → Prop} {s t} (H : LiftRel R s t) {a} (h : a ∈ s) :
913907
∃ b, b ∈ t ∧ R a b := by
914908
let ⟨n, h⟩ := exists_get?_of_mem h
915-
-- Porting note: This line is required to infer metavariables in
916-
-- `Computation.exists_of_mem_map`.
917-
dsimp only [get?, head] at h
918909
let ⟨some (_, s'), sd, rfl⟩ := Computation.exists_of_mem_map h
919910
let ⟨some (b, t'), td, ⟨ab, _⟩⟩ := (liftRel_dropn_destruct H n).left sd
920911
exact ⟨b, get?_mem (Computation.mem_map (Prod.fst.{v, v} <$> ·) td), ab⟩
@@ -942,16 +933,12 @@ theorem exists_of_mem_map {f} {b : β} : ∀ {s : WSeq α}, b ∈ map f s →
942933

943934
@[simp]
944935
theorem liftRel_nil (R : α → β → Prop) : LiftRel R nil nil := by
945-
rw [liftRel_destruct_iff]
946-
-- Porting note: These 2 theorems should be excluded.
947-
simp [-liftRel_pure_left, -liftRel_pure_right]
936+
simp [liftRel_destruct_iff]
948937

949938
@[simp]
950939
theorem liftRel_cons (R : α → β → Prop) (a b s t) :
951940
LiftRel R (cons a s) (cons b t) ↔ R a b ∧ LiftRel R s t := by
952-
rw [liftRel_destruct_iff]
953-
-- Porting note: These 2 theorems should be excluded.
954-
simp [-liftRel_pure_left, -liftRel_pure_right]
941+
simp [liftRel_destruct_iff]
955942

956943
@[simp]
957944
theorem liftRel_think_left (R : α → β → Prop) (s t) : LiftRel R (think s) t ↔ LiftRel R s t := by
@@ -1005,9 +992,7 @@ theorem liftRel_flatten {R : α → β → Prop} {c1 : Computation (WSeq α)} {c
1005992
simp only [destruct_flatten]; apply liftRel_bind _ _ h
1006993
intro a b ab; apply Computation.LiftRel.imp _ _ _ (liftRel_destruct ab)
1007994
intro a b; apply LiftRelO.imp_right
1008-
intro s t h; refine ⟨Computation.pure s, Computation.pure t, ?_, ?_, ?_⟩ <;>
1009-
-- Porting note: These 2 theorems should be excluded.
1010-
simp [h, -liftRel_pure_left, -liftRel_pure_right]⟩
995+
intro s t h; refine ⟨Computation.pure s, Computation.pure t, ?_, ?_, ?_⟩ <;> simp [h]⟩
1011996

1012997
theorem flatten_congr {c1 c2 : Computation (WSeq α)} :
1013998
Computation.LiftRel Equiv c1 c2 → flatten c1 ~ʷ flatten c2 :=
@@ -1273,12 +1258,8 @@ theorem exists_of_mem_join {a : α} : ∀ {S : WSeq (WSeq α)}, a ∈ join S →
12731258
intro ej m <;> simp at ej <;> have := congr_arg Seq.destruct ej <;> simp at this <;>
12741259
subst ss
12751260
· apply Or.inr
1276-
-- Porting note: `exists_eq_or_imp` should be excluded.
1277-
simp [-exists_eq_or_imp] at m ⊢
1278-
rcases IH s S rfl m with as | ex
1279-
· exact ⟨s, Or.inl rfl, as⟩
1280-
· rcases ex with ⟨s', sS, as⟩
1281-
exact ⟨s', Or.inr sS, as⟩
1261+
simp only [join_cons, nil_append, mem_think, mem_cons_iff, exists_eq_or_imp] at m ⊢
1262+
exact IH s S rfl m
12821263
· apply Or.inr
12831264
simp? at m says simp only [join_think, nil_append, mem_think] at m
12841265
rcases (IH nil S (by simp) (by simp [m])).resolve_left (not_mem_nil _) with ⟨s, sS, as⟩
@@ -1390,8 +1371,7 @@ theorem liftRel_append (R : α → β → Prop) {s1 s2 : WSeq α} {t1 t2 : WSeq
13901371
· cases a; cases h
13911372
· obtain ⟨a, s⟩ := a; obtain ⟨b, t⟩ := b
13921373
obtain ⟨r, h⟩ := h
1393-
-- Porting note: These 2 theorems should be excluded.
1394-
simpa [-liftRel_pure_left, -liftRel_pure_right] using ⟨r, Or.inr ⟨s, rfl, t, rfl, h⟩⟩⟩
1374+
simpa using ⟨r, Or.inr ⟨s, rfl, t, rfl, h⟩⟩⟩
13951375

13961376
theorem liftRel_join.lem (R : α → β → Prop) {S T} {U : WSeq α → WSeq β → Prop}
13971377
(ST : LiftRel (LiftRel R) S T)
@@ -1455,8 +1435,7 @@ theorem liftRel_join (R : α → β → Prop) {S : WSeq (WSeq α)} {T : WSeq (WS
14551435
exact fun {o p} h =>
14561436
match o, p, h with
14571437
| some (a, s), some (b, t), ⟨h1, h2⟩ => by
1458-
-- Porting note: These 2 theorems should be excluded.
1459-
simpa [-liftRel_pure_left, -liftRel_pure_right] using ⟨h1, s, t, S, rfl, T, rfl, h2, ST⟩
1438+
simpa using ⟨h1, s, t, S, rfl, T, rfl, h2, ST⟩
14601439
| none, none, _ => by
14611440
-- Porting note: `LiftRelO` should be excluded.
14621441
dsimp [destruct_append.aux, Computation.LiftRel, -LiftRelO]; constructor
@@ -1495,13 +1474,10 @@ theorem join_map_ret (s : WSeq α) : join (map ret s) ~ʷ s := by
14951474
match c1, c2, h with
14961475
| _, _, ⟨s, rfl, rfl⟩ => by
14971476
clear h
1498-
-- Porting note: `ret` is simplified in `simp` so `ret`s become `fun a => cons a nil` here.
1499-
have : ∀ s, ∃ s' : WSeq α,
1500-
(map (fun a => cons a nil) s).join.destruct =
1501-
(map (fun a => cons a nil) s').join.destruct ∧ destruct s = s'.destruct :=
1502-
fun s => ⟨s, rfl, rfl⟩
1503-
induction' s using WSeq.recOn with a s s <;>
1504-
simp (config := { unfoldPartialApp := true }) [ret, ret_mem, this, Option.exists]
1477+
have (s) : ∃ s' : WSeq α,
1478+
(map ret s).join.destruct = (map ret s').join.destruct ∧ destruct s = s'.destruct :=
1479+
⟨s, rfl, rfl⟩
1480+
induction' s using WSeq.recOn with a s s <;> simp [ret, ret_mem, this, Option.exists]
15051481
· exact ⟨s, rfl, rfl⟩
15061482

15071483
@[simp]
@@ -1619,4 +1595,4 @@ end WSeq
16191595

16201596
end Stream'
16211597

1622-
set_option linter.style.longFile 1800
1598+
set_option linter.style.longFile 1700

Mathlib/Data/Set/Enumerate.lean

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ namespace Set
2525

2626
section Enumerate
2727

28-
/- Porting note: The original used parameters -/
2928
variable {α : Type*} (sel : Set α → Option α)
3029

3130
/-- Given a choice function `sel`, enumerates the elements of a set in the order
@@ -69,32 +68,22 @@ theorem enumerate_mem (h_sel : ∀ s a, sel s = some a → a ∈ s) :
6968

7069
theorem enumerate_inj {n₁ n₂ : ℕ} {a : α} {s : Set α} (h_sel : ∀ s a, sel s = some a → a ∈ s)
7170
(h₁ : enumerate sel s n₁ = some a) (h₂ : enumerate sel s n₂ = some a) : n₁ = n₂ := by
72-
/- Porting note: The `rcase, on_goal, all_goals` has been used instead of
73-
the not-yet-ported `wlog` -/
74-
rcases le_total n₁ n₂ with (hn|hn)
75-
on_goal 2 => swap_var n₁ ↔ n₂, h₁ ↔ h₂
76-
all_goals
77-
rcases Nat.le.dest hn with ⟨m, rfl⟩
78-
clear hn
79-
induction n₁ generalizing s with
80-
| zero =>
81-
cases m with
82-
| zero => rfl
83-
| succ m =>
84-
have h' : enumerate sel (s \ {a}) m = some a := by
85-
simp_all only [enumerate, Nat.add_eq, zero_add]; exact h₂
86-
have : a ∈ s \ {a} := enumerate_mem sel h_sel h'
87-
simp_all [Set.mem_diff_singleton]
88-
| succ k ih =>
89-
cases h : sel s with
90-
/- Porting note: The original covered both goals with just `simp_all <;> tauto` -/
91-
| none =>
92-
simp_all only [add_comm, self_eq_add_left, Nat.add_succ, enumerate_eq_none_of_sel _ h,
93-
reduceCtorEq]
94-
| some =>
95-
simp_all only [add_comm, self_eq_add_left, enumerate, Option.some.injEq,
96-
Nat.add_succ, Nat.succ.injEq]
97-
exact ih h₁ h₂
71+
wlog hn : n₁ ≤ n₂ generalizing n₁ n₂
72+
· exact (this h₂ h₁ (lt_of_not_le hn).le).symm
73+
rcases Nat.le.dest hn with ⟨m, rfl⟩
74+
clear hn
75+
induction n₁ generalizing s with
76+
| zero =>
77+
cases m with
78+
| zero => rfl
79+
| succ m =>
80+
have h' : enumerate sel (s \ {a}) m = some a := by
81+
simp_all only [enumerate, Nat.add_eq, zero_add]; exact h₂
82+
have : a ∈ s \ {a} := enumerate_mem sel h_sel h'
83+
simp_all [Set.mem_diff_singleton]
84+
| succ k ih =>
85+
rw [show k + 1 + m = (k + m) + 1 by omega] at h₂
86+
cases h : sel s <;> simp_all [enumerate] ; tauto
9887

9988
end Enumerate
10089

Mathlib/Data/Set/Insert.lean

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ theorem forall_insert_of_forall {P : α → Prop} {a : α} {s : Set α} (H : ∀
130130
(x) (h : x ∈ insert a s) : P x :=
131131
h.elim (fun e => e.symm ▸ ha) (H _)
132132

133-
/- Porting note: ∃ x ∈ insert a s, P x is parsed as ∃ x, x ∈ insert a s ∧ P x,
134-
where in Lean3 it was parsed as `∃ x, ∃ (h : x ∈ insert a s), P x` -/
135133
theorem exists_mem_insert {P : α → Prop} {a : α} {s : Set α} :
136134
(∃ x ∈ insert a s, P x) ↔ (P a ∨ ∃ x ∈ s, P x) := by
137135
simp [mem_insert_iff, or_and_right, exists_and_left, exists_or]
@@ -514,7 +512,6 @@ namespace Set
514512

515513
variable {α : Type u} (s t : Set α) (a b : α)
516514

517-
-- Porting note: Lean 3 unfolded `{a}` before finding instances but Lean 4 needs additional help
518515
instance decidableSingleton [Decidable (a = b)] : Decidable (a ∈ ({b} : Set α)) :=
519516
inferInstanceAs (Decidable (a = b))
520517

Mathlib/Data/Set/Pairwise/Lattice.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ theorem PairwiseDisjoint.biUnion {s : Set ι'} {g : ι' → Set ι} {f : ι →
7474
· exact hg d hd (hcd ▸ ha) hb hab
7575
-- Porting note: the elaborator couldn't figure out `f` here.
7676
· exact (hs hc hd <| ne_of_apply_ne _ hcd).mono
77-
(le_iSup₂ (f := fun i (_ : i ∈ g c) => f i) a ha)
78-
(le_iSup₂ (f := fun i (_ : i ∈ g d) => f i) b hb)
77+
(le_iSup₂ (f := fun i _ => f i) a ha)
78+
(le_iSup₂ (f := fun i _ => f i) b hb)
7979

8080
/-- If the suprema of columns are pairwise disjoint and suprema of rows as well, then everything is
8181
pairwise disjoint. Not to be confused with `Set.PairwiseDisjoint.prod`. -/

Mathlib/Data/Set/Subsingleton.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ protected def Nontrivial (s : Set α) : Prop :=
127127
theorem nontrivial_of_mem_mem_ne {x y} (hx : x ∈ s) (hy : y ∈ s) (hxy : x ≠ y) : s.Nontrivial :=
128128
⟨x, hx, y, hy, hxy⟩
129129

130-
-- Porting note: following the pattern for `Exists`, we have renamed `some` to `choose`.
131-
132130
/-- Extract witnesses from s.nontrivial. This function might be used instead of case analysis on the
133131
argument. Note that it makes a proof depend on the classical.choice axiom. -/
134132
protected noncomputable def Nontrivial.choose (hs : s.Nontrivial) : α × α :=

Mathlib/Data/SetLike/Basic.lean

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,6 @@ theorem mem_coe {x : B} : x ∈ (p : Set B) ↔ x ∈ p :=
173173
theorem coe_eq_coe {x y : p} : (x : B) = y ↔ x = y :=
174174
Subtype.ext_iff_val.symm
175175

176-
-- Porting note: this is not necessary anymore due to the way coercions work
177-
178176
@[simp]
179177
theorem coe_mem (x : p) : (x : B) ∈ p :=
180178
x.2

0 commit comments

Comments
 (0)