tasksource/leandojo huggingface dataset:
Theorem: NormedAddGroupHom.le_opNorm
File: Mathlib/Analysis/Normed/Group/Hom.lean

tactic: obtain ⟨C, _Cpos, hC⟩ := f.bound
state_before: V : Type ?u.224218
V₁ : Type u_2
V₂ : Type u_1
V₃ : Type ?u.224227
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f g : NormedAddGroupHom V₁ V₂
x : V₁
⊢ ‖↑f x‖ ≤ ‖f‖ * ‖x‖

tactic: replace hC := hC x
state_before: case intro.intro
V : Type ?u.224218
V₁ : Type u_2
V₂ : Type u_1
V₃ : Type ?u.224227
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f g : NormedAddGroupHom V₁ V₂
x : V₁
C : ℝ
_Cpos : 0 < C
hC : ∀ (x : V₁), ‖↑f x‖ ≤ C * ‖x‖
⊢ ‖↑f x‖ ≤ ‖f‖ * ‖x‖

tactic: by_cases h : ‖x‖ = 0
state_before: case intro.intro
V : Type ?u.224218
V₁ : Type u_2
V₂ : Type u_1
V₃ : Type ?u.224227
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f g : NormedAddGroupHom V₁ V₂
x : V₁
C : ℝ
_Cpos : 0 < C
hC : ‖↑f x‖ ≤ C * ‖x‖
⊢ ‖↑f x‖ ≤ ‖f‖ * ‖x‖

tactic: have hlt : 0 < ‖x‖ := lt_of_le_of_ne (norm_nonneg x) (Ne.symm h)
state_before: case neg
V : Type ?u.224218
V₁ : Type u_2
V₂ : Type u_1
V₃ : Type ?u.224227
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f g : NormedAddGroupHom V₁ V₂
x : V₁
C : ℝ
_Cpos : 0 < C
hC : ‖↑f x‖ ≤ C * ‖x‖
h : ¬‖x‖ = 0
⊢ ‖↑f x‖ ≤ ‖f‖ * ‖x‖

tactic: exact
  (div_le_iff hlt).mp
    (le_csInf bounds_nonempty fun c ⟨_, hc⟩ => (div_le_iff hlt).mpr <| by apply hc)
state_before: case neg
V : Type ?u.224218
V₁ : Type u_2
V₂ : Type u_1
V₃ : Type ?u.224227
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f g : NormedAddGroupHom V₁ V₂
x : V₁
C : ℝ
_Cpos : 0 < C
hC : ‖↑f x‖ ≤ C * ‖x‖
h : ¬‖x‖ = 0
hlt : 0 < ‖x‖
⊢ ‖↑f x‖ ≤ ‖f‖ * ‖x‖

tactic: rwa [h, mul_zero] at hC⊢
state_before: case pos
V : Type ?u.224218
V₁ : Type u_2
V₂ : Type u_1
V₃ : Type ?u.224227
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f g : NormedAddGroupHom V₁ V₂
x : V₁
C : ℝ
_Cpos : 0 < C
hC : ‖↑f x‖ ≤ C * ‖x‖
h : ‖x‖ = 0
⊢ ‖↑f x‖ ≤ ‖f‖ * ‖x‖

tactic: apply hc
state_before: V : Type ?u.224218
V₁ : Type u_2
V₂ : Type u_1
V₃ : Type ?u.224227
inst✝³ : SeminormedAddCommGroup V
inst✝² : SeminormedAddCommGroup V₁
inst✝¹ : SeminormedAddCommGroup V₂
inst✝ : SeminormedAddCommGroup V₃
f g : NormedAddGroupHom V₁ V₂
x : V₁
C : ℝ
_Cpos : 0 < C
hC : ‖↑f x‖ ≤ C * ‖x‖
h : ¬‖x‖ = 0
hlt : 0 < ‖x‖
c : ℝ
x✝ : c ∈ {c | 0 ≤ c ∧ ∀ (x : V₁), ‖↑f x‖ ≤ c * ‖x‖}
left✝ : 0 ≤ c
hc : ∀ (x : V₁), ‖↑f x‖ ≤ c * ‖x‖
⊢ ‖↑f x‖ ≤ c * ‖x‖
Theorem: MeasureTheory.integrableOn_Ioi_comp_rpow_iff'
File: Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean

