1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Multiset.prod_map_add
File: Mathlib/Algebra/BigOperators/Ring/Multiset.lean

tactic: refine s.induction_on ?_ fun a s ih ↦ ?_
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CommSemiring α
s : Multiset ι
f g : ι → α
⊢ (map (fun i => f i + g i) s).prod = (map (fun p => (map f p.1).prod * (map g p.2).prod) s.antidiagonal).sum
state_after: case refine_1
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CommSemiring α
s : Multiset ι
f g : ι → α
⊢ (map (fun i => f i + g i) 0).prod = (map (fun p => (map f p.1).prod * (map g p.2).prod) (antidiagonal 0)).sum

case refine_2
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CommSemiring α
s✝ : Multiset ι
f g : ι → α
a : ι
s : Multiset ι
ih : (map (fun i => f i + g i) s).prod = (map (fun p => (map f p.1).prod * (map g p.2).prod) s.antidiagonal).sum
⊢ (map (fun i => f i + g i) (a ::ₘ s)).prod =
    (map (fun p => (map f p.1).prod * (map g p.2).prod) (a ::ₘ s).antidiagonal).sum

tactic: simp only [map_zero, prod_zero, antidiagonal_zero, map_singleton, mul_one, sum_singleton]
state_before: case refine_1
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CommSemiring α
s : Multiset ι
f g : ι → α
⊢ (map (fun i => f i + g i) 0).prod = (map (fun p => (map f p.1).prod * (map g p.2).prod) (antidiagonal 0)).sum
state_after: no goals

tactic: simp only [map_cons, prod_cons, ih, sum_map_mul_left.symm, add_mul, mul_left_comm (f a),
  mul_left_comm (g a), sum_map_add, antidiagonal_cons, Prod.map_fst, Prod.map_snd,
  id_eq, map_add, map_map, Function.comp_apply, mul_assoc, sum_add]
state_before: case refine_2
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CommSemiring α
s✝ : Multiset ι
f g : ι → α
a : ι
s : Multiset ι
ih : (map (fun i => f i + g i) s).prod = (map (fun p => (map f p.1).prod * (map g p.2).prod) s.antidiagonal).sum
⊢ (map (fun i => f i + g i) (a ::ₘ s)).prod =
    (map (fun p => (map f p.1).prod * (map g p.2).prod) (a ::ₘ s).antidiagonal).sum
state_after: case refine_2
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CommSemiring α
s✝ : Multiset ι
f g : ι → α
a : ι
s : Multiset ι
ih : (map (fun i => f i + g i) s).prod = (map (fun p => (map f p.1).prod * (map g p.2).prod) s.antidiagonal).sum
⊢ (map (fun i => (map f i.1).prod * (f a * (map g i.2).prod)) s.antidiagonal).sum +
      (map (fun i => (map f i.1).prod * (g a * (map g i.2).prod)) s.antidiagonal).sum =
    (map (fun x => (map f x.1).prod * (g a * (map g x.2).prod)) s.antidiagonal).sum +
      (map (fun i => (map f i.1).prod * (f a * (map g i.2).prod)) s.antidiagonal).sum

tactic: exact add_comm _ _
state_before: case refine_2
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CommSemiring α
s✝ : Multiset ι
f g : ι → α
a : ι
s : Multiset ι
ih : (map (fun i => f i + g i) s).prod = (map (fun p => (map f p.1).prod * (map g p.2).prod) s.antidiagonal).sum
⊢ (map (fun i => (map f i.1).prod * (f a * (map g i.2).prod)) s.antidiagonal).sum +
      (map (fun i => (map f i.1).prod * (g a * (map g i.2).prod)) s.antidiagonal).sum =
    (map (fun x => (map f x.1).prod * (g a * (map g x.2).prod)) s.antidiagonal).sum +
      (map (fun i => (map f i.1).prod * (f a * (map g i.2).prod)) s.antidiagonal).sum
state_after: no goals
Theorem: TopCat.Presheaf.Pushforward.comp_inv_app
File: Mathlib/Topology/Sheaves/Presheaf.lean

tactic: simp [comp]
state_before: C : Type u
inst✝ : Category.{v, u} C
X : TopCat
ℱ : Presheaf C X
Y Z : TopCat
f : X ⟶ Y
g : Y ⟶ Z
U : (Opens ↑Z)ᵒᵖ
⊢ (comp ℱ f g).inv.app U = 𝟙 ((g _* (f _* ℱ)).obj U)
state_after: no goals
Theorem: Finset.finsuppAntidiag_zero
File: Mathlib/Algebra/Order/Antidiag/Finsupp.lean

