tasksource/leandojo huggingface dataset:
Theorem: Real.abs_exp_sub_one_sub_id_le
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [← _root_.sq_abs]
state_before: x : ℝ
hx : abs' x ≤ 1
⊢ abs' (exp x - 1 - x) ≤ x ^ 2

tactic: have : Complex.abs x ≤ 1 := by exact_mod_cast hx
state_before: x : ℝ
hx : abs' x ≤ 1
⊢ abs' (exp x - 1 - x) ≤ abs' x ^ 2

tactic: have := Complex.abs_exp_sub_one_sub_id_le this
state_before: x : ℝ
hx : abs' x ≤ 1
this : ↑Complex.abs ↑x ≤ 1
⊢ abs' (exp x - 1 - x) ≤ abs' x ^ 2

tactic: rw [← ofReal_one, ← ofReal_exp, ← ofReal_sub, ← ofReal_sub, abs_ofReal, abs_ofReal] at this
state_before: x : ℝ
hx : abs' x ≤ 1
this✝ : ↑Complex.abs ↑x ≤ 1
this : ↑Complex.abs (Complex.exp ↑x - 1 - ↑x) ≤ ↑Complex.abs ↑x ^ 2
⊢ abs' (exp x - 1 - x) ≤ abs' x ^ 2

tactic: exact this
state_before: x : ℝ
hx : abs' x ≤ 1
this✝ : ↑Complex.abs ↑x ≤ 1
this : abs' (exp x - 1 - x) ≤ abs' x ^ 2
⊢ abs' (exp x - 1 - x) ≤ abs' x ^ 2

tactic: exact_mod_cast hx
state_before: x : ℝ
hx : abs' x ≤ 1
⊢ ↑Complex.abs ↑x ≤ 1
Theorem: norm_sub_sq
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: rw [sub_eq_add_neg, @norm_add_sq 𝕜 _ _ _ _ x (-y), norm_neg, inner_neg_right, map_neg, mul_neg,
  sub_eq_add_neg]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.2406393
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
dec_E : DecidableEq E
x y : E
⊢ ‖x - y‖ ^ 2 = ‖x‖ ^ 2 - 2 * ↑re (inner x y) + ‖y‖ ^ 2
Theorem: Bitraversable.tfst_eq_fst_id
File: Mathlib/Control/Bitraversable/Lemmas.lean

tactic: apply bitraverse_eq_bimap_id
state_before: t : Type u → Type u → Type u
inst✝⁵ : Bitraversable t
β✝ : Type u
F G : Type u → Type u
inst✝⁴ : Applicative F
inst✝³ : Applicative G
inst✝² : IsLawfulBitraversable t
inst✝¹ : LawfulApplicative F
inst✝ : LawfulApplicative G
α α' β : Type u
f : α → α'
x : t α β
⊢ tfst (pure ∘ f) x = pure (fst f x)
Theorem: Irrational.eventually_forall_le_dist_cast_rat_of_den_le
File: Mathlib/Topology/Instances/Irrational.lean

tactic: simpa only [Rat.cast_def] using H r.den hr r.num
state_before: x : ℝ
hx : Irrational x
n : ℕ
ε : ℝ
H : ∀ (k : ℕ), k ≤ n → ∀ (m : ℤ), ε ≤ dist x (↑m / ↑k)
r : ℚ
hr : r.den ≤ n
⊢ ε ≤ dist x ↑r
Theorem: ZFSet.mem_funs
File: Mathlib/SetTheory/ZFC/Basic.lean

tactic: simp [funs, IsFunc]
state_before: x y f : ZFSet
⊢ f ∈ funs x y ↔ IsFunc x y f
Theorem: lie_lie
File: Mathlib/Algebra/Lie/Basic.lean

tactic: rw [leibniz_lie, add_sub_cancel]
state_before: R : Type u
L : Type v
M : Type w
N : Type w₁
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup N
inst✝² : Module R N
inst✝¹ : LieRingModule L N
inst✝ : LieModule R L N
t : R
x y z : L
m n : M
⊢ ⁅⁅x, y⁆, m⁆ = ⁅x, ⁅y, m⁆⁆ - ⁅y, ⁅x, m⁆⁆
Theorem: CategoryTheory.Abelian.Pseudoelement.zero_morphism_ext
File: Mathlib/CategoryTheory/Abelian/Pseudoelements.lean

