1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Nat.factorization_pow
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: induction' k with k ih
state_before: a b m n✝ p n k : ℕ
⊢ (n ^ k).factorization = k • n.factorization
state_after: case zero
a b m n✝ p n : ℕ
⊢ (n ^ 0).factorization = 0 • n.factorization

case succ
a b m n✝ p n k : ℕ
ih : (n ^ k).factorization = k • n.factorization
⊢ (n ^ (k + 1)).factorization = (k + 1) • n.factorization

tactic: rcases eq_or_ne n 0 with (rfl | hn)
state_before: case succ
a b m n✝ p n k : ℕ
ih : (n ^ k).factorization = k • n.factorization
⊢ (n ^ (k + 1)).factorization = (k + 1) • n.factorization
state_after: case succ.inl
a b m n p k : ℕ
ih : (0 ^ k).factorization = k • factorization 0
⊢ (0 ^ (k + 1)).factorization = (k + 1) • factorization 0

case succ.inr
a b m n✝ p n k : ℕ
ih : (n ^ k).factorization = k • n.factorization
hn : n ≠ 0
⊢ (n ^ (k + 1)).factorization = (k + 1) • n.factorization

tactic: rw [Nat.pow_succ, mul_comm, factorization_mul hn (pow_ne_zero _ hn), ih,
  add_smul, one_smul, add_comm]
state_before: case succ.inr
a b m n✝ p n k : ℕ
ih : (n ^ k).factorization = k • n.factorization
hn : n ≠ 0
⊢ (n ^ (k + 1)).factorization = (k + 1) • n.factorization
state_after: no goals

tactic: simp
state_before: case zero
a b m n✝ p n : ℕ
⊢ (n ^ 0).factorization = 0 • n.factorization
state_after: no goals

tactic: simp
state_before: case succ.inl
a b m n p k : ℕ
ih : (0 ^ k).factorization = k • factorization 0
⊢ (0 ^ (k + 1)).factorization = (k + 1) • factorization 0
state_after: no goals
Theorem: Set.Finite.image2
File: Mathlib/Data/Set/Finite.lean

tactic: have := hs.to_subtype
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
t : Set β
f : α → β → γ
hs : s.Finite
ht : t.Finite
⊢ (image2 f s t).Finite
state_after: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
t : Set β
f : α → β → γ
hs : s.Finite
ht : t.Finite
this : Finite ↑s
⊢ (image2 f s t).Finite

tactic: have := ht.to_subtype
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
t : Set β
f : α → β → γ
hs : s.Finite
ht : t.Finite
this : Finite ↑s
⊢ (image2 f s t).Finite
state_after: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
t : Set β
f : α → β → γ
hs : s.Finite
ht : t.Finite
this✝ : Finite ↑s
this : Finite ↑t
⊢ (image2 f s t).Finite

tactic: apply toFinite
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
t : Set β
f : α → β → γ
hs : s.Finite
ht : t.Finite
this✝ : Finite ↑s
this : Finite ↑t
⊢ (image2 f s t).Finite
state_after: no goals
Theorem: Mathlib.Tactic.Ring.inv_single
File: Mathlib/Tactic/Ring/Basic.lean

tactic: simp [*]
state_before: u : Lean.Level
R✝ : Type ?u.194511
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝¹ : CommSemiring R✝
R : Type u_1
inst✝ : DivisionRing R
a b : R
x✝ : a⁻¹ = b
⊢ (a + 0)⁻¹ = b + 0
state_after: no goals
Theorem: PrimeSpectrum.vanishingIdeal_mem_minimalPrimes
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

tactic: constructor
state_before: R : Type u
S : Type v
inst✝ : CommSemiring R
s : Set (PrimeSpectrum R)
⊢ vanishingIdeal s ∈ minimalPrimes R ↔ closure s ∈ irreducibleComponents (PrimeSpectrum R)
state_after: case mp
R : Type u
S : Type v
inst✝ : CommSemiring R
s : Set (PrimeSpectrum R)
⊢ vanishingIdeal s ∈ minimalPrimes R → closure s ∈ irreducibleComponents (PrimeSpectrum R)

case mpr
R : Type u
S : Type v
inst✝ : CommSemiring R
s : Set (PrimeSpectrum R)
⊢ closure s ∈ irreducibleComponents (PrimeSpectrum R) → vanishingIdeal s ∈ minimalPrimes R