tactic: simpa only [← integrableOn_Ioi_comp_rpow_iff f hp, mul_smul] using
  (integrable_smul_iff (abs_pos.mpr hp).ne' _).symm
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : ℝ → E
p : ℝ
hp : p ≠ 0
⊢ IntegrableOn (fun x => x ^ (p - 1) • f (x ^ p)) (Ioi 0) ↔ IntegrableOn f (Ioi 0)
Theorem: List.removeNth_eq_nth_tail
File: Std/Data/List/Lemmas.lean

tactic: cases l <;> rfl
state_before: α : Type u_1
l : List α
⊢ removeNth l 0 = modifyNthTail tail 0 l
Theorem: OrderIso.isLUB_preimage'
File: Mathlib/Order/Bounds/OrderIso.lean

tactic: rw [isLUB_preimage, f.apply_symm_apply]
state_before: α : Type u_2
β : Type u_1
inst✝¹ : Preorder α
inst✝ : Preorder β
f : α ≃o β
s : Set β
x : β
⊢ IsLUB (↑f ⁻¹' s) (↑(symm f) x) ↔ IsLUB s x
Theorem: StrictMonoOn.eq_iff_eq
File: Mathlib/Order/Monotone/Basic.lean

tactic: rintro rfl
state_before: ι : Type ?u.27119
α : Type u
β : Type v
γ : Type w
δ : Type ?u.27128
π : ι → Type ?u.27133
r : α → α → Prop
inst✝¹ : LinearOrder α
inst✝ : Preorder β
f : α → β
s : Set α
hf : StrictMonoOn f s
a b : α
ha : a ∈ s
hb : b ∈ s
⊢ a = b → f a = f b

tactic: rfl
state_before: ι : Type ?u.27119
α : Type u
β : Type v
γ : Type w
δ : Type ?u.27128
π : ι → Type ?u.27133
r : α → α → Prop
inst✝¹ : LinearOrder α
inst✝ : Preorder β
f : α → β
s : Set α
hf : StrictMonoOn f s
a : α
ha hb : a ∈ s
⊢ f a = f a
Theorem: Ordinal.opow_isNormal
File: Mathlib/SetTheory/Ordinal/Exponential.lean

tactic: simpa only [mul_one, opow_succ] using (mul_lt_mul_iff_left (opow_pos b a0)).2 h
state_before: a : Ordinal
h : 1 < a
a0 : 0 < a
b : Ordinal
⊢ (fun x x_1 => x ^ x_1) a b < (fun x x_1 => x ^ x_1) a (succ b)
Theorem: ContinuousLinearMap.coe_toContinuousLinearEquivOfDetNeZero
File: Mathlib/Topology/Algebra/Module/FiniteDimension.lean

tactic: ext x
state_before: 𝕜 : Type u
hnorm : NontriviallyNormedField 𝕜
E : Type v
inst✝¹⁷ : AddCommGroup E
inst✝¹⁶ : Module 𝕜 E
inst✝¹⁵ : TopologicalSpace E
inst✝¹⁴ : TopologicalAddGroup E
inst✝¹³ : ContinuousSMul 𝕜 E
F : Type w
inst✝¹² : AddCommGroup F
inst✝¹¹ : Module 𝕜 F
inst✝¹⁰ : TopologicalSpace F
inst✝⁹ : TopologicalAddGroup F
inst✝⁸ : ContinuousSMul 𝕜 F
F' : Type x
inst✝⁷ : AddCommGroup F'
inst✝⁶ : Module 𝕜 F'
inst✝⁵ : TopologicalSpace F'
inst✝⁴ : TopologicalAddGroup F'
inst✝³ : ContinuousSMul 𝕜 F'
inst✝² : CompleteSpace 𝕜
inst✝¹ : T2Space E
inst✝ : FiniteDimensional 𝕜 E
f : E →L[𝕜] E
hf : det f ≠ 0
⊢ ↑(toContinuousLinearEquivOfDetNeZero f hf) = f

tactic: rfl
state_before: case h
𝕜 : Type u
hnorm : NontriviallyNormedField 𝕜
E : Type v
inst✝¹⁷ : AddCommGroup E
inst✝¹⁶ : Module 𝕜 E
inst✝¹⁵ : TopologicalSpace E
inst✝¹⁴ : TopologicalAddGroup E
inst✝¹³ : ContinuousSMul 𝕜 E
F : Type w
inst✝¹² : AddCommGroup F
inst✝¹¹ : Module 𝕜 F
inst✝¹⁰ : TopologicalSpace F
inst✝⁹ : TopologicalAddGroup F
inst✝⁸ : ContinuousSMul 𝕜 F
F' : Type x
inst✝⁷ : AddCommGroup F'
inst✝⁶ : Module 𝕜 F'
inst✝⁵ : TopologicalSpace F'
inst✝⁴ : TopologicalAddGroup F'
inst✝³ : ContinuousSMul 𝕜 F'
inst✝² : CompleteSpace 𝕜
inst✝¹ : T2Space E
inst✝ : FiniteDimensional 𝕜 E
f : E →L[𝕜] E
hf : det f ≠ 0
x : E
⊢ ↑↑(toContinuousLinearEquivOfDetNeZero f hf) x = ↑f x
Theorem: Equiv.lawfulFunctor'
File: Mathlib/Control/Traversable/Equiv.lean

tactic: have : F = Equiv.functor eqv := by
  cases F
  dsimp [Equiv.functor]
  congr <;> ext <;> dsimp only <;> [rw [← h₀]; rw [← h₁]] <;> rfl
state_before: t t' : Type u → Type u
eqv : (α : Type u) → t α ≃ t' α
inst✝¹ : Functor t
inst✝ : LawfulFunctor t
F : Functor t'
h₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f
h₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f
⊢ LawfulFunctor t'

tactic: subst this
state_before: t t' : Type u → Type u
eqv : (α : Type u) → t α ≃ t' α
inst✝¹ : Functor t
inst✝ : LawfulFunctor t
F : Functor t'
h₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f
h₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f
this : F = Equiv.functor eqv
⊢ LawfulFunctor t'

tactic: exact Equiv.lawfulFunctor eqv
state_before: t t' : Type u → Type u
eqv : (α : Type u) → t α ≃ t' α
inst✝¹ : Functor t
inst✝ : LawfulFunctor t
h₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f
h₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f
⊢ LawfulFunctor t'

tactic: cases F
state_before: t t' : Type u → Type u
eqv : (α : Type u) → t α ≃ t' α
inst✝¹ : Functor t
inst✝ : LawfulFunctor t
F : Functor t'
h₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f
h₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f
⊢ F = Equiv.functor eqv

tactic: dsimp [Equiv.functor]
state_before: case mk
t t' : Type u → Type u
eqv : (α : Type u) → t α ≃ t' α
inst✝¹ : Functor t
inst✝ : LawfulFunctor t
map✝ : {α β : Type u} → (α → β) → t' α → t' β
mapConst✝ : {α β : Type u} → α → t' β → t' α
h₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f
h₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f
⊢ { map := map✝, mapConst := mapConst✝ } = Equiv.functor eqv

tactic: congr <;> ext <;> dsimp only <;> [rw [← h₀]; rw [← h₁]] <;> rfl
state_before: case mk
t t' : Type u → Type u
eqv : (α : Type u) → t α ≃ t' α
inst✝¹ : Functor t
inst✝ : LawfulFunctor t
map✝ : {α β : Type u} → (α → β) → t' α → t' β
mapConst✝ : {α β : Type u} → α → t' β → t' α
h₀ : ∀ {α β : Type u} (f : α → β), map f = Equiv.map eqv f
h₁ : ∀ {α β : Type u} (f : β), mapConst f = (Equiv.map eqv ∘ Function.const α) f
⊢ { map := map✝, mapConst := mapConst✝ } =
    { map := fun {α β} => Equiv.map eqv, mapConst := fun {α β} => Equiv.map eqv ∘ Function.const β }
Theorem: Option.map_map₂_distrib_right
File: Mathlib/Data/Option/NAry.lean

tactic: cases a <;> cases b <;> simp [h_distrib]
state_before: α : Type u_4
β : Type u_5
γ : Type u_3
f : α → β → γ
a : Option α
b : Option β
c : Option γ
δ : Type u_1
β' : Type u_2
g : γ → δ
f' : α → β' → δ
g' : β → β'
h_distrib : ∀ (a : α) (b : β), g (f a b) = f' a (g' b)
⊢ Option.map g (map₂ f a b) = map₂ f' a (Option.map g' b)
Theorem: MeasureTheory.integrableOn_finite_iUnion
File: Mathlib/MeasureTheory/Integral/IntegrableOn.lean

