1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Real.tendsto_log_comp_add_sub_log
File: Mathlib/Analysis/SpecialFunctions/Log/Basic.lean

tactic: have : Tendsto (fun x ↦ 1 + y / x) atTop (𝓝 (1 + 0)) :=
  tendsto_const_nhds.add (tendsto_const_nhds.div_atTop tendsto_id)
state_before: y : ℝ
⊢ Tendsto (fun x => log (x + y) - log x) atTop (𝓝 0)
state_after: y : ℝ
this : Tendsto (fun x => 1 + y / x) atTop (𝓝 (1 + 0))
⊢ Tendsto (fun x => log (x + y) - log x) atTop (𝓝 0)

tactic: rw [← comap_exp_nhds_exp, exp_zero, tendsto_comap_iff, ← add_zero (1 : ℝ)]
state_before: y : ℝ
this : Tendsto (fun x => 1 + y / x) atTop (𝓝 (1 + 0))
⊢ Tendsto (fun x => log (x + y) - log x) atTop (𝓝 0)
state_after: y : ℝ
this : Tendsto (fun x => 1 + y / x) atTop (𝓝 (1 + 0))
⊢ Tendsto (rexp ∘ fun x => log (x + y) - log x) atTop (𝓝 (1 + 0))

tactic: refine this.congr' ?_
state_before: y : ℝ
this : Tendsto (fun x => 1 + y / x) atTop (𝓝 (1 + 0))
⊢ Tendsto (rexp ∘ fun x => log (x + y) - log x) atTop (𝓝 (1 + 0))
state_after: y : ℝ
this : Tendsto (fun x => 1 + y / x) atTop (𝓝 (1 + 0))
⊢ (fun x => 1 + y / x) =ᶠ[atTop] rexp ∘ fun x => log (x + y) - log x

tactic: filter_upwards [eventually_gt_atTop (0 : ℝ), eventually_gt_atTop (-y)] with x hx₀ hxy
state_before: y : ℝ
this : Tendsto (fun x => 1 + y / x) atTop (𝓝 (1 + 0))
⊢ (fun x => 1 + y / x) =ᶠ[atTop] rexp ∘ fun x => log (x + y) - log x
state_after: case h
y : ℝ
this : Tendsto (fun x => 1 + y / x) atTop (𝓝 (1 + 0))
x : ℝ
hx₀ : 0 < x
hxy : -y < x
⊢ 1 + y / x = (rexp ∘ fun x => log (x + y) - log x) x

tactic: rw [comp_apply, exp_sub, exp_log, exp_log, one_add_div] <;> linarith
state_before: case h
y : ℝ
this : Tendsto (fun x => 1 + y / x) atTop (𝓝 (1 + 0))
x : ℝ
hx₀ : 0 < x
hxy : -y < x
⊢ 1 + y / x = (rexp ∘ fun x => log (x + y) - log x) x
state_after: no goals
Theorem: Submodule.fg_bot
File: Mathlib/RingTheory/Finiteness.lean

tactic: rw [Finset.coe_empty, span_empty]
state_before: R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
⊢ span R ↑∅ = ⊥
state_after: no goals
Theorem: Set.subset_image_compl
File: Mathlib/Data/Set/Image.lean

tactic: rw [← image_union]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : α → β
s✝ t : Set α
f : α → β
s : Set α
H : Surjective f
⊢ f '' s ∪ f '' sᶜ = univ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : α → β
s✝ t : Set α
f : α → β
s : Set α
H : Surjective f
⊢ f '' (s ∪ sᶜ) = univ

tactic: simp [image_univ_of_surjective H]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : α → β
s✝ t : Set α
f : α → β
s : Set α
H : Surjective f
⊢ f '' (s ∪ sᶜ) = univ
state_after: no goals
Theorem: Subgroup.card_dvd_of_surjective
File: Mathlib/GroupTheory/Index.lean

tactic: simp only [← Nat.card_eq_fintype_card, nat_card_dvd_of_surjective f hf]
state_before: G✝ : Type u_1
inst✝⁴ : Group G✝
H✝ K L : Subgroup G✝
G : Type u_2
H : Type u_3
inst✝³ : Group G
inst✝² : Group H
inst✝¹ : Fintype G
inst✝ : Fintype H
f : G →* H
hf : Function.Surjective ⇑f
⊢ Fintype.card H ∣ Fintype.card G
state_after: no goals
Theorem: List.exists_le_of_prod_le'
File: Mathlib/Algebra/Order/BigOperators/Group/List.lean

