tasksource/leandojo huggingface dataset:
Theorem: Polynomial.derivative_sq
File: Mathlib/Data/Polynomial/Derivative.lean

tactic: rw [derivative_pow_succ, Nat.cast_one, one_add_one_eq_two, pow_one]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : CommSemiring R
p : R[X]
⊢ ↑derivative (p ^ 2) = ↑C 2 * p * ↑derivative p
Theorem: Complex.cosh_zero
File: Mathlib/Data/Complex/Exponential.lean

tactic: simp [cosh]
state_before: x y : ℂ
⊢ cosh 0 = 1
Theorem: Array.push_data
File: Std/Data/Array/Init/Lemmas.lean

tactic: simp [push, List.concat_eq_append]
state_before: α : Type u_1
arr : Array α
a : α
⊢ (push arr a).data = arr.data ++ [a]
Theorem: sub_div'
File: Mathlib/Algebra/Field/Basic.lean

tactic: simpa using div_sub_div b a one_ne_zero hc
state_before: α : Type ?u.55451
β : Type ?u.55454
K : Type u_1
inst✝ : Field K
a b c : K
hc : c ≠ 0
⊢ b - a / c = (b * c - a) / c
Theorem: Filter.Tendsto.if
File: Mathlib/Order/Filter/Basic.lean

tactic: simp only [tendsto_def, mem_inf_principal] at *
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.319862
ι : Sort x
l₁ : Filter α
l₂ : Filter β
f g : α → β
p : α → Prop
inst✝ : (x : α) → Decidable (p x)
h₀ : Tendsto f (l₁ ⊓ 𝓟 {x | p x}) l₂
h₁ : Tendsto g (l₁ ⊓ 𝓟 {x | ¬p x}) l₂
⊢ Tendsto (fun x => if p x then f x else g x) l₁ l₂

tactic: intro s hs
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.319862
ι : Sort x
l₁ : Filter α
l₂ : Filter β
f g : α → β
p : α → Prop
inst✝ : (x : α) → Decidable (p x)
h₀ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁
h₁ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁
⊢ ∀ (s : Set β), s ∈ l₂ → (fun x => if p x then f x else g x) ⁻¹' s ∈ l₁

tactic: filter_upwards [h₀ s hs, h₁ s hs] with x hp₀ hp₁
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.319862
ι : Sort x
l₁ : Filter α
l₂ : Filter β
f g : α → β
p : α → Prop
inst✝ : (x : α) → Decidable (p x)
h₀ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁
h₁ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁
s : Set β
hs : s ∈ l₂
⊢ (fun x => if p x then f x else g x) ⁻¹' s ∈ l₁

tactic: rw [mem_preimage]
state_before: case h
α : Type u
β : Type v
γ : Type w
δ : Type ?u.319862
ι : Sort x
l₁ : Filter α
l₂ : Filter β
f g : α → β
p : α → Prop
inst✝ : (x : α) → Decidable (p x)
h₀ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁
h₁ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁
s : Set β
hs : s ∈ l₂
x : α
hp₀ : p x → x ∈ f ⁻¹' s
hp₁ : ¬p x → x ∈ g ⁻¹' s
⊢ x ∈ (fun x => if p x then f x else g x) ⁻¹' s

tactic: split_ifs with h
state_before: case h
α : Type u
β : Type v
γ : Type w
δ : Type ?u.319862
ι : Sort x
l₁ : Filter α
l₂ : Filter β
f g : α → β
p : α → Prop
inst✝ : (x : α) → Decidable (p x)
h₀ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁
h₁ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁
s : Set β
hs : s ∈ l₂
x : α
hp₀ : p x → x ∈ f ⁻¹' s
hp₁ : ¬p x → x ∈ g ⁻¹' s
⊢ (if p x then f x else g x) ∈ s

tactic: exacts [hp₀ h, hp₁ h]
state_before: case h.inl
α : Type u
β : Type v
γ : Type w
δ : Type ?u.319862
ι : Sort x
l₁ : Filter α
l₂ : Filter β
f g : α → β
p : α → Prop
inst✝ : (x : α) → Decidable (p x)
h₀ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁
h₁ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁
s : Set β
hs : s ∈ l₂
x : α
hp₀ : p x → x ∈ f ⁻¹' s
hp₁ : ¬p x → x ∈ g ⁻¹' s
h : p x
⊢ f x ∈ s