tactic: rw [← Category.id_comp f]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : Abelian C
P Q : C
f : P ⟶ Q
h : ∀ (a : Pseudoelement P), pseudoApply f a = 0
⊢ f = 0

tactic: exact (pseudoZero_iff (𝟙 P ≫ f : Over Q)).1 (h (𝟙 P))
state_before: C : Type u
inst✝¹ : Category C
inst✝ : Abelian C
P Q : C
f : P ⟶ Q
h : ∀ (a : Pseudoelement P), pseudoApply f a = 0
⊢ 𝟙 P ≫ f = 0
Theorem: OmegaCompletePartialOrder.ContinuousHom.bind_continuous'
File: Mathlib/Order/OmegaCompletePartialOrder.lean

tactic: intro c
state_before: α : Type u
α' : Type ?u.58987
β✝ : Type v
β' : Type ?u.58992
γ✝ : Type ?u.58995
φ : Type ?u.58998
inst✝⁵ : OmegaCompletePartialOrder α
inst✝⁴ : OmegaCompletePartialOrder β✝
inst✝³ : OmegaCompletePartialOrder γ✝
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
β γ : Type v
f : α → Part β
g : α → β → Part γ
hf : Monotone f
hf' : Continuous { toFun := f, monotone' := hf }
hg : Monotone g
hg' : Continuous { toFun := g, monotone' := hg }
⊢ Continuous (OrderHom.bind { toFun := f, monotone' := hf } { toFun := g, monotone' := hg })

tactic: rw [ωSup_bind, ← hf', ← hg']
state_before: α : Type u
α' : Type ?u.58987
β✝ : Type v
β' : Type ?u.58992
γ✝ : Type ?u.58995
φ : Type ?u.58998
inst✝⁵ : OmegaCompletePartialOrder α
inst✝⁴ : OmegaCompletePartialOrder β✝
inst✝³ : OmegaCompletePartialOrder γ✝
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
β γ : Type v
f : α → Part β
g : α → β → Part γ
hf : Monotone f
hf' : Continuous { toFun := f, monotone' := hf }
hg : Monotone g
hg' : Continuous { toFun := g, monotone' := hg }
c : Chain α
⊢ ↑(OrderHom.bind { toFun := f, monotone' := hf } { toFun := g, monotone' := hg }) (ωSup c) =
    ωSup (Chain.map c (OrderHom.bind { toFun := f, monotone' := hf } { toFun := g, monotone' := hg }))

tactic: rfl
state_before: α : Type u
α' : Type ?u.58987
β✝ : Type v
β' : Type ?u.58992
γ✝ : Type ?u.58995
φ : Type ?u.58998
inst✝⁵ : OmegaCompletePartialOrder α
inst✝⁴ : OmegaCompletePartialOrder β✝
inst✝³ : OmegaCompletePartialOrder γ✝
inst✝² : OmegaCompletePartialOrder φ
inst✝¹ : OmegaCompletePartialOrder α'
inst✝ : OmegaCompletePartialOrder β'
β γ : Type v
f : α → Part β
g : α → β → Part γ
hf : Monotone f
hf' : Continuous { toFun := f, monotone' := hf }
hg : Monotone g
hg' : Continuous { toFun := g, monotone' := hg }
c : Chain α
⊢ ↑(OrderHom.bind { toFun := f, monotone' := hf } { toFun := g, monotone' := hg }) (ωSup c) =
    ↑{ toFun := f, monotone' := hf } (ωSup c) >>= ↑{ toFun := g, monotone' := hg } (ωSup c)
Theorem: AntilipschitzWith.properSpace
File: Mathlib/Topology/MetricSpace/Antilipschitz.lean

tactic: refine ⟨fun x₀ r => ?_⟩
state_before: α✝ : Type ?u.96684
β : Type u_2
γ : Type ?u.96690
inst✝³ : PseudoMetricSpace α✝
inst✝² : PseudoMetricSpace β
K✝ : ℝ≥0
f✝ : α✝ → β
α : Type u_1
inst✝¹ : MetricSpace α
K : ℝ≥0
f : α → β
inst✝ : ProperSpace α
hK : AntilipschitzWith K f
f_cont : Continuous f
hf : Function.Surjective f
⊢ ProperSpace β

