tasksource/leandojo huggingface dataset:
Theorem: Matrix.dotProduct_stdBasis_eq_mul
File: Mathlib/LinearAlgebra/Matrix/DotProduct.lean

tactic: rw [dotProduct, Finset.sum_eq_single i, LinearMap.stdBasis_same]
state_before: R : Type v
n : Type w
inst✝² : Semiring R
inst✝¹ : Fintype n
inst✝ : DecidableEq n
v : n → R
c : R
i : n
⊢ v ⬝ᵥ ↑(LinearMap.stdBasis R (fun x => R) i) c = v i * c

tactic: exact fun _ _ hb => by rw [LinearMap.stdBasis_ne _ _ _ _ hb, MulZeroClass.mul_zero]
state_before: case h₀
R : Type v
n : Type w
inst✝² : Semiring R
inst✝¹ : Fintype n
inst✝ : DecidableEq n
v : n → R
c : R
i : n
⊢ ∀ (b : n), b ∈ Finset.univ → b ≠ i → v b * ↑(LinearMap.stdBasis R (fun x => R) i) c b = 0

case h₁
R : Type v
n : Type w
inst✝² : Semiring R
inst✝¹ : Fintype n
inst✝ : DecidableEq n
v : n → R
c : R
i : n
⊢ ¬i ∈ Finset.univ → v i * ↑(LinearMap.stdBasis R (fun x => R) i) c i = 0

tactic: exact fun hi => False.elim (hi <| Finset.mem_univ _)
state_before: case h₁
R : Type v
n : Type w
inst✝² : Semiring R
inst✝¹ : Fintype n
inst✝ : DecidableEq n
v : n → R
c : R
i : n
⊢ ¬i ∈ Finset.univ → v i * ↑(LinearMap.stdBasis R (fun x => R) i) c i = 0

tactic: rw [LinearMap.stdBasis_ne _ _ _ _ hb, MulZeroClass.mul_zero]
state_before: R : Type v
n : Type w
inst✝² : Semiring R
inst✝¹ : Fintype n
inst✝ : DecidableEq n
v : n → R
c : R
i x✝¹ : n
x✝ : x✝¹ ∈ Finset.univ
hb : x✝¹ ≠ i
⊢ v x✝¹ * ↑(LinearMap.stdBasis R (fun x => R) i) c x✝¹ = 0
Theorem: String.Iterator.ValidFor.prevn
File: Std/Data/String/Lemmas.lean

tactic: simp [h, Iterator.prevn]
state_before: l r : List Char
it : Iterator
h : ValidFor l r it
x✝ : 0 ≤ List.length l
⊢ ValidFor (List.drop 0 l) (List.reverse (List.take 0 l) ++ r) (Iterator.prevn it 0)

tactic: simp [h, Iterator.prevn]
state_before: l r : List Char
it : Iterator
h : ValidFor l r it
n : Nat
hn : n + 1 ≤ List.length l
⊢ ValidFor (List.drop (n + 1) l) (List.reverse (List.take (n + 1) l) ++ r) (Iterator.prevn it (n + 1))

tactic: have a::l := l
state_before: l r : List Char
it : Iterator
h : ValidFor l r it
n : Nat
hn : n + 1 ≤ List.length l
⊢ ValidFor (List.drop (n + 1) l) (List.reverse (List.take (n + 1) l) ++ r) (Iterator.prevn (Iterator.prev it) n)

tactic: simpa using h.prev.prevn _ (Nat.le_of_succ_le_succ hn)
state_before: l✝ r : List Char
it : Iterator
n : Nat
a : Char
l : List Char
h : ValidFor (a :: l) r it
hn : n + 1 ≤ List.length (a :: l)
⊢ ValidFor (List.drop (n + 1) (a :: l)) (List.reverse (List.take (n + 1) (a :: l)) ++ r)
    (Iterator.prevn (Iterator.prev it) n)