tactic: ext f
state_before: ι : Type u_1
μ : Type u_2
μ' : Type u_3
inst✝³ : DecidableEq ι
inst✝² : CanonicallyOrderedAddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
s : Finset ι
⊢ s.finsuppAntidiag 0 = {0}
state_after: case a
ι : Type u_1
μ : Type u_2
μ' : Type u_3
inst✝³ : DecidableEq ι
inst✝² : CanonicallyOrderedAddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
s : Finset ι
f : ι →₀ μ
⊢ f ∈ s.finsuppAntidiag 0 ↔ f ∈ {0}

tactic: simp_rw [mem_finsuppAntidiag', mem_singleton, sum_eq_zero_iff, Finset.subset_iff,
  mem_support_iff, not_imp_comm, ← forall_and, ← or_imp, DFunLike.ext_iff, zero_apply, or_comm,
  or_not, true_imp_iff]
state_before: case a
ι : Type u_1
μ : Type u_2
μ' : Type u_3
inst✝³ : DecidableEq ι
inst✝² : CanonicallyOrderedAddCommMonoid μ
inst✝¹ : HasAntidiagonal μ
inst✝ : DecidableEq μ
s : Finset ι
f : ι →₀ μ
⊢ f ∈ s.finsuppAntidiag 0 ↔ f ∈ {0}
state_after: no goals
Theorem: CategoryTheory.PreGaloisCategory.has_decomp_connected_components_aux_initial
File: Mathlib/CategoryTheory/Galois/Decomposition.lean

tactic: refine ⟨Empty, fun _ ↦ X, fun _ ↦ 𝟙 X, ?_⟩
state_before: C : Type u₁
inst✝¹ : Category.{u₂, u₁} C
inst✝ : GaloisCategory C
X : C
h : IsInitial X
⊢ ∃ ι f g x, (∀ (i : ι), IsConnected (f i)) ∧ Finite ι
state_after: C : Type u₁
inst✝¹ : Category.{u₂, u₁} C
inst✝ : GaloisCategory C
X : C
h : IsInitial X
⊢ ∃ x, (∀ (i : Empty), IsConnected ((fun x => X) i)) ∧ Finite Empty

tactic: use mkCofanColimit _ (fun s ↦ IsInitial.to h s.pt) (fun s ↦ by aesop)
  (fun s m _ ↦ IsInitial.hom_ext h m _)
state_before: C : Type u₁
inst✝¹ : Category.{u₂, u₁} C
inst✝ : GaloisCategory C
X : C
h : IsInitial X
⊢ ∃ x, (∀ (i : Empty), IsConnected ((fun x => X) i)) ∧ Finite Empty
state_after: case h
C : Type u₁
inst✝¹ : Category.{u₂, u₁} C
inst✝ : GaloisCategory C
X : C
h : IsInitial X
⊢ (∀ (i : Empty), IsConnected ((fun x => X) i)) ∧ Finite Empty

tactic: exact ⟨by simp only [IsEmpty.forall_iff], inferInstance⟩
state_before: case h
C : Type u₁
inst✝¹ : Category.{u₂, u₁} C
inst✝ : GaloisCategory C
X : C
h : IsInitial X
⊢ (∀ (i : Empty), IsConnected ((fun x => X) i)) ∧ Finite Empty
state_after: no goals

tactic: aesop
state_before: C : Type u₁
inst✝¹ : Category.{u₂, u₁} C
inst✝ : GaloisCategory C
X : C
h : IsInitial X
s : Cofan fun x => X
⊢ ∀ (j : Empty), (Cofan.mk X fun x => 𝟙 X).inj j ≫ (fun s => h.to s.pt) s = s.inj j
state_after: no goals

tactic: simp only [IsEmpty.forall_iff]
state_before: C : Type u₁
inst✝¹ : Category.{u₂, u₁} C
inst✝ : GaloisCategory C
X : C
h : IsInitial X
⊢ ∀ (i : Empty), IsConnected ((fun x => X) i)
state_after: no goals
Theorem: Surreal.Multiplication.Args.numeric_P1
File: Mathlib/SetTheory/Surreal/Multiplication.lean

