Skip to content

Commit 1335e17

Browse files
committed
chore(LinearAlgebra): reduce defeq abuse of Set α = α → Prop (#35888)
1 parent f66158c commit 1335e17

6 files changed

Lines changed: 10 additions & 11 deletions

File tree

Mathlib/LinearAlgebra/AffineSpace/AffineSubspace/Defs.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -959,7 +959,7 @@ preserved under certain affine combinations, then `p` holds for all elements of
959959
theorem affineSpan_induction {x : P} {s : Set P} {p : P → Prop} (h : x ∈ affineSpan k s)
960960
(mem : ∀ x : P, x ∈ s → p x)
961961
(smul_vsub_vadd : ∀ (c : k) (u v w : P), p u → p v → p w → p (c • (u -ᵥ v) +ᵥ w)) : p x :=
962-
(affineSpan_le (Q := ⟨p, smul_vsub_vadd⟩)).mpr mem h
962+
(affineSpan_le (Q := ⟨{x | p x}, smul_vsub_vadd⟩)).mpr mem h
963963

964964
/-- A dependent version of `affineSpan_induction`. -/
965965
@[elab_as_elim]

Mathlib/LinearAlgebra/AffineSpace/Combination.lean

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -531,12 +531,11 @@ theorem eq_weightedVSubOfPoint_subset_iff_eq_weightedVSubOfPoint_subtype {v : V}
531531
simp_rw [weightedVSubOfPoint_apply]
532532
constructor
533533
· rintro ⟨fs, hfs, w, rfl, rfl⟩
534-
exact ⟨fs.subtype s, fun i => w i, sum_subtype_of_mem _ hfs, (sum_subtype_of_mem _ hfs).symm⟩
534+
exact ⟨fs.subtype (· ∈ s), fun i => w i, sum_subtype_of_mem _ hfs,
535+
(sum_subtype_of_mem _ hfs).symm⟩
535536
· rintro ⟨fs, w, rfl, rfl⟩
536-
refine
537-
⟨fs.map (Function.Embedding.subtype _), map_subtype_subset _, fun i =>
538-
if h : i ∈ s then w ⟨i, h⟩ else 0, ?_, ?_⟩ <;>
539-
simp
537+
refine ⟨fs.map (Function.Embedding.subtype _), map_subtype_subset _, fun i =>
538+
if h : i ∈ s then w ⟨i, h⟩ else 0, ?_, ?_⟩ <;> simp
540539

541540
variable (k)
542541

Mathlib/LinearAlgebra/Finsupp/Span.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@ theorem mem_iSup_iff_exists_finset {ι : Sort _} {p : ι → Submodule R M} {m :
124124
theorem mem_sSup_iff_exists_finset {S : Set (Submodule R M)} {m : M} :
125125
m ∈ sSup S ↔ ∃ s : Finset (Submodule R M), ↑s ⊆ S ∧ m ∈ ⨆ i ∈ s, i := by
126126
rw [sSup_eq_iSup, iSup_subtype', Submodule.mem_iSup_iff_exists_finset]
127-
refine ⟨fun ⟨s, hs⟩ ↦ ⟨s.map (Function.Embedding.subtype S), ?_, ?_⟩,
127+
refine ⟨fun ⟨s, hs⟩ ↦ ⟨s.map (Function.Embedding.subtype (· ∈ S)), ?_, ?_⟩,
128128
fun ⟨s, hsS, hs⟩ ↦ ⟨s.preimage (↑) Subtype.coe_injective.injOn, ?_⟩⟩
129-
· simpa using fun x _ ↦ x.property
129+
· simp
130130
· suffices m ∈ ⨆ (i) (hi : i ∈ S) (_ : ⟨i, hi⟩ ∈ s), i by simpa
131131
rwa [iSup_subtype']
132132
· have : ⨆ (i) (_ : i ∈ S ∧ i ∈ s), i = ⨆ (i) (_ : i ∈ s), i := by convert rfl; grind

Mathlib/LinearAlgebra/LinearIndependent/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ set_option backward.isDefEq.respectTransparency false in
213213
/-- Every finite subset of a linearly independent set is linearly independent. -/
214214
theorem linearIndependent_finset_map_embedding_subtype (s : Set M)
215215
(li : LinearIndependent R ((↑) : s → M)) (t : Finset s) :
216-
LinearIndependent R ((↑) : Finset.map (Embedding.subtype s) t → M) :=
216+
LinearIndependent R ((↑) : Finset.map (Embedding.subtype (· ∈ s)) t → M) :=
217217
li.comp (fun _ ↦ ⟨_, by aesop⟩) <| by intro; simp
218218

219219
section Indexed

Mathlib/LinearAlgebra/LinearIndependent/Defs.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ theorem linearIndepOn_iffₛ : LinearIndepOn R v s ↔
404404
refine ⟨fun h l₁ h₁ l₂ h₂ eq ↦ (Finsupp.subtypeDomain_eq_iff h₁ h₂).1 <| h _ _ <|
405405
(Finsupp.sum_subtypeDomain_index h₁).trans eq ▸ (Finsupp.sum_subtypeDomain_index h₂).symm,
406406
fun h l₁ l₂ eq ↦ ?_⟩
407-
refine Finsupp.embDomain_injective (Embedding.subtype s) <| h _ ?_ _ ?_ ?_
407+
refine Finsupp.embDomain_injective (Embedding.subtype (· ∈ s)) <| h _ ?_ _ ?_ ?_
408408
iterate 2 simpa using fun _ h _ ↦ h
409409
simp_rw [Finsupp.embDomain_eq_mapDomain]
410410
rwa [Finsupp.sum_mapDomain_index, Finsupp.sum_mapDomain_index] <;>

Mathlib/LinearAlgebra/TensorAlgebra/Basic.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ theorem induction {C : TensorAlgebra R M → Prop}
188188
(a : TensorAlgebra R M) : C a := by
189189
-- the arguments are enough to construct a subalgebra, and a mapping into it from M
190190
let s : Subalgebra R (TensorAlgebra R M) :=
191-
{ carrier := C
191+
{ carrier := {a | C a}
192192
mul_mem' := @mul
193193
add_mem' := @add
194194
algebraMap_mem' := algebraMap }

0 commit comments

Comments
 (0)