Theorem: Fin.lt_succAbove_iff
File: Mathlib/Data/Fin/Basic.lean

tactic: refine' Iff.intro _ _
state_before: n m : ℕ
p : Fin (n + 1)
i : Fin n
⊢ p < ↑(succAbove p) i ↔ p ≤ ↑castSucc i

tactic: intro h
state_before: case refine'_1
n m : ℕ
p : Fin (n + 1)
i : Fin n
⊢ p < ↑(succAbove p) i → p ≤ ↑castSucc i

tactic: cases' succAbove_lt_ge p i with H H
state_before: case refine'_1
n m : ℕ
p : Fin (n + 1)
i : Fin n
h : p < ↑(succAbove p) i
⊢ p ≤ ↑castSucc i

tactic: rw [succAbove_below _ _ H] at h
state_before: case refine'_1.inl
n m : ℕ
p : Fin (n + 1)
i : Fin n
h : p < ↑(succAbove p) i
H : ↑castSucc i < p
⊢ p ≤ ↑castSucc i

tactic: exact le_of_lt h
state_before: case refine'_1.inl
n m : ℕ
p : Fin (n + 1)
i : Fin n
h : p < ↑castSucc i
H : ↑castSucc i < p
⊢ p ≤ ↑castSucc i

tactic: exact H
state_before: case refine'_1.inr
n m : ℕ
p : Fin (n + 1)
i : Fin n
h : p < ↑(succAbove p) i
H : p ≤ ↑castSucc i
⊢ p ≤ ↑castSucc i

tactic: intro h
state_before: case refine'_2
n m : ℕ
p : Fin (n + 1)
i : Fin n
⊢ p ≤ ↑castSucc i → p < ↑(succAbove p) i

tactic: rw [succAbove_above _ _ h]
state_before: case refine'_2
n m : ℕ
p : Fin (n + 1)
i : Fin n
h : p ≤ ↑castSucc i
⊢ p < ↑(succAbove p) i

tactic: exact lt_of_le_of_lt h (castSucc_lt_succ i)
state_before: case refine'_2
n m : ℕ
p : Fin (n + 1)
i : Fin n
h : p ≤ ↑castSucc i
⊢ p < succ i
Theorem: Real.arcsin_lt_pi_div_two
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean

tactic: rw [sin_pi_div_two]
state_before: x : ℝ
⊢ x < sin (π / 2) ↔ x < 1
Theorem: Real.one_lt_rpow_iff_of_pos
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: rw [rpow_def_of_pos hx, one_lt_exp_iff, mul_pos_iff, log_pos_iff hx, log_neg_iff hx]
state_before: x y z : ℝ
hx : 0 < x
⊢ 1 < x ^ y ↔ 1 < x ∧ 0 < y ∨ x < 1 ∧ y < 0
Theorem: Besicovitch.ae_tendsto_rnDeriv
File: Mathlib/MeasureTheory/Covering/Besicovitch.lean

