tasksource/leandojo huggingface dataset:
Theorem: inv_mul_eq_one
File: Mathlib/Algebra/Group/Basic.lean

tactic: rw [mul_eq_one_iff_eq_inv, inv_inj]
state_before: α : Type ?u.55705
β : Type ?u.55708
G : Type u_1
inst✝ : Group G
a b c d : G
⊢ a⁻¹ * b = 1 ↔ a = b
Theorem: continuousOn_singleton
File: Mathlib/Topology/ContinuousOn.lean

tactic: simpa only [ContinuousWithinAt, nhdsWithin_singleton, tendsto_pure_left] using fun s =>
  mem_of_mem_nhds
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.318436
δ : Type ?u.318439
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → β
a : α
⊢ ContinuousWithinAt f {a} a
Theorem: Real.sin_sq_add_cos_sq
File: Mathlib/Data/Complex/Exponential.lean

tactic: simp [sin_sq_add_cos_sq]
state_before: x y : ℝ
⊢ ↑(sin x ^ 2 + cos x ^ 2) = ↑1
Theorem: star_mul_self_nonneg'
File: Mathlib/Algebra/Star/Order.lean

tactic: simpa only [star_star] using star_mul_self_nonneg (star r)
state_before: R : Type u
inst✝² : NonUnitalSemiring R
inst✝¹ : PartialOrder R
inst✝ : StarOrderedRing R
r : R
⊢ 0 ≤ r * star r
Theorem: Set.mem_inv_smul_set_iff
File: Mathlib/Data/Set/Pointwise/SMul.lean

tactic: simp only [← image_smul, mem_image, inv_smul_eq_iff, exists_eq_right]
state_before: F : Type ?u.107575
α : Type u_2
β : Type u_1
γ : Type ?u.107584
inst✝¹ : Group α
inst✝ : MulAction α β
s t A B : Set β
a : α
x : β
⊢ x ∈ a⁻¹ • A ↔ a • x ∈ A
Theorem: CategoryTheory.Limits.IsZero.of_epi_eq_zero
File: Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean

tactic: subst h
state_before: C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : Epi f
h : f = 0
⊢ IsZero Y

tactic: apply of_epi_zero X Y
state_before: C : Type u
inst✝³ : Category C
D : Type u'
inst✝² : Category D
inst✝¹ : HasZeroMorphisms C
X Y : C
inst✝ : Epi 0
⊢ IsZero Y
Theorem: Set.forall_range_iff
File: Mathlib/Data/Set/Image.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.62770
γ : Type ?u.62773
ι : Sort u_2
ι' : Sort ?u.62779
f : ι → α
s t : Set α
p : α → Prop
⊢ (∀ (a : α), a ∈ range f → p a) ↔ ∀ (i : ι), p (f i)
Theorem: bihimp_eq_bot
File: Mathlib/Order/SymmDiff.lean

tactic: rw [bihimp_eq', ← compl_sup, sup_eq_bot_iff, compl_eq_bot, isCompl_iff, disjoint_iff,
  codisjoint_iff]
state_before: ι : Type ?u.90223
α : Type u_1
β : Type ?u.90229
π : ι → Type ?u.90234
inst✝ : BooleanAlgebra α
a b c d : α
⊢ a ⇔ b = ⊥ ↔ IsCompl a b
Theorem: List.perm_mergeSort
File: Mathlib/Data/List/Sort.lean

tactic: simp [mergeSort]
state_before: α : Type uu
r : α → α → Prop
inst✝ : DecidableRel r
⊢ mergeSort r [] ~ []

tactic: simp [mergeSort]
state_before: α : Type uu
r : α → α → Prop
inst✝ : DecidableRel r
a : α
⊢ mergeSort r [a] ~ [a]

tactic: cases' e : split (a :: b :: l) with l₁ l₂
state_before: α : Type uu
r : α → α → Prop
inst✝ : DecidableRel r
a b : α
l : List α
⊢ mergeSort r (a :: b :: l) ~ a :: b :: l

tactic: cases' length_split_lt e with h₁ h₂
state_before: case mk
α : Type uu
r : α → α → Prop
inst✝ : DecidableRel r
a b : α
l l₁ l₂ : List α
e : split (a :: b :: l) = (l₁, l₂)
⊢ mergeSort r (a :: b :: l) ~ a :: b :: l

