Skip to content

Commit c15f60a

Browse files
eric-wieserkbuzzard
authored andcommitted
chore: register MulOpposite.rec with induction and cases (#14136)
Split from #12605. Co-authored-by: negiizhao [email protected]
1 parent 8f90a15 commit c15f60a

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

Mathlib/Algebra/Algebra/Operations.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ protected theorem map_one {A'} [Semiring A'] [Algebra R A'] (f : A →ₐ[R] A')
128128
theorem map_op_one :
129129
map (↑(opLinearEquiv R : A ≃ₗ[R] Aᵐᵒᵖ) : A →ₗ[R] Aᵐᵒᵖ) (1 : Submodule R A) = 1 := by
130130
ext x
131-
induction x using MulOpposite.rec'
131+
induction x
132132
simp
133133
#align submodule.map_op_one Submodule.map_op_one
134134

Mathlib/Algebra/Group/Action/Defs.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ class IsCentralScalar (M α : Type*) [SMul M α] [SMul Mᵐᵒᵖ α] : Prop whe
282282
@[to_additive]
283283
lemma IsCentralScalar.unop_smul_eq_smul {M α : Type*} [SMul M α] [SMul Mᵐᵒᵖ α]
284284
[IsCentralScalar M α] (m : Mᵐᵒᵖ) (a : α) : MulOpposite.unop m • a = m • a := by
285-
induction m using MulOpposite.rec'; exact (IsCentralScalar.op_smul_eq_smul _ a).symm
285+
induction m; exact (IsCentralScalar.op_smul_eq_smul _ a).symm
286286
#align is_central_scalar.unop_smul_eq_smul IsCentralScalar.unop_smul_eq_smul
287287
#align is_central_vadd.unop_vadd_eq_vadd IsCentralVAdd.unop_vadd_eq_vadd
288288

Mathlib/Algebra/Opposites.lean

+3-3
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ theorem unop_comp_op : (unop : αᵐᵒᵖ → α) ∘ op = id :=
110110
#align mul_opposite.unop_comp_op MulOpposite.unop_comp_op
111111
#align add_opposite.unop_comp_op AddOpposite.unop_comp_op
112112

113-
/-- A recursor for `MulOpposite`. Use as `induction x using MulOpposite.rec'`. -/
114-
@[to_additive (attr := simp, elab_as_elim)
115-
"A recursor for `AddOpposite`. Use as `induction x using AddOpposite.rec'`."]
113+
/-- A recursor for `MulOpposite`. Use as `induction x`. -/
114+
@[to_additive (attr := simp, elab_as_elim, induction_eliminator, cases_eliminator)
115+
"A recursor for `AddOpposite`. Use as `induction x`."]
116116
protected def rec' {F : αᵐᵒᵖ → Sort*} (h : ∀ X, F (op X)) : ∀ X, F X := fun X ↦ h (unop X)
117117
#align mul_opposite.rec MulOpposite.rec'
118118
#align add_opposite.rec AddOpposite.rec'

Mathlib/Algebra/Quandle.lean

+4-4
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ instance oppositeRack : Rack Rᵐᵒᵖ where
259259
act x y := op (invAct (unop x) (unop y))
260260
self_distrib := by
261261
intro x y z
262-
induction x using MulOpposite.rec'
263-
induction y using MulOpposite.rec'
264-
induction z using MulOpposite.rec'
262+
induction x
263+
induction y
264+
induction z
265265
simp only [op_inj, unop_op, op_unop]
266266
rw [self_distrib_inv]
267267
invAct x y := op (Shelf.act (unop x) (unop y))
@@ -416,7 +416,7 @@ theorem fix_inv {x : Q} : x ◃⁻¹ x = x := by
416416
instance oppositeQuandle : Quandle Qᵐᵒᵖ where
417417
fix := by
418418
intro x
419-
induction' x using MulOpposite.rec'
419+
induction' x
420420
simp
421421
#align quandle.opposite_quandle Quandle.oppositeQuandle
422422

Mathlib/GroupTheory/GroupAction/Opposite.lean

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ instance IsScalarTower.opposite_mid {M N} [Mul N] [SMul M N] [SMulCommClass M N
229229
instance SMulCommClass.opposite_mid {M N} [Mul N] [SMul M N] [IsScalarTower M N N] :
230230
SMulCommClass M Nᵐᵒᵖ N :=
231231
fun x y z => by
232-
induction y using MulOpposite.rec'
232+
induction y
233233
simp only [smul_mul_assoc, MulOpposite.smul_eq_mul_unop]⟩
234234
#align smul_comm_class.opposite_mid SMulCommClass.opposite_mid
235235
#align vadd_comm_class.opposite_mid VAddCommClass.opposite_mid

Mathlib/RingTheory/Polynomial/Opposites.lean

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ set_option linter.uppercaseLean3 false in
9494
@[simp]
9595
theorem coeff_opRingEquiv (p : R[X]ᵐᵒᵖ) (n : ℕ) :
9696
(opRingEquiv R p).coeff n = op ((unop p).coeff n) := by
97-
induction' p using MulOpposite.rec' with p
97+
induction' p with p
9898
cases p
9999
rfl
100100
#align polynomial.coeff_op_ring_equiv Polynomial.coeff_opRingEquiv
101101

102102
@[simp]
103103
theorem support_opRingEquiv (p : R[X]ᵐᵒᵖ) : (opRingEquiv R p).support = (unop p).support := by
104-
induction' p using MulOpposite.rec' with p
104+
induction' p with p
105105
cases p
106106
exact Finsupp.support_mapRange_of_injective (map_zero _) _ op_injective
107107
#align polynomial.support_op_ring_equiv Polynomial.support_opRingEquiv

0 commit comments

Comments
 (0)