tactic: filter_upwards [VitaliFamily.ae_tendsto_rnDeriv (Besicovitch.vitaliFamily μ) ρ] with x hx
state_before: α : Type ?u.1047956
inst✝¹¹ : MetricSpace α
β : Type u
inst✝¹⁰ : SecondCountableTopology α
inst✝⁹ : MeasurableSpace α
inst✝⁸ : OpensMeasurableSpace α
inst✝⁷ : HasBesicovitchCovering α
inst✝⁶ : MetricSpace β
inst✝⁵ : MeasurableSpace β
inst✝⁴ : BorelSpace β
inst✝³ : SecondCountableTopology β
inst✝² : HasBesicovitchCovering β
ρ μ : MeasureTheory.Measure β
inst✝¹ : IsLocallyFiniteMeasure μ
inst✝ : IsLocallyFiniteMeasure ρ
⊢ ∀ᵐ (x : β) ∂μ, Tendsto (fun r => ↑↑ρ (closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 (Measure.rnDeriv ρ μ x))

tactic: exact hx.comp (tendsto_filterAt μ x)
state_before: case h
α : Type ?u.1047956
inst✝¹¹ : MetricSpace α
β : Type u
inst✝¹⁰ : SecondCountableTopology α
inst✝⁹ : MeasurableSpace α
inst✝⁸ : OpensMeasurableSpace α
inst✝⁷ : HasBesicovitchCovering α
inst✝⁶ : MetricSpace β
inst✝⁵ : MeasurableSpace β
inst✝⁴ : BorelSpace β
inst✝³ : SecondCountableTopology β
inst✝² : HasBesicovitchCovering β
ρ μ : MeasureTheory.Measure β
inst✝¹ : IsLocallyFiniteMeasure μ
inst✝ : IsLocallyFiniteMeasure ρ
x : β
hx : Tendsto (fun a => ↑↑ρ a / ↑↑μ a) (VitaliFamily.filterAt (Besicovitch.vitaliFamily μ) x) (𝓝 (Measure.rnDeriv ρ μ x))
⊢ Tendsto (fun r => ↑↑ρ (closedBall x r) / ↑↑μ (closedBall x r)) (𝓝[Ioi 0] 0) (𝓝 (Measure.rnDeriv ρ μ x))
Theorem: ZMod.units_pow_card_sub_one_eq_one
File: Mathlib/FieldTheory/Finite/Basic.lean

tactic: rw [← card_units p, pow_card_eq_one]
state_before: K : Type ?u.1007117
R : Type ?u.1007120
p : ℕ
inst✝ : Fact (Nat.Prime p)
a : (ZMod p)ˣ
⊢ a ^ (p - 1) = 1
Theorem: Matrix.conjTranspose_natCast_smul
File: Mathlib/Data/Matrix/Basic.lean

tactic: simp
state_before: l : Type ?u.992438
m : Type u_2
n : Type u_3
o : Type ?u.992447
m' : o → Type ?u.992452
n' : o → Type ?u.992457
R : Type u_1
S : Type ?u.992463
α : Type v
β : Type w
γ : Type ?u.992470
inst✝³ : Semiring R
inst✝² : AddCommMonoid α
inst✝¹ : StarAddMonoid α
inst✝ : Module R α
c : ℕ
M : Matrix m n α
⊢ ∀ (i : n) (j : m), (↑c • M)ᴴ i j = (↑c • Mᴴ) i j
Theorem: MeasureTheory.union_ae_eq_right_of_ae_eq_empty
File: Mathlib/MeasureTheory/Measure/MeasureSpaceDef.lean

tactic: convert ae_eq_set_union h (ae_eq_refl t)
state_before: α : Type u_1
β : Type ?u.117614
γ : Type ?u.117617
δ : Type ?u.117620
ι : Type ?u.117623
inst✝ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁ s₂ t : Set α
h : s =ᵐ[μ] ∅
⊢ s ∪ t =ᵐ[μ] t

tactic: rw [empty_union]
state_before: case h.e'_5
α : Type u_1
β : Type ?u.117614
γ : Type ?u.117617
δ : Type ?u.117620
ι : Type ?u.117623
inst✝ : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁ s₂ t : Set α
h : s =ᵐ[μ] ∅
⊢ t = ∅ ∪ t
Theorem: map_wittPolynomial
File: Mathlib/RingTheory/WittVector/WittPolynomial.lean

tactic: rw [wittPolynomial, map_sum, wittPolynomial]
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
n : ℕ
⊢ ↑(map f) (W_ R n) = W_ S n

tactic: refine sum_congr rfl fun i _ => ?_
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
n : ℕ
⊢ ∑ x in range (n + 1), ↑(map f) (↑(monomial (single x (p ^ (n - x)))) (↑p ^ x)) =
    ∑ i in range (n + 1), ↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)