tactic: rw [mergeSort_cons_cons r e]
state_before: case mk.intro
α : Type uu
r : α → α → Prop
inst✝ : DecidableRel r
a b : α
l l₁ l₂ : List α
e : split (a :: b :: l) = (l₁, l₂)
h₁ : length l₁ < length (a :: b :: l)
h₂ : length l₂ < length (a :: b :: l)
⊢ mergeSort r (a :: b :: l) ~ a :: b :: l

tactic: apply (perm_merge r _ _).trans
state_before: case mk.intro
α : Type uu
r : α → α → Prop
inst✝ : DecidableRel r
a b : α
l l₁ l₂ : List α
e : split (a :: b :: l) = (l₁, l₂)
h₁ : length l₁ < length (a :: b :: l)
h₂ : length l₂ < length (a :: b :: l)
⊢ merge r (mergeSort r l₁) (mergeSort r l₂) ~ a :: b :: l

tactic: exact
  ((perm_mergeSort l₁).append (perm_mergeSort l₂)).trans (perm_split e).symm
state_before: case mk.intro
α : Type uu
r : α → α → Prop
inst✝ : DecidableRel r
a b : α
l l₁ l₂ : List α
e : split (a :: b :: l) = (l₁, l₂)
h₁ : length l₁ < length (a :: b :: l)
h₂ : length l₂ < length (a :: b :: l)
⊢ mergeSort r l₁ ++ mergeSort r l₂ ~ a :: b :: l
Theorem: Decidable.forall_or_right
File: Mathlib/Logic/Basic.lean

tactic: simp [or_comm, Decidable.forall_or_left]
state_before: ι : Sort ?u.22270
α : Sort ?u.22275
κ : ι → Sort ?u.22272
p✝ q✝ : α → Prop
q : Prop
p : α → Prop
inst✝ : Decidable q
⊢ (∀ (x : α), p x ∨ q) ↔ (∀ (x : α), p x) ∨ q
Theorem: Ordinal.CNF_of_lt
File: Mathlib/SetTheory/Ordinal/CantorNormalForm.lean

tactic: simp only [CNF_ne_zero ho, log_eq_zero hb, opow_zero, div_one, mod_one, CNF_zero]
state_before: b o : Ordinal
ho : o ≠ 0
hb : o < b
⊢ CNF b o = [(0, o)]
Theorem: Pell.pellZd_add
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: rw [← add_assoc, pellZd_succ, pellZd_succ, pellZd_add _ n, ← mul_assoc]
state_before: a : ℕ
a1 : 1 < a
m n : ℕ
⊢ pellZd a1 (m + (n + 1)) = pellZd a1 m * pellZd a1 (n + 1)
Theorem: div_mul_eq_div_mul_one_div
File: Mathlib/Algebra/Group/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.42444
G : Type ?u.42447
inst✝ : DivisionCommMonoid α
a b c d : α
⊢ a / (b * c) = a / b * (1 / c)
Theorem: Set.univ_eq_true_false
File: Mathlib/Data/Set/Basic.lean

tactic: rw [mem_insert_iff, mem_singleton_iff]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
x : Prop
⊢ x ∈ {True, False}

tactic: exact Classical.propComplete x
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
x : Prop
⊢ x = True ∨ x = False
Theorem: quotient_norm_mk_eq
File: Mathlib/Analysis/Normed/Group/Quotient.lean

tactic: rw [mk'_apply, norm_mk, sInf_image', ← infDist_image isometry_neg, image_neg,
  neg_coe_set (H := S), infDist_eq_iInf]
