Skip to content

Commit c2a50c8

Browse files
committed
chore: remove some backward.proofsInPublic settings (leanprover-community#32945)
Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>
1 parent c5f79a7 commit c2a50c8

16 files changed

Lines changed: 30 additions & 56 deletions

File tree

Mathlib/Algebra/Algebra/Subalgebra/Lattice.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ lemma iSup_induction {ι : Sort*} (S : ι → Subalgebra R A) {motive : A → Pr
217217
suffices iSup S ≤ T from this mem
218218
rwa [iSup_le_iff]
219219

220-
set_option backward.proofsInPublic true in
221220
/-- A dependent version of `Subalgebra.iSup_induction`. -/
222221
@[elab_as_elim]
223222
theorem iSup_induction' {ι : Sort*} (S : ι → Subalgebra R A) {motive : ∀ x, (x ∈ ⨆ i, S i) → Prop}
@@ -226,7 +225,7 @@ theorem iSup_induction' {ι : Sort*} (S : ι → Subalgebra R A) {motive : ∀ x
226225
(zero : motive 0 (zero_mem _)) (one : motive 1 (one_mem _))
227226
(add : ∀ x y hx hy, motive x hx → motive y hy → motive (x + y) (add_mem ‹_› ‹_›))
228227
(mul : ∀ x y hx hy, motive x hx → motive y hy → motive (x * y) (mul_mem ‹_› ‹_›))
229-
(algebraMap : ∀ r, motive (algebraMap R A r) (Subalgebra.algebraMap_mem _ ‹_›)) :
228+
(algebraMap : ∀ r, motive (algebraMap R A r) (Subalgebra.algebraMap_mem (⨆ i, S i) ‹_›)) :
230229
motive x mem := by
231230
refine Exists.elim ?_ fun (hx : x ∈ ⨆ i, S i) (hc : motive x hx) ↦ hc
232231
exact iSup_induction S (motive := fun x' ↦ ∃ h, motive x' h) mem

Mathlib/Algebra/Category/ModuleCat/Basic.lean

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -607,15 +607,10 @@ def ofHom₂ {M N P : ModuleCat.{u} R} (f : M →ₗ[R] N →ₗ[R] P) :
607607
M ⟶ of R (N ⟶ P) :=
608608
ofHom <| homLinearEquiv.symm.toLinearMap ∘ₗ f
609609

610-
set_option backward.proofsInPublic true in
611610
/-- Turn a homomorphism into a bilinear map. -/
612611
@[simps!]
613-
def Hom.hom₂ {M N P : ModuleCat.{u} R}
614-
-- We write `Hom` instead of `M ⟶ (of R (N ⟶ P))`, otherwise dot notation breaks
615-
-- since it is expecting the type of `f` to be `ModuleCat.Hom`, not `Quiver.Hom`.
616-
(f : Hom M (of R (N ⟶ P))) :
617-
M →ₗ[R] N →ₗ[R] P :=
618-
Hom.hom (by convert (f ≫ ofHom homLinearEquiv.toLinearMap))
612+
def Hom.hom₂ {M N P : ModuleCat.{u} R} (f : M ⟶ (of R (N ⟶ P))) : M →ₗ[R] N →ₗ[R] P :=
613+
(f ≫ ofHom homLinearEquiv.toLinearMap).hom
619614

620615
@[simp] lemma Hom.hom₂_ofHom₂ {M N P : ModuleCat.{u} R} (f : M →ₗ[R] N →ₗ[R] P) :
621616
(ofHom₂ f).hom₂ = f := rfl

Mathlib/Algebra/Category/ModuleCat/Semi.lean

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -455,15 +455,10 @@ def ofHom₂ {M N P : SemimoduleCat.{u} R} (f : M →ₗ[R] N →ₗ[R] P) :
455455
M ⟶ of R (N ⟶ P) :=
456456
ofHom <| homLinearEquiv.symm.toLinearMap ∘ₗ f
457457

458-
set_option backward.proofsInPublic true in
459458
/-- Turn a homomorphism into a bilinear map. -/
460459
@[simps!]
461-
def Hom.hom₂ {M N P : SemimoduleCat.{u} R}
462-
-- We write `Hom` instead of `M ⟶ (of R (N ⟶ P))`, otherwise dot notation breaks
463-
-- since it is expecting the type of `f` to be `SemimoduleCat.Hom`, not `Quiver.Hom`.
464-
(f : Hom M (of R (N ⟶ P))) :
465-
M →ₗ[R] N →ₗ[R] P :=
466-
Hom.hom (by convert (f ≫ ofHom homLinearEquiv.toLinearMap))
460+
def Hom.hom₂ {M N P : SemimoduleCat.{u} R} (f : M ⟶ (of R (N ⟶ P))) : M →ₗ[R] N →ₗ[R] P :=
461+
(f ≫ ofHom homLinearEquiv.toLinearMap).hom
467462

468463
@[simp] lemma Hom.hom₂_ofHom₂ {M N P : SemimoduleCat.{u} R} (f : M →ₗ[R] N →ₗ[R] P) :
469464
(ofHom₂ f).hom₂ = f := rfl

Mathlib/Algebra/GroupWithZero/NonZeroDivisors.lean

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -182,18 +182,14 @@ theorem nonZeroDivisors.ne_zero (hx : x ∈ M₀⁰) : x ≠ 0 :=
182182
@[simp]
183183
theorem nonZeroDivisors.coe_ne_zero (x : M₀⁰) : (x : M₀) ≠ 0 := nonZeroDivisors.ne_zero x.2
184184

185-
set_option backward.proofsInPublic true in
186-
instance [IsLeftCancelMulZero M₀] :
187-
LeftCancelMonoid M₀⁰ where
188-
mul_left_cancel _ _ _ h := Subtype.ext <|
189-
mul_left_cancel₀ (nonZeroDivisors.coe_ne_zero _) (by
185+
instance [IsLeftCancelMulZero M₀] : LeftCancelMonoid M₀⁰ where
186+
mul_left_cancel z _ _ h := Subtype.ext <|
187+
mul_left_cancel₀ (nonZeroDivisors.coe_ne_zero z) (by
190188
simpa only [Subtype.ext_iff, Submonoid.coe_mul] using h)
191189

192-
set_option backward.proofsInPublic true in
193-
instance [IsRightCancelMulZero M₀] :
194-
RightCancelMonoid M₀⁰ where
195-
mul_right_cancel _ _ _ h := Subtype.ext <|
196-
mul_right_cancel₀ (nonZeroDivisors.coe_ne_zero _) (by
190+
instance [IsRightCancelMulZero M₀] : RightCancelMonoid M₀⁰ where
191+
mul_right_cancel z _ _ h := Subtype.ext <|
192+
mul_right_cancel₀ (nonZeroDivisors.coe_ne_zero z) (by
197193
simpa only [Subtype.ext_iff, Submonoid.coe_mul] using h)
198194

199195
end Nontrivial

Mathlib/Algebra/SkewMonoidAlgebra/Lift.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ theorem domCongr_refl :
205205
apply AlgEquiv.ext
206206
aesop
207207

208-
set_option backward.proofsInPublic true in
209208
@[simp] theorem domCongr_symm {e : G ≃* H} (he : ∀ (a : G) (x : A), a • x = (e a) • x) :
210-
(domCongrAlg k A he).symm = domCongrAlg _ _ (fun a x ↦ by rw [he, MulEquiv.apply_symm_apply]) :=
209+
(domCongrAlg k A he).symm =
210+
domCongrAlg (e := e.symm) _ _ (fun a x ↦ by rw [he, MulEquiv.apply_symm_apply]) :=
211211
rfl
212212

213213
end domCongr

Mathlib/CategoryTheory/Limits/Indization/IndObject.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,12 @@ def cocone : Cocone (P.F ⋙ yoneda) where
9595
def coconeIsColimit : IsColimit P.cocone :=
9696
P.isColimit
9797

98-
set_option backward.proofsInPublic true in
9998
/-- If `A` and `B` are isomorphic, then an ind-object presentation of `A` can be extended to an
10099
ind-object presentation of `B`. -/
101100
@[simps!]
102101
noncomputable def extend {A B : Cᵒᵖ ⥤ Type v} (P : IndObjectPresentation A) (η : A ⟶ B) [IsIso η] :
103102
IndObjectPresentation B :=
104-
.ofCocone (P.cocone.extend η) (P.coconeIsColimit.extendIso (by exact η))
103+
.ofCocone (P.cocone.extend η) (P.coconeIsColimit.extendIso η)
105104

106105
/-- The canonical comparison functor between the indexing category of the presentation and the
107106
comma category `CostructuredArrow yoneda A`. This functor is always final. -/

Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -390,17 +390,15 @@ def isoZeroOfEpiZero {X Y : C} (_ : Epi (0 : X ⟶ Y)) : Y ≅ 0 where
390390
inv := 0
391391
hom_inv_id := (cancel_epi (0 : X ⟶ Y)).mp (by simp)
392392

393-
set_option backward.proofsInPublic true in
394393
/-- If a monomorphism out of `X` is zero, then `X ≅ 0`. -/
395394
def isoZeroOfMonoEqZero {X Y : C} {f : X ⟶ Y} [Mono f] (h : f = 0) : X ≅ 0 := by
396395
subst h
397-
apply isoZeroOfMonoZero ‹_›
396+
apply isoZeroOfMonoZero (Y := Y) ‹_›
398397

399-
set_option backward.proofsInPublic true in
400398
/-- If an epimorphism in to `Y` is zero, then `Y ≅ 0`. -/
401399
def isoZeroOfEpiEqZero {X Y : C} {f : X ⟶ Y} [Epi f] (h : f = 0) : Y ≅ 0 := by
402400
subst h
403-
apply isoZeroOfEpiZero ‹_›
401+
apply isoZeroOfEpiZero (X := X) ‹_›
404402

405403
/-- If an object `X` is isomorphic to 0, there's no need to use choice to construct
406404
an explicit isomorphism: the zero morphism suffices. -/

Mathlib/CategoryTheory/Presentable/IsCardinalFiltered.lean

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,17 @@ section max
8383

8484
variable {K : Type u'} (S : K → J) (hS : HasCardinalLT K κ)
8585

86-
set_option backward.proofsInPublic true in
8786
/-- If `S : K → J` is a family of objects of cardinality `< κ` in a `κ`-filtered category,
8887
this is a choice of objects in `J` which is the target of a map from any of
8988
the objects `S k`. -/
9089
noncomputable def max : J :=
91-
(cocone (Discrete.functor S) (by simpa using hS)).pt
90+
(cocone (κ := κ) (Discrete.functor S) (by simpa using hS)).pt
9291

93-
set_option backward.proofsInPublic true in
9492
/-- If `S : K → J` is a family of objects of cardinality `< κ` in a `κ`-filtered category,
9593
this is a choice of map `S k ⟶ max S hS` for any `k : K`. -/
9694
noncomputable def toMax (k : K) :
9795
S k ⟶ max S hS :=
98-
(cocone (Discrete.functor S) (by simpa using hS)).ι.app ⟨k⟩
96+
(cocone (κ := κ) (Discrete.functor S) (by simpa using hS)).ι.app ⟨k⟩
9997

10098
end max
10199

Mathlib/CategoryTheory/Sites/Sieves.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,10 +408,9 @@ def uncurry : Set (Σ Y, Y ⟶ X) :=
408408
rw [heq_iff_eq] at h; subst h
409409
exact ⟨Y, u, hu⟩
410410

411-
set_option backward.proofsInPublic true in
412411
@[simp] theorem uncurry_bind (t : ⦃Y : C⦄ → (f : Y ⟶ X) → s f → Presieve Y) :
413412
(s.bind t).uncurry = ⋃ i ∈ s.uncurry,
414-
Sigma.map id (fun Z g ↦ (g ≫ i.2 : Z ⟶ X)) '' (t _ ‹_›).uncurry := by
413+
Sigma.map id (fun Z g ↦ (g ≫ i.2 : Z ⟶ X)) '' (t i.2 ‹_›).uncurry := by
415414
ext ⟨Z, v⟩; simp only [Set.mem_iUnion, Set.mem_image]; constructor
416415
· rintro ⟨Y, g, f, hf, ht, hv⟩
417416
exact ⟨⟨_, f⟩, hf, ⟨_, g⟩, ht, Sigma.ext rfl (heq_of_eq hv)⟩

Mathlib/Combinatorics/SimpleGraph/Connectivity/Connected.lean

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -667,13 +667,12 @@ lemma connected_toSimpleGraph (C : ConnectedComponent G) : (C.toSimpleGraph).Con
667667

668668
end ConnectedComponent
669669

670-
set_option backward.proofsInPublic true in
671-
/-- Given graph homomorphisms from each connected component of `G` to `H` this is the graph
672-
homomorphism from `G` to `H` -/
670+
/-- Given graph homomorphisms from each connected component of `G` to `H`, this is the graph
671+
homomorphism from `G` to `H`. -/
673672
@[simps]
674673
def homOfConnectedComponents (G : SimpleGraph V) {H : SimpleGraph V'}
675674
(C : (c : G.ConnectedComponent) → c.toSimpleGraph →g H) : G →g H where
676-
toFun := fun x ↦ (C (G.connectedComponentMk _)) _
675+
toFun := fun x ↦ (C (G.connectedComponentMk x)) ⟨x, ConnectedComponent.connectedComponentMk_mem⟩
677676
map_rel' := fun hab ↦ by
678677
have h : (G.connectedComponentMk _).toSimpleGraph.Adj ⟨_, rfl⟩
679678
⟨_, ((G.connectedComponentMk _).mem_supp_congr_adj hab).1 rfl⟩ := by simpa using hab

0 commit comments

Comments
 (0)