tasksource/leandojo huggingface dataset:
Theorem: Finset.prod_toFinset_eq_subtype
File: Mathlib/Data/Fintype/BigOperators.lean

tactic: rw [← Finset.prod_subtype]
state_before: α : Type u_2
β : Type ?u.57115
γ : Type ?u.57118
M : Type u_1
inst✝² : CommMonoid M
inst✝¹ : Fintype α
p : α → Prop
inst✝ : DecidablePred p
f : α → M
⊢ ∏ a in Set.toFinset {x | p x}, f a = ∏ a : Subtype p, f ↑a

tactic: simp_rw [Set.mem_toFinset]
state_before: case h
α : Type u_2
β : Type ?u.57115
γ : Type ?u.57118
M : Type u_1
inst✝² : CommMonoid M
inst✝¹ : Fintype α
p : α → Prop
inst✝ : DecidablePred p
f : α → M
⊢ ∀ (x : α), x ∈ Set.toFinset {x | p x} ↔ p x

tactic: intro
state_before: case h
α : Type u_2
β : Type ?u.57115
γ : Type ?u.57118
M : Type u_1
inst✝² : CommMonoid M
inst✝¹ : Fintype α
p : α → Prop
inst✝ : DecidablePred p
f : α → M
⊢ ∀ (x : α), x ∈ {x | p x} ↔ p x

tactic: rfl
state_before: case h
α : Type u_2
β : Type ?u.57115
γ : Type ?u.57118
M : Type u_1
inst✝² : CommMonoid M
inst✝¹ : Fintype α
p : α → Prop
inst✝ : DecidablePred p
f : α → M
x✝ : α
⊢ x✝ ∈ {x | p x} ↔ p x✝
Theorem: List.inits_append
File: Mathlib/Data/List/Infix.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.39105
l l₁ l₂ l₃ : List α
a b : α
m n : ℕ
⊢ inits ([] ++ []) = inits [] ++ map (fun l => [] ++ l) (tail (inits []))
Theorem: fderivWithin_mem_iff
File: Mathlib/Analysis/Calculus/FDeriv/Basic.lean

tactic: by_cases hx : DifferentiableWithinAt 𝕜 f t x <;>
  simp [fderivWithin_zero_of_not_differentiableWithinAt, *]
state_before: 𝕜 : Type u_3
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_1
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_2
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type ?u.361248
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.361343
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
f : E → F
t : Set E
s : Set (E →L[𝕜] F)
x : E
⊢ fderivWithin 𝕜 f t x ∈ s ↔
    DifferentiableWithinAt 𝕜 f t x ∧ fderivWithin 𝕜 f t x ∈ s ∨ ¬DifferentiableWithinAt 𝕜 f t x ∧ 0 ∈ s
Theorem: FreeAlgebra.toTensor_ι
File: Mathlib/LinearAlgebra/TensorAlgebra/Basic.lean

tactic: simp [toTensor]
state_before: R : Type u_1
inst✝² : CommSemiring R
M : Type u_2
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
m : M
⊢ ↑toTensor (ι R m) = ↑(TensorAlgebra.ι R) m
Theorem: FormalMultilinearSeries.apply_eq_prod_smul_coeff
File: Mathlib/Analysis/Calculus/FormalMultilinearSeries.lean

tactic: convert (p n).toMultilinearMap.map_smul_univ y 1
state_before: 𝕜 : Type u
𝕜' : Type u'
E : Type v
F : Type w
G : Type x
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
s : E
p : FormalMultilinearSeries 𝕜 𝕜 E
f : 𝕜 → E
n : ℕ
z z₀ : 𝕜
y : Fin n → 𝕜
⊢ ↑(p n) y = (∏ i : Fin n, y i) • coeff p n

tactic: funext
state_before: case h.e'_2.h.e'_1.h
𝕜 : Type u
𝕜' : Type u'
E : Type v
F : Type w
G : Type x
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
s : E
p : FormalMultilinearSeries 𝕜 𝕜 E
f : 𝕜 → E
n : ℕ
z z₀ : 𝕜
y : Fin n → 𝕜
x✝ : Fin n
⊢ y x✝ = y x✝ • OfNat.ofNat 1 x✝

