1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: MeasureTheory.setIntegral_pos_iff_support_of_nonneg_ae
File: Mathlib/MeasureTheory/Integral/SetIntegral.lean

tactic: rw [integral_pos_iff_support_of_nonneg_ae hf hfi, Measure.restrict_apply₀]
state_before: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝² : MeasurableSpace X
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f✝ g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
f : X → ℝ
hf : 0 ≤ᶠ[ae (μ.restrict s)] f
hfi : IntegrableOn f s μ
⊢ 0 < ∫ (x : X) in s, f x ∂μ ↔ 0 < μ (support f ∩ s)
state_after: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝² : MeasurableSpace X
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f✝ g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
f : X → ℝ
hf : 0 ≤ᶠ[ae (μ.restrict s)] f
hfi : IntegrableOn f s μ
⊢ NullMeasurableSet (support f) (μ.restrict s)

tactic: rw [support_eq_preimage]
state_before: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝² : MeasurableSpace X
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f✝ g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
f : X → ℝ
hf : 0 ≤ᶠ[ae (μ.restrict s)] f
hfi : IntegrableOn f s μ
⊢ NullMeasurableSet (support f) (μ.restrict s)
state_after: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝² : MeasurableSpace X
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f✝ g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
f : X → ℝ
hf : 0 ≤ᶠ[ae (μ.restrict s)] f
hfi : IntegrableOn f s μ
⊢ NullMeasurableSet (f ⁻¹' {0}ᶜ) (μ.restrict s)

tactic: exact hfi.aestronglyMeasurable.aemeasurable.nullMeasurable (measurableSet_singleton 0).compl
state_before: X : Type u_1
Y : Type u_2
E : Type u_3
F : Type u_4
inst✝² : MeasurableSpace X
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f✝ g : X → E
s t : Set X
μ ν : Measure X
l l' : Filter X
f : X → ℝ
hf : 0 ≤ᶠ[ae (μ.restrict s)] f
hfi : IntegrableOn f s μ
⊢ NullMeasurableSet (f ⁻¹' {0}ᶜ) (μ.restrict s)
state_after: no goals
Theorem: ProbabilityTheory.preCDF_le_one
File: Mathlib/Probability/Kernel/Disintegration/CondCdf.lean

tactic: rw [ae_all_iff]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ∀ᵐ (a : α) ∂ρ.fst, ∀ (r : ℚ), preCDF ρ r a ≤ 1
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ∀ (i : ℚ), ∀ᵐ (a : α) ∂ρ.fst, preCDF ρ i a ≤ 1

tactic: refine fun r ↦ ae_le_of_forall_setLIntegral_le_of_sigmaFinite measurable_preCDF
  measurable_const fun s hs _ ↦ ?_
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
⊢ ∀ (i : ℚ), ∀ᵐ (a : α) ∂ρ.fst, preCDF ρ i a ≤ 1
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
s : Set α
hs : MeasurableSet s
x✝ : ρ.fst s < ⊤
⊢ ∫⁻ (x : α) in s, preCDF ρ r x ∂ρ.fst ≤ ∫⁻ (x : α) in s, 1 ∂ρ.fst

tactic: rw [setLIntegral_preCDF_fst ρ r hs]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
s : Set α
hs : MeasurableSet s
x✝ : ρ.fst s < ⊤
⊢ ∫⁻ (x : α) in s, preCDF ρ r x ∂ρ.fst ≤ ∫⁻ (x : α) in s, 1 ∂ρ.fst
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
s : Set α
hs : MeasurableSet s
x✝ : ρ.fst s < ⊤
⊢ (ρ.IicSnd ↑r) s ≤ ∫⁻ (x : α) in s, 1 ∂ρ.fst

tactic: simp only [Pi.one_apply, lintegral_one, Measure.restrict_apply, MeasurableSet.univ, univ_inter]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
s : Set α
hs : MeasurableSet s
x✝ : ρ.fst s < ⊤
⊢ (ρ.IicSnd ↑r) s ≤ ∫⁻ (x : α) in s, 1 ∂ρ.fst
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
s : Set α
hs : MeasurableSet s
x✝ : ρ.fst s < ⊤
⊢ (ρ.IicSnd ↑r) s ≤ ρ.fst s

tactic: exact Measure.IicSnd_le_fst ρ r s
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
ρ : Measure (α × ℝ)
inst✝ : IsFiniteMeasure ρ
r : ℚ
s : Set α
hs : MeasurableSet s
x✝ : ρ.fst s < ⊤
⊢ (ρ.IicSnd ↑r) s ≤ ρ.fst s
state_after: no goals
Theorem: Nat.choose_self
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: induction n <;> simp [*, choose, choose_eq_zero_of_lt (lt_succ_self _)]
state_before: n : ℕ
⊢ n.choose n = 1
state_after: no goals
Theorem: multiplicity.eq_coe_iff
File: Mathlib/RingTheory/Multiplicity.lean

tactic: exact
  ⟨fun h =>
    let ⟨h₁, h₂⟩ := eq_some_iff.1 h
    h₂ ▸ ⟨pow_multiplicity_dvd _, is_greatest (by
            rw [PartENat.lt_coe_iff]
            exact ⟨h₁, lt_succ_self _⟩)⟩,
    fun h => eq_some_iff.2 ⟨⟨n, h.2⟩, Eq.symm <| unique' h.1 h.2⟩⟩
state_before: α : Type u_1
β : Type u_2
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
n : ℕ
⊢ multiplicity a b = ↑n ↔ a ^ n ∣ b ∧ ¬a ^ (n + 1) ∣ b
state_after: no goals

tactic: rw [PartENat.lt_coe_iff]
state_before: α : Type u_1
β : Type u_2
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
n : ℕ
h : multiplicity a b = ↑n
h₁ : (multiplicity a b).Dom
h₂ : (multiplicity a b).get h₁ = n
⊢ multiplicity a b < ↑((multiplicity a b).get h₁ + 1)
state_after: α : Type u_1
β : Type u_2
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
n : ℕ
h : multiplicity a b = ↑n
h₁ : (multiplicity a b).Dom
h₂ : (multiplicity a b).get h₁ = n
⊢ ∃ (h : (multiplicity a b).Dom), (multiplicity a b).get h < (multiplicity a b).get h₁ + 1

tactic: exact ⟨h₁, lt_succ_self _⟩
state_before: α : Type u_1
β : Type u_2
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
n : ℕ
h : multiplicity a b = ↑n
h₁ : (multiplicity a b).Dom
h₂ : (multiplicity a b).get h₁ = n
⊢ ∃ (h : (multiplicity a b).Dom), (multiplicity a b).get h < (multiplicity a b).get h₁ + 1
state_after: no goals
Theorem: ArithmeticFunction.IsMultiplicative.ppow
File: Mathlib/NumberTheory/ArithmeticFunction.lean

tactic: induction' k with k hi
state_before: R : Type u_1
inst✝ : CommSemiring R
f : ArithmeticFunction R
hf : f.IsMultiplicative
k : ℕ
⊢ (f.ppow k).IsMultiplicative
state_after: case zero
R : Type u_1
inst✝ : CommSemiring R
f : ArithmeticFunction R
hf : f.IsMultiplicative
⊢ (f.ppow 0).IsMultiplicative

case succ
R : Type u_1
inst✝ : CommSemiring R
f : ArithmeticFunction R
hf : f.IsMultiplicative
k : ℕ
hi : (f.ppow k).IsMultiplicative
⊢ (f.ppow (k + 1)).IsMultiplicative

tactic: exact isMultiplicative_zeta.natCast
state_before: case zero
R : Type u_1
inst✝ : CommSemiring R
f : ArithmeticFunction R
hf : f.IsMultiplicative
⊢ (f.ppow 0).IsMultiplicative
state_after: no goals

tactic: rw [ppow_succ']
state_before: case succ
R : Type u_1
inst✝ : CommSemiring R
f : ArithmeticFunction R
hf : f.IsMultiplicative
k : ℕ
hi : (f.ppow k).IsMultiplicative
⊢ (f.ppow (k + 1)).IsMultiplicative
state_after: case succ
R : Type u_1
inst✝ : CommSemiring R
f : ArithmeticFunction R
hf : f.IsMultiplicative
k : ℕ
hi : (f.ppow k).IsMultiplicative
⊢ (f.pmul (f.ppow k)).IsMultiplicative

tactic: apply hf.pmul hi
state_before: case succ
R : Type u_1
inst✝ : CommSemiring R
f : ArithmeticFunction R
hf : f.IsMultiplicative
k : ℕ
hi : (f.ppow k).IsMultiplicative
⊢ (f.pmul (f.ppow k)).IsMultiplicative
state_after: no goals
Theorem: Matroid.Basis.mapEmbedding
File: Mathlib/Data/Matroid/Map.lean

tactic: apply hIX.map
state_before: α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M : Matroid α
N : Matroid β
X : Set α
hIX : M.Basis I X
f : α ↪ β
⊢ (M.mapEmbedding f).Basis (⇑f '' I) (⇑f '' X)
state_after: no goals
Theorem: Tuple.eq_sort_iff'
File: Mathlib/Data/Fin/Tuple/Sort.lean

tactic: constructor <;> intro h
state_before: n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
σ : Equiv.Perm (Fin n)
⊢ σ = sort f ↔ StrictMono ⇑(Equiv.trans σ (graphEquiv₁ f))
state_after: case mp
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
σ : Equiv.Perm (Fin n)
h : σ = sort f
⊢ StrictMono ⇑(Equiv.trans σ (graphEquiv₁ f))

case mpr
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
σ : Equiv.Perm (Fin n)
h : StrictMono ⇑(Equiv.trans σ (graphEquiv₁ f))
⊢ σ = sort f

tactic: rw [h, sort, Equiv.trans_assoc, Equiv.symm_trans_self]
state_before: case mp
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
σ : Equiv.Perm (Fin n)
h : σ = sort f
⊢ StrictMono ⇑(Equiv.trans σ (graphEquiv₁ f))
state_after: case mp
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
σ : Equiv.Perm (Fin n)
h : σ = sort f
⊢ StrictMono ⇑((graphEquiv₂ f).trans (Equiv.refl { x // x ∈ graph f }))

tactic: exact (graphEquiv₂ f).strictMono
state_before: case mp
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
σ : Equiv.Perm (Fin n)
h : σ = sort f
⊢ StrictMono ⇑((graphEquiv₂ f).trans (Equiv.refl { x // x ∈ graph f }))
state_after: no goals

tactic: have := Subsingleton.elim (graphEquiv₂ f) (h.orderIsoOfSurjective _ <| Equiv.surjective _)
state_before: case mpr
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
σ : Equiv.Perm (Fin n)
h : StrictMono ⇑(Equiv.trans σ (graphEquiv₁ f))
⊢ σ = sort f
state_after: case mpr
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
σ : Equiv.Perm (Fin n)
h : StrictMono ⇑(Equiv.trans σ (graphEquiv₁ f))
this : graphEquiv₂ f = StrictMono.orderIsoOfSurjective (⇑(Equiv.trans σ (graphEquiv₁ f))) h ⋯
⊢ σ = sort f

tactic: ext1 x
state_before: case mpr
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
σ : Equiv.Perm (Fin n)
h : StrictMono ⇑(Equiv.trans σ (graphEquiv₁ f))
this : graphEquiv₂ f = StrictMono.orderIsoOfSurjective (⇑(Equiv.trans σ (graphEquiv₁ f))) h ⋯
⊢ σ = sort f
state_after: case mpr.H
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
σ : Equiv.Perm (Fin n)
h : StrictMono ⇑(Equiv.trans σ (graphEquiv₁ f))
this : graphEquiv₂ f = StrictMono.orderIsoOfSurjective (⇑(Equiv.trans σ (graphEquiv₁ f))) h ⋯
x : Fin n
⊢ σ x = (sort f) x

tactic: exact (graphEquiv₁ f).apply_eq_iff_eq_symm_apply.1 (DFunLike.congr_fun this x).symm
state_before: case mpr.H
n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
σ : Equiv.Perm (Fin n)
h : StrictMono ⇑(Equiv.trans σ (graphEquiv₁ f))
this : graphEquiv₂ f = StrictMono.orderIsoOfSurjective (⇑(Equiv.trans σ (graphEquiv₁ f))) h ⋯
x : Fin n
⊢ σ x = (sort f) x
state_after: no goals
Theorem: Grp.SurjectiveOfEpiAuxs.one_smul
File: Mathlib/Algebra/Category/Grp/EpiMono.lean

tactic: change fromCoset _ = fromCoset _
state_before: A B : Grp
f : A ⟶ B
x : X'
y : ↑(Set.range fun x => x • ↑(MonoidHom.range f))
⊢ 1 • fromCoset y = fromCoset y
state_after: A B : Grp
f : A ⟶ B
x : X'
y : ↑(Set.range fun x => x • ↑(MonoidHom.range f))
⊢ fromCoset ⟨1 • ↑y, ⋯⟩ = fromCoset y

tactic: simp only [one_leftCoset, Subtype.ext_iff_val]
state_before: A B : Grp
f : A ⟶ B
x : X'
y : ↑(Set.range fun x => x • ↑(MonoidHom.range f))
⊢ fromCoset ⟨1 • ↑y, ⋯⟩ = fromCoset y
state_after: no goals
Theorem: SetTheory.PGame.moveRight_neg_symm
File: Mathlib/SetTheory/Game/PGame.lean

tactic: simp
state_before: xl xr : Type u
x : PGame
i : (-x).LeftMoves
⊢ x.moveRight (toLeftMovesNeg.symm i) = -(-x).moveLeft i
state_after: no goals
Theorem: starConvex_iUnion
File: Mathlib/Analysis/Convex/Star.lean

tactic: rintro y hy a b ha hb hab
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : SMul 𝕜 E
inst✝ : SMul 𝕜 F
x : E
s✝ t : Set E
ι : Sort u_4
s : ι → Set E
hs : ∀ (i : ι), StarConvex 𝕜 x (s i)
⊢ StarConvex 𝕜 x (⋃ i, s i)
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : SMul 𝕜 E
inst✝ : SMul 𝕜 F
x : E
s✝ t : Set E
ι : Sort u_4
s : ι → Set E
hs : ∀ (i : ι), StarConvex 𝕜 x (s i)
y : E
hy : y ∈ ⋃ i, s i
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ a • x + b • y ∈ ⋃ i, s i

tactic: rw [mem_iUnion] at hy ⊢
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : SMul 𝕜 E
inst✝ : SMul 𝕜 F
x : E
s✝ t : Set E
ι : Sort u_4
s : ι → Set E
hs : ∀ (i : ι), StarConvex 𝕜 x (s i)
y : E
hy : y ∈ ⋃ i, s i
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ a • x + b • y ∈ ⋃ i, s i
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : SMul 𝕜 E
inst✝ : SMul 𝕜 F
x : E
s✝ t : Set E
ι : Sort u_4
s : ι → Set E
hs : ∀ (i : ι), StarConvex 𝕜 x (s i)
y : E
hy : ∃ i, y ∈ s i
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ ∃ i, a • x + b • y ∈ s i

tactic: obtain ⟨i, hy⟩ := hy
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : SMul 𝕜 E
inst✝ : SMul 𝕜 F
x : E
s✝ t : Set E
ι : Sort u_4
s : ι → Set E
hs : ∀ (i : ι), StarConvex 𝕜 x (s i)
y : E
hy : ∃ i, y ∈ s i
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
⊢ ∃ i, a • x + b • y ∈ s i
state_after: case intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : SMul 𝕜 E
inst✝ : SMul 𝕜 F
x : E
s✝ t : Set E
ι : Sort u_4
s : ι → Set E
hs : ∀ (i : ι), StarConvex 𝕜 x (s i)
y : E
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
i : ι
hy : y ∈ s i
⊢ ∃ i, a • x + b • y ∈ s i

tactic: exact ⟨i, hs i hy ha hb hab⟩
state_before: case intro
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : OrderedSemiring 𝕜
inst✝³ : AddCommMonoid E
inst✝² : AddCommMonoid F
inst✝¹ : SMul 𝕜 E
inst✝ : SMul 𝕜 F
x : E
s✝ t : Set E
ι : Sort u_4
s : ι → Set E
hs : ∀ (i : ι), StarConvex 𝕜 x (s i)
y : E
a b : 𝕜
ha : 0 ≤ a
hb : 0 ≤ b
hab : a + b = 1
i : ι
hy : y ∈ s i
⊢ ∃ i, a • x + b • y ∈ s i
state_after: no goals
Theorem: WeierstrassCurve.Affine.CoordinateRing.coe_norm_smul_basis
File: Mathlib/AlgebraicGeometry/EllipticCurve/Group.lean

tactic: simp only [norm_smul_basis, polynomial]
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : Affine R
f : R →+* S
p q : R[X]
⊢ C ((Algebra.norm R[X]) (p • 1 + q • (mk W) Y)) - (C p + C q * Y) * (C p + C q * (-Y - C (C W.a₁ * X + C W.a₃))) =
    W.polynomial * C q ^ 2
state_after: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : Affine R
f : R →+* S
p q : R[X]
⊢ C (p ^ 2 - p * q * (C W.a₁ * X + C W.a₃) - q ^ 2 * (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆)) -
      (C p + C q * Y) * (C p + C q * (-Y - C (C W.a₁ * X + C W.a₃))) =
    (Y ^ 2 + C (C W.a₁ * X + C W.a₃) * Y - C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆)) * C q ^ 2

tactic: C_simp
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : Affine R
f : R →+* S
p q : R[X]
⊢ C (p ^ 2 - p * q * (C W.a₁ * X + C W.a₃) - q ^ 2 * (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆)) -
      (C p + C q * Y) * (C p + C q * (-Y - C (C W.a₁ * X + C W.a₃))) =
    (Y ^ 2 + C (C W.a₁ * X + C W.a₃) * Y - C (X ^ 3 + C W.a₂ * X ^ 2 + C W.a₄ * X + C W.a₆)) * C q ^ 2
state_after: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : Affine R
f : R →+* S
p q : R[X]
⊢ C p ^ 2 - C p * C q * (C (C W.a₁) * C X + C (C W.a₃)) -
        C q ^ 2 * (C X ^ 3 + C (C W.a₂) * C X ^ 2 + C (C W.a₄) * C X + C (C W.a₆)) -
      (C p + C q * Y) * (C p + C q * (-Y - (C (C W.a₁) * C X + C (C W.a₃)))) =
    (Y ^ 2 + (C (C W.a₁) * C X + C (C W.a₃)) * Y - (C X ^ 3 + C (C W.a₂) * C X ^ 2 + C (C W.a₄) * C X + C (C W.a₆))) *
      C q ^ 2

tactic: ring1
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : Affine R
f : R →+* S
p q : R[X]
⊢ C p ^ 2 - C p * C q * (C (C W.a₁) * C X + C (C W.a₃)) -
        C q ^ 2 * (C X ^ 3 + C (C W.a₂) * C X ^ 2 + C (C W.a₄) * C X + C (C W.a₆)) -
      (C p + C q * Y) * (C p + C q * (-Y - (C (C W.a₁) * C X + C (C W.a₃)))) =
    (Y ^ 2 + (C (C W.a₁) * C X + C (C W.a₃)) * Y - (C X ^ 3 + C (C W.a₂) * C X ^ 2 + C (C W.a₄) * C X + C (C W.a₆))) *
      C q ^ 2
state_after: no goals
Theorem: Turing.fun_respects
File: Mathlib/Computability/TuringMachine.lean

tactic: cases f₁ a₁ <;> simp only [FRespects, Respects, exists_eq_left', forall_eq']
state_before: σ₁ : Type u_1
σ₂ : Type u_2
f₁ : σ₁ → Option σ₁
f₂ : σ₂ → Option σ₂
tr : σ₁ → σ₂
a₁ : σ₁
⊢ (∀ ⦃a₂ : σ₂⦄,
      (fun a b => tr a = b) a₁ a₂ →
        match f₁ a₁ with
        | some b₁ => ∃ b₂, (fun a b => tr a = b) b₁ b₂ ∧ Reaches₁ f₂ a₂ b₂
        | none => f₂ a₂ = none) ↔
    FRespects f₂ tr (tr a₁) (f₁ a₁)
state_after: no goals
Theorem: SetTheory.PGame.zero_lt_neg_iff
File: Mathlib/SetTheory/Game/PGame.lean

tactic: rw [lt_neg_iff, neg_zero]
state_before: xl xr : Type u
x : PGame
⊢ 0 < -x ↔ x < 0
state_after: no goals
Theorem: MeasureTheory.AEEqFun.coeFn_abs
File: Mathlib/MeasureTheory/Function/AEEqFun.lean

tactic: simp_rw [abs]
state_before: α : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁸ : MeasurableSpace α
μ ν : Measure α
inst✝⁷ : TopologicalSpace β✝
inst✝⁶ : TopologicalSpace γ
inst✝⁵ : TopologicalSpace δ
β : Type u_5
inst✝⁴ : TopologicalSpace β
inst✝³ : Lattice β
inst✝² : TopologicalLattice β
inst✝¹ : AddGroup β
inst✝ : TopologicalAddGroup β
f : α →ₘ[μ] β
⊢ ↑|f| =ᶠ[ae μ] fun x => |↑f x|
state_after: α : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁸ : MeasurableSpace α
μ ν : Measure α
inst✝⁷ : TopologicalSpace β✝
inst✝⁶ : TopologicalSpace γ
inst✝⁵ : TopologicalSpace δ
β : Type u_5
inst✝⁴ : TopologicalSpace β
inst✝³ : Lattice β
inst✝² : TopologicalLattice β
inst✝¹ : AddGroup β
inst✝ : TopologicalAddGroup β
f : α →ₘ[μ] β
⊢ ↑(f ⊔ -f) =ᶠ[ae μ] fun x => ↑f x ⊔ -↑f x

tactic: filter_upwards [AEEqFun.coeFn_sup f (-f), AEEqFun.coeFn_neg f] with x hx_sup hx_neg
state_before: α : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁸ : MeasurableSpace α
μ ν : Measure α
inst✝⁷ : TopologicalSpace β✝
inst✝⁶ : TopologicalSpace γ
inst✝⁵ : TopologicalSpace δ
β : Type u_5
inst✝⁴ : TopologicalSpace β
inst✝³ : Lattice β
inst✝² : TopologicalLattice β
inst✝¹ : AddGroup β
inst✝ : TopologicalAddGroup β
f : α →ₘ[μ] β
⊢ ↑(f ⊔ -f) =ᶠ[ae μ] fun x => ↑f x ⊔ -↑f x
state_after: case h
α : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁸ : MeasurableSpace α
μ ν : Measure α
inst✝⁷ : TopologicalSpace β✝
inst✝⁶ : TopologicalSpace γ
inst✝⁵ : TopologicalSpace δ
β : Type u_5
inst✝⁴ : TopologicalSpace β
inst✝³ : Lattice β
inst✝² : TopologicalLattice β
inst✝¹ : AddGroup β
inst✝ : TopologicalAddGroup β
f : α →ₘ[μ] β
x : α
hx_sup : ↑(f ⊔ -f) x = ↑f x ⊔ ↑(-f) x
hx_neg : ↑(-f) x = (-↑f) x
⊢ ↑(f ⊔ -f) x = ↑f x ⊔ -↑f x

tactic: rw [hx_sup, hx_neg, Pi.neg_apply]
state_before: case h
α : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁸ : MeasurableSpace α
μ ν : Measure α
inst✝⁷ : TopologicalSpace β✝
inst✝⁶ : TopologicalSpace γ
inst✝⁵ : TopologicalSpace δ
β : Type u_5
inst✝⁴ : TopologicalSpace β
inst✝³ : Lattice β
inst✝² : TopologicalLattice β
inst✝¹ : AddGroup β
inst✝ : TopologicalAddGroup β
f : α →ₘ[μ] β
x : α
hx_sup : ↑(f ⊔ -f) x = ↑f x ⊔ ↑(-f) x
hx_neg : ↑(-f) x = (-↑f) x
⊢ ↑(f ⊔ -f) x = ↑f x ⊔ -↑f x
state_after: no goals
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 / ↑n.factorial * (r₁ - r₂)
state_after: no goals
Theorem: TopologicalSemiring.continuousNeg_of_mul
File: Mathlib/Topology/Algebra/Ring/Basic.lean

tactic: simpa using (continuous_const.mul continuous_id : Continuous fun x : α => -1 * x)
state_before: α : Type u_1
inst✝² : TopologicalSpace α
inst✝¹ : NonAssocRing α
inst✝ : ContinuousMul α
⊢ Continuous fun a => -a
state_after: no goals
Theorem: Cardinal.one_eq_lift_iff
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: simpa using nat_eq_lift_iff (n := 1)
state_before: α β : Type u
a : Cardinal.{u}
⊢ 1 = lift.{v, u} a ↔ 1 = a
state_after: no goals
Theorem: BoxIntegral.HasIntegral.add
File: Mathlib/Analysis/BoxIntegral/Basic.lean

tactic: simpa only [HasIntegral, ← integralSum_add] using h.add h'
state_before: ι : Type u
E : Type v
F : Type w
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace ℝ E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
I J : Box ι
π : TaggedPrepartition I
inst✝ : Fintype ι
l : IntegrationParams
f g : (ι → ℝ) → E
vol : ι →ᵇᵃ[⊤] E →L[ℝ] F
y y' : F
h : HasIntegral I l f vol y
h' : HasIntegral I l g vol y'
⊢ HasIntegral I l (f + g) vol (y + y')
state_after: no goals
Theorem: Orientation.oangle_sign_sub_smul_right
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean

tactic: rw [sub_eq_add_neg, ← neg_smul, add_comm, oangle_sign_smul_add_right]
state_before: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y : V
r : ℝ
⊢ (o.oangle x (y - r • x)).sign = (o.oangle x y).sign
state_after: no goals
Theorem: Nat.Partrec.Code.evaln_bound
File: Mathlib/Computability/PartrecCode.lean

tactic: simp [evaln] at h
state_before: c : Code
n x : ℕ
h : x ∈ evaln 0 c n
⊢ n < 0
state_after: no goals

tactic: suffices ∀ {o : Option ℕ}, x ∈ do { guard (n ≤ k); o } → n < k + 1 by
  cases c <;> rw [evaln] at h <;> exact this h
state_before: k : ℕ
c : Code
n x : ℕ
h : x ∈ evaln (k + 1) c n
⊢ n < k + 1
state_after: k : ℕ
c : Code
n x : ℕ
h : x ∈ evaln (k + 1) c n
⊢ ∀ {o : Option ℕ},
    (x ∈ do
        guard (n ≤ k)
        o) →
      n < k + 1

tactic: simpa [Option.bind_eq_some] using Nat.lt_succ_of_le
state_before: k : ℕ
c : Code
n x : ℕ
h : x ∈ evaln (k + 1) c n
⊢ ∀ {o : Option ℕ},
    (x ∈ do
        guard (n ≤ k)
        o) →
      n < k + 1
state_after: no goals

tactic: cases c <;> rw [evaln] at h <;> exact this h
state_before: k : ℕ
c : Code
n x : ℕ
h : x ∈ evaln (k + 1) c n
this :
  ∀ {o : Option ℕ},
    (x ∈ do
        guard (n ≤ k)
        o) →
      n < k + 1
⊢ n < k + 1
state_after: no goals
Theorem: norm_add_sq_eq_norm_sq_add_norm_sq_iff_real_inner_eq_zero
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: rw [@norm_add_mul_self ℝ, add_right_cancel_iff, add_right_eq_self, mul_eq_zero]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : _root_.RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
x y : F
⊢ ‖x + y‖ * ‖x + y‖ = ‖x‖ * ‖x‖ + ‖y‖ * ‖y‖ ↔ ⟪x, y⟫_ℝ = 0
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : _root_.RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
x y : F
⊢ 2 = 0 ∨ re ⟪x, y⟫_ℝ = 0 ↔ ⟪x, y⟫_ℝ = 0

tactic: norm_num
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : _root_.RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
x y : F
⊢ 2 = 0 ∨ re ⟪x, y⟫_ℝ = 0 ↔ ⟪x, y⟫_ℝ = 0
state_after: no goals