tactic: rw [map_monomial, RingHom.map_pow, map_natCast]
state_before: p : ℕ
R : Type u_1
inst✝² : CommRing R
inst✝¹ : DecidableEq R
S : Type u_2
inst✝ : CommRing S
f : R →+* S
n i : ℕ
x✝ : i ∈ range (n + 1)
⊢ ↑(map f) (↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)) = ↑(monomial (single i (p ^ (n - i)))) (↑p ^ i)
Theorem: Nat.dvd_of_mod_eq_zero
File: Std/Data/Nat/Lemmas.lean

tactic: exists n / m
state_before: m n : Nat
H : n % m = 0
⊢ m ∣ n

tactic: have := (mod_add_div n m).symm
state_before: m n : Nat
H : n % m = 0
⊢ n = m * (n / m)

tactic: rwa [H, Nat.zero_add] at this
state_before: m n : Nat
H : n % m = 0
this : n = n % m + m * (n / m)
⊢ n = m * (n / m)
Theorem: not_isMin_iff
File: Mathlib/Order/Max.lean

tactic: simp [lt_iff_le_not_le, IsMin, not_forall, exists_prop]
state_before: α : Type u_1
β : Type ?u.9140
inst✝ : Preorder α
a b : α
⊢ ¬IsMin a ↔ ∃ b, b < a
Theorem: Nat.shiftl_eq_mul_pow
File: Mathlib/Data/Nat/Size.lean

tactic: show bit0 (shiftl m k) = m * (2 ^ k * 2)
state_before: m k : ℕ
⊢ shiftl m (k + 1) = m * 2 ^ (k + 1)

tactic: rw [bit0_val, shiftl_eq_mul_pow m k, mul_comm 2, mul_assoc]
state_before: m k : ℕ
⊢ bit0 (shiftl m k) = m * (2 ^ k * 2)
Theorem: Filter.iInf_neBot_of_directed'
File: Mathlib/Order/Filter/Basic.lean

tactic: simpa only [not_forall, not_neBot, ← empty_mem_iff_bot,
mem_iInf_of_directed hd] using id
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.110309
ι : Sort x
f✝ g : Filter α
s t : Set α
f : ι → Filter α
inst✝ : Nonempty ι
hd : Directed (fun x x_1 => x ≥ x_1) f
⊢ ¬NeBot (iInf f) → ¬∀ (i : ι), NeBot (f i)
Theorem: Filter.limsup_eq_iInf_iSup
File: Mathlib/Order/LiminfLimsup.lean

tactic: simp only [sSup_image, id]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.105898
ι : Type ?u.105901
inst✝ : CompleteLattice α
f : Filter β
u : β → α
⊢ (⨅ (i : Set β) (_ : i ∈ f), sSup (u '' id i)) = ⨅ (s : Set β) (_ : s ∈ f), ⨆ (a : β) (_ : a ∈ s), u a
Theorem: MeasureTheory.Measure.measure_eq_right_of_subset_of_measure_add_eq
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [add_comm] at h'' h
state_before: α : Type u_1
β : Type ?u.139389
γ : Type ?u.139392
δ : Type ?u.139395
ι : Type ?u.139398
R : Type ?u.139401
R' : Type ?u.139404
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t✝ s t : Set α
h : ↑↑(μ + ν) t ≠ ⊤
h' : s ⊆ t
h'' : ↑↑(μ + ν) s = ↑↑(μ + ν) t
⊢ ↑↑ν s = ↑↑ν t

tactic: exact measure_eq_left_of_subset_of_measure_add_eq h h' h''
state_before: α : Type u_1
β : Type ?u.139389
γ : Type ?u.139392
δ : Type ?u.139395
ι : Type ?u.139398
R : Type ?u.139401
R' : Type ?u.139404
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t✝ s t : Set α
h : ↑↑(ν + μ) t ≠ ⊤
h' : s ⊆ t
h'' : ↑↑(ν + μ) s = ↑↑(ν + μ) t
⊢ ↑↑ν s = ↑↑ν t
Theorem: Real.Angle.tan_zero
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: rw [← coe_zero, tan_coe, Real.tan_zero]
state_before: ⊢ tan 0 = 0
Theorem: List.range'_eq_map_range
File: Std/Data/List/Lemmas.lean