tactic: cases nonempty_fintype β
state_before: α : Type u_2
β : Type u_1
E : Type u_3
F : Type ?u.1516393
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
f g : α → E
s t✝ : Set α
μ ν : Measure α
inst✝ : Finite β
t : β → Set α
⊢ IntegrableOn f (⋃ (i : β), t i) ↔ ∀ (i : β), IntegrableOn f (t i)

tactic: simpa using @integrableOn_finset_iUnion _ _ _ _ _ f μ Finset.univ t
state_before: case intro
α : Type u_2
β : Type u_1
E : Type u_3
F : Type ?u.1516393
inst✝² : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
f g : α → E
s t✝ : Set α
μ ν : Measure α
inst✝ : Finite β
t : β → Set α
val✝ : Fintype β
⊢ IntegrableOn f (⋃ (i : β), t i) ↔ ∀ (i : β), IntegrableOn f (t i)
Theorem: LipschitzWith.of_dist_le'
File: Mathlib/Topology/MetricSpace/Lipschitz.lean

tactic: gcongr
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
inst✝ : PseudoMetricSpace γ
K✝ : ℝ≥0
f : α → β
x✝ y✝ : α
r K : ℝ
h : ∀ (x y : α), dist (f x) (f y) ≤ K * dist x y
x y : α
⊢ K * dist x y ≤ ↑(Real.toNNReal K) * dist x y

