tasksource/leandojo huggingface dataset:
Theorem: CategoryTheory.unit_transferNatTransSelf
File: Mathlib/CategoryTheory/Adjunction/Mates.lean

tactic: dsimp [transferNatTransSelf]
state_before: C : Type u₁
D : Type u₂
inst✝¹ : Category C
inst✝ : Category D
L₁ L₂ L₃ : C ⥤ D
R₁ R₂ R₃ : D ⥤ C
adj₁ : L₁ ⊣ R₁
adj₂ : L₂ ⊣ R₂
adj₃ : L₃ ⊣ R₃
f : L₂ ⟶ L₁
X : C
⊢ adj₁.unit.app X ≫ (↑(transferNatTransSelf adj₁ adj₂) f).app (L₁.obj X) = adj₂.unit.app X ≫ R₂.map (f.app X)

tactic: rw [id_comp, comp_id]
state_before: C : Type u₁
D : Type u₂
inst✝¹ : Category C
inst✝ : Category D
L₁ L₂ L₃ : C ⥤ D
R₁ R₂ R₃ : D ⥤ C
adj₁ : L₁ ⊣ R₁
adj₂ : L₂ ⊣ R₂
adj₃ : L₃ ⊣ R₃
f : L₂ ⟶ L₁
X : C
⊢ adj₁.unit.app X ≫
      𝟙 (R₁.obj (L₁.obj X)) ≫
        (↑(transferNatTrans adj₁ adj₂) ((Functor.leftUnitor L₂).hom ≫ f ≫ (Functor.rightUnitor L₁).inv)).app
            (L₁.obj X) ≫
          𝟙 (R₂.obj (L₁.obj X)) =
    adj₂.unit.app X ≫ R₂.map (f.app X)

tactic: have := unit_transferNatTrans adj₁ adj₂ (L₂.leftUnitor.hom ≫ f ≫ L₁.rightUnitor.inv) X
state_before: C : Type u₁
D : Type u₂
inst✝¹ : Category C
inst✝ : Category D
L₁ L₂ L₃ : C ⥤ D
R₁ R₂ R₃ : D ⥤ C
adj₁ : L₁ ⊣ R₁
adj₂ : L₂ ⊣ R₂
adj₃ : L₃ ⊣ R₃
f : L₂ ⟶ L₁
X : C
⊢ adj₁.unit.app X ≫
      (↑(transferNatTrans adj₁ adj₂) ((Functor.leftUnitor L₂).hom ≫ f ≫ (Functor.rightUnitor L₁).inv)).app (L₁.obj X) =
    adj₂.unit.app X ≫ R₂.map (f.app X)

tactic: dsimp at this
state_before: C : Type u₁
D : Type u₂
inst✝¹ : Category C
inst✝ : Category D
L₁ L₂ L₃ : C ⥤ D
R₁ R₂ R₃ : D ⥤ C
adj₁ : L₁ ⊣ R₁
adj₂ : L₂ ⊣ R₂
adj₃ : L₃ ⊣ R₃
f : L₂ ⟶ L₁
X : C
this :
  (𝟭 C).map (adj₁.unit.app X) ≫
      (↑(transferNatTrans adj₁ adj₂) ((Functor.leftUnitor L₂).hom ≫ f ≫ (Functor.rightUnitor L₁).inv)).app (L₁.obj X) =
    adj₂.unit.app ((𝟭 C).obj ((𝟭 C).obj X)) ≫
      R₂.map (((Functor.leftUnitor L₂).hom ≫ f ≫ (Functor.rightUnitor L₁).inv).app ((𝟭 C).obj X))
⊢ adj₁.unit.app X ≫
      (↑(transferNatTrans adj₁ adj₂) ((Functor.leftUnitor L₂).hom ≫ f ≫ (Functor.rightUnitor L₁).inv)).app (L₁.obj X) =
    adj₂.unit.app X ≫ R₂.map (f.app X)

tactic: rw [this]
state_before: C : Type u₁
D : Type u₂
inst✝¹ : Category C
inst✝ : Category D
L₁ L₂ L₃ : C ⥤ D
R₁ R₂ R₃ : D ⥤ C
adj₁ : L₁ ⊣ R₁
adj₂ : L₂ ⊣ R₂
adj₃ : L₃ ⊣ R₃
f : L₂ ⟶ L₁
X : C
this :
  adj₁.unit.app X ≫
      (↑(transferNatTrans adj₁ adj₂) ((Functor.leftUnitor L₂).hom ≫ f ≫ (Functor.rightUnitor L₁).inv)).app (L₁.obj X) =
    adj₂.unit.app X ≫ R₂.map (𝟙 (L₂.obj X) ≫ f.app X ≫ 𝟙 (L₁.obj X))