tactic: rw [range_eq_range', map_add_range']
state_before: s n : Nat
⊢ range' s n = map (fun x => s + x) (range n)

tactic: rfl
state_before: s n : Nat
⊢ range' s n = range' (s + 0) n
Theorem: OrderIso.isCoatomic_iff
File: Mathlib/Order/Atoms.lean

tactic: simp only [← isAtomic_dual_iff_isCoatomic, f.dual.isAtomic_iff]
state_before: α : Type u_1
β : Type u_2
inst✝³ : PartialOrder α
inst✝² : PartialOrder β
inst✝¹ : OrderTop α
inst✝ : OrderTop β
f : α ≃o β
⊢ IsCoatomic α ↔ IsCoatomic β
Theorem: Valued.hasBasis_uniformity
File: Mathlib/Topology/Algebra/Valuation.lean

tactic: rw [uniformity_eq_comap_nhds_zero]
state_before: R : Type u
inst✝¹ : Ring R
Γ₀ : Type v
inst✝ : LinearOrderedCommGroupWithZero Γ₀
_i : Valued R Γ₀
⊢ Filter.HasBasis (uniformity R) (fun x => True) fun γ => {p | ↑v (p.snd - p.fst) < ↑γ}

tactic: exact (hasBasis_nhds_zero R Γ₀).comap _
state_before: R : Type u
inst✝¹ : Ring R
Γ₀ : Type v
inst✝ : LinearOrderedCommGroupWithZero Γ₀
_i : Valued R Γ₀
⊢ Filter.HasBasis (Filter.comap (fun x => x.snd - x.fst) (𝓝 0)) (fun x => True) fun γ => {p | ↑v (p.snd - p.fst) < ↑γ}
Theorem: midpoint_add_sub
File: Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean

tactic: rw [midpoint_comm]
state_before: R : Type u_2
V : Type u_1
V' : Type ?u.143234
P : Type ?u.143237
P' : Type ?u.143240
inst✝⁷ : Ring R
inst✝⁶ : Invertible 2
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 : P
x y : V
⊢ midpoint R (x + y) (x - y) = x

tactic: simp
state_before: R : Type u_2
V : Type u_1
V' : Type ?u.143234
P : Type ?u.143237
P' : Type ?u.143240
inst✝⁷ : Ring R
inst✝⁶ : Invertible 2
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 : P
x y : V
⊢ midpoint R (x - y) (x + y) = x
Theorem: vadd_left_mem_affineSpan_pair
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: rw [vadd_mem_iff_mem_direction _ (left_mem_affineSpan_pair _ _ _), direction_affineSpan,
  mem_vectorSpan_pair_rev]
state_before: k : Type u_2
V : Type u_3
P : Type u_1
inst✝³ : Ring k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
ι : Type ?u.475169
p₁ p₂ : P
v : V
⊢ v +ᵥ p₁ ∈ affineSpan k {p₁, p₂} ↔ ∃ r, r • (p₂ -ᵥ p₁) = v
Theorem: CategoryTheory.exists_simple_subobject
File: Mathlib/CategoryTheory/Noetherian.lean

tactic: haveI : Nontrivial (Subobject X) := nontrivial_of_not_isZero h
state_before: C : Type u_1
inst✝³ : Category C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
X : C
inst✝ : ArtinianObject X
h : ¬IsZero X
⊢ ∃ Y, Simple (underlying.obj Y)

tactic: haveI := isAtomic_of_orderBot_wellFounded_lt (ArtinianObject.subobject_lt_wellFounded X)
state_before: C : Type u_1
inst✝³ : Category C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
X : C
inst✝ : ArtinianObject X
h : ¬IsZero X
this : Nontrivial (Subobject X)
⊢ ∃ Y, Simple (underlying.obj Y)

