Skip to content

Commit 072b486

Browse files
committed
chore: fix more unused decidable instances in types (#32153)
Found by #31747. After this, we should be able to turn on the unused decidable in type linter by default.
1 parent 102243f commit 072b486

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Mathlib/Combinatorics/SimpleGraph/Acyclic.lean

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,9 @@ theorem isTree_iff_existsUnique_path :
190190
lemma IsTree.existsUnique_path (hG : G.IsTree) : ∀ v w, ∃! p : G.Walk v w, p.IsPath :=
191191
(isTree_iff_existsUnique_path.1 hG).2
192192

193-
theorem IsAcyclic.isPath_iff_isChain [DecidableEq V] (hG : G.IsAcyclic) {v w : V} (p : G.Walk v w) :
193+
theorem IsAcyclic.isPath_iff_isChain (hG : G.IsAcyclic) {v w : V} (p : G.Walk v w) :
194194
p.IsPath ↔ List.IsChain (· ≠ ·) p.edges := by
195+
classical
195196
refine ⟨fun h ↦ (edges_nodup_of_support_nodup <| p.isPath_def.mp h).isChain, fun h ↦ ?_⟩
196197
induction p with
197198
| nil => simp
@@ -214,7 +215,7 @@ theorem IsAcyclic.isPath_iff_isChain [DecidableEq V] (hG : G.IsAcyclic) {v w : V
214215
have := IsPath.mk' this |>.eq_snd_of_mem_edges (by simp [head.ne.symm]) (Sym2.eq_swap ▸ hhh)
215216
simp [this, snd_takeUntil head.ne]
216217

217-
theorem IsAcyclic.isPath_iff_isTrail [DecidableEq V] (hG : G.IsAcyclic) {v w : V} (p : G.Walk v w) :
218+
theorem IsAcyclic.isPath_iff_isTrail (hG : G.IsAcyclic) {v w : V} (p : G.Walk v w) :
218219
p.IsPath ↔ p.IsTrail :=
219220
⟨IsPath.isTrail, fun h ↦ hG.isPath_iff_isChain p |>.mpr <| p.isTrail_def.mp h |>.isChain⟩
220221

Mathlib/Data/Finsupp/Sigma.lean

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,10 @@ end EmbSigmaAdd
116116

117117
section EmbSigmaSingle
118118

119-
variable [Zero M] [DecidableEq κ] [∀ k, DecidableEq (ι k)]
120-
121119
@[simp]
122-
theorem embSigma_single {k : κ} (i : ι k) (m : M) :
120+
theorem embSigma_single [Zero M] {k : κ} (i : ι k) (m : M) :
123121
embSigma (single i m) = single ⟨k, i⟩ m := by
122+
classical
124123
ext ⟨k', j⟩
125124
by_cases hk : k' = k
126125
· subst hk

0 commit comments

Comments
 (0)