tactic: apply Real.le_coe_toNNReal
state_before: case h
α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
inst✝ : PseudoMetricSpace γ
K✝ : ℝ≥0
f : α → β
x✝ y✝ : α
r K : ℝ
h : ∀ (x y : α), dist (f x) (f y) ≤ K * dist x y
x y : α
⊢ K ≤ ↑(Real.toNNReal K)
Theorem: FreeGroup.Red.append_append_left_iff
File: Mathlib/GroupTheory/FreeGroup.lean

tactic: simp [append_append_left_iff L, cons_cons_iff]
state_before: α : Type u
L✝ L₁ L₂ L₃ L₄ : List (α × Bool)
p : α × Bool
L : List (α × Bool)
⊢ Red (p :: L ++ L₁) (p :: L ++ L₂) ↔ Red L₁ L₂
Theorem: RingHom.FinitePresentation.comp
File: Mathlib/RingTheory/FinitePresentation.lean

tactic: simp [Algebra.smul_def, mul_assoc]
state_before: A : Type u_3
B : Type u_1
C : Type u_2
inst✝² : CommRing A
inst✝¹ : CommRing B
inst✝ : CommRing C
g : B →+* C
f : A →+* B
hg : FinitePresentation g
hf : FinitePresentation f
ins1 : Algebra A B := toAlgebra f
ins2 : Algebra B C := toAlgebra g
ins3 : Algebra A C := toAlgebra (RingHom.comp g f)
a : A
b : B
c : C
⊢ (a • b) • c = a • b • c

tactic: rfl
state_before: A : Type u_3
B : Type u_1
C : Type u_2
inst✝² : CommRing A
inst✝¹ : CommRing B
inst✝ : CommRing C
g : B →+* C
f : A →+* B
hg : FinitePresentation g
hf : FinitePresentation f
ins1 : Algebra A B := toAlgebra f
ins2 : Algebra B C := toAlgebra g
ins3 : Algebra A C := toAlgebra (RingHom.comp g f)
a : A
b : B
c : C
⊢ ↑(algebraMap B C) (↑(algebraMap A B) a) * (↑(algebraMap B C) b * c) = ↑(algebraMap A C) a * (↑(algebraMap B C) b * c)
Theorem: inv_le_inv_of_neg
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rw [← one_div, div_le_iff_of_neg ha, ← div_eq_inv_mul, div_le_iff_of_neg hb, one_mul]
state_before: ι : Type ?u.149888
α : Type u_1
β : Type ?u.149894
inst✝ : LinearOrderedField α
a b c d : α
n : ℤ
ha : a < 0
hb : b < 0
⊢ a⁻¹ ≤ b⁻¹ ↔ b ≤ a
Theorem: ENNReal.toNNReal_iSup
File: Mathlib/Data/Real/ENNReal.lean

tactic: lift f to ι → ℝ≥0 using hf
state_before: α : Type ?u.840754
β : Type ?u.840757
a b c d : ℝ≥0∞
r p q : ℝ≥0
ι : Sort u_1
f g : ι → ℝ≥0∞
hf : ∀ (i : ι), f i ≠ ⊤
⊢ ENNReal.toNNReal (iSup f) = ⨆ (i : ι), ENNReal.toNNReal (f i)

