tasksource/leandojo huggingface dataset:
Theorem: MeasureTheory.measure_inter_add_diff₀
File: Mathlib/MeasureTheory/Measure/NullMeasurable.lean

tactic: refine' le_antisymm _ _
state_before: ι : Type ?u.14279
α : Type u_1
β : Type ?u.14285
γ : Type ?u.14288
m0 : MeasurableSpace α
μ : Measure α
s✝ t s : Set α
ht : NullMeasurableSet t
⊢ ↑↑μ (s ∩ t) + ↑↑μ (s \ t) = ↑↑μ s

tactic: rcases exists_measurable_superset μ s with ⟨s', hsub, hs'm, hs'⟩
state_before: case refine'_1
ι : Type ?u.14279
α : Type u_1
β : Type ?u.14285
γ : Type ?u.14288
m0 : MeasurableSpace α
μ : Measure α
s✝ t s : Set α
ht : NullMeasurableSet t
⊢ ↑↑μ (s ∩ t) + ↑↑μ (s \ t) ≤ ↑↑μ s

tactic: replace hs'm : NullMeasurableSet s' μ := hs'm.nullMeasurableSet
state_before: case refine'_1.intro.intro.intro
ι : Type ?u.14279
α : Type u_1
β : Type ?u.14285
γ : Type ?u.14288
m0 : MeasurableSpace α
μ : Measure α
s✝ t s : Set α
ht : NullMeasurableSet t
s' : Set α
hsub : s ⊆ s'
hs'm : MeasurableSet s'
hs' : ↑↑μ s' = ↑↑μ s
⊢ ↑↑μ (s ∩ t) + ↑↑μ (s \ t) ≤ ↑↑μ s