case h.inr
α : Type u
β : Type v
γ : Type w
δ : Type ?u.319862
ι : Sort x
l₁ : Filter α
l₂ : Filter β
f g : α → β
p : α → Prop
inst✝ : (x : α) → Decidable (p x)
h₀ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | p x} → x ∈ f ⁻¹' s} ∈ l₁
h₁ : ∀ (s : Set β), s ∈ l₂ → {x | x ∈ {x | ¬p x} → x ∈ g ⁻¹' s} ∈ l₁
s : Set β
hs : s ∈ l₂
x : α
hp₀ : p x → x ∈ f ⁻¹' s
hp₁ : ¬p x → x ∈ g ⁻¹' s
h : ¬p x
⊢ g x ∈ s
Theorem: Complex.hasStrictDerivAt_sinh
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Deriv.lean

tactic: simp only [cosh, div_eq_mul_inv]
state_before: x : ℂ
⊢ HasStrictDerivAt sinh (cosh x) x

tactic: convert ((hasStrictDerivAt_exp x).sub (hasStrictDerivAt_id x).neg.cexp).mul_const (2 : ℂ)⁻¹
  using 1
state_before: x : ℂ
⊢ HasStrictDerivAt sinh ((exp x + exp (-x)) * 2⁻¹) x

tactic: rw [id, mul_neg_one, sub_eq_add_neg, neg_neg]
state_before: case h.e'_7
x : ℂ
⊢ (exp x + exp (-x)) * 2⁻¹ = (exp x - exp (-id x) * -1) * 2⁻¹
Theorem: Int.log_mono_right
File: Mathlib/Data/Int/Log.lean

tactic: cases' le_or_lt b 1 with hb hb
state_before: R : Type u_1
inst✝¹ : LinearOrderedSemifield R
inst✝ : FloorSemiring R
b : ℕ
r₁ r₂ : R
h₀ : 0 < r₁
h : r₁ ≤ r₂
⊢ log b r₁ ≤ log b r₂

tactic: cases' le_total r₁ 1 with h₁ h₁ <;> cases' le_total r₂ 1 with h₂ h₂
state_before: case inr
R : Type u_1
inst✝¹ : LinearOrderedSemifield R
inst✝ : FloorSemiring R
b : ℕ
r₁ r₂ : R
h₀ : 0 < r₁
h : r₁ ≤ r₂
hb : 1 < b
⊢ log b r₁ ≤ log b r₂

tactic: rw [log_of_left_le_one hb, log_of_left_le_one hb]
state_before: case inl
R : Type u_1
inst✝¹ : LinearOrderedSemifield R
inst✝ : FloorSemiring R
b : ℕ
r₁ r₂ : R
h₀ : 0 < r₁
h : r₁ ≤ r₂
hb : b ≤ 1
⊢ log b r₁ ≤ log b r₂

tactic: rw [log_of_right_le_one _ h₁, log_of_right_le_one _ h₂, neg_le_neg_iff, Int.ofNat_le]
state_before: case inr.inl.inl
R : Type u_1
inst✝¹ : LinearOrderedSemifield R
inst✝ : FloorSemiring R
b : ℕ
r₁ r₂ : R
h₀ : 0 < r₁
h : r₁ ≤ r₂
hb : 1 < b
h₁ : r₁ ≤ 1
h₂ : r₂ ≤ 1
⊢ log b r₁ ≤ log b r₂

tactic: exact Nat.clog_mono_right _ (Nat.ceil_mono <| inv_le_inv_of_le h₀ h)
state_before: case inr.inl.inl
R : Type u_1
inst✝¹ : LinearOrderedSemifield R
inst✝ : FloorSemiring R
b : ℕ
r₁ r₂ : R
h₀ : 0 < r₁
h : r₁ ≤ r₂
hb : 1 < b
h₁ : r₁ ≤ 1
h₂ : r₂ ≤ 1
⊢ Nat.clog b ⌈r₂⁻¹⌉₊ ≤ Nat.clog b ⌈r₁⁻¹⌉₊

tactic: rw [log_of_right_le_one _ h₁, log_of_one_le_right _ h₂]
state_before: case inr.inl.inr
R : Type u_1
inst✝¹ : LinearOrderedSemifield R
inst✝ : FloorSemiring R
b : ℕ
r₁ r₂ : R
h₀ : 0 < r₁
h : r₁ ≤ r₂
hb : 1 < b
h₁ : r₁ ≤ 1
h₂ : 1 ≤ r₂
⊢ log b r₁ ≤ log b r₂

tactic: exact (neg_nonpos.mpr (Int.coe_nat_nonneg _)).trans (Int.coe_nat_nonneg _)
state_before: case inr.inl.inr
R : Type u_1
inst✝¹ : LinearOrderedSemifield R
inst✝ : FloorSemiring R
b : ℕ
r₁ r₂ : R
h₀ : 0 < r₁
h : r₁ ≤ r₂
hb : 1 < b
h₁ : r₁ ≤ 1
h₂ : 1 ≤ r₂
⊢ -↑(Nat.clog b ⌈r₁⁻¹⌉₊) ≤ ↑(Nat.log b ⌊r₂⌋₊)

tactic: obtain rfl := le_antisymm h (h₂.trans h₁)
state_before: case inr.inr.inl
R : Type u_1
inst✝¹ : LinearOrderedSemifield R
inst✝ : FloorSemiring R
b : ℕ
r₁ r₂ : R
h₀ : 0 < r₁
h : r₁ ≤ r₂
hb : 1 < b
h₁ : 1 ≤ r₁
h₂ : r₂ ≤ 1
⊢ log b r₁ ≤ log b r₂

tactic: rfl
state_before: case inr.inr.inl
R : Type u_1
inst✝¹ : LinearOrderedSemifield R
inst✝ : FloorSemiring R
b : ℕ
r₁ : R
h₀ : 0 < r₁
hb : 1 < b
h₁ : 1 ≤ r₁
h : r₁ ≤ r₁
h₂ : r₁ ≤ 1
⊢ log b r₁ ≤ log b r₁

tactic: rw [log_of_one_le_right _ h₁, log_of_one_le_right _ h₂, Int.ofNat_le]
state_before: case inr.inr.inr
R : Type u_1
inst✝¹ : LinearOrderedSemifield R
inst✝ : FloorSemiring R
b : ℕ
r₁ r₂ : R
h₀ : 0 < r₁
h : r₁ ≤ r₂
hb : 1 < b
h₁ : 1 ≤ r₁
h₂ : 1 ≤ r₂
⊢ log b r₁ ≤ log b r₂

tactic: exact Nat.log_mono_right (Nat.floor_mono h)
state_before: case inr.inr.inr
R : Type u_1
inst✝¹ : LinearOrderedSemifield R
inst✝ : FloorSemiring R
b : ℕ
r₁ r₂ : R
h₀ : 0 < r₁
h : r₁ ≤ r₂
hb : 1 < b
h₁ : 1 ≤ r₁
h₂ : 1 ≤ r₂
⊢ Nat.log b ⌊r₁⌋₊ ≤ Nat.log b ⌊r₂⌋₊
Theorem: GeneralizedContinuedFraction.zeroth_convergent_eq_h
File: Mathlib/Algebra/ContinuedFractions/Translations.lean

tactic: simp [convergent_eq_num_div_denom, num_eq_conts_a, denom_eq_conts_b, div_one]
state_before: K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
⊢ convergents g 0 = g.h
Theorem: sameRay_iff_of_norm_eq
File: Mathlib/Analysis/NormedSpace/Ray.lean

tactic: obtain rfl | hy := eq_or_ne y 0
state_before: E : Type ?u.245331
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_1
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
x y : F
h : ‖x‖ = ‖y‖
⊢ SameRay ℝ x y ↔ x = y

tactic: rw [norm_zero, norm_eq_zero] at h
state_before: case inl
E : Type ?u.245331
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_1
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
x : F
h : ‖x‖ = ‖0‖
⊢ SameRay ℝ x 0 ↔ x = 0

tactic: exact iff_of_true (SameRay.zero_right _) h
state_before: case inl
E : Type ?u.245331
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_1
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
x : F
h : x = 0
⊢ SameRay ℝ x 0 ↔ x = 0

tactic: exact ⟨fun hxy => norm_injOn_ray_right hy hxy SameRay.rfl h, fun hxy => hxy ▸ SameRay.rfl⟩
state_before: case inr
E : Type ?u.245331
inst✝³ : SeminormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_1
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
x y : F
h : ‖x‖ = ‖y‖
hy : y ≠ 0
⊢ SameRay ℝ x y ↔ x = y
Theorem: LocalizedModule.one_smul'
File: Mathlib/Algebra/Module/LocalizedModule.lean

tactic: induction' m using LocalizedModule.induction_on with m s
state_before: R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
m : LocalizedModule S M
⊢ 1 • m = m

tactic: rw [← Localization.mk_one, mk_smul_mk, one_smul, one_mul]
state_before: case h
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
m : M
s : { x // x ∈ S }
⊢ 1 • mk m s = mk m s
Theorem: tsum_congr_subtype
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

tactic: rw [h]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.304262
δ : Type ?u.304265
inst✝¹ : AddCommMonoid α
inst✝ : TopologicalSpace α
f : β → α
s t : Set β
h : s = t
⊢ (∑' (x : ↑s), f ↑x) = ∑' (x : ↑t), f ↑x
Theorem: DiscreteQuotient.comap_mono
File: Mathlib/Topology/DiscreteQuotient.lean

tactic: tauto
state_before: α : Type ?u.10674
X : Type u_2
Y : Type u_1
Z : Type ?u.10683
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
S : DiscreteQuotient X
g : C(Y, Z)
f : C(X, Y)
A B : DiscreteQuotient Y
h : A ≤ B
⊢ comap f A ≤ comap f B
Theorem: CategoryTheory.CosimplicialObject.δ_comp_σ_of_le
File: Mathlib/AlgebraicTopology/SimplicialObject.lean

tactic: dsimp [δ, σ]
state_before: C : Type u
inst✝ : Category C
X : CosimplicialObject C
n : ℕ
i : Fin (n + 2)
j : Fin (n + 1)
H : i ≤ ↑Fin.castSucc j
⊢ δ X (↑Fin.castSucc i) ≫ σ X (Fin.succ j) = σ X j ≫ δ X i

tactic: simp only [← X.map_comp, SimplexCategory.δ_comp_σ_of_le H]
state_before: C : Type u
inst✝ : Category C
X : CosimplicialObject C
n : ℕ
i : Fin (n + 2)
j : Fin (n + 1)
H : i ≤ ↑Fin.castSucc j
⊢ X.map (SimplexCategory.δ (↑Fin.castSucc i)) ≫ X.map (SimplexCategory.σ (Fin.succ j)) =
    X.map (SimplexCategory.σ j) ≫ X.map (SimplexCategory.δ i)
Theorem: Projectivization.submodule_eq
File: Mathlib/LinearAlgebra/ProjectiveSpace/Basic.lean

tactic: conv_lhs => rw [← v.mk_rep]
state_before: K : Type u_1
V : Type u_2
inst✝² : DivisionRing K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
v : ℙ K V
⊢ Projectivization.submodule v = Submodule.span K {Projectivization.rep v}
Theorem: tendsto_floor_left
File: Mathlib/Topology/Algebra/Order/Floor.lean

tactic: rw [← @cast_one α, ← cast_sub]
state_before: α : Type u_1
β : Type ?u.16071
γ : Type ?u.16074
inst✝³ : LinearOrderedRing α
inst✝² : FloorRing α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
n : ℤ
⊢ pure (IntCast.intCast (n - 1)) ≤ 𝓝[Iic (↑n - 1)] (↑n - 1)

tactic: exact pure_le_nhdsWithin le_rfl
state_before: α : Type u_1
β : Type ?u.16071
γ : Type ?u.16074
inst✝³ : LinearOrderedRing α
inst✝² : FloorRing α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
n : ℤ
⊢ pure (IntCast.intCast (n - 1)) ≤ 𝓝[Iic ↑(n - 1)] ↑(n - 1)
Theorem: SimpleGraph.IsRegularOfDegree.compl
File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

tactic: intro v
state_before: ι : Sort ?u.279944
𝕜 : Type ?u.279947
V : Type u
W : Type v
X : Type w
G✝ : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e : Sym2 V
inst✝³ : LocallyFinite G✝
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
k : ℕ
h : IsRegularOfDegree G k
⊢ IsRegularOfDegree (Gᶜ) (Fintype.card V - 1 - k)

tactic: rw [degree_compl, h v]
state_before: ι : Sort ?u.279944
𝕜 : Type ?u.279947
V : Type u
W : Type v
X : Type w
G✝ : SimpleGraph V
G' : SimpleGraph W
a b c u v✝ w : V
e : Sym2 V
inst✝³ : LocallyFinite G✝
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
k : ℕ
h : IsRegularOfDegree G k
v : V
⊢ degree (Gᶜ) v = Fintype.card V - 1 - k
Theorem: List.forall₂_take_append
File: Mathlib/Data/List/Forall2.lean

tactic: have h' : Forall₂ R (take (length l₁) l) (take (length l₁) (l₁ ++ l₂)) :=
  forall₂_take (length l₁) h
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.131498
δ : Type ?u.131501
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
l : List α
l₁ l₂ : List β
h : Forall₂ R l (l₁ ++ l₂)
⊢ Forall₂ R (take (length l₁) l) l₁

tactic: rwa [take_left] at h'
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.131498
δ : Type ?u.131501
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
l : List α
l₁ l₂ : List β
h : Forall₂ R l (l₁ ++ l₂)
h' : Forall₂ R (take (length l₁) l) (take (length l₁) (l₁ ++ l₂))
⊢ Forall₂ R (take (length l₁) l) l₁
Theorem: MonoidHomClass.lipschitz_of_bound
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: simpa only [dist_eq_norm_div, map_div] using h (x / y)
state_before: 𝓕 : Type u_1
𝕜 : Type ?u.145958
α : Type ?u.145961
ι : Type ?u.145964
κ : Type ?u.145967
E : Type u_2
F : Type u_3
G : Type ?u.145976
inst✝³ : SeminormedGroup E
inst✝² : SeminormedGroup F
inst✝¹ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
inst✝ : MonoidHomClass 𝓕 E F
f : 𝓕
C : ℝ
h : ∀ (x : E), ‖↑f x‖ ≤ C * ‖x‖
x y : E
⊢ dist (↑f x) (↑f y) ≤ C * dist x y
Theorem: Stirling.second_wallis_limit
File: Mathlib/Analysis/SpecialFunctions/Stirling.lean

tactic: refine' Tendsto.congr' (eventually_atTop.mpr ⟨1, fun n hn =>
  stirlingSeq_pow_four_div_stirlingSeq_pow_two_eq n (one_le_iff_ne_zero.mp hn)⟩) _
state_before: a : ℝ
hane : a ≠ 0
ha : Tendsto stirlingSeq atTop (𝓝 a)
⊢ Tendsto Wallis.W atTop (𝓝 (a ^ 2 / 2))

tactic: have h : a ^ 2 / ↑2 = a ^ 4 / a ^ 2 * (1 / 2) := by
  rw [mul_one_div, ← mul_one_div (a ^ 4) (a ^ 2), one_div, ← pow_sub_of_lt a]
  norm_num
state_before: a : ℝ
hane : a ≠ 0
ha : Tendsto stirlingSeq atTop (𝓝 a)
⊢ Tendsto (fun n => stirlingSeq n ^ 4 / stirlingSeq (2 * n) ^ 2 * (↑n / (2 * ↑n + 1))) atTop (𝓝 (a ^ 2 / 2))

tactic: rw [h]
state_before: a : ℝ
hane : a ≠ 0
ha : Tendsto stirlingSeq atTop (𝓝 a)
h : a ^ 2 / 2 = a ^ 4 / a ^ 2 * (1 / 2)
⊢ Tendsto (fun n => stirlingSeq n ^ 4 / stirlingSeq (2 * n) ^ 2 * (↑n / (2 * ↑n + 1))) atTop (𝓝 (a ^ 2 / 2))

tactic: exact ((ha.pow 4).div ((ha.comp (tendsto_id.const_mul_atTop' two_pos)).pow 2)
  (pow_ne_zero 2 hane)).mul tendsto_self_div_two_mul_self_add_one
state_before: a : ℝ
hane : a ≠ 0
ha : Tendsto stirlingSeq atTop (𝓝 a)
h : a ^ 2 / 2 = a ^ 4 / a ^ 2 * (1 / 2)
⊢ Tendsto (fun n => stirlingSeq n ^ 4 / stirlingSeq (2 * n) ^ 2 * (↑n / (2 * ↑n + 1))) atTop
    (𝓝 (a ^ 4 / a ^ 2 * (1 / 2)))

tactic: rw [mul_one_div, ← mul_one_div (a ^ 4) (a ^ 2), one_div, ← pow_sub_of_lt a]
state_before: a : ℝ
hane : a ≠ 0
ha : Tendsto stirlingSeq atTop (𝓝 a)
⊢ a ^ 2 / 2 = a ^ 4 / a ^ 2 * (1 / 2)

tactic: norm_num
state_before: a : ℝ
hane : a ≠ 0
ha : Tendsto stirlingSeq atTop (𝓝 a)
⊢ 2 < 4
Theorem: Finsupp.total_eq_fintype_total_apply
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: apply Finset.sum_subset
state_before: α : Type u_2
M : Type u_1
R : Type u_3
inst✝⁶ : Fintype α
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
S : Type u_4
inst✝² : Semiring S
inst✝¹ : Module S M
inst✝ : SMulCommClass R S M
v : α → M
x : α → R
⊢ ↑(Finsupp.total α M R v) (↑(LinearEquiv.symm (linearEquivFunOnFinite R R α)) x) = ↑(↑(Fintype.total R S) v) x

tactic: exact Finset.subset_univ _
state_before: case h
α : Type u_2
M : Type u_1
R : Type u_3
inst✝⁶ : Fintype α
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
S : Type u_4
inst✝² : Semiring S
inst✝¹ : Module S M
inst✝ : SMulCommClass R S M
v : α → M
x : α → R
⊢ (↑(LinearEquiv.symm (linearEquivFunOnFinite R R α)) x).support ⊆ Finset.univ

tactic: intro x _ hx
state_before: case hf
α : Type u_2
M : Type u_1
R : Type u_3
inst✝⁶ : Fintype α
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
S : Type u_4
inst✝² : Semiring S
inst✝¹ : Module S M
inst✝ : SMulCommClass R S M
v : α → M
x : α → R
⊢ ∀ (x_1 : α),
    x_1 ∈ Finset.univ →
      ¬x_1 ∈ (↑(LinearEquiv.symm (linearEquivFunOnFinite R R α)) x).support →
        (fun i => ↑((fun i => smulRight LinearMap.id (v i)) i)) x_1
            (↑(↑(LinearEquiv.symm (linearEquivFunOnFinite R R α)) x) x_1) =
          0

tactic: rw [Finsupp.not_mem_support_iff.mp hx]
state_before: case hf
α : Type u_2
M : Type u_1
R : Type u_3
inst✝⁶ : Fintype α
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
S : Type u_4
inst✝² : Semiring S
inst✝¹ : Module S M
inst✝ : SMulCommClass R S M
v : α → M
x✝ : α → R
x : α
a✝ : x ∈ Finset.univ
hx : ¬x ∈ (↑(LinearEquiv.symm (linearEquivFunOnFinite R R α)) x✝).support
⊢ (fun i => ↑((fun i => smulRight LinearMap.id (v i)) i)) x
      (↑(↑(LinearEquiv.symm (linearEquivFunOnFinite R R α)) x✝) x) =
    0

tactic: exact zero_smul _ _
state_before: case hf
α : Type u_2
M : Type u_1
R : Type u_3
inst✝⁶ : Fintype α
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
S : Type u_4
inst✝² : Semiring S
inst✝¹ : Module S M
inst✝ : SMulCommClass R S M
v : α → M
x✝ : α → R
x : α
a✝ : x ∈ Finset.univ
hx : ¬x ∈ (↑(LinearEquiv.symm (linearEquivFunOnFinite R R α)) x✝).support
⊢ (fun i => ↑((fun i => smulRight LinearMap.id (v i)) i)) x 0 = 0
Theorem: MeasureTheory.Lp.simpleFunc.add_toSimpleFunc
File: Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean

tactic: filter_upwards [toSimpleFunc_eq_toFun (f + g), toSimpleFunc_eq_toFun f,
  toSimpleFunc_eq_toFun g, Lp.coeFn_add (f : Lp E p μ) g] with _
state_before: α : Type u_1
β : Type ?u.1582067
ι : Type ?u.1582070
E : Type u_2
F : Type ?u.1582076
𝕜 : Type ?u.1582079
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
f g : { x // x ∈ simpleFunc E p μ }
⊢ ↑(toSimpleFunc (f + g)) =ᵐ[μ] ↑(toSimpleFunc f) + ↑(toSimpleFunc g)

tactic: simp only [AddSubgroup.coe_add, Pi.add_apply]
state_before: case h
α : Type u_1
β : Type ?u.1582067
ι : Type ?u.1582070
E : Type u_2
F : Type ?u.1582076
𝕜 : Type ?u.1582079
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
f g : { x // x ∈ simpleFunc E p μ }
a✝ : α
⊢ ↑(toSimpleFunc (f + g)) a✝ = ↑↑↑(f + g) a✝ →
    ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ →
      ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝ →
        ↑↑(↑f + ↑g) a✝ = (↑↑↑f + ↑↑↑g) a✝ → ↑(toSimpleFunc (f + g)) a✝ = (↑(toSimpleFunc f) + ↑(toSimpleFunc g)) a✝

tactic: iterate 4 intro h; rw [h]
state_before: case h
α : Type u_1
β : Type ?u.1582067
ι : Type ?u.1582070
E : Type u_2
F : Type ?u.1582076
𝕜 : Type ?u.1582079
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
f g : { x // x ∈ simpleFunc E p μ }
a✝ : α
⊢ ↑(toSimpleFunc (f + g)) a✝ = ↑(↑↑f + ↑↑g) a✝ →
    ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝ →
      ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝ →
        ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑↑↑g a✝ → ↑(toSimpleFunc (f + g)) a✝ = ↑(toSimpleFunc f) a✝ + ↑(toSimpleFunc g) a✝

tactic: intro h
state_before: case h
α : Type u_1
β : Type ?u.1582067
ι : Type ?u.1582070
E : Type u_2
F : Type ?u.1582076
𝕜 : Type ?u.1582079
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
f g : { x // x ∈ simpleFunc E p μ }
a✝ : α
h✝¹ : ↑(toSimpleFunc (f + g)) a✝ = ↑(↑↑f + ↑↑g) a✝
h✝ : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝
h : ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝
⊢ ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑↑↑g a✝ → ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑↑↑g a✝

tactic: rw [h]
state_before: case h
α : Type u_1
β : Type ?u.1582067
ι : Type ?u.1582070
E : Type u_2
F : Type ?u.1582076
𝕜 : Type ?u.1582079
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedAddCommGroup F
p : ℝ≥0∞
μ : Measure α
f g : { x // x ∈ simpleFunc E p μ }
a✝ : α
h✝² : ↑(toSimpleFunc (f + g)) a✝ = ↑(↑↑f + ↑↑g) a✝
h✝¹ : ↑(toSimpleFunc f) a✝ = ↑↑↑f a✝
h✝ : ↑(toSimpleFunc g) a✝ = ↑↑↑g a✝
h : ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑↑↑g a✝
⊢ ↑(↑↑f + ↑↑g) a✝ = ↑↑↑f a✝ + ↑↑↑g a✝
Theorem: Polynomial.isEquivalent_atTop_div
File: Mathlib/Analysis/SpecialFunctions/Polynomials.lean

tactic: by_cases hP : P = 0
state_before: 𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
⊢ (fun x => eval x P / eval x Q) ~[atTop] fun x =>
    leadingCoeff P / leadingCoeff Q * x ^ (↑(natDegree P) - ↑(natDegree Q))

tactic: by_cases hQ : Q = 0
state_before: case neg
𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
hP : ¬P = 0
⊢ (fun x => eval x P / eval x Q) ~[atTop] fun x =>
    leadingCoeff P / leadingCoeff Q * x ^ (↑(natDegree P) - ↑(natDegree Q))

tactic: refine'
  (P.isEquivalent_atTop_lead.symm.div Q.isEquivalent_atTop_lead.symm).symm.trans
    (EventuallyEq.isEquivalent ((eventually_gt_atTop 0).mono fun x hx => _))
state_before: case neg
𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
hP : ¬P = 0
hQ : ¬Q = 0
⊢ (fun x => eval x P / eval x Q) ~[atTop] fun x =>
    leadingCoeff P / leadingCoeff Q * x ^ (↑(natDegree P) - ↑(natDegree Q))

tactic: simp [← div_mul_div_comm, hP, hQ, zpow_sub₀ hx.ne.symm]
state_before: case neg
𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
hP : ¬P = 0
hQ : ¬Q = 0
x : 𝕜
hx : 0 < x
⊢ (fun x => leadingCoeff P * x ^ natDegree P / (leadingCoeff Q * x ^ natDegree Q)) x =
    (fun x => leadingCoeff P / leadingCoeff Q * x ^ (↑(natDegree P) - ↑(natDegree Q))) x

tactic: simp [hP, IsEquivalent.refl]
state_before: case pos
𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
hP : P = 0
⊢ (fun x => eval x P / eval x Q) ~[atTop] fun x =>
    leadingCoeff P / leadingCoeff Q * x ^ (↑(natDegree P) - ↑(natDegree Q))

tactic: simp [hQ, IsEquivalent.refl]
state_before: case pos
𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
hP : ¬P = 0
hQ : Q = 0
⊢ (fun x => eval x P / eval x Q) ~[atTop] fun x =>
    leadingCoeff P / leadingCoeff Q * x ^ (↑(natDegree P) - ↑(natDegree Q))
Theorem: Finset.prod_erase_lt_of_one_lt
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: conv in ∏ m in s, f m => rw [← Finset.insert_erase hd]
state_before: ι : Type ?u.800477
β : Type u
α : Type v
γ✝ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝³ : CommMonoid β
γ : Type u_1
inst✝² : DecidableEq α
inst✝¹ : OrderedCommMonoid γ
inst✝ : CovariantClass γ γ (fun x x_1 => x * x_1) fun x x_1 => x < x_1
s : Finset α
d : α
hd : d ∈ s
f : α → γ
hdf : 1 < f d
⊢ ∏ m in erase s d, f m < ∏ m in s, f m

tactic: rw [Finset.prod_insert (Finset.not_mem_erase d s)]
state_before: ι : Type ?u.800477
β : Type u
α : Type v
γ✝ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝³ : CommMonoid β
γ : Type u_1
inst✝² : DecidableEq α
inst✝¹ : OrderedCommMonoid γ
inst✝ : CovariantClass γ γ (fun x x_1 => x * x_1) fun x x_1 => x < x_1
s : Finset α
d : α
hd : d ∈ s
f : α → γ
hdf : 1 < f d
⊢ ∏ m in erase s d, f m < ∏ m in insert d (erase s d), f m

tactic: exact lt_mul_of_one_lt_left' _ hdf
state_before: ι : Type ?u.800477
β : Type u
α : Type v
γ✝ : Type w
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝³ : CommMonoid β
γ : Type u_1
inst✝² : DecidableEq α
inst✝¹ : OrderedCommMonoid γ
inst✝ : CovariantClass γ γ (fun x x_1 => x * x_1) fun x x_1 => x < x_1
s : Finset α
d : α
hd : d ∈ s
f : α → γ
hdf : 1 < f d
⊢ ∏ m in erase s d, f m < f d * ∏ x in erase s d, f x
Theorem: InnerProductGeometry.angle_add_lt_pi_div_two_of_inner_eq_zero
File: Mathlib/Geometry/Euclidean/Angle/Unoriented/RightAngle.lean

tactic: rw [angle_add_eq_arccos_of_inner_eq_zero h, Real.arccos_lt_pi_div_two,
  norm_add_eq_sqrt_iff_real_inner_eq_zero.2 h]
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : inner x y = 0
h0 : x ≠ 0
⊢ angle x (x + y) < π / 2

tactic: exact div_pos (norm_pos_iff.2 h0) (Real.sqrt_pos.2 (Left.add_pos_of_pos_of_nonneg
  (mul_self_pos.2 (norm_ne_zero_iff.2 h0)) (mul_self_nonneg _)))
state_before: V : Type u_1
inst✝¹ : NormedAddCommGroup V
inst✝ : InnerProductSpace ℝ V
x y : V
h : inner x y = 0
h0 : x ≠ 0
⊢ 0 < ‖x‖ / Real.sqrt (‖x‖ * ‖x‖ + ‖y‖ * ‖y‖)