tactic: simp_rw [toNNReal_coe]
state_before: case intro
α : Type ?u.840754
β : Type ?u.840757
a b c d : ℝ≥0∞
r p q : ℝ≥0
ι : Sort u_1
g : ι → ℝ≥0∞
f : ι → ℝ≥0
⊢ ENNReal.toNNReal (⨆ (i : ι), ↑(f i)) = ⨆ (i : ι), ENNReal.toNNReal ((fun i => ↑(f i)) i)

tactic: by_cases h : BddAbove (range f)
state_before: case intro
α : Type ?u.840754
β : Type ?u.840757
a b c d : ℝ≥0∞
r p q : ℝ≥0
ι : Sort u_1
g : ι → ℝ≥0∞
f : ι → ℝ≥0
⊢ ENNReal.toNNReal (⨆ (i : ι), ↑(f i)) = ⨆ (i : ι), f i

tactic: rw [← coe_iSup h, toNNReal_coe]
state_before: case pos
α : Type ?u.840754
β : Type ?u.840757
a b c d : ℝ≥0∞
r p q : ℝ≥0
ι : Sort u_1
g : ι → ℝ≥0∞
f : ι → ℝ≥0
h : BddAbove (range f)
⊢ ENNReal.toNNReal (⨆ (i : ι), ↑(f i)) = ⨆ (i : ι), f i

tactic: erw [NNReal.iSup_of_not_bddAbove h, (WithTop.iSup_coe_eq_top f).mpr h, top_toNNReal]
state_before: case neg
α : Type ?u.840754
β : Type ?u.840757
a b c d : ℝ≥0∞
r p q : ℝ≥0
ι : Sort u_1
g : ι → ℝ≥0∞
f : ι → ℝ≥0
h : ¬BddAbove (range f)
⊢ ENNReal.toNNReal (⨆ (i : ι), ↑(f i)) = ⨆ (i : ι), f i
Theorem: Function.Injective.image_injective
File: Mathlib/Data/Set/Image.lean

tactic: intro s t h
state_before: ι : Sort ?u.104645
α : Type u_1
β : Type u_2
f : α → β
hf : Injective f
⊢ Injective (image f)

tactic: rw [← preimage_image_eq s hf, ← preimage_image_eq t hf, h]
state_before: ι : Sort ?u.104645
α : Type u_1
β : Type u_2
f : α → β
hf : Injective f
s t : Set α
h : f '' s = f '' t
⊢ s = t
Theorem: TopCat.prodIsoProd_inv_fst
File: Mathlib/Topology/Category/TopCat/Limits/Products.lean

tactic: simp [Iso.inv_comp_eq]
state_before: J : Type v
inst✝ : SmallCategory J
X Y : TopCat
⊢ (prodIsoProd X Y).inv ≫ prod.fst = prodFst
Theorem: MvPolynomial.eval₂_mul
File: Mathlib/Data/MvPolynomial/Basic.lean

tactic: apply MvPolynomial.induction_on q
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p q : MvPolynomial σ R
f : R →+* S₁
g : σ → S₁
⊢ ∀ {p : MvPolynomial σ R}, eval₂ f g (p * q) = eval₂ f g p * eval₂ f g q

tactic: simp [eval₂_C, eval₂_mul_C]
state_before: case h_C
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p q : MvPolynomial σ R
f : R →+* S₁
g : σ → S₁
⊢ ∀ (a : R) {p : MvPolynomial σ R}, eval₂ f g (p * ↑C a) = eval₂ f g p * eval₂ f g (↑C a)

tactic: simp (config := { contextual := true }) [mul_add, eval₂_add]
state_before: case h_add
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p q : MvPolynomial σ R
f : R →+* S₁
g : σ → S₁
⊢ ∀ (p q : MvPolynomial σ R),
    (∀ {p_1 : MvPolynomial σ R}, eval₂ f g (p_1 * p) = eval₂ f g p_1 * eval₂ f g p) →
      (∀ {p : MvPolynomial σ R}, eval₂ f g (p * q) = eval₂ f g p * eval₂ f g q) →
        ∀ {p_1 : MvPolynomial σ R}, eval₂ f g (p_1 * (p + q)) = eval₂ f g p_1 * eval₂ f g (p + q)