tactic: let K := f ⁻¹' closedBall x₀ r
state_before: α✝ : Type ?u.96684
β : Type u_2
γ : Type ?u.96690
inst✝³ : PseudoMetricSpace α✝
inst✝² : PseudoMetricSpace β
K✝ : ℝ≥0
f✝ : α✝ → β
α : Type u_1
inst✝¹ : MetricSpace α
K : ℝ≥0
f : α → β
inst✝ : ProperSpace α
hK : AntilipschitzWith K f
f_cont : Continuous f
hf : Function.Surjective f
x₀ : β
r : ℝ
⊢ IsCompact (closedBall x₀ r)

tactic: have A : IsClosed K := isClosed_ball.preimage f_cont
state_before: α✝ : Type ?u.96684
β : Type u_2
γ : Type ?u.96690
inst✝³ : PseudoMetricSpace α✝
inst✝² : PseudoMetricSpace β
K✝¹ : ℝ≥0
f✝ : α✝ → β
α : Type u_1
inst✝¹ : MetricSpace α
K✝ : ℝ≥0
f : α → β
inst✝ : ProperSpace α
hK : AntilipschitzWith K✝ f
f_cont : Continuous f
hf : Function.Surjective f
x₀ : β
r : ℝ
K : Set α := f ⁻¹' closedBall x₀ r
⊢ IsCompact (closedBall x₀ r)

tactic: have B : Bounded K := hK.bounded_preimage bounded_closedBall
state_before: α✝ : Type ?u.96684
β : Type u_2
γ : Type ?u.96690
inst✝³ : PseudoMetricSpace α✝
inst✝² : PseudoMetricSpace β
K✝¹ : ℝ≥0
f✝ : α✝ → β
α : Type u_1
inst✝¹ : MetricSpace α
K✝ : ℝ≥0
f : α → β
inst✝ : ProperSpace α
hK : AntilipschitzWith K✝ f
f_cont : Continuous f
hf : Function.Surjective f
x₀ : β
r : ℝ
K : Set α := f ⁻¹' closedBall x₀ r
A : IsClosed K
⊢ IsCompact (closedBall x₀ r)

tactic: have : IsCompact K := isCompact_iff_isClosed_bounded.2 ⟨A, B⟩
state_before: α✝ : Type ?u.96684
β : Type u_2
γ : Type ?u.96690
inst✝³ : PseudoMetricSpace α✝
inst✝² : PseudoMetricSpace β
K✝¹ : ℝ≥0
f✝ : α✝ → β
α : Type u_1
inst✝¹ : MetricSpace α
K✝ : ℝ≥0
f : α → β
inst✝ : ProperSpace α
hK : AntilipschitzWith K✝ f
f_cont : Continuous f
hf : Function.Surjective f
x₀ : β
r : ℝ
K : Set α := f ⁻¹' closedBall x₀ r
A : IsClosed K
B : Metric.Bounded K
⊢ IsCompact (closedBall x₀ r)

tactic: convert this.image f_cont
state_before: α✝ : Type ?u.96684
β : Type u_2
γ : Type ?u.96690
inst✝³ : PseudoMetricSpace α✝
inst✝² : PseudoMetricSpace β
K✝¹ : ℝ≥0
f✝ : α✝ → β
α : Type u_1
inst✝¹ : MetricSpace α
K✝ : ℝ≥0
f : α → β
inst✝ : ProperSpace α
hK : AntilipschitzWith K✝ f
f_cont : Continuous f
hf : Function.Surjective f
x₀ : β
r : ℝ
K : Set α := f ⁻¹' closedBall x₀ r
A : IsClosed K
B : Metric.Bounded K
this : IsCompact K
⊢ IsCompact (closedBall x₀ r)

tactic: exact (hf.image_preimage _).symm
state_before: case h.e'_3
α✝ : Type ?u.96684
β : Type u_2
γ : Type ?u.96690
inst✝³ : PseudoMetricSpace α✝
inst✝² : PseudoMetricSpace β
K✝¹ : ℝ≥0
f✝ : α✝ → β
α : Type u_1
inst✝¹ : MetricSpace α
K✝ : ℝ≥0
f : α → β
inst✝ : ProperSpace α
hK : AntilipschitzWith K✝ f
f_cont : Continuous f
hf : Function.Surjective f
x₀ : β
r : ℝ
K : Set α := f ⁻¹' closedBall x₀ r
A : IsClosed K
B : Metric.Bounded K
this : IsCompact K
⊢ closedBall x₀ r = f '' K
Theorem: Rat.inv_zero
File: Std/Data/Rat/Lemmas.lean