state_before: M : Type u_1
N : Type ?u.113147
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
m : M
⊢ ‖↑(mk' S) m‖ = sInf ((fun x => ‖m + x‖) '' ↑S)

tactic: simp only [dist_eq_norm', sub_neg_eq_add, add_comm]
state_before: M : Type u_1
N : Type ?u.113147
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
m : M
⊢ (⨅ (y : ↑↑S), dist (-m) ↑y) = ⨅ (a : ↑↑S), ‖m + ↑a‖
Theorem: MeasureTheory.Measure.restrict_apply'
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [Measure.restrict_toOuterMeasure_eq_toOuterMeasure_restrict hs,
  OuterMeasure.restrict_apply s t _]
state_before: α : Type u_1
β : Type ?u.283030
γ : Type ?u.283033
δ : Type ?u.283036
ι : Type ?u.283039
R : Type ?u.283042
R' : Type ?u.283045
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
hs : MeasurableSet s
⊢ ↑↑(restrict μ s) t = ↑↑μ (t ∩ s)
Theorem: lp.single_apply_ne
File: Mathlib/Analysis/NormedSpace/lpSpace.lean

tactic: rw [lp.single_apply, dif_neg hij]
state_before: α : Type u_1
E : α → Type u_2
p✝ q : ℝ≥0∞
inst✝⁴ : (i : α) → NormedAddCommGroup (E i)
𝕜 : Type ?u.862305
inst✝³ : NormedRing 𝕜
inst✝² : (i : α) → Module 𝕜 (E i)
inst✝¹ : ∀ (i : α), BoundedSMul 𝕜 (E i)
inst✝ : DecidableEq α
p : ℝ≥0∞
i : α
a : E i
j : α
hij : j ≠ i
⊢ ↑(lp.single p i a) j = 0
Theorem: dist_vadd_vadd_le
File: Mathlib/Analysis/Normed/Group/AddTorsor.lean

tactic: simpa [(dist_vadd_cancel_right)] using dist_triangle (v +ᵥ p) (v' +ᵥ p) (v' +ᵥ p')
state_before: α : Type ?u.18232
V : Type u_2
P : Type u_1
W : Type ?u.18241
Q : Type ?u.18244
inst✝⁵ : SeminormedAddCommGroup V
inst✝⁴ : PseudoMetricSpace P
inst✝³ : NormedAddTorsor V P
inst✝² : NormedAddCommGroup W
inst✝¹ : MetricSpace Q
inst✝ : NormedAddTorsor W Q
v v' : V
p p' : P
⊢ dist (v +ᵥ p) (v' +ᵥ p') ≤ dist v v' + dist p p'
Theorem: NormedField.continuousAt_zpow
File: Mathlib/Analysis/SpecificLimits/Normed.lean

tactic: refine' ⟨_, continuousAt_zpow₀ _ _⟩
state_before: α : Type ?u.63999
β : Type ?u.64002
ι : Type ?u.64005
𝕜 : Type u_1
inst✝ : NontriviallyNormedField 𝕜
m : ℤ
x : 𝕜
⊢ ContinuousAt (fun x => x ^ m) x ↔ x ≠ 0 ∨ 0 ≤ m

tactic: contrapose!
state_before: α : Type ?u.63999
β : Type ?u.64002
ι : Type ?u.64005
𝕜 : Type u_1
inst✝ : NontriviallyNormedField 𝕜
m : ℤ
x : 𝕜
⊢ ContinuousAt (fun x => x ^ m) x → x ≠ 0 ∨ 0 ≤ m

tactic: rintro ⟨rfl, hm⟩ hc
state_before: α : Type ?u.63999
β : Type ?u.64002
ι : Type ?u.64005
𝕜 : Type u_1
inst✝ : NontriviallyNormedField 𝕜
m : ℤ
x : 𝕜
⊢ x = 0 ∧ m < 0 → ¬ContinuousAt (fun x => x ^ m) x

tactic: exact not_tendsto_atTop_of_tendsto_nhds (hc.tendsto.mono_left nhdsWithin_le_nhds).norm
  (tendsto_norm_zpow_nhdsWithin_0_atTop hm)
state_before: case intro
α : Type ?u.63999
β : Type ?u.64002
ι : Type ?u.64005
𝕜 : Type u_1
inst✝ : NontriviallyNormedField 𝕜
m : ℤ
hm : m < 0
hc : ContinuousAt (fun x => x ^ m) 0
⊢ False
Theorem: pow_eq_zero_of_le
File: Mathlib/Algebra/GroupPower/Ring.lean

tactic: rw [← tsub_add_cancel_of_le hn, pow_add, hx, mul_zero]
state_before: R : Type ?u.11506
S : Type ?u.11509
M : Type u_1
inst✝ : MonoidWithZero M
x : M
n m : ℕ
hn : n ≤ m
hx : x ^ n = 0
⊢ x ^ m = 0
Theorem: DirectSum.decompose_of_mem_same
File: Mathlib/Algebra/DirectSum/Decomposition.lean

tactic: rw [decompose_of_mem _ hx, DirectSum.of_eq_same, Subtype.coe_mk]
state_before: ι : Type u_3
R : Type ?u.121042
M : Type u_1
σ : Type u_2
inst✝⁴ : DecidableEq ι
inst✝³ : AddCommMonoid M
inst✝² : SetLike σ M
inst✝¹ : AddSubmonoidClass σ M
ℳ : ι → σ
inst✝ : Decomposition ℳ
x : M
i : ι
hx : x ∈ ℳ i
⊢ ↑(↑(↑(decompose ℳ) x) i) = x
Theorem: AddMonoidAlgebra.mem_grade_iff
File: Mathlib/Algebra/MonoidAlgebra/Grading.lean

tactic: rw [← Finset.coe_subset, Finset.coe_singleton]
state_before: M : Type u_2
ι : Type ?u.6758
R : Type u_1
inst✝¹ : DecidableEq M
inst✝ : CommSemiring R
m : M
a : AddMonoidAlgebra R M
⊢ a ∈ grade R m ↔ a.support ⊆ {m}

tactic: rfl
state_before: M : Type u_2
ι : Type ?u.6758
R : Type u_1
inst✝¹ : DecidableEq M
inst✝ : CommSemiring R
m : M
a : AddMonoidAlgebra R M
⊢ a ∈ grade R m ↔ ↑a.support ⊆ {m}
Theorem: HasFPowerSeriesOnBall.congr
File: Mathlib/Analysis/Analytic/Basic.lean

tactic: convert hf.hasSum hy using 1
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type ?u.402679
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g : E → F
p pf pg : FormalMultilinearSeries 𝕜 E F
x : E
r r' : ℝ≥0∞
hf : HasFPowerSeriesOnBall f p x r
hg : EqOn f g (EMetric.ball x r)
y : E
hy : y ∈ EMetric.ball 0 r
⊢ HasSum (fun n => ↑(p n) fun x => y) (g (x + y))

tactic: apply hg.symm
state_before: case h.e'_6
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type ?u.402679
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g : E → F
p pf pg : FormalMultilinearSeries 𝕜 E F
x : E
r r' : ℝ≥0∞
hf : HasFPowerSeriesOnBall f p x r
hg : EqOn f g (EMetric.ball x r)
y : E
hy : y ∈ EMetric.ball 0 r
⊢ g (x + y) = f (x + y)

tactic: simpa [edist_eq_coe_nnnorm_sub] using hy
state_before: case h.e'_6.a
𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type ?u.402679
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g : E → F
p pf pg : FormalMultilinearSeries 𝕜 E F
x : E
r r' : ℝ≥0∞
hf : HasFPowerSeriesOnBall f p x r
hg : EqOn f g (EMetric.ball x r)
y : E
hy : y ∈ EMetric.ball 0 r
⊢ x + y ∈ EMetric.ball x r
Theorem: Vector.prod_set
File: Mathlib/Data/Vector/Basic.lean

tactic: refine' (List.prod_set v.toList i a).trans _
state_before: n : ℕ
α : Type u_1
β : Type ?u.60631
γ : Type ?u.60634
inst✝ : Monoid α
v : Vector α n
i : Fin n
a : α
⊢ List.prod (toList (set v i a)) = List.prod (toList (take (↑i) v)) * a * List.prod (toList (drop (↑i + 1) v))

tactic: simp_all
state_before: n : ℕ
α : Type u_1
β : Type ?u.60631
γ : Type ?u.60634
inst✝ : Monoid α
v : Vector α n
i : Fin n
a : α
⊢ (List.prod (List.take (↑i) (toList v)) * if ↑i < List.length (toList v) then a else 1) *
      List.prod (List.drop (↑i + 1) (toList v)) =
    List.prod (toList (take (↑i) v)) * a * List.prod (toList (drop (↑i + 1) v))
Theorem: Polynomial.natDegree_eq_zero_of_isUnit
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: nontriviality R
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
h : IsUnit p
⊢ natDegree p = 0

tactic: obtain ⟨q, hq⟩ := h.exists_right_inv
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
h : IsUnit p
✝ : Nontrivial R
⊢ natDegree p = 0

tactic: have := natDegree_mul (left_ne_zero_of_mul_eq_one hq) (right_ne_zero_of_mul_eq_one hq)
state_before: case intro
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q✝ : R[X]
h : IsUnit p
✝ : Nontrivial R
q : R[X]
hq : p * q = 1
⊢ natDegree p = 0

tactic: rw [hq, natDegree_one, eq_comm, add_eq_zero_iff] at this
state_before: case intro
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q✝ : R[X]
h : IsUnit p
✝ : Nontrivial R
q : R[X]
hq : p * q = 1
this : natDegree (p * q) = natDegree p + natDegree q
⊢ natDegree p = 0

tactic: exact this.1
state_before: case intro
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q✝ : R[X]
h : IsUnit p
✝ : Nontrivial R
q : R[X]
hq : p * q = 1
this : natDegree p = 0 ∧ natDegree q = 0
⊢ natDegree p = 0
Theorem: Int.natAbs_add_le
File: Std/Data/Int/Lemmas.lean

tactic: suffices ∀ a b : Nat, natAbs (subNatNat a b.succ) ≤ (a + b).succ by
  match a, b with
  | (a:Nat), (b:Nat) => simp
  | (a:Nat), -[b+1]  => simp; apply this
  | -[a+1],  (b:Nat) => simp [Nat.succ_add, Nat.add_comm a b]; apply this
  | -[a+1],  -[b+1]  => simp [Nat.succ_add]; apply Nat.le_refl
state_before: a b : Int
⊢ natAbs (a + b) ≤ natAbs a + natAbs b

tactic: refine fun a b => subNatNat_elim a b.succ
  (fun m n i => n = b.succ → natAbs i ≤ (m + b).succ) ?_
  (fun i n (e : (n + i).succ = _) => ?_) rfl
state_before: a b : Int
⊢ ∀ (a b : Nat), natAbs (subNatNat a (succ b)) ≤ succ (a + b)

tactic: match a, b with
| (a:Nat), (b:Nat) => simp
| (a:Nat), -[b+1]  => simp; apply this
| -[a+1],  (b:Nat) => simp [Nat.succ_add, Nat.add_comm a b]; apply this
| -[a+1],  -[b+1]  => simp [Nat.succ_add]; apply Nat.le_refl
state_before: a b : Int
this : ∀ (a b : Nat), natAbs (subNatNat a (succ b)) ≤ succ (a + b)
⊢ natAbs (a + b) ≤ natAbs a + natAbs b

tactic: simp
state_before: a✝ b✝ : Int
this : ∀ (a b : Nat), natAbs (subNatNat a (succ b)) ≤ succ (a + b)
a b : Nat
⊢ natAbs (↑a + ↑b) ≤ natAbs ↑a + natAbs ↑b

tactic: simp
state_before: a✝ b✝ : Int
this : ∀ (a b : Nat), natAbs (subNatNat a (succ b)) ≤ succ (a + b)
a b : Nat
⊢ natAbs (↑a + -[b+1]) ≤ natAbs ↑a + natAbs -[b+1]

tactic: apply this
state_before: a✝ b✝ : Int
this : ∀ (a b : Nat), natAbs (subNatNat a (succ b)) ≤ succ (a + b)
a b : Nat
⊢ natAbs (subNatNat a (succ b)) ≤ a + succ b

tactic: simp [Nat.succ_add, Nat.add_comm a b]
state_before: a✝ b✝ : Int
this : ∀ (a b : Nat), natAbs (subNatNat a (succ b)) ≤ succ (a + b)
a b : Nat
⊢ natAbs (-[a+1] + ↑b) ≤ natAbs -[a+1] + natAbs ↑b

tactic: apply this
state_before: a✝ b✝ : Int
this : ∀ (a b : Nat), natAbs (subNatNat a (succ b)) ≤ succ (a + b)
a b : Nat
⊢ natAbs (subNatNat b (succ a)) ≤ succ (b + a)

tactic: simp [Nat.succ_add]
state_before: a✝ b✝ : Int
this : ∀ (a b : Nat), natAbs (subNatNat a (succ b)) ≤ succ (a + b)
a b : Nat
⊢ natAbs (-[a+1] + -[b+1]) ≤ natAbs -[a+1] + natAbs -[b+1]

tactic: apply Nat.le_refl
state_before: a✝ b✝ : Int
this : ∀ (a b : Nat), natAbs (subNatNat a (succ b)) ≤ succ (a + b)
a b : Nat
⊢ succ (succ (a + b)) ≤ succ (a + succ b)

tactic: rintro i n rfl
state_before: case refine_1
a✝ b✝ : Int
a b : Nat
⊢ ∀ (i n : Nat), (fun m n i => n = succ b → natAbs i ≤ succ (m + b)) (n + i) n ↑i

tactic: rw [Nat.add_comm _ i, Nat.add_assoc]
state_before: case refine_1
a✝ b✝ : Int
a b i : Nat
⊢ natAbs ↑i ≤ succ (succ b + i + b)

tactic: exact Nat.le_add_right i (b.succ + b).succ
state_before: case refine_1
a✝ b✝ : Int
a b i : Nat
⊢ natAbs ↑i ≤ succ (i + (succ b + b))

tactic: apply succ_le_succ
state_before: case refine_2
a✝ b✝ : Int
a b i n : Nat
e : succ (n + i) = succ b
⊢ natAbs -[i+1] ≤ succ (n + b)

tactic: rw [← succ.inj e, ← Nat.add_assoc, Nat.add_comm]
state_before: case refine_2.a
a✝ b✝ : Int
a b i n : Nat
e : succ (n + i) = succ b
⊢ i ≤ n + b

tactic: apply Nat.le_add_right
state_before: case refine_2.a
a✝ b✝ : Int
a b i n : Nat
e : succ (n + i) = succ b
⊢ i ≤ i + (n + n)
Theorem: Multiset.prod_eq_prod_coe
File: Mathlib/Data/Multiset/Fintype.lean

tactic: congr
state_before: α : Type u_1
inst✝¹ : DecidableEq α
m✝ : Multiset α
inst✝ : CommMonoid α
m : Multiset α
⊢ prod m = ∏ x : ToType m, x.fst

tactic: erw [map_univ_coe]
state_before: case e_a
α : Type u_1
inst✝¹ : DecidableEq α
m✝ : Multiset α
inst✝ : CommMonoid α
m : Multiset α
⊢ m = map (fun x => x.fst) Finset.univ.val
Theorem: CategoryTheory.IsPullback.isoPullback_hom_snd
File: Mathlib/CategoryTheory/Limits/Shapes/CommSq.lean

tactic: dsimp [isoPullback, cone, CommSq.cone]
state_before: C : Type u₁
inst✝¹ : Category C
P X Y Z : C
fst : P ⟶ X
snd : P ⟶ Y
f : X ⟶ Z
g : Y ⟶ Z
h : IsPullback fst snd f g
inst✝ : HasPullback f g
⊢ (isoPullback h).hom ≫ pullback.snd = snd

tactic: simp
state_before: C : Type u₁
inst✝¹ : Category C
P X Y Z : C
fst : P ⟶ X
snd : P ⟶ Y
f : X ⟶ Z
g : Y ⟶ Z
h : IsPullback fst snd f g
inst✝ : HasPullback f g
⊢ (limit.isoLimitCone { cone := PullbackCone.mk fst snd (_ : fst ≫ f = snd ≫ g), isLimit := isLimit h }).inv ≫
      pullback.snd =
    snd
Theorem: MonoidHom.ext_mnat
File: Mathlib/Algebra/GroupPower/Lemmas.lean

tactic: rw [f.apply_mnat, g.apply_mnat, h]
state_before: α : Type ?u.345545
M : Type u
N : Type v
G : Type w
H : Type x
A : Type y
B : Type z
R : Type u₁
S : Type u₂
inst✝ : Monoid M
f g : Multiplicative ℕ →* M
h : ↑f (↑Multiplicative.ofAdd 1) = ↑g (↑Multiplicative.ofAdd 1)
n : Multiplicative ℕ
⊢ ↑f n = ↑g n
Theorem: Behrend.log_two_mul_two_le_sqrt_log_eight
File: Mathlib/Combinatorics/Additive/Behrend.lean

tactic: have : (8 : ℝ) = 2 ^ ((3 : ℕ) : ℝ) := by rw [rpow_nat_cast]; norm_num
state_before: α : Type ?u.611385
β : Type ?u.611388
n d k N : ℕ
x : Fin n → ℕ
⊢ log 2 * 2 ≤ Real.sqrt (log 8)

tactic: rw [this, log_rpow zero_lt_two (3 : ℕ)]
state_before: α : Type ?u.611385
β : Type ?u.611388
n d k N : ℕ
x : Fin n → ℕ
this : 8 = 2 ^ ↑3
⊢ log 2 * 2 ≤ Real.sqrt (log 8)

tactic: apply le_sqrt_of_sq_le
state_before: α : Type ?u.611385
β : Type ?u.611388
n d k N : ℕ
x : Fin n → ℕ
this : 8 = 2 ^ ↑3
⊢ log 2 * 2 ≤ Real.sqrt (↑3 * log 2)

tactic: rw [mul_pow, sq (log 2), mul_assoc, mul_comm]
state_before: case h
α : Type ?u.611385
β : Type ?u.611388
n d k N : ℕ
x : Fin n → ℕ
this : 8 = 2 ^ ↑3
⊢ (log 2 * 2) ^ 2 ≤ ↑3 * log 2

tactic: refine' mul_le_mul_of_nonneg_right _ (log_nonneg one_le_two)
state_before: case h
α : Type ?u.611385
β : Type ?u.611388
n d k N : ℕ
x : Fin n → ℕ
this : 8 = 2 ^ ↑3
⊢ log 2 * 2 ^ 2 * log 2 ≤ ↑3 * log 2

tactic: rw [← le_div_iff]
state_before: case h
α : Type ?u.611385
β : Type ?u.611388
n d k N : ℕ
x : Fin n → ℕ
this : 8 = 2 ^ ↑3
⊢ log 2 * 2 ^ 2 ≤ ↑3

tactic: apply log_two_lt_d9.le.trans
state_before: case h
α : Type ?u.611385
β : Type ?u.611388
n d k N : ℕ
x : Fin n → ℕ
this : 8 = 2 ^ ↑3
⊢ log 2 ≤ ↑3 / 2 ^ 2

case h
α : Type ?u.611385
β : Type ?u.611388
n d k N : ℕ
x : Fin n → ℕ
this : 8 = 2 ^ ↑3
⊢ 0 < 2 ^ 2

tactic: all_goals norm_num1
state_before: case h
α : Type ?u.611385
β : Type ?u.611388
n d k N : ℕ
x : Fin n → ℕ
this : 8 = 2 ^ ↑3
⊢ 0.6931471808 ≤ ↑3 / 2 ^ 2

case h
α : Type ?u.611385
β : Type ?u.611388
n d k N : ℕ
x : Fin n → ℕ
this : 8 = 2 ^ ↑3
⊢ 0 < 2 ^ 2

tactic: rw [rpow_nat_cast]
state_before: α : Type ?u.611385
β : Type ?u.611388
n d k N : ℕ
x : Fin n → ℕ
⊢ 8 = 2 ^ ↑3

tactic: norm_num
state_before: α : Type ?u.611385
β : Type ?u.611388
n d k N : ℕ
x : Fin n → ℕ
⊢ 8 = 2 ^ 3

tactic: norm_num1
state_before: case h
α : Type ?u.611385
β : Type ?u.611388
n d k N : ℕ
x : Fin n → ℕ
this : 8 = 2 ^ ↑3
⊢ 0 < 2 ^ 2
Theorem: Pi.apply_mulSingle₂
File: Mathlib/Data/Pi/Algebra.lean

tactic: by_cases h : j = i
state_before: I : Type u
α : Type ?u.15668
β : Type ?u.15671
γ : Type ?u.15674
f : I → Type v₁
g : I → Type v₂
h : I → Type v₃
x✝ y✝ : (i : I) → f i
i✝ : I
inst✝³ : DecidableEq I
inst✝² : (i : I) → One (f i)
inst✝¹ : (i : I) → One (g i)
inst✝ : (i : I) → One (h i)
f' : (i : I) → f i → g i → h i
hf' : ∀ (i : I), f' i 1 1 = 1
i : I
x : f i
y : g i
j : I
⊢ f' j (mulSingle i x j) (mulSingle i y j) = mulSingle i (f' i x y) j

tactic: subst h
state_before: case pos
I : Type u
α : Type ?u.15668
β : Type ?u.15671
γ : Type ?u.15674
f : I → Type v₁
g : I → Type v₂
h✝ : I → Type v₃
x✝ y✝ : (i : I) → f i
i✝ : I
inst✝³ : DecidableEq I
inst✝² : (i : I) → One (f i)
inst✝¹ : (i : I) → One (g i)
inst✝ : (i : I) → One (h✝ i)
f' : (i : I) → f i → g i → h✝ i
hf' : ∀ (i : I), f' i 1 1 = 1
i : I
x : f i
y : g i
j : I
h : j = i
⊢ f' j (mulSingle i x j) (mulSingle i y j) = mulSingle i (f' i x y) j

tactic: simp only [mulSingle_eq_same]
state_before: case pos
I : Type u
α : Type ?u.15668
β : Type ?u.15671
γ : Type ?u.15674
f : I → Type v₁
g : I → Type v₂
h : I → Type v₃
x✝ y✝ : (i : I) → f i
i : I
inst✝³ : DecidableEq I
inst✝² : (i : I) → One (f i)
inst✝¹ : (i : I) → One (g i)
inst✝ : (i : I) → One (h i)
f' : (i : I) → f i → g i → h i
hf' : ∀ (i : I), f' i 1 1 = 1
j : I
x : f j
y : g j
⊢ f' j (mulSingle j x j) (mulSingle j y j) = mulSingle j (f' j x y) j

