tasksource/leandojo huggingface dataset:
Theorem: DifferentiableWithinAt.hasFDerivWithinAt
File: Mathlib/Analysis/Calculus/FDeriv/Basic.lean

tactic: dsimp only [fderivWithin]
state_before: 𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type ?u.253209
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.253304
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
h : DifferentiableWithinAt 𝕜 f s x
⊢ HasFDerivWithinAt f (fderivWithin 𝕜 f s x) s x

tactic: dsimp only [DifferentiableWithinAt] at h
state_before: 𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type ?u.253209
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.253304
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
h : DifferentiableWithinAt 𝕜 f s x
⊢ HasFDerivWithinAt f (if h : ∃ f', HasFDerivWithinAt f f' s x then choose h else 0) s x

tactic: rw [dif_pos h]
state_before: 𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type ?u.253209
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.253304
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
h : ∃ f', HasFDerivWithinAt f f' s x
⊢ HasFDerivWithinAt f (if h : ∃ f', HasFDerivWithinAt f f' s x then choose h else 0) s x

tactic: exact Classical.choose_spec h
state_before: 𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type ?u.253209
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.253304
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
h : ∃ f', HasFDerivWithinAt f f' s x
⊢ HasFDerivWithinAt f (choose h) s x
Theorem: Complex.IsExpCmpFilter.isLittleO_zpow_mul_exp
File: Mathlib/Analysis/SpecialFunctions/CompareExp.lean

tactic: simpa only [cpow_int_cast] using hl.isLittleO_cpow_mul_exp hb m n
state_before: l : Filter ℂ
b₁ b₂ : ℝ
hl : IsExpCmpFilter l
hb : b₁ < b₂
m n : ℤ
⊢ (fun z => z ^ ↑m * exp (↑b₁ * z)) =o[l] fun z => z ^ ↑n * exp (↑b₂ * z)
Theorem: hasSum_lt
File: Mathlib/Topology/Algebra/InfiniteSum/Order.lean

tactic: have : update f i 0 ≤ update g i 0 := update_le_update_iff.mpr ⟨rfl.le, fun i _ => h i⟩
state_before: ι : Type u_1
κ : Type ?u.38034
α : Type u_2
inst✝³ : OrderedAddCommGroup α
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalAddGroup α
inst✝ : OrderClosedTopology α
f g : ι → α
a₁ a₂ : α
i : ι
h : f ≤ g
hi : f i < g i
hf : HasSum f a₁
hg : HasSum g a₂
⊢ a₁ < a₂

tactic: have : 0 - f i + a₁ ≤ 0 - g i + a₂ := hasSum_le this (hf.update i 0) (hg.update i 0)
state_before: ι : Type u_1
κ : Type ?u.38034
α : Type u_2
inst✝³ : OrderedAddCommGroup α
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalAddGroup α
inst✝ : OrderClosedTopology α
f g : ι → α
a₁ a₂ : α
i : ι
h : f ≤ g
hi : f i < g i
hf : HasSum f a₁
hg : HasSum g a₂
this : update f i 0 ≤ update g i 0
⊢ a₁ < a₂

tactic: simpa only [zero_sub, add_neg_cancel_left] using add_lt_add_of_lt_of_le hi this
state_before: ι : Type u_1
κ : Type ?u.38034
α : Type u_2
inst✝³ : OrderedAddCommGroup α
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalAddGroup α
inst✝ : OrderClosedTopology α
f g : ι → α
a₁ a₂ : α
i : ι
h : f ≤ g
hi : f i < g i
hf : HasSum f a₁
hg : HasSum g a₂
this✝ : update f i 0 ≤ update g i 0
this : 0 - f i + a₁ ≤ 0 - g i + a₂
⊢ a₁ < a₂
Theorem: Complex.arg_eq_zero_iff
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

tactic: refine' ⟨fun h => _, _⟩
state_before: z : ℂ
⊢ arg z = 0 ↔ 0 ≤ z.re ∧ z.im = 0

tactic: rw [← abs_mul_cos_add_sin_mul_I z, h]
state_before: case refine'_1
z : ℂ
h : arg z = 0
⊢ 0 ≤ z.re ∧ z.im = 0