tactic: simp (config := { contextual := true }) [X, eval₂_monomial, eval₂_mul_monomial, ← mul_assoc]
state_before: case h_X
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p q : MvPolynomial σ R
f : R →+* S₁
g : σ → S₁
⊢ ∀ (p : MvPolynomial σ R) (n : σ),
    (∀ {p_1 : MvPolynomial σ R}, eval₂ f g (p_1 * p) = eval₂ f g p_1 * eval₂ f g p) →
      ∀ {p_1 : MvPolynomial σ R}, eval₂ f g (p_1 * (p * X n)) = eval₂ f g p_1 * eval₂ f g (p * X n)
Theorem: WittVector.mapFun.surjective
File: Mathlib/RingTheory/WittVector/Basic.lean

tactic: ext n
state_before: p : ℕ
R : Type ?u.19259
S : Type ?u.19262
T : Type ?u.19265
hp : Fact (Nat.Prime p)
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : CommRing T
α : Type u_1
β : Type u_2
f : α → β
hf : Surjective f
x : 𝕎 β
⊢ mapFun f (mk p fun n => Classical.choose (_ : ∃ a, f a = coeff x n)) = x

tactic: simp only [mapFun, coeff_mk, comp_apply, Classical.choose_spec (hf (x.coeff n))]
state_before: case h
p : ℕ
R : Type ?u.19259
S : Type ?u.19262
T : Type ?u.19265
hp : Fact (Nat.Prime p)
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : CommRing T
α : Type u_1
β : Type u_2
f : α → β
hf : Surjective f
x : 𝕎 β
n : ℕ
⊢ coeff (mapFun f (mk p fun n => Classical.choose (_ : ∃ a, f a = coeff x n))) n = coeff x n
Theorem: Finsupp.single_tsub
File: Mathlib/Data/Finsupp/Order.lean

tactic: ext j
state_before: ι : Type u_1
α : Type u_2
inst✝² : CanonicallyOrderedAddMonoid α
inst✝¹ : Sub α
inst✝ : OrderedSub α
f g : ι →₀ α
i : ι
a b : α
⊢ single i (a - b) = single i a - single i b

tactic: obtain rfl | h := eq_or_ne i j
state_before: case h
ι : Type u_1
α : Type u_2
inst✝² : CanonicallyOrderedAddMonoid α
inst✝¹ : Sub α
inst✝ : OrderedSub α
f g : ι →₀ α
i : ι
a b : α
j : ι
⊢ ↑(single i (a - b)) j = ↑(single i a - single i b) j

tactic: rw [tsub_apply, single_eq_same, single_eq_same, single_eq_same]
state_before: case h.inl
ι : Type u_1
α : Type u_2
inst✝² : CanonicallyOrderedAddMonoid α
inst✝¹ : Sub α
inst✝ : OrderedSub α
f g : ι →₀ α
i : ι
a b : α
⊢ ↑(single i (a - b)) i = ↑(single i a - single i b) i

tactic: rw [tsub_apply, single_eq_of_ne h, single_eq_of_ne h, single_eq_of_ne h, tsub_self]
state_before: case h.inr
ι : Type u_1
α : Type u_2
inst✝² : CanonicallyOrderedAddMonoid α
inst✝¹ : Sub α
inst✝ : OrderedSub α
f g : ι →₀ α
i : ι
a b : α
j : ι
h : i ≠ j
⊢ ↑(single i (a - b)) j = ↑(single i a - single i b) j
Theorem: Polynomial.derivative_of_natDegree_zero
File: Mathlib/Data/Polynomial/Derivative.lean

tactic: rw [eq_C_of_natDegree_eq_zero hp, derivative_C]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
p : R[X]
hp : natDegree p = 0
⊢ ↑derivative p = 0
Theorem: Affine.Simplex.face_centroid_eq_centroid
File: Mathlib/LinearAlgebra/AffineSpace/Independent.lean

tactic: convert (Finset.univ.centroid_map k (fs.orderEmbOfFin h).toEmbedding s.points).symm
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
n : ℕ
s : Simplex k P n
fs : Finset (Fin (n + 1))
m : ℕ
h : Finset.card fs = m + 1
⊢ Finset.centroid k Finset.univ (face s h).points = Finset.centroid k fs s.points

tactic: rw [← Finset.coe_inj, Finset.coe_map, Finset.coe_univ, Set.image_univ]
state_before: case h.e'_3.h.e'_9
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
n : ℕ
s : Simplex k P n
fs : Finset (Fin (n + 1))
m : ℕ
h : Finset.card fs = m + 1
⊢ fs = Finset.map (Finset.orderEmbOfFin fs h).toEmbedding Finset.univ

