tasksource/leandojo huggingface dataset:
Theorem: Matrix.range_mulVecLin
File: Mathlib/LinearAlgebra/Matrix/ToLin.lean

tactic: letI := Classical.decEq n
state_before: R : Type u_3
inst✝¹ : CommSemiring R
k : Type ?u.315479
l : Type ?u.315482
m : Type u_1
n : Type u_2
inst✝ : Fintype n
M : Matrix m n R
⊢ LinearMap.range (mulVecLin M) = span R (Set.range Mᵀ)

tactic: simp_rw [range_eq_map, ← iSup_range_stdBasis, Submodule.map_iSup, range_eq_map, ←
  Ideal.span_singleton_one, Ideal.span, Submodule.map_span, image_image, image_singleton,
  Matrix.mulVecLin_apply, M.mulVec_stdBasis_apply, iSup_span, range_eq_iUnion]
state_before: R : Type u_3
inst✝¹ : CommSemiring R
k : Type ?u.315479
l : Type ?u.315482
m : Type u_1
n : Type u_2
inst✝ : Fintype n
M : Matrix m n R
this : DecidableEq n := Classical.decEq n
⊢ LinearMap.range (mulVecLin M) = span R (Set.range Mᵀ)
Theorem: ENNReal.tsum_iUnion_le
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: rw [← tsum_fintype]
state_before: α : Type u_2
β : Type ?u.285208
γ : Type ?u.285211
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f✝ g : α → ℝ≥0∞
ι : Type u_1
inst✝ : Fintype ι
f : α → ℝ≥0∞
t : ι → Set α
⊢ (∑' (x : ↑(⋃ (i : ι), t i)), f ↑x) ≤ ∑ i : ι, ∑' (x : ↑(t i)), f ↑x

tactic: exact tsum_iUnion_le_tsum f t
state_before: α : Type u_2
β : Type ?u.285208
γ : Type ?u.285211
a b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f✝ g : α → ℝ≥0∞
ι : Type u_1
inst✝ : Fintype ι
f : α → ℝ≥0∞
t : ι → Set α
⊢ (∑' (x : ↑(⋃ (i : ι), t i)), f ↑x) ≤ ∑' (b : ι) (x : ↑(t b)), f ↑x
Theorem: Finsupp.neLocus_eq_support_sub
File: Mathlib/Data/Finsupp/NeLocus.lean

tactic: rw [← neLocus_add_right _ _ (-g), add_right_neg, neLocus_zero_right, sub_eq_add_neg]
state_before: α : Type u_1
M : Type ?u.25735
N : Type u_2
P : Type ?u.25741
inst✝² : DecidableEq α
inst✝¹ : DecidableEq N
inst✝ : AddGroup N
f f₁ f₂ g g₁ g₂ : α →₀ N
⊢ neLocus f g = (f - g).support
Theorem: ultrafilter_converges_iff
File: Mathlib/Topology/StoneCech.lean

tactic: rw [eq_comm, ← Ultrafilter.coe_le_coe]
state_before: α : Type u
u : Ultrafilter (Ultrafilter α)
x : Ultrafilter α
⊢ ↑u ≤ 𝓝 x ↔ x = joinM u

tactic: change ↑u ≤ 𝓝 x ↔ ∀ s ∈ x, { v : Ultrafilter α | s ∈ v } ∈ u
state_before: α : Type u
u : Ultrafilter (Ultrafilter α)
x : Ultrafilter α
⊢ ↑u ≤ 𝓝 x ↔ ↑(joinM u) ≤ ↑x

tactic: simp only [TopologicalSpace.nhds_generateFrom, le_iInf_iff, ultrafilterBasis, le_principal_iff,
  mem_setOf_eq]
state_before: α : Type u
u : Ultrafilter (Ultrafilter α)
x : Ultrafilter α
⊢ ↑u ≤ 𝓝 x ↔ ∀ (s : Set α), s ∈ x → {v | s ∈ v} ∈ u

tactic: constructor
state_before: α : Type u
u : Ultrafilter (Ultrafilter α)
x : Ultrafilter α
⊢ (∀ (i : Set (Ultrafilter α)), (x ∈ i ∧ i ∈ range fun s => {u | s ∈ u}) → i ∈ ↑u) ↔
    ∀ (s : Set α), s ∈ x → {v | s ∈ v} ∈ u

tactic: intro h a ha
state_before: case mp
α : Type u
u : Ultrafilter (Ultrafilter α)
x : Ultrafilter α
⊢ (∀ (i : Set (Ultrafilter α)), (x ∈ i ∧ i ∈ range fun s => {u | s ∈ u}) → i ∈ ↑u) →
    ∀ (s : Set α), s ∈ x → {v | s ∈ v} ∈ u

tactic: exact h _ ⟨ha, a, rfl⟩
state_before: case mp
α : Type u
u : Ultrafilter (Ultrafilter α)
x : Ultrafilter α
h : ∀ (i : Set (Ultrafilter α)), (x ∈ i ∧ i ∈ range fun s => {u | s ∈ u}) → i ∈ ↑u
a : Set α
ha : a ∈ x
⊢ {v | a ∈ v} ∈ u

tactic: rintro h a ⟨xi, a, rfl⟩
state_before: case mpr
α : Type u
u : Ultrafilter (Ultrafilter α)
x : Ultrafilter α
⊢ (∀ (s : Set α), s ∈ x → {v | s ∈ v} ∈ u) →
    ∀ (i : Set (Ultrafilter α)), (x ∈ i ∧ i ∈ range fun s => {u | s ∈ u}) → i ∈ ↑u

tactic: exact h _ xi
state_before: case mpr.intro.intro
α : Type u
u : Ultrafilter (Ultrafilter α)
x : Ultrafilter α
h : ∀ (s : Set α), s ∈ x → {v | s ∈ v} ∈ u
a : Set α
xi : x ∈ (fun s => {u | s ∈ u}) a
⊢ (fun s => {u | s ∈ u}) a ∈ ↑u
Theorem: SimpleGraph.Subgraph.coe_deleteEdges_le
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: intro v w
state_before: ι : Sort ?u.255030
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s : Set (Sym2 V)
⊢ Subgraph.coe (deleteEdges G' s) ≤ Subgraph.coe G'

tactic: simp (config := { contextual := true })
state_before: ι : Sort ?u.255030
V : Type u
W : Type v
G : SimpleGraph V
G' : Subgraph G
s : Set (Sym2 V)
v w : ↑(deleteEdges G' s).verts
⊢ SimpleGraph.Adj (Subgraph.coe (deleteEdges G' s)) v w → SimpleGraph.Adj (Subgraph.coe G') v w
Theorem: alternatingGroup.isThreeCycle_isConj
File: Mathlib/GroupTheory/SpecificGroups/Alternating.lean

tactic: rwa [hσ.card_support]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
h5 : 5 ≤ card α
σ τ : { x // x ∈ alternatingGroup α }
hσ : IsThreeCycle ↑σ
hτ : IsThreeCycle ↑τ
⊢ Finset.card (support ↑σ) + 2 ≤ card α
Theorem: Polynomial.le_trailingDegree_mul
File: Mathlib/Data/Polynomial/Degree/TrailingDegree.lean

tactic: refine' Finset.le_min fun n hn => _
state_before: R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
⊢ trailingDegree p + trailingDegree q ≤ trailingDegree (p * q)

tactic: rw [mem_support_iff, coeff_mul] at hn
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
hn : n ∈ support (p * q)
⊢ trailingDegree p + trailingDegree q ≤ ↑n

tactic: obtain ⟨⟨i, j⟩, hij, hpq⟩ := exists_ne_zero_of_sum_ne_zero hn
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
hn : ∑ x in Nat.antidiagonal n, coeff p x.fst * coeff q x.snd ≠ 0
⊢ trailingDegree p + trailingDegree q ≤ ↑n

tactic: refine'
  (add_le_add (min_le (mem_support_iff.mpr (left_ne_zero_of_mul hpq)))
        (min_le (mem_support_iff.mpr (right_ne_zero_of_mul hpq)))).trans
    (le_of_eq _)
state_before: case intro.mk.intro
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
hn : ∑ x in Nat.antidiagonal n, coeff p x.fst * coeff q x.snd ≠ 0
i j : ℕ
hij : (i, j) ∈ Nat.antidiagonal n
hpq : coeff p (i, j).fst * coeff q (i, j).snd ≠ 0
⊢ trailingDegree p + trailingDegree q ≤ ↑n

tactic: rwa [← WithTop.coe_add, WithTop.coe_eq_coe, ← Nat.mem_antidiagonal]
state_before: case intro.mk.intro
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
hn : ∑ x in Nat.antidiagonal n, coeff p x.fst * coeff q x.snd ≠ 0
i j : ℕ
hij : (i, j) ∈ Nat.antidiagonal n
hpq : coeff p (i, j).fst * coeff q (i, j).snd ≠ 0
⊢ ↑(i, j).fst + ↑(i, j).snd = ↑n
Theorem: Complex.log_ofReal_mul
File: Mathlib/Analysis/SpecialFunctions/Complex/Log.lean

tactic: replace hx := Complex.abs.ne_zero_iff.mpr hx
state_before: r : ℝ
hr : 0 < r
x : ℂ
hx : x ≠ 0
⊢ log (↑r * x) = ↑(Real.log r) + log x

tactic: simp_rw [log, map_mul, abs_ofReal, arg_real_mul _ hr, abs_of_pos hr, Real.log_mul hr.ne' hx,
  ofReal_add, add_assoc]
state_before: r : ℝ
hr : 0 < r
x : ℂ
hx : ↑abs x ≠ 0
⊢ log (↑r * x) = ↑(Real.log r) + log x
Theorem: le_mul_of_le_one_left
File: Mathlib/Algebra/Order/Ring/Defs.lean

tactic: simpa only [one_mul] using mul_le_mul_of_nonpos_right h hb
state_before: α : Type u
β : Type ?u.40562
inst✝ : OrderedRing α
a b c d : α
hb : b ≤ 0
h : a ≤ 1
⊢ b ≤ a * b
Theorem: SimpleGraph.incidenceFinset_eq_filter
File: Mathlib/Combinatorics/SimpleGraph/Basic.lean

tactic: ext e
state_before: ι : Sort ?u.277119
𝕜 : Type ?u.277122
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e : Sym2 V
inst✝² : Fintype ↑(neighborSet G v)
inst✝¹ : DecidableEq V
inst✝ : Fintype ↑(edgeSet G)
⊢ incidenceFinset G v = filter (Membership.mem v) (edgeFinset G)

tactic: refine' Sym2.ind (fun x y => _) e
state_before: case a
ι : Sort ?u.277119
𝕜 : Type ?u.277122
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e✝ : Sym2 V
inst✝² : Fintype ↑(neighborSet G v)
inst✝¹ : DecidableEq V
inst✝ : Fintype ↑(edgeSet G)
e : Sym2 V
⊢ e ∈ incidenceFinset G v ↔ e ∈ filter (Membership.mem v) (edgeFinset G)

tactic: simp [mk'_mem_incidenceSet_iff]
state_before: case a
ι : Sort ?u.277119
𝕜 : Type ?u.277122
V : Type u
W : Type v
X : Type w
G : SimpleGraph V
G' : SimpleGraph W
a b c u v w : V
e✝ : Sym2 V
inst✝² : Fintype ↑(neighborSet G v)
inst✝¹ : DecidableEq V
inst✝ : Fintype ↑(edgeSet G)
e : Sym2 V
x y : V
⊢ Quotient.mk (Sym2.Rel.setoid V) (x, y) ∈ incidenceFinset G v ↔
    Quotient.mk (Sym2.Rel.setoid V) (x, y) ∈ filter (Membership.mem v) (edgeFinset G)
Theorem: StarModule.selfAdjointPart_add_skewAdjointPart
File: Mathlib/Algebra/Star/Module.lean

tactic: simp only [smul_sub, selfAdjointPart_apply_coe, smul_add, skewAdjointPart_apply_coe,
  add_add_sub_cancel, invOf_two_smul_add_invOf_two_smul]
state_before: R : Type u_2
A : Type u_1
inst✝⁷ : Semiring R
inst✝⁶ : StarSemigroup R
inst✝⁵ : TrivialStar R
inst✝⁴ : AddCommGroup A
inst✝³ : Module R A
inst✝² : StarAddMonoid A
inst✝¹ : StarModule R A
inst✝ : Invertible 2
x : A
⊢ ↑(↑(selfAdjointPart R) x) + ↑(↑(skewAdjointPart R) x) = x
Theorem: upperClosure_singleton
File: Mathlib/Order/UpperLower/Basic.lean

tactic: ext
state_before: α : Type u_1
β : Type ?u.157791
γ : Type ?u.157794
ι : Sort ?u.157797
κ : ι → Sort ?u.157802
inst✝¹ : Preorder α
inst✝ : Preorder β
s t : Set α
x a : α
⊢ upperClosure {a} = UpperSet.Ici a

tactic: simp
state_before: case a.h
α : Type u_1
β : Type ?u.157791
γ : Type ?u.157794
ι : Sort ?u.157797
κ : ι → Sort ?u.157802
inst✝¹ : Preorder α
inst✝ : Preorder β
s t : Set α
x a x✝ : α
⊢ x✝ ∈ ↑(upperClosure {a}) ↔ x✝ ∈ ↑(UpperSet.Ici a)
Theorem: SimpleGraph.Walk.IsTrail.rotate
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: rw [isTrail_def, (c.rotate_edges h).perm.nodup_iff]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v : V
c : Walk G v v
hc : IsTrail c
h : u ∈ support c
⊢ IsTrail (rotate c h)

tactic: exact hc.edges_nodup
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
inst✝ : DecidableEq V
u v : V
c : Walk G v v
hc : IsTrail c
h : u ∈ support c
⊢ List.Nodup (edges c)
Theorem: MeasureTheory.mem_fundamentalFrontier
File: Mathlib/MeasureTheory/Group/FundamentalDomain.lean

tactic: simp [fundamentalFrontier]
state_before: G : Type u_2
H : Type ?u.463396
α : Type u_1
β : Type ?u.463402
E : Type ?u.463405
inst✝¹ : Group G
inst✝ : MulAction G α
s : Set α
x : α
⊢ x ∈ fundamentalFrontier G s ↔ x ∈ s ∧ ∃ g, g ≠ 1 ∧ x ∈ g • s
Theorem: LinearMap.map_le_map_iff
File: Mathlib/LinearAlgebra/Span.lean

tactic: rw [map_le_iff_le_comap, Submodule.comap_map_eq]
state_before: R : Type u_1
R₂ : Type u_4
K : Type ?u.307925
M : Type u_2
M₂ : Type u_3
V : Type ?u.307934
S : Type ?u.307937
inst✝⁶ : Semiring R
inst✝⁵ : Semiring R₂
inst✝⁴ : AddCommGroup M
inst✝³ : AddCommGroup M₂
inst✝² : Module R M
inst✝¹ : Module R₂ M₂
τ₁₂ : R →+* R₂
inst✝ : RingHomSurjective τ₁₂
F : Type u_5
sc : SemilinearMapClass F τ₁₂ M M₂
f : F
p p' : Submodule R M
⊢ map f p ≤ map f p' ↔ p ≤ p' ⊔ ker f
Theorem: Std.RBNode.Path.rootOrdered_iff
File: Std/Data/RBMap/Lemmas.lean

tactic: induction p with
  (simp [All_def] at hp; simp [*, and_assoc, and_left_comm, and_comm, or_imp, forall_and])
| left _ _ x _ ih => exact fun vx _ _ _ ha => vx.trans (hp.2.1 _ ha)
| right _ _ x _ ih => exact fun xv _ _ _ ha => (hp.2.1 _ ha).trans xv
state_before: α : Type u_1
cmp : α → α → Ordering
v : α
p : Path α
hp : Ordered cmp p
⊢ RootOrdered cmp p v ↔ (∀ (a : α), a ∈ listL p → cmpLT cmp a v) ∧ ∀ (a : α), a ∈ listR p → cmpLT cmp v a

tactic: simp [All_def] at hp
state_before: case root
α : Type u_1
cmp : α → α → Ordering
v : α
hp : Ordered cmp root
⊢ RootOrdered cmp root v ↔ (∀ (a : α), a ∈ listL root → cmpLT cmp a v) ∧ ∀ (a : α), a ∈ listR root → cmpLT cmp v a

tactic: simp [*, and_assoc, and_left_comm, and_comm, or_imp, forall_and]
state_before: case root
α : Type u_1
cmp : α → α → Ordering
v : α
hp : True
⊢ RootOrdered cmp root v ↔ (∀ (a : α), a ∈ listL root → cmpLT cmp a v) ∧ ∀ (a : α), a ∈ listR root → cmpLT cmp v a

tactic: exact fun vx _ _ _ ha => vx.trans (hp.2.1 _ ha)
state_before: case left
α : Type u_1
cmp : α → α → Ordering
v : α
c✝ : RBColor
parent✝ : Path α
x : α
r✝ : RBNode α
ih :
  Ordered cmp parent✝ →
    (RootOrdered cmp parent✝ v ↔
      (∀ (a : α), a ∈ listL parent✝ → cmpLT cmp a v) ∧ ∀ (a : α), a ∈ listR parent✝ → cmpLT cmp v a)
hp :
  Ordered cmp parent✝ ∧
    (∀ (x_1 : α), x_1 ∈ r✝ → cmpLT cmp x x_1) ∧
      RootOrdered cmp parent✝ x ∧ (∀ (x : α), x ∈ r✝ → RootOrdered cmp parent✝ x) ∧ RBNode.Ordered cmp r✝
⊢ cmpLT cmp v x →
    (∀ (a : α), a ∈ listL parent✝ → cmpLT cmp a v) →
      (∀ (a : α), a ∈ listR parent✝ → cmpLT cmp v a) → ∀ (x : α), x ∈ r✝ → cmpLT cmp v x

tactic: exact fun xv _ _ _ ha => (hp.2.1 _ ha).trans xv
state_before: case right
α : Type u_1
cmp : α → α → Ordering
v : α
c✝ : RBColor
l✝ : RBNode α
x : α
parent✝ : Path α
ih :
  Ordered cmp parent✝ →
    (RootOrdered cmp parent✝ v ↔
      (∀ (a : α), a ∈ listL parent✝ → cmpLT cmp a v) ∧ ∀ (a : α), a ∈ listR parent✝ → cmpLT cmp v a)
hp :
  Ordered cmp parent✝ ∧
    (∀ (x_1 : α), x_1 ∈ l✝ → cmpLT cmp x_1 x) ∧
      RootOrdered cmp parent✝ x ∧ (∀ (x : α), x ∈ l✝ → RootOrdered cmp parent✝ x) ∧ RBNode.Ordered cmp l✝
⊢ cmpLT cmp x v →
    (∀ (a : α), a ∈ listL parent✝ → cmpLT cmp a v) →
      (∀ (a : α), a ∈ listR parent✝ → cmpLT cmp v a) → ∀ (x : α), x ∈ l✝ → cmpLT cmp x v
Theorem: Pi.faithfulSMul_at
File: Mathlib/GroupTheory/GroupAction/Pi.lean

tactic: classical
  have :=
    congr_fun (h <| Function.update (fun j => Classical.choice (‹∀ i, Nonempty (f i)› j)) i a)
      i
  simpa using this
state_before: I : Type u
f : I → Type v
x y : (i : I) → f i
i✝ : I
α : Type u_1
inst✝² : (i : I) → SMul α (f i)
inst✝¹ : ∀ (i : I), Nonempty (f i)
i : I
inst✝ : FaithfulSMul α (f i)
m₁✝ m₂✝ : α
h : ∀ (a : (i : I) → f i), m₁✝ • a = m₂✝ • a
a : f i
⊢ m₁✝ • a = m₂✝ • a

tactic: have :=
  congr_fun (h <| Function.update (fun j => Classical.choice (‹∀ i, Nonempty (f i)› j)) i a)
    i
state_before: I : Type u
f : I → Type v
x y : (i : I) → f i
i✝ : I
α : Type u_1
inst✝² : (i : I) → SMul α (f i)
inst✝¹ : ∀ (i : I), Nonempty (f i)
i : I
inst✝ : FaithfulSMul α (f i)
m₁✝ m₂✝ : α
h : ∀ (a : (i : I) → f i), m₁✝ • a = m₂✝ • a
a : f i
⊢ m₁✝ • a = m₂✝ • a

tactic: simpa using this
state_before: I : Type u
f : I → Type v
x y : (i : I) → f i
i✝ : I
α : Type u_1
inst✝² : (i : I) → SMul α (f i)
inst✝¹ : ∀ (i : I), Nonempty (f i)
i : I
inst✝ : FaithfulSMul α (f i)
m₁✝ m₂✝ : α
h : ∀ (a : (i : I) → f i), m₁✝ • a = m₂✝ • a
a : f i
this :
  (m₁✝ • Function.update (fun j => Classical.choice (_ : Nonempty (f j))) i a) i =
    (m₂✝ • Function.update (fun j => Classical.choice (_ : Nonempty (f j))) i a) i
⊢ m₁✝ • a = m₂✝ • a
Theorem: DirectSum.of_zero_pow
File: Mathlib/Algebra/DirectSum/Ring.lean

tactic: rw [pow_zero, pow_zero, DirectSum.of_zero_one]
state_before: ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a : A 0
⊢ ↑(of A 0) (a ^ 0) = ↑(of A 0) a ^ 0

tactic: rw [pow_succ, pow_succ, of_zero_mul, of_zero_pow _ n]
state_before: ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
a : A 0
n : ℕ
⊢ ↑(of A 0) (a ^ (n + 1)) = ↑(of A 0) a ^ (n + 1)
Theorem: Multiset.prod_X_add_C_coeff
File: Mathlib/RingTheory/Polynomial/Vieta.lean

tactic: convert Polynomial.ext_iff.mp (prod_X_add_C_eq_sum_esymm s) k using 1
state_before: R : Type u_1
inst✝ : CommSemiring R
s : Multiset R
k : ℕ
h : k ≤ ↑card s
⊢ coeff (prod (map (fun r => X + ↑C r) s)) k = esymm s (↑card s - k)

tactic: simp_rw [finset_sum_coeff, coeff_C_mul_X_pow]
state_before: case h.e'_3
R : Type u_1
inst✝ : CommSemiring R
s : Multiset R
k : ℕ
h : k ≤ ↑card s
⊢ esymm s (↑card s - k) = coeff (∑ j in Finset.range (↑card s + 1), ↑C (esymm s j) * X ^ (↑card s - j)) k

tactic: rw [Finset.sum_eq_single_of_mem (Multiset.card s - k) _]
state_before: case h.e'_3
R : Type u_1
inst✝ : CommSemiring R
s : Multiset R
k : ℕ
h : k ≤ ↑card s
⊢ esymm s (↑card s - k) = ∑ x in Finset.range (↑card s + 1), if k = ↑card s - x then esymm s x else 0

tactic: rw [if_pos (Nat.sub_sub_self h).symm]
state_before: case h.e'_3
R : Type u_1
inst✝ : CommSemiring R
s : Multiset R
k : ℕ
h : k ≤ ↑card s
⊢ esymm s (↑card s - k) = if k = ↑card s - (↑card s - k) then esymm s (↑card s - k) else 0

tactic: intro j hj1 hj2
state_before: case h.e'_3
R : Type u_1
inst✝ : CommSemiring R
s : Multiset R
k : ℕ
h : k ≤ ↑card s
⊢ ∀ (b : (fun x => ℕ) s),
    b ∈ Finset.range (↑card s + 1) → b ≠ ↑card s - k → (if k = ↑card s - b then esymm s b else 0) = 0

tactic: suffices k ≠ card s - j by rw [if_neg this]
state_before: case h.e'_3
R : Type u_1
inst✝ : CommSemiring R
s : Multiset R
k : ℕ
h : k ≤ ↑card s
j : ℕ
hj1 : j ∈ Finset.range (↑card s + 1)
hj2 : j ≠ ↑card s - k
⊢ (if k = ↑card s - j then esymm s j else 0) = 0

tactic: rw [if_neg this]
state_before: R : Type u_1
inst✝ : CommSemiring R
s : Multiset R
k : ℕ
h : k ≤ ↑card s
j : ℕ
hj1 : j ∈ Finset.range (↑card s + 1)
hj2 : j ≠ ↑card s - k
this : k ≠ ↑card s - j
⊢ (if k = ↑card s - j then esymm s j else 0) = 0

tactic: intro hn
state_before: case h.e'_3
R : Type u_1
inst✝ : CommSemiring R
s : Multiset R
k : ℕ
h : k ≤ ↑card s
j : ℕ
hj1 : j ∈ Finset.range (↑card s + 1)
hj2 : j ≠ ↑card s - k
⊢ k ≠ ↑card s - j

tactic: rw [hn, Nat.sub_sub_self (Nat.lt_succ_iff.mp (Finset.mem_range.mp hj1))] at hj2
state_before: case h.e'_3
R : Type u_1
inst✝ : CommSemiring R
s : Multiset R
k : ℕ
h : k ≤ ↑card s
j : ℕ
hj1 : j ∈ Finset.range (↑card s + 1)
hj2 : j ≠ ↑card s - k
hn : k = ↑card s - j
⊢ False

tactic: exact Ne.irrefl hj2
state_before: case h.e'_3
R : Type u_1
inst✝ : CommSemiring R
s : Multiset R
k : ℕ
h : k ≤ ↑card s
j : ℕ
hj1 : j ∈ Finset.range (↑card s + 1)
hj2 : j ≠ j
hn : k = ↑card s - j
⊢ False

tactic: rw [Finset.mem_range]
state_before: R : Type u_1
inst✝ : CommSemiring R
s : Multiset R
k : ℕ
h : k ≤ ↑card s
⊢ ↑card s - k ∈ Finset.range (↑card s + 1)

tactic: exact Nat.sub_lt_succ (Multiset.card s) k
state_before: R : Type u_1
inst✝ : CommSemiring R
s : Multiset R
k : ℕ
h : k ≤ ↑card s
⊢ ↑card s - k < ↑card s + 1
Theorem: List.nthLe_cons_length
File: Mathlib/Data/List/Basic.lean

tactic: simp [h]
state_before: ι : Type ?u.89384
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
x : α
xs : List α
n : ℕ
h : n = length xs
⊢ n < length (x :: xs)
Theorem: Polynomial.coe_one
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: have := coe_monomial 0 (1 : R)
state_before: σ : Type ?u.4306859
R : Type u_1
inst✝ : CommSemiring R
φ ψ : R[X]
⊢ ↑1 = 1

tactic: rwa [PowerSeries.monomial_zero_eq_C_apply] at this
state_before: σ : Type ?u.4306859
R : Type u_1
inst✝ : CommSemiring R
φ ψ : R[X]
this : ↑(↑(monomial 0) 1) = ↑(PowerSeries.monomial R 0) 1
⊢ ↑1 = 1
Theorem: TopCat.Presheaf.isSheaf_iff_isSheafPairwiseIntersections
File: Mathlib/Topology/Sheaves/SheafCondition/PairwiseIntersections.lean

tactic: rw [isSheaf_iff_isSheafOpensLeCover,
  isSheafOpensLeCover_iff_isSheafPairwiseIntersections]
state_before: C : Type u
inst✝ : Category C
X : TopCat
F : Presheaf C X
⊢ IsSheaf F ↔ IsSheafPairwiseIntersections F
Theorem: PrimeMultiset.factorMultiset_prod
File: Mathlib/Data/PNat/Factors.lean

tactic: apply PrimeMultiset.coeNat_injective
state_before: v : PrimeMultiset
⊢ PNat.factorMultiset (prod v) = v

tactic: suffices toNatMultiset (PNat.factorMultiset (prod v)) = toNatMultiset v by exact this
state_before: case a
v : PrimeMultiset
⊢ Coe.coe (PNat.factorMultiset (prod v)) = Coe.coe v

tactic: rw [v.prod.coeNat_factorMultiset, PrimeMultiset.coe_prod]
state_before: case a
v : PrimeMultiset
⊢ toNatMultiset (PNat.factorMultiset (prod v)) = toNatMultiset v

tactic: rcases v with ⟨l⟩
state_before: case a
v : PrimeMultiset
⊢ ↑(Nat.factors (Multiset.prod (toNatMultiset v))) = toNatMultiset v

tactic: dsimp [PrimeMultiset.toNatMultiset]
state_before: case a.mk
v : PrimeMultiset
l : List Nat.Primes
⊢ ↑(Nat.factors (Multiset.prod (toNatMultiset (Quot.mk Setoid.r l)))) = toNatMultiset (Quot.mk Setoid.r l)

tactic: rw [Multiset.coe_prod]
state_before: case a.mk
v : PrimeMultiset
l : List Nat.Primes
⊢ ↑(Nat.factors (Multiset.prod ↑(List.map Coe.coe l))) = ↑(List.map Coe.coe l)

tactic: let l' := l.map (Coe.coe : Nat.Primes → ℕ)
state_before: case a.mk
v : PrimeMultiset
l : List Nat.Primes
⊢ ↑(Nat.factors (List.prod (List.map Coe.coe l))) = ↑(List.map Coe.coe l)

tactic: have : ∀ p : ℕ, p ∈ l' → p.Prime := fun p hp => by
  rcases List.mem_map.mp hp with ⟨⟨_, hp'⟩, ⟨_, h_eq⟩⟩
  exact h_eq ▸ hp'
state_before: case a.mk
v : PrimeMultiset
l : List Nat.Primes
l' : List ℕ := List.map Coe.coe l
⊢ ↑(Nat.factors (List.prod (List.map Coe.coe l))) = ↑(List.map Coe.coe l)

tactic: exact Multiset.coe_eq_coe.mpr (@Nat.factors_unique _ l' rfl this).symm
state_before: case a.mk
v : PrimeMultiset
l : List Nat.Primes
l' : List ℕ := List.map Coe.coe l
this : ∀ (p : ℕ), p ∈ l' → Nat.Prime p
⊢ ↑(Nat.factors (List.prod (List.map Coe.coe l))) = ↑(List.map Coe.coe l)

tactic: exact this
state_before: v : PrimeMultiset
this : toNatMultiset (PNat.factorMultiset (prod v)) = toNatMultiset v
⊢ Coe.coe (PNat.factorMultiset (prod v)) = Coe.coe v

tactic: rcases List.mem_map.mp hp with ⟨⟨_, hp'⟩, ⟨_, h_eq⟩⟩
state_before: v : PrimeMultiset
l : List Nat.Primes
l' : List ℕ := List.map Coe.coe l
p : ℕ
hp : p ∈ l'
⊢ Nat.Prime p

tactic: exact h_eq ▸ hp'
state_before: case intro.mk.intro
v : PrimeMultiset
l : List Nat.Primes
l' : List ℕ := List.map Coe.coe l
p : ℕ
hp : p ∈ l'
val✝ : ℕ
hp' : Nat.Prime val✝
left✝ : { val := val✝, property := hp' } ∈ l
h_eq : Coe.coe { val := val✝, property := hp' } = p
⊢ Nat.Prime p
Theorem: NonarchAddGroupSeminorm.add_bddBelow_range_add
File: Mathlib/Analysis/Normed/Group/Seminorm.lean

tactic: rintro _ ⟨x, rfl⟩
state_before: ι : Type ?u.158932
R : Type ?u.158935
R' : Type ?u.158938
E : Type u_1
F : Type ?u.158944
G : Type ?u.158947
inst✝¹ : AddCommGroup E
inst✝ : AddCommGroup F
p✝ q✝ : NonarchAddGroupSeminorm E
x✝ y : E
p q : NonarchAddGroupSeminorm E
x : E
⊢ 0 ∈ lowerBounds (range fun y => ↑p y + ↑q (x - y))

tactic: dsimp
state_before: case intro
ι : Type ?u.158932
R : Type ?u.158935
R' : Type ?u.158938
E : Type u_1
F : Type ?u.158944
G : Type ?u.158947
inst✝¹ : AddCommGroup E
inst✝ : AddCommGroup F
p✝ q✝ : NonarchAddGroupSeminorm E
x✝¹ y : E
p q : NonarchAddGroupSeminorm E
x✝ x : E
⊢ 0 ≤ (fun y => ↑p y + ↑q (x✝ - y)) x

tactic: positivity
state_before: case intro
ι : Type ?u.158932
R : Type ?u.158935
R' : Type ?u.158938
E : Type u_1
F : Type ?u.158944
G : Type ?u.158947
inst✝¹ : AddCommGroup E
inst✝ : AddCommGroup F
p✝ q✝ : NonarchAddGroupSeminorm E
x✝¹ y : E
p q : NonarchAddGroupSeminorm E
x✝ x : E
⊢ 0 ≤ ↑p x + ↑q (x✝ - x)
Theorem: Ideal.IsHomogeneous.top
File: Mathlib/RingTheory/GradedAlgebra/HomogeneousIdeal.lean

tactic: simp only [Submodule.mem_top]
state_before: ι : Type u_1
σ : Type u_2
R : Type ?u.116223
A : Type u_3
inst✝⁵ : Semiring A
inst✝⁴ : DecidableEq ι
inst✝³ : AddMonoid ι
inst✝² : SetLike σ A
inst✝¹ : AddSubmonoidClass σ A
𝒜 : ι → σ
inst✝ : GradedRing 𝒜
i : ι
r : A
x✝ : r ∈ ⊤
⊢ ↑(↑(↑(decompose 𝒜) r) i) ∈ ⊤
Theorem: ProbabilityTheory.kernel.lintegral_restrict
File: Mathlib/Probability/Kernel/Basic.lean

tactic: rw [restrict_apply]
state_before: α : Type u_1
β : Type u_2
ι : Type ?u.1444889
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ✝ : { x // x ∈ kernel α β }
s t : Set β
κ : { x // x ∈ kernel α β }
hs : MeasurableSet s
a : α
f : β → ℝ≥0∞
⊢ (∫⁻ (b : β), f b ∂↑(kernel.restrict κ hs) a) = ∫⁻ (b : β) in s, f b ∂↑κ a
Theorem: Polynomial.mirror_leadingCoeff
File: Mathlib/Data/Polynomial/Mirror.lean

tactic: rw [← p.mirror_mirror, mirror_trailingCoeff, p.mirror_mirror]
state_before: R : Type u_1
inst✝ : Semiring R
p q : R[X]
⊢ leadingCoeff (mirror p) = trailingCoeff p
Theorem: List.toFinset_cons
File: Mathlib/Data/Finset/Basic.lean

tactic: by_cases h : a ∈ l <;> simp [Finset.insert_val', Multiset.dedup_cons, h]
state_before: α : Type u_1
β : Type ?u.457585
γ : Type ?u.457588
inst✝ : DecidableEq α
l l' : List α
a : α
⊢ (toFinset (a :: l)).val = (insert a (toFinset l)).val
Theorem: Set.diff_singleton_sSubset
File: Mathlib/Data/Set/Basic.lean

tactic: simp
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a✝ b : α
s✝ s₁ s₂ t t₁ t₂ u s : Set α
a : α
⊢ ¬Disjoint s {a} ↔ a ∈ s
Theorem: MeasureTheory.JordanDecomposition.coe_smul
File: Mathlib/MeasureTheory/Decomposition/Jordan.lean

tactic: rw [real_smul_def, if_pos (NNReal.coe_nonneg r), Real.toNNReal_coe]
state_before: α : Type u_1
β : Type ?u.10293
inst✝ : MeasurableSpace α
j : JordanDecomposition α
r : ℝ≥0
⊢ ↑r • j = r • j