Skip to content

Commit e3b7382

Browse files
committed
fix(RingTheory/TwoSidedIdeal/Basic): remove instance with bad outParam (#40718)
There are two different instances for `SMulMemClass (TwoSidedIdeal R) _ R`, which violates the fact the fact that the second argument in the class is an `outParam` . So, this PR turns one of the instances into just a theorem.
1 parent 8f56b70 commit e3b7382

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Mathlib/RingTheory/TwoSidedIdeal/Basic.lean

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,10 @@ lemma coe_mk' (carrier : Set R) (zero_mem add_mem neg_mem mul_mem_left mul_mem_r
192192
instance : SMulMemClass (TwoSidedIdeal R) R R where
193193
smul_mem _ _ h := TwoSidedIdeal.mul_mem_left _ _ _ h
194194

195-
instance : SMulMemClass (TwoSidedIdeal R) Rᵐᵒᵖ R where
195+
-- This is not an instance, because together with the instance above,
196+
-- it violates the `outParam` of `SMulMemClass`.
197+
-- See: https://github.com/leanprover-community/mathlib4/pull/40718
198+
theorem instSMulMemClassMulOpposite : SMulMemClass (TwoSidedIdeal R) Rᵐᵒᵖ R where
196199
smul_mem _ _ h := TwoSidedIdeal.mul_mem_right _ _ _ h
197200

198201
instance : Add I where add x y := ⟨x.1 + y.1, I.add_mem x.2 y.2

0 commit comments

Comments
 (0)