tactic: simp
state_before: case h.e'_3.h.e'_9
k : Type u_1
V : Type u_2
P : Type u_3
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
n : ℕ
s : Simplex k P n
fs : Finset (Fin (n + 1))
m : ℕ
h : Finset.card fs = m + 1
⊢ ↑fs = Set.range ↑(Finset.orderEmbOfFin fs h).toEmbedding
Theorem: IsAlgClosed.algebraMap_surjective_of_isIntegral
File: Mathlib/FieldTheory/IsAlgClosed/Basic.lean

tactic: refine' fun x => ⟨-(minpoly k x).coeff 0, _⟩
state_before: k✝ : Type u
inst✝⁴ : Field k✝
k : Type u_1
K : Type u_2
inst✝³ : Field k
inst✝² : Ring K
inst✝¹ : IsDomain K
hk : IsAlgClosed k
inst✝ : Algebra k K
hf : Algebra.IsIntegral k K
⊢ Function.Surjective ↑(algebraMap k K)

tactic: have hq : (minpoly k x).leadingCoeff = 1 := minpoly.monic (hf x)
state_before: k✝ : Type u
inst✝⁴ : Field k✝
k : Type u_1
K : Type u_2
inst✝³ : Field k
inst✝² : Ring K
inst✝¹ : IsDomain K
hk : IsAlgClosed k
inst✝ : Algebra k K
hf : Algebra.IsIntegral k K
x : K
⊢ ↑(algebraMap k K) (-coeff (minpoly k x) 0) = x

tactic: have h : (minpoly k x).degree = 1 := degree_eq_one_of_irreducible k (minpoly.irreducible (hf x))
state_before: k✝ : Type u
inst✝⁴ : Field k✝
k : Type u_1
K : Type u_2
inst✝³ : Field k
inst✝² : Ring K
inst✝¹ : IsDomain K
hk : IsAlgClosed k
inst✝ : Algebra k K
hf : Algebra.IsIntegral k K
x : K
hq : leadingCoeff (minpoly k x) = 1
⊢ ↑(algebraMap k K) (-coeff (minpoly k x) 0) = x

tactic: have : aeval x (minpoly k x) = 0 := minpoly.aeval k x
state_before: k✝ : Type u
inst✝⁴ : Field k✝
k : Type u_1
K : Type u_2
inst✝³ : Field k
inst✝² : Ring K
inst✝¹ : IsDomain K
hk : IsAlgClosed k
inst✝ : Algebra k K
hf : Algebra.IsIntegral k K
x : K
hq : leadingCoeff (minpoly k x) = 1
h : degree (minpoly k x) = 1
⊢ ↑(algebraMap k K) (-coeff (minpoly k x) 0) = x

tactic: rw [eq_X_add_C_of_degree_eq_one h, hq, C_1, one_mul, aeval_add, aeval_X, aeval_C,
  add_eq_zero_iff_eq_neg] at this
state_before: k✝ : Type u
inst✝⁴ : Field k✝
k : Type u_1
K : Type u_2
inst✝³ : Field k
inst✝² : Ring K
inst✝¹ : IsDomain K
hk : IsAlgClosed k
inst✝ : Algebra k K
hf : Algebra.IsIntegral k K
x : K
hq : leadingCoeff (minpoly k x) = 1
h : degree (minpoly k x) = 1
this : ↑(aeval x) (minpoly k x) = 0
⊢ ↑(algebraMap k K) (-coeff (minpoly k x) 0) = x

tactic: exact (RingHom.map_neg (algebraMap k K) ((minpoly k x).coeff 0)).symm ▸ this.symm
state_before: k✝ : Type u
inst✝⁴ : Field k✝
k : Type u_1
K : Type u_2
inst✝³ : Field k
inst✝² : Ring K
inst✝¹ : IsDomain K
hk : IsAlgClosed k
inst✝ : Algebra k K
hf : Algebra.IsIntegral k K
x : K
hq : leadingCoeff (minpoly k x) = 1
h : degree (minpoly k x) = 1
this : x = -↑(algebraMap k K) (coeff (minpoly k x) 0)
⊢ ↑(algebraMap k K) (-coeff (minpoly k x) 0) = x
Theorem: MonoidAlgebra.mem_closure_of_mem_span_closure
File: Mathlib/RingTheory/FiniteType.lean

