Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Mathlib/Analysis/Calculus/FormalMultilinearSeries.lean
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,16 @@ def FormalMultilinearSeries (𝕜 : Type*) (E : Type*) (F : Type*) [Semiring
∀ n : ℕ, E [×n]→L[𝕜] F
deriving Inhabited

set_option backward.inferInstanceAs.wrap.data false in
deriving instance AddCommMonoid for FormalMultilinearSeries
section AddCommMonoid

/-- Copy `Pi.addCommMonoid`, ensuring the pointwise operations hold by defeq. -/
instance : AddCommMonoid (FormalMultilinearSeries 𝕜 E F) where
__ := Pi.addCommMonoid
zero _ := 0
add x y n := x n + y n
nsmul k x n := k • x n

end AddCommMonoid

section Module

Expand Down
4 changes: 1 addition & 3 deletions Mathlib/CategoryTheory/Monoidal/Grp.lean
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,10 @@ namespace Grp
/-- An additive group object is an additive monoid object. -/]
abbrev toMon (A : Grp C) : Mon C := ⟨A.X⟩

set_option backward.inferInstanceAs.wrap.data false in
variable (C) in
/-- The trivial group object. -/
@[to_additive (attr := simps!) /-- The trivial additive group object. -/]
def trivial : Grp C :=
{ Mon.trivial C with grp := inferInstanceAs (GrpObj (𝟙_ C)) }
def trivial : Grp C := { Mon.trivial C with grp := GrpObj.instTensorUnit }

@[to_additive]
instance : Inhabited (Grp C) where
Expand Down
12 changes: 9 additions & 3 deletions Mathlib/GroupTheory/Torsion.lean
Original file line number Diff line number Diff line change
Expand Up @@ -348,13 +348,19 @@ end CommGroup

section AddCommGroup

set_option backward.inferInstanceAs.wrap.data false in
instance {R M : Type*} [Ring R] [AddCommGroup M] [Module R M] :
Module R (M ⧸ AddCommGroup.torsion M) :=
letI : Submodule R M := { AddCommGroup.torsion M with smul_mem' := fun r m ⟨n, hn, hn'⟩ ↦
-- Upgrade the torsion subgroup to a submodule.
letI S : Submodule R M := { AddCommGroup.torsion M with smul_mem' := fun r m ⟨n, hn, hn'⟩ ↦
⟨n, hn, by { simp only [Function.IsPeriodicPt, Function.IsFixedPt, add_left_iterate, add_zero,
smul_comm n] at hn' ⊢; simp only [hn', smul_zero] }⟩ }
inferInstanceAs (Module R (M ⧸ this))
-- The quotients are the same.
let e : (M ⧸ AddCommGroup.torsion M) ≃+ (M ⧸ S) := QuotientAddGroup.congr _ _ (.refl _)
(by simp [S])
-- So we can copy over scalar multiplication.
letI : SMul R (M ⧸ AddCommGroup.torsion M) := ⟨fun r m => e.symm (r • e m)⟩
Function.Injective.module R e.toAddMonoidHom e.injective (fun _ _ =>
e.symm.injective (e.symm_apply_apply _))

end AddCommGroup

Expand Down
1 change: 0 additions & 1 deletion Mathlib/RingTheory/Etale/Kaehler.lean
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ end Extension

variable {S}

set_option backward.inferInstanceAs.wrap.data false in
set_option backward.isDefEq.respectTransparency false in
/-- let `p` be a submonoid of an `R`-algebra `S`. Then `Sₚ ⊗ H¹(L_{S/R}) ≃ H¹(L_{Sₚ/R})`. -/
noncomputable
Expand Down
Loading