tactic: simp only [Pi.one_apply, Algebra.id.smul_eq_mul, mul_one]
state_before: case h.e'_2.h.e'_1.h
𝕜 : Type u
𝕜' : Type u'
E : Type v
F : Type w
G : Type x
inst✝² : NontriviallyNormedField 𝕜
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
s : E
p : FormalMultilinearSeries 𝕜 𝕜 E
f : 𝕜 → E
n : ℕ
z z₀ : 𝕜
y : Fin n → 𝕜
x✝ : Fin n
⊢ y x✝ = y x✝ • OfNat.ofNat 1 x✝
Theorem: Valuation.supp_quot
File: Mathlib/RingTheory/Valuation/Quotient.lean

tactic: apply le_antisymm
state_before: R : Type u_1
Γ₀ : Type u_2
inst✝¹ : CommRing R
inst✝ : LinearOrderedCommMonoidWithZero Γ₀
v : Valuation R Γ₀
J : Ideal R
hJ : J ≤ supp v
⊢ supp (onQuot v hJ) = Ideal.map (Ideal.Quotient.mk J) (supp v)

tactic: rintro ⟨x⟩ hx
state_before: case a
R : Type u_1
Γ₀ : Type u_2
inst✝¹ : CommRing R
inst✝ : LinearOrderedCommMonoidWithZero Γ₀
v : Valuation R Γ₀
J : Ideal R
hJ : J ≤ supp v
⊢ supp (onQuot v hJ) ≤ Ideal.map (Ideal.Quotient.mk J) (supp v)

tactic: apply Ideal.subset_span
state_before: case a.mk
R : Type u_1
Γ₀ : Type u_2
inst✝¹ : CommRing R
inst✝ : LinearOrderedCommMonoidWithZero Γ₀
v : Valuation R Γ₀
J : Ideal R
hJ : J ≤ supp v
x✝ : R ⧸ J
x : R
hx : Quot.mk Setoid.r x ∈ supp (onQuot v hJ)
⊢ Quot.mk Setoid.r x ∈ Ideal.map (Ideal.Quotient.mk J) (supp v)

tactic: exact ⟨x, hx, rfl⟩
state_before: case a.mk.a
R : Type u_1
Γ₀ : Type u_2
inst✝¹ : CommRing R
inst✝ : LinearOrderedCommMonoidWithZero Γ₀
v : Valuation R Γ₀
J : Ideal R
hJ : J ≤ supp v
x✝ : R ⧸ J
x : R
hx : Quot.mk Setoid.r x ∈ supp (onQuot v hJ)
⊢ Quot.mk Setoid.r x ∈ ↑(Ideal.Quotient.mk J) '' ↑(supp v)

tactic: rw [Ideal.map_le_iff_le_comap]
state_before: case a
R : Type u_1
Γ₀ : Type u_2
inst✝¹ : CommRing R
inst✝ : LinearOrderedCommMonoidWithZero Γ₀
v : Valuation R Γ₀
J : Ideal R
hJ : J ≤ supp v
⊢ Ideal.map (Ideal.Quotient.mk J) (supp v) ≤ supp (onQuot v hJ)

tactic: intro x hx
state_before: case a
R : Type u_1
Γ₀ : Type u_2
inst✝¹ : CommRing R
inst✝ : LinearOrderedCommMonoidWithZero Γ₀
v : Valuation R Γ₀
J : Ideal R
hJ : J ≤ supp v
⊢ supp v ≤ Ideal.comap (Ideal.Quotient.mk J) (supp (onQuot v hJ))

tactic: exact hx
state_before: case a
R : Type u_1
Γ₀ : Type u_2
inst✝¹ : CommRing R
inst✝ : LinearOrderedCommMonoidWithZero Γ₀
v : Valuation R Γ₀
J : Ideal R
hJ : J ≤ supp v
x : R
hx : x ∈ supp v
⊢ x ∈ Ideal.comap (Ideal.Quotient.mk J) (supp (onQuot v hJ))
Theorem: Subgroup.independent_of_coprime_order
File: Mathlib/GroupTheory/NoncommPiCoprod.lean

tactic: simpa using
  MonoidHom.independent_range_of_coprime_order (fun i => (H i).subtype)
    (commute_subtype_of_commute hcomm) hcoprime