tactic: rw [← zeroLocus_minimalPrimes, ← zeroLocus_vanishingIdeal_eq_closure]
state_before: case mp
R : Type u
S : Type v
inst✝ : CommSemiring R
s : Set (PrimeSpectrum R)
⊢ vanishingIdeal s ∈ minimalPrimes R → closure s ∈ irreducibleComponents (PrimeSpectrum R)
state_after: case mp
R : Type u
S : Type v
inst✝ : CommSemiring R
s : Set (PrimeSpectrum R)
⊢ vanishingIdeal s ∈ minimalPrimes R → zeroLocus ↑(vanishingIdeal s) ∈ zeroLocus ∘ SetLike.coe '' minimalPrimes R

tactic: exact Set.mem_image_of_mem _
state_before: case mp
R : Type u
S : Type v
inst✝ : CommSemiring R
s : Set (PrimeSpectrum R)
⊢ vanishingIdeal s ∈ minimalPrimes R → zeroLocus ↑(vanishingIdeal s) ∈ zeroLocus ∘ SetLike.coe '' minimalPrimes R
state_after: no goals

tactic: rw [← vanishingIdeal_irreducibleComponents, ← vanishingIdeal_closure]
state_before: case mpr
R : Type u
S : Type v
inst✝ : CommSemiring R
s : Set (PrimeSpectrum R)
⊢ closure s ∈ irreducibleComponents (PrimeSpectrum R) → vanishingIdeal s ∈ minimalPrimes R
state_after: case mpr
R : Type u
S : Type v
inst✝ : CommSemiring R
s : Set (PrimeSpectrum R)
⊢ closure s ∈ irreducibleComponents (PrimeSpectrum R) →
    vanishingIdeal (closure s) ∈ vanishingIdeal '' irreducibleComponents (PrimeSpectrum R)

tactic: exact Set.mem_image_of_mem _
state_before: case mpr
R : Type u
S : Type v
inst✝ : CommSemiring R
s : Set (PrimeSpectrum R)
⊢ closure s ∈ irreducibleComponents (PrimeSpectrum R) →
    vanishingIdeal (closure s) ∈ vanishingIdeal '' irreducibleComponents (PrimeSpectrum R)
state_after: no goals
Theorem: CategoryTheory.Functor.map_hom_inv
File: Mathlib/CategoryTheory/Iso.lean

tactic: simp
state_before: C : Type u
inst✝² : Category.{v, u} C
X✝ Y✝ Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
F : C ⥤ D
X Y : C
f : X ⟶ Y
inst✝ : IsIso f
⊢ F.map f ≫ F.map (inv f) = 𝟙 (F.obj X)
state_after: no goals
Theorem: Batteries.AssocList.find?_eq
File: .lake/packages/batteries/Batteries/Data/AssocList.lean

tactic: simp [find?_eq_findEntry?]
state_before: α : Type u_1
β : Type u_2
inst✝ : BEq α
a : α
l : AssocList α β
⊢ find? a l = Option.map (fun x => x.snd) (List.find? (fun x => x.fst == a) l.toList)
state_after: no goals
Theorem: MeasureTheory.measure_smul_null
File: Mathlib/MeasureTheory/Group/Action.lean

tactic: rwa [measure_smul]
state_before: G : Type u
M : Type v
α : Type w
s✝ : Set α
m : MeasurableSpace α
inst✝⁴ : Group G
inst✝³ : MulAction G α
inst✝² : MeasurableSpace G
inst✝¹ : MeasurableSMul G α
c✝ : G
μ : Measure α
inst✝ : SMulInvariantMeasure G α μ
s : Set α
h : μ s = 0
c : G
⊢ μ (c • s) = 0
state_after: no goals
Theorem: List.Perm.take_inter
File: Mathlib/Data/List/Perm.lean

tactic: simp only [List.inter]
state_before: α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a : α
inst✝ : DecidableEq α
xs ys : List α
n : ℕ
h : xs ~ ys
h' : ys.Nodup
⊢ take n xs ~ ys.inter (take n xs)
state_after: α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a : α
inst✝ : DecidableEq α
xs ys : List α
n : ℕ
h : xs ~ ys
h' : ys.Nodup
⊢ take n xs ~ List.filter (fun x => elem x (take n xs)) ys