tactic: obtain ⟨Y, s⟩ := (IsAtomic.eq_bot_or_exists_atom_le (⊤ : Subobject X)).resolve_left top_ne_bot
state_before: C : Type u_1
inst✝³ : Category C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
X : C
inst✝ : ArtinianObject X
h : ¬IsZero X
this✝ : Nontrivial (Subobject X)
this : IsAtomic (Subobject X)
⊢ ∃ Y, Simple (underlying.obj Y)

tactic: exact ⟨Y, (subobject_simple_iff_isAtom _).mpr s.1⟩
state_before: case intro
C : Type u_1
inst✝³ : Category C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasZeroObject C
X : C
inst✝ : ArtinianObject X
h : ¬IsZero X
this✝ : Nontrivial (Subobject X)
this : IsAtomic (Subobject X)
Y : Subobject X
s : IsAtom Y ∧ Y ≤ ⊤
⊢ ∃ Y, Simple (underlying.obj Y)
Theorem: IsLocalMaxOn.closure
File: Mathlib/Topology/Algebra/Order/ExtrClosure.lean

tactic: rcases mem_nhdsWithin.1 h with ⟨U, Uo, aU, hU⟩
state_before: X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : Preorder Y
inst✝ : OrderClosedTopology Y
f g : X → Y
s : Set X
a : X
h : IsLocalMaxOn f s a
hc : ContinuousOn f (closure s)
⊢ IsLocalMaxOn f (closure s) a

tactic: refine' mem_nhdsWithin.2 ⟨U, Uo, aU, _⟩
state_before: case intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : Preorder Y
inst✝ : OrderClosedTopology Y
f g : X → Y
s : Set X
a : X
h : IsLocalMaxOn f s a
hc : ContinuousOn f (closure s)
U : Set X
Uo : IsOpen U
aU : a ∈ U
hU : U ∩ s ⊆ {x | (fun x => f x ≤ f a) x}
⊢ IsLocalMaxOn f (closure s) a

tactic: rintro x ⟨hxU, hxs⟩
state_before: case intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : Preorder Y
inst✝ : OrderClosedTopology Y
f g : X → Y
s : Set X
a : X
h : IsLocalMaxOn f s a
hc : ContinuousOn f (closure s)
U : Set X
Uo : IsOpen U
aU : a ∈ U
hU : U ∩ s ⊆ {x | (fun x => f x ≤ f a) x}
⊢ U ∩ closure s ⊆ {x | (fun x => f x ≤ f a) x}

tactic: refine' ContinuousWithinAt.closure_le _ _ continuousWithinAt_const hU
state_before: case intro.intro.intro.intro
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : Preorder Y
inst✝ : OrderClosedTopology Y
f g : X → Y
s : Set X
a : X
h : IsLocalMaxOn f s a
hc : ContinuousOn f (closure s)
U : Set X
Uo : IsOpen U
aU : a ∈ U
hU : U ∩ s ⊆ {x | (fun x => f x ≤ f a) x}
x : X
hxU : x ∈ U
hxs : x ∈ closure s
⊢ x ∈ {x | (fun x => f x ≤ f a) x}

tactic: rwa [mem_closure_iff_nhdsWithin_neBot, nhdsWithin_inter_of_mem, ←
  mem_closure_iff_nhdsWithin_neBot]
state_before: case intro.intro.intro.intro.refine'_1
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : Preorder Y
inst✝ : OrderClosedTopology Y
f g : X → Y
s : Set X
a : X
h : IsLocalMaxOn f s a
hc : ContinuousOn f (closure s)
U : Set X
Uo : IsOpen U
aU : a ∈ U
hU : U ∩ s ⊆ {x | (fun x => f x ≤ f a) x}
x : X
hxU : x ∈ U
hxs : x ∈ closure s
⊢ x ∈ closure (U ∩ s)