state_before: G : Type u_2
inst✝² : Group G
ι : Type u_1
hdec : DecidableEq ι
hfin : Fintype ι
H : ι → Subgroup G
f g : (i : ι) → { x // x ∈ H i }
hcomm : ∀ (i j : ι), i ≠ j → ∀ (x y : G), x ∈ H i → y ∈ H j → Commute x y
inst✝¹ : Finite ι
inst✝ : (i : ι) → Fintype { x // x ∈ H i }
hcoprime : ∀ (i j : ι), i ≠ j → Nat.coprime (Fintype.card { x // x ∈ H i }) (Fintype.card { x // x ∈ H j })
⊢ CompleteLattice.Independent H
Theorem: Matrix.kroneckerMap_diagonal_right
File: Mathlib/Data/Matrix/Kronecker.lean

tactic: ext (⟨i₁, i₂⟩⟨j₁, j₂⟩)
state_before: R : Type ?u.10684
α : Type u_6
α' : Type ?u.10690
β : Type u_1
β' : Type ?u.10696
γ : Type u_2
γ' : Type ?u.10702
l : Type u_4
m : Type u_5
n : Type u_3
p : Type ?u.10714
q : Type ?u.10717
r : Type ?u.10720
l' : Type ?u.10723
m' : Type ?u.10726
n' : Type ?u.10729
p' : Type ?u.10732
inst✝² : Zero β
inst✝¹ : Zero γ
inst✝ : DecidableEq n
f : α → β → γ
hf : ∀ (a : α), f a 0 = 0
A : Matrix l m α
b : n → β
⊢ kroneckerMap f A (diagonal b) = blockDiagonal fun i => map A fun a => f a (b i)

tactic: simp [diagonal, blockDiagonal, apply_ite (f (A i₁ j₁)), hf]
state_before: case a.mk.h.mk
R : Type ?u.10684
α : Type u_6
α' : Type ?u.10690
β : Type u_1
β' : Type ?u.10696
γ : Type u_2
γ' : Type ?u.10702
l : Type u_4
m : Type u_5
n : Type u_3
p : Type ?u.10714
q : Type ?u.10717
r : Type ?u.10720
l' : Type ?u.10723
m' : Type ?u.10726
n' : Type ?u.10729
p' : Type ?u.10732
inst✝² : Zero β
inst✝¹ : Zero γ
inst✝ : DecidableEq n
f : α → β → γ
hf : ∀ (a : α), f a 0 = 0
A : Matrix l m α
b : n → β
i₁ : l
i₂ : n
j₁ : m
j₂ : n
⊢ kroneckerMap f A (diagonal b) (i₁, i₂) (j₁, j₂) = blockDiagonal (fun i => map A fun a => f a (b i)) (i₁, i₂) (j₁, j₂)
Theorem: MeasureTheory.le_iInf_lintegral
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: simp only [← iInf_apply]
state_before: α : Type u_2
β : Type ?u.283804
γ : Type ?u.283807
δ : Type ?u.283810
m : MeasurableSpace α
μ ν : Measure α
ι : Sort u_1
f : ι → α → ℝ≥0∞
⊢ (∫⁻ (a : α), ⨅ (i : ι), f i a ∂μ) ≤ ⨅ (i : ι), ∫⁻ (a : α), f i a ∂μ

tactic: exact (monotone_lintegral μ).map_iInf_le
state_before: α : Type u_2
β : Type ?u.283804
γ : Type ?u.283807
δ : Type ?u.283810
m : MeasurableSpace α
μ ν : Measure α
ι : Sort u_1
f : ι → α → ℝ≥0∞
⊢ (∫⁻ (a : α), iInf (fun i => f i) a ∂μ) ≤ ⨅ (i : ι), ∫⁻ (a : α), f i a ∂μ
Theorem: tendsto_Iio_atTop
File: Mathlib/Topology/Order/Basic.lean

tactic: rw [← comap_coe_Iio_nhdsWithin_Iio, tendsto_comap_iff]
state_before: α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
a b : α
s : Set α
l : Filter β
f✝ : α → β
f : β → ↑(Iio a)
⊢ Tendsto f l atTop ↔ Tendsto (fun x => ↑(f x)) l (𝓝[Iio a] a)

tactic: rfl
state_before: α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
a b : α
s : Set α
l : Filter β
f✝ : α → β
f : β → ↑(Iio a)
⊢ Tendsto (Subtype.val ∘ f) l (𝓝[Iio a] a) ↔ Tendsto (fun x => ↑(f x)) l (𝓝[Iio a] a)
Theorem: Monotone.map_iSup_of_continuousAt
File: Mathlib/Topology/Order/Basic.lean

tactic: rw [iSup, Mf.map_sSup_of_continuousAt Cf fbot, ← range_comp, iSup]
state_before: α : Type u
β : Type v
γ : Type w
inst✝⁶ : CompleteLinearOrder α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : OrderTopology α
inst✝³ : CompleteLinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderClosedTopology β
inst✝ : Nonempty γ
ι : Sort u_1
f : α → β
g : ι → α
Cf : ContinuousAt f (iSup g)
Mf : Monotone f
fbot : f ⊥ = ⊥
⊢ f (⨆ (i : ι), g i) = ⨆ (i : ι), f (g i)

tactic: rfl
state_before: α : Type u
β : Type v
γ : Type w
inst✝⁶ : CompleteLinearOrder α
inst✝⁵ : TopologicalSpace α
inst✝⁴ : OrderTopology α
inst✝³ : CompleteLinearOrder β
inst✝² : TopologicalSpace β
inst✝¹ : OrderClosedTopology β
inst✝ : Nonempty γ
ι : Sort u_1
f : α → β
g : ι → α
Cf : ContinuousAt f (iSup g)
Mf : Monotone f
fbot : f ⊥ = ⊥
⊢ sSup (range (f ∘ g)) = sSup (range fun i => f (g i))
Theorem: Real.log_mul_self_monotoneOn
File: Mathlib/Analysis/SpecialFunctions/Log/Monotone.lean

tactic: simp only [MonotoneOn, mem_setOf_eq]
state_before: x y : ℝ
⊢ MonotoneOn (fun x => log x * x) {x | 1 ≤ x}

tactic: intro x hex y hey hxy
state_before: x y : ℝ
⊢ ∀ ⦃a : ℝ⦄, 1 ≤ a → ∀ ⦃b : ℝ⦄, 1 ≤ b → a ≤ b → log a * a ≤ log b * b

tactic: have x_pos : 0 < x := lt_of_lt_of_le zero_lt_one hex
state_before: x✝ y✝ x : ℝ
hex : 1 ≤ x
y : ℝ
hey : 1 ≤ y
hxy : x ≤ y
⊢ log x * x ≤ log y * y

tactic: have y_pos : 0 < y := lt_of_lt_of_le zero_lt_one hey
state_before: x✝ y✝ x : ℝ
hex : 1 ≤ x
y : ℝ
hey : 1 ≤ y
hxy : x ≤ y
x_pos : 0 < x
⊢ log x * x ≤ log y * y

tactic: refine' mul_le_mul ((log_le_log x_pos y_pos).mpr hxy) hxy (le_of_lt x_pos) _
state_before: x✝ y✝ x : ℝ
hex : 1 ≤ x
y : ℝ
hey : 1 ≤ y
hxy : x ≤ y
x_pos : 0 < x
y_pos : 0 < y
⊢ log x * x ≤ log y * y

tactic: rwa [le_log_iff_exp_le y_pos, Real.exp_zero]
state_before: x✝ y✝ x : ℝ
hex : 1 ≤ x
y : ℝ
hey : 1 ≤ y
hxy : x ≤ y
x_pos : 0 < x
y_pos : 0 < y
⊢ 0 ≤ log y
Theorem: List.get_finRange
File: Mathlib/Data/List/Range.lean

tactic: simp only [finRange, get_range, get_pmap]
state_before: α : Type u
n i : ℕ
h : i < length (finRange n)
⊢ get (finRange n) { val := i, isLt := h } = { val := i, isLt := (_ : i < n) }
Theorem: Nat.eq_iff_prime_padicValNat_eq
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: constructor
state_before: a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ a = b ↔ ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b

tactic: rintro rfl
state_before: case mp
a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ a = b → ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b

tactic: simp
state_before: case mp
a : ℕ
ha hb : a ≠ 0
⊢ ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p a

tactic: intro h
state_before: case mpr
a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ (∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b) → a = b

tactic: refine' eq_of_factorization_eq ha hb fun p => _
state_before: case mpr
a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
h : ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b
⊢ a = b

tactic: by_cases pp : p.Prime
state_before: case mpr
a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
h : ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b
p : ℕ
⊢ ↑(factorization a) p = ↑(factorization b) p

tactic: simp [factorization_def, pp, h p pp]
state_before: case pos
a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
h : ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b
p : ℕ
pp : Prime p
⊢ ↑(factorization a) p = ↑(factorization b) p

tactic: simp [factorization_eq_zero_of_non_prime, pp]
state_before: case neg
a b : ℕ
ha : a ≠ 0
hb : b ≠ 0
h : ∀ (p : ℕ), Prime p → padicValNat p a = padicValNat p b
p : ℕ
pp : ¬Prime p
⊢ ↑(factorization a) p = ↑(factorization b) p
Theorem: Int.two_not_dvd_two_mul_add_one
File: Mathlib/Data/Int/Parity.lean

tactic: simp [add_emod]
state_before: m n✝ n : ℤ
⊢ ¬2 ∣ 2 * n + 1
Theorem: Squarefree.ne_zero
File: Mathlib/Algebra/Squarefree.lean

tactic: rintro rfl
state_before: R : Type u_1
inst✝¹ : MonoidWithZero R
inst✝ : Nontrivial R
m : R
hm : Squarefree m
⊢ m ≠ 0

tactic: exact not_squarefree_zero hm
state_before: R : Type u_1
inst✝¹ : MonoidWithZero R
inst✝ : Nontrivial R
hm : Squarefree 0
⊢ False
Theorem: Associates.quot_out
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: rw [← quot_mk_eq_mk, Quot.out_eq]
state_before: α✝ : Type ?u.3437948
α : Type u_1
inst✝ : CommMonoid α
a : Associates α
⊢ Associates.mk (Quot.out a) = a
Theorem: cauchySeq_range_of_norm_bounded
File: Mathlib/Analysis/Normed/Group/InfiniteSum.lean

tactic: refine' Metric.cauchySeq_iff'.2 fun ε hε => _
state_before: ι : Type ?u.7861
α : Type ?u.7864
E : Type u_1
F : Type ?u.7870
inst✝¹ : SeminormedAddCommGroup E
inst✝ : SeminormedAddCommGroup F
f : ℕ → E
g : ℕ → ℝ
hg : CauchySeq fun n => ∑ i in range n, g i
hf : ∀ (i : ℕ), ‖f i‖ ≤ g i
⊢ CauchySeq fun n => ∑ i in range n, f i

tactic: refine' (Metric.cauchySeq_iff'.1 hg ε hε).imp fun N hg n hn => _
state_before: ι : Type ?u.7861
α : Type ?u.7864
E : Type u_1
F : Type ?u.7870
inst✝¹ : SeminormedAddCommGroup E
inst✝ : SeminormedAddCommGroup F
f : ℕ → E
g : ℕ → ℝ
hg : CauchySeq fun n => ∑ i in range n, g i
hf : ∀ (i : ℕ), ‖f i‖ ≤ g i
ε : ℝ
hε : ε > 0
⊢ ∃ N, ∀ (n : ℕ), n ≥ N → dist (∑ i in range n, f i) (∑ i in range N, f i) < ε

tactic: specialize hg n hn
state_before: ι : Type ?u.7861
α : Type ?u.7864
E : Type u_1
F : Type ?u.7870
inst✝¹ : SeminormedAddCommGroup E
inst✝ : SeminormedAddCommGroup F
f : ℕ → E
g : ℕ → ℝ
hg✝ : CauchySeq fun n => ∑ i in range n, g i
hf : ∀ (i : ℕ), ‖f i‖ ≤ g i
ε : ℝ
hε : ε > 0
N : ℕ
hg : ∀ (n : ℕ), n ≥ N → dist (∑ i in range n, g i) (∑ i in range N, g i) < ε
n : ℕ
hn : n ≥ N
⊢ dist (∑ i in range n, f i) (∑ i in range N, f i) < ε

tactic: rw [dist_eq_norm, ← sum_Ico_eq_sub _ hn] at hg⊢
state_before: ι : Type ?u.7861
α : Type ?u.7864
E : Type u_1
F : Type ?u.7870
inst✝¹ : SeminormedAddCommGroup E
inst✝ : SeminormedAddCommGroup F
f : ℕ → E
g : ℕ → ℝ
hg✝ : CauchySeq fun n => ∑ i in range n, g i
hf : ∀ (i : ℕ), ‖f i‖ ≤ g i
ε : ℝ
hε : ε > 0
N n : ℕ
hn : n ≥ N
hg : dist (∑ i in range n, g i) (∑ i in range N, g i) < ε
⊢ dist (∑ i in range n, f i) (∑ i in range N, f i) < ε

tactic: calc
  ‖∑ k in Ico N n, f k‖ ≤ ∑ k in _, ‖f k‖ := norm_sum_le _ _
  _ ≤ ∑ k in _, g k := (sum_le_sum fun x _ => hf x)
  _ ≤ ‖∑ k in _, g k‖ := (le_abs_self _)
  _ < ε := hg
state_before: ι : Type ?u.7861
α : Type ?u.7864
E : Type u_1
F : Type ?u.7870
inst✝¹ : SeminormedAddCommGroup E
inst✝ : SeminormedAddCommGroup F
f : ℕ → E
g : ℕ → ℝ
hg✝ : CauchySeq fun n => ∑ i in range n, g i
hf : ∀ (i : ℕ), ‖f i‖ ≤ g i
ε : ℝ
hε : ε > 0
N n : ℕ
hn : n ≥ N
hg : ‖∑ k in Ico N n, g k‖ < ε
⊢ ‖∑ k in Ico N n, f k‖ < ε
Theorem: List.zip_append
File: Mathlib/Data/List/Zip.lean

tactic: simp only [eq_nil_of_length_eq_zero h.symm]
state_before: α : Type u
β : Type u_1
γ : Type ?u.20405
δ : Type ?u.20408
ε : Type ?u.20411
r₁ : List α
l₂ r₂ : List β
h : length [] = length l₂
⊢ zip ([] ++ r₁) (l₂ ++ r₂) = zip [] l₂ ++ zip r₁ r₂

tactic: rfl
state_before: α : Type u
β : Type u_1
γ : Type ?u.20405
δ : Type ?u.20408
ε : Type ?u.20411
r₁ : List α
l₂ r₂ : List β
h : length [] = length l₂
⊢ zip ([] ++ r₁) ([] ++ r₂) = zip [] [] ++ zip r₁ r₂

tactic: simp only [eq_nil_of_length_eq_zero h]
state_before: α : Type u
β : Type u_1
γ : Type ?u.20405
δ : Type ?u.20408
ε : Type ?u.20411
l₁ r₁ : List α
r₂ : List β
h : length l₁ = length []
⊢ zip (l₁ ++ r₁) ([] ++ r₂) = zip l₁ [] ++ zip r₁ r₂

tactic: rfl
state_before: α : Type u
β : Type u_1
γ : Type ?u.20405
δ : Type ?u.20408
ε : Type ?u.20411
l₁ r₁ : List α
r₂ : List β
h : length l₁ = length []
⊢ zip ([] ++ r₁) ([] ++ r₂) = zip [] [] ++ zip r₁ r₂

tactic: simp only [cons_append, zip_cons_cons, zip_append (succ.inj h)]
state_before: α : Type u
β : Type u_1
γ : Type ?u.20405
δ : Type ?u.20408
ε : Type ?u.20411
a : α
l₁ r₁ : List α
b : β
l₂ r₂ : List β
h : length (a :: l₁) = length (b :: l₂)
⊢ zip (a :: l₁ ++ r₁) (b :: l₂ ++ r₂) = zip (a :: l₁) (b :: l₂) ++ zip r₁ r₂
Theorem: IsOpenMap.continuousOn_image_of_leftInvOn
File: Mathlib/Topology/ContinuousOn.lean

tactic: refine' continuousOn_iff'.2 fun t ht => ⟨f '' (t ∩ s), _, _⟩
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.329305
δ : Type ?u.329308
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → β
s : Set α
h : IsOpenMap (Set.restrict s f)
finv : β → α
hleft : LeftInvOn finv f s
⊢ ContinuousOn finv (f '' s)

tactic: rw [← image_restrict]
state_before: case refine'_1
α : Type u_1
β : Type u_2
γ : Type ?u.329305
δ : Type ?u.329308
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → β
s : Set α
h : IsOpenMap (Set.restrict s f)
finv : β → α
hleft : LeftInvOn finv f s
t : Set α
ht : IsOpen t
⊢ IsOpen (f '' (t ∩ s))

tactic: exact h _ (ht.preimage continuous_subtype_val)
state_before: case refine'_1
α : Type u_1
β : Type u_2
γ : Type ?u.329305
δ : Type ?u.329308
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → β
s : Set α
h : IsOpenMap (Set.restrict s f)
finv : β → α
hleft : LeftInvOn finv f s
t : Set α
ht : IsOpen t
⊢ IsOpen (Set.restrict s f '' (Subtype.val ⁻¹' t))

tactic: rw [inter_eq_self_of_subset_left (image_subset f (inter_subset_right t s)), hleft.image_inter']
state_before: case refine'_2
α : Type u_1
β : Type u_2
γ : Type ?u.329305
δ : Type ?u.329308
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → β
s : Set α
h : IsOpenMap (Set.restrict s f)
finv : β → α
hleft : LeftInvOn finv f s
t : Set α
ht : IsOpen t
⊢ finv ⁻¹' t ∩ f '' s = f '' (t ∩ s) ∩ f '' s
Theorem: Zsqrtd.lift_injective
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: have h_inj : Function.Injective ((↑) : ℤ → R) := Int.cast_injective
state_before: R : Type
inst✝¹ : CommRing R
inst✝ : CharZero R
d : ℤ
r : { r // r * r = ↑d }
hd : ∀ (n : ℤ), d ≠ n * n
a : ℤ√d
ha : ↑(↑lift r) a = 0
⊢ a = 0

tactic: suffices lift r a.norm = 0 by
  simp only [coe_int_re, add_zero, lift_apply_apply, coe_int_im, Int.cast_zero,
    MulZeroClass.zero_mul] at this
  rwa [← Int.cast_zero, h_inj.eq_iff, norm_eq_zero hd] at this
state_before: R : Type
inst✝¹ : CommRing R
inst✝ : CharZero R
d : ℤ
r : { r // r * r = ↑d }
hd : ∀ (n : ℤ), d ≠ n * n
a : ℤ√d
ha : ↑(↑lift r) a = 0
h_inj : Function.Injective Int.cast
⊢ a = 0

tactic: rw [norm_eq_mul_conj, RingHom.map_mul, ha, MulZeroClass.zero_mul]
state_before: R : Type
inst✝¹ : CommRing R
inst✝ : CharZero R
d : ℤ
r : { r // r * r = ↑d }
hd : ∀ (n : ℤ), d ≠ n * n
a : ℤ√d
ha : ↑(↑lift r) a = 0
h_inj : Function.Injective Int.cast
⊢ ↑(↑lift r) ↑(norm a) = 0

tactic: simp only [coe_int_re, add_zero, lift_apply_apply, coe_int_im, Int.cast_zero,
  MulZeroClass.zero_mul] at this
state_before: R : Type
inst✝¹ : CommRing R
inst✝ : CharZero R
d : ℤ
r : { r // r * r = ↑d }
hd : ∀ (n : ℤ), d ≠ n * n
a : ℤ√d
ha : ↑(↑lift r) a = 0
h_inj : Function.Injective Int.cast
this : ↑(↑lift r) ↑(norm a) = 0
⊢ a = 0

tactic: rwa [← Int.cast_zero, h_inj.eq_iff, norm_eq_zero hd] at this
state_before: R : Type
inst✝¹ : CommRing R
inst✝ : CharZero R
d : ℤ
r : { r // r * r = ↑d }
hd : ∀ (n : ℤ), d ≠ n * n
a : ℤ√d
ha : ↑(↑lift r) a = 0
h_inj : Function.Injective Int.cast
this : ↑(norm a) = 0
⊢ a = 0
Theorem: Finset.sum_centroidWeightsIndicator_eq_one_of_card_eq_add_one
File: Mathlib/LinearAlgebra/AffineSpace/Combination.lean

tactic: rw [sum_centroidWeightsIndicator]
state_before: k : Type u_1
V : Type ?u.518014
P : Type ?u.518017
inst✝⁵ : DivisionRing k
inst✝⁴ : AddCommGroup V
inst✝³ : Module k V
inst✝² : AffineSpace V P
ι : Type u_2
s : Finset ι
ι₂ : Type ?u.518536
s₂ : Finset ι₂
inst✝¹ : CharZero k
inst✝ : Fintype ι
n : ℕ
h : card s = n + 1
⊢ ∑ i : ι, centroidWeightsIndicator k s i = 1

tactic: exact s.sum_centroidWeights_eq_one_of_card_eq_add_one k h
state_before: k : Type u_1
V : Type ?u.518014
P : Type ?u.518017
inst✝⁵ : DivisionRing k
inst✝⁴ : AddCommGroup V
inst✝³ : Module k V
inst✝² : AffineSpace V P
ι : Type u_2
s : Finset ι
ι₂ : Type ?u.518536
s₂ : Finset ι₂
inst✝¹ : CharZero k
inst✝ : Fintype ι
n : ℕ
h : card s = n + 1
⊢ ∑ i in s, centroidWeights k s i = 1
Theorem: MeasureTheory.SignedMeasure.toJordanDecomposition_smul_real_nonneg
File: Mathlib/MeasureTheory/Decomposition/Jordan.lean

tactic: lift r to ℝ≥0 using hr
state_before: α : Type u_1
β : Type ?u.78208
inst✝ : MeasurableSpace α
s : SignedMeasure α
r : ℝ
hr : 0 ≤ r
⊢ toJordanDecomposition (r • s) = r • toJordanDecomposition s

tactic: rw [JordanDecomposition.coe_smul, ← toJordanDecomposition_smul]
state_before: case intro
α : Type u_1
β : Type ?u.78208
inst✝ : MeasurableSpace α
s : SignedMeasure α
r : ℝ≥0
⊢ toJordanDecomposition (↑r • s) = ↑r • toJordanDecomposition s

tactic: rfl
state_before: case intro
α : Type u_1
β : Type ?u.78208
inst✝ : MeasurableSpace α
s : SignedMeasure α
r : ℝ≥0
⊢ toJordanDecomposition (↑r • s) = toJordanDecomposition (r • s)
Theorem: StarConvex.sub
File: Mathlib/Analysis/Convex/Star.lean

tactic: simp_rw [sub_eq_add_neg]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.136181
inst✝⁴ : OrderedRing 𝕜
inst✝³ : AddCommGroup E
inst✝² : AddCommGroup F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x y : E
s t : Set E
hs : StarConvex 𝕜 x s
ht : StarConvex 𝕜 y t
⊢ StarConvex 𝕜 (x - y) (s - t)

tactic: exact hs.add ht.neg
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.136181
inst✝⁴ : OrderedRing 𝕜
inst✝³ : AddCommGroup E
inst✝² : AddCommGroup F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
x y : E
s t : Set E
hs : StarConvex 𝕜 x s
ht : StarConvex 𝕜 y t
⊢ StarConvex 𝕜 (x + -y) (s + -t)
Theorem: FirstOrder.Language.exists_elementarilyEquivalent_card_eq
File: Mathlib/ModelTheory/Satisfiability.lean

tactic: obtain ⟨N, NM | MN, hNκ⟩ := exists_elementaryEmbedding_card_eq L M κ h1 h2
state_before: L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝¹ : Structure L M
inst✝ : Infinite M
κ : Cardinal
h1 : ℵ₀ ≤ κ
h2 : lift (card L) ≤ lift κ
⊢ ∃ N, (M ≅[L] ↑N) ∧ (#↑N) = κ

tactic: exact ⟨N, NM.some.elementarilyEquivalent.symm, hNκ⟩
state_before: case intro.intro.inl
L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝¹ : Structure L M
inst✝ : Infinite M
κ : Cardinal
h1 : ℵ₀ ≤ κ
h2 : lift (card L) ≤ lift κ
N : Bundled (Structure L)
hNκ : (#↑N) = κ
NM : Nonempty (↑N ↪ₑ[L] M)
⊢ ∃ N, (M ≅[L] ↑N) ∧ (#↑N) = κ

tactic: exact ⟨N, MN.some.elementarilyEquivalent, hNκ⟩
state_before: case intro.intro.inr
L : Language
T : Theory L
α : Type w
n : ℕ
M : Type w'
inst✝¹ : Structure L M
inst✝ : Infinite M
κ : Cardinal
h1 : ℵ₀ ≤ κ
h2 : lift (card L) ≤ lift κ
N : Bundled (Structure L)
hNκ : (#↑N) = κ
MN : Nonempty (M ↪ₑ[L] ↑N)
⊢ ∃ N, (M ≅[L] ↑N) ∧ (#↑N) = κ
Theorem: units_smul_eq_neg_iff
File: Mathlib/LinearAlgebra/Ray.lean

tactic: rw [← neg_inj, neg_neg, ← Module.Ray.neg_units_smul, units_smul_eq_self_iff, Units.val_neg,
  neg_pos]
state_before: R : Type u_1
inst✝³ : LinearOrderedCommRing R
M : Type u_2
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : NoZeroSMulDivisors R M
u : Rˣ
v : Module.Ray R M
⊢ u • v = -v ↔ ↑u < 0