ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Int.divModEquiv_apply
File: Mathlib/Logic/Equiv/Fin.lean

Proof steps:
state_before: m n✝ n : ℕ
inst✝ : NeZero n
a : ℤ
⊢ (fun p => p.1 * ↑n + ↑↑p.2) ((fun a => (a / ↑n, ↑(a.natMod ↑n))) a) = a
state_after: no goals
tactic: simp_rw [Fin.coe_ofNat_eq_mod, natCast_mod, natMod,
      toNat_of_nonneg (emod_nonneg _ <| natCast_eq_zero.not.2 (NeZero.ne n)), emod_emod,
      ediv_add_emod']
state_before: m n✝ n : ℕ
inst✝ : NeZero n
x✝ : ℤ × Fin n
q : ℤ
r : ℕ
hrn : r < n
⊢ (fun a => (a / ↑n, ↑(a.natMod ↑n))) ((fun p => p.1 * ↑n + ↑↑p.2) (q, ⟨r, hrn⟩)) = (q, ⟨r, hrn⟩)
state_after: m n✝ n : ℕ
inst✝ : NeZero n
x✝ : ℤ × Fin n
q : ℤ
r : ℕ
hrn : r < n
⊢ (q * ↑n + ↑r) / ↑n = q ∧ ↑↑((q * ↑n + ↑r).natMod ↑n) = r
tactic: simp only [Fin.val_mk, Prod.mk.inj_iff, Fin.ext_iff]
state_before: m n✝ n : ℕ
inst✝ : NeZero n
x✝ : ℤ × Fin n
q : ℤ
r : ℕ
hrn : r < n
⊢ (q * ↑n + ↑r) / ↑n = q ∧ ↑↑((q * ↑n + ↑r).natMod ↑n) = r
state_after: m n✝ n : ℕ
inst✝ : NeZero n
x✝ : ℤ × Fin n
q : ℤ
r : ℕ
hrn : r < n
h1 : 0 ≤ ↑r
h2 : ↑r < ↑n
⊢ (q * ↑n + ↑r) / ↑n = q ∧ ↑↑((q * ↑n + ↑r).natMod ↑n) = r
tactic: obtain ⟨h1, h2⟩ := Int.natCast_nonneg r, Int.ofNat_lt.2 hrn
state_before: m n✝ n : ℕ
inst✝ : NeZero n
x✝ : ℤ × Fin n
q : ℤ
r : ℕ
hrn : r < n
h1 : 0 ≤ ↑r
h2 : ↑r < ↑n
⊢ (q * ↑n + ↑r) / ↑n = q ∧ ↑↑((q * ↑n + ↑r).natMod ↑n) = r
state_after: m n✝ n : ℕ
inst✝ : NeZero n
x✝ : ℤ × Fin n
q : ℤ
r : ℕ
hrn : r < n
h1 : 0 ≤ ↑r
h2 : ↑r < ↑n
⊢ 0 + q = q ∧ ↑↑r = r
tactic: rw [Int.add_comm, add_mul_ediv_right _ _ (natCast_eq_zero.not.2 (NeZero.ne n)),
      ediv_eq_zero_of_lt h1 h2, natMod, add_mul_emod_self, emod_eq_of_lt h1 h2, toNat_natCast]
state_before: m n✝ n : ℕ
inst✝ : NeZero n
x✝ : ℤ × Fin n
q : ℤ
r : ℕ
hrn : r < n
h1 : 0 ≤ ↑r
h2 : ↑r < ↑n
⊢ 0 + q = q ∧ ↑↑r = r
state_after: no goals
tactic: exact ⟨q.zero_add, Fin.val_cast_of_lt hrn⟩
Theorem: CategoryTheory.ShortComplex.moduleCatMkOfKerLERange_X₁
File: Mathlib/Algebra/Homology/ShortComplex/ModuleCat.lean

Proof steps:
state_before: R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
X₁ X₂ X₃ : ModuleCat R
f : X₁ ⟶ X₂
g : X₂ ⟶ X₃
hfg : LinearMap.range f ≤ LinearMap.ker g
⊢ f ≫ g = 0
state_after: case h
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
X₁ X₂ X₃ : ModuleCat R
f : X₁ ⟶ X₂
g : X₂ ⟶ X₃
hfg : LinearMap.range f ≤ LinearMap.ker g
x✝ : ↑X₁
⊢ (f ≫ g) x✝ = 0 x✝
tactic: ext
state_before: case h
R : Type u
inst✝ : Ring R
S : ShortComplex (ModuleCat R)
X₁ X₂ X₃ : ModuleCat R
f : X₁ ⟶ X₂
g : X₂ ⟶ X₃
hfg : LinearMap.range f ≤ LinearMap.ker g
x✝ : ↑X₁
⊢ (f ≫ g) x✝ = 0 x✝
state_after: no goals
tactic: exact hfg ⟨_, rfl⟩
Theorem: ArithmeticFunction.sigma_one_apply
File: Mathlib/NumberTheory/ArithmeticFunction.lean

Proof steps:
state_before: R : Type u_1
n : ℕ
⊢ (σ 1) n = ∑ d ∈ n.divisors, d
state_after: no goals
tactic: simp [sigma_apply]
Theorem: Filter.HasBasis.nhds_of_zero
File: Mathlib/Topology/Algebra/Group/Basic.lean

Proof steps:
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
ι : Sort u_1
p : ι → Prop
s : ι → Set G
hb : (𝓝 1).HasBasis p s
x : G
⊢ (𝓝 x).HasBasis p fun i => {y | y / x ∈ s i}
state_after: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
ι : Sort u_1
p : ι → Prop
s : ι → Set G
hb : (𝓝 1).HasBasis p s
x : G
⊢ (Filter.comap (fun x_1 => x_1 * x⁻¹) (𝓝 1)).HasBasis p fun i => {y | y / x ∈ s i}
tactic: rw [← nhds_translation_mul_inv]
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
ι : Sort u_1
p : ι → Prop
s : ι → Set G
hb : (𝓝 1).HasBasis p s
x : G
⊢ (Filter.comap (fun x_1 => x_1 * x⁻¹) (𝓝 1)).HasBasis p fun i => {y | y / x ∈ s i}
state_after: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
ι : Sort u_1
p : ι → Prop
s : ι → Set G
hb : (𝓝 1).HasBasis p s
x : G
⊢ (Filter.comap (fun x_1 => x_1 * x⁻¹) (𝓝 1)).HasBasis p fun i => {y | y * x⁻¹ ∈ s i}
tactic: simp_rw [div_eq_mul_inv]
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
ι : Sort u_1
p : ι → Prop
s : ι → Set G
hb : (𝓝 1).HasBasis p s
x : G
⊢ (Filter.comap (fun x_1 => x_1 * x⁻¹) (𝓝 1)).HasBasis p fun i => {y | y * x⁻¹ ∈ s i}
state_after: no goals
tactic: exact hb.comap _
Theorem: MeasureTheory.SimpleFunc.tendsto_approxOn_range_Lp_eLpNorm
File: Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace E
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
q : ℝ
p : ℝ≥0∞
inst✝¹ : BorelSpace E
f : β → E
hp_ne_top : p ≠ ⊤
μ : Measure β
fmeas : Measurable f
inst✝ : SeparableSpace ↑(Set.range f ∪ {0})
hf : eLpNorm f p μ < ⊤
n : ℕ
⊢ 0 ∈ Set.range f ∪ {0}
state_after: no goals
tactic: simp
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace E
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
q : ℝ
p : ℝ≥0∞
inst✝¹ : BorelSpace E
f : β → E
hp_ne_top : p ≠ ⊤
μ : Measure β
fmeas : Measurable f
inst✝ : SeparableSpace ↑(Set.range f ∪ {0})
hf : eLpNorm f p μ < ⊤
⊢ Tendsto (fun n => eLpNorm (↑(approxOn f fmeas (Set.range f ∪ {0}) 0 ⋯ n) - f) p μ) atTop (𝓝 0)
state_after: case refine_1
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace E
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
q : ℝ
p : ℝ≥0∞
inst✝¹ : BorelSpace E
f : β → E
hp_ne_top : p ≠ ⊤
μ : Measure β
fmeas : Measurable f
inst✝ : SeparableSpace ↑(Set.range f ∪ {0})
hf : eLpNorm f p μ < ⊤
⊢ ∀ᵐ (x : β) ∂μ, f x ∈ closure (Set.range f ∪ {0})

case refine_2
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝⁵ : MeasurableSpace β
inst✝⁴ : MeasurableSpace E
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
q : ℝ
p : ℝ≥0∞
inst✝¹ : BorelSpace E
f : β → E
hp_ne_top : p ≠ ⊤
μ : Measure β
fmeas : Measurable f
inst✝ : SeparableSpace ↑(Set.range f ∪ {0})
hf : eLpNorm f p μ < ⊤
⊢ eLpNorm (fun x => f x - 0) p μ < ⊤
tactic: refine tendsto_approxOn_Lp_eLpNorm fmeas _ hp_ne_top ?_ ?_
Theorem: MeasureTheory.integrable_finset_sum_measure
File: Mathlib/MeasureTheory/Function/L1Space.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m✝ : MeasurableSpace α
μ✝ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
ι : Type u_5
m : MeasurableSpace α
f : α → β
μ : ι → Measure α
s : Finset ι
⊢ Integrable f (∑ i ∈ s, μ i) ↔ ∀ i ∈ s, Integrable f (μ i)
state_after: no goals
tactic: induction s using Finset.induction_on <;> simp [*]
Theorem: WeierstrassCurve.coeff_ΨSq
File: Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Degree.lean

Proof steps:
state_before: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
n : ℤ
⊢ (W.ΨSq n).coeff (n.natAbs ^ 2 - 1) = ↑n ^ 2
state_after: no goals
tactic: induction n using Int.negInduction with
  | nat n => exact_mod_cast (W.natDegree_coeff_ΨSq_ofNat n).right
  | neg => rwa [ΨSq_neg, Int.natAbs_neg, ← Int.cast_pow, neg_sq, Int.cast_pow]
Theorem: Real.tendsto_pow_mul_exp_neg_atTop_nhds_zero
File: Mathlib/Analysis/SpecialFunctions/Exp.lean

Proof steps:
state_before: α : Type u_1
x✝ y z : ℝ
l : Filter α
n : ℕ
x : ℝ
⊢ ((fun r => r⁻¹) ∘ fun x => rexp x / x ^ n) x = x ^ n * rexp (-x)
state_after: no goals
tactic: rw [comp_apply, inv_eq_one_div, div_div_eq_mul_div, one_mul, div_eq_mul_inv, exp_neg]
Theorem: List.sum_le_sum
File: Mathlib/Algebra/Order/BigOperators/Group/List.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
M₀ : Type u_6
G : Type u_7
R : Type u_8
inst✝³ : Monoid M
inst✝² : Preorder M
inst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
l : List ι
f g : ι → M
h : ∀ i ∈ l, f i ≤ g i
⊢ Forall₂ (fun x x_1 => x ≤ x_1) (map f l) (map g l)
state_after: no goals
tactic: simpa
Theorem: CategoryTheory.Limits.Sigma.map_comp_map
File: Mathlib/CategoryTheory/Limits/Shapes/Products.lean

Proof steps:
state_before: β : Type w
α : Type w₂
γ : Type w₃
C : Type u
inst✝³ : Category.{v, u} C
f g h : α → C
inst✝² : HasCoproduct f
inst✝¹ : HasCoproduct g
inst✝ : HasCoproduct h
q : (a : α) → f a ⟶ g a
q' : (a : α) → g a ⟶ h a
⊢ map q ≫ map q' = map fun a => q a ≫ q' a
state_after: case h
β : Type w
α : Type w₂
γ : Type w₃
C : Type u
inst✝³ : Category.{v, u} C
f g h : α → C
inst✝² : HasCoproduct f
inst✝¹ : HasCoproduct g
inst✝ : HasCoproduct h
q : (a : α) → f a ⟶ g a
q' : (a : α) → g a ⟶ h a
b✝ : α
⊢ ι f b✝ ≫ map q ≫ map q' = ι f b✝ ≫ map fun a => q a ≫ q' a
tactic: ext
state_before: case h
β : Type w
α : Type w₂
γ : Type w₃
C : Type u
inst✝³ : Category.{v, u} C
f g h : α → C
inst✝² : HasCoproduct f
inst✝¹ : HasCoproduct g
inst✝ : HasCoproduct h
q : (a : α) → f a ⟶ g a
q' : (a : α) → g a ⟶ h a
b✝ : α
⊢ ι f b✝ ≫ map q ≫ map q' = ι f b✝ ≫ map fun a => q a ≫ q' a
state_after: no goals
tactic: simp
Theorem: NNRat.cast_pow
File: Mathlib/Data/Rat/Cast/Lemmas.lean

Proof steps:
state_before: K : Type u_1
inst✝ : DivisionSemiring K
q : ℚ≥0
n : ℕ
⊢ ↑(q ^ n) = ↑q ^ n
state_after: no goals
tactic: rw [cast_def, cast_def, den_pow, num_pow, Nat.cast_pow, Nat.cast_pow, div_eq_mul_inv, ← inv_pow,
    ← (Nat.cast_commute _ _).mul_pow, ← div_eq_mul_inv]
Theorem: IsCompact.mul_closedBall_one
File: Mathlib/Analysis/Normed/Group/Pointwise.lean

Proof steps:
state_before: E : Type u_1
inst✝ : SeminormedCommGroup E
ε δ : ℝ
s t : Set E
x y : E
hs : IsCompact s
hδ : 0 ≤ δ
⊢ s * closedBall 1 δ = cthickening δ s
state_after: E : Type u_1
inst✝ : SeminormedCommGroup E
ε δ : ℝ
s t : Set E
x y : E
hs : IsCompact s
hδ : 0 ≤ δ
⊢ s * closedBall 1 δ = ⋃ x ∈ s, closedBall x δ
tactic: rw [hs.cthickening_eq_biUnion_closedBall hδ]
state_before: E : Type u_1
inst✝ : SeminormedCommGroup E
ε δ : ℝ
s t : Set E
x y : E
hs : IsCompact s
hδ : 0 ≤ δ
⊢ s * closedBall 1 δ = ⋃ x ∈ s, closedBall x δ
state_after: case h
E : Type u_1
inst✝ : SeminormedCommGroup E
ε δ : ℝ
s t : Set E
x✝ y : E
hs : IsCompact s
hδ : 0 ≤ δ
x : E
⊢ x ∈ s * closedBall 1 δ ↔ x ∈ ⋃ x ∈ s, closedBall x δ
tactic: ext x
state_before: case h
E : Type u_1
inst✝ : SeminormedCommGroup E
ε δ : ℝ
s t : Set E
x✝ y : E
hs : IsCompact s
hδ : 0 ≤ δ
x : E
⊢ x ∈ s * closedBall 1 δ ↔ x ∈ ⋃ x ∈ s, closedBall x δ
state_after: no goals
tactic: simp only [mem_mul, dist_eq_norm_div, exists_prop, mem_iUnion, mem_closedBall, exists_and_left,
    mem_closedBall_one_iff, ← eq_div_iff_mul_eq'', div_one, exists_eq_right]
Theorem: Rat.cast_intCast
File: Mathlib/Data/Rat/Cast/Defs.lean

Proof steps:
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝ : DivisionRing α
p q : ℚ
n : ℤ
⊢ ↑n / ↑1 = ↑n
state_after: no goals
tactic: rw [Nat.cast_one, div_one]
Theorem: MeasureTheory.OuterMeasure.exists_measurable_superset_eq_trim
File: Mathlib/MeasureTheory/OuterMeasure/Induced.lean

Proof steps:
state_before: α : Type u_1
inst✝ : MeasurableSpace α
m✝ m : OuterMeasure α
s : Set α
⊢ ∃ t, s ⊆ t ∧ MeasurableSet t ∧ m t = m.trim s
state_after: α : Type u_1
inst✝ : MeasurableSpace α
m✝ m : OuterMeasure α
s : Set α
⊢ ∃ t, s ⊆ t ∧ MeasurableSet t ∧ m t = ⨅ t, ⨅ (_ : s ⊆ t), ⨅ (_ : MeasurableSet t), m t
tactic: simp only [trim_eq_iInf]
state_before: α : Type u_1
inst✝ : MeasurableSpace α
m✝ m : OuterMeasure α
s : Set α
⊢ ∃ t, s ⊆ t ∧ MeasurableSet t ∧ m t = ⨅ t, ⨅ (_ : s ⊆ t), ⨅ (_ : MeasurableSet t), m t
state_after: α : Type u_1
inst✝ : MeasurableSpace α
m✝ m : OuterMeasure α
s : Set α
ms : ℝ≥0∞ := ⨅ t, ⨅ (_ : s ⊆ t), ⨅ (_ : MeasurableSet t), m t
⊢ ∃ t, s ⊆ t ∧ MeasurableSet t ∧ m t = ms
tactic: set ms := ⨅ (t : Set α) (_ : s ⊆ t) (_ : MeasurableSet t), m t
state_before: α : Type u_1
inst✝ : MeasurableSpace α
m✝ m : OuterMeasure α
s : Set α
ms : ℝ≥0∞ := ⨅ t, ⨅ (_ : s ⊆ t), ⨅ (_ : MeasurableSet t), m t
⊢ ∃ t, s ⊆ t ∧ MeasurableSet t ∧ m t = ms
state_after: case pos
α : Type u_1
inst✝ : MeasurableSpace α
m✝ m : OuterMeasure α
s : Set α
ms : ℝ≥0∞ := ⨅ t, ⨅ (_ : s ⊆ t), ⨅ (_ : MeasurableSet t), m t
hs : ms = ⊤
⊢ ∃ t, s ⊆ t ∧ MeasurableSet t ∧ m t = ms

case neg
α : Type u_1
inst✝ : MeasurableSpace α
m✝ m : OuterMeasure α
s : Set α
ms : ℝ≥0∞ := ⨅ t, ⨅ (_ : s ⊆ t), ⨅ (_ : MeasurableSet t), m t
hs : ¬ms = ⊤
⊢ ∃ t, s ⊆ t ∧ MeasurableSet t ∧ m t = ms
tactic: by_cases hs : ms = ∞
Theorem: LaurentPolynomial.trunc_C_mul_T
File: Mathlib/Algebra/Polynomial/Laurent.lean

Proof steps:
state_before: R : Type u_1
inst✝ : Semiring R
n : ℤ
r : R
⊢ trunc (C r * T n) = if 0 ≤ n then (monomial n.toNat) r else 0
state_after: case a
R : Type u_1
inst✝ : Semiring R
n : ℤ
r : R
⊢ (toFinsuppIso R) (trunc (C r * T n)) = (toFinsuppIso R) (if 0 ≤ n then (monomial n.toNat) r else 0)
tactic: apply (toFinsuppIso R).injective
state_before: case a
R : Type u_1
inst✝ : Semiring R
n : ℤ
r : R
⊢ (toFinsuppIso R) (trunc (C r * T n)) = (toFinsuppIso R) (if 0 ≤ n then (monomial n.toNat) r else 0)
state_after: case a
R : Type u_1
inst✝ : Semiring R
n : ℤ
r : R
⊢ (toFinsuppIso R) ((toFinsuppIso R).symm.toAddMonoidHom ((comapDomain.addMonoidHom ⋯) (Finsupp.single n r))) =
    (toFinsuppIso R) (if 0 ≤ n then (monomial n.toNat) r else 0)
tactic: rw [← single_eq_C_mul_T, trunc, AddMonoidHom.coe_comp, Function.comp_apply]
state_before: case a
R : Type u_1
inst✝ : Semiring R
n : ℤ
r : R
⊢ (toFinsuppIso R) ((toFinsuppIso R).symm.toAddMonoidHom ((comapDomain.addMonoidHom ⋯) (Finsupp.single n r))) =
    (toFinsuppIso R) (if 0 ≤ n then (monomial n.toNat) r else 0)
state_after: case a
R : Type u_1
inst✝ : Semiring R
n : ℤ
r : R
⊢ comapDomain Int.ofNat (Finsupp.single n r) ⋯ = (toFinsuppIso R) (if 0 ≤ n then (monomial n.toNat) r else 0)
tactic: erw [comapDomain.addMonoidHom_apply Int.ofNat_injective]
state_before: case a
R : Type u_1
inst✝ : Semiring R
n : ℤ
r : R
⊢ comapDomain Int.ofNat (Finsupp.single n r) ⋯ = (toFinsuppIso R) (if 0 ≤ n then (monomial n.toNat) r else 0)
state_after: case a
R : Type u_1
inst✝ : Semiring R
n : ℤ
r : R
⊢ comapDomain Int.ofNat (Finsupp.single n r) ⋯ = (if 0 ≤ n then (monomial n.toNat) r else 0).toFinsupp
tactic: rw [toFinsuppIso_apply]
state_before: case a
R : Type u_1
inst✝ : Semiring R
n : ℤ
r : R
⊢ comapDomain Int.ofNat (Finsupp.single n r) ⋯ = (if 0 ≤ n then (monomial n.toNat) r else 0).toFinsupp
state_after: case pos
R : Type u_1
inst✝ : Semiring R
n : ℤ
r : R
n0 : 0 ≤ n
⊢ comapDomain Int.ofNat (Finsupp.single n r) ⋯ = (if 0 ≤ n then (monomial n.toNat) r else 0).toFinsupp

case neg
R : Type u_1
inst✝ : Semiring R
n : ℤ
r : R
n0 : ¬0 ≤ n
⊢ comapDomain Int.ofNat (Finsupp.single n r) ⋯ = (if 0 ≤ n then (monomial n.toNat) r else 0).toFinsupp
tactic: by_cases n0 : 0 ≤ n
Theorem: Finsupp.single_apply
File: Mathlib/Data/Finsupp/Defs.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝¹ : Zero M
a a' : α
b : M
inst✝ : Decidable (a = a')
⊢ (single a b) a' = if a = a' then b else 0
state_after: no goals
tactic: classical
  simp_rw [@eq_comm _ a a']
  convert Pi.single_apply a b a'
Theorem: Nat.factoredNumbers_insert
File: Mathlib/NumberTheory/SmoothNumbers.lean

Proof steps:
state_before: s : Finset ℕ
N : ℕ
hN : ¬Prime N
⊢ factoredNumbers (insert N s) = factoredNumbers s
state_after: case h
s : Finset ℕ
N : ℕ
hN : ¬Prime N
m : ℕ
⊢ m ∈ factoredNumbers (insert N s) ↔ m ∈ factoredNumbers s
tactic: ext m
state_before: case h
s : Finset ℕ
N : ℕ
hN : ¬Prime N
m : ℕ
⊢ m ∈ factoredNumbers (insert N s) ↔ m ∈ factoredNumbers s
state_after: case h
s : Finset ℕ
N : ℕ
hN : ¬Prime N
m : ℕ
hm : m ∈ factoredNumbers (insert N s)
p : ℕ
hp : p ∈ m.primeFactorsList
⊢ p ∈ s
tactic: refine ⟨fun hm ↦ ⟨hm.1, fun p hp ↦ ?_⟩,
          fun hm ↦ ⟨hm.1, fun p hp ↦ Finset.mem_insert_of_mem <| hm.2 p hp⟩⟩
state_before: case h
s : Finset ℕ
N : ℕ
hN : ¬Prime N
m : ℕ
hm : m ∈ factoredNumbers (insert N s)
p : ℕ
hp : p ∈ m.primeFactorsList
⊢ p ∈ s
state_after: no goals
tactic: exact Finset.mem_of_mem_insert_of_ne (hm.2 p hp)
    fun h ↦ hN <| h ▸ prime_of_mem_primeFactorsList hp
Theorem: UpperSet.coe_iInf₂
File: Mathlib/Order/UpperLower/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝ : LE α
S : Set (UpperSet α)
s t : UpperSet α
a : α
f : (i : ι) → κ i → UpperSet α
⊢ ↑(⨅ i, ⨅ j, f i j) = ⋃ i, ⋃ j, ↑(f i j)
state_after: no goals
tactic: simp_rw [coe_iInf]
Theorem: Metric.preimage_add_right_ball
File: Mathlib/Topology/MetricSpace/IsometricSMul.lean

Proof steps:
state_before: M : Type u
G : Type v
X : Type w
inst✝⁵ : PseudoMetricSpace X
inst✝⁴ : Group G
inst✝³ : MulAction G X
inst✝² : IsometricSMul G X
inst✝¹ : PseudoMetricSpace G
inst✝ : IsometricSMul Gᵐᵒᵖ G
a b : G
r : ℝ
⊢ (fun x => x * a) ⁻¹' ball b r = ball (b / a) r
state_after: M : Type u
G : Type v
X : Type w
inst✝⁵ : PseudoMetricSpace X
inst✝⁴ : Group G
inst✝³ : MulAction G X
inst✝² : IsometricSMul G X
inst✝¹ : PseudoMetricSpace G
inst✝ : IsometricSMul Gᵐᵒᵖ G
a b : G
r : ℝ
⊢ (fun x => x * a) ⁻¹' ball b r = ball (b * a⁻¹) r
tactic: rw [div_eq_mul_inv]
state_before: M : Type u
G : Type v
X : Type w
inst✝⁵ : PseudoMetricSpace X
inst✝⁴ : Group G
inst✝³ : MulAction G X
inst✝² : IsometricSMul G X
inst✝¹ : PseudoMetricSpace G
inst✝ : IsometricSMul Gᵐᵒᵖ G
a b : G
r : ℝ
⊢ (fun x => x * a) ⁻¹' ball b r = ball (b * a⁻¹) r
state_after: no goals
tactic: exact preimage_smul_ball (MulOpposite.op a) b r
Theorem: CategoryTheory.Bicategory.whiskerLeft_eqToHom
File: Mathlib/CategoryTheory/Bicategory/Strict.lean

Proof steps:
state_before: B : Type u
inst✝ : Bicategory B
a b c : B
f : a ⟶ b
g h : b ⟶ c
η : g = h
⊢ f ◁ eqToHom η = eqToHom ⋯
state_after: case refl
B : Type u
inst✝ : Bicategory B
a b c : B
f : a ⟶ b
g : b ⟶ c
⊢ f ◁ eqToHom ⋯ = eqToHom ⋯
tactic: cases η
state_before: case refl
B : Type u
inst✝ : Bicategory B
a b c : B
f : a ⟶ b
g : b ⟶ c
⊢ f ◁ eqToHom ⋯ = eqToHom ⋯
state_after: no goals
tactic: simp only [whiskerLeft_id, eqToHom_refl]
Theorem: Polynomial.eq_C_coeff_zero_iff_natDegree_eq_zero
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

Proof steps:
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
h : p = C (p.coeff 0)
⊢ p.natDegree = 0
state_after: no goals
tactic: rw [h, natDegree_C]
Theorem: Nat.div_eq_self
File: Mathlib/Data/Nat/Defs.lean

Proof steps:
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
⊢ m / n = m ↔ m = 0 ∨ n = 1
state_after: case mp
a b c d m n k : ℕ
p q : ℕ → Prop
⊢ m / n = m → m = 0 ∨ n = 1

case mpr
a b c d m n k : ℕ
p q : ℕ → Prop
⊢ m = 0 ∨ n = 1 → m / n = m
tactic: constructor
Theorem: List.sum_nonneg
File: Mathlib/Algebra/Order/BigOperators/Group/List.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
M₀ : Type u_6
G : Type u_7
R : Type u_8
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
l : List M
hl₁ : ∀ x ∈ l, 1 ≤ x
⊢ 1 ≤ l.prod
state_after: case nil
ι : Type u_1
α : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
M₀ : Type u_6
G : Type u_7
R : Type u_8
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
hl₁ : ∀ x ∈ [], 1 ≤ x
⊢ 1 ≤ [].prod

case cons
ι : Type u_1
α : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
M₀ : Type u_6
G : Type u_7
R : Type u_8
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
hd : M
tl : List M
ih : (∀ x ∈ tl, 1 ≤ x) → 1 ≤ tl.prod
hl₁ : ∀ x ∈ hd :: tl, 1 ≤ x
⊢ 1 ≤ (hd :: tl).prod
tactic: induction' l with hd tl ih
state_before: case cons
ι : Type u_1
α : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
M₀ : Type u_6
G : Type u_7
R : Type u_8
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
hd : M
tl : List M
ih : (∀ x ∈ tl, 1 ≤ x) → 1 ≤ tl.prod
hl₁ : ∀ x ∈ hd :: tl, 1 ≤ x
⊢ 1 ≤ (hd :: tl).prod
state_after: case cons
ι : Type u_1
α : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
M₀ : Type u_6
G : Type u_7
R : Type u_8
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
hd : M
tl : List M
ih : (∀ x ∈ tl, 1 ≤ x) → 1 ≤ tl.prod
hl₁ : ∀ x ∈ hd :: tl, 1 ≤ x
⊢ 1 ≤ hd * tl.prod
tactic: rw [prod_cons]
state_before: case cons
ι : Type u_1
α : Type u_2
M : Type u_3
N : Type u_4
P : Type u_5
M₀ : Type u_6
G : Type u_7
R : Type u_8
inst✝² : Monoid M
inst✝¹ : Preorder M
inst✝ : CovariantClass M M (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
hd : M
tl : List M
ih : (∀ x ∈ tl, 1 ≤ x) → 1 ≤ tl.prod
hl₁ : ∀ x ∈ hd :: tl, 1 ≤ x
⊢ 1 ≤ hd * tl.prod
state_after: no goals
tactic: exact one_le_mul (hl₁ hd (mem_cons_self hd tl)) (ih fun x h => hl₁ x (mem_cons_of_mem hd h))
Theorem: Complex.tan_eq_zero_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean

Proof steps:
state_before: θ : ℂ
⊢ tan θ = 0 ↔ ∃ k, ↑k * ↑π / 2 = θ
state_after: θ : ℂ
⊢ (∃ k, 2 * θ = ↑k * ↑π) ↔ ∃ k, ↑k * ↑π / 2 = θ
tactic: rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← mul_right_inj' two_ne_zero, mul_zero,
    ← mul_assoc, ← sin_two_mul, sin_eq_zero_iff]
state_before: θ : ℂ
⊢ (∃ k, 2 * θ = ↑k * ↑π) ↔ ∃ k, ↑k * ↑π / 2 = θ
state_after: no goals
tactic: field_simp [mul_comm, eq_comm]
Theorem: Computation.bind_promises
File: Mathlib/Data/Seq/Computation.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
s : Computation α
f : α → Computation β
a : α
b : β
h1 : s ~> a
h2 : f a ~> b
b' : β
bB : b' ∈ s.bind f
⊢ b = b'
state_after: case intro.intro
α : Type u
β : Type v
γ : Type w
s : Computation α
f : α → Computation β
a : α
b : β
h1 : s ~> a
h2 : f a ~> b
b' : β
bB : b' ∈ s.bind f
a' : α
a's : a' ∈ s
ba' : b' ∈ f a'
⊢ b = b'
tactic: rcases exists_of_mem_bind bB with ⟨a', a's, ba'⟩
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
s : Computation α
f : α → Computation β
a : α
b : β
h1 : s ~> a
h2 : f a ~> b
b' : β
bB : b' ∈ s.bind f
a' : α
a's : a' ∈ s
ba' : b' ∈ f a'
⊢ b = b'
state_after: case intro.intro
α : Type u
β : Type v
γ : Type w
s : Computation α
f : α → Computation β
a : α
b : β
h1 : s ~> a
h2 : f a ~> b
b' : β
bB : b' ∈ s.bind f
a' : α
a's : a' ∈ s
ba' : b' ∈ f a
⊢ b = b'
tactic: rw [← h1 a's] at ba'
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
s : Computation α
f : α → Computation β
a : α
b : β
h1 : s ~> a
h2 : f a ~> b
b' : β
bB : b' ∈ s.bind f
a' : α
a's : a' ∈ s
ba' : b' ∈ f a
⊢ b = b'
state_after: no goals
tactic: exact h2 ba'
Theorem: Complex.continuous_sinh
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

Proof steps:
state_before: ⊢ Continuous sinh
state_after: ⊢ Continuous fun z => (cexp z - cexp (-z)) / 2
tactic: change Continuous fun z => (exp z - exp (-z)) / 2
state_before: ⊢ Continuous fun z => (cexp z - cexp (-z)) / 2
state_after: no goals
tactic: continuity
Theorem: Set.star_mul
File: Mathlib/Algebra/Star/Pointwise.lean

Proof steps:
state_before: α : Type u_1
s✝ t✝ : Set α
a : α
inst✝¹ : Mul α
inst✝ : StarMul α
s t : Set α
⊢ (s * t)⋆ = t⋆ * s⋆
state_after: no goals
tactic: simp_rw [← image_star, ← image2_mul, image_image2, image2_image_left, image2_image_right,
   star_mul, image2_swap _ s t]
Theorem: Subtype.preimage_coe_self_inter
File: Mathlib/Data/Set/Image.lean

Proof steps:
state_before: α : Type u_1
s t : Set α
⊢ val ⁻¹' (s ∩ t) = val ⁻¹' t
state_after: no goals
tactic: rw [preimage_coe_eq_preimage_coe_iff, ← inter_assoc, inter_self]