tactic: simp [Args.Numeric, Args.toMultiset]
state_before: x✝ x₁ x₂ x₃ x' y✝ y₁ y₂ y₃ y' : PGame
x y : PGame
⊢ (P1 x y).Numeric ↔ x.Numeric ∧ y.Numeric
state_after: no goals
Theorem: ContinuousMonoidHom.range_toContinuousMap
File: Mathlib/Topology/Algebra/ContinuousMonoidHom.lean

tactic: refine Set.Subset.antisymm (Set.range_subset_iff.2 fun f ↦ ⟨map_one f, map_mul f⟩) ?_
state_before: F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹⁰ : Monoid A
inst✝⁹ : Monoid B
inst✝⁸ : Monoid C
inst✝⁷ : Monoid D
inst✝⁶ : CommGroup E
inst✝⁵ : TopologicalSpace A
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace C
inst✝² : TopologicalSpace D
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalGroup E
⊢ Set.range toContinuousMap = {f | f 1 = 1 ∧ ∀ (x y : A), f (x * y) = f x * f y}
state_after: F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹⁰ : Monoid A
inst✝⁹ : Monoid B
inst✝⁸ : Monoid C
inst✝⁷ : Monoid D
inst✝⁶ : CommGroup E
inst✝⁵ : TopologicalSpace A
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace C
inst✝² : TopologicalSpace D
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalGroup E
⊢ {f | f 1 = 1 ∧ ∀ (x y : A), f (x * y) = f x * f y} ⊆ Set.range toContinuousMap

tactic: rintro f ⟨h1, hmul⟩
state_before: F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹⁰ : Monoid A
inst✝⁹ : Monoid B
inst✝⁸ : Monoid C
inst✝⁷ : Monoid D
inst✝⁶ : CommGroup E
inst✝⁵ : TopologicalSpace A
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace C
inst✝² : TopologicalSpace D
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalGroup E
⊢ {f | f 1 = 1 ∧ ∀ (x y : A), f (x * y) = f x * f y} ⊆ Set.range toContinuousMap
state_after: case intro
F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹⁰ : Monoid A
inst✝⁹ : Monoid B
inst✝⁸ : Monoid C
inst✝⁷ : Monoid D
inst✝⁶ : CommGroup E
inst✝⁵ : TopologicalSpace A
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace C
inst✝² : TopologicalSpace D
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalGroup E
f : C(A, B)
h1 : f 1 = 1
hmul : ∀ (x y : A), f (x * y) = f x * f y
⊢ f ∈ Set.range toContinuousMap

tactic: exact ⟨{ f with map_one' := h1, map_mul' := hmul }, rfl⟩
state_before: case intro
F : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
D : Type u_5
E : Type u_6
inst✝¹⁰ : Monoid A
inst✝⁹ : Monoid B
inst✝⁸ : Monoid C
inst✝⁷ : Monoid D
inst✝⁶ : CommGroup E
inst✝⁵ : TopologicalSpace A
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace C
inst✝² : TopologicalSpace D
inst✝¹ : TopologicalSpace E
inst✝ : TopologicalGroup E
f : C(A, B)
h1 : f 1 = 1
hmul : ∀ (x y : A), f (x * y) = f x * f y
⊢ f ∈ Set.range toContinuousMap
state_after: no goals
Theorem: ENNReal.toReal_sub_of_le
File: Mathlib/Data/ENNReal/Real.lean

tactic: lift b to ℝ≥0 using ne_top_of_le_ne_top ha h
state_before: a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
a b : ℝ≥0∞
h : b ≤ a
ha : a ≠ ⊤
⊢ (a - b).toReal = a.toReal - b.toReal
state_after: case intro
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
ha : a ≠ ⊤
b : ℝ≥0
h : ↑b ≤ a
⊢ (a - ↑b).toReal = a.toReal - (↑b).toReal

tactic: lift a to ℝ≥0 using ha
state_before: case intro
a✝ b✝ c d : ℝ≥0∞
r p q : ℝ≥0
a : ℝ≥0∞
ha : a ≠ ⊤
b : ℝ≥0
h : ↑b ≤ a
⊢ (a - ↑b).toReal = a.toReal - (↑b).toReal
state_after: case intro.intro
a✝ b✝ c d : ℝ≥0∞
r p q b a : ℝ≥0
h : ↑b ≤ ↑a
⊢ (↑a - ↑b).toReal = (↑a).toReal - (↑b).toReal

