1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: List.zipLeft_nil_right
File: Mathlib/Data/List/Basic.lean

tactic: cases as <;> rfl
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
a : α
as : List α
b : β
bs : List β
⊢ as.zipLeft [] = map (fun a => (a, none)) as
state_after: no goals
Theorem: Finset.sum_card_slice
File: Mathlib/Data/Finset/Slice.lean

tactic: letI := Classical.decEq α
state_before: α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
𝒜 : Finset (Finset α)
A A₁ A₂ : Finset α
r r₁ r₂ : ℕ
inst✝ : Fintype α
⊢ ∑ r ∈ Iic (Fintype.card α), (𝒜 # r).card = 𝒜.card
state_after: α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
𝒜 : Finset (Finset α)
A A₁ A₂ : Finset α
r r₁ r₂ : ℕ
inst✝ : Fintype α
this : DecidableEq α := Classical.decEq α
⊢ ∑ r ∈ Iic (Fintype.card α), (𝒜 # r).card = 𝒜.card

tactic: rw [← card_biUnion, biUnion_slice]
state_before: α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
𝒜 : Finset (Finset α)
A A₁ A₂ : Finset α
r r₁ r₂ : ℕ
inst✝ : Fintype α
this : DecidableEq α := Classical.decEq α
⊢ ∑ r ∈ Iic (Fintype.card α), (𝒜 # r).card = 𝒜.card
state_after: α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
𝒜 : Finset (Finset α)
A A₁ A₂ : Finset α
r r₁ r₂ : ℕ
inst✝ : Fintype α
this : DecidableEq α := Classical.decEq α
⊢ ∀ x ∈ Iic (Fintype.card α), ∀ y ∈ Iic (Fintype.card α), x ≠ y → Disjoint (𝒜 # x) (𝒜 # y)

tactic: exact Finset.pairwiseDisjoint_slice.subset (Set.subset_univ _)
state_before: α : Type u_1
ι : Sort u_2
κ : ι → Sort u_3
𝒜 : Finset (Finset α)
A A₁ A₂ : Finset α
r r₁ r₂ : ℕ
inst✝ : Fintype α
this : DecidableEq α := Classical.decEq α
⊢ ∀ x ∈ Iic (Fintype.card α), ∀ y ∈ Iic (Fintype.card α), x ≠ y → Disjoint (𝒜 # x) (𝒜 # y)
state_after: no goals
Theorem: MeasureTheory.SimpleFunc.nearestPtInd_succ
File: Mathlib/MeasureTheory/Function/SimpleFuncDense.lean

tactic: simp only [nearestPtInd, coe_piecewise, Set.piecewise]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : PseudoEMetricSpace α
inst✝ : OpensMeasurableSpace α
e : ℕ → α
N : ℕ
x : α
⊢ ↑(nearestPtInd e (N + 1)) x = if ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x then N + 1 else ↑(nearestPtInd e N) x
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : PseudoEMetricSpace α
inst✝ : OpensMeasurableSpace α
e : ℕ → α
N : ℕ
x : α
⊢ (if x ∈ ⋂ k, ⋂ (_ : k ≤ N), {x | edist (e (N + 1)) x < edist (e k) x} then ↑(const α (N + 1)) x
    else ↑(nearestPtInd e N) x) =
    if ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x then N + 1 else ↑(nearestPtInd e N) x

tactic: congr
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : PseudoEMetricSpace α
inst✝ : OpensMeasurableSpace α
e : ℕ → α
N : ℕ
x : α
⊢ (if x ∈ ⋂ k, ⋂ (_ : k ≤ N), {x | edist (e (N + 1)) x < edist (e k) x} then ↑(const α (N + 1)) x
    else ↑(nearestPtInd e N) x) =
    if ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x then N + 1 else ↑(nearestPtInd e N) x
state_after: case e_c
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : PseudoEMetricSpace α
inst✝ : OpensMeasurableSpace α
e : ℕ → α
N : ℕ
x : α
⊢ (x ∈ ⋂ k, ⋂ (_ : k ≤ N), {x | edist (e (N + 1)) x < edist (e k) x}) = ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x

tactic: simp
state_before: case e_c
α : Type u_1
β : Type u_2
ι : Type u_3
E : Type u_4
F : Type u_5
𝕜 : Type u_6
inst✝² : MeasurableSpace α
inst✝¹ : PseudoEMetricSpace α
inst✝ : OpensMeasurableSpace α
e : ℕ → α
N : ℕ
x : α
⊢ (x ∈ ⋂ k, ⋂ (_ : k ≤ N), {x | edist (e (N + 1)) x < edist (e k) x}) = ∀ k ≤ N, edist (e (N + 1)) x < edist (e k) x
state_after: no goals
Theorem: NumberField.InfinitePlace.nrComplexPlaces_eq_zero_of_finrank_eq_one
File: Mathlib/NumberTheory/NumberField/Embeddings.lean

tactic: linarith [card_add_two_mul_card_eq_rank K]
state_before: k : Type u_1
inst✝³ : Field k
K : Type u_2
inst✝² : Field K
F : Type u_3
inst✝¹ : Field F
inst✝ : NumberField K
h : finrank ℚ K = 1
⊢ NrComplexPlaces K = 0
state_after: no goals
Theorem: PEquiv.inj
File: Mathlib/Data/PEquiv.lean

tactic: rw [← mem_iff_mem] at *
state_before: α : Type u
β : Type v
γ : Type w
δ : Type x
f : α ≃. β
a₁ a₂ : α
b : β
h₁ : b ∈ f a₁
h₂ : b ∈ f a₂
⊢ a₁ = a₂
state_after: α : Type u
β : Type v
γ : Type w
δ : Type x
f : α ≃. β
a₁ a₂ : α
b : β
h₁ : a₁ ∈ f.symm b
h₂ : a₂ ∈ f.symm b
⊢ a₁ = a₂

tactic: cases h : f.symm b <;> simp_all
state_before: α : Type u
β : Type v
γ : Type w
δ : Type x
f : α ≃. β
a₁ a₂ : α
b : β
h₁ : a₁ ∈ f.symm b
h₂ : a₂ ∈ f.symm b
⊢ a₁ = a₂
state_after: no goals
Theorem: Algebra.FormallyUnramified.localization_map
File: Mathlib/RingTheory/Unramified/Basic.lean

tactic: haveI : FormallyUnramified S Sₘ :=
  FormallyUnramified.of_isLocalization (M.map (algebraMap R S))
state_before: R S Rₘ Sₘ : Type u
inst✝¹³ : CommRing R
inst✝¹² : CommRing S
inst✝¹¹ : CommRing Rₘ
inst✝¹⁰ : CommRing Sₘ
M : Submonoid R
inst✝⁹ : Algebra R S
inst✝⁸ : Algebra R Sₘ
inst✝⁷ : Algebra S Sₘ
inst✝⁶ : Algebra R Rₘ
inst✝⁵ : Algebra Rₘ Sₘ
inst✝⁴ : IsScalarTower R Rₘ Sₘ
inst✝³ : IsScalarTower R S Sₘ
inst✝² : IsLocalization M Rₘ
inst✝¹ : IsLocalization (Submonoid.map (algebraMap R S) M) Sₘ
inst✝ : FormallyUnramified R S
⊢ FormallyUnramified Rₘ Sₘ
state_after: R S Rₘ Sₘ : Type u
inst✝¹³ : CommRing R
inst✝¹² : CommRing S
inst✝¹¹ : CommRing Rₘ
inst✝¹⁰ : CommRing Sₘ
M : Submonoid R
inst✝⁹ : Algebra R S
inst✝⁸ : Algebra R Sₘ
inst✝⁷ : Algebra S Sₘ
inst✝⁶ : Algebra R Rₘ
inst✝⁵ : Algebra Rₘ Sₘ
inst✝⁴ : IsScalarTower R Rₘ Sₘ
inst✝³ : IsScalarTower R S Sₘ
inst✝² : IsLocalization M Rₘ
inst✝¹ : IsLocalization (Submonoid.map (algebraMap R S) M) Sₘ
inst✝ : FormallyUnramified R S
this : FormallyUnramified S Sₘ
⊢ FormallyUnramified Rₘ Sₘ

tactic: haveI : FormallyUnramified R Sₘ := FormallyUnramified.comp R S Sₘ
state_before: R S Rₘ Sₘ : Type u
inst✝¹³ : CommRing R
inst✝¹² : CommRing S
inst✝¹¹ : CommRing Rₘ
inst✝¹⁰ : CommRing Sₘ
M : Submonoid R
inst✝⁹ : Algebra R S
inst✝⁸ : Algebra R Sₘ
inst✝⁷ : Algebra S Sₘ
inst✝⁶ : Algebra R Rₘ
inst✝⁵ : Algebra Rₘ Sₘ
inst✝⁴ : IsScalarTower R Rₘ Sₘ
inst✝³ : IsScalarTower R S Sₘ
inst✝² : IsLocalization M Rₘ
inst✝¹ : IsLocalization (Submonoid.map (algebraMap R S) M) Sₘ
inst✝ : FormallyUnramified R S
this : FormallyUnramified S Sₘ
⊢ FormallyUnramified Rₘ Sₘ
state_after: R S Rₘ Sₘ : Type u
inst✝¹³ : CommRing R
inst✝¹² : CommRing S
inst✝¹¹ : CommRing Rₘ
inst✝¹⁰ : CommRing Sₘ
M : Submonoid R
inst✝⁹ : Algebra R S
inst✝⁸ : Algebra R Sₘ
inst✝⁷ : Algebra S Sₘ
inst✝⁶ : Algebra R Rₘ
inst✝⁵ : Algebra Rₘ Sₘ
inst✝⁴ : IsScalarTower R Rₘ Sₘ
inst✝³ : IsScalarTower R S Sₘ
inst✝² : IsLocalization M Rₘ
inst✝¹ : IsLocalization (Submonoid.map (algebraMap R S) M) Sₘ
inst✝ : FormallyUnramified R S
this✝ : FormallyUnramified S Sₘ
this : FormallyUnramified R Sₘ
⊢ FormallyUnramified Rₘ Sₘ

tactic: exact FormallyUnramified.localization_base M
state_before: R S Rₘ Sₘ : Type u
inst✝¹³ : CommRing R
inst✝¹² : CommRing S
inst✝¹¹ : CommRing Rₘ
inst✝¹⁰ : CommRing Sₘ
M : Submonoid R
inst✝⁹ : Algebra R S
inst✝⁸ : Algebra R Sₘ
inst✝⁷ : Algebra S Sₘ
inst✝⁶ : Algebra R Rₘ
inst✝⁵ : Algebra Rₘ Sₘ
inst✝⁴ : IsScalarTower R Rₘ Sₘ
inst✝³ : IsScalarTower R S Sₘ
inst✝² : IsLocalization M Rₘ
inst✝¹ : IsLocalization (Submonoid.map (algebraMap R S) M) Sₘ
inst✝ : FormallyUnramified R S
this✝ : FormallyUnramified S Sₘ
this : FormallyUnramified R Sₘ
⊢ FormallyUnramified Rₘ Sₘ
state_after: no goals
Theorem: Batteries.AssocList.foldl_eq
File: .lake/packages/batteries/Batteries/Data/AssocList.lean

tactic: simp [List.foldl_eq_foldlM, foldl, Id.run]
state_before: δ : Type u_1
α : Type u_2
β : Type u_3
f : δ → α → β → δ
init : δ
l : AssocList α β
⊢ foldl f init l =
    List.foldl
      (fun d x =>
        match x with
        | (a, b) => f d a b)
      init l.toList
state_after: no goals
Theorem: Real.ediam_Icc
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: rcases le_or_lt a b with (h | h)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
a b : ℝ
⊢ EMetric.diam (Icc a b) = ENNReal.ofReal (b - a)
state_after: case inl
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
a b : ℝ
h : a ≤ b
⊢ EMetric.diam (Icc a b) = ENNReal.ofReal (b - a)

case inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
a b : ℝ
h : b < a
⊢ EMetric.diam (Icc a b) = ENNReal.ofReal (b - a)

tactic: rw [Real.ediam_eq (isBounded_Icc _ _), csSup_Icc h, csInf_Icc h]
state_before: case inl
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
a b : ℝ
h : a ≤ b
⊢ EMetric.diam (Icc a b) = ENNReal.ofReal (b - a)
state_after: no goals

tactic: simp [h, h.le]
state_before: case inr
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
a b : ℝ
h : b < a
⊢ EMetric.diam (Icc a b) = ENNReal.ofReal (b - a)
state_after: no goals
Theorem: List.erase_append_left
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: simp [erase_eq_eraseP]
state_before: α : Type u_1
inst✝¹ : BEq α
a : α
inst✝ : LawfulBEq α
l₁ l₂ : List α
h : a ∈ l₁
⊢ (l₁ ++ l₂).erase a = l₁.erase a ++ l₂
state_after: α : Type u_1
inst✝¹ : BEq α
a : α
inst✝ : LawfulBEq α
l₁ l₂ : List α
h : a ∈ l₁
⊢ eraseP (fun x => a == x) (l₁ ++ l₂) = eraseP (fun x => a == x) l₁ ++ l₂

tactic: exact eraseP_append_left (beq_self_eq_true a) l₂ h
state_before: α : Type u_1
inst✝¹ : BEq α
a : α
inst✝ : LawfulBEq α
l₁ l₂ : List α
h : a ∈ l₁
⊢ eraseP (fun x => a == x) (l₁ ++ l₂) = eraseP (fun x => a == x) l₁ ++ l₂
state_after: no goals
Theorem: PadicInt.lift_spec
File: Mathlib/NumberTheory/Padics/RingHoms.lean

tactic: ext r
state_before: p : ℕ
hp_prime : Fact (Nat.Prime p)
R : Type u_1
inst✝ : NonAssocSemiring R
f : (k : ℕ) → R →+* ZMod (p ^ k)
f_compat : ∀ (k1 k2 : ℕ) (hk : k1 ≤ k2), (ZMod.castHom ⋯ (ZMod (p ^ k1))).comp (f k2) = f k1
n : ℕ
⊢ (toZModPow n).comp (lift f_compat) = f n
state_after: case a
p : ℕ
hp_prime : Fact (Nat.Prime p)
R : Type u_1
inst✝ : NonAssocSemiring R
f : (k : ℕ) → R →+* ZMod (p ^ k)
f_compat : ∀ (k1 k2 : ℕ) (hk : k1 ≤ k2), (ZMod.castHom ⋯ (ZMod (p ^ k1))).comp (f k2) = f k1
n : ℕ
r : R
⊢ ((toZModPow n).comp (lift f_compat)) r = (f n) r

tactic: rw [RingHom.comp_apply, ← ZMod.natCast_zmod_val (f n r), ← map_natCast <| toZModPow n, ←
  sub_eq_zero, ← RingHom.map_sub, ← RingHom.mem_ker, ker_toZModPow]
state_before: case a
p : ℕ
hp_prime : Fact (Nat.Prime p)
R : Type u_1
inst✝ : NonAssocSemiring R
f : (k : ℕ) → R →+* ZMod (p ^ k)
f_compat : ∀ (k1 k2 : ℕ) (hk : k1 ≤ k2), (ZMod.castHom ⋯ (ZMod (p ^ k1))).comp (f k2) = f k1
n : ℕ
r : R
⊢ ((toZModPow n).comp (lift f_compat)) r = (f n) r
state_after: case a
p : ℕ
hp_prime : Fact (Nat.Prime p)
R : Type u_1
inst✝ : NonAssocSemiring R
f : (k : ℕ) → R →+* ZMod (p ^ k)
f_compat : ∀ (k1 k2 : ℕ) (hk : k1 ≤ k2), (ZMod.castHom ⋯ (ZMod (p ^ k1))).comp (f k2) = f k1
n : ℕ
r : R
⊢ (lift f_compat) r - ↑((f n) r).val ∈ Ideal.span {↑p ^ n}

tactic: apply lift_sub_val_mem_span
state_before: case a
p : ℕ
hp_prime : Fact (Nat.Prime p)
R : Type u_1
inst✝ : NonAssocSemiring R
f : (k : ℕ) → R →+* ZMod (p ^ k)
f_compat : ∀ (k1 k2 : ℕ) (hk : k1 ≤ k2), (ZMod.castHom ⋯ (ZMod (p ^ k1))).comp (f k2) = f k1
n : ℕ
r : R
⊢ (lift f_compat) r - ↑((f n) r).val ∈ Ideal.span {↑p ^ n}
state_after: no goals
Theorem: CategoryTheory.Functor.biproductComparison'_comp_biproductComparison
File: Mathlib/CategoryTheory/Limits/Preserves/Shapes/Biproducts.lean

tactic: classical
  ext
  simp [biproduct.ι_π, ← Functor.map_comp, eqToHom_map]
state_before: C : Type u₁
inst✝⁶ : Category.{v₁, u₁} C
D : Type u₂
inst✝⁵ : Category.{v₂, u₂} D
inst✝⁴ : HasZeroMorphisms C
inst✝³ : HasZeroMorphisms D
J : Type w₁
F : C ⥤ D
f : J → C
inst✝² : HasBiproduct f
inst✝¹ : HasBiproduct (F.obj ∘ f)
inst✝ : F.PreservesZeroMorphisms
⊢ F.biproductComparison' f ≫ F.biproductComparison f = 𝟙 (⨁ F.obj ∘ f)
state_after: no goals

tactic: ext
state_before: C : Type u₁
inst✝⁶ : Category.{v₁, u₁} C
D : Type u₂
inst✝⁵ : Category.{v₂, u₂} D
inst✝⁴ : HasZeroMorphisms C
inst✝³ : HasZeroMorphisms D
J : Type w₁
F : C ⥤ D
f : J → C
inst✝² : HasBiproduct f
inst✝¹ : HasBiproduct (F.obj ∘ f)
inst✝ : F.PreservesZeroMorphisms
⊢ F.biproductComparison' f ≫ F.biproductComparison f = 𝟙 (⨁ F.obj ∘ f)
state_after: case w.w
C : Type u₁
inst✝⁶ : Category.{v₁, u₁} C
D : Type u₂
inst✝⁵ : Category.{v₂, u₂} D
inst✝⁴ : HasZeroMorphisms C
inst✝³ : HasZeroMorphisms D
J : Type w₁
F : C ⥤ D
f : J → C
inst✝² : HasBiproduct f
inst✝¹ : HasBiproduct (F.obj ∘ f)
inst✝ : F.PreservesZeroMorphisms
j✝¹ j✝ : J
⊢ biproduct.ι (F.obj ∘ f) j✝ ≫ (F.biproductComparison' f ≫ F.biproductComparison f) ≫ biproduct.π (F.obj ∘ f) j✝¹ =
    biproduct.ι (F.obj ∘ f) j✝ ≫ 𝟙 (⨁ F.obj ∘ f) ≫ biproduct.π (F.obj ∘ f) j✝¹

tactic: simp [biproduct.ι_π, ← Functor.map_comp, eqToHom_map]
state_before: case w.w
C : Type u₁
inst✝⁶ : Category.{v₁, u₁} C
D : Type u₂
inst✝⁵ : Category.{v₂, u₂} D
inst✝⁴ : HasZeroMorphisms C
inst✝³ : HasZeroMorphisms D
J : Type w₁
F : C ⥤ D
f : J → C
inst✝² : HasBiproduct f
inst✝¹ : HasBiproduct (F.obj ∘ f)
inst✝ : F.PreservesZeroMorphisms
j✝¹ j✝ : J
⊢ biproduct.ι (F.obj ∘ f) j✝ ≫ (F.biproductComparison' f ≫ F.biproductComparison f) ≫ biproduct.π (F.obj ∘ f) j✝¹ =
    biproduct.ι (F.obj ∘ f) j✝ ≫ 𝟙 (⨁ F.obj ∘ f) ≫ biproduct.π (F.obj ∘ f) j✝¹
state_after: no goals
Theorem: AntilipschitzWith.mul_le_nndist
File: Mathlib/Topology/MetricSpace/Antilipschitz.lean

tactic: simpa only [div_eq_inv_mul] using NNReal.div_le_of_le_mul' (hf.le_mul_nndist x y)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
K : ℝ≥0
f : α → β
hf : AntilipschitzWith K f
x y : α
⊢ K⁻¹ * nndist x y ≤ nndist (f x) (f y)
state_after: no goals
Theorem: Finset.sum_single_ite
File: Mathlib/LinearAlgebra/FinsuppVectorSpace.lean

tactic: simp only [apply_ite (Finsupp.single _), Finsupp.single_zero, Finset.sum_ite_eq,
  if_pos (Finset.mem_univ _)]
state_before: R : Type u_1
M : Type u_2
n : Type u_3
inst✝⁴ : DecidableEq n
inst✝³ : Semiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : Fintype n
a : R
i : n
⊢ ∑ x : n, Finsupp.single x (if i = x then a else 0) = Finsupp.single i a
state_after: no goals
Theorem: aux_sub
File: Mathlib/Analysis/Convex/Strong.lean

tactic: rw [norm_add_sq_real, norm_sub_sq_real, norm_smul, norm_smul, real_inner_smul_left,
  inner_smul_right, norm_of_nonneg ha, norm_of_nonneg hb, mul_pow, mul_pow]
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
φ ψ : ℝ → ℝ
s : Set E
a b m : ℝ
x y : E
f : E → ℝ
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ a * (f x - m / 2 * ‖x‖ ^ 2) + b * (f y - m / 2 * ‖y‖ ^ 2) + m / 2 * ‖a • x + b • y‖ ^ 2 =
    a * f x + b * f y - m / 2 * a * b * ‖x - y‖ ^ 2
state_after: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
φ ψ : ℝ → ℝ
s : Set E
a b m : ℝ
x y : E
f : E → ℝ
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ a * (f x - m / 2 * ‖x‖ ^ 2) + b * (f y - m / 2 * ‖y‖ ^ 2) +
      m / 2 * (a ^ 2 * ‖x‖ ^ 2 + 2 * (a * (b * ⟪x, y⟫_ℝ)) + b ^ 2 * ‖y‖ ^ 2) =
    a * f x + b * f y - m / 2 * a * b * (‖x‖ ^ 2 - 2 * ⟪x, y⟫_ℝ + ‖y‖ ^ 2)

tactic: obtain rfl := eq_sub_of_add_eq hab
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
φ ψ : ℝ → ℝ
s : Set E
a b m : ℝ
x y : E
f : E → ℝ
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ a * (f x - m / 2 * ‖x‖ ^ 2) + b * (f y - m / 2 * ‖y‖ ^ 2) +
      m / 2 * (a ^ 2 * ‖x‖ ^ 2 + 2 * (a * (b * ⟪x, y⟫_ℝ)) + b ^ 2 * ‖y‖ ^ 2) =
    a * f x + b * f y - m / 2 * a * b * (‖x‖ ^ 2 - 2 * ⟪x, y⟫_ℝ + ‖y‖ ^ 2)
state_after: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
φ ψ : ℝ → ℝ
s : Set E
b m : ℝ
x y : E
f : E → ℝ
hb : 0 ≤ b
ha : 0 ≤ 1 - b
hab : 1 - b + b = 1
⊢ (1 - b) * (f x - m / 2 * ‖x‖ ^ 2) + b * (f y - m / 2 * ‖y‖ ^ 2) +
      m / 2 * ((1 - b) ^ 2 * ‖x‖ ^ 2 + 2 * ((1 - b) * (b * ⟪x, y⟫_ℝ)) + b ^ 2 * ‖y‖ ^ 2) =
    (1 - b) * f x + b * f y - m / 2 * (1 - b) * b * (‖x‖ ^ 2 - 2 * ⟪x, y⟫_ℝ + ‖y‖ ^ 2)

tactic: ring_nf
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : InnerProductSpace ℝ E
φ ψ : ℝ → ℝ
s : Set E
b m : ℝ
x y : E
f : E → ℝ
hb : 0 ≤ b
ha : 0 ≤ 1 - b
hab : 1 - b + b = 1
⊢ (1 - b) * (f x - m / 2 * ‖x‖ ^ 2) + b * (f y - m / 2 * ‖y‖ ^ 2) +
      m / 2 * ((1 - b) ^ 2 * ‖x‖ ^ 2 + 2 * ((1 - b) * (b * ⟪x, y⟫_ℝ)) + b ^ 2 * ‖y‖ ^ 2) =
    (1 - b) * f x + b * f y - m / 2 * (1 - b) * b * (‖x‖ ^ 2 - 2 * ⟪x, y⟫_ℝ + ‖y‖ ^ 2)
state_after: no goals
Theorem: nhds_swap
File: Mathlib/Topology/Constructions.lean

tactic: rw [nhds_prod_eq, Filter.prod_comm, nhds_prod_eq]
state_before: X : Type u
Y : Type v
Z : Type u_1
W : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : TopologicalSpace W
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
x : X
y : Y
⊢ 𝓝 (x, y) = map Prod.swap (𝓝 (y, x))
state_after: X : Type u
Y : Type v
Z : Type u_1
W : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : TopologicalSpace W
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
x : X
y : Y
⊢ map (fun p => (p.2, p.1)) (𝓝 y ×ˢ 𝓝 x) = map Prod.swap (𝓝 y ×ˢ 𝓝 x)

tactic: rfl
state_before: X : Type u
Y : Type v
Z : Type u_1
W : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : TopologicalSpace W
inst✝¹ : TopologicalSpace ε
inst✝ : TopologicalSpace ζ
x : X
y : Y
⊢ map (fun p => (p.2, p.1)) (𝓝 y ×ˢ 𝓝 x) = map Prod.swap (𝓝 y ×ˢ 𝓝 x)
state_after: no goals
Theorem: ProbabilityTheory.kernel.integral_piecewise
File: Mathlib/Probability/Kernel/Basic.lean

tactic: simp_rw [piecewise_apply]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ η : ↥(kernel α β)
s : Set α
hs : MeasurableSet s
inst✝² : DecidablePred fun x => x ∈ s
E : Type u_4
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
a : α
g : β → E
⊢ ∫ (b : β), g b ∂(piecewise hs κ η) a = if a ∈ s then ∫ (b : β), g b ∂κ a else ∫ (b : β), g b ∂η a
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ η : ↥(kernel α β)
s : Set α
hs : MeasurableSet s
inst✝² : DecidablePred fun x => x ∈ s
E : Type u_4
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
a : α
g : β → E
⊢ (∫ (b : β), g b ∂if a ∈ s then κ a else η a) = if a ∈ s then ∫ (b : β), g b ∂κ a else ∫ (b : β), g b ∂η a

tactic: split_ifs <;> rfl
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
κ η : ↥(kernel α β)
s : Set α
hs : MeasurableSet s
inst✝² : DecidablePred fun x => x ∈ s
E : Type u_4
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
a : α
g : β → E
⊢ (∫ (b : β), g b ∂if a ∈ s then κ a else η a) = if a ∈ s then ∫ (b : β), g b ∂κ a else ∫ (b : β), g b ∂η a
state_after: no goals
Theorem: upperSemicontinuousOn_univ_iff
File: Mathlib/Topology/Semicontinuous.lean

tactic: simp [UpperSemicontinuousOn, UpperSemicontinuous, upperSemicontinuousWithinAt_univ_iff]
state_before: α : Type u_1
inst✝¹ : TopologicalSpace α
β : Type u_2
inst✝ : Preorder β
f g : α → β
x : α
s t : Set α
y z : β
⊢ UpperSemicontinuousOn f univ ↔ UpperSemicontinuous f
state_after: no goals
Theorem: Flow.omegaLimit_image_subset
File: Mathlib/Dynamics/OmegaLimit.lean

tactic: simp only [omegaLimit_image_eq, ← map_add]
state_before: τ : Type u_1
inst✝³ : TopologicalSpace τ
inst✝² : AddMonoid τ
inst✝¹ : ContinuousAdd τ
α : Type u_2
inst✝ : TopologicalSpace α
f : Filter τ
ϕ : Flow τ α
s : Set α
t : τ
ht : Tendsto (fun x => x + t) f f
⊢ ω f ϕ.toFun (ϕ.toFun t '' s) ⊆ ω f ϕ.toFun s
state_after: τ : Type u_1
inst✝³ : TopologicalSpace τ
inst✝² : AddMonoid τ
inst✝¹ : ContinuousAdd τ
α : Type u_2
inst✝ : TopologicalSpace α
f : Filter τ
ϕ : Flow τ α
s : Set α
t : τ
ht : Tendsto (fun x => x + t) f f
⊢ ω f (fun t_1 x => ϕ.toFun (t_1 + t) x) s ⊆ ω f ϕ.toFun s

tactic: exact omegaLimit_subset_of_tendsto ϕ s ht
state_before: τ : Type u_1
inst✝³ : TopologicalSpace τ
inst✝² : AddMonoid τ
inst✝¹ : ContinuousAdd τ
α : Type u_2
inst✝ : TopologicalSpace α
f : Filter τ
ϕ : Flow τ α
s : Set α
t : τ
ht : Tendsto (fun x => x + t) f f
⊢ ω f (fun t_1 x => ϕ.toFun (t_1 + t) x) s ⊆ ω f ϕ.toFun s
state_after: no goals
Theorem: MeasureTheory.Measure.Regular.exists_compact_not_null
File: Mathlib/MeasureTheory/Measure/Regular.lean

tactic: simp_rw [Ne, ← measure_univ_eq_zero, isOpen_univ.measure_eq_iSup_isCompact,
  ENNReal.iSup_eq_zero, not_forall, exists_prop, subset_univ, true_and_iff]
state_before: α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : μ.Regular
⊢ (∃ K, IsCompact K ∧ μ K ≠ 0) ↔ μ ≠ 0
state_after: no goals
Theorem: MeasureTheory.exists_lintegral_le
File: Mathlib/MeasureTheory/Integral/Average.lean

tactic: simpa only [laverage_eq_lintegral] using
  exists_laverage_le (IsProbabilityMeasure.ne_zero μ) hint
state_before: α : Type u_1
E : Type u_2
F : Type u_3
m0 : MeasurableSpace α
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : CompleteSpace E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : CompleteSpace F
μ ν : Measure α
s t N : Set α
f : α → ℝ≥0∞
inst✝ : IsProbabilityMeasure μ
hint : ∫⁻ (a : α), f a ∂μ ≠ ⊤
⊢ ∃ x, ∫⁻ (a : α), f a ∂μ ≤ f x
state_after: no goals
Theorem: Polynomial.coeff_erase
File: Mathlib/Algebra/Polynomial/Basic.lean

tactic: rcases p with ⟨⟩
state_before: R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p✝ q p : R[X]
n i : ℕ
⊢ (erase n p).coeff i = if i = n then 0 else p.coeff i
state_after: case ofFinsupp
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n i : ℕ
toFinsupp✝ : R[ℕ]
⊢ (erase n { toFinsupp := toFinsupp✝ }).coeff i = if i = n then 0 else { toFinsupp := toFinsupp✝ }.coeff i

tactic: simp only [erase_def, coeff]
state_before: case ofFinsupp
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n i : ℕ
toFinsupp✝ : R[ℕ]
⊢ (erase n { toFinsupp := toFinsupp✝ }).coeff i = if i = n then 0 else { toFinsupp := toFinsupp✝ }.coeff i
state_after: case ofFinsupp
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n i : ℕ
toFinsupp✝ : R[ℕ]
⊢ (Finsupp.erase n toFinsupp✝) i = if i = n then 0 else toFinsupp✝ i

tactic: exact ite_congr rfl (fun _ => rfl) (fun _ => rfl)
state_before: case ofFinsupp
R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n i : ℕ
toFinsupp✝ : R[ℕ]
⊢ (Finsupp.erase n toFinsupp✝) i = if i = n then 0 else toFinsupp✝ i
state_after: no goals
Theorem: LipschitzOnWith.of_le_add_mul
File: Mathlib/Topology/MetricSpace/Lipschitz.lean

tactic: simpa only [Real.toNNReal_coe] using LipschitzOnWith.of_le_add_mul' K h
state_before: α : Type u
β : Type v
γ : Type w
ι : Type x
inst✝² : PseudoMetricSpace α
inst✝¹ : PseudoMetricSpace β
inst✝ : PseudoMetricSpace γ
K✝ : ℝ≥0
s : Set α
f✝ : α → β
f : α → ℝ
K : ℝ≥0
h : ∀ x ∈ s, ∀ y ∈ s, f x ≤ f y + ↑K * dist x y
⊢ LipschitzOnWith K f s
state_after: no goals
Theorem: CategoryTheory.isSeparator_coprod_of_isSeparator_right
File: Mathlib/CategoryTheory/Generator.lean

tactic: simp
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
G H : C
inst✝ : HasBinaryCoproduct G H
hH : IsSeparator H
⊢ {H} ⊆ {G, H}
state_after: no goals
Theorem: bihimp_bihimp_cancel_right
File: Mathlib/Order/SymmDiff.lean

tactic: simp [bihimp_assoc]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : BooleanAlgebra α
a b c d : α
⊢ b ⇔ a ⇔ a = b
state_after: no goals