tactic: rw [← MonoidHom.map_mclosure] at h
state_before: R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : CommMonoid M
inst✝ : Nontrivial R
m : M
S : Set M
h : ↑(of R M) m ∈ span R ↑(closure (↑(of R M) '' S))
⊢ m ∈ closure S

tactic: simpa using of_mem_span_of_iff.1 h
state_before: R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : CommMonoid M
inst✝ : Nontrivial R
m : M
S : Set M
h : ↑(of R M) m ∈ span R ↑(Submonoid.map (of R M) (closure S))
⊢ m ∈ closure S
Theorem: Real.sqrtTwoAddSeries_step_up
File: Mathlib/Data/Real/Pi/Bounds.lean

tactic: refine' le_trans _ hz
state_before: c d a b n : ℕ
z : ℝ
hz : sqrtTwoAddSeries (↑c / ↑d) n ≤ z
hb : 0 < b
hd : 0 < d
h : (2 * b + a) * d ^ 2 ≤ c ^ 2 * b
⊢ sqrtTwoAddSeries (↑a / ↑b) (n + 1) ≤ z

tactic: rw [sqrtTwoAddSeries_succ]
state_before: c d a b n : ℕ
z : ℝ
hz : sqrtTwoAddSeries (↑c / ↑d) n ≤ z
hb : 0 < b
hd : 0 < d
h : (2 * b + a) * d ^ 2 ≤ c ^ 2 * b
⊢ sqrtTwoAddSeries (↑a / ↑b) (n + 1) ≤ sqrtTwoAddSeries (↑c / ↑d) n

tactic: apply sqrtTwoAddSeries_monotone_left
state_before: c d a b n : ℕ
z : ℝ
hz : sqrtTwoAddSeries (↑c / ↑d) n ≤ z
hb : 0 < b
hd : 0 < d
h : (2 * b + a) * d ^ 2 ≤ c ^ 2 * b
⊢ sqrtTwoAddSeries (sqrt (2 + ↑a / ↑b)) n ≤ sqrtTwoAddSeries (↑c / ↑d) n

tactic: have hb' : 0 < (b : ℝ) := Nat.cast_pos.2 hb
state_before: case h
c d a b n : ℕ
z : ℝ
hz : sqrtTwoAddSeries (↑c / ↑d) n ≤ z
hb : 0 < b
hd : 0 < d
h : (2 * b + a) * d ^ 2 ≤ c ^ 2 * b
⊢ sqrt (2 + ↑a / ↑b) ≤ ↑c / ↑d

tactic: have hd' : 0 < (d : ℝ) := Nat.cast_pos.2 hd
state_before: case h
c d a b n : ℕ
z : ℝ
hz : sqrtTwoAddSeries (↑c / ↑d) n ≤ z
hb : 0 < b
hd : 0 < d
h : (2 * b + a) * d ^ 2 ≤ c ^ 2 * b
hb' : 0 < ↑b
⊢ sqrt (2 + ↑a / ↑b) ≤ ↑c / ↑d

tactic: rw [sqrt_le_left (div_nonneg c.cast_nonneg d.cast_nonneg), div_pow,
  add_div_eq_mul_add_div _ _ (ne_of_gt hb'), div_le_div_iff hb' (pow_pos hd' _)]
state_before: case h
c d a b n : ℕ
z : ℝ
hz : sqrtTwoAddSeries (↑c / ↑d) n ≤ z
hb : 0 < b
hd : 0 < d
h : (2 * b + a) * d ^ 2 ≤ c ^ 2 * b
hb' : 0 < ↑b
hd' : 0 < ↑d
⊢ sqrt (2 + ↑a / ↑b) ≤ ↑c / ↑d

tactic: exact_mod_cast h
state_before: case h
c d a b n : ℕ
z : ℝ
hz : sqrtTwoAddSeries (↑c / ↑d) n ≤ z
hb : 0 < b
hd : 0 < d
h : (2 * b + a) * d ^ 2 ≤ c ^ 2 * b
hb' : 0 < ↑b
hd' : 0 < ↑d
⊢ (2 * ↑b + ↑a) * ↑d ^ 2 ≤ ↑c ^ 2 * ↑b
Theorem: compl_bot
File: Mathlib/Order/Heyting/Basic.lean

tactic: rw [← himp_bot, himp_self]
state_before: ι : Type ?u.162358
α : Type u_1
β : Type ?u.162364
inst✝ : HeytingAlgebra α
a b c : α
⊢ ⊥ᶜ = ⊤