tactic: simp only [← ENNReal.coe_sub, ENNReal.coe_toReal, NNReal.coe_sub (ENNReal.coe_le_coe.mp h)]
state_before: case intro.intro
a✝ b✝ c d : ℝ≥0∞
r p q b a : ℝ≥0
h : ↑b ≤ ↑a
⊢ (↑a - ↑b).toReal = (↑a).toReal - (↑b).toReal
state_after: no goals
Theorem: Setoid.sup_def
File: Mathlib/Data/Setoid/Basic.lean

tactic: rw [sup_eq_eqvGen]
state_before: α : Type u_1
β : Type u_2
r s : Setoid α
⊢ r ⊔ s = EqvGen.Setoid (r.Rel ⊔ s.Rel)
state_after: α : Type u_1
β : Type u_2
r s : Setoid α
⊢ (EqvGen.Setoid fun x y => r.Rel x y ∨ s.Rel x y) = EqvGen.Setoid (r.Rel ⊔ s.Rel)

tactic: rfl
state_before: α : Type u_1
β : Type u_2
r s : Setoid α
⊢ (EqvGen.Setoid fun x y => r.Rel x y ∨ s.Rel x y) = EqvGen.Setoid (r.Rel ⊔ s.Rel)
state_after: no goals
Theorem: Combinatorics.Line.vertical_apply
File: Mathlib/Combinatorics/HalesJewett.lean

tactic: funext i
state_before: α : Type u_1
ι : Type u_2
ι' : Type u_3
v : ι → α
l : Line α ι'
x : α
⊢ (fun x i => ((vertical v l).idxFun i).getD x) x = Sum.elim v ((fun x i => (l.idxFun i).getD x) x)
state_after: case h
α : Type u_1
ι : Type u_2
ι' : Type u_3
v : ι → α
l : Line α ι'
x : α
i : ι ⊕ ι'
⊢ (fun x i => ((vertical v l).idxFun i).getD x) x i = Sum.elim v ((fun x i => (l.idxFun i).getD x) x) i

tactic: cases i <;> rfl
state_before: case h
α : Type u_1
ι : Type u_2
ι' : Type u_3
v : ι → α
l : Line α ι'
x : α
i : ι ⊕ ι'
⊢ (fun x i => ((vertical v l).idxFun i).getD x) x i = Sum.elim v ((fun x i => (l.idxFun i).getD x) x) i
state_after: no goals
Theorem: LocallyConstant.locallyConstant_eq_of_fiber_zero_eq
File: Mathlib/Topology/LocallyConstant/Basic.lean

tactic: simp only [Set.ext_iff, mem_singleton_iff, mem_preimage] at h
state_before: X✝ : Type u_1
Y : Type u_2
Z : Type u_3
α : Type u_4
inst✝¹ : TopologicalSpace X✝
X : Type u_5
inst✝ : TopologicalSpace X
f g : LocallyConstant X (Fin 2)
h : ⇑f ⁻¹' {0} = ⇑g ⁻¹' {0}
⊢ f = g
state_after: X✝ : Type u_1
Y : Type u_2
Z : Type u_3
α : Type u_4
inst✝¹ : TopologicalSpace X✝
X : Type u_5
inst✝ : TopologicalSpace X
f g : LocallyConstant X (Fin 2)
h : ∀ (x : X), f x = 0 ↔ g x = 0
⊢ f = g

tactic: ext1 x
state_before: X✝ : Type u_1
Y : Type u_2
Z : Type u_3
α : Type u_4
inst✝¹ : TopologicalSpace X✝
X : Type u_5
inst✝ : TopologicalSpace X
f g : LocallyConstant X (Fin 2)
h : ∀ (x : X), f x = 0 ↔ g x = 0
⊢ f = g
state_after: case h
X✝ : Type u_1
Y : Type u_2
Z : Type u_3
α : Type u_4
inst✝¹ : TopologicalSpace X✝
X : Type u_5
inst✝ : TopologicalSpace X
f g : LocallyConstant X (Fin 2)
h : ∀ (x : X), f x = 0 ↔ g x = 0
x : X
⊢ f x = g x