tactic: exact Perm.trans (show xs.take n ~ xs.filter (xs.take n).elem by
    conv_lhs => rw [Nodup.take_eq_filter_mem ((Perm.nodup_iff h).2 h')])
  (Perm.filter _ h)
state_before: α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a : α
inst✝ : DecidableEq α
xs ys : List α
n : ℕ
h : xs ~ ys
h' : ys.Nodup
⊢ take n xs ~ List.filter (fun x => elem x (take n xs)) ys
state_after: no goals

tactic: conv_lhs => rw [Nodup.take_eq_filter_mem ((Perm.nodup_iff h).2 h')]
state_before: α : Type u_1
β : Type u_2
l l₁ l₂ : List α
a : α
inst✝ : DecidableEq α
xs ys : List α
n : ℕ
h : xs ~ ys
h' : ys.Nodup
⊢ take n xs ~ List.filter (fun a => elem a (take n xs)) xs
state_after: no goals
Theorem: IsOpen.closure_mul
File: Mathlib/Topology/Algebra/Group/Basic.lean

tactic: rw [← inv_inv (closure s * t), mul_inv_rev, inv_closure, ht.inv.mul_closure, mul_inv_rev, inv_inv,
  inv_inv]
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
s✝ t : Set G
ht : IsOpen t
s : Set G
⊢ closure s * t = s * t
state_after: no goals
Theorem: Polynomial.leadingCoeff_X_pow
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: simpa only [C_1, one_mul] using leadingCoeff_C_mul_X_pow (1 : R) n
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
n : ℕ
⊢ (X ^ n).leadingCoeff = 1
state_after: no goals
Theorem: Con.lift_comp_mk'
File: Mathlib/GroupTheory/Congruence/Basic.lean

tactic: ext
state_before: M : Type u_1
N : Type u_2
P : Type u_3
inst✝² : MulOneClass M
inst✝¹ : MulOneClass N
inst✝ : MulOneClass P
c : Con M
x y : M
f : M →* P
H : c ≤ ker f
⊢ (c.lift f H).comp c.mk' = f
state_after: case h
M : Type u_1
N : Type u_2
P : Type u_3
inst✝² : MulOneClass M
inst✝¹ : MulOneClass N
inst✝ : MulOneClass P
c : Con M
x y : M
f : M →* P
H : c ≤ ker f
x✝ : M
⊢ ((c.lift f H).comp c.mk') x✝ = f x✝

tactic: rfl
state_before: case h
M : Type u_1
N : Type u_2
P : Type u_3
inst✝² : MulOneClass M
inst✝¹ : MulOneClass N
inst✝ : MulOneClass P
c : Con M
x y : M
f : M →* P
H : c ≤ ker f
x✝ : M
⊢ ((c.lift f H).comp c.mk') x✝ = f x✝
state_after: no goals
Theorem: Substring.ValidFor.any
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

tactic: simp [-List.append_assoc, Substring.any, anyAux_of_valid]
state_before: l m r : List Char
f : Char → Bool
⊢ { str := { data := l ++ m ++ r }, startPos := { byteIdx := utf8Len l },
          stopPos := { byteIdx := utf8Len l + utf8Len m } }.any
      f =
    m.any f
state_after: no goals
Theorem: AdjoinRoot.Minpoly.toAdjoin.surjective
File: Mathlib/RingTheory/AdjoinRoot.lean

tactic: rw [← range_top_iff_surjective, _root_.eq_top_iff, ← adjoin_adjoin_coe_preimage]
state_before: R : Type u
S : Type v
K : Type w
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
x : S
⊢ Function.Surjective ⇑(toAdjoin R x)
state_after: R : Type u
S : Type v
K : Type w
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
x : S
⊢ adjoin R (Subtype.val ⁻¹' {x}) ≤ (toAdjoin R x).range

tactic: exact adjoin_le fun ⟨y₁, y₂⟩ h ↦ ⟨mk (minpoly R x) X, by simpa [toAdjoin] using h.symm⟩
state_before: R : Type u
S : Type v
K : Type w
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
x : S
⊢ adjoin R (Subtype.val ⁻¹' {x}) ≤ (toAdjoin R x).range
state_after: no goals

tactic: simpa [toAdjoin] using h.symm
state_before: R : Type u
S : Type v
K : Type w
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
x : S
x✝ : { x_1 // x_1 ∈ ↑(adjoin R {x}) }
y₁ : S
y₂ : y₁ ∈ ↑(adjoin R {x})
h : ⟨y₁, y₂⟩ ∈ Subtype.val ⁻¹' {x}
⊢ (toAdjoin R x).toRingHom ((mk (minpoly R x)) X) = ⟨y₁, y₂⟩
state_after: no goals
Theorem: MeasureTheory.setLIntegral_strict_mono
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: simp [hs]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f g : α → ℝ≥0∞
s : Set α
hsm : MeasurableSet s
hs : μ s ≠ 0
hg : Measurable g
hfi : ∫⁻ (x : α) in s, f x ∂μ ≠ ⊤
h : ∀ᵐ (x : α) ∂μ, x ∈ s → f x < g x
⊢ μ.restrict s ≠ 0
state_after: no goals
Theorem: Nat.uniformEmbedding_coe_rat
File: Mathlib/Topology/Instances/Rat.lean

tactic: simpa using Nat.pairwise_one_le_dist
state_before: ⊢ Pairwise fun x y => 1 ≤ dist ↑x ↑y
state_after: no goals
Theorem: Gamma_cong_eq_self
File: Mathlib/NumberTheory/ModularForms/CongruenceSubgroups.lean

tactic: apply Subgroup.Normal.conjAct (Gamma_normal N)
state_before: N✝ N : ℕ
g : ConjAct SL(2, ℤ)
⊢ g • Gamma N = Gamma N
state_after: no goals
Theorem: Ne.nhdsWithin_diff_singleton
File: Mathlib/Topology/Separation.lean

tactic: rw [diff_eq, inter_comm, nhdsWithin_inter_of_mem]
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
x y : X
h : x ≠ y
s : Set X
⊢ 𝓝[s \ {y}] x = 𝓝[s] x
state_after: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
x y : X
h : x ≠ y
s : Set X
⊢ {y}ᶜ ∈ 𝓝[s] x

tactic: exact mem_nhdsWithin_of_mem_nhds (isOpen_ne.mem_nhds h)
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : T1Space X
x y : X
h : x ≠ y
s : Set X
⊢ {y}ᶜ ∈ 𝓝[s] x
state_after: no goals
Theorem: spectrum.zero_mem_resolventSet_of_unit
File: Mathlib/Algebra/Algebra/Spectrum.lean

tactic: simpa only [mem_resolventSet_iff, ← not_mem_iff, zero_not_mem_iff] using a.isUnit
state_before: R : Type u
A : Type v
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : Aˣ
⊢ 0 ∈ resolventSet R ↑a
state_after: no goals
Theorem: Irrational.ne_int
File: Mathlib/Data/Real/Irrational.lean

tactic: rw [← Rat.cast_intCast]
state_before: x : ℝ
h : Irrational x
m : ℤ
⊢ x ≠ ↑m
state_after: x : ℝ
h : Irrational x
m : ℤ
⊢ x ≠ ↑↑m

tactic: exact h.ne_rat _
state_before: x : ℝ
h : Irrational x
m : ℤ
⊢ x ≠ ↑↑m
state_after: no goals
Theorem: mabs_zpow
File: Mathlib/Algebra/Order/Ring/Abs.lean

tactic: obtain n0 | n0 := le_total 0 n
state_before: α : Type u_1
inst✝ : LinearOrderedCommGroup α
a✝ b : α
n : ℤ
a : α
⊢ mabs (a ^ n) = mabs a ^ |n|
state_after: case inl
α : Type u_1
inst✝ : LinearOrderedCommGroup α
a✝ b : α
n : ℤ
a : α
n0 : 0 ≤ n
⊢ mabs (a ^ n) = mabs a ^ |n|

case inr
α : Type u_1
inst✝ : LinearOrderedCommGroup α
a✝ b : α
n : ℤ
a : α
n0 : n ≤ 0
⊢ mabs (a ^ n) = mabs a ^ |n|

tactic: obtain ⟨n, rfl⟩ := Int.eq_ofNat_of_zero_le n0
state_before: case inl
α : Type u_1
inst✝ : LinearOrderedCommGroup α
a✝ b : α
n : ℤ
a : α
n0 : 0 ≤ n
⊢ mabs (a ^ n) = mabs a ^ |n|
state_after: case inl.intro
α : Type u_1
inst✝ : LinearOrderedCommGroup α
a✝ b a : α
n : ℕ
n0 : 0 ≤ ↑n
⊢ mabs (a ^ ↑n) = mabs a ^ |↑n|

tactic: simp only [mabs_pow, zpow_natCast, Nat.abs_cast]
state_before: case inl.intro
α : Type u_1
inst✝ : LinearOrderedCommGroup α
a✝ b a : α
n : ℕ
n0 : 0 ≤ ↑n
⊢ mabs (a ^ ↑n) = mabs a ^ |↑n|
state_after: no goals

tactic: obtain ⟨m, h⟩ := Int.eq_ofNat_of_zero_le (neg_nonneg.2 n0)
state_before: case inr
α : Type u_1
inst✝ : LinearOrderedCommGroup α
a✝ b : α
n : ℤ
a : α
n0 : n ≤ 0
⊢ mabs (a ^ n) = mabs a ^ |n|
state_after: case inr.intro
α : Type u_1
inst✝ : LinearOrderedCommGroup α
a✝ b : α
n : ℤ
a : α
n0 : n ≤ 0
m : ℕ
h : -n = ↑m
⊢ mabs (a ^ n) = mabs a ^ |n|

tactic: rw [← mabs_inv, ← zpow_neg, ← abs_neg, h, zpow_natCast, Nat.abs_cast, zpow_natCast]
state_before: case inr.intro
α : Type u_1
inst✝ : LinearOrderedCommGroup α
a✝ b : α
n : ℤ
a : α
n0 : n ≤ 0
m : ℕ
h : -n = ↑m
⊢ mabs (a ^ n) = mabs a ^ |n|
state_after: case inr.intro
α : Type u_1
inst✝ : LinearOrderedCommGroup α
a✝ b : α
n : ℤ
a : α
n0 : n ≤ 0
m : ℕ
h : -n = ↑m
⊢ mabs (a ^ m) = mabs a ^ m

tactic: exact mabs_pow m _
state_before: case inr.intro
α : Type u_1
inst✝ : LinearOrderedCommGroup α
a✝ b : α
n : ℤ
a : α
n0 : n ≤ 0
m : ℕ
h : -n = ↑m
⊢ mabs (a ^ m) = mabs a ^ m
state_after: no goals
Theorem: Matrix.vec3_add
File: Mathlib/Data/Matrix/Notation.lean

tactic: rw [cons_add_cons, cons_add_cons, cons_add_cons, empty_add_empty]
state_before: α : Type u
o n m : ℕ
m' : Type uₘ
n' : Type uₙ
o' : Type uₒ
a b : ℕ
inst✝ : Add α
a₀ a₁ a₂ b₀ b₁ b₂ : α
⊢ ![a₀, a₁, a₂] + ![b₀, b₁, b₂] = ![a₀ + b₀, a₁ + b₁, a₂ + b₂]
state_after: no goals
Theorem: Nat.image_cast_int_Iic
File: Mathlib/Data/Nat/Cast/SetInterval.lean

tactic: rw [← Icc_bot, image_cast_int_Icc]
state_before: a : ℕ
⊢ Nat.cast '' Iic a = Icc 0 ↑a
state_after: a : ℕ
⊢ Icc ↑⊥ ↑a = Icc 0 ↑a

tactic: rfl
state_before: a : ℕ
⊢ Icc ↑⊥ ↑a = Icc 0 ↑a
state_after: no goals
Theorem: HahnSeries.support_embDomain_subset
File: Mathlib/RingTheory/HahnSeries/Basic.lean

tactic: intro g hg
state_before: Γ : Type u_1
R : Type u_2
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a b : Γ
r : R
Γ' : Type u_3
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x : HahnSeries Γ R
⊢ (embDomain f x).support ⊆ ⇑f '' x.support
state_after: Γ : Type u_1
R : Type u_2
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a b : Γ
r : R
Γ' : Type u_3
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x : HahnSeries Γ R
g : Γ'
hg : g ∈ (embDomain f x).support
⊢ g ∈ ⇑f '' x.support

tactic: contrapose! hg
state_before: Γ : Type u_1
R : Type u_2
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a b : Γ
r : R
Γ' : Type u_3
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x : HahnSeries Γ R
g : Γ'
hg : g ∈ (embDomain f x).support
⊢ g ∈ ⇑f '' x.support
state_after: Γ : Type u_1
R : Type u_2
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a b : Γ
r : R
Γ' : Type u_3
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x : HahnSeries Γ R
g : Γ'
hg : g ∉ ⇑f '' x.support
⊢ g ∉ (embDomain f x).support

tactic: rw [mem_support, embDomain_notin_image_support hg, Classical.not_not]
state_before: Γ : Type u_1
R : Type u_2
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a b : Γ
r : R
Γ' : Type u_3
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x : HahnSeries Γ R
g : Γ'
hg : g ∉ ⇑f '' x.support
⊢ g ∉ (embDomain f x).support
state_after: no goals
Theorem: Associates.factors_prod
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: rcases Associates.mk_surjective a with ⟨a, rfl⟩
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a : Associates α
⊢ a.factors.prod = a
state_after: case intro
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a : α
⊢ (Associates.mk a).factors.prod = Associates.mk a

tactic: rcases eq_or_ne a 0 with rfl | ha
state_before: case intro
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a : α
⊢ (Associates.mk a).factors.prod = Associates.mk a
state_after: case intro.inl
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
⊢ (Associates.mk 0).factors.prod = Associates.mk 0

case intro.inr
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a : α
ha : a ≠ 0
⊢ (Associates.mk a).factors.prod = Associates.mk a

tactic: simp
state_before: case intro.inl
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
⊢ (Associates.mk 0).factors.prod = Associates.mk 0
state_after: no goals

tactic: simp [ha, prod_mk, mk_eq_mk_iff_associated, UniqueFactorizationMonoid.factors_prod,
  -Quotient.eq]
state_before: case intro.inr
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a : α
ha : a ≠ 0
⊢ (Associates.mk a).factors.prod = Associates.mk a
state_after: no goals
Theorem: PowerSeries.invOneSubPow_val_zero_eq_invUnitSub_one
File: Mathlib/RingTheory/PowerSeries/WellKnown.lean

tactic: simp [invOneSubPow, invUnitsSub]
state_before: S : Type u_1
inst✝ : CommRing S
d : ℕ
⊢ ↑(invOneSubPow 0) = invUnitsSub 1
state_after: no goals
Theorem: MeasureTheory.setLintegral_eq_top_of_measure_eq_top_ne_zero
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: rw [← setOf_inter_eq_sep]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : AEMeasurable f (μ.restrict s)
hμf : μ {x | x ∈ s ∧ f x = ⊤} ≠ 0
⊢ μ {x | x ∈ s ∧ f x = ⊤} ≤ (μ.restrict s) {x | f x = ⊤}
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : AEMeasurable f (μ.restrict s)
hμf : μ {x | x ∈ s ∧ f x = ⊤} ≠ 0
⊢ μ ({a | f a = ⊤} ∩ s) ≤ (μ.restrict s) {x | f x = ⊤}

tactic: exact Measure.le_restrict_apply _ _
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hf : AEMeasurable f (μ.restrict s)
hμf : μ {x | x ∈ s ∧ f x = ⊤} ≠ 0
⊢ μ ({a | f a = ⊤} ∩ s) ≤ (μ.restrict s) {x | f x = ⊤}
state_after: no goals
Theorem: monoidHomOfForallMemZpowers_apply_gen
File: Mathlib/GroupTheory/SpecificGroups/Cyclic.lean

tactic: simp only [monoidHomOfForallMemZpowers, MonoidHom.coe_mk, OneHom.coe_mk]
state_before: α : Type u
a : α
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
g : G
hg : ∀ (x : G), x ∈ zpowers g
g' : G'
hg' : orderOf g' ∣ orderOf g
⊢ (monoidHomOfForallMemZpowers hg hg') g = g'
state_after: α : Type u
a : α
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
g : G
hg : ∀ (x : G), x ∈ zpowers g
g' : G'
hg' : orderOf g' ∣ orderOf g
⊢ g' ^ Classical.choose ⋯ = g'

tactic: nth_rw 2 [← zpow_one g']
state_before: α : Type u
a : α
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
g : G
hg : ∀ (x : G), x ∈ zpowers g
g' : G'
hg' : orderOf g' ∣ orderOf g
⊢ g' ^ Classical.choose ⋯ = g'
state_after: α : Type u
a : α
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
g : G
hg : ∀ (x : G), x ∈ zpowers g
g' : G'
hg' : orderOf g' ∣ orderOf g
⊢ g' ^ Classical.choose ⋯ = g' ^ 1

tactic: rw [zpow_eq_zpow_iff_modEq]
state_before: α : Type u
a : α
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
g : G
hg : ∀ (x : G), x ∈ zpowers g
g' : G'
hg' : orderOf g' ∣ orderOf g
⊢ g' ^ Classical.choose ⋯ = g' ^ 1
state_after: α : Type u
a : α
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
g : G
hg : ∀ (x : G), x ∈ zpowers g
g' : G'
hg' : orderOf g' ∣ orderOf g
⊢ Classical.choose ⋯ ≡ 1 [ZMOD ↑(orderOf g')]

tactic: apply Int.ModEq.of_dvd (Int.natCast_dvd_natCast.mpr hg')
state_before: α : Type u
a : α
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
g : G
hg : ∀ (x : G), x ∈ zpowers g
g' : G'
hg' : orderOf g' ∣ orderOf g
⊢ Classical.choose ⋯ ≡ 1 [ZMOD ↑(orderOf g')]
state_after: α : Type u
a : α
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
g : G
hg : ∀ (x : G), x ∈ zpowers g
g' : G'
hg' : orderOf g' ∣ orderOf g
⊢ Classical.choose ⋯ ≡ 1 [ZMOD ↑(orderOf g)]

tactic: rw [← zpow_eq_zpow_iff_modEq, zpow_one]
state_before: α : Type u
a : α
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
g : G
hg : ∀ (x : G), x ∈ zpowers g
g' : G'
hg' : orderOf g' ∣ orderOf g
⊢ Classical.choose ⋯ ≡ 1 [ZMOD ↑(orderOf g)]
state_after: α : Type u
a : α
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
g : G
hg : ∀ (x : G), x ∈ zpowers g
g' : G'
hg' : orderOf g' ∣ orderOf g
⊢ g ^ Classical.choose ⋯ = g

tactic: exact Classical.choose_spec <| mem_zpowers_iff.mp <| hg g
state_before: α : Type u
a : α
G : Type u_1
G' : Type u_2
inst✝¹ : Group G
inst✝ : Group G'
g : G
hg : ∀ (x : G), x ∈ zpowers g
g' : G'
hg' : orderOf g' ∣ orderOf g
⊢ g ^ Classical.choose ⋯ = g
state_after: no goals
Theorem: algebraMap_star_comm
File: Mathlib/Algebra/Star/Module.lean

tactic: simp only [Algebra.algebraMap_eq_smul_one, star_smul, star_one]
state_before: R : Type u_1
A : Type u_2
inst✝⁵ : CommSemiring R
inst✝⁴ : StarRing R
inst✝³ : Semiring A
inst✝² : StarMul A
inst✝¹ : Algebra R A
inst✝ : StarModule R A
r : R
⊢ (algebraMap R A) (star r) = star ((algebraMap R A) r)
state_after: no goals
Theorem: Batteries.UnionFind.parent_push
File: .lake/packages/batteries/Batteries/Data/UnionFind/Lemmas.lean

tactic: simp [parent]
state_before: a : Nat
m : UnionFind
⊢ m.push.parent a = m.parent a
state_after: no goals
Theorem: NNReal.rpow_neg_one
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

tactic: simp [rpow_neg]
state_before: w x✝ y z : ℝ
x : ℝ≥0
⊢ x ^ (-1) = x⁻¹
state_after: no goals
Theorem: Set.OrdConnected.smul
File: Mathlib/Algebra/Order/UpperLower.lean

tactic: rw [← hs.upperClosure_inter_lowerClosure, smul_set_inter]
state_before: α : Type u_1
inst✝ : OrderedCommGroup α
s t : Set α
a : α
hs : s.OrdConnected
⊢ (a • s).OrdConnected
state_after: α : Type u_1
inst✝ : OrderedCommGroup α
s t : Set α
a : α
hs : s.OrdConnected
⊢ (a • ↑(upperClosure s) ∩ a • ↑(lowerClosure s)).OrdConnected

tactic: exact (upperClosure _).upper.smul.ordConnected.inter (lowerClosure _).lower.smul.ordConnected
state_before: α : Type u_1
inst✝ : OrderedCommGroup α
s t : Set α
a : α
hs : s.OrdConnected
⊢ (a • ↑(upperClosure s) ∩ a • ↑(lowerClosure s)).OrdConnected
state_after: no goals