tactic: exact nhdsWithin_le_nhds (Uo.mem_nhds hxU)
state_before: case intro.intro.intro.intro.refine'_1
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : Preorder Y
inst✝ : OrderClosedTopology Y
f g : X → Y
s : Set X
a : X
h : IsLocalMaxOn f s a
hc : ContinuousOn f (closure s)
U : Set X
Uo : IsOpen U
aU : a ∈ U
hU : U ∩ s ⊆ {x | (fun x => f x ≤ f a) x}
x : X
hxU : x ∈ U
hxs : x ∈ closure s
⊢ U ∈ 𝓝[s] x

tactic: exact (hc _ hxs).mono ((inter_subset_right _ _).trans subset_closure)
state_before: case intro.intro.intro.intro.refine'_2
X : Type u_1
Y : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : Preorder Y
inst✝ : OrderClosedTopology Y
f g : X → Y
s : Set X
a : X
h : IsLocalMaxOn f s a
hc : ContinuousOn f (closure s)
U : Set X
Uo : IsOpen U
aU : a ∈ U
hU : U ∩ s ⊆ {x | (fun x => f x ≤ f a) x}
x : X
hxU : x ∈ U
hxs : x ∈ closure s
⊢ ContinuousWithinAt f (U ∩ s) x
Theorem: isClosed_iUnion
File: Mathlib/Topology/Basic.lean

tactic: simp only [← isOpen_compl_iff, compl_iUnion] at *
state_before: α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝¹ : TopologicalSpace α
inst✝ : Finite ι
s : ι → Set α
h : ∀ (i : ι), IsClosed (s i)
⊢ IsClosed (⋃ (i : ι), s i)

tactic: exact isOpen_iInter h
state_before: α : Type u
β : Type v
ι : Sort w
a : α
s✝ s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝¹ : TopologicalSpace α
inst✝ : Finite ι
s : ι → Set α
h : ∀ (i : ι), IsOpen (s iᶜ)
⊢ IsOpen (⋂ (i : ι), s iᶜ)
Theorem: MeasureTheory.JordanDecomposition.real_smul_posPart_neg
File: Mathlib/MeasureTheory/Decomposition/Jordan.lean

tactic: rw [real_smul_def, ← smul_negPart, if_neg (not_le.2 hr), neg_posPart]
state_before: α : Type u_1
β : Type ?u.13833
inst✝ : MeasurableSpace α
j : JordanDecomposition α
r : ℝ
hr : r < 0
⊢ (r • j).posPart = Real.toNNReal (-r) • j.negPart
Theorem: Set.not_nontrivial_singleton
File: Mathlib/Data/Set/Basic.lean

tactic: rw [nontrivial_iff_exists_ne (mem_singleton x)] at H
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
x : α
H : Set.Nontrivial {x}
⊢ False

tactic: let ⟨y, hy, hya⟩ := H
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
x : α
H : ∃ y, y ∈ {x} ∧ y ≠ x
⊢ False

tactic: exact hya (mem_singleton_iff.1 hy)
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
x : α
H : ∃ y, y ∈ {x} ∧ y ≠ x
y : α
hy : y ∈ {x}
hya : y ≠ x
⊢ False
Theorem: Int.le_add_of_sub_left_le
File: Std/Data/Int/Lemmas.lean

tactic: have h := Int.add_le_add_right h b
state_before: a b c : Int
h : a - b ≤ c
⊢ a ≤ b + c

tactic: rwa [Int.sub_add_cancel, Int.add_comm] at h
state_before: a b c : Int
h✝ : a - b ≤ c
h : a - b + b ≤ c + b
⊢ a ≤ b + c
Theorem: MeasureTheory.SimpleFunc.sum_eapproxDiff
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