tactic: simp only [mulSingle_eq_of_ne h, hf']
state_before: case neg
I : Type u
α : Type ?u.15668
β : Type ?u.15671
γ : Type ?u.15674
f : I → Type v₁
g : I → Type v₂
h✝ : I → Type v₃
x✝ y✝ : (i : I) → f i
i✝ : I
inst✝³ : DecidableEq I
inst✝² : (i : I) → One (f i)
inst✝¹ : (i : I) → One (g i)
inst✝ : (i : I) → One (h✝ i)
f' : (i : I) → f i → g i → h✝ i
hf' : ∀ (i : I), f' i 1 1 = 1
i : I
x : f i
y : g i
j : I
h : ¬j = i
⊢ f' j (mulSingle i x j) (mulSingle i y j) = mulSingle i (f' i x y) j
Theorem: Multiset.toFinset_nsmul
File: Mathlib/Data/Finset/Basic.lean

tactic: contradiction
state_before: α : Type u_1
β : Type ?u.448176
γ : Type ?u.448179
inst✝ : DecidableEq α
s✝ t s : Multiset α
h : 0 ≠ 0
⊢ toFinset (0 • s) = toFinset s

tactic: by_cases h : n = 0
state_before: α : Type u_1
β : Type ?u.448176
γ : Type ?u.448179
inst✝ : DecidableEq α
s✝ t s : Multiset α
n : ℕ
x✝ : n + 1 ≠ 0
⊢ toFinset ((n + 1) • s) = toFinset s