tactic: calc
  μ (s ∩ t) + μ (s \ t) ≤ μ (s' ∩ t) + μ (s' \ t) :=
    add_le_add (measure_mono <| inter_subset_inter_left _ hsub)
      (measure_mono <| diff_subset_diff_left hsub)
  _ = μ (s' ∩ t ∪ s' \ t) :=
    (measure_union₀_aux (hs'm.inter ht) (hs'm.diff ht) <|
        (@disjoint_inf_sdiff _ s' t _).aedisjoint).symm
  _ = μ s' := (congr_arg μ (inter_union_diff _ _))
  _ = μ s := hs'
state_before: case refine'_1.intro.intro.intro
ι : Type ?u.14279
α : Type u_1
β : Type ?u.14285
γ : Type ?u.14288
m0 : MeasurableSpace α
μ : Measure α
s✝ t s : Set α
ht : NullMeasurableSet t
s' : Set α
hsub : s ⊆ s'
hs' : ↑↑μ s' = ↑↑μ s
hs'm : NullMeasurableSet s'
⊢ ↑↑μ (s ∩ t) + ↑↑μ (s \ t) ≤ ↑↑μ s

tactic: calc
  μ s = μ (s ∩ t ∪ s \ t) := by rw [inter_union_diff]
  _ ≤ μ (s ∩ t) + μ (s \ t) := measure_union_le _ _
state_before: case refine'_2
ι : Type ?u.14279
α : Type u_1
β : Type ?u.14285
γ : Type ?u.14288
m0 : MeasurableSpace α
μ : Measure α
s✝ t s : Set α
ht : NullMeasurableSet t
⊢ ↑↑μ s ≤ ↑↑μ (s ∩ t) + ↑↑μ (s \ t)

tactic: rw [inter_union_diff]
state_before: ι : Type ?u.14279
α : Type u_1
β : Type ?u.14285
γ : Type ?u.14288
m0 : MeasurableSpace α
μ : Measure α
s✝ t s : Set α
ht : NullMeasurableSet t
⊢ ↑↑μ s = ↑↑μ (s ∩ t ∪ s \ t)
Theorem: Set.offDiag_univ
File: Mathlib/Data/Set/Prod.lean

tactic: simp
state_before: α : Type u_1
s t : Set α
x : α × α
a : α
⊢ ∀ (x : α × α), x ∈ offDiag univ ↔ x ∈ diagonal αᶜ
Theorem: Real.isLUB_sSup
File: Mathlib/Data/Real/Basic.lean

tactic: simp only [sSup_def, dif_pos (And.intro h₁ h₂)]
state_before: x y : ℝ
S : Set ℝ
h₁ : Set.Nonempty S
h₂ : BddAbove S
⊢ IsLUB S (sSup S)

tactic: apply Classical.choose_spec
state_before: x y : ℝ
S : Set ℝ
h₁ : Set.Nonempty S
h₂ : BddAbove S
⊢ IsLUB S (choose (_ : ∃ x, IsLUB S x))
Theorem: MeasureTheory.integrable_of_forall_fin_meas_le
File: Mathlib/MeasureTheory/Function/L1Space.lean

tactic: rwa [@trim_eq_self _ m]
state_before: α : Type u_1
β : Type ?u.1261185
γ : Type ?u.1261188
δ : Type ?u.1261191
m : MeasurableSpace α
μ ν : Measure α
inst✝⁴ : MeasurableSpace δ
inst✝³ : NormedAddCommGroup β
inst✝² : NormedAddCommGroup γ
E : Type u_2
m0 : MeasurableSpace α
inst✝¹ : NormedAddCommGroup E
inst✝ : SigmaFinite μ
C : ℝ≥0∞
hC : C < ⊤
f : α → E
hf_meas : AEStronglyMeasurable f μ
hf : ∀ (s : Set α), MeasurableSet s → ↑↑μ s ≠ ⊤ → (∫⁻ (x : α) in s, ↑‖f x‖₊ ∂μ) ≤ C
⊢ SigmaFinite (Measure.trim μ (_ : m ≤ m))
Theorem: CategoryTheory.Limits.colimit.post_desc
File: Mathlib/CategoryTheory/Limits/HasLimits.lean

tactic: ext
state_before: J : Type u₁
inst✝⁵ : Category J
K : Type u₂
inst✝⁴ : Category K
C : Type u
inst✝³ : Category C
F : J ⥤ C
D : Type u'
inst✝² : Category D
inst✝¹ : HasColimit F
G : C ⥤ D
inst✝ : HasColimit (F ⋙ G)
c : Cocone F
⊢ post F G ≫ G.map (desc F c) = desc (F ⋙ G) (G.mapCocone c)

tactic: rw [← assoc, colimit.ι_post, ← G.map_comp, colimit.ι_desc, colimit.ι_desc]
state_before: case w
J : Type u₁
inst✝⁵ : Category J
K : Type u₂
inst✝⁴ : Category K
C : Type u
inst✝³ : Category C
F : J ⥤ C
D : Type u'
inst✝² : Category D
inst✝¹ : HasColimit F
G : C ⥤ D
inst✝ : HasColimit (F ⋙ G)
c : Cocone F
j✝ : J
⊢ ι (F ⋙ G) j✝ ≫ post F G ≫ G.map (desc F c) = ι (F ⋙ G) j✝ ≫ desc (F ⋙ G) (G.mapCocone c)

tactic: rfl
state_before: case w
J : Type u₁
inst✝⁵ : Category J
K : Type u₂
inst✝⁴ : Category K
C : Type u
inst✝³ : Category C
F : J ⥤ C
D : Type u'
inst✝² : Category D
inst✝¹ : HasColimit F
G : C ⥤ D
inst✝ : HasColimit (F ⋙ G)
c : Cocone F
j✝ : J
⊢ G.map (c.ι.app j✝) = (G.mapCocone c).ι.app j✝
Theorem: CategoryTheory.Adjunction.leftAdjointUniq_refl
File: Mathlib/CategoryTheory/Adjunction/Opposites.lean

tactic: ext
state_before: C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
G : D ⥤ C
adj1 : F ⊣ G
⊢ (leftAdjointUniq adj1 adj1).hom = 𝟙 F

tactic: apply Quiver.Hom.op_inj
state_before: case w.h
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
G : D ⥤ C
adj1 : F ⊣ G
x✝ : C
⊢ (leftAdjointUniq adj1 adj1).hom.app x✝ = (𝟙 F).app x✝

tactic: apply coyoneda.map_injective
state_before: case w.h.a
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
G : D ⥤ C
adj1 : F ⊣ G
x✝ : C
⊢ ((leftAdjointUniq adj1 adj1).hom.app x✝).op = ((𝟙 F).app x✝).op

tactic: ext
state_before: case w.h.a.a
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
G : D ⥤ C
adj1 : F ⊣ G
x✝ : C
⊢ coyoneda.map ((leftAdjointUniq adj1 adj1).hom.app x✝).op = coyoneda.map ((𝟙 F).app x✝).op

tactic: funext
state_before: case w.h.a.a.w.h.h
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
G : D ⥤ C
adj1 : F ⊣ G
x✝¹ : C
x✝ : D
a✝ : (coyoneda.obj (F.obj x✝¹).op).obj x✝
⊢ (coyoneda.map ((leftAdjointUniq adj1 adj1).hom.app x✝¹).op).app x✝ a✝ = (coyoneda.map ((𝟙 F).app x✝¹).op).app x✝ a✝

tactic: simp [leftAdjointsCoyonedaEquiv, leftAdjointUniq]
state_before: case w.h.a.a.w.h.h
C : Type u₁
inst✝¹ : Category C
D : Type u₂
inst✝ : Category D
F : C ⥤ D
G : D ⥤ C
adj1 : F ⊣ G
x✝¹ : C
x✝ : D
a✝ : (coyoneda.obj (F.obj x✝¹).op).obj x✝
⊢ (coyoneda.map ((leftAdjointUniq adj1 adj1).hom.app x✝¹).op).app x✝ a✝ = (coyoneda.map ((𝟙 F).app x✝¹).op).app x✝ a✝
Theorem: continuousOn_list_prod
File: Mathlib/Topology/Algebra/Monoid.lean

tactic: intro x hx
state_before: ι : Type u_1
α : Type ?u.175300
X : Type u_2
M : Type u_3
N : Type ?u.175309
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace M
inst✝¹ : Monoid M
inst✝ : ContinuousMul M
f : ι → X → M
l : List ι
t : Set X
h : ∀ (i : ι), i ∈ l → ContinuousOn (f i) t
⊢ ContinuousOn (fun a => List.prod (List.map (fun i => f i a) l)) t

tactic: rw [continuousWithinAt_iff_continuousAt_restrict _ hx]
state_before: ι : Type u_1
α : Type ?u.175300
X : Type u_2
M : Type u_3
N : Type ?u.175309
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace M
inst✝¹ : Monoid M
inst✝ : ContinuousMul M
f : ι → X → M
l : List ι
t : Set X
h : ∀ (i : ι), i ∈ l → ContinuousOn (f i) t
x : X
hx : x ∈ t
⊢ ContinuousWithinAt (fun a => List.prod (List.map (fun i => f i a) l)) t x

tactic: refine' tendsto_list_prod _ fun i hi => _
state_before: ι : Type u_1
α : Type ?u.175300
X : Type u_2
M : Type u_3
N : Type ?u.175309
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace M
inst✝¹ : Monoid M
inst✝ : ContinuousMul M
f : ι → X → M
l : List ι
t : Set X
h : ∀ (i : ι), i ∈ l → ContinuousOn (f i) t
x : X
hx : x ∈ t
⊢ ContinuousAt (restrict t fun a => List.prod (List.map (fun i => f i a) l)) { val := x, property := hx }

tactic: specialize h i hi x hx
state_before: ι : Type u_1
α : Type ?u.175300
X : Type u_2
M : Type u_3
N : Type ?u.175309
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace M
inst✝¹ : Monoid M
inst✝ : ContinuousMul M
f : ι → X → M
l : List ι
t : Set X
h : ∀ (i : ι), i ∈ l → ContinuousOn (f i) t
x : X
hx : x ∈ t
i : ι
hi : i ∈ l
⊢ Tendsto (fun b => f i ↑b) (𝓝 { val := x, property := hx }) (𝓝 (f i ↑{ val := x, property := hx }))

tactic: rw [continuousWithinAt_iff_continuousAt_restrict _ hx] at h
state_before: ι : Type u_1
α : Type ?u.175300
X : Type u_2
M : Type u_3
N : Type ?u.175309
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace M
inst✝¹ : Monoid M
inst✝ : ContinuousMul M
f : ι → X → M
l : List ι
t : Set X
x : X
hx : x ∈ t
i : ι
hi : i ∈ l
h : ContinuousWithinAt (f i) t x
⊢ Tendsto (fun b => f i ↑b) (𝓝 { val := x, property := hx }) (𝓝 (f i ↑{ val := x, property := hx }))

tactic: exact h
state_before: ι : Type u_1
α : Type ?u.175300
X : Type u_2
M : Type u_3
N : Type ?u.175309
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace M
inst✝¹ : Monoid M
inst✝ : ContinuousMul M
f : ι → X → M
l : List ι
t : Set X
x : X
hx : x ∈ t
i : ι
hi : i ∈ l
h : ContinuousAt (restrict t (f i)) { val := x, property := hx }
⊢ Tendsto (fun b => f i ↑b) (𝓝 { val := x, property := hx }) (𝓝 (f i ↑{ val := x, property := hx }))
Theorem: Complex.dist_self_conj
File: Mathlib/Analysis/Complex/Basic.lean

tactic: rw [dist_comm, dist_conj_self]
state_before: E : Type ?u.101139
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
z : ℂ
⊢ dist z (↑(starRingEnd ℂ) z) = 2 * Abs.abs z.im
Theorem: Int.ediv_emod_unique
File: Std/Data/Int/DivMod.lean

tactic: constructor
state_before: a b r q : Int
h : 0 < b
⊢ a / b = q ∧ a % b = r ↔ r + b * q = a ∧ 0 ≤ r ∧ r < b

tactic: intro ⟨rfl, rfl⟩
state_before: case mp
a b r q : Int
h : 0 < b
⊢ a / b = q ∧ a % b = r → r + b * q = a ∧ 0 ≤ r ∧ r < b

tactic: exact ⟨emod_add_ediv a b, emod_nonneg _ (Int.ne_of_gt h), emod_lt_of_pos _ h⟩
state_before: case mp
a b r q : Int
h : 0 < b
⊢ a % b + b * (a / b) = a ∧ 0 ≤ a % b ∧ a % b < b

tactic: intro ⟨rfl, hz, hb⟩
state_before: case mpr
a b r q : Int
h : 0 < b
⊢ r + b * q = a ∧ 0 ≤ r ∧ r < b → a / b = q ∧ a % b = r

tactic: constructor
state_before: case mpr
a b r q : Int
h : 0 < b
hz : 0 ≤ r
hb : r < b
⊢ (r + b * q) / b = q ∧ (r + b * q) % b = r

tactic: rw [Int.add_mul_ediv_left r q (Int.ne_of_gt h), ediv_eq_zero_of_lt hz hb]
state_before: case mpr.left
a b r q : Int
h : 0 < b
hz : 0 ≤ r
hb : r < b
⊢ (r + b * q) / b = q

tactic: simp [Int.zero_add]
state_before: case mpr.left
a b r q : Int
h : 0 < b
hz : 0 ≤ r
hb : r < b
⊢ 0 + q = q

tactic: rw [add_mul_emod_self_left, emod_eq_of_lt hz hb]
state_before: case mpr.right
a b r q : Int
h : 0 < b
hz : 0 ≤ r
hb : r < b
⊢ (r + b * q) % b = r
Theorem: Filter.cocompact_eq_cofinite
File: Mathlib/Topology/SubsetProperties.lean

tactic: simp only [cocompact, hasBasis_cofinite.eq_biInf, isCompact_iff_finite]
state_before: α✝ : Type u
β : Type v
ι : Type ?u.47137
π : ι → Type ?u.47142
inst✝³ : TopologicalSpace α✝
inst✝² : TopologicalSpace β
s t : Set α✝
α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : DiscreteTopology α
⊢ cocompact α = cofinite
Theorem: Matrix.bit1_apply_eq
File: Mathlib/Data/Matrix/Basic.lean

tactic: simp [bit1_apply]
state_before: l : Type ?u.82029
m : Type ?u.82032
n : Type u_1
o : Type ?u.82038
m' : o → Type ?u.82043
n' : o → Type ?u.82048
R : Type ?u.82051
S : Type ?u.82054
α : Type v
β : Type w
γ : Type ?u.82061
inst✝² : DecidableEq n
inst✝¹ : AddZeroClass α
inst✝ : One α
M : Matrix n n α
i : n
⊢ bit1 M i i = bit1 (M i i)
Theorem: Ideal.isPrime_radical
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: rw [mul_pow] at hxy
state_before: R : Type u
inst✝ : CommSemiring R
I : Ideal R
hi : IsPrimary I
x y : R
x✝ : x * y ∈ radical I
m : ℕ
hxy : (x * y) ^ m ∈ I
⊢ x ∈ radical I ∨ y ∈ radical I

tactic: cases' hi.2 hxy with h h
state_before: R : Type u
inst✝ : CommSemiring R
I : Ideal R
hi : IsPrimary I
x y : R
x✝ : x * y ∈ radical I
m : ℕ
hxy : x ^ m * y ^ m ∈ I
⊢ x ∈ radical I ∨ y ∈ radical I

tactic: exact Or.inl ⟨m, h⟩
state_before: case inl
R : Type u
inst✝ : CommSemiring R
I : Ideal R
hi : IsPrimary I
x y : R
x✝ : x * y ∈ radical I
m : ℕ
hxy : x ^ m * y ^ m ∈ I
h : x ^ m ∈ I
⊢ x ∈ radical I ∨ y ∈ radical I

tactic: exact Or.inr (mem_radical_of_pow_mem h)
state_before: case inr
R : Type u
inst✝ : CommSemiring R
I : Ideal R
hi : IsPrimary I
x y : R
x✝ : x * y ∈ radical I
m : ℕ
hxy : x ^ m * y ^ m ∈ I
h : y ^ m ∈ radical I
⊢ x ∈ radical I ∨ y ∈ radical I
Theorem: Infinite.exists_superset_card_eq
File: Mathlib/Data/Fintype/Card.lean

tactic: induction' n with n IH generalizing s
state_before: α : Type u_1
β : Type ?u.80843
γ : Type ?u.80846
inst✝ : Infinite α
s : Finset α
n : ℕ
hn : card s ≤ n
⊢ ∃ t, s ⊆ t ∧ card t = n

tactic: exact ⟨s, subset_refl _, Nat.eq_zero_of_le_zero hn⟩
state_before: case zero
α : Type u_1
β : Type ?u.80843
γ : Type ?u.80846
inst✝ : Infinite α
s✝ : Finset α
n : ℕ
hn✝ : card s✝ ≤ n
s : Finset α
hn : card s ≤ zero
⊢ ∃ t, s ⊆ t ∧ card t = zero

tactic: cases' hn.eq_or_lt with hn' hn'
state_before: case succ
α : Type u_1
β : Type ?u.80843
γ : Type ?u.80846
inst✝ : Infinite α
s✝ : Finset α
n✝ : ℕ
hn✝ : card s✝ ≤ n✝
n : ℕ
IH : ∀ (s : Finset α), card s ≤ n → ∃ t, s ⊆ t ∧ card t = n
s : Finset α
hn : card s ≤ succ n
⊢ ∃ t, s ⊆ t ∧ card t = succ n

tactic: obtain ⟨t, hs, ht⟩ := IH _ (Nat.le_of_lt_succ hn')
state_before: case succ.inr
α : Type u_1
β : Type ?u.80843
γ : Type ?u.80846
inst✝ : Infinite α
s✝ : Finset α
n✝ : ℕ
hn✝ : card s✝ ≤ n✝
n : ℕ
IH : ∀ (s : Finset α), card s ≤ n → ∃ t, s ⊆ t ∧ card t = n
s : Finset α
hn : card s ≤ succ n
hn' : card s < succ n
⊢ ∃ t, s ⊆ t ∧ card t = succ n

tactic: obtain ⟨x, hx⟩ := exists_not_mem_finset t
state_before: case succ.inr.intro.intro
α : Type u_1
β : Type ?u.80843
γ : Type ?u.80846
inst✝ : Infinite α
s✝ : Finset α
n✝ : ℕ
hn✝ : card s✝ ≤ n✝
n : ℕ
IH : ∀ (s : Finset α), card s ≤ n → ∃ t, s ⊆ t ∧ card t = n
s : Finset α
hn : card s ≤ succ n
hn' : card s < succ n
t : Finset α
hs : s ⊆ t
ht : card t = n
⊢ ∃ t, s ⊆ t ∧ card t = succ n

tactic: refine' ⟨Finset.cons x t hx, hs.trans (Finset.subset_cons _), _⟩
state_before: case succ.inr.intro.intro.intro
α : Type u_1
β : Type ?u.80843
γ : Type ?u.80846
inst✝ : Infinite α
s✝ : Finset α
n✝ : ℕ
hn✝ : card s✝ ≤ n✝
n : ℕ
IH : ∀ (s : Finset α), card s ≤ n → ∃ t, s ⊆ t ∧ card t = n
s : Finset α
hn : card s ≤ succ n
hn' : card s < succ n
t : Finset α
hs : s ⊆ t
ht : card t = n
x : α
hx : ¬x ∈ t
⊢ ∃ t, s ⊆ t ∧ card t = succ n

tactic: simp [hx, ht]
state_before: case succ.inr.intro.intro.intro
α : Type u_1
β : Type ?u.80843
γ : Type ?u.80846
inst✝ : Infinite α
s✝ : Finset α
n✝ : ℕ
hn✝ : card s✝ ≤ n✝
n : ℕ
IH : ∀ (s : Finset α), card s ≤ n → ∃ t, s ⊆ t ∧ card t = n
s : Finset α
hn : card s ≤ succ n
hn' : card s < succ n
t : Finset α
hs : s ⊆ t
ht : card t = n
x : α
hx : ¬x ∈ t
⊢ card (cons x t hx) = succ n

tactic: exact ⟨s, subset_refl _, hn'⟩
state_before: case succ.inl
α : Type u_1
β : Type ?u.80843
γ : Type ?u.80846
inst✝ : Infinite α
s✝ : Finset α
n✝ : ℕ
hn✝ : card s✝ ≤ n✝
n : ℕ
IH : ∀ (s : Finset α), card s ≤ n → ∃ t, s ⊆ t ∧ card t = n
s : Finset α
hn : card s ≤ succ n
hn' : card s = succ n
⊢ ∃ t, s ⊆ t ∧ card t = succ n
Theorem: le_mul_self
File: Mathlib/Algebra/Order/Monoid/Canonical/Defs.lean

tactic: rw [mul_comm]
state_before: α : Type u
inst✝ : CanonicallyOrderedMonoid α
a b c d : α
⊢ a ≤ b * a

tactic: exact le_self_mul
state_before: α : Type u
inst✝ : CanonicallyOrderedMonoid α
a b c d : α
⊢ a ≤ a * b
Theorem: MeasureTheory.Measure.le_sum
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: simpa only [sum_apply μ hs] using ENNReal.le_tsum i
state_before: α : Type u_1
β : Type ?u.336860
γ : Type ?u.336863
δ : Type ?u.336866
ι : Type u_2
R : Type ?u.336872
R' : Type ?u.336875
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ✝ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
μ : ι → Measure α
i : ι
s : Set α
hs : MeasurableSet s
⊢ ↑↑(μ i) s ≤ ↑↑(sum μ) s
Theorem: Finsupp.prod_ite_eq
File: Mathlib/Algebra/BigOperators/Finsupp.lean

tactic: dsimp [Finsupp.prod]
state_before: α : Type u_1
ι : Type ?u.44160
γ : Type ?u.44163
A : Type ?u.44166
B : Type ?u.44169
C : Type ?u.44172
inst✝⁶ : AddCommMonoid A
inst✝⁵ : AddCommMonoid B
inst✝⁴ : AddCommMonoid C
t : ι → A → C
h0 : ∀ (i : ι), t i 0 = 0
h1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y
s : Finset α
f✝ : α → ι →₀ A
i : ι
g : ι →₀ A
k : ι → A → γ → B
x : γ
β : Type ?u.47302
M : Type u_2
M' : Type ?u.47308
N : Type u_3
P : Type ?u.47314
G : Type ?u.47317
H : Type ?u.47320
R : Type ?u.47323
S : Type ?u.47326
inst✝³ : Zero M
inst✝² : Zero M'
inst✝¹ : CommMonoid N
inst✝ : DecidableEq α
f : α →₀ M
a : α
b : α → M → N
⊢ (prod f fun x v => if a = x then b x v else 1) = if a ∈ f.support then b a (↑f a) else 1

tactic: rw [f.support.prod_ite_eq]
state_before: α : Type u_1
ι : Type ?u.44160
γ : Type ?u.44163
A : Type ?u.44166
B : Type ?u.44169
C : Type ?u.44172
inst✝⁶ : AddCommMonoid A
inst✝⁵ : AddCommMonoid B
inst✝⁴ : AddCommMonoid C
t : ι → A → C
h0 : ∀ (i : ι), t i 0 = 0
h1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y
s : Finset α
f✝ : α → ι →₀ A
i : ι
g : ι →₀ A
k : ι → A → γ → B
x : γ
β : Type ?u.47302
M : Type u_2
M' : Type ?u.47308
N : Type u_3
P : Type ?u.47314
G : Type ?u.47317
H : Type ?u.47320
R : Type ?u.47323
S : Type ?u.47326
inst✝³ : Zero M
inst✝² : Zero M'
inst✝¹ : CommMonoid N
inst✝ : DecidableEq α
f : α →₀ M
a : α
b : α → M → N
⊢ (∏ a_1 in f.support, if a = a_1 then b a_1 (↑f a_1) else 1) = if a ∈ f.support then b a (↑f a) else 1
Theorem: FreeGroup.reduce_toWord
File: Mathlib/GroupTheory/FreeGroup.lean

tactic: rintro ⟨L⟩
state_before: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
inst✝ : DecidableEq α
⊢ ∀ (x : FreeGroup α), reduce (toWord x) = toWord x

tactic: exact reduce.idem
state_before: case mk
α : Type u
L✝ L₁ L₂ L₃ L₄ : List (α × Bool)
inst✝ : DecidableEq α
x✝ : FreeGroup α
L : List (α × Bool)
⊢ reduce (toWord (Quot.mk Red.Step L)) = toWord (Quot.mk Red.Step L)
Theorem: minpoly.prime
File: Mathlib/FieldTheory/Minpoly/Field.lean

tactic: refine' ⟨minpoly.ne_zero hx, not_isUnit A x, _⟩
state_before: A : Type u_1
B : Type u_2
inst✝³ : Field A
inst✝² : Ring B
inst✝¹ : IsDomain B
inst✝ : Algebra A B
x : B
hx : IsIntegral A x
⊢ Prime (minpoly A x)

tactic: rintro p q ⟨d, h⟩
state_before: A : Type u_1
B : Type u_2
inst✝³ : Field A
inst✝² : Ring B
inst✝¹ : IsDomain B
inst✝ : Algebra A B
x : B
hx : IsIntegral A x
⊢ ∀ (a b : A[X]), minpoly A x ∣ a * b → minpoly A x ∣ a ∨ minpoly A x ∣ b

tactic: have : Polynomial.aeval x (p * q) = 0 := by simp [h, aeval A x]
state_before: case intro
A : Type u_1
B : Type u_2
inst✝³ : Field A
inst✝² : Ring B
inst✝¹ : IsDomain B
inst✝ : Algebra A B
x : B
hx : IsIntegral A x
p q d : A[X]
h : p * q = minpoly A x * d
⊢ minpoly A x ∣ p ∨ minpoly A x ∣ q

tactic: replace : Polynomial.aeval x p = 0 ∨ Polynomial.aeval x q = 0 := by simpa
state_before: case intro
A : Type u_1
B : Type u_2
inst✝³ : Field A
inst✝² : Ring B
inst✝¹ : IsDomain B
inst✝ : Algebra A B
x : B
hx : IsIntegral A x
p q d : A[X]
h : p * q = minpoly A x * d
this : ↑(Polynomial.aeval x) (p * q) = 0
⊢ minpoly A x ∣ p ∨ minpoly A x ∣ q

tactic: exact Or.imp (dvd A x) (dvd A x) this
state_before: case intro
A : Type u_1
B : Type u_2
inst✝³ : Field A
inst✝² : Ring B
inst✝¹ : IsDomain B
inst✝ : Algebra A B
x : B
hx : IsIntegral A x
p q d : A[X]
h : p * q = minpoly A x * d
this : ↑(Polynomial.aeval x) p = 0 ∨ ↑(Polynomial.aeval x) q = 0
⊢ minpoly A x ∣ p ∨ minpoly A x ∣ q

tactic: simp [h, aeval A x]
state_before: A : Type u_1
B : Type u_2
inst✝³ : Field A
inst✝² : Ring B
inst✝¹ : IsDomain B
inst✝ : Algebra A B
x : B
hx : IsIntegral A x
p q d : A[X]
h : p * q = minpoly A x * d
⊢ ↑(Polynomial.aeval x) (p * q) = 0

tactic: simpa
state_before: A : Type u_1
B : Type u_2
inst✝³ : Field A
inst✝² : Ring B
inst✝¹ : IsDomain B
inst✝ : Algebra A B
x : B
hx : IsIntegral A x
p q d : A[X]
h : p * q = minpoly A x * d
this : ↑(Polynomial.aeval x) (p * q) = 0
⊢ ↑(Polynomial.aeval x) p = 0 ∨ ↑(Polynomial.aeval x) q = 0
Theorem: bot_eq_top_of_rank_eq_zero
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: haveI : FiniteDimensional _ _ := finiteDimensional_of_rank_eq_zero h
state_before: K : Type u
V : Type v
inst✝² : DivisionRing K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
h : Module.rank K V = 0
⊢ ⊥ = ⊤

tactic: apply eq_top_of_finrank_eq
state_before: K : Type u
V : Type v
inst✝² : DivisionRing K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
h : Module.rank K V = 0
this : FiniteDimensional K V
⊢ ⊥ = ⊤

tactic: rw [finrank_bot, finrank_eq_zero_of_rank_eq_zero h]
state_before: case h
K : Type u
V : Type v
inst✝² : DivisionRing K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
h : Module.rank K V = 0
this : FiniteDimensional K V
⊢ finrank K { x // x ∈ ⊥ } = finrank K V
Theorem: Finset.trop_inf
File: Mathlib/Algebra/Tropical/BigOperators.lean

tactic: convert Multiset.trop_inf (s.val.map f)
state_before: R : Type u_1
S : Type u_2
inst✝¹ : LinearOrder R
inst✝ : OrderTop R
s : Finset S
f : S → R
⊢ trop (inf s f) = ∑ i in s, trop (f i)

tactic: simp only [Multiset.map_map, Function.comp_apply]
state_before: case h.e'_3
R : Type u_1
S : Type u_2
inst✝¹ : LinearOrder R
inst✝ : OrderTop R
s : Finset S
f : S → R
⊢ ∑ i in s, trop (f i) = Multiset.sum (Multiset.map trop (Multiset.map f s.val))

tactic: rfl
state_before: case h.e'_3
R : Type u_1
S : Type u_2
inst✝¹ : LinearOrder R
inst✝ : OrderTop R
s : Finset S
f : S → R
⊢ ∑ i in s, trop (f i) = Multiset.sum (Multiset.map (fun i => trop (f i)) s.val)
Theorem: Polynomial.monic_mul_leadingCoeff_inv
File: Mathlib/Data/Polynomial/FieldDivision.lean

tactic: rw [Monic, leadingCoeff_mul, leadingCoeff_C,
  mul_inv_cancel (show leadingCoeff p ≠ 0 from mt leadingCoeff_eq_zero.1 h)]
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : DivisionRing R
p q : R[X]
h : p ≠ 0
⊢ Monic (p * ↑C (leadingCoeff p)⁻¹)
Theorem: List.take_length_le
File: Std/Data/List/Init/Lemmas.lean

tactic: have := take_append_drop i l
state_before: α : Type u_1
i : Nat
l : List α
h : length l ≤ i
⊢ take i l = l

tactic: rw [drop_length_le h, append_nil] at this
state_before: α : Type u_1
i : Nat
l : List α
h : length l ≤ i
this : take i l ++ drop i l = l
⊢ take i l = l

tactic: exact this
state_before: α : Type u_1
i : Nat
l : List α
h : length l ≤ i
this : take i l = l
⊢ take i l = l
Theorem: Real.expNear_sub
File: Mathlib/Data/Complex/Exponential.lean

tactic: simp [expNear, mul_sub]
state_before: n : ℕ
x r₁ r₂ : ℝ
⊢ expNear n x r₁ - expNear n x r₂ = x ^ n / ↑(Nat.factorial n) * (r₁ - r₂)
Theorem: MonoidAlgebra.single_one_mul_apply
File: Mathlib/Algebra/MonoidAlgebra/Basic.lean

tactic: rw [one_mul]
state_before: k : Type u₁
G : Type u₂
R : Type ?u.522014
inst✝¹ : Semiring k
inst✝ : MulOneClass G
f : MonoidAlgebra k G
r : k
x a : G
⊢ 1 * a = x ↔ a = x
Theorem: Submodule.span_int_eq
File: Mathlib/LinearAlgebra/Span.lean

tactic: rw [span_int_eq_addSubgroup_closure, s.closure_eq]
state_before: R : Type ?u.37777
R₂ : Type ?u.37780
K : Type ?u.37783
M✝ : Type ?u.37786
M₂ : Type ?u.37789
V : Type ?u.37792
S : Type ?u.37795
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M✝
inst✝⁴ : Module R M✝
x : M✝
p p' : Submodule R M✝
inst✝³ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝² : AddCommMonoid M₂
inst✝¹ : Module R₂ M₂
s✝ t : Set M✝
M : Type u_1
inst✝ : AddCommGroup M
s : AddSubgroup M
⊢ toAddSubgroup (span ℤ ↑s) = s
Theorem: List.length_product
File: Mathlib/Data/List/ProdSigma.lean

tactic: induction' l₁ with x l₁ IH
state_before: α : Type u_1
β : Type u_2
l₁ : List α
l₂ : List β
⊢ length (l₁ ×ˢ l₂) = length l₁ * length l₂

tactic: exact (zero_mul _).symm
state_before: case nil
α : Type u_1
β : Type u_2
l₂ : List β
⊢ length ([] ×ˢ l₂) = length [] * length l₂

tactic: simp only [length, product_cons, length_append, IH, right_distrib, one_mul, length_map,
  add_comm]
state_before: case cons
α : Type u_1
β : Type u_2
l₂ : List β
x : α
l₁ : List α
IH : length (l₁ ×ˢ l₂) = length l₁ * length l₂
⊢ length ((x :: l₁) ×ˢ l₂) = length (x :: l₁) * length l₂