tactic: contrapose! h
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✝⁴ : LinearOrder M
inst✝³ : CovariantClass M M (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
inst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
inst✝ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
l : List ι
hl : l ≠ []
f g : ι → M
h : (map f l).prod ≤ (map g l).prod
⊢ ∃ x ∈ l, f x ≤ g x
state_after: ι : 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✝⁴ : LinearOrder M
inst✝³ : CovariantClass M M (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
inst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
inst✝ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
l : List ι
hl : l ≠ []
f g : ι → M
h : ∀ x ∈ l, g x < f x
⊢ (map g l).prod < (map f l).prod

tactic: exact prod_lt_prod_of_ne_nil hl _ _ h
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✝⁴ : LinearOrder M
inst✝³ : CovariantClass M M (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
inst✝¹ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
inst✝ : CovariantClass M M (Function.swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
l : List ι
hl : l ≠ []
f g : ι → M
h : ∀ x ∈ l, g x < f x
⊢ (map g l).prod < (map f l).prod
state_after: no goals
Theorem: ArithmeticFunction.LSeriesSummable_moebius_iff
File: Mathlib/NumberTheory/LSeries/Dirichlet.lean

tactic: refine ⟨fun H ↦ ?_, LSeriesSummable_of_bounded_of_one_lt_re (m := 1) fun n _ ↦ ?_⟩
state_before: s : ℂ
⊢ LSeriesSummable (fun n => ↑(μ n)) s ↔ 1 < s.re
state_after: case refine_1
s : ℂ
H : LSeriesSummable (fun n => ↑(μ n)) s
⊢ 1 < s.re

case refine_2
s : ℂ
n : ℕ
x✝ : n ≠ 0
⊢ Complex.abs ↑(μ n) ≤ 1

tactic: by_contra! h
state_before: case refine_1
s : ℂ
H : LSeriesSummable (fun n => ↑(μ n)) s
⊢ 1 < s.re
state_after: case refine_1
s : ℂ
H : LSeriesSummable (fun n => ↑(μ n)) s
h : s.re ≤ 1
⊢ False

tactic: have h' : s.re ≤ (1 : ℂ).re := by simp only [one_re, h]
state_before: case refine_1
s : ℂ
H : LSeriesSummable (fun n => ↑(μ n)) s
h : s.re ≤ 1
⊢ False
state_after: case refine_1
s : ℂ
H : LSeriesSummable (fun n => ↑(μ n)) s
h : s.re ≤ 1
h' : s.re ≤ re 1
⊢ False

tactic: exact not_LSeriesSummable_moebius_at_one <| LSeriesSummable.of_re_le_re h' H
state_before: case refine_1
s : ℂ
H : LSeriesSummable (fun n => ↑(μ n)) s
h : s.re ≤ 1
h' : s.re ≤ re 1
⊢ False
state_after: no goals

tactic: simp only [one_re, h]
state_before: s : ℂ
H : LSeriesSummable (fun n => ↑(μ n)) s
h : s.re ≤ 1
⊢ s.re ≤ re 1
state_after: no goals

tactic: rw [abs_intCast]
state_before: case refine_2
s : ℂ
n : ℕ
x✝ : n ≠ 0
⊢ Complex.abs ↑(μ n) ≤ 1
state_after: case refine_2
s : ℂ
n : ℕ
x✝ : n ≠ 0
⊢ |↑(μ n)| ≤ 1

tactic: norm_cast
state_before: case refine_2
s : ℂ
n : ℕ
x✝ : n ≠ 0
⊢ |↑(μ n)| ≤ 1
state_after: case refine_2
s : ℂ
n : ℕ
x✝ : n ≠ 0
⊢ |μ n| ≤ 1

tactic: exact abs_moebius_le_one
state_before: case refine_2
s : ℂ
n : ℕ
x✝ : n ≠ 0
⊢ |μ n| ≤ 1
state_after: no goals
Theorem: ProbabilityTheory.kernel.ext_fun
File: Mathlib/Probability/Kernel/Basic.lean

tactic: ext a s hs
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ η : ↥(kernel α β)
h : ∀ (a : α) (f : β → ℝ≥0∞), Measurable f → ∫⁻ (b : β), f b ∂κ a = ∫⁻ (b : β), f b ∂η a
⊢ κ = η
state_after: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ η : ↥(kernel α β)
h : ∀ (a : α) (f : β → ℝ≥0∞), Measurable f → ∫⁻ (b : β), f b ∂κ a = ∫⁻ (b : β), f b ∂η a
a : α
s : Set β
hs : MeasurableSet s
⊢ (κ a) s = (η a) s

tactic: specialize h a (s.indicator fun _ => 1) (Measurable.indicator measurable_const hs)
state_before: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ η : ↥(kernel α β)
h : ∀ (a : α) (f : β → ℝ≥0∞), Measurable f → ∫⁻ (b : β), f b ∂κ a = ∫⁻ (b : β), f b ∂η a
a : α
s : Set β
hs : MeasurableSet s
⊢ (κ a) s = (η a) s
state_after: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ η : ↥(kernel α β)
a : α
s : Set β
hs : MeasurableSet s
h : ∫⁻ (b : β), s.indicator (fun x => 1) b ∂κ a = ∫⁻ (b : β), s.indicator (fun x => 1) b ∂η a
⊢ (κ a) s = (η a) s

tactic: simp_rw [lintegral_indicator_const hs, one_mul] at h
state_before: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ η : ↥(kernel α β)
a : α
s : Set β
hs : MeasurableSet s
h : ∫⁻ (b : β), s.indicator (fun x => 1) b ∂κ a = ∫⁻ (b : β), s.indicator (fun x => 1) b ∂η a
⊢ (κ a) s = (η a) s
state_after: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ η : ↥(kernel α β)
a : α
s : Set β
hs : MeasurableSet s
h : (κ a) s = (η a) s
⊢ (κ a) s = (η a) s

tactic: rw [h]
state_before: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ η : ↥(kernel α β)
a : α
s : Set β
hs : MeasurableSet s
h : (κ a) s = (η a) s
⊢ (κ a) s = (η a) s
state_after: no goals
Theorem: String.Iterator.ValidFor.curr
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

tactic: cases h.out'
state_before: l r : List Char
it : Iterator
h : ValidFor l r it
⊢ it.curr = r.headD default
state_after: case refl
l r : List Char
h : ValidFor l r { s := { data := l.reverse ++ r }, i := { byteIdx := utf8Len l.reverse } }
⊢ { s := { data := l.reverse ++ r }, i := { byteIdx := utf8Len l.reverse } }.curr = r.headD default

tactic: apply get_of_valid
state_before: case refl
l r : List Char
h : ValidFor l r { s := { data := l.reverse ++ r }, i := { byteIdx := utf8Len l.reverse } }
⊢ { s := { data := l.reverse ++ r }, i := { byteIdx := utf8Len l.reverse } }.curr = r.headD default
state_after: no goals
Theorem: CategoryTheory.IsFiltered.tulip
File: Mathlib/CategoryTheory/Filtered/Basic.lean

tactic: obtain ⟨l', k₁l, k₂l, hl⟩ := span f₂ f₃
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsFilteredOrEmpty C
j₁ j₂ j₃ k₁ k₂ l : C
f₁ : j₁ ⟶ k₁
f₂ : j₂ ⟶ k₁
f₃ : j₂ ⟶ k₂
f₄ : j₃ ⟶ k₂
g₁ : j₁ ⟶ l
g₂ : j₃ ⟶ l
⊢ ∃ s α β γ, f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = f₃ ≫ γ ∧ f₄ ≫ γ = g₂ ≫ β
state_after: case intro.intro.intro
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsFilteredOrEmpty C
j₁ j₂ j₃ k₁ k₂ l : C
f₁ : j₁ ⟶ k₁
f₂ : j₂ ⟶ k₁
f₃ : j₂ ⟶ k₂
f₄ : j₃ ⟶ k₂
g₁ : j₁ ⟶ l
g₂ : j₃ ⟶ l
l' : C
k₁l : k₁ ⟶ l'
k₂l : k₂ ⟶ l'
hl : f₂ ≫ k₁l = f₃ ≫ k₂l
⊢ ∃ s α β γ, f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = f₃ ≫ γ ∧ f₄ ≫ γ = g₂ ≫ β

tactic: obtain ⟨s, ls, l's, hs₁, hs₂⟩ := bowtie g₁ (f₁ ≫ k₁l) g₂ (f₄ ≫ k₂l)
state_before: case intro.intro.intro
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsFilteredOrEmpty C
j₁ j₂ j₃ k₁ k₂ l : C
f₁ : j₁ ⟶ k₁
f₂ : j₂ ⟶ k₁
f₃ : j₂ ⟶ k₂
f₄ : j₃ ⟶ k₂
g₁ : j₁ ⟶ l
g₂ : j₃ ⟶ l
l' : C
k₁l : k₁ ⟶ l'
k₂l : k₂ ⟶ l'
hl : f₂ ≫ k₁l = f₃ ≫ k₂l
⊢ ∃ s α β γ, f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = f₃ ≫ γ ∧ f₄ ≫ γ = g₂ ≫ β
state_after: case intro.intro.intro.intro.intro.intro.intro
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsFilteredOrEmpty C
j₁ j₂ j₃ k₁ k₂ l : C
f₁ : j₁ ⟶ k₁
f₂ : j₂ ⟶ k₁
f₃ : j₂ ⟶ k₂
f₄ : j₃ ⟶ k₂
g₁ : j₁ ⟶ l
g₂ : j₃ ⟶ l
l' : C
k₁l : k₁ ⟶ l'
k₂l : k₂ ⟶ l'
hl : f₂ ≫ k₁l = f₃ ≫ k₂l
s : C
ls : l ⟶ s
l's : l' ⟶ s
hs₁ : g₁ ≫ ls = (f₁ ≫ k₁l) ≫ l's
hs₂ : g₂ ≫ ls = (f₄ ≫ k₂l) ≫ l's
⊢ ∃ s α β γ, f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = f₃ ≫ γ ∧ f₄ ≫ γ = g₂ ≫ β

tactic: refine ⟨s, k₁l ≫ l's, ls, k₂l ≫ l's, ?_, by simp only [← Category.assoc, hl], ?_⟩ <;>
  simp only [hs₁, hs₂, Category.assoc]
state_before: case intro.intro.intro.intro.intro.intro.intro
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsFilteredOrEmpty C
j₁ j₂ j₃ k₁ k₂ l : C
f₁ : j₁ ⟶ k₁
f₂ : j₂ ⟶ k₁
f₃ : j₂ ⟶ k₂
f₄ : j₃ ⟶ k₂
g₁ : j₁ ⟶ l
g₂ : j₃ ⟶ l
l' : C
k₁l : k₁ ⟶ l'
k₂l : k₂ ⟶ l'
hl : f₂ ≫ k₁l = f₃ ≫ k₂l
s : C
ls : l ⟶ s
l's : l' ⟶ s
hs₁ : g₁ ≫ ls = (f₁ ≫ k₁l) ≫ l's
hs₂ : g₂ ≫ ls = (f₄ ≫ k₂l) ≫ l's
⊢ ∃ s α β γ, f₁ ≫ α = g₁ ≫ β ∧ f₂ ≫ α = f₃ ≫ γ ∧ f₄ ≫ γ = g₂ ≫ β
state_after: no goals

tactic: simp only [← Category.assoc, hl]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : IsFilteredOrEmpty C
j₁ j₂ j₃ k₁ k₂ l : C
f₁ : j₁ ⟶ k₁
f₂ : j₂ ⟶ k₁
f₃ : j₂ ⟶ k₂
f₄ : j₃ ⟶ k₂
g₁ : j₁ ⟶ l
g₂ : j₃ ⟶ l
l' : C
k₁l : k₁ ⟶ l'
k₂l : k₂ ⟶ l'
hl : f₂ ≫ k₁l = f₃ ≫ k₂l
s : C
ls : l ⟶ s
l's : l' ⟶ s
hs₁ : g₁ ≫ ls = (f₁ ≫ k₁l) ≫ l's
hs₂ : g₂ ≫ ls = (f₄ ≫ k₂l) ≫ l's
⊢ f₂ ≫ k₁l ≫ l's = f₃ ≫ k₂l ≫ l's
state_after: no goals
Theorem: Real.cos_add_pi_div_two
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: simp [cos_add]
state_before: x : ℝ
⊢ cos (x + π / 2) = -sin x
state_after: no goals
Theorem: Polynomial.derivWithin_aeval
File: Mathlib/Analysis/Calculus/Deriv/Polynomial.lean

tactic: simpa only [aeval_def, eval₂_eq_eval_map, derivative_map] using
  (q.map (algebraMap R 𝕜)).derivWithin hxs
state_before: 𝕜 : Type u
inst✝⁶ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
E : Type w
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Algebra R 𝕜
p : 𝕜[X]
q : R[X]
hxs : UniqueDiffWithinAt 𝕜 s x
⊢ derivWithin (fun x => (aeval x) q) s x = (aeval x) (derivative q)
state_after: no goals
Theorem: SimpleGraph.degree_le_maxDegree
File: Mathlib/Combinatorics/SimpleGraph/Finite.lean

tactic: obtain ⟨t, ht : _ = _⟩ := Finset.max_of_mem (mem_image_of_mem (fun v => G.degree v) (mem_univ v))
state_before: V : Type u_1
G : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v : V
⊢ G.degree v ≤ G.maxDegree
state_after: case intro
V : Type u_1
G : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v : V
t : ℕ
ht : (image (fun v => G.degree v) univ).max = ↑t
⊢ G.degree v ≤ G.maxDegree

tactic: have := Finset.le_max_of_eq (mem_image_of_mem _ (mem_univ v)) ht
state_before: case intro
V : Type u_1
G : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v : V
t : ℕ
ht : (image (fun v => G.degree v) univ).max = ↑t
⊢ G.degree v ≤ G.maxDegree
state_after: case intro
V : Type u_1
G : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v : V
t : ℕ
ht : (image (fun v => G.degree v) univ).max = ↑t
this : G.degree v ≤ t
⊢ G.degree v ≤ G.maxDegree

tactic: rwa [maxDegree, ht]
state_before: case intro
V : Type u_1
G : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v : V
t : ℕ
ht : (image (fun v => G.degree v) univ).max = ↑t
this : G.degree v ≤ t
⊢ G.degree v ≤ G.maxDegree
state_after: no goals
Theorem: Pell.Solution₁.x_pow_pos
File: Mathlib/NumberTheory/Pell.lean

tactic: induction' n with n ih
state_before: d : ℤ
a : Solution₁ d
hax : 0 < a.x
n : ℕ
⊢ 0 < (a ^ n).x
state_after: case zero
d : ℤ
a : Solution₁ d
hax : 0 < a.x
⊢ 0 < (a ^ 0).x

case succ
d : ℤ
a : Solution₁ d
hax : 0 < a.x
n : ℕ
ih : 0 < (a ^ n).x
⊢ 0 < (a ^ (n + 1)).x

tactic: simp only [Nat.zero_eq, pow_zero, x_one, zero_lt_one]
state_before: case zero
d : ℤ
a : Solution₁ d
hax : 0 < a.x
⊢ 0 < (a ^ 0).x
state_after: no goals

tactic: rw [pow_succ]
state_before: case succ
d : ℤ
a : Solution₁ d
hax : 0 < a.x
n : ℕ
ih : 0 < (a ^ n).x
⊢ 0 < (a ^ (n + 1)).x
state_after: case succ
d : ℤ
a : Solution₁ d
hax : 0 < a.x
n : ℕ
ih : 0 < (a ^ n).x
⊢ 0 < (a ^ n * a).x

tactic: exact x_mul_pos ih hax
state_before: case succ
d : ℤ
a : Solution₁ d
hax : 0 < a.x
n : ℕ
ih : 0 < (a ^ n).x
⊢ 0 < (a ^ n * a).x
state_after: no goals
Theorem: Set.dual_ordConnectedComponent
File: Mathlib/Order/Interval/Set/OrdConnectedComponent.lean

tactic: rw [mem_ordConnectedComponent, dual_uIcc]
state_before: α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x : α
⊢ toDual x ∈ (⇑ofDual ⁻¹' s).ordConnectedComponent (toDual x✝) ↔ toDual x ∈ ⇑ofDual ⁻¹' s.ordConnectedComponent x✝
state_after: α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x : α
⊢ ⇑ofDual ⁻¹' [[x✝, x]] ⊆ ⇑ofDual ⁻¹' s ↔ toDual x ∈ ⇑ofDual ⁻¹' s.ordConnectedComponent x✝

tactic: rfl
state_before: α : Type u_1
inst✝ : LinearOrder α
s t : Set α
x✝ y z x : α
⊢ ⇑ofDual ⁻¹' [[x✝, x]] ⊆ ⇑ofDual ⁻¹' s ↔ toDual x ∈ ⇑ofDual ⁻¹' s.ordConnectedComponent x✝
state_after: no goals
Theorem: MvPolynomial.derivation_C_mul
File: Mathlib/Algebra/MvPolynomial/Derivation.lean

tactic: have : C (σ := σ) a • D f = D (C a * f) := by simp
state_before: σ : Type u_1
R : Type u_2
A : Type u_3
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid A
inst✝¹ : Module R A
inst✝ : Module (MvPolynomial σ R) A
D : Derivation R (MvPolynomial σ R) A
a : R
f : MvPolynomial σ R
⊢ C a • D f = a • D f
state_after: σ : Type u_1
R : Type u_2
A : Type u_3
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid A
inst✝¹ : Module R A
inst✝ : Module (MvPolynomial σ R) A
D : Derivation R (MvPolynomial σ R) A
a : R
f : MvPolynomial σ R
this : C a • D f = D (C a * f)
⊢ C a • D f = a • D f

tactic: rw [this, C_mul', D.map_smul]
state_before: σ : Type u_1
R : Type u_2
A : Type u_3
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid A
inst✝¹ : Module R A
inst✝ : Module (MvPolynomial σ R) A
D : Derivation R (MvPolynomial σ R) A
a : R
f : MvPolynomial σ R
this : C a • D f = D (C a * f)
⊢ C a • D f = a • D f
state_after: no goals

tactic: simp
state_before: σ : Type u_1
R : Type u_2
A : Type u_3
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid A
inst✝¹ : Module R A
inst✝ : Module (MvPolynomial σ R) A
D : Derivation R (MvPolynomial σ R) A
a : R
f : MvPolynomial σ R
⊢ C a • D f = D (C a * f)
state_after: no goals
Theorem: Associated.mul_right
File: Mathlib/Algebra/Associated.lean

tactic: obtain ⟨d, rfl⟩ := h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
a b : α
h : a ~ᵤ b
c : α
⊢ a * c ~ᵤ b * c
state_after: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
a c : α
d : αˣ
⊢ a * c ~ᵤ a * ↑d * c

tactic: exact ⟨d, mul_right_comm _ _ _⟩
state_before: case intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
a c : α
d : αˣ
⊢ a * c ~ᵤ a * ↑d * c
state_after: no goals
Theorem: List.cons_union
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: simp [List.union_def, foldr]
state_before: α : Type u_1
inst✝ : BEq α
a : α
l₁ l₂ : List α
⊢ a :: l₁ ∪ l₂ = List.insert a (l₁ ∪ l₂)
state_after: no goals
Theorem: Set.encard_insert_le
File: Mathlib/Data/Set/Card.lean

tactic: rw [← union_singleton, ← encard_singleton x]
state_before: α : Type u_1
β : Type u_2
s✝ t : Set α
a b : α
s : Set α
x : α
⊢ (insert x s).encard ≤ s.encard + 1
state_after: α : Type u_1
β : Type u_2
s✝ t : Set α
a b : α
s : Set α
x : α
⊢ (s ∪ {x}).encard ≤ s.encard + {x}.encard

tactic: apply encard_union_le
state_before: α : Type u_1
β : Type u_2
s✝ t : Set α
a b : α
s : Set α
x : α
⊢ (s ∪ {x}).encard ≤ s.encard + {x}.encard
state_after: no goals
Theorem: Rel.edgeDensity_empty_right
File: Mathlib/Combinatorics/SimpleGraph/Density.lean

tactic: rw [edgeDensity, Finset.card_empty, Nat.cast_zero, mul_zero, div_zero]
state_before: 𝕜 : Type u_1
ι : Type u_2
κ : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝ : (a : α) → DecidablePred (r a)
s✝ s₁ s₂ : Finset α
t t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
s : Finset α
⊢ edgeDensity r s ∅ = 0
state_after: no goals
Theorem: Prod.smul_zero_mk
File: Mathlib/GroupTheory/GroupAction/Prod.lean

tactic: rw [Prod.smul_mk, smul_zero]
state_before: M : Type u_1
N : Type u_2
P : Type u_3
E : Type u_4
α✝ : Type u_5
β : Type u_6
inst✝⁶ : SMul M α✝
inst✝⁵ : SMul M β
inst✝⁴ : SMul N α✝
inst✝³ : SMul N β
a✝ : M
x : α✝ × β
α : Type u_7
inst✝² : Monoid M
inst✝¹ : AddMonoid α
inst✝ : DistribMulAction M α
a : M
c : β
⊢ a • (0, c) = (0, a • c)
state_after: no goals
Theorem: Nat.ascFactorial_eq_factorial_mul_choose'
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: cases n
state_before: n k : ℕ
⊢ n.ascFactorial k = k ! * (n + k - 1).choose k
state_after: case zero
k : ℕ
⊢ ascFactorial 0 k = k ! * (0 + k - 1).choose k

case succ
k n✝ : ℕ
⊢ (n✝ + 1).ascFactorial k = k ! * (n✝ + 1 + k - 1).choose k

tactic: rw [ascFactorial_eq_factorial_mul_choose]
state_before: case succ
k n✝ : ℕ
⊢ (n✝ + 1).ascFactorial k = k ! * (n✝ + 1 + k - 1).choose k
state_after: case succ
k n✝ : ℕ
⊢ k ! * (n✝ + k).choose k = k ! * (n✝ + 1 + k - 1).choose k

tactic: simp only [succ_add_sub_one]
state_before: case succ
k n✝ : ℕ
⊢ k ! * (n✝ + k).choose k = k ! * (n✝ + 1 + k - 1).choose k
state_after: no goals

tactic: cases k
state_before: case zero
k : ℕ
⊢ ascFactorial 0 k = k ! * (0 + k - 1).choose k
state_after: case zero.zero

⊢ ascFactorial 0 0 = 0! * (0 + 0 - 1).choose 0

case zero.succ
n✝ : ℕ
⊢ ascFactorial 0 (n✝ + 1) = (n✝ + 1)! * (0 + (n✝ + 1) - 1).choose (n✝ + 1)

tactic: rw [ascFactorial_zero, choose_zero_right, factorial_zero, Nat.mul_one]
state_before: case zero.zero

⊢ ascFactorial 0 0 = 0! * (0 + 0 - 1).choose 0
state_after: no goals

tactic: simp only [zero_ascFactorial, zero_eq, Nat.zero_add, succ_sub_succ_eq_sub,
  Nat.le_zero_eq, Nat.sub_zero, choose_succ_self, Nat.mul_zero]
state_before: case zero.succ
n✝ : ℕ
⊢ ascFactorial 0 (n✝ + 1) = (n✝ + 1)! * (0 + (n✝ + 1) - 1).choose (n✝ + 1)
state_after: no goals
Theorem: ContDiffAt.rpow_const_of_le
File: Mathlib/Analysis/SpecialFunctions/Pow/Deriv.lean

tactic: rw [← contDiffWithinAt_univ] at *
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f g : E → ℝ
f' g' : E →L[ℝ] ℝ
x : E
s : Set E
c p : ℝ
n : ℕ∞
m : ℕ
hf : ContDiffAt ℝ (↑m) f x
h : ↑m ≤ p
⊢ ContDiffAt ℝ (↑m) (fun x => f x ^ p) x
state_after: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f g : E → ℝ
f' g' : E →L[ℝ] ℝ
x : E
s : Set E
c p : ℝ
n : ℕ∞
m : ℕ
hf : ContDiffWithinAt ℝ (↑m) f Set.univ x
h : ↑m ≤ p
⊢ ContDiffWithinAt ℝ (↑m) (fun x => f x ^ p) Set.univ x

tactic: exact hf.rpow_const_of_le h
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f g : E → ℝ
f' g' : E →L[ℝ] ℝ
x : E
s : Set E
c p : ℝ
n : ℕ∞
m : ℕ
hf : ContDiffWithinAt ℝ (↑m) f Set.univ x
h : ↑m ≤ p
⊢ ContDiffWithinAt ℝ (↑m) (fun x => f x ^ p) Set.univ x
state_after: no goals
Theorem: Fin.predAbove_left_monotone
File: Mathlib/Order/Fin.lean

tactic: dsimp [predAbove]
state_before: m n : ℕ
p : Fin (n + 1)
i✝ j : Fin n
i : Fin (n + 1)
a b : Fin n
H : a ≤ b
⊢ (fun p => p.predAbove i) a ≤ (fun p => p.predAbove i) b
state_after: m n : ℕ
p : Fin (n + 1)
i✝ j : Fin n
i : Fin (n + 1)
a b : Fin n
H : a ≤ b
⊢ (if h : a.castSucc < i then i.pred ⋯ else i.castPred ⋯) ≤ if h : b.castSucc < i then i.pred ⋯ else i.castPred ⋯

tactic: split_ifs with ha hb hb
state_before: m n : ℕ
p : Fin (n + 1)
i✝ j : Fin n
i : Fin (n + 1)
a b : Fin n
H : a ≤ b
⊢ (if h : a.castSucc < i then i.pred ⋯ else i.castPred ⋯) ≤ if h : b.castSucc < i then i.pred ⋯ else i.castPred ⋯
state_after: case pos
m n : ℕ
p : Fin (n + 1)
i✝ j : Fin n
i : Fin (n + 1)
a b : Fin n
H : a ≤ b
ha : a.castSucc < i
hb : b.castSucc < i
⊢ i.pred ⋯ ≤ i.pred ⋯

case neg
m n : ℕ
p : Fin (n + 1)
i✝ j : Fin n
i : Fin (n + 1)
a b : Fin n
H : a ≤ b
ha : a.castSucc < i
hb : ¬b.castSucc < i
⊢ i.pred ⋯ ≤ i.castPred ⋯

case pos
m n : ℕ
p : Fin (n + 1)
i✝ j : Fin n
i : Fin (n + 1)
a b : Fin n
H : a ≤ b
ha : ¬a.castSucc < i
hb : b.castSucc < i
⊢ i.castPred ⋯ ≤ i.pred ⋯

case neg
m n : ℕ
p : Fin (n + 1)
i✝ j : Fin n
i : Fin (n + 1)
a b : Fin n
H : a ≤ b
ha : ¬a.castSucc < i
hb : ¬b.castSucc < i
⊢ i.castPred ⋯ ≤ i.castPred ⋯

tactic: rfl
state_before: case pos
m n : ℕ
p : Fin (n + 1)
i✝ j : Fin n
i : Fin (n + 1)
a b : Fin n
H : a ≤ b
ha : a.castSucc < i
hb : b.castSucc < i
⊢ i.pred ⋯ ≤ i.pred ⋯
state_after: no goals

tactic: exact pred_le _
state_before: case neg
m n : ℕ
p : Fin (n + 1)
i✝ j : Fin n
i : Fin (n + 1)
a b : Fin n
H : a ≤ b
ha : a.castSucc < i
hb : ¬b.castSucc < i
⊢ i.pred ⋯ ≤ i.castPred ⋯
state_after: no goals

tactic: have : b < a := castSucc_lt_castSucc_iff.mpr (hb.trans_le (le_of_not_gt ha))
state_before: case pos
m n : ℕ
p : Fin (n + 1)
i✝ j : Fin n
i : Fin (n + 1)
a b : Fin n
H : a ≤ b
ha : ¬a.castSucc < i
hb : b.castSucc < i
⊢ i.castPred ⋯ ≤ i.pred ⋯
state_after: case pos
m n : ℕ
p : Fin (n + 1)
i✝ j : Fin n
i : Fin (n + 1)
a b : Fin n
H : a ≤ b
ha : ¬a.castSucc < i
hb : b.castSucc < i
this : b < a
⊢ i.castPred ⋯ ≤ i.pred ⋯

tactic: exact absurd H this.not_le
state_before: case pos
m n : ℕ
p : Fin (n + 1)
i✝ j : Fin n
i : Fin (n + 1)
a b : Fin n
H : a ≤ b
ha : ¬a.castSucc < i
hb : b.castSucc < i
this : b < a
⊢ i.castPred ⋯ ≤ i.pred ⋯
state_after: no goals

tactic: rfl
state_before: case neg
m n : ℕ
p : Fin (n + 1)
i✝ j : Fin n
i : Fin (n + 1)
a b : Fin n
H : a ≤ b
ha : ¬a.castSucc < i
hb : ¬b.castSucc < i
⊢ i.castPred ⋯ ≤ i.castPred ⋯
state_after: no goals