⊢ adj₁.unit.app X ≫
      (↑(transferNatTrans adj₁ adj₂) ((Functor.leftUnitor L₂).hom ≫ f ≫ (Functor.rightUnitor L₁).inv)).app (L₁.obj X) =
    adj₂.unit.app X ≫ R₂.map (f.app X)

tactic: simp
state_before: C : Type u₁
D : Type u₂
inst✝¹ : Category C
inst✝ : Category D
L₁ L₂ L₃ : C ⥤ D
R₁ R₂ R₃ : D ⥤ C
adj₁ : L₁ ⊣ R₁
adj₂ : L₂ ⊣ R₂
adj₃ : L₃ ⊣ R₃
f : L₂ ⟶ L₁
X : C
this :
  adj₁.unit.app X ≫
      (↑(transferNatTrans adj₁ adj₂) ((Functor.leftUnitor L₂).hom ≫ f ≫ (Functor.rightUnitor L₁).inv)).app (L₁.obj X) =
    adj₂.unit.app X ≫ R₂.map (𝟙 (L₂.obj X) ≫ f.app X ≫ 𝟙 (L₁.obj X))
⊢ adj₂.unit.app X ≫ R₂.map (𝟙 (L₂.obj X) ≫ f.app X ≫ 𝟙 (L₁.obj X)) = adj₂.unit.app X ≫ R₂.map (f.app X)
Theorem: div_lt_self
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: simpa only [div_one] using div_lt_div_of_lt_left ha zero_lt_one hb
state_before: ι : Type ?u.73311
α : Type u_1
β : Type ?u.73317
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
ha : 0 < a
hb : 1 < b
⊢ a / b < a
Theorem: zero_cpow_eq_nhds
File: Mathlib/Analysis/SpecialFunctions/Pow/Continuity.lean

tactic: suffices : ∀ᶠ x : ℂ in 𝓝 b, x ≠ 0
state_before: α : Type ?u.1960
b : ℂ
hb : b ≠ 0
⊢ (fun x => 0 ^ x) =ᶠ[𝓝 b] 0

tactic: exact
  this.mono fun x hx => by
    dsimp only
    rw [zero_cpow hx, Pi.zero_apply]
state_before: α : Type ?u.1960
b : ℂ
hb : b ≠ 0
this : ∀ᶠ (x : ℂ) in 𝓝 b, x ≠ 0
⊢ (fun x => 0 ^ x) =ᶠ[𝓝 b] 0

case this
α : Type ?u.1960
b : ℂ
hb : b ≠ 0
⊢ ∀ᶠ (x : ℂ) in 𝓝 b, x ≠ 0

tactic: exact IsOpen.eventually_mem isOpen_ne hb
state_before: case this
α : Type ?u.1960
b : ℂ
hb : b ≠ 0
⊢ ∀ᶠ (x : ℂ) in 𝓝 b, x ≠ 0

tactic: dsimp only
state_before: α : Type ?u.1960
b : ℂ
hb : b ≠ 0
this : ∀ᶠ (x : ℂ) in 𝓝 b, x ≠ 0
x : ℂ
hx : x ≠ 0
⊢ (fun x => 0 ^ x) x = OfNat.ofNat 0 x

tactic: rw [zero_cpow hx, Pi.zero_apply]
state_before: α : Type ?u.1960
b : ℂ
hb : b ≠ 0
this : ∀ᶠ (x : ℂ) in 𝓝 b, x ≠ 0
x : ℂ
hx : x ≠ 0
⊢ 0 ^ x = OfNat.ofNat 0 x
Theorem: UpperSet.mem_map
File: Mathlib/Order/UpperLower/Basic.lean

tactic: rw [← f.symm_symm, ← symm_map, f.symm_symm]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.96866
ι : Sort ?u.96869
κ : ι → Sort ?u.96874
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α ≃o β
s t : UpperSet α
a : α
b : β
⊢ b ∈ ↑(map f) s ↔ ↑(OrderIso.symm f) b ∈ s

tactic: rfl
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.96866
ι : Sort ?u.96869
κ : ι → Sort ?u.96874
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α ≃o β
s t : UpperSet α
a : α
b : β
⊢ b ∈ ↑(OrderIso.symm (map (OrderIso.symm f))) s ↔ ↑(OrderIso.symm f) b ∈ s
Theorem: Finset.Ico_eq_empty_iff
File: Mathlib/Data/Finset/LocallyFinite.lean