tactic: simp [abs.nonneg]
state_before: case refine'_1
z : ℂ
h : arg z = 0
⊢ 0 ≤ (↑(↑abs z) * (cos ↑0 + sin ↑0 * I)).re ∧ (↑(↑abs z) * (cos ↑0 + sin ↑0 * I)).im = 0

tactic: cases' z with x y
state_before: case refine'_2
z : ℂ
⊢ 0 ≤ z.re ∧ z.im = 0 → arg z = 0

tactic: rintro ⟨h, rfl : y = 0⟩
state_before: case refine'_2.mk
x y : ℝ
⊢ 0 ≤ { re := x, im := y }.re ∧ { re := x, im := y }.im = 0 → arg { re := x, im := y } = 0

tactic: exact arg_ofReal_of_nonneg h
state_before: case refine'_2.mk.intro
x : ℝ
h : 0 ≤ { re := x, im := 0 }.re
⊢ arg { re := x, im := 0 } = 0
Theorem: Function.support_smul_subset_right
File: Mathlib/Algebra/Support.lean

tactic: rw [Pi.smul_apply, hf, smul_zero]
state_before: α : Type u_3
β : Type ?u.86818
A : Type u_1
B : Type u_2
M : Type ?u.86827
N : Type ?u.86830
P : Type ?u.86833
R : Type ?u.86836
S : Type ?u.86839
G : Type ?u.86842
M₀ : Type ?u.86845
G₀ : Type ?u.86848
ι : Sort ?u.86851
inst✝² : AddMonoid A
inst✝¹ : Monoid B
inst✝ : DistribMulAction B A
b : B
f : α → A
x : α
hbf : x ∈ support (b • f)
hf : f x = 0
⊢ (b • f) x = 0
Theorem: le_div_iff'
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rw [mul_comm, le_div_iff hc]
state_before: ι : Type ?u.23085
α : Type u_1
β : Type ?u.23091
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
hc : 0 < c
⊢ a ≤ b / c ↔ c * a ≤ b
Theorem: ProbabilityTheory.kernel.sum_fintype
File: Mathlib/Probability/Kernel/Basic.lean