tactic: rw [h, zero_add, one_nsmul]
state_before: case pos
α : Type u_1
β : Type ?u.448176
γ : Type ?u.448179
inst✝ : DecidableEq α
s✝ t s : Multiset α
n : ℕ
x✝ : n + 1 ≠ 0
h : n = 0
⊢ toFinset ((n + 1) • s) = toFinset s

tactic: rw [add_nsmul, toFinset_add, one_nsmul, toFinset_nsmul s n h, Finset.union_idempotent]
state_before: case neg
α : Type u_1
β : Type ?u.448176
γ : Type ?u.448179
inst✝ : DecidableEq α
s✝ t s : Multiset α
n : ℕ
x✝ : n + 1 ≠ 0
h : ¬n = 0
⊢ toFinset ((n + 1) • s) = toFinset s
Theorem: HasSum.pos_add_zero_add_neg
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

tactic: intro g hg
state_before: α : Type u_1
β : Type ?u.482840
γ : Type ?u.482843
δ : Type ?u.482846
inst✝² : AddCommGroup α
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalAddGroup α
f✝ g : β → α
a a₁ a₂ b : α
f : ℤ → α
hpos : HasSum (fun n => f (↑n + 1)) a
hneg : HasSum (fun n => f (-↑(Nat.succ n))) b
⊢ ∀ (g : ℕ → α), HasSum (fun k => g (k + 1)) a → HasSum g (a + g 0)

tactic: simpa using (hasSum_nat_add_iff _).mp hg
state_before: α : Type u_1
β : Type ?u.482840
γ : Type ?u.482843
δ : Type ?u.482846
inst✝² : AddCommGroup α
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalAddGroup α
f✝ g✝ : β → α
a a₁ a₂ b : α
f : ℤ → α
hpos : HasSum (fun n => f (↑n + 1)) a
hneg : HasSum (fun n => f (-↑(Nat.succ n))) b
g : ℕ → α
hg : HasSum (fun k => g (k + 1)) a
⊢ HasSum g (a + g 0)