Skip to content

Commit 5e7fbbc

Browse files
committed
chore(Algebra/Module): remove some backward.privateInPublic
1 parent 9ccb29a commit 5e7fbbc

2 files changed

Lines changed: 14 additions & 30 deletions

File tree

Mathlib/Algebra/Module/GradedModule.lean

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ theorem of_smul_of [DecidableEq ιA] [DecidableEq ιB] [GMonoid A] [Gmodule A M]
104104
open AddMonoidHom
105105

106106
-- Almost identical to the proof of `direct_sum.one_mul`
107-
set_option backward.privateInPublic true in
108107
private theorem one_smul' [DecidableEq ιA] [DecidableEq ιB] [GMonoid A] [Gmodule A M]
109108
(x : ⨁ i, M i) :
110109
(1 : ⨁ i, A i) • x = x := by
@@ -115,7 +114,6 @@ private theorem one_smul' [DecidableEq ιA] [DecidableEq ιB] [GMonoid A] [Gmodu
115114
exact DirectSum.of_eq_of_gradedMonoid_eq (one_smul (GradedMonoid A) <| GradedMonoid.mk i xi)
116115

117116
-- Almost identical to the proof of `direct_sum.mul_assoc`
118-
set_option backward.privateInPublic true in
119117
private theorem mul_smul' [DecidableEq ιA] [DecidableEq ιB] [GSemiring A] [Gmodule A M]
120118
(a b : ⨁ i, A i)
121119
(c : ⨁ i, M i) : (a * b) • c = a • b • c := by
@@ -136,13 +134,11 @@ private theorem mul_smul' [DecidableEq ιA] [DecidableEq ιB] [GSemiring A] [Gmo
136134
DirectSum.of_eq_of_gradedMonoid_eq
137135
(mul_smul (GradedMonoid.mk ai ax) (GradedMonoid.mk bi bx) (GradedMonoid.mk ci cx))
138136

139-
set_option backward.privateInPublic true in
140-
set_option backward.privateInPublic.warn false in
141137
/-- The `Module` derived from `gmodule A M`. -/
142138
instance module [DecidableEq ιA] [DecidableEq ιB] [GSemiring A] [Gmodule A M] :
143139
Module (⨁ i, A i) (⨁ i, M i) where
144-
one_smul := one_smul' _ _
145-
mul_smul := mul_smul' _ _
140+
one_smul := by exact one_smul' _ _
141+
mul_smul := by exact mul_smul' _ _
146142
smul_add r := (smulAddMonoidHom A M r).map_add
147143
smul_zero r := (smulAddMonoidHom A M r).map_zero
148144
add_smul r s x := by simp only [smul_def, map_add, AddMonoidHom.add_apply]

Mathlib/Algebra/Module/Submodule/Lattice.lean

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,6 @@ instance : InfSet (Submodule R M) :=
184184
add_mem' := by simp +contextual [add_mem]
185185
smul_mem' := by simp +contextual [smul_mem] }⟩
186186

187-
set_option backward.privateInPublic true in
188-
private theorem sInf_le' {S : Set (Submodule R M)} {p} : p ∈ S → sInf S ≤ p :=
189-
Set.biInter_subset_of_mem
190-
191-
set_option backward.privateInPublic true in
192-
private theorem le_sInf' {S : Set (Submodule R M)} {p} : (∀ q ∈ S, p ≤ q) → p ≤ sInf S :=
193-
Set.subset_iInter₂
194-
195187
protected theorem isGLB_sInf {S : Set (Submodule R M)} : IsGLB S (sInf S) :=
196188
.of_image SetLike.coe_subset_coe isGLB_biInf
197189

@@ -202,22 +194,18 @@ instance : Min (Submodule R M) :=
202194
add_mem' := by simp +contextual [add_mem]
203195
smul_mem' := by simp +contextual [smul_mem] }⟩
204196

205-
set_option backward.privateInPublic true in
206-
set_option backward.privateInPublic.warn false in
207-
instance completeLattice : CompleteLattice (Submodule R M) :=
208-
{ (inferInstance : OrderTop (Submodule R M)),
209-
(inferInstance : OrderBot (Submodule R M)) with
210-
sup := fun a b ↦ sInf { x | a ≤ x ∧ b ≤ x }
211-
le_sup_left := fun _ _ ↦ le_sInf' fun _ ⟨h, _⟩ ↦ h
212-
le_sup_right := fun _ _ ↦ le_sInf' fun _ ⟨_, h⟩ ↦ h
213-
sup_le := fun _ _ _ h₁ h₂ ↦ sInf_le' ⟨h₁, h₂⟩
214-
inf := (· ⊓ ·)
215-
le_inf := fun _ _ _ ↦ Set.subset_inter
216-
inf_le_left := fun _ _ ↦ Set.inter_subset_left
217-
inf_le_right := fun _ _ ↦ Set.inter_subset_right
218-
sSup S := sInf {sm | ∀ s ∈ S, s ≤ sm}
219-
isLUB_sSup _ := isGLB_upperBounds.mp Submodule.isGLB_sInf
220-
isGLB_sInf _ := Submodule.isGLB_sInf }
197+
instance completeLattice : CompleteLattice (Submodule R M) where
198+
sup a b := sInf { x | a ≤ x ∧ b ≤ x }
199+
le_sup_left _ _ := Set.subset_iInter₂ fun _ ⟨h, _⟩ ↦ h
200+
le_sup_right _ _ := Set.subset_iInter₂ fun _ ⟨_, h⟩ ↦ h
201+
sup_le _ _ _ h₁ h₂ := Set.biInter_subset_of_mem ⟨h₁, h₂⟩
202+
inf := (· ⊓ ·)
203+
le_inf _ _ _ := Set.subset_inter
204+
inf_le_left _ _ := Set.inter_subset_left
205+
inf_le_right _ _ := Set.inter_subset_right
206+
sSup S := sInf {sm | ∀ s ∈ S, s ≤ sm}
207+
isLUB_sSup _ := isGLB_upperBounds.mp Submodule.isGLB_sInf
208+
isGLB_sInf _ := Submodule.isGLB_sInf
221209

222210
@[simp]
223211
theorem coe_inf : ↑(p ⊓ q) = (p ∩ q : Set M) :=

0 commit comments

Comments
 (0)