tactic: induction' n with n IH
state_before: α : Type u_1
β : Type ?u.843173
γ : Type ?u.843176
δ : Type ?u.843179
inst✝ : MeasurableSpace α
K : Type ?u.843185
f : α → ℝ≥0∞
n : ℕ
a : α
⊢ ∑ k in Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a

tactic: simp only [Nat.zero_eq, Nat.zero_add, Finset.sum_singleton, Finset.range_one]
state_before: case zero
α : Type u_1
β : Type ?u.843173
γ : Type ?u.843176
δ : Type ?u.843179
inst✝ : MeasurableSpace α
K : Type ?u.843185
f : α → ℝ≥0∞
a : α
⊢ ∑ k in Finset.range (Nat.zero + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f Nat.zero) a

tactic: rfl
state_before: case zero
α : Type u_1
β : Type ?u.843173
γ : Type ?u.843176
δ : Type ?u.843179
inst✝ : MeasurableSpace α
K : Type ?u.843185
f : α → ℝ≥0∞
a : α
⊢ ↑(↑(eapproxDiff f 0) a) = ↑(eapprox f 0) a

tactic: erw [Finset.sum_range_succ, Nat.succ_eq_add_one, IH, eapproxDiff, coe_map, Function.comp_apply,
  coe_sub, Pi.sub_apply, ENNReal.coe_toNNReal,
  add_tsub_cancel_of_le (monotone_eapprox f (Nat.le_succ _) _)]
state_before: case succ
α : Type u_1
β : Type ?u.843173
γ : Type ?u.843176
δ : Type ?u.843179
inst✝ : MeasurableSpace α
K : Type ?u.843185
f : α → ℝ≥0∞
a : α
n : ℕ
IH : ∑ k in Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a
⊢ ∑ k in Finset.range (Nat.succ n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f (Nat.succ n)) a

tactic: apply (lt_of_le_of_lt _ (eapprox_lt_top f (n + 1) a)).ne
state_before: case succ
α : Type u_1
β : Type ?u.843173
γ : Type ?u.843176
δ : Type ?u.843179
inst✝ : MeasurableSpace α
K : Type ?u.843185
f : α → ℝ≥0∞
a : α
n : ℕ
IH : ∑ k in Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a
⊢ ↑(eapprox f (Nat.add n 0 + 1)) a - ↑(eapprox f (Nat.add n 0)) a ≠ ⊤

tactic: rw [tsub_le_iff_right]
state_before: α : Type u_1
β : Type ?u.843173
γ : Type ?u.843176
δ : Type ?u.843179
inst✝ : MeasurableSpace α
K : Type ?u.843185
f : α → ℝ≥0∞
a : α
n : ℕ
IH : ∑ k in Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a
⊢ ↑(eapprox f (Nat.add n 0 + 1)) a - ↑(eapprox f (Nat.add n 0)) a ≤ ↑(eapprox f (n + 1)) a

tactic: exact le_self_add
state_before: α : Type u_1
β : Type ?u.843173
γ : Type ?u.843176
δ : Type ?u.843179
inst✝ : MeasurableSpace α
K : Type ?u.843185
f : α → ℝ≥0∞
a : α
n : ℕ
IH : ∑ k in Finset.range (n + 1), ↑(↑(eapproxDiff f k) a) = ↑(eapprox f n) a
⊢ ↑(eapprox f (Nat.add n 0 + 1)) a ≤ ↑(eapprox f (n + 1)) a + ↑(eapprox f (Nat.add n 0)) a
Theorem: tendsto_floor_right_pure
File: Mathlib/Topology/Algebra/Order/Floor.lean

tactic: simpa only [floor_intCast] using tendsto_floor_right_pure_floor (n : α)
state_before: α : Type u_1
β : Type ?u.5764
γ : Type ?u.5767
inst✝³ : LinearOrderedRing α
inst✝² : FloorRing α
inst✝¹ : TopologicalSpace α
inst✝ : OrderClosedTopology α
n : ℤ
⊢ Tendsto floor (𝓝[Ici ↑n] ↑n) (pure n)