Skip to content

Commit

Permalink
automated fixes
Browse files Browse the repository at this point in the history
Mathbin -> Mathlib

fix certain import statements

move "by" to end of line

add import to Mathlib.lean
  • Loading branch information
int-y1 committed Mar 3, 2023
1 parent e917210 commit a963e6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
1 change: 1 addition & 0 deletions Mathlib.lean
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import Mathlib.Algebra.CharZero.Lemmas
import Mathlib.Algebra.CharZero.Quotient
import Mathlib.Algebra.CovariantAndContravariant
import Mathlib.Algebra.DirectSum.Basic
import Mathlib.Algebra.DirectSum.Module
import Mathlib.Algebra.Divisibility.Basic
import Mathlib.Algebra.Divisibility.Units
import Mathlib.Algebra.EuclideanDomain.Basic
Expand Down
19 changes: 7 additions & 12 deletions Mathlib/Algebra/DirectSum/Module.lean
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Authors: Kenny Lau
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Algebra.DirectSum.Basic
import Mathbin.LinearAlgebra.Dfinsupp
import Mathlib.Algebra.DirectSum.Basic
import Mathlib.LinearAlgebra.Dfinsupp

/-!
# Direct sum of modules
Expand Down Expand Up @@ -178,17 +178,15 @@ variable {ι M}

@[simp]
theorem linearEquivFunOnFintype_lof [Fintype ι] [DecidableEq ι] (i : ι) (m : M i) :
(linearEquivFunOnFintype R ι M) (lof R ι M i m) = Pi.single i m :=
by
(linearEquivFunOnFintype R ι M) (lof R ι M i m) = Pi.single i m := by
ext a
change (Dfinsupp.equivFunOnFintype (lof R ι M i m)) a = _
convert _root_.congr_fun (Dfinsupp.equivFunOnFintype_single i m) a
#align direct_sum.linear_equiv_fun_on_fintype_lof DirectSum.linearEquivFunOnFintype_lof

@[simp]
theorem linearEquivFunOnFintype_symm_single [Fintype ι] [DecidableEq ι] (i : ι) (m : M i) :
(linearEquivFunOnFintype R ι M).symm (Pi.single i m) = lof R ι M i m :=
by
(linearEquivFunOnFintype R ι M).symm (Pi.single i m) = lof R ι M i m := by
ext a
change (dfinsupp.equiv_fun_on_fintype.symm (Pi.single i m)) a = _
rw [Dfinsupp.equivFunOnFintype_symm_single i m]
Expand All @@ -197,8 +195,7 @@ theorem linearEquivFunOnFintype_symm_single [Fintype ι] [DecidableEq ι] (i :

@[simp]
theorem linearEquivFunOnFintype_symm_coe [Fintype ι] (f : ⨁ i, M i) :
(linearEquivFunOnFintype R ι M).symm f = f :=
by
(linearEquivFunOnFintype R ι M).symm f = f := by
ext
simp [linear_equiv_fun_on_fintype]
#align direct_sum.linear_equiv_fun_on_fintype_symm_coe DirectSum.linearEquivFunOnFintype_symm_coe
Expand Down Expand Up @@ -353,8 +350,7 @@ theorem coeLinearMap_of (i : ι) (x : A i) : DirectSum.coeLinearMap A (of (fun i
variable {A}

/-- If a direct sum of submodules is internal then the submodules span the module. -/
theorem IsInternal.submodule_supᵢ_eq_top (h : IsInternal A) : supᵢ A = ⊤ :=
by
theorem IsInternal.submodule_supᵢ_eq_top (h : IsInternal A) : supᵢ A = ⊤ := by
rw [Submodule.supᵢ_eq_range_dfinsupp_lsum, LinearMap.range_eq_top]
exact Function.Bijective.surjective h
#align direct_sum.is_internal.submodule_supr_eq_top DirectSum.IsInternal.submodule_supᵢ_eq_top
Expand Down Expand Up @@ -436,8 +432,7 @@ theorem isInternal_submodule_iff_independent_and_supᵢ_eq_top (A : ι → Submo
/-- If a collection of submodules has just two indices, `i` and `j`, then
`direct_sum.is_internal` is equivalent to `is_compl`. -/
theorem isInternal_submodule_iff_isCompl (A : ι → Submodule R M) {i j : ι} (hij : i ≠ j)
(h : (Set.univ : Set ι) = {i, j}) : IsInternal A ↔ IsCompl (A i) (A j) :=
by
(h : (Set.univ : Set ι) = {i, j}) : IsInternal A ↔ IsCompl (A i) (A j) := by
have : ∀ k, k = i ∨ k = j := fun k => by simpa using set.ext_iff.mp h k
rw [is_internal_submodule_iff_independent_and_supr_eq_top, supᵢ, ← Set.image_univ, h,
Set.image_insert_eq, Set.image_singleton, supₛ_pair, CompleteLattice.independent_pair hij this]
Expand Down

0 comments on commit a963e6b

Please sign in to comment.