tasksource/leandojo huggingface dataset:
Theorem: exists_locallyFinite_subset_iUnion_ball_radius_lt
File: Mathlib/Topology/MetricSpace/ShrinkingLemma.lean

tactic: have : ∀ x ∈ s, (𝓝 x).HasBasis (fun r : ℝ => 0 < r ∧ r < R x) fun r => ball x r := fun x hx =>
  nhds_basis_uniformity (uniformity_basis_dist_lt (hR x hx))
state_before: α : Type u
ι : Type v
inst✝¹ : MetricSpace α
inst✝ : ProperSpace α
c : ι → α
x : α
r : ℝ
s : Set α
hs : IsClosed s
R : α → ℝ
hR : ∀ (x : α), x ∈ s → 0 < R x
⊢ ∃ ι c r r',
    (∀ (i : ι), c i ∈ s ∧ 0 < r i ∧ r i < r' i ∧ r' i < R (c i)) ∧
      (LocallyFinite fun i => ball (c i) (r' i)) ∧ s ⊆ ⋃ (i : ι), ball (c i) (r i)

tactic: rcases refinement_of_locallyCompact_sigmaCompact_of_nhds_basis_set hs this with
  ⟨ι, c, r', hr', hsub', hfin⟩
state_before: α : Type u
ι : Type v
inst✝¹ : MetricSpace α
inst✝ : ProperSpace α
c : ι → α
x : α
r : ℝ
s : Set α
hs : IsClosed s
R : α → ℝ
hR : ∀ (x : α), x ∈ s → 0 < R x
this : ∀ (x : α), x ∈ s → Filter.HasBasis (𝓝 x) (fun r => 0 < r ∧ r < R x) fun r => ball x r
⊢ ∃ ι c r r',
    (∀ (i : ι), c i ∈ s ∧ 0 < r i ∧ r i < r' i ∧ r' i < R (c i)) ∧
      (LocallyFinite fun i => ball (c i) (r' i)) ∧ s ⊆ ⋃ (i : ι), ball (c i) (r i)

tactic: rcases exists_subset_iUnion_ball_radius_pos_lt (fun i => (hr' i).2.1) hs
    (fun x _ => hfin.point_finite x) hsub' with
  ⟨r, hsub, hlt⟩
state_before: case intro.intro.intro.intro.intro
α : Type u
ι✝ : Type v
inst✝¹ : MetricSpace α
inst✝ : ProperSpace α
c✝ : ι✝ → α
x : α
r : ℝ
s : Set α
hs : IsClosed s
R : α → ℝ
hR : ∀ (x : α), x ∈ s → 0 < R x
this : ∀ (x : α), x ∈ s → Filter.HasBasis (𝓝 x) (fun r => 0 < r ∧ r < R x) fun r => ball x r
ι : Type u
c : ι → α
r' : ι → ℝ
hr' : ∀ (a : ι), c a ∈ s ∧ 0 < r' a ∧ r' a < R (c a)
hsub' : s ⊆ ⋃ (a : ι), ball (c a) (r' a)
hfin : LocallyFinite fun a => ball (c a) (r' a)
⊢ ∃ ι c r r',
    (∀ (i : ι), c i ∈ s ∧ 0 < r i ∧ r i < r' i ∧ r' i < R (c i)) ∧
      (LocallyFinite fun i => ball (c i) (r' i)) ∧ s ⊆ ⋃ (i : ι), ball (c i) (r i)

tactic: exact ⟨ι, c, r, r', fun i => ⟨(hr' i).1, (hlt i).1, (hlt i).2, (hr' i).2.2⟩, hfin, hsub⟩
state_before: case intro.intro.intro.intro.intro.intro.intro
α : Type u
ι✝ : Type v
inst✝¹ : MetricSpace α
inst✝ : ProperSpace α
c✝ : ι✝ → α
x : α
r✝ : ℝ
s : Set α
hs : IsClosed s
R : α → ℝ
hR : ∀ (x : α), x ∈ s → 0 < R x
this : ∀ (x : α), x ∈ s → Filter.HasBasis (𝓝 x) (fun r => 0 < r ∧ r < R x) fun r => ball x r
ι : Type u
c : ι → α
r' : ι → ℝ
hr' : ∀ (a : ι), c a ∈ s ∧ 0 < r' a ∧ r' a < R (c a)
hsub' : s ⊆ ⋃ (a : ι), ball (c a) (r' a)
hfin : LocallyFinite fun a => ball (c a) (r' a)
r : ι → ℝ
hsub : s ⊆ ⋃ (i : ι), ball (c i) (r i)
hlt : ∀ (i : ι), r i ∈ Ioo 0 (r' i)
⊢ ∃ ι c r r',
    (∀ (i : ι), c i ∈ s ∧ 0 < r i ∧ r i < r' i ∧ r' i < R (c i)) ∧
      (LocallyFinite fun i => ball (c i) (r' i)) ∧ s ⊆ ⋃ (i : ι), ball (c i) (r i)
Theorem: MeasureTheory.SimpleFunc.tendsto_approxOn_L1_nnnorm
File: Mathlib/MeasureTheory/Function/SimpleFuncDenseLp.lean

tactic: simpa [snorm_one_eq_lintegral_nnnorm] using
  tendsto_approxOn_Lp_snorm hf h₀ one_ne_top hμ
    (by simpa [snorm_one_eq_lintegral_nnnorm] using hi)
state_before: α : Type ?u.930924
β : Type u_2
ι : Type ?u.930930
E : Type u_1
F : Type ?u.930936
𝕜 : Type ?u.930939
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace E
inst✝² : NormedAddCommGroup E
inst✝¹ : OpensMeasurableSpace E
f : β → E
hf : Measurable f
s : Set E
y₀ : E
h₀ : y₀ ∈ s
inst✝ : SeparableSpace ↑s
μ : Measure β
hμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s
hi : HasFiniteIntegral fun x => f x - y₀
⊢ Tendsto (fun n => ∫⁻ (x : β), ↑‖↑(approxOn f hf s y₀ h₀ n) x - f x‖₊ ∂μ) atTop (𝓝 0)

tactic: simpa [snorm_one_eq_lintegral_nnnorm] using hi
state_before: α : Type ?u.930924
β : Type u_2
ι : Type ?u.930930
E : Type u_1
F : Type ?u.930936
𝕜 : Type ?u.930939
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace E
inst✝² : NormedAddCommGroup E
inst✝¹ : OpensMeasurableSpace E
f : β → E
hf : Measurable f
s : Set E
y₀ : E
h₀ : y₀ ∈ s
inst✝ : SeparableSpace ↑s
μ : Measure β
hμ : ∀ᵐ (x : β) ∂μ, f x ∈ closure s
hi : HasFiniteIntegral fun x => f x - y₀
⊢ snorm (fun x => f x - y₀) 1 μ < ⊤
Theorem: ofAdd_image_multiples_eq_powers_ofAdd
File: Mathlib/GroupTheory/Submonoid/Membership.lean

tactic: symm
state_before: M : Type ?u.302290
A : Type u_1
B : Type ?u.302296
inst✝ : AddMonoid A
x : A
⊢ ↑Multiplicative.ofAdd '' ↑(AddSubmonoid.multiples x) = ↑(Submonoid.powers (↑Multiplicative.ofAdd x))

tactic: rw [Equiv.eq_image_iff_symm_image_eq]
state_before: M : Type ?u.302290
A : Type u_1
B : Type ?u.302296
inst✝ : AddMonoid A
x : A
⊢ ↑(Submonoid.powers (↑Multiplicative.ofAdd x)) = ↑Multiplicative.ofAdd '' ↑(AddSubmonoid.multiples x)

tactic: exact ofMul_image_powers_eq_multiples_ofMul
state_before: M : Type ?u.302290
A : Type u_1
B : Type ?u.302296
inst✝ : AddMonoid A
x : A
⊢ ↑Multiplicative.ofAdd.symm '' ↑(Submonoid.powers (↑Multiplicative.ofAdd x)) = ↑(AddSubmonoid.multiples x)
Theorem: Algebra.FiniteType.polynomial
File: Mathlib/RingTheory/FiniteType.lean

tactic: rw [Finset.coe_singleton]
state_before: R : Type u_1
A : Type u
B : Type ?u.8031
M : Type ?u.8034
N : Type ?u.8037
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : Algebra R A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra R B
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
⊢ adjoin R ↑{X} = ⊤

tactic: exact Polynomial.adjoin_X
state_before: R : Type u_1
A : Type u
B : Type ?u.8031
M : Type ?u.8034
N : Type ?u.8037
inst✝⁸ : CommRing R
inst✝⁷ : CommRing A
inst✝⁶ : Algebra R A
inst✝⁵ : CommRing B
inst✝⁴ : Algebra R B
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
⊢ adjoin R {X} = ⊤
Theorem: HomogeneousLocalization.sub_val
File: Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean

tactic: rw [show y1 - y2 = y1 + -y2 from rfl, add_val, neg_val]
state_before: ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
y1 y2 : HomogeneousLocalization 𝒜 x
⊢ val (y1 - y2) = val y1 - val y2

tactic: rfl
state_before: ι : Type u_1
R : Type u_2
A : Type u_3
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
y1 y2 : HomogeneousLocalization 𝒜 x
⊢ val y1 + -val y2 = val y1 - val y2
Theorem: Nat.add_mul_div_right
File: Std/Data/Nat/Lemmas.lean

tactic: rw [Nat.mul_comm, add_mul_div_left _ _ H]
state_before: x y z : Nat
H : 0 < z
⊢ (x + y * z) / z = x / z + y
Theorem: Real.arctan_neg
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean

tactic: simp [arctan_eq_arcsin, neg_div]
state_before: x : ℝ
⊢ arctan (-x) = -arctan x
Theorem: isUnit_of_mul_isUnit_left
File: Mathlib/Algebra/Group/Units.lean

tactic: rwa [← mul_assoc]
state_before: α : Type u
M : Type u_1
N : Type ?u.62918
inst✝ : CommMonoid M
x y : M
hu : IsUnit (x * y)
z : M
hz : x * y * z = 1
⊢ x * (y * z) = 1
Theorem: convex_hyperplane
File: Mathlib/Analysis/Convex/Basic.lean

tactic: simp_rw [le_antisymm_iff]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.82526
β : Type u_3
inst✝⁷ : OrderedSemiring 𝕜
inst✝⁶ : AddCommMonoid E
inst✝⁵ : AddCommMonoid F
inst✝⁴ : Module 𝕜 E
inst✝³ : Module 𝕜 F
s : Set E
x : E
inst✝² : OrderedAddCommMonoid β
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
f : E → β
h : IsLinearMap 𝕜 f
r : β
⊢ Convex 𝕜 {w | f w = r}

tactic: exact (convex_halfspace_le h r).inter (convex_halfspace_ge h r)
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.82526
β : Type u_3
inst✝⁷ : OrderedSemiring 𝕜
inst✝⁶ : AddCommMonoid E
inst✝⁵ : AddCommMonoid F
inst✝⁴ : Module 𝕜 E
inst✝³ : Module 𝕜 F
s : Set E
x : E
inst✝² : OrderedAddCommMonoid β
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
f : E → β
h : IsLinearMap 𝕜 f
r : β
⊢ Convex 𝕜 {w | f w ≤ r ∧ r ≤ f w}
Theorem: Nat.ArithmeticFunction.moebius_apply_isPrimePow_not_prime
File: Mathlib/NumberTheory/ArithmeticFunction.lean

tactic: obtain ⟨p, k, hp, hk, rfl⟩ := (isPrimePow_nat_iff _).1 hn
state_before: R : Type ?u.591476
n : ℕ
hn : IsPrimePow n
hn' : ¬Prime n
⊢ ↑μ n = 0

tactic: rw [moebius_apply_prime_pow hp hk.ne', if_neg]
state_before: case intro.intro.intro.intro
R : Type ?u.591476
p k : ℕ
hp : Prime p
hk : 0 < k
hn : IsPrimePow (p ^ k)
hn' : ¬Prime (p ^ k)
⊢ ↑μ (p ^ k) = 0

tactic: rintro rfl
state_before: case intro.intro.intro.intro.hnc
R : Type ?u.591476
p k : ℕ
hp : Prime p
hk : 0 < k
hn : IsPrimePow (p ^ k)
hn' : ¬Prime (p ^ k)
⊢ ¬k = 1

tactic: exact hn' (by simpa)
state_before: case intro.intro.intro.intro.hnc
R : Type ?u.591476
p : ℕ
hp : Prime p
hk : 0 < 1
hn : IsPrimePow (p ^ 1)
hn' : ¬Prime (p ^ 1)
⊢ False

tactic: simpa
state_before: R : Type ?u.591476
p : ℕ
hp : Prime p
hk : 0 < 1
hn : IsPrimePow (p ^ 1)
hn' : ¬Prime (p ^ 1)
⊢ Prime (p ^ 1)
Theorem: Filter.EventuallyEq.hasFDerivAtFilter_iff
File: Mathlib/Analysis/Calculus/FDeriv/Basic.lean

tactic: simp only [hy, h₁, hx]
state_before: 𝕜 : Type u_3
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_1
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_2
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type ?u.474760
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.474855
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
h₀ : f₀ =ᶠ[L] f₁
hx : f₀ x = f₁ x
h₁ : ∀ (x : E), ↑f₀' x = ↑f₁' x
y : E
hy : f₀ y = f₁ y
⊢ (fun x' => f₀ x' - f₀ x - ↑f₀' (x' - x)) y = (fun x' => f₁ x' - f₁ x - ↑f₁' (x' - x)) y
Theorem: StrictConvex.mem_smul_of_zero_mem
File: Mathlib/Analysis/Convex/Strict.lean

tactic: rw [mem_smul_set_iff_inv_smul_mem₀ (zero_lt_one.trans ht).ne']
state_before: 𝕜 : Type u_1
𝕝 : Type ?u.228762
E : Type u_2
F : Type ?u.228768
β : Type ?u.228771
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : TopologicalSpace E
inst✝³ : AddCommGroup E
inst✝² : AddCommGroup F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
x : E
hs : StrictConvex 𝕜 s
zero_mem : 0 ∈ s
hx : x ∈ s
hx₀ : x ≠ 0
t : 𝕜
ht : 1 < t
⊢ x ∈ t • interior s

tactic: exact hs.smul_mem_of_zero_mem zero_mem hx hx₀ (inv_pos.2 <| zero_lt_one.trans ht) (inv_lt_one ht)
state_before: 𝕜 : Type u_1
𝕝 : Type ?u.228762
E : Type u_2
F : Type ?u.228768
β : Type ?u.228771
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : TopologicalSpace E
inst✝³ : AddCommGroup E
inst✝² : AddCommGroup F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s : Set E
x : E
hs : StrictConvex 𝕜 s
zero_mem : 0 ∈ s
hx : x ∈ s
hx₀ : x ≠ 0
t : 𝕜
ht : 1 < t
⊢ t⁻¹ • x ∈ interior s
Theorem: FractionalIdeal.le_spanSingleton_mul_iff
File: Mathlib/RingTheory/FractionalIdeal.lean

tactic: simp only [mem_singleton_mul, eq_comm]
state_before: R : Type u_1
inst✝⁷ : CommRing R
S : Submonoid R
P : Type u_2
inst✝⁶ : CommRing P
inst✝⁵ : Algebra R P
loc : IsLocalization S P
R₁ : Type ?u.1730977
inst✝⁴ : CommRing R₁
K : Type ?u.1730983
inst✝³ : Field K
inst✝² : Algebra R₁ K
inst✝¹ : IsFractionRing R₁ K
inst✝ : IsDomain R₁
x : P
I J : FractionalIdeal S P
⊢ (∀ {zI : P}, zI ∈ I → zI ∈ spanSingleton S x * J) ↔ ∀ (zI : P), zI ∈ I → ∃ zJ, zJ ∈ J ∧ x * zJ = zI
Theorem: CategoryTheory.Limits.imageSubobjectMap_arrow
File: Mathlib/CategoryTheory/Subobject/Limits.lean

tactic: simp only [imageSubobjectMap, Category.assoc, imageSubobject_arrow']
state_before: C : Type u
inst✝⁴ : Category C
X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
inst✝³ : HasImage f✝
W X Y Z : C
f : W ⟶ X
inst✝² : HasImage f
g : Y ⟶ Z
inst✝¹ : HasImage g
sq : Arrow.mk f ⟶ Arrow.mk g
inst✝ : HasImageMap sq
⊢ imageSubobjectMap sq ≫ arrow (imageSubobject g) = arrow (imageSubobject f) ≫ sq.right

tactic: erw [image.map_ι, ← Category.assoc, imageSubobject_arrow]
state_before: C : Type u
inst✝⁴ : Category C
X✝ Y✝ Z✝ : C
f✝ : X✝ ⟶ Y✝
inst✝³ : HasImage f✝
W X Y Z : C
f : W ⟶ X
inst✝² : HasImage f
g : Y ⟶ Z
inst✝¹ : HasImage g
sq : Arrow.mk f ⟶ Arrow.mk g
inst✝ : HasImageMap sq
⊢ (imageSubobjectIso f).hom ≫ image.map sq ≫ image.ι g = arrow (imageSubobject f) ≫ sq.right
Theorem: lt_div_iff_mul_lt
File: Mathlib/Algebra/Order/Group/Defs.lean

tactic: rw [← mul_lt_mul_iff_right b, div_eq_mul_inv, inv_mul_cancel_right]
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LT α
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x < x_1
a b c d : α
⊢ a < c / b ↔ a * b < c
Theorem: MeasureTheory.Memℒp.inner_const
File: Mathlib/MeasureTheory/Function/L2Space.lean

tactic: rw [mul_comm]
state_before: α : Type u_2
m : MeasurableSpace α
p : ℝ≥0∞
μ : Measure α
E : Type u_1
𝕜 : Type u_3
inst✝² : IsROrC 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace 𝕜 E
f : α → E
hf : Memℒp f p
c : E
x : α
⊢ ‖inner (f x) c‖ ≤ ?m.29976 hf c * ‖f x‖

tactic: exact norm_inner_le_norm _ _
state_before: α : Type u_2
m : MeasurableSpace α
p : ℝ≥0∞
μ : Measure α
E : Type u_1
𝕜 : Type u_3
inst✝² : IsROrC 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace 𝕜 E
f : α → E
hf : Memℒp f p
c : E
x : α
⊢ ‖inner (f x) c‖ ≤ ‖f x‖ * ?m.29976 hf c

α : Type u_2
m : MeasurableSpace α
p : ℝ≥0∞
μ : Measure α
E : Type u_1
𝕜 : Type u_3
inst✝² : IsROrC 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace 𝕜 E
⊢ {f : α → E} → Memℒp f p → E → ℝ
Theorem: Bool.false_or
File: src/lean/Init/SimpLemmas.lean

tactic: cases b <;> rfl
state_before: b : Bool
⊢ (false || b) = b
Theorem: Matrix.uniformContinuous
File: Mathlib/Topology/UniformSpace/Matrix.lean

tactic: simp only [UniformContinuous, Matrix.uniformity, Filter.tendsto_iInf, Filter.tendsto_comap_iff]
state_before: m : Type u_2
n : Type u_3
𝕜 : Type u_4
inst✝¹ : UniformSpace 𝕜
β : Type u_1
inst✝ : UniformSpace β
f : β → Matrix m n 𝕜
⊢ UniformContinuous f ↔ ∀ (i : m) (j : n), UniformContinuous fun x => f x i j

tactic: apply Iff.intro <;> intro a <;> apply a
state_before: m : Type u_2
n : Type u_3
𝕜 : Type u_4
inst✝¹ : UniformSpace 𝕜
β : Type u_1
inst✝ : UniformSpace β
f : β → Matrix m n 𝕜
⊢ (∀ (i : m) (i_1 : n),
      Filter.Tendsto ((fun a => (Prod.fst a i i_1, Prod.snd a i i_1)) ∘ fun x => (f x.fst, f x.snd)) (𝓤 β) (𝓤 𝕜)) ↔
    ∀ (i : m) (j : n), Filter.Tendsto (fun x => (f x.fst i j, f x.snd i j)) (𝓤 β) (𝓤 𝕜)
Theorem: Polynomial.div_tendsto_leadingCoeff_div_of_degree_eq
File: Mathlib/Analysis/SpecialFunctions/Polynomials.lean

tactic: refine' (isEquivalent_atTop_div P Q).symm.tendsto_nhds _
state_before: 𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
hdeg : degree P = degree Q
⊢ Tendsto (fun x => eval x P / eval x Q) atTop (𝓝 (leadingCoeff P / leadingCoeff Q))

tactic: rw [show (P.natDegree : ℤ) = Q.natDegree by simp [hdeg, natDegree]]
state_before: 𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
hdeg : degree P = degree Q
⊢ Tendsto (fun x => leadingCoeff P / leadingCoeff Q * x ^ (↑(natDegree P) - ↑(natDegree Q))) atTop
    (𝓝 (leadingCoeff P / leadingCoeff Q))

tactic: simp [tendsto_const_nhds]
state_before: 𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
hdeg : degree P = degree Q
⊢ Tendsto (fun x => leadingCoeff P / leadingCoeff Q * x ^ (↑(natDegree Q) - ↑(natDegree Q))) atTop
    (𝓝 (leadingCoeff P / leadingCoeff Q))

tactic: simp [hdeg, natDegree]
state_before: 𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
hdeg : degree P = degree Q
⊢ ↑(natDegree P) = ↑(natDegree Q)
Theorem: Finset.image_mul_right
File: Mathlib/Data/Finset/Pointwise.lean

tactic: simp
state_before: F : Type ?u.619432
α : Type u_1
β : Type ?u.619438
γ : Type ?u.619441
inst✝⁴ : DecidableEq α
inst✝³ : DecidableEq β
inst✝² : Group α
inst✝¹ : DivisionMonoid β
inst✝ : MonoidHomClass F α β
f : F
s t : Finset α
a b : α
⊢ ↑(image (fun x => x * b) t) =
    ↑(preimage t (fun x => x * b⁻¹) (_ : Set.InjOn (fun x => x * b⁻¹) ((fun x => x * b⁻¹) ⁻¹' ↑t)))
Theorem: SimpleGraph.Walk.reverse_concat
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: simp [concat_eq_append]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w : V
p : Walk G u v
h : Adj G v w
⊢ reverse (concat p h) = cons (_ : Adj G w v) (reverse p)
Theorem: UV.sup_sdiff_mem_of_mem_compression_of_not_mem
File: Mathlib/Combinatorics/SetFamily/Compression/UV.lean

tactic: rw [mem_compression] at h
state_before: α : Type u_1
inst✝² : GeneralizedBooleanAlgebra α
inst✝¹ : DecidableRel Disjoint
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s : Finset α
u v a b : α
h : a ∈ 𝓒 u v s
ha : ¬a ∈ s
⊢ (a ⊔ v) \ u ∈ s

tactic: obtain h | ⟨-, b, hb, hba⟩ := h
state_before: α : Type u_1
inst✝² : GeneralizedBooleanAlgebra α
inst✝¹ : DecidableRel Disjoint
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s : Finset α
u v a b : α
h : a ∈ s ∧ compress u v a ∈ s ∨ ¬a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = a
ha : ¬a ∈ s
⊢ (a ⊔ v) \ u ∈ s

tactic: unfold compress at hba
state_before: case inr.intro.intro.intro
α : Type u_1
inst✝² : GeneralizedBooleanAlgebra α
inst✝¹ : DecidableRel Disjoint
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s : Finset α
u v a b✝ : α
ha : ¬a ∈ s
b : α
hb : b ∈ s
hba : compress u v b = a
⊢ (a ⊔ v) \ u ∈ s

tactic: split_ifs at hba with h
state_before: case inr.intro.intro.intro
α : Type u_1
inst✝² : GeneralizedBooleanAlgebra α
inst✝¹ : DecidableRel Disjoint
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s : Finset α
u v a b✝ : α
ha : ¬a ∈ s
b : α
hb : b ∈ s
hba : (if Disjoint u b ∧ v ≤ b then (b ⊔ u) \ v else b) = a
⊢ (a ⊔ v) \ u ∈ s

tactic: cases ha h.1
state_before: case inl
α : Type u_1
inst✝² : GeneralizedBooleanAlgebra α
inst✝¹ : DecidableRel Disjoint
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s : Finset α
u v a b : α
ha : ¬a ∈ s
h : a ∈ s ∧ compress u v a ∈ s
⊢ (a ⊔ v) \ u ∈ s

tactic: rwa [← hba, sdiff_sup_cancel (le_sup_of_le_left h.2), sup_sdiff_right_self,
  h.1.symm.sdiff_eq_left]
state_before: case inr.intro.intro.intro.inl
α : Type u_1
inst✝² : GeneralizedBooleanAlgebra α
inst✝¹ : DecidableRel Disjoint
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s : Finset α
u v a b✝ : α
ha : ¬a ∈ s
b : α
hb : b ∈ s
h : Disjoint u b ∧ v ≤ b
hba : (b ⊔ u) \ v = a
⊢ (a ⊔ v) \ u ∈ s

tactic: cases ne_of_mem_of_not_mem hb ha hba
state_before: case inr.intro.intro.intro.inr
α : Type u_1
inst✝² : GeneralizedBooleanAlgebra α
inst✝¹ : DecidableRel Disjoint
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s : Finset α
u v a b✝ : α
ha : ¬a ∈ s
b : α
hb : b ∈ s
h : ¬(Disjoint u b ∧ v ≤ b)
hba : b = a
⊢ (a ⊔ v) \ u ∈ s
Theorem: Matrix.Commute.zpow_right
File: Mathlib/LinearAlgebra/Matrix/ZPow.lean

tactic: rcases nonsing_inv_cancel_or_zero B with (⟨hB, _⟩ | hB)
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A B : M
h : Commute A B
m : ℤ
⊢ Commute A (B ^ m)

tactic: refine' SemiconjBy.zpow_right _ _ h _ <;> exact isUnit_det_of_left_inverse hB
state_before: case inl.intro
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A B : M
h : Commute A B
m : ℤ
hB : B⁻¹ ⬝ B = 1
right✝ : B ⬝ B⁻¹ = 1
⊢ Commute A (B ^ m)

tactic: cases m
state_before: case inr
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A B : M
h : Commute A B
m : ℤ
hB : B⁻¹ = 0
⊢ Commute A (B ^ m)

tactic: simpa using h.pow_right _
state_before: case inr.ofNat
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A B : M
h : Commute A B
hB : B⁻¹ = 0
a✝ : ℕ
⊢ Commute A (B ^ ofNat a✝)

tactic: simp [← inv_pow', hB]
state_before: case inr.negSucc
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A B : M
h : Commute A B
hB : B⁻¹ = 0
a✝ : ℕ
⊢ Commute A (B ^ -[a✝+1])
Theorem: Complex.abs_cpow_eq_rpow_re_of_pos
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: rw [abs_cpow_of_ne_zero (ofReal_ne_zero.mpr hx.ne'), arg_ofReal_of_nonneg hx.le,
  MulZeroClass.zero_mul, Real.exp_zero, div_one, abs_of_nonneg hx.le]
state_before: x : ℝ
hx : 0 < x
y : ℂ
⊢ ↑abs (↑x ^ y) = x ^ y.re
Theorem: List.union_equiv_append
File: Mathlib/Data/List/Card.lean

tactic: simp
state_before: α : Type u_1
inst✝ : DecidableEq α
as bs : List α
x : α
⊢ x ∈ List.union as bs ↔ x ∈ as ++ bs
Theorem: AList.insertRec_empty
File: Mathlib/Data/List/AList.lean

tactic: change @insertRec α β _ C H0 IH ⟨[], _⟩ = H0
state_before: α : Type u
β : α → Type v
inst✝ : DecidableEq α
C : AList β → Sort u_1
H0 : C ∅
IH : (a : α) → (b : β a) → (l : AList β) → ¬a ∈ l → C l → C (insert a b l)
⊢ insertRec H0 IH ∅ = H0

tactic: rw [insertRec]
state_before: α : Type u
β : α → Type v
inst✝ : DecidableEq α
C : AList β → Sort u_1
H0 : C ∅
IH : (a : α) → (b : β a) → (l : AList β) → ¬a ∈ l → C l → C (insert a b l)
⊢ insertRec H0 IH { entries := [], nodupKeys := (_ : NodupKeys []) } = H0
Theorem: PNat.card_Ioc
File: Mathlib/Data/PNat/Interval.lean

tactic: rw [← Nat.card_Ioc]
state_before: a b : ℕ+
⊢ card (Ioc a b) = ↑b - ↑a

tactic: erw [← Finset.map_subtype_embedding_Ioc _ a b (fun c x _ hx _ hc _ => hc.trans_le hx)]
state_before: a b : ℕ+
⊢ card (Ioc a b) = card (Ioc ↑a ↑b)

tactic: rw  [card_map]
state_before: a b : ℕ+
⊢ card (Ioc a b) = card (map (Function.Embedding.subtype fun n => 0 < n) (Ioc a b))
Theorem: Nat.totient_even
File: Mathlib/Data/Nat/Totient.lean

tactic: haveI : Fact (1 < n) := ⟨one_lt_two.trans hn⟩
state_before: n : ℕ
hn : 2 < n
⊢ Even (φ n)

tactic: haveI : NeZero n := NeZero.of_gt hn
state_before: n : ℕ
hn : 2 < n
this : Fact (1 < n)
⊢ Even (φ n)

tactic: suffices 2 = orderOf (-1 : (ZMod n)ˣ) by
  rw [← ZMod.card_units_eq_totient, even_iff_two_dvd, this]
  exact orderOf_dvd_card_univ
state_before: n : ℕ
hn : 2 < n
this✝ : Fact (1 < n)
this : NeZero n
⊢ Even (φ n)

tactic: rw [← orderOf_units, Units.coe_neg_one, orderOf_neg_one, ringChar.eq (ZMod n) n, if_neg hn.ne']
state_before: n : ℕ
hn : 2 < n
this✝ : Fact (1 < n)
this : NeZero n
⊢ 2 = orderOf (-1)

tactic: rw [← ZMod.card_units_eq_totient, even_iff_two_dvd, this]
state_before: n : ℕ
hn : 2 < n
this✝¹ : Fact (1 < n)
this✝ : NeZero n
this : 2 = orderOf (-1)
⊢ Even (φ n)

tactic: exact orderOf_dvd_card_univ
state_before: n : ℕ
hn : 2 < n
this✝¹ : Fact (1 < n)
this✝ : NeZero n
this : 2 = orderOf (-1)
⊢ orderOf (-1) ∣ Fintype.card (ZMod n)ˣ
Theorem: Equiv.Perm.zpow_apply_eq_self_of_apply_eq_self
File: Mathlib/GroupTheory/Perm/Support.lean

tactic: rw [zpow_negSucc, inv_eq_iff_eq, pow_apply_eq_self_of_apply_eq_self hfx]
state_before: α : Type u_1
f g h : Perm α
x : α
hfx : ↑f x = x
n : ℕ
⊢ ↑(f ^ Int.negSucc n) x = x
Theorem: List.exists_le_of_prod_le'
File: Mathlib/Data/List/BigOperators/Basic.lean

tactic: contrapose! h
state_before: ι : Type u_2
α : Type ?u.101039
M : Type u_1
N : Type ?u.101045
P : Type ?u.101048
M₀ : Type ?u.101051
G : Type ?u.101054
R : Type ?u.101057
inst✝⁷ : Monoid M
inst✝⁶ : Monoid N
inst✝⁵ : Monoid P
l✝ l₁ l₂ : List M
a : 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 : prod (map f l) ≤ prod (map g l)
⊢ ∃ x, x ∈ l ∧ f x ≤ g x

tactic: exact prod_lt_prod_of_ne_nil hl _ _ h
state_before: ι : Type u_2
α : Type ?u.101039
M : Type u_1
N : Type ?u.101045
P : Type ?u.101048
M₀ : Type ?u.101051
G : Type ?u.101054
R : Type ?u.101057
inst✝⁷ : Monoid M
inst✝⁶ : Monoid N
inst✝⁵ : Monoid P
l✝ l₁ l₂ : List M
a : 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 : ι), x ∈ l → g x < f x
⊢ prod (map g l) < prod (map f l)