tactic: exact Fin.fin_two_eq_of_eq_zero_iff (h x)
state_before: case h
X✝ : Type u_1
Y : Type u_2
Z : Type u_3
α : Type u_4
inst✝¹ : TopologicalSpace X✝
X : Type u_5
inst✝ : TopologicalSpace X
f g : LocallyConstant X (Fin 2)
h : ∀ (x : X), f x = 0 ↔ g x = 0
x : X
⊢ f x = g x
state_after: no goals
Theorem: MvPolynomial.IsHomogeneous.map
File: Mathlib/RingTheory/MvPolynomial/Homogeneous.lean

tactic: simpa only [one_mul] using hφ.eval₂ _ _ (fun r ↦ isHomogeneous_C _ (f r)) (isHomogeneous_X _)
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
inst✝² inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
φ ψ : MvPolynomial σ R
m n : ℕ
hφ : φ.IsHomogeneous n
f : R →+* S
⊢ ((MvPolynomial.map f) φ).IsHomogeneous n
state_after: no goals
Theorem: Ideal.Quotient.mk_eq_mk_iff_sub_mem
File: Mathlib/RingTheory/Ideal/Quotient.lean

tactic: rw [← eq_zero_iff_mem, map_sub, sub_eq_zero]
state_before: R : Type u
inst✝ : CommRing R
I : Ideal R
a b : R
S : Type v
x✝ y✝ x y : R
⊢ (mk I) x = (mk I) y ↔ x - y ∈ I
state_after: no goals
Theorem: Nat.le_sqrt'
File: Mathlib/Data/Nat/Defs.lean

tactic: simpa only [Nat.pow_two] using le_sqrt
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
⊢ m ≤ n.sqrt ↔ m ^ 2 ≤ n
state_after: no goals
Theorem: MeasureTheory.mem_fundamentalInterior
File: Mathlib/MeasureTheory/Group/FundamentalDomain.lean

tactic: simp [fundamentalInterior]
state_before: G : Type u_1
H : Type u_2
α : Type u_3
β : Type u_4
E : Type u_5
inst✝¹ : Group G
inst✝ : MulAction G α
s : Set α
x : α
⊢ x ∈ fundamentalInterior G s ↔ x ∈ s ∧ ∀ (g : G), g ≠ 1 → x ∉ g • s
state_after: no goals
Theorem: MeasureTheory.MeasurePreserving.aemeasurable_comp_iff
File: Mathlib/Dynamics/Ergodic/MeasurePreserving.lean