tactic: ext a s
state_before: α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : { x // x ∈ kernel α β }
inst✝ : Fintype ι
κ : ι → { x // x ∈ kernel α β }
⊢ kernel.sum κ = ∑ i : ι, κ i

tactic: intro hs
state_before: case h.h
α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : { x // x ∈ kernel α β }
inst✝ : Fintype ι
κ : ι → { x // x ∈ kernel α β }
a : α
s : Set β
⊢ MeasurableSet s → ↑↑(↑(kernel.sum κ) a) s = ↑↑(↑(∑ i : ι, κ i) a) s

tactic: simp only [sum_apply' κ a hs, finset_sum_apply' _ κ a s, tsum_fintype]
state_before: case h.h
α : Type u_2
β : Type u_3
ι : Type u_1
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : { x // x ∈ kernel α β }
inst✝ : Fintype ι
κ : ι → { x // x ∈ kernel α β }
a : α
s : Set β
hs : MeasurableSet s
⊢ ↑↑(↑(kernel.sum κ) a) s = ↑↑(↑(∑ i : ι, κ i) a) s
Theorem: OnePoint.isOpen_iff_of_mem
File: Mathlib/Topology/Compactification/OnePoint.lean

tactic: simp only [isOpen_iff_of_mem' h, isClosed_compl_iff, and_comm]
state_before: X : Type u_1
inst✝ : TopologicalSpace X
s : Set (OnePoint X)
t : Set X
h : ∞ ∈ s
⊢ IsOpen s ↔ IsClosed ((some ⁻¹' s)ᶜ) ∧ IsCompact ((some ⁻¹' s)ᶜ)
Theorem: QuotientGroup.eq_class_eq_leftCoset
File: Mathlib/GroupTheory/Coset.lean

tactic: rw [mem_leftCoset_iff, Set.mem_setOf_eq, eq_comm, QuotientGroup.eq, SetLike.mem_coe]
state_before: α : Type u_1
inst✝ : Group α
s✝ : Subgroup α
a b : α
s : Subgroup α
g z : α
⊢ z ∈ {x | ↑x = ↑g} ↔ z ∈ g *l ↑s
Theorem: Multiset.extract_gcd'
File: Mathlib/Algebra/GCDMonoid/Multiset.lean

tactic: conv_lhs => rw [← normalize_gcd, ← gcd_map_mul, ← ht]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s t : Multiset α
hs : ∃ x, x ∈ s ∧ x ≠ 0
ht : s = map ((fun x x_1 => x * x_1) (gcd s)) t
⊢ gcd s * gcd t = gcd s

tactic: contrapose! hs
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s t : Multiset α
hs : ∃ x, x ∈ s ∧ x ≠ 0
ht : s = map ((fun x x_1 => x * x_1) (gcd s)) t
⊢ ¬gcd s = 0

tactic: exact s.gcd_eq_zero_iff.1 hs
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s t : Multiset α
ht : s = map ((fun x x_1 => x * x_1) (gcd s)) t
hs : gcd s = 0
⊢ ∀ (x : α), x ∈ s → x = 0
Theorem: Composition.card_boundaries_eq_succ_length
File: Mathlib/Combinatorics/Composition.lean

tactic: simp [boundaries]
state_before: n : ℕ
c : Composition n
⊢ Finset.card (boundaries c) = length c + 1
Theorem: UniversalEnvelopingAlgebra.hom_ext
File: Mathlib/Algebra/Lie/UniversalEnveloping.lean

tactic: ext
state_before: R : Type u₁
L : Type u₂
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
A : Type u₃
inst✝¹ : Ring A
inst✝ : Algebra R A
f : L →ₗ⁅R⁆ A
g₁ g₂ : UniversalEnvelopingAlgebra R L →ₐ[R] A
h : LieHom.comp (AlgHom.toLieHom g₁) (ι R) = LieHom.comp (AlgHom.toLieHom g₂) (ι R)
⊢ ↑(lift R).symm g₁ = ↑(lift R).symm g₂

tactic: simp [h]
state_before: case h
R : Type u₁
L : Type u₂
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
A : Type u₃
inst✝¹ : Ring A
inst✝ : Algebra R A
f : L →ₗ⁅R⁆ A
g₁ g₂ : UniversalEnvelopingAlgebra R L →ₐ[R] A
h : LieHom.comp (AlgHom.toLieHom g₁) (ι R) = LieHom.comp (AlgHom.toLieHom g₂) (ι R)
x✝ : L
⊢ ↑(↑(lift R).symm g₁) x✝ = ↑(↑(lift R).symm g₂) x✝
Theorem: MvPolynomial.map_aeval
File: Mathlib/Data/MvPolynomial/Basic.lean

tactic: rw [← comp_eval₂Hom]
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_2
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝⁴ : CommSemiring R
inst✝³ : CommSemiring S₁
p✝ q : MvPolynomial σ R
inst✝² : Algebra R S₁
inst✝¹ : CommSemiring S₂
f : σ → S₁
B : Type u_1
inst✝ : CommSemiring B
g : σ → S₁
φ : S₁ →+* B
p : MvPolynomial σ R
⊢ ↑φ (↑(aeval g) p) = ↑(eval₂Hom (RingHom.comp φ (algebraMap R S₁)) fun i => ↑φ (g i)) p

tactic: rfl
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_2
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝⁴ : CommSemiring R
inst✝³ : CommSemiring S₁
p✝ q : MvPolynomial σ R
inst✝² : Algebra R S₁
inst✝¹ : CommSemiring S₂
f : σ → S₁
B : Type u_1
inst✝ : CommSemiring B
g : σ → S₁
φ : S₁ →+* B
p : MvPolynomial σ R
⊢ ↑φ (↑(aeval g) p) = ↑(RingHom.comp φ (eval₂Hom (algebraMap R S₁) fun i => g i)) p
Theorem: Int.eq_mul_of_div_eq_left
File: Std/Data/Int/DivMod.lean

tactic: rw [Int.mul_comm, Int.eq_mul_of_div_eq_right H1 H2]
state_before: a b c : Int
H1 : b ∣ a
H2 : div a b = c
⊢ a = c * b
Theorem: CategoryTheory.MorphismProperty.IsInvertedBy.of_comp
File: Mathlib/CategoryTheory/MorphismProperty.lean

tactic: haveI := hF f hf
state_before: C : Type u
inst✝⁴ : Category C
D : Type ?u.46661
inst✝³ : Category D
C₁ : Type u_1
C₂ : Type u_2
C₃ : Type u_3
inst✝² : Category C₁
inst✝¹ : Category C₂
inst✝ : Category C₃
W : MorphismProperty C₁
F : C₁ ⥤ C₂
hF : IsInvertedBy W F
G : C₂ ⥤ C₃
X Y : C₁
f : X ⟶ Y
hf : W f
⊢ IsIso ((F ⋙ G).map f)

tactic: dsimp
state_before: C : Type u
inst✝⁴ : Category C
D : Type ?u.46661
inst✝³ : Category D
C₁ : Type u_1
C₂ : Type u_2
C₃ : Type u_3
inst✝² : Category C₁
inst✝¹ : Category C₂
inst✝ : Category C₃
W : MorphismProperty C₁
F : C₁ ⥤ C₂
hF : IsInvertedBy W F
G : C₂ ⥤ C₃
X Y : C₁
f : X ⟶ Y
hf : W f
this : IsIso (F.map f)
⊢ IsIso ((F ⋙ G).map f)

tactic: infer_instance
state_before: C : Type u
inst✝⁴ : Category C
D : Type ?u.46661
inst✝³ : Category D
C₁ : Type u_1
C₂ : Type u_2
C₃ : Type u_3
inst✝² : Category C₁
inst✝¹ : Category C₂
inst✝ : Category C₃
W : MorphismProperty C₁
F : C₁ ⥤ C₂
hF : IsInvertedBy W F
G : C₂ ⥤ C₃
X Y : C₁
f : X ⟶ Y
hf : W f
this : IsIso (F.map f)
⊢ IsIso (G.map (F.map f))
Theorem: parallelepiped_eq_convexHull
File: Mathlib/MeasureTheory/Measure/Haar/OfBasis.lean

tactic: let A : Set E →+ Set E :=
  { toFun := convexHull ℝ
    map_zero' := convexHull_singleton _
    map_add' := convexHull_add }
state_before: ι : Type u_2
ι' : Type ?u.96374
E : Type u_1
F : Type ?u.96380
inst✝⁵ : Fintype ι
inst✝⁴ : Fintype ι'
inst✝³ : AddCommGroup E
inst✝² : Module ℝ E
inst✝¹ : AddCommGroup F
inst✝ : Module ℝ F
v : ι → E
⊢ parallelepiped v = ↑(convexHull ℝ).toOrderHom (∑ i : ι, {0, v i})

tactic: simp_rw [parallelepiped_eq_sum_segment, ← convexHull_pair]
state_before: ι : Type u_2
ι' : Type ?u.96374
E : Type u_1
F : Type ?u.96380
inst✝⁵ : Fintype ι
inst✝⁴ : Fintype ι'
inst✝³ : AddCommGroup E
inst✝² : Module ℝ E
inst✝¹ : AddCommGroup F
inst✝ : Module ℝ F
v : ι → E
A : Set E →+ Set E :=
  { toZeroHom := { toFun := ↑(convexHull ℝ).toOrderHom, map_zero' := (_ : ↑(convexHull ℝ).toOrderHom {0} = {0}) },
    map_add' :=
      (_ :
        ∀ (s t : Set E),
          ↑(convexHull ℝ).toOrderHom (s + t) = ↑(convexHull ℝ).toOrderHom s + ↑(convexHull ℝ).toOrderHom t) }
⊢ parallelepiped v = ↑(convexHull ℝ).toOrderHom (∑ i : ι, {0, v i})

tactic: exact (A.map_sum _ _).symm
state_before: ι : Type u_2
ι' : Type ?u.96374
E : Type u_1
F : Type ?u.96380
inst✝⁵ : Fintype ι
inst✝⁴ : Fintype ι'
inst✝³ : AddCommGroup E
inst✝² : Module ℝ E
inst✝¹ : AddCommGroup F
inst✝ : Module ℝ F
v : ι → E
A : Set E →+ Set E :=
  { toZeroHom := { toFun := ↑(convexHull ℝ).toOrderHom, map_zero' := (_ : ↑(convexHull ℝ).toOrderHom {0} = {0}) },
    map_add' :=
      (_ :
        ∀ (s t : Set E),
          ↑(convexHull ℝ).toOrderHom (s + t) = ↑(convexHull ℝ).toOrderHom s + ↑(convexHull ℝ).toOrderHom t) }
⊢ ∑ x : ι, ↑(convexHull ℝ).toOrderHom {0, v x} = ↑(convexHull ℝ).toOrderHom (∑ i : ι, {0, v i})
Theorem: Matrix.algebraMap_matrix_apply
File: Mathlib/Data/Matrix/Basic.lean

tactic: dsimp [algebraMap, Algebra.toRingHom, Matrix.scalar]
state_before: l : Type ?u.519207
m : Type ?u.519210
n : Type u_1
o : Type ?u.519216
m' : o → Type ?u.519221
n' : o → Type ?u.519226
R : Type u_2
S : Type ?u.519232
α : Type v
β : Type w
γ : Type ?u.519239
inst✝⁶ : Fintype n
inst✝⁵ : DecidableEq n
inst✝⁴ : CommSemiring R
inst✝³ : Semiring α
inst✝² : Semiring β
inst✝¹ : Algebra R α
inst✝ : Algebra R β
r : R
i j : n
⊢ ↑(algebraMap R (Matrix n n α)) r i j = if i = j then ↑(algebraMap R α) r else 0

tactic: split_ifs with h <;> simp [h, Matrix.one_apply_ne]
state_before: l : Type ?u.519207
m : Type ?u.519210
n : Type u_1
o : Type ?u.519216
m' : o → Type ?u.519221
n' : o → Type ?u.519226
R : Type u_2
S : Type ?u.519232
α : Type v
β : Type w
γ : Type ?u.519239
inst✝⁶ : Fintype n
inst✝⁵ : DecidableEq n
inst✝⁴ : CommSemiring R
inst✝³ : Semiring α
inst✝² : Semiring β
inst✝¹ : Algebra R α
inst✝ : Algebra R β
r : R
i j : n
⊢ ↑Algebra.toRingHom r * OfNat.ofNat 1 i j = if i = j then ↑Algebra.toRingHom r else 0
Theorem: continuous_le_rng
File: Mathlib/Topology/Order.lean

tactic: rw [continuous_iff_coinduced_le] at h₂ ⊢
state_before: α : Type u
β : Type v
γ : Type ?u.37963
f : α → β
ι : Sort ?u.37970
t₁ : TopologicalSpace α
t₂ t₃ : TopologicalSpace β
h₁ : t₂ ≤ t₃
h₂ : Continuous f
⊢ Continuous f

tactic: exact le_trans h₂ h₁
state_before: α : Type u
β : Type v
γ : Type ?u.37963
f : α → β
ι : Sort ?u.37970
t₁ : TopologicalSpace α
t₂ t₃ : TopologicalSpace β
h₁ : t₂ ≤ t₃
h₂ : coinduced f t₁ ≤ t₂
⊢ coinduced f t₁ ≤ t₃
Theorem: iUnion_Ioc_add_int_cast
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: simpa only [zsmul_one, Int.cast_add, Int.cast_one, ← add_assoc] using
  iUnion_Ioc_add_zsmul zero_lt_one a
state_before: α : Type u_1
inst✝¹ : LinearOrderedRing α
inst✝ : Archimedean α
a : α
⊢ (⋃ (n : ℤ), Ioc (a + ↑n) (a + ↑n + 1)) = univ
Theorem: Real.ediam_eq
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: rcases eq_empty_or_nonempty s with (rfl | hne)
state_before: α : Type ?u.434159
β : Type ?u.434162
γ : Type ?u.434165
inst✝ : PseudoEMetricSpace α
s : Set ℝ
h : Metric.Bounded s
⊢ EMetric.diam s = ENNReal.ofReal (sSup s - sInf s)

tactic: refine' le_antisymm (Metric.ediam_le_of_forall_dist_le fun x hx y hy => _) _
state_before: case inr
α : Type ?u.434159
β : Type ?u.434162
γ : Type ?u.434165
inst✝ : PseudoEMetricSpace α
s : Set ℝ
h : Metric.Bounded s
hne : Set.Nonempty s
⊢ EMetric.diam s = ENNReal.ofReal (sSup s - sInf s)

tactic: simp
state_before: case inl
α : Type ?u.434159
β : Type ?u.434162
γ : Type ?u.434165
inst✝ : PseudoEMetricSpace α
h : Metric.Bounded ∅
⊢ EMetric.diam ∅ = ENNReal.ofReal (sSup ∅ - sInf ∅)

tactic: have := Real.subset_Icc_sInf_sSup_of_bounded h
state_before: case inr.refine'_1
α : Type ?u.434159
β : Type ?u.434162
γ : Type ?u.434165
inst✝ : PseudoEMetricSpace α
s : Set ℝ
h : Metric.Bounded s
hne : Set.Nonempty s
x : ℝ
hx : x ∈ s
y : ℝ
hy : y ∈ s
⊢ dist x y ≤ sSup s - sInf s

tactic: exact Real.dist_le_of_mem_Icc (this hx) (this hy)
state_before: case inr.refine'_1
α : Type ?u.434159
β : Type ?u.434162
γ : Type ?u.434165
inst✝ : PseudoEMetricSpace α
s : Set ℝ
h : Metric.Bounded s
hne : Set.Nonempty s
x : ℝ
hx : x ∈ s
y : ℝ
hy : y ∈ s
this : s ⊆ Icc (sInf s) (sSup s)
⊢ dist x y ≤ sSup s - sInf s

tactic: apply ENNReal.ofReal_le_of_le_toReal
state_before: case inr.refine'_2
α : Type ?u.434159
β : Type ?u.434162
γ : Type ?u.434165
inst✝ : PseudoEMetricSpace α
s : Set ℝ
h : Metric.Bounded s
hne : Set.Nonempty s
⊢ ENNReal.ofReal (sSup s - sInf s) ≤ EMetric.diam s

tactic: rw [← Metric.diam, ← Metric.diam_closure]
state_before: case inr.refine'_2.h
α : Type ?u.434159
β : Type ?u.434162
γ : Type ?u.434165
inst✝ : PseudoEMetricSpace α
s : Set ℝ
h : Metric.Bounded s
hne : Set.Nonempty s
⊢ sSup s - sInf s ≤ ENNReal.toReal (EMetric.diam s)

tactic: have h' := Real.bounded_iff_bddBelow_bddAbove.1 h
state_before: case inr.refine'_2.h
α : Type ?u.434159
β : Type ?u.434162
γ : Type ?u.434165
inst✝ : PseudoEMetricSpace α
s : Set ℝ
h : Metric.Bounded s
hne : Set.Nonempty s
⊢ sSup s - sInf s ≤ Metric.diam (closure s)

tactic: calc sSup s - sInf s ≤ dist (sSup s) (sInf s) := le_abs_self _
_ ≤ Metric.diam (closure s) := dist_le_diam_of_mem h.closure (csSup_mem_closure hne h'.2)
    (csInf_mem_closure hne h'.1)
state_before: case inr.refine'_2.h
α : Type ?u.434159
β : Type ?u.434162
γ : Type ?u.434165
inst✝ : PseudoEMetricSpace α
s : Set ℝ
h : Metric.Bounded s
hne : Set.Nonempty s
h' : BddBelow s ∧ BddAbove s
⊢ sSup s - sInf s ≤ Metric.diam (closure s)
Theorem: EReal.measurable_of_measurable_real
File: Mathlib/MeasureTheory/Constructions/BorelSpace/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.3039973
γ : Type ?u.3039976
γ₂ : Type ?u.3039979
δ : Type ?u.3039982
ι : Sort y
s t u : Set α
inst✝ : MeasurableSpace α
f : EReal → α
h : Measurable fun p => f ↑p
⊢ Set.Finite {⊥, ⊤}
Theorem: FirstOrder.Language.BoundedFormula.card_le
File: Mathlib/ModelTheory/Encoding.lean

tactic: refine' lift_le.1 (BoundedFormula.encoding.card_le_card_list.trans _)
state_before: L : Language
M : Type w
N : Type ?u.158067
P : Type ?u.158070
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ (#(n : ℕ) × BoundedFormula L α n) ≤ max ℵ₀ (lift (#α) + lift (card L))

tactic: rw [encoding_Γ, mk_list_eq_max_mk_aleph0, lift_max, lift_aleph0, lift_max, lift_aleph0,
  max_le_iff]
state_before: L : Language
M : Type w
N : Type ?u.158067
P : Type ?u.158070
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ lift (#List BoundedFormula.encoding.Γ) ≤ lift (max ℵ₀ (lift (#α) + lift (card L)))

tactic: refine' ⟨_, le_max_left _ _⟩
state_before: L : Language
M : Type w
N : Type ?u.158067
P : Type ?u.158070
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ lift (#(k : ℕ) × Term L (α ⊕ Fin k) ⊕ (n : ℕ) × Relations L n ⊕ ℕ) ≤ max ℵ₀ (lift (lift (#α) + lift (card L))) ∧
    ℵ₀ ≤ max ℵ₀ (lift (lift (#α) + lift (card L)))

tactic: rw [mk_sum, Term.card_sigma, mk_sum, ← add_eq_max le_rfl, mk_sum, mk_nat]
state_before: L : Language
M : Type w
N : Type ?u.158067
P : Type ?u.158070
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ lift (#(k : ℕ) × Term L (α ⊕ Fin k) ⊕ (n : ℕ) × Relations L n ⊕ ℕ) ≤ max ℵ₀ (lift (lift (#α) + lift (card L)))

tactic: simp only [lift_add, lift_lift, lift_aleph0]
state_before: L : Language
M : Type w
N : Type ?u.158067
P : Type ?u.158070
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ lift (lift (ℵ₀ + (lift (#α) + lift (#(i : ℕ) × Functions L i))) + lift (lift (#(n : ℕ) × Relations L n) + lift ℵ₀)) ≤
    max ℵ₀ (lift (lift (#α) + lift (card L)))

tactic: rw [← add_assoc, add_comm, ← add_assoc, ← add_assoc, aleph0_add_aleph0, add_assoc,
  add_eq_max le_rfl, add_assoc, card, Symbols, mk_sum, lift_add, lift_lift, lift_lift]
state_before: L : Language
M : Type w
N : Type ?u.158067
P : Type ?u.158070
inst✝² : Structure L M
inst✝¹ : Structure L N
inst✝ : Structure L P
α : Type u'
β : Type v'
⊢ ℵ₀ + (lift (#α) + lift (#(i : ℕ) × Functions L i)) + (lift (#(n : ℕ) × Relations L n) + ℵ₀) ≤
    max ℵ₀ (lift (#α) + lift (card L))
Theorem: YoungDiagram.rowLens_length_ofRowLens
File: Mathlib/Combinatorics/Young/YoungDiagram.lean

tactic: simp only [length_rowLens, colLen, Nat.find_eq_iff, mem_cells, mem_ofRowLens,
  lt_self_iff_false, IsEmpty.exists_iff, Classical.not_not]
state_before: w : List ℕ
hw : List.Sorted (fun x x_1 => x ≥ x_1) w
hpos : ∀ (x : ℕ), x ∈ w → 0 < x
⊢ List.length (rowLens (ofRowLens w hw)) = List.length w

tactic: refine' ⟨True.intro, fun n hn => ⟨hn, hpos _ (List.get_mem _ _ hn)⟩⟩
state_before: w : List ℕ
hw : List.Sorted (fun x x_1 => x ≥ x_1) w
hpos : ∀ (x : ℕ), x ∈ w → 0 < x
⊢ True ∧ ∀ (n : ℕ), n < List.length w → ∃ h, 0 < List.get w { val := n, isLt := (_ : (n, 0).fst < List.length w) }
Theorem: MeasureTheory.VectorMeasure.restrict_univ
File: Mathlib/MeasureTheory/Measure/VectorMeasure.lean

tactic: rw [restrict_apply v MeasurableSet.univ hi, Set.inter_univ]
state_before: α : Type u_1
β : Type ?u.474375
m inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
M : Type u_2
inst✝¹ : AddCommMonoid M
inst✝ : TopologicalSpace M
v : VectorMeasure α M
i : Set α
hi : MeasurableSet i
⊢ ↑(restrict v Set.univ) i = ↑v i
Theorem: Int.neg_inj
File: Std/Data/Int/Lemmas.lean

tactic: rw [← Int.neg_neg a, ← Int.neg_neg b, h]
state_before: a b : Int
h : -a = -b
⊢ a = b
Theorem: Filter.Tendsto.atTop_div_const
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: simpa only [div_eq_mul_inv] using hf.atTop_mul_const (inv_pos.2 hr)
state_before: ι : Type ?u.221463
ι' : Type ?u.221466
α : Type u_1
β : Type u_2
γ : Type ?u.221475
inst✝ : LinearOrderedSemifield α
l : Filter β
f : β → α
r c : α
n : ℕ
hr : 0 < r
hf : Tendsto f l atTop
⊢ Tendsto (fun x => f x / r) l atTop
Theorem: Cardinal.mk_cardinal
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: simpa only [card_type, card_univ] using congr_arg card type_cardinal
state_before: ⊢ (#Cardinal) = univ
Theorem: IsLocalization.AtPrime.Nontrivial
File: Mathlib/RingTheory/Localization/AtPrime.lean

tactic: rw [← (algebraMap R S).map_one, ← (algebraMap R S).map_zero] at hze
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type ?u.10429
inst✝¹ : CommSemiring P
I : Ideal R
hp : Ideal.IsPrime I
inst✝ : IsLocalization.AtPrime S I
hze : 0 = 1
⊢ False

tactic: obtain ⟨t, ht⟩ := (eq_iff_exists I.primeCompl S).1 hze
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type ?u.10429
inst✝¹ : CommSemiring P
I : Ideal R
hp : Ideal.IsPrime I
inst✝ : IsLocalization.AtPrime S I
hze : ↑(algebraMap R S) 0 = ↑(algebraMap R S) 1
⊢ False

tactic: have htz : (t : R) = 0 := by simpa using ht.symm
state_before: case intro
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type ?u.10429
inst✝¹ : CommSemiring P
I : Ideal R
hp : Ideal.IsPrime I
inst✝ : IsLocalization.AtPrime S I
hze : ↑(algebraMap R S) 0 = ↑(algebraMap R S) 1
t : { x // x ∈ Ideal.primeCompl I }
ht : ↑t * 0 = ↑t * 1
⊢ False

tactic: exact t.2 (htz.symm ▸ I.zero_mem : ↑t ∈ I)
state_before: case intro
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type ?u.10429
inst✝¹ : CommSemiring P
I : Ideal R
hp : Ideal.IsPrime I
inst✝ : IsLocalization.AtPrime S I
hze : ↑(algebraMap R S) 0 = ↑(algebraMap R S) 1
t : { x // x ∈ Ideal.primeCompl I }
ht : ↑t * 0 = ↑t * 1
htz : ↑t = 0
⊢ False

tactic: simpa using ht.symm
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type ?u.10429
inst✝¹ : CommSemiring P
I : Ideal R
hp : Ideal.IsPrime I
inst✝ : IsLocalization.AtPrime S I
hze : ↑(algebraMap R S) 0 = ↑(algebraMap R S) 1
t : { x // x ∈ Ideal.primeCompl I }
ht : ↑t * 0 = ↑t * 1
⊢ ↑t = 0