tactic: rw [← coe_eq_empty, coe_Ico, Set.Ico_eq_empty_iff]
state_before: ι : Type ?u.1461
α : Type u_1
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ Ico a b = ∅ ↔ ¬a < b
Theorem: SimpleGraph.dist_self
File: Mathlib/Combinatorics/SimpleGraph/Metric.lean

tactic: simp
state_before: V : Type u_1
G : SimpleGraph V
v : V
⊢ dist G v v = 0
Theorem: SameRay.exists_pos_left
File: Mathlib/LinearAlgebra/Ray.lean

tactic: rw [mul_smul, h, inv_smul_smul₀ hr₂.ne']
state_before: R : Type u_1
inst✝² : LinearOrderedField R
M : Type u_2
inst✝¹ : AddCommGroup M
inst✝ : Module R M
x y v₁ v₂ : M
h✝ : SameRay R x y
hx : x ≠ 0
hy : y ≠ 0
r₁ r₂ : R
hr₁ : 0 < r₁
hr₂ : 0 < r₂
h : r₁ • x = r₂ • y
⊢ (r₂⁻¹ * r₁) • x = y
Theorem: Int.gcd_mul_right
File: Mathlib/Data/Int/GCD.lean

tactic: rw [Int.gcd, Int.gcd, natAbs_mul, natAbs_mul]
state_before: i j k : ℤ
⊢ gcd (i * j) (k * j) = gcd i k * natAbs j

tactic: apply Nat.gcd_mul_right
state_before: i j k : ℤ
⊢ Nat.gcd (natAbs i * natAbs j) (natAbs k * natAbs j) = Nat.gcd (natAbs i) (natAbs k) * natAbs j
Theorem: IsSubfield.div_mem
File: Mathlib/Deprecated/Subfield.lean

tactic: rw [div_eq_mul_inv]
state_before: F : Type u_1
inst✝ : Field F
S✝ S : Set F
hS : IsSubfield S
x y : F
hx : x ∈ S
hy : y ∈ S
⊢ x / y ∈ S

tactic: exact hS.toIsSubring.toIsSubmonoid.mul_mem hx (hS.inv_mem hy)
state_before: F : Type u_1
inst✝ : Field F
S✝ S : Set F
hS : IsSubfield S
x y : F
hx : x ∈ S
hy : y ∈ S
⊢ x * y⁻¹ ∈ S
Theorem: Associates.count_zero
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: dsimp only [count]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : DecidableEq (Associates α)
p : Associates α
hp : Irreducible p
⊢ count p 0 = 0

tactic: split_ifs
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : DecidableEq (Associates α)
p : Associates α
hp : Irreducible p
⊢ dite (Irreducible p) (fun hp => bcount { val := p, property := hp }) (fun hp => 0) 0 = 0

tactic: rfl
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : DecidableEq (Associates α)
p : Associates α
hp : Irreducible p
⊢ bcount { val := p, property := hp } 0 = 0
Theorem: CategoryTheory.Core.id_hom
File: Mathlib/CategoryTheory/Core.lean

tactic: rfl
state_before: C : Type u₁
inst✝ : Category C
X : C
⊢ (𝟙 X).hom = 𝟙 X
Theorem: Nat.mem_properDivisors_prime_pow
File: Mathlib/NumberTheory/Divisors.lean

tactic: rw [mem_properDivisors, Nat.dvd_prime_pow pp, ← exists_and_right]
state_before: n p : ℕ
pp : Prime p
k x : ℕ
⊢ x ∈ properDivisors (p ^ k) ↔ ∃ j x_1, x = p ^ j

tactic: simp only [exists_prop, and_assoc]
state_before: n p : ℕ
pp : Prime p
k x : ℕ
⊢ (∃ x_1, (x_1 ≤ k ∧ x = p ^ x_1) ∧ x < p ^ k) ↔ ∃ j x_1, x = p ^ j

tactic: apply exists_congr
state_before: n p : ℕ
pp : Prime p
k x : ℕ
⊢ (∃ x_1, x_1 ≤ k ∧ x = p ^ x_1 ∧ x < p ^ k) ↔ ∃ j, j < k ∧ x = p ^ j

tactic: intro a
state_before: case h
n p : ℕ
pp : Prime p
k x : ℕ
⊢ ∀ (a : ℕ), a ≤ k ∧ x = p ^ a ∧ x < p ^ k ↔ a < k ∧ x = p ^ a

tactic: constructor <;> intro h
state_before: case h
n p : ℕ
pp : Prime p
k x a : ℕ
⊢ a ≤ k ∧ x = p ^ a ∧ x < p ^ k ↔ a < k ∧ x = p ^ a

tactic: rcases h with ⟨_h_left, rfl, h_right⟩
state_before: case h.mp
n p : ℕ
pp : Prime p
k x a : ℕ
h : a ≤ k ∧ x = p ^ a ∧ x < p ^ k
⊢ a < k ∧ x = p ^ a

tactic: rw [pow_lt_pow_iff pp.one_lt] at h_right
state_before: case h.mp.intro.intro
n p : ℕ
pp : Prime p
k a : ℕ
_h_left : a ≤ k
h_right : p ^ a < p ^ k
⊢ a < k ∧ p ^ a = p ^ a

tactic: exact ⟨h_right, by rfl⟩
state_before: case h.mp.intro.intro
n p : ℕ
pp : Prime p
k a : ℕ
_h_left : a ≤ k
h_right : a < k
⊢ a < k ∧ p ^ a = p ^ a

tactic: rfl
state_before: n p : ℕ
pp : Prime p
k a : ℕ
_h_left : a ≤ k
h_right : a < k
⊢ p ^ a = p ^ a

tactic: rcases h with ⟨h_left, rfl⟩
state_before: case h.mpr
n p : ℕ
pp : Prime p
k x a : ℕ
h : a < k ∧ x = p ^ a
⊢ a ≤ k ∧ x = p ^ a ∧ x < p ^ k

tactic: rw [pow_lt_pow_iff pp.one_lt]
state_before: case h.mpr.intro
n p : ℕ
pp : Prime p
k a : ℕ
h_left : a < k
⊢ a ≤ k ∧ p ^ a = p ^ a ∧ p ^ a < p ^ k

tactic: simp [h_left, le_of_lt]
state_before: case h.mpr.intro
n p : ℕ
pp : Prime p
k a : ℕ
h_left : a < k
⊢ a ≤ k ∧ p ^ a = p ^ a ∧ a < k
Theorem: Polynomial.isCoprime_map
File: Mathlib/Data/Polynomial/FieldDivision.lean

tactic: rw [← EuclideanDomain.gcd_isUnit_iff, ← EuclideanDomain.gcd_isUnit_iff, gcd_map, isUnit_map]
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝¹ : Field R
p q : R[X]
inst✝ : Field k
f : R →+* k
⊢ IsCoprime (map f p) (map f q) ↔ IsCoprime p q
Theorem: MeasureTheory.snorm_one_add_measure
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: simp_rw [snorm_one_eq_lintegral_nnnorm]
state_before: α : Type u_1
E : Type ?u.2308880
F : Type u_2
G : Type ?u.2308886
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ✝ ν✝ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
μ ν : Measure α
⊢ snorm f 1 (μ + ν) = snorm f 1 μ + snorm f 1 ν

tactic: rw [lintegral_add_measure _ μ ν]
state_before: α : Type u_1
E : Type ?u.2308880
F : Type u_2
G : Type ?u.2308886
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ✝ ν✝ : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
μ ν : Measure α
⊢ (∫⁻ (x : α), ↑‖f x‖₊ ∂μ + ν) = (∫⁻ (x : α), ↑‖f x‖₊ ∂μ) + ∫⁻ (x : α), ↑‖f x‖₊ ∂ν
Theorem: Real.cos_lt_cos_of_nonneg_of_le_pi_div_two
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: rw [← sub_lt_zero, cos_sub_cos]
state_before: x y : ℝ
hx₁ : 0 ≤ x
hy₂ : y ≤ π / 2
hxy : x < y
⊢ cos y < cos x

tactic: have : 0 < sin ((y + x) / 2) := by refine' sin_pos_of_pos_of_lt_pi _ _ <;> linarith
state_before: x y : ℝ
hx₁ : 0 ≤ x
hy₂ : y ≤ π / 2
hxy : x < y
⊢ -2 * sin ((y + x) / 2) * sin ((y - x) / 2) < 0

tactic: have : 0 < sin ((y - x) / 2) := by refine' sin_pos_of_pos_of_lt_pi _ _ <;> linarith
state_before: x y : ℝ
hx₁ : 0 ≤ x
hy₂ : y ≤ π / 2
hxy : x < y
this : 0 < sin ((y + x) / 2)
⊢ -2 * sin ((y + x) / 2) * sin ((y - x) / 2) < 0

tactic: nlinarith
state_before: x y : ℝ
hx₁ : 0 ≤ x
hy₂ : y ≤ π / 2
hxy : x < y
this✝ : 0 < sin ((y + x) / 2)
this : 0 < sin ((y - x) / 2)
⊢ -2 * sin ((y + x) / 2) * sin ((y - x) / 2) < 0

tactic: refine' sin_pos_of_pos_of_lt_pi _ _ <;> linarith
state_before: x y : ℝ
hx₁ : 0 ≤ x
hy₂ : y ≤ π / 2
hxy : x < y
⊢ 0 < sin ((y + x) / 2)

tactic: refine' sin_pos_of_pos_of_lt_pi _ _ <;> linarith
state_before: x y : ℝ
hx₁ : 0 ≤ x
hy₂ : y ≤ π / 2
hxy : x < y
this : 0 < sin ((y + x) / 2)
⊢ 0 < sin ((y - x) / 2)
Theorem: sq_eq_sq
File: Mathlib/Algebra/GroupPower/Order.lean

tactic: decide
state_before: β : Type ?u.244980
A : Type ?u.244983
G : Type ?u.244986
M : Type ?u.244989
R : Type u_1
inst✝ : LinearOrderedSemiring R
a✝ b✝ a b : R
ha : 0 ≤ a
hb : 0 ≤ b
⊢ 0 < 2
Theorem: Cardinal.IsLimit.aleph0_le
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: by_contra' h'
state_before: α β : Type u
c : Cardinal
h : IsLimit c
⊢ ℵ₀ ≤ c

tactic: rcases lt_aleph0.1 h' with ⟨_ | n, rfl⟩
state_before: α β : Type u
c : Cardinal
h : IsLimit c
h' : c < ℵ₀
⊢ False

tactic: exact h.ne_zero.irrefl
state_before: case intro.zero
α β : Type u
h : IsLimit ↑Nat.zero
h' : ↑Nat.zero < ℵ₀
⊢ False

tactic: rw [nat_succ] at h
state_before: case intro.succ
α β : Type u
n : ℕ
h : IsLimit ↑(Nat.succ n)
h' : ↑(Nat.succ n) < ℵ₀
⊢ False

tactic: exact not_isSuccLimit_succ _ h.isSuccLimit
state_before: case intro.succ
α β : Type u
n : ℕ
h : IsLimit (succ ↑n)
h' : ↑(Nat.succ n) < ℵ₀
⊢ False
Theorem: RightDerivMeasurableAux.norm_sub_le_of_mem_a
File: Mathlib/Analysis/Calculus/FDerivMeasurable.lean

tactic: suffices H : ‖(r / 2) • (L₁ - L₂)‖ ≤ r / 2 * (4 * ε)
state_before: F : Type u_1
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : ℝ → F
K : Set F
r x : ℝ
hr : 0 < r
ε : ℝ
L₁ L₂ : F
h₁ : x ∈ A f L₁ r ε
h₂ : x ∈ A f L₂ r ε
⊢ ‖L₁ - L₂‖ ≤ 4 * ε

tactic: rwa [norm_smul, Real.norm_of_nonneg (half_pos hr).le, mul_le_mul_left (half_pos hr)] at H
state_before: F : Type u_1
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : ℝ → F
K : Set F
r x : ℝ
hr : 0 < r
ε : ℝ
L₁ L₂ : F
h₁ : x ∈ A f L₁ r ε
h₂ : x ∈ A f L₂ r ε
H : ‖(r / 2) • (L₁ - L₂)‖ ≤ r / 2 * (4 * ε)
⊢ ‖L₁ - L₂‖ ≤ 4 * ε

tactic: simp [smul_sub]
state_before: F : Type u_1
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : ℝ → F
K : Set F
r x : ℝ
hr : 0 < r
ε : ℝ
L₁ L₂ : F
h₁ : x ∈ A f L₁ r ε
h₂ : x ∈ A f L₂ r ε
⊢ ‖(r / 2) • (L₁ - L₂)‖ = ‖f (x + r / 2) - f x - (x + r / 2 - x) • L₂ - (f (x + r / 2) - f x - (x + r / 2 - x) • L₁)‖

tactic: apply add_le_add
state_before: F : Type u_1
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : ℝ → F
K : Set F
r x : ℝ
hr : 0 < r
ε : ℝ
L₁ L₂ : F
h₁ : x ∈ A f L₁ r ε
h₂ : x ∈ A f L₂ r ε
⊢ ‖f (x + r / 2) - f x - (x + r / 2 - x) • L₂‖ + ‖f (x + r / 2) - f x - (x + r / 2 - x) • L₁‖ ≤ ε * r + ε * r

tactic: apply le_of_mem_a h₂ <;> simp [(half_pos hr).le]
state_before: case h₁
F : Type u_1
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : ℝ → F
K : Set F
r x : ℝ
hr : 0 < r
ε : ℝ
L₁ L₂ : F
h₁ : x ∈ A f L₁ r ε
h₂ : x ∈ A f L₂ r ε
⊢ ‖f (x + r / 2) - f x - (x + r / 2 - x) • L₂‖ ≤ ε * r

tactic: apply le_of_mem_a h₁ <;> simp [(half_pos hr).le]
state_before: case h₂
F : Type u_1
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : ℝ → F
K : Set F
r x : ℝ
hr : 0 < r
ε : ℝ
L₁ L₂ : F
h₁ : x ∈ A f L₁ r ε
h₂ : x ∈ A f L₂ r ε
⊢ ‖f (x + r / 2) - f x - (x + r / 2 - x) • L₁‖ ≤ ε * r

tactic: ring
state_before: F : Type u_1
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : ℝ → F
K : Set F
r x : ℝ
hr : 0 < r
ε : ℝ
L₁ L₂ : F
h₁ : x ∈ A f L₁ r ε
h₂ : x ∈ A f L₂ r ε
⊢ ε * r + ε * r = r / 2 * (4 * ε)
Theorem: num_isRoot_scaleRoots_of_aeval_eq_zero
File: Mathlib/RingTheory/Polynomial/RationalRoot.lean

tactic: apply isRoot_of_eval₂_map_eq_zero (IsFractionRing.injective A K)
state_before: A : Type u_1
K : Type u_2
R : Type ?u.42738
S : Type ?u.42741
inst✝⁹ : CommRing A
inst✝⁸ : Field K
inst✝⁷ : CommRing R
inst✝⁶ : CommRing S
M : Submonoid A
inst✝⁵ : Algebra A S
inst✝⁴ : IsLocalization M S
inst✝³ : Algebra A K
inst✝² : IsFractionRing A K
inst✝¹ : IsDomain A
inst✝ : UniqueFactorizationMonoid A
p : A[X]
x : K
hr : ↑(aeval x) p = 0
⊢ IsRoot (scaleRoots p ↑(den A x)) (num A x)

tactic: refine' scaleRoots_aeval_eq_zero_of_aeval_mk'_eq_zero _
state_before: A : Type u_1
K : Type u_2
R : Type ?u.42738
S : Type ?u.42741
inst✝⁹ : CommRing A
inst✝⁸ : Field K
inst✝⁷ : CommRing R
inst✝⁶ : CommRing S
M : Submonoid A
inst✝⁵ : Algebra A S
inst✝⁴ : IsLocalization M S
inst✝³ : Algebra A K
inst✝² : IsFractionRing A K
inst✝¹ : IsDomain A
inst✝ : UniqueFactorizationMonoid A
p : A[X]
x : K
hr : ↑(aeval x) p = 0
⊢ eval₂ (algebraMap A K) (↑(algebraMap A K) (num A x)) (scaleRoots p ↑(den A x)) = 0

tactic: rw [mk'_num_den]
state_before: A : Type u_1
K : Type u_2
R : Type ?u.42738
S : Type ?u.42741
inst✝⁹ : CommRing A
inst✝⁸ : Field K
inst✝⁷ : CommRing R
inst✝⁶ : CommRing S
M : Submonoid A
inst✝⁵ : Algebra A S
inst✝⁴ : IsLocalization M S
inst✝³ : Algebra A K
inst✝² : IsFractionRing A K
inst✝¹ : IsDomain A
inst✝ : UniqueFactorizationMonoid A
p : A[X]
x : K
hr : ↑(aeval x) p = 0
⊢ ↑(aeval (mk' K (num A x) (den A x))) p = 0

tactic: exact hr
state_before: A : Type u_1
K : Type u_2
R : Type ?u.42738
S : Type ?u.42741
inst✝⁹ : CommRing A
inst✝⁸ : Field K
inst✝⁷ : CommRing R
inst✝⁶ : CommRing S
M : Submonoid A
inst✝⁵ : Algebra A S
inst✝⁴ : IsLocalization M S
inst✝³ : Algebra A K
inst✝² : IsFractionRing A K
inst✝¹ : IsDomain A
inst✝ : UniqueFactorizationMonoid A
p : A[X]
x : K
hr : ↑(aeval x) p = 0
⊢ ↑(aeval x) p = 0
Theorem: Convex.strictConvex
File: Mathlib/Analysis/Convex/Topology.lean

tactic: refine' hs.strictConvex' <| h.imp_on fun x hx y hy _ => _
state_before: ι : Type ?u.151565
𝕜 : Type u_2
E : Type u_1
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : Convex 𝕜 s
h : Set.Pairwise (s \ interior s) fun x y => Set.Nonempty ([x-[𝕜]y] \ frontier s)
⊢ StrictConvex 𝕜 s

tactic: simp only [segment_eq_image_lineMap, ← self_diff_frontier]
state_before: ι : Type ?u.151565
𝕜 : Type u_2
E : Type u_1
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : Convex 𝕜 s
h : Set.Pairwise (s \ interior s) fun x y => Set.Nonempty ([x-[𝕜]y] \ frontier s)
x : E
hx : x ∈ s \ interior s
y : E
hy : y ∈ s \ interior s
x✝ : x ≠ y
⊢ fun ⦃a b⦄ => Set.Nonempty ([a-[𝕜]b] \ frontier s) → ∃ c, ↑(lineMap a b) c ∈ interior s

tactic: rintro ⟨_, ⟨⟨c, hc, rfl⟩, hcs⟩⟩
state_before: ι : Type ?u.151565
𝕜 : Type u_2
E : Type u_1
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : Convex 𝕜 s
h : Set.Pairwise (s \ interior s) fun x y => Set.Nonempty ([x-[𝕜]y] \ frontier s)
x : E
hx : x ∈ s \ interior s
y : E
hy : y ∈ s \ interior s
x✝ : x ≠ y
⊢ Set.Nonempty ((fun a => ↑(lineMap x y) a) '' Icc 0 1 \ frontier s) → ∃ c, ↑(lineMap x y) c ∈ s \ frontier s

tactic: refine' ⟨c, hs.segment_subset hx.1 hy.1 _, hcs⟩
state_before: case intro.intro.intro.intro
ι : Type ?u.151565
𝕜 : Type u_2
E : Type u_1
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : Convex 𝕜 s
h : Set.Pairwise (s \ interior s) fun x y => Set.Nonempty ([x-[𝕜]y] \ frontier s)
x : E
hx : x ∈ s \ interior s
y : E
hy : y ∈ s \ interior s
x✝ : x ≠ y
c : 𝕜
hc : c ∈ Icc 0 1
hcs : ¬(fun a => ↑(lineMap x y) a) c ∈ frontier s
⊢ ∃ c, ↑(lineMap x y) c ∈ s \ frontier s

tactic: exact (segment_eq_image_lineMap 𝕜 x y).symm ▸ mem_image_of_mem _ hc
state_before: case intro.intro.intro.intro
ι : Type ?u.151565
𝕜 : Type u_2
E : Type u_1
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : Module 𝕜 E
inst✝² : TopologicalSpace E
inst✝¹ : TopologicalAddGroup E
inst✝ : ContinuousConstSMul 𝕜 E
s : Set E
hs : Convex 𝕜 s
h : Set.Pairwise (s \ interior s) fun x y => Set.Nonempty ([x-[𝕜]y] \ frontier s)
x : E
hx : x ∈ s \ interior s
y : E
hy : y ∈ s \ interior s
x✝ : x ≠ y
c : 𝕜
hc : c ∈ Icc 0 1
hcs : ¬(fun a => ↑(lineMap x y) a) c ∈ frontier s
⊢ ↑(lineMap x y) c ∈ [x-[𝕜]y]
Theorem: abs_pow_eq_one
File: Mathlib/Algebra/GroupPower/Order.lean

tactic: convert pow_left_inj (abs_nonneg a) zero_le_one h
state_before: β : Type ?u.248186
A : Type ?u.248189
G : Type ?u.248192
M : Type ?u.248195
R : Type u_1
inst✝ : LinearOrderedRing R
a : R
n : ℕ
h : 0 < n
⊢ abs (a ^ n) = 1 ↔ abs a = 1

tactic: exacts [(pow_abs _ _).symm, (one_pow _).symm]
state_before: case h.e'_1.h.e'_2
β : Type ?u.248186
A : Type ?u.248189
G : Type ?u.248192
M : Type ?u.248195
R : Type u_1
inst✝ : LinearOrderedRing R
a : R
n : ℕ
h : 0 < n
⊢ abs (a ^ n) = abs a ^ n

case h.e'_1.h.e'_3
β : Type ?u.248186
A : Type ?u.248189
G : Type ?u.248192
M : Type ?u.248195
R : Type u_1
inst✝ : LinearOrderedRing R
a : R
n : ℕ
h : 0 < n
⊢ 1 = 1 ^ n
Theorem: inv_pow_sub
File: Mathlib/Algebra/GroupPower/Basic.lean

tactic: rw [pow_sub a⁻¹ h, inv_pow, inv_pow, inv_inv]
state_before: α : Type ?u.100696
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✝³ : Group G
inst✝² : Group H
inst✝¹ : AddGroup A
inst✝ : AddGroup B
a : G
m n : ℕ
h : n ≤ m
⊢ a⁻¹ ^ (m - n) = (a ^ m)⁻¹ * a ^ n
Theorem: PiLp.norm_eq_of_nat
File: Mathlib/Analysis/NormedSpace/PiLp.lean

tactic: have := p.toReal_pos_iff_ne_top.mpr (ne_of_eq_of_ne h <| ENNReal.nat_ne_top n)
state_before: p✝ : ℝ≥0∞
𝕜 : Type ?u.242156
𝕜' : Type ?u.242159
ι : Type u_2
α : ι → Type ?u.242167
β✝ : ι → Type ?u.242172
inst✝³ : Fintype ι
inst✝² : Fact (1 ≤ p✝)
p : ℝ≥0∞
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_1
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
n : ℕ
h : p = ↑n
f : PiLp p β
⊢ ‖f‖ = (∑ i : ι, ‖f i‖ ^ n) ^ (1 / ↑n)

tactic: simp only [one_div, h, Real.rpow_nat_cast, ENNReal.toReal_nat, eq_self_iff_true, Finset.sum_congr,
  norm_eq_sum this]
state_before: p✝ : ℝ≥0∞
𝕜 : Type ?u.242156
𝕜' : Type ?u.242159
ι : Type u_2
α : ι → Type ?u.242167
β✝ : ι → Type ?u.242172
inst✝³ : Fintype ι
inst✝² : Fact (1 ≤ p✝)
p : ℝ≥0∞
inst✝¹ : Fact (1 ≤ p)
β : ι → Type u_1
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
n : ℕ
h : p = ↑n
f : PiLp p β
this : 0 < ENNReal.toReal p
⊢ ‖f‖ = (∑ i : ι, ‖f i‖ ^ n) ^ (1 / ↑n)
Theorem: Multiset.prod_X_sub_C_dvd_iff_le_roots
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: rw [count_roots, le_rootMultiplicity_iff hp, ← Multiset.prod_replicate, ←
  Multiset.map_replicate fun a => X - C a, ← Multiset.filter_eq]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
hp : p ≠ 0
s : Multiset R
h : Multiset.prod (Multiset.map (fun a => X - ↑C a) s) ∣ p
r : R
⊢ Multiset.count r s ≤ Multiset.count r (roots p)

tactic: exact (Multiset.prod_dvd_prod_of_le <| Multiset.map_le_map <| s.filter_le _).trans h
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
hp : p ≠ 0
s : Multiset R
h : Multiset.prod (Multiset.map (fun a => X - ↑C a) s) ∣ p
r : R
⊢ Multiset.prod (Multiset.map (fun a => X - ↑C a) (Multiset.filter (Eq r) s)) ∣ p
Theorem: Ordinal.mex_le_of_ne
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: simp [ha]
state_before: α : Type ?u.376135
β : Type ?u.376138
γ : Type ?u.376141
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u_1
f : ι → Ordinal
a : Ordinal
ha : ∀ (i : ι), f i ≠ a
⊢ a ∈ range fᶜ
Theorem: Partrec.sum_casesOn_right
File: Mathlib/Computability/Partrec.lean

tactic: cases f a <;> simp
state_before: α : Type u_4
β : Type u_1
γ : Type u_2
σ : Type u_3
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : α → β ⊕ γ
g : α → β → σ
h : α → γ →. σ
hf : Computable f
hg : Computable₂ g
hh : Partrec₂ h
this :
  Partrec fun a =>
    Option.casesOn (Sum.casesOn (f a) (fun x => Option.none) Option.some)
      (Part.some (Sum.casesOn (f a) (fun b => Option.some (g a b)) fun x => Option.none)) fun c =>
      Part.map Option.some (h a c)
a : α
⊢ (Option.casesOn (Sum.casesOn (f a) (fun x => Option.none) Option.some)
      (Part.some (Sum.casesOn (f a) (fun b => Option.some (g a b)) fun x => Option.none)) fun c =>
      Part.map Option.some (h a c)) =
    Part.map Option.some (Sum.casesOn (f a) (fun b => Part.some (g a b)) (h a))