tactic: rw [← hf.map_eq, h₂.aemeasurable_map_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝³ : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
inst✝ : MeasurableSpace δ
μa : Measure α
μb : Measure β
μc : Measure γ
μd : Measure δ
f : α → β
hf : MeasurePreserving f μa μb
h₂ : MeasurableEmbedding f
g : β → γ
⊢ AEMeasurable (g ∘ f) μa ↔ AEMeasurable g μb
state_after: no goals
Theorem: Finset.sym2_eq_empty
File: Mathlib/Data/Finset/Sym.lean

tactic: rw [← val_eq_zero, sym2_val, Multiset.sym2_eq_zero_iff, val_eq_zero]
state_before: α : Type u_1
s t : Finset α
a b : α
⊢ s.sym2 = ∅ ↔ s = ∅
state_after: no goals
Theorem: PrincipalIdealRing.factors_spec
File: Mathlib/RingTheory/PrincipalIdealDomain.lean

tactic: unfold factors
state_before: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
a : R
h : a ≠ 0
⊢ (∀ b ∈ factors a, Irreducible b) ∧ Associated (factors a).prod a
state_after: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
a : R
h : a ≠ 0
⊢ (∀ b ∈ if h : a = 0 then ∅ else Classical.choose ⋯, Irreducible b) ∧
    Associated (if h : a = 0 then ∅ else Classical.choose ⋯).prod a

tactic: rw [dif_neg h]
state_before: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
a : R
h : a ≠ 0
⊢ (∀ b ∈ if h : a = 0 then ∅ else Classical.choose ⋯, Irreducible b) ∧
    Associated (if h : a = 0 then ∅ else Classical.choose ⋯).prod a
state_after: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
a : R
h : a ≠ 0
⊢ (∀ b ∈ Classical.choose ⋯, Irreducible b) ∧ Associated (Classical.choose ⋯).prod a

tactic: exact Classical.choose_spec (WfDvdMonoid.exists_factors a h)
state_before: R : Type u
M : Type v
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : IsPrincipalIdealRing R
a : R
h : a ≠ 0
⊢ (∀ b ∈ Classical.choose ⋯, Irreducible b) ∧ Associated (Classical.choose ⋯).prod a
state_after: no goals
Theorem: MeasureTheory.integral_toReal
File: Mathlib/MeasureTheory/Integral/Bochner.lean

tactic: rw [integral_eq_lintegral_of_nonneg_ae _ hfm.ennreal_toReal.aestronglyMeasurable,
  lintegral_congr_ae (ofReal_toReal_ae_eq hf)]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ≥0∞
hfm : AEMeasurable f μ
hf : ∀ᵐ (x : α) ∂μ, f x < ⊤
⊢ ∫ (a : α), (f a).toReal ∂μ = (∫⁻ (a : α), f a ∂μ).toReal
state_after: α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ≥0∞
hfm : AEMeasurable f μ
hf : ∀ᵐ (x : α) ∂μ, f x < ⊤
⊢ 0 ≤ᶠ[ae μ] fun x => (f x).toReal

tactic: exact eventually_of_forall fun x => ENNReal.toReal_nonneg
state_before: α : Type u_1
E : Type u_2
F : Type u_3
𝕜 : Type u_4
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace ℝ E
hE : CompleteSpace E
inst✝⁹ : NontriviallyNormedField 𝕜
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : SMulCommClass ℝ 𝕜 E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedSpace ℝ F
inst✝⁴ : CompleteSpace F
G : Type u_5
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace ℝ G
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type u_6
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ≥0∞
hfm : AEMeasurable f μ
hf : ∀ᵐ (x : α) ∂μ, f x < ⊤
⊢ 0 ≤ᶠ[ae μ] fun x => (f x).toReal
state_after: no goals
Theorem: Finset.eq_prod_range_div'
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: conv_lhs => rw [Finset.eq_prod_range_div f]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝¹ : CommMonoid β
M : Type u_6
inst✝ : CommGroup M
f : ℕ → M
n : ℕ
⊢ f n = ∏ i ∈ range (n + 1), if i = 0 then f 0 else f i / f (i - 1)
state_after: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝¹ : CommMonoid β
M : Type u_6
inst✝ : CommGroup M
f : ℕ → M
n : ℕ
⊢ f 0 * ∏ i ∈ range n, f (i + 1) / f i = ∏ i ∈ range (n + 1), if i = 0 then f 0 else f i / f (i - 1)

tactic: simp [Finset.prod_range_succ', mul_comm]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝¹ : CommMonoid β
M : Type u_6
inst✝ : CommGroup M
f : ℕ → M
n : ℕ
⊢ f 0 * ∏ i ∈ range n, f (i + 1) / f i = ∏ i ∈ range (n + 1), if i = 0 then f 0 else f i / f (i - 1)
state_after: no goals
Theorem: Ring.inverse_pow
File: Mathlib/Algebra/GroupWithZero/Commute.lean

tactic: rw [pow_zero, pow_zero, Ring.inverse_one]
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝ : MonoidWithZero M₀
r : M₀
⊢ inverse r ^ 0 = inverse (r ^ 0)
state_after: no goals

tactic: rw [pow_succ', pow_succ, Ring.mul_inverse_rev' ((Commute.refl r).pow_left n),
  Ring.inverse_pow r n]
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝ : MonoidWithZero M₀
r : M₀
n : ℕ
⊢ inverse r ^ (n + 1) = inverse (r ^ (n + 1))
state_after: no goals
Theorem: Ordinal.familyOfBFamily_enum
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: convert hi
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal.{?u.155550}
f : (a : Ordinal.{?u.155550}) → a < o → α
i : Ordinal.{?u.155550}
hi : i < o
⊢ i < type fun x x_1 => x < x_1
state_after: case h.e'_4
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal.{?u.155550}
f : (a : Ordinal.{?u.155550}) → a < o → α
i : Ordinal.{?u.155550}
hi : i < o
⊢ (type fun x x_1 => x < x_1) = o

tactic: exact type_lt _
state_before: case h.e'_4
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal.{?u.155550}
f : (a : Ordinal.{?u.155550}) → a < o → α
i : Ordinal.{?u.155550}
hi : i < o
⊢ (type fun x x_1 => x < x_1) = o
state_after: no goals
Theorem: derivWithin_inv
File: Mathlib/Analysis/Calculus/Deriv/Inv.lean

tactic: rw [DifferentiableAt.derivWithin (differentiableAt_inv.2 x_ne_zero) hxs]
state_before: 𝕜 : Type u
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type v
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type w
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L : Filter 𝕜
x_ne_zero : x ≠ 0
hxs : UniqueDiffWithinAt 𝕜 s x
⊢ derivWithin (fun x => x⁻¹) s x = -(x ^ 2)⁻¹
state_after: 𝕜 : Type u
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type v
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type w
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L : Filter 𝕜
x_ne_zero : x ≠ 0
hxs : UniqueDiffWithinAt 𝕜 s x
⊢ deriv (fun x => x⁻¹) x = -(x ^ 2)⁻¹

tactic: exact deriv_inv
state_before: 𝕜 : Type u
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type v
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type w
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L : Filter 𝕜
x_ne_zero : x ≠ 0
hxs : UniqueDiffWithinAt 𝕜 s x
⊢ deriv (fun x => x⁻¹) x = -(x ^ 2)⁻¹
state_after: no goals
Theorem: Complex.normSq_add
File: Mathlib/Data/Complex/Basic.lean

tactic: dsimp [normSq]
state_before: z w : ℂ
⊢ normSq (z + w) = normSq z + normSq w + 2 * (z * (starRingEnd ℂ) w).re
state_after: z w : ℂ
⊢ (z.re + w.re) * (z.re + w.re) + (z.im + w.im) * (z.im + w.im) =
    z.re * z.re + z.im * z.im + (w.re * w.re + w.im * w.im) + 2 * (z.re * w.re - z.im * -w.im)

tactic: ring
state_before: z w : ℂ
⊢ (z.re + w.re) * (z.re + w.re) + (z.im + w.im) * (z.im + w.im) =
    z.re * z.re + z.im * z.im + (w.re * w.re + w.im * w.im) + 2 * (z.re * w.re - z.im * -w.im)
state_after: no goals
Theorem: EReal.add_lt_top
File: Mathlib/Data/Real/EReal.lean

tactic: rw [← EReal.top_add_top]
state_before: x y : EReal
hx : x ≠ ⊤
hy : y ≠ ⊤
⊢ x + y < ⊤
state_after: x y : EReal
hx : x ≠ ⊤
hy : y ≠ ⊤
⊢ x + y < ⊤ + ⊤

tactic: exact EReal.add_lt_add hx.lt_top hy.lt_top
state_before: x y : EReal
hx : x ≠ ⊤
hy : y ≠ ⊤
⊢ x + y < ⊤ + ⊤
state_after: no goals
Theorem: ProbabilityTheory.measurable_geometricPMFReal
File: Mathlib/Probability/Distributions/Geometric.lean

tactic: measurability
state_before: p : ℝ
⊢ Measurable (geometricPMFReal p)
state_after: no goals
Theorem: tsub_div
File: Mathlib/Algebra/Order/Field/Canonical/Basic.lean

tactic: simp_rw [div_eq_mul_inv, tsub_mul]
state_before: α : Type u_1
inst✝² : CanonicallyLinearOrderedSemifield α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c : α
⊢ (a - b) / c = a / c - b / c
state_after: no goals
Theorem: MeasureTheory.SimpleFunc.forall_mem_range
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

tactic: simp only [mem_range, Set.forall_mem_range]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
f : α →ₛ β
p : β → Prop
⊢ (∀ y ∈ f.range, p y) ↔ ∀ (x : α), p (↑f x)
state_after: no goals
Theorem: Stream'.WSeq.bind_ret
File: Mathlib/Data/Seq/WSeq.lean

tactic: dsimp [bind]
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
s : WSeq α
⊢ s.bind (ret ∘ f) ~ʷ map f s
state_after: α : Type u
β : Type v
γ : Type w
f : α → β
s : WSeq α
⊢ (map (ret ∘ f) s).join ~ʷ map f s

tactic: rw [map_comp]
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
s : WSeq α
⊢ (map (ret ∘ f) s).join ~ʷ map f s
state_after: α : Type u
β : Type v
γ : Type w
f : α → β
s : WSeq α
⊢ (map ret (map f s)).join ~ʷ map f s

tactic: apply join_map_ret
state_before: α : Type u
β : Type v
γ : Type w
f : α → β
s : WSeq α
⊢ (map ret (map f s)).join ~ʷ map f s
state_after: no goals