tactic: unfold Rat.inv
state_before: ⊢ Rat.inv 0 = 0

tactic: simp
state_before: ⊢ (if h : 0.num < 0 then mk' (-↑0.den) (Int.natAbs 0.num)
    else if h : 0.num > 0 then mk' (↑0.den) (Int.natAbs 0.num) else 0) =
    0
Theorem: BoxIntegral.integralSum_sub_partitions
File: Mathlib/Analysis/BoxIntegral/Basic.lean

tactic: rw [← integralSum_inf_partition f vol π₁ h₂, ← integralSum_inf_partition f vol π₂ h₁,
  integralSum, integralSum, Finset.sum_sub_distrib]
state_before: ι : Type u
E : Type v
F : Type w
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
I J : Box ι
π : TaggedPrepartition I
f : (ι → ℝ) → E
vol : ι →ᵇᵃ[⊤] E →L[ℝ] F
π₁ π₂ : TaggedPrepartition I
h₁ : IsPartition π₁
h₂ : IsPartition π₂
⊢ integralSum f vol π₁ - integralSum f vol π₂ =
    ∑ J in (π₁.toPrepartition ⊓ π₂.toPrepartition).boxes,
      (↑(↑vol J) (f (tag (infPrepartition π₁ π₂.toPrepartition) J)) -
        ↑(↑vol J) (f (tag (infPrepartition π₂ π₁.toPrepartition) J)))

tactic: simp only [infPrepartition_toPrepartition, inf_comm]
state_before: ι : Type u
E : Type v
F : Type w
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
I J : Box ι
π : TaggedPrepartition I
f : (ι → ℝ) → E
vol : ι →ᵇᵃ[⊤] E →L[ℝ] F
π₁ π₂ : TaggedPrepartition I
h₁ : IsPartition π₁
h₂ : IsPartition π₂
⊢ ∑ J in (infPrepartition π₁ π₂.toPrepartition).toPrepartition.boxes,
        ↑(↑vol J) (f (tag (infPrepartition π₁ π₂.toPrepartition) J)) -
      ∑ J in (infPrepartition π₂ π₁.toPrepartition).toPrepartition.boxes,
        ↑(↑vol J) (f (tag (infPrepartition π₂ π₁.toPrepartition) J)) =
    ∑ x in (π₁.toPrepartition ⊓ π₂.toPrepartition).boxes, ↑(↑vol x) (f (tag (infPrepartition π₁ π₂.toPrepartition) x)) -
      ∑ x in (π₁.toPrepartition ⊓ π₂.toPrepartition).boxes, ↑(↑vol x) (f (tag (infPrepartition π₂ π₁.toPrepartition) x))
Theorem: isOpen_empty
File: Mathlib/Topology/Basic.lean

tactic: rw [← sUnion_empty]
state_before: α : Type u
β : Type v
ι : Sort w
a : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
⊢ IsOpen ∅

tactic: exact isOpen_sUnion fun a => False.elim
state_before: α : Type u
β : Type v
ι : Sort w
a : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝ : TopologicalSpace α
⊢ IsOpen (⋃₀ ∅)
Theorem: ContinuousLinearMap.op_norm_zero
File: Mathlib/Analysis/NormedSpace/OperatorNorm.lean

tactic: rw [MulZeroClass.zero_mul]
state_before: 𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type ?u.403828
E : Type u_1
Eₗ : Type ?u.403834
F : Type u_2
Fₗ : Type ?u.403840
G : Type ?u.403843
Gₗ : Type ?u.403846
𝓕 : Type ?u.403849
inst✝¹⁷ : SeminormedAddCommGroup E
inst✝¹⁶ : SeminormedAddCommGroup Eₗ
inst✝¹⁵ : SeminormedAddCommGroup F
inst✝¹⁴ : SeminormedAddCommGroup Fₗ
inst✝¹³ : SeminormedAddCommGroup G
inst✝¹² : SeminormedAddCommGroup Gₗ
inst✝¹¹ : NontriviallyNormedField 𝕜
inst✝¹⁰ : NontriviallyNormedField 𝕜₂
inst✝⁹ : NontriviallyNormedField 𝕜₃
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : NormedSpace 𝕜 Eₗ
inst✝⁶ : NormedSpace 𝕜₂ F
inst✝⁵ : NormedSpace 𝕜 Fₗ
inst✝⁴ : NormedSpace 𝕜₃ G
inst✝³ : NormedSpace 𝕜 Gₗ
σ₁₂ : 𝕜 →+* 𝕜₂
σ₂₃ : 𝕜₂ →+* 𝕜₃
σ₁₃ : 𝕜 →+* 𝕜₃
inst✝² : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝¹ : RingHomIsometric σ₁₂
inst✝ : RingHomIsometric σ₂₃
f g : E →SL[σ₁₂] F
h : F →SL[σ₂₃] G
x x✝ : E
⊢ ‖↑0 x✝‖ = 0 * ‖x✝‖

tactic: exact norm_zero
state_before: 𝕜 : Type u_3
𝕜₂ : Type u_4
𝕜₃ : Type ?u.403828
E : Type u_1
Eₗ : Type ?u.403834
F : Type u_2
Fₗ : Type ?u.403840
G : Type ?u.403843
Gₗ : Type ?u.403846
𝓕 : Type ?u.403849
inst✝¹⁷ : SeminormedAddCommGroup E
inst✝¹⁶ : SeminormedAddCommGroup Eₗ
inst✝¹⁵ : SeminormedAddCommGroup F
inst✝¹⁴ : SeminormedAddCommGroup Fₗ
inst✝¹³ : SeminormedAddCommGroup G
inst✝¹² : SeminormedAddCommGroup Gₗ
inst✝¹¹ : NontriviallyNormedField 𝕜
inst✝¹⁰ : NontriviallyNormedField 𝕜₂
inst✝⁹ : NontriviallyNormedField 𝕜₃
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : NormedSpace 𝕜 Eₗ
inst✝⁶ : NormedSpace 𝕜₂ F
inst✝⁵ : NormedSpace 𝕜 Fₗ
inst✝⁴ : NormedSpace 𝕜₃ G
inst✝³ : NormedSpace 𝕜 Gₗ
σ₁₂ : 𝕜 →+* 𝕜₂
σ₂₃ : 𝕜₂ →+* 𝕜₃
σ₁₃ : 𝕜 →+* 𝕜₃
inst✝² : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝¹ : RingHomIsometric σ₁₂
inst✝ : RingHomIsometric σ₂₃
f g : E →SL[σ₁₂] F
h : F →SL[σ₂₃] G
x x✝ : E
⊢ ‖↑0 x✝‖ = 0
Theorem: ENNReal.continuousOn_sub
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: rw [ContinuousOn]
state_before: α : Type ?u.107946
β : Type ?u.107949
γ : Type ?u.107952
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
⊢ ContinuousOn (fun p => p.fst - p.snd) {p | p ≠ (⊤, ⊤)}

tactic: rintro ⟨x, y⟩ hp
state_before: α : Type ?u.107946
β : Type ?u.107949
γ : Type ?u.107952
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
⊢ ∀ (x : ℝ≥0∞ × ℝ≥0∞), x ∈ {p | p ≠ (⊤, ⊤)} → ContinuousWithinAt (fun p => p.fst - p.snd) {p | p ≠ (⊤, ⊤)} x

tactic: simp only [Ne.def, Set.mem_setOf_eq, Prod.mk.inj_iff] at hp
state_before: case mk
α : Type ?u.107946
β : Type ?u.107949
γ : Type ?u.107952
a b c d : ℝ≥0∞
r p q : ℝ≥0
x✝ y✝ z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
x y : ℝ≥0∞
hp : (x, y) ∈ {p | p ≠ (⊤, ⊤)}
⊢ ContinuousWithinAt (fun p => p.fst - p.snd) {p | p ≠ (⊤, ⊤)} (x, y)

tactic: refine' tendsto_nhdsWithin_of_tendsto_nhds (tendsto_sub (not_and_or.mp hp))
state_before: case mk
α : Type ?u.107946
β : Type ?u.107949
γ : Type ?u.107952
a b c d : ℝ≥0∞
r p q : ℝ≥0
x✝ y✝ z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
x y : ℝ≥0∞
hp : ¬(x = ⊤ ∧ y = ⊤)
⊢ ContinuousWithinAt (fun p => p.fst - p.snd) {p | p ≠ (⊤, ⊤)} (x, y)
Theorem: LocalHomeomorph.symm_map_nhds_eq
File: Mathlib/Topology/LocalHomeomorph.lean

tactic: rw [e.left_inv hx]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.31160
δ : Type ?u.31163
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
e : LocalHomeomorph α β
e' : LocalHomeomorph β γ
x : α
hx : x ∈ e.source
⊢ 𝓝 (↑(LocalHomeomorph.symm e) (↑e x)) = 𝓝 x
Theorem: Polynomial.isUnit_leadingCoeff_mul_left_eq_zero_iff
File: Mathlib/Data/Polynomial/Monic.lean

tactic: constructor
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit (leadingCoeff p)
q : R[X]
⊢ q * p = 0 ↔ q = 0

tactic: intro hp
state_before: case mp
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit (leadingCoeff p)
q : R[X]
⊢ q * p = 0 → q = 0

tactic: simp only [zero_mul] at hp
state_before: case mp
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit (leadingCoeff p)
q : R[X]
hp : (fun x => x * ↑C ↑(IsUnit.unit h)⁻¹) (q * p) = (fun x => x * ↑C ↑(IsUnit.unit h)⁻¹) 0
⊢ q = 0

tactic: rwa [mul_assoc, Monic.mul_left_eq_zero_iff] at hp
state_before: case mp
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit (leadingCoeff p)
q : R[X]
hp : q * p * ↑C ↑(IsUnit.unit h)⁻¹ = 0
⊢ q = 0

tactic: refine' monic_mul_C_of_leadingCoeff_mul_eq_one _
state_before: case mp.h
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit (leadingCoeff p)
q : R[X]
hp : q * (p * ↑C ↑(IsUnit.unit h)⁻¹) = 0
⊢ Monic (p * ↑C ↑(IsUnit.unit h)⁻¹)

tactic: simp [Units.mul_inv_eq_iff_eq_mul, IsUnit.unit_spec]
state_before: case mp.h
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit (leadingCoeff p)
q : R[X]
hp : q * (p * ↑C ↑(IsUnit.unit h)⁻¹) = 0
⊢ leadingCoeff p * ↑(IsUnit.unit h)⁻¹ = 1

tactic: rintro rfl
state_before: case mpr
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit (leadingCoeff p)
q : R[X]
⊢ q = 0 → q * p = 0

tactic: rw [zero_mul]
state_before: case mpr
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p : R[X]
h : IsUnit (leadingCoeff p)
⊢ 0 * p = 0
Theorem: MvPolynomial.vars_monomial_single
File: Mathlib/Data/MvPolynomial/Variables.lean

tactic: rw [vars_monomial hr, Finsupp.support_single_ne_zero _ he]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.263576
r✝ : R
e✝ : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
p q : MvPolynomial σ R
inst✝ : CommSemiring S
f : R →+* S
i : σ
e : ℕ
r : R
he : e ≠ 0
hr : r ≠ 0
⊢ vars (↑(monomial (Finsupp.single i e)) r) = {i}
Theorem: AddMonoidHom.coe_addMonoidHom_mkRingHomOfMulSelfOfTwoNeZero
File: Mathlib/Algebra/Hom/Ring.lean

tactic: apply AddMonoidHom.ext
state_before: F : Type ?u.127699
α : Type u_1
β : Type u_2
γ : Type ?u.127708
inst✝² : CommRing α
inst✝¹ : IsDomain α
inst✝ : CommRing β
f : β →+ α
h : ∀ (x : β), ↑f (x * x) = ↑f x * ↑f x
h_two : 2 ≠ 0
h_one : ↑f 1 = 1
⊢ ↑(mkRingHomOfMulSelfOfTwoNeZero f h h_two h_one) = f

tactic: intro
state_before: case h
F : Type ?u.127699
α : Type u_1
β : Type u_2
γ : Type ?u.127708
inst✝² : CommRing α
inst✝¹ : IsDomain α
inst✝ : CommRing β
f : β →+ α
h : ∀ (x : β), ↑f (x * x) = ↑f x * ↑f x
h_two : 2 ≠ 0
h_one : ↑f 1 = 1
⊢ ∀ (x : β), ↑↑(mkRingHomOfMulSelfOfTwoNeZero f h h_two h_one) x = ↑f x

tactic: rfl
state_before: case h
F : Type ?u.127699
α : Type u_1
β : Type u_2
γ : Type ?u.127708
inst✝² : CommRing α
inst✝¹ : IsDomain α
inst✝ : CommRing β
f : β →+ α
h : ∀ (x : β), ↑f (x * x) = ↑f x * ↑f x
h_two : 2 ≠ 0
h_one : ↑f 1 = 1
x✝ : β
⊢ ↑↑(mkRingHomOfMulSelfOfTwoNeZero f h h_two h_one) x✝ = ↑f x✝
Theorem: ProbabilityTheory.condCount_eq_one_of
File: Mathlib/Probability/CondCount.lean

tactic: haveI := condCount_isProbabilityMeasure hs hs'
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hs : Set.Finite s
hs' : Set.Nonempty s
ht : s ⊆ t
⊢ ↑↑(condCount s) t = 1

tactic: refine' eq_of_le_of_not_lt prob_le_one _
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hs : Set.Finite s
hs' : Set.Nonempty s
ht : s ⊆ t
this : IsProbabilityMeasure (condCount s)
⊢ ↑↑(condCount s) t = 1

tactic: rw [not_lt, ← condCount_self hs hs']
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hs : Set.Finite s
hs' : Set.Nonempty s
ht : s ⊆ t
this : IsProbabilityMeasure (condCount s)
⊢ ¬↑↑(condCount s) t < 1

tactic: exact measure_mono ht
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hs : Set.Finite s
hs' : Set.Nonempty s
ht : s ⊆ t
this : IsProbabilityMeasure (condCount s)
⊢ ↑↑(condCount s) s ≤ ↑↑(condCount s) t
Theorem: Finset.sigma_preimage_mk
File: Mathlib/Data/Finset/Preimage.lean

tactic: ext x
state_before: α : Type u
β✝ : Type v
ι : Sort w
γ : Type x
β : α → Type u_1
inst✝ : DecidableEq α
s : Finset ((a : α) × β a)
t : Finset α
⊢ (Finset.sigma t fun a => preimage s (Sigma.mk a) (_ : InjOn (Sigma.mk a) (Sigma.mk a ⁻¹' ↑s))) =
    filter (fun a => a.fst ∈ t) s

tactic: simp [and_comm]
state_before: case a
α : Type u
β✝ : Type v
ι : Sort w
γ : Type x
β : α → Type u_1
inst✝ : DecidableEq α
s : Finset ((a : α) × β a)
t : Finset α
x : (i : α) × β i
⊢ (x ∈ Finset.sigma t fun a => preimage s (Sigma.mk a) (_ : InjOn (Sigma.mk a) (Sigma.mk a ⁻¹' ↑s))) ↔
    x ∈ filter (fun a => a.fst ∈ t) s
Theorem: Cardinal.sum_le_iSup
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: rw [← lift_id (#ι)]
state_before: α β ι : Type u
f : ι → Cardinal
⊢ sum f ≤ (#ι) * iSup f

tactic: exact sum_le_iSup_lift f
state_before: α β ι : Type u
f : ι → Cardinal
⊢ sum f ≤ lift (#ι) * iSup f
Theorem: Polynomial.trailingDegree_monomial
File: Mathlib/Data/Polynomial/Degree/TrailingDegree.lean

tactic: rw [trailingDegree, support_monomial n ha, min_singleton]
state_before: R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
ha : a ≠ 0
⊢ trailingDegree (↑(monomial n) a) = ↑n

tactic: rfl
state_before: R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
ha : a ≠ 0
⊢ ↑n = ↑n
Theorem: Real.sinh_arsinh
File: Mathlib/Analysis/SpecialFunctions/Arsinh.lean

tactic: rw [sinh_eq, ← arsinh_neg, exp_arsinh, exp_arsinh, neg_sq]
state_before: x✝ y x : ℝ
⊢ sinh (arsinh x) = x

tactic: field_simp
state_before: x✝ y x : ℝ
⊢ (x + sqrt (1 + x ^ 2) - (-x + sqrt (1 + x ^ 2))) / 2 = x
Theorem: Nat.count_zero
File: Mathlib/Data/Nat/Count.lean

tactic: rw [count, List.range_zero, List.countp, List.countp.go]
state_before: p : ℕ → Prop
inst✝ : DecidablePred p
⊢ count p 0 = 0
Theorem: isClosed_of_mem_irreducibleComponents
File: Mathlib/Topology/SubsetProperties.lean

tactic: rw [← closure_eq_iff_isClosed, eq_comm]
state_before: α : Type u
β : Type v
ι : Type ?u.184023
π : ι → Type ?u.184028
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s✝ t s : Set α
H : s ∈ irreducibleComponents α
⊢ IsClosed s

tactic: exact subset_closure.antisymm (H.2 H.1.closure subset_closure)
state_before: α : Type u
β : Type v
ι : Type ?u.184023
π : ι → Type ?u.184028
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s✝ t s : Set α
H : s ∈ irreducibleComponents α
⊢ s = closure s
Theorem: mem_vadd_const_affineSegment
File: Mathlib/Analysis/Convex/Between.lean

tactic: rw [← affineSegment_vadd_const_image, (vadd_right_injective p).mem_set_image]
state_before: R : Type u_3
V : Type u_2
V' : Type ?u.49755
P : Type u_1
P' : Type ?u.49761
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x y z : V
p : P
⊢ z +ᵥ p ∈ affineSegment R (x +ᵥ p) (y +ᵥ p) ↔ z ∈ affineSegment R x y
Theorem: Nat.le_induction
File: Mathlib/Data/Nat/Basic.lean

tactic: apply Nat.le.rec
state_before: m✝ n k m : ℕ
P : (n : ℕ) → m ≤ n → Prop
base : P m (_ : m ≤ m)
succ : ∀ (n : ℕ) (hn : m ≤ n), P n hn → P (n + 1) (_ : m ≤ n + 1)
⊢ ∀ (n : ℕ) (hn : m ≤ n), P n hn

tactic: exact base
state_before: case refl
m✝ n k m : ℕ
P : (n : ℕ) → m ≤ n → Prop
base : P m (_ : m ≤ m)
succ : ∀ (n : ℕ) (hn : m ≤ n), P n hn → P (n + 1) (_ : m ≤ n + 1)
⊢ P m (_ : Nat.le m m)

tactic: intros n hn
state_before: case step
m✝ n k m : ℕ
P : (n : ℕ) → m ≤ n → Prop
base : P m (_ : m ≤ m)
succ : ∀ (n : ℕ) (hn : m ≤ n), P n hn → P (n + 1) (_ : m ≤ n + 1)
⊢ ∀ {m_1 : ℕ} (a : Nat.le m m_1), P m_1 a → P (Nat.succ m_1) (_ : Nat.le m (Nat.succ m_1))

tactic: apply succ n hn
state_before: case step
m✝ n✝ k m : ℕ
P : (n : ℕ) → m ≤ n → Prop
base : P m (_ : m ≤ m)
succ : ∀ (n : ℕ) (hn : m ≤ n), P n hn → P (n + 1) (_ : m ≤ n + 1)
n : ℕ
hn : Nat.le m n
⊢ P n hn → P (Nat.succ n) (_ : Nat.le m (Nat.succ n))
Theorem: Basis.restrictScalars_apply
File: Mathlib/LinearAlgebra/Basis.lean

tactic: simp only [Basis.restrictScalars, Basis.span_apply]
state_before: ι : Type u_3
ι' : Type ?u.1271219
R : Type u_2
R₂ : Type ?u.1271225
K : Type ?u.1271228
M : Type u_1
M' : Type ?u.1271234
M'' : Type ?u.1271237
V : Type u
V' : Type ?u.1271242
S : Type u_4
inst✝⁸ : CommRing R
inst✝⁷ : Ring S
inst✝⁶ : Nontrivial S
inst✝⁵ : AddCommGroup M
inst✝⁴ : Algebra R S
inst✝³ : Module S M
inst✝² : Module R M
inst✝¹ : IsScalarTower R S M
inst✝ : NoZeroSMulDivisors R S
b : Basis ι S M
i : ι
⊢ ↑(↑(restrictScalars R b) i) = ↑b i