1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: eq_orthogonalProjection_of_mem_orthogonal'
File: Mathlib/Analysis/InnerProductSpace/Projection.lean

tactic: simpa [hu]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁵ : _root_.RCLike 𝕜
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedAddCommGroup F
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : InnerProductSpace ℝ F
K : Submodule 𝕜 E
inst✝ : HasOrthogonalProjection K
u v z : E
hv : v ∈ K
hz : z ∈ Kᗮ
hu : u = v + z
⊢ u - v ∈ Kᗮ
state_after: no goals
Theorem: MeasureTheory.integrable_llr_tilted_left
File: Mathlib/MeasureTheory/Measure/LogLikelihoodRatio.lean

tactic: rw [integrable_congr (llr_tilted_left hμν hfμ hfν)]
state_before: α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : IsFiniteMeasure μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable f μ
h_int : Integrable (llr μ ν) μ
hfμ : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
⊢ Integrable (llr (μ.tilted f) ν) μ
state_after: α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : IsFiniteMeasure μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable f μ
h_int : Integrable (llr μ ν) μ
hfμ : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
⊢ Integrable (fun x => f x - log (∫ (z : α), rexp (f z) ∂μ) + llr μ ν x) μ

tactic: exact Integrable.add (hf.sub (integrable_const _)) h_int
state_before: α : Type u_1
mα : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
inst✝¹ : IsFiniteMeasure μ
inst✝ : SigmaFinite ν
hμν : μ ≪ ν
hf : Integrable f μ
h_int : Integrable (llr μ ν) μ
hfμ : Integrable (fun x => rexp (f x)) μ
hfν : AEMeasurable f ν
⊢ Integrable (fun x => f x - log (∫ (z : α), rexp (f z) ∂μ) + llr μ ν x) μ
state_after: no goals
Theorem: SModEq.sub_mem
File: Mathlib/LinearAlgebra/SModEq.lean

tactic: rw [SModEq.def, Submodule.Quotient.eq]
state_before: R : Type u_1
inst✝⁵ : Ring R
A : Type u_2
inst✝⁴ : CommRing A
M : Type u_3
inst✝³ : AddCommGroup M
inst✝² : Module R M
U U₁ U₂ : Submodule R M
x x₁ x₂ y y₁ y₂ z z₁ z₂ : M
N : Type u_4
inst✝¹ : AddCommGroup N
inst✝ : Module R N
V V₁ V₂ : Submodule R N
⊢ x ≡ y [SMOD U] ↔ x - y ∈ U
state_after: no goals
Theorem: Convex.smul_mem_of_zero_mem
File: Mathlib/Analysis/Convex/Basic.lean

tactic: simpa using hs.add_smul_mem zero_mem (by simpa using hx) ht
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
β : Type u_4
inst✝⁴ : OrderedRing 𝕜
inst✝³ : AddCommGroup E
inst✝² : AddCommGroup F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s t✝ : Set E
hs : Convex 𝕜 s
x : E
zero_mem : 0 ∈ s
hx : x ∈ s
t : 𝕜
ht : t ∈ Icc 0 1
⊢ t • x ∈ s
state_after: no goals

tactic: simpa using hx
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
β : Type u_4
inst✝⁴ : OrderedRing 𝕜
inst✝³ : AddCommGroup E
inst✝² : AddCommGroup F
inst✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 F
s t✝ : Set E
hs : Convex 𝕜 s
x : E
zero_mem : 0 ∈ s
hx : x ∈ s
t : 𝕜
ht : t ∈ Icc 0 1
⊢ 0 + x ∈ s
state_after: no goals
Theorem: Matroid.map_freeOn
File: Mathlib/Data/Matroid/Map.lean

tactic: rw [← dual_inj]
state_before: α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M : Matroid α
N : Matroid β
f : α → β
hf : InjOn f (freeOn E).E
⊢ (freeOn E).map f hf = freeOn (f '' E)
state_after: α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M : Matroid α
N : Matroid β
f : α → β
hf : InjOn f (freeOn E).E
⊢ ((freeOn E).map f hf)✶ = (freeOn (f '' E))✶

tactic: simp
state_before: α : Type u_1
β : Type u_2
f✝ : α → β
E I s : Set α
M : Matroid α
N : Matroid β
f : α → β
hf : InjOn f (freeOn E).E
⊢ ((freeOn E).map f hf)✶ = (freeOn (f '' E))✶
state_after: no goals
Theorem: Affine.Simplex.sum_reflectionCircumcenterWeightsWithCircumcenter
File: Mathlib/Geometry/Euclidean/Circumcenter.lean

tactic: simp_rw [sum_pointsWithCircumcenter, reflectionCircumcenterWeightsWithCircumcenter, sum_ite,
  sum_const, filter_or, filter_eq']
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
i₁ i₂ : Fin (n + 1)
h : i₁ ≠ i₂
⊢ ∑ i : PointsWithCircumcenterIndex n, reflectionCircumcenterWeightsWithCircumcenter i₁ i₂ i = 1
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
i₁ i₂ : Fin (n + 1)
h : i₁ ≠ i₂
⊢ ((if i₁ ∈ univ then {i₁} else ∅) ∪ if i₂ ∈ univ then {i₂} else ∅).card • 1 +
        (filter (fun x => ¬(x = i₁ ∨ x = i₂)) univ).card • 0 +
      -1 =
    1

tactic: rw [card_union_of_disjoint]
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
i₁ i₂ : Fin (n + 1)
h : i₁ ≠ i₂
⊢ ((if i₁ ∈ univ then {i₁} else ∅) ∪ if i₂ ∈ univ then {i₂} else ∅).card • 1 +
        (filter (fun x => ¬(x = i₁ ∨ x = i₂)) univ).card • 0 +
      -1 =
    1
state_after: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
i₁ i₂ : Fin (n + 1)
h : i₁ ≠ i₂
⊢ ((if i₁ ∈ univ then {i₁} else ∅).card + (if i₂ ∈ univ then {i₂} else ∅).card) • 1 +
        (filter (fun x => ¬(x = i₁ ∨ x = i₂)) univ).card • 0 +
      -1 =
    1

V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
i₁ i₂ : Fin (n + 1)
h : i₁ ≠ i₂
⊢ Disjoint (if i₁ ∈ univ then {i₁} else ∅) (if i₂ ∈ univ then {i₂} else ∅)

tactic: set_option simprocs false in simp
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
i₁ i₂ : Fin (n + 1)
h : i₁ ≠ i₂
⊢ ((if i₁ ∈ univ then {i₁} else ∅).card + (if i₂ ∈ univ then {i₂} else ∅).card) • 1 +
        (filter (fun x => ¬(x = i₁ ∨ x = i₂)) univ).card • 0 +
      -1 =
    1
state_after: no goals

tactic: simp
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
i₁ i₂ : Fin (n + 1)
h : i₁ ≠ i₂
⊢ ((if i₁ ∈ univ then {i₁} else ∅).card + (if i₂ ∈ univ then {i₂} else ∅).card) • 1 +
        (filter (fun x => ¬(x = i₁ ∨ x = i₂)) univ).card • 0 +
      -1 =
    1
state_after: no goals

tactic: simpa only [if_true, mem_univ, disjoint_singleton] using h
state_before: V : Type u_1
P : Type u_2
inst✝³ : NormedAddCommGroup V
inst✝² : InnerProductSpace ℝ V
inst✝¹ : MetricSpace P
inst✝ : NormedAddTorsor V P
n : ℕ
i₁ i₂ : Fin (n + 1)
h : i₁ ≠ i₂
⊢ Disjoint (if i₁ ∈ univ then {i₁} else ∅) (if i₂ ∈ univ then {i₂} else ∅)
state_after: no goals
Theorem: convexJoin_iUnion_right
File: Mathlib/Analysis/Convex/Join.lean

tactic: simp_rw [convexJoin_comm s, convexJoin_iUnion_left]
state_before: ι : Sort u_1
𝕜 : Type u_2
E : Type u_3
inst✝² : OrderedSemiring 𝕜
inst✝¹ : AddCommMonoid E
inst✝ : Module 𝕜 E
s✝ t✝ s₁ s₂ t₁ t₂ u : Set E
x y : E
s : Set E
t : ι → Set E
⊢ convexJoin 𝕜 s (⋃ i, t i) = ⋃ i, convexJoin 𝕜 s (t i)
state_after: no goals
Theorem: CategoryTheory.Arrow.hom_inv_id_left
File: Mathlib/CategoryTheory/Comma/Arrow.lean

tactic: rw [← comp_left, e.hom_inv_id, id_left]
state_before: T : Type u
inst✝ : Category.{v, u} T
f g : Arrow T
sq : f ⟶ g
e : f ≅ g
⊢ e.hom.left ≫ e.inv.left = 𝟙 f.left
state_after: no goals
Theorem: BoxIntegral.integralSum_neg
File: Mathlib/Analysis/BoxIntegral/Basic.lean

tactic: simp only [integralSum, Pi.neg_apply, (vol _).map_neg, Finset.sum_neg_distrib]
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
f : (ι → ℝ) → E
vol : ι →ᵇᵃ[⊤] E →L[ℝ] F
π : TaggedPrepartition I
⊢ integralSum (-f) vol π = -integralSum f vol π
state_after: no goals
Theorem: CategoryTheory.Limits.isKernelCompMono_lift
File: Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean

tactic: rw [← cancel_mono g, Category.assoc, ← hh]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
c : KernelFork f
i : IsLimit c
Z : C
g : Y ⟶ Z
hg : Mono g
h : X ⟶ Z
hh : h = f ≫ g
s : KernelFork h
⊢ Fork.ι s ≫ f = Fork.ι s ≫ 0
state_after: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
c : KernelFork f
i : IsLimit c
Z : C
g : Y ⟶ Z
hg : Mono g
h : X ⟶ Z
hh : h = f ≫ g
s : KernelFork h
⊢ Fork.ι s ≫ h = (Fork.ι s ≫ 0) ≫ g

tactic: simp
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
c : KernelFork f
i : IsLimit c
Z : C
g : Y ⟶ Z
hg : Mono g
h : X ⟶ Z
hh : h = f ≫ g
s : KernelFork h
⊢ Fork.ι s ≫ h = (Fork.ι s ≫ 0) ≫ g
state_after: no goals
Theorem: EisensteinSeries.eisensteinSeries_slash_apply
File: Mathlib/NumberTheory/ModularForms/EisensteinSeries/Basic.lean

tactic: ext1 z
state_before: N : ℕ
a : Fin 2 → ZMod N
k : ℤ
γ : SL(2, ℤ)
⊢ eisensteinSeries a k ∣[k] γ = eisensteinSeries (a ᵥ* ↑((SpecialLinearGroup.map (Int.castRingHom (ZMod N))) γ)) k
state_after: case h
N : ℕ
a : Fin 2 → ZMod N
k : ℤ
γ : SL(2, ℤ)
z : ℍ
⊢ (eisensteinSeries a k ∣[k] γ) z = eisensteinSeries (a ᵥ* ↑((SpecialLinearGroup.map (Int.castRingHom (ZMod N))) γ)) k z

tactic: simp_rw [SL_slash, slash_def, slash, ModularGroup.det_coe', ofReal_one, one_zpow, mul_one,
  zpow_neg, mul_inv_eq_iff_eq_mul₀ (zpow_ne_zero _ <| z.denom_ne_zero _), mul_comm,
  eisensteinSeries, ← ModularGroup.sl_moeb, eisSummand_SL2_apply, tsum_mul_left]
state_before: case h
N : ℕ
a : Fin 2 → ZMod N
k : ℤ
γ : SL(2, ℤ)
z : ℍ
⊢ (eisensteinSeries a k ∣[k] γ) z = eisensteinSeries (a ᵥ* ↑((SpecialLinearGroup.map (Int.castRingHom (ZMod N))) γ)) k z
state_after: case h
N : ℕ
a : Fin 2 → ZMod N
k : ℤ
γ : SL(2, ℤ)
z : ℍ
⊢ denom (↑γ) z ^ k * ∑' (x : ↑(gammaSet N a)), eisSummand k (↑x ᵥ* ↑γ) z =
    denom (↑γ) z ^ k *
      ∑' (x : ↑(gammaSet N (a ᵥ* ↑((SpecialLinearGroup.map (Int.castRingHom (ZMod N))) γ)))), eisSummand k (↑x) z
Theorem: LaurentPolynomial.invert_C
File: Mathlib/Algebra/Polynomial/Laurent.lean

tactic: ext
state_before: R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
t : R
⊢ invert (C t) = C t
state_after: case h
R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
t : R
a✝ : ℤ
⊢ (invert (C t)) a✝ = (C t) a✝

tactic: simp
state_before: case h
R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
t : R
a✝ : ℤ
⊢ (invert (C t)) a✝ = (C t) a✝
state_after: no goals
Theorem: one_div_le_of_neg
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: simpa using inv_le_of_neg ha hb
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedField α
a b c d : α
n : ℤ
ha : a < 0
hb : b < 0
⊢ 1 / a ≤ b ↔ 1 / b ≤ a
state_after: no goals
Theorem: LinearMap.range_mkQ_comp
File: Mathlib/LinearAlgebra/Quotient.lean

tactic: simp
state_before: R : Type u_1
M : Type u_2
R₂ : Type u_3
M₂ : Type u_4
R₃ : Type u_5
M₃ : Type u_6
inst✝¹⁰ : Ring R
inst✝⁹ : Ring R₂
inst✝⁸ : Ring R₃
inst✝⁷ : AddCommMonoid M
inst✝⁶ : AddCommGroup M₂
inst✝⁵ : AddCommMonoid M₃
inst✝⁴ : Module R M
inst✝³ : Module R₂ M₂
inst✝² : Module R₃ M₃
τ₁₂ : R →+* R₂
τ₂₃ : R₂ →+* R₃
τ₁₃ : R →+* R₃
inst✝¹ : RingHomCompTriple τ₁₂ τ₂₃ τ₁₃
inst✝ : RingHomSurjective τ₁₂
f : M →ₛₗ[τ₁₂] M₂
x : M
⊢ ((range f).mkQ.comp f) x = 0 x
state_after: no goals
Theorem: ProbabilityTheory.kernel.density_fst_univ
File: Mathlib/Probability/Kernel/Disintegration/Density.lean

tactic: have h := fun n ↦ densityProcess_fst_univ_ae κ n a
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ✝ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
κ : ↥(kernel α (γ × β))
inst✝ : IsFiniteKernel κ
a : α
⊢ ∀ᵐ (x : γ) ∂(fst κ) a, density κ (fst κ) a x univ = 1
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ✝ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
κ : ↥(kernel α (γ × β))
inst✝ : IsFiniteKernel κ
a : α
h : ∀ (n : ℕ), ∀ᵐ (x : γ) ∂(fst κ) a, densityProcess κ (fst κ) n a x univ = 1
⊢ ∀ᵐ (x : γ) ∂(fst κ) a, density κ (fst κ) a x univ = 1

tactic: rw [← ae_all_iff] at h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ✝ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
κ : ↥(kernel α (γ × β))
inst✝ : IsFiniteKernel κ
a : α
h : ∀ (n : ℕ), ∀ᵐ (x : γ) ∂(fst κ) a, densityProcess κ (fst κ) n a x univ = 1
⊢ ∀ᵐ (x : γ) ∂(fst κ) a, density κ (fst κ) a x univ = 1
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ✝ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
κ : ↥(kernel α (γ × β))
inst✝ : IsFiniteKernel κ
a : α
h : ∀ᵐ (a_1 : γ) ∂(fst κ) a, ∀ (i : ℕ), densityProcess κ (fst κ) i a a_1 univ = 1
⊢ ∀ᵐ (x : γ) ∂(fst κ) a, density κ (fst κ) a x univ = 1

tactic: filter_upwards [h] with x hx
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ✝ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
κ : ↥(kernel α (γ × β))
inst✝ : IsFiniteKernel κ
a : α
h : ∀ᵐ (a_1 : γ) ∂(fst κ) a, ∀ (i : ℕ), densityProcess κ (fst κ) i a a_1 univ = 1
⊢ ∀ᵐ (x : γ) ∂(fst κ) a, density κ (fst κ) a x univ = 1
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ✝ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
κ : ↥(kernel α (γ × β))
inst✝ : IsFiniteKernel κ
a : α
h : ∀ᵐ (a_1 : γ) ∂(fst κ) a, ∀ (i : ℕ), densityProcess κ (fst κ) i a a_1 univ = 1
x : γ
hx : ∀ (i : ℕ), densityProcess κ (fst κ) i a x univ = 1
⊢ density κ (fst κ) a x univ = 1

tactic: simp [density, hx]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝¹ : CountablyGenerated γ
κ✝ : ↥(kernel α (γ × β))
ν : ↥(kernel α γ)
κ : ↥(kernel α (γ × β))
inst✝ : IsFiniteKernel κ
a : α
h : ∀ᵐ (a_1 : γ) ∂(fst κ) a, ∀ (i : ℕ), densityProcess κ (fst κ) i a a_1 univ = 1
x : γ
hx : ∀ (i : ℕ), densityProcess κ (fst κ) i a x univ = 1
⊢ density κ (fst κ) a x univ = 1
state_after: no goals
Theorem: MeasureTheory.Content.sup_disjoint
File: Mathlib/MeasureTheory/Measure/Content.lean

tactic: simp [apply_eq_coe_toFun, μ.sup_disjoint' _ _ h]
state_before: G : Type w
inst✝ : TopologicalSpace G
μ : Content G
K₁ K₂ : Compacts G
h : Disjoint ↑K₁ ↑K₂
h₁ : IsClosed ↑K₁
h₂ : IsClosed ↑K₂
⊢ (fun s => ↑(μ.toFun s)) (K₁ ⊔ K₂) = (fun s => ↑(μ.toFun s)) K₁ + (fun s => ↑(μ.toFun s)) K₂
state_after: no goals
Theorem: Nat.Partrec.Code.eval_prec_zero
File: Mathlib/Computability/PartrecCode.lean

tactic: rw [eval, Nat.unpaired, Nat.unpair_pair]
state_before: cf cg : Code
a : ℕ
⊢ (cf.prec cg).eval (Nat.pair a 0) = cf.eval a
state_after: cf cg : Code
a : ℕ
⊢ Nat.rec (cf.eval (a, 0).1)
      (fun y IH => do
        let i ← IH
        cg.eval (Nat.pair (a, 0).1 (Nat.pair y i)))
      (a, 0).2 =
    cf.eval a

tactic: simp (config := { Lean.Meta.Simp.neutralConfig with proj := true }) only []
state_before: cf cg : Code
a : ℕ
⊢ Nat.rec (cf.eval (a, 0).1)
      (fun y IH => do
        let i ← IH
        cg.eval (Nat.pair (a, 0).1 (Nat.pair y i)))
      (a, 0).2 =
    cf.eval a
state_after: cf cg : Code
a : ℕ
⊢ Nat.rec (cf.eval a)
      (fun y IH => do
        let i ← IH
        cg.eval (Nat.pair a (Nat.pair y i)))
      0 =
    cf.eval a

tactic: rw [Nat.rec_zero]
state_before: cf cg : Code
a : ℕ
⊢ Nat.rec (cf.eval a)
      (fun y IH => do
        let i ← IH
        cg.eval (Nat.pair a (Nat.pair y i)))
      0 =
    cf.eval a
state_after: no goals
Theorem: PFun.mem_prodMap
File: Mathlib/Data/PFun.lean

tactic: trans ∃ hp hq, (f x.1).get hp = y.1 ∧ (g x.2).get hq = y.2
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ι : Type u_6
f✝ : α →. β
f : α →. γ
g : β →. δ
x : α × β
y : γ × δ
⊢ y ∈ f.prodMap g x ↔ y.1 ∈ f x.1 ∧ y.2 ∈ g x.2
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ι : Type u_6
f✝ : α →. β
f : α →. γ
g : β →. δ
x : α × β
y : γ × δ
⊢ y ∈ f.prodMap g x ↔ ∃ (hp : (f x.1).Dom) (hq : (g x.2).Dom), (f x.1).get hp = y.1 ∧ (g x.2).get hq = y.2

α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ι : Type u_6
f✝ : α →. β
f : α →. γ
g : β →. δ
x : α × β
y : γ × δ
⊢ (∃ (hp : (f x.1).Dom) (hq : (g x.2).Dom), (f x.1).get hp = y.1 ∧ (g x.2).get hq = y.2) ↔ y.1 ∈ f x.1 ∧ y.2 ∈ g x.2

tactic: simp only [prodMap, Part.mem_mk_iff, And.exists, Prod.ext_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ι : Type u_6
f✝ : α →. β
f : α →. γ
g : β →. δ
x : α × β
y : γ × δ
⊢ y ∈ f.prodMap g x ↔ ∃ (hp : (f x.1).Dom) (hq : (g x.2).Dom), (f x.1).get hp = y.1 ∧ (g x.2).get hq = y.2
state_after: no goals
Theorem: CategoryTheory.Limits.kernelSubobject_factors_iff
File: Mathlib/CategoryTheory/Subobject/Limits.lean

tactic: rw [← Subobject.factorThru_arrow _ _ w, Category.assoc, kernelSubobject_arrow_comp,
  comp_zero]
state_before: C : Type u
inst✝² : Category.{v, u} C
X Y Z : C
inst✝¹ : HasZeroMorphisms C
f : X ⟶ Y
inst✝ : HasKernel f
W : C
h : W ⟶ X
w : (kernelSubobject f).Factors h
⊢ h ≫ f = 0
state_after: no goals
Theorem: EuclideanDomain.dvd_lcm_left
File: Mathlib/Algebra/EuclideanDomain/Basic.lean

tactic: rw [lcm, hxy, div_zero]
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
x y : R
hxy : gcd x y = 0
⊢ x ∣ lcm x y
state_after: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
x y : R
hxy : gcd x y = 0
⊢ x ∣ 0

tactic: exact dvd_zero _
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
x y : R
hxy : gcd x y = 0
⊢ x ∣ 0
state_after: no goals

tactic: rw [mul_right_comm, mul_assoc, ← hz]
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
x y : R
hxy : ¬gcd x y = 0
z : R
hz : y = gcd x y * z
⊢ x * z * gcd x y = x * y
state_after: no goals
Theorem: padicValRat.of_nat
File: Mathlib/NumberTheory/Padics/PadicVal.lean

tactic: simp [padicValRat]
state_before: p n : ℕ
⊢ padicValRat p ↑n = ↑(padicValNat p n)
state_after: no goals
Theorem: le_div_iff_of_neg
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rw [← neg_neg c, mul_neg, div_neg, le_neg, div_le_iff (neg_pos.2 hc), neg_mul]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedField α
a b c d : α
n : ℤ
hc : c < 0
⊢ a ≤ b / c ↔ b ≤ a * c
state_after: no goals
Theorem: MeasureTheory.OuterMeasure.iSup_apply
File: Mathlib/MeasureTheory/OuterMeasure/Operations.lean

tactic: rw [iSup, sSup_apply, iSup_range]
state_before: α : Type u_1
β : Type u_2
m : OuterMeasure α
ι : Sort u_3
f : ι → OuterMeasure α
s : Set α
⊢ (⨆ i, f i) s = ⨆ i, (f i) s
state_after: no goals
Theorem: Nat.add_mod_add_of_le_add_mod
File: Mathlib/Data/Nat/ModEq.lean

tactic: rw [← add_mod_add_ite, if_pos hc]
state_before: m n a✝ b✝ c✝ d a b c : ℕ
hc : c ≤ a % c + b % c
⊢ (a + b) % c + c = a % c + b % c
state_after: no goals
Theorem: AffineMap.lineMap_eq_lineMap_iff
File: Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean

tactic: rw [lineMap_apply, lineMap_apply, ← @vsub_eq_zero_iff_eq V1, vadd_vsub_vadd_cancel_right, ←
  sub_smul, smul_eq_zero, sub_eq_zero, vsub_eq_zero_iff_eq, or_comm, eq_comm]
state_before: k : Type u_1
V1 : Type u_2
P1 : Type u_3
V2 : Type u_4
P2 : Type u_5
V3 : Type u_6
P3 : Type u_7
V4 : Type u_8
P4 : Type u_9
inst✝¹³ : Ring k
inst✝¹² : AddCommGroup V1
inst✝¹¹ : Module k V1
inst✝¹⁰ : AffineSpace V1 P1
inst✝⁹ : AddCommGroup V2
inst✝⁸ : Module k V2
inst✝⁷ : AffineSpace V2 P2
inst✝⁶ : AddCommGroup V3
inst✝⁵ : Module k V3
inst✝⁴ : AffineSpace V3 P3
inst✝³ : AddCommGroup V4
inst✝² : Module k V4
inst✝¹ : AffineSpace V4 P4
inst✝ : NoZeroSMulDivisors k V1
p₀ p₁ : P1
c₁ c₂ : k
⊢ (lineMap p₀ p₁) c₁ = (lineMap p₀ p₁) c₂ ↔ p₀ = p₁ ∨ c₁ = c₂
state_after: no goals
Theorem: List.mem_product
File: Mathlib/Data/List/ProdSigma.lean

tactic: simp_all [SProd.sprod, product, mem_bind, mem_map, Prod.ext_iff, exists_prop, and_left_comm,
  exists_and_left, exists_eq_left, exists_eq_right]
state_before: α : Type u_1
β : Type u_2
l₁ : List α
l₂ : List β
a : α
b : β
⊢ (a, b) ∈ l₁ ×ˢ l₂ ↔ a ∈ l₁ ∧ b ∈ l₂
state_after: no goals
Theorem: Polynomial.eq_X_sub_C_of_splits_of_single_root
File: Mathlib/Algebra/Polynomial/Splits.lean

tactic: apply Polynomial.map_injective _ i.injective
state_before: R : Type u_1
F : Type u
K : Type v
L : Type w
inst✝³ : CommRing R
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i : K →+* L
x : K
h : K[X]
h_splits : Splits i h
h_roots : (map i h).roots = {i x}
⊢ h = C h.leadingCoeff * (X - C x)
state_after: case a
R : Type u_1
F : Type u
K : Type v
L : Type w
inst✝³ : CommRing R
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i : K →+* L
x : K
h : K[X]
h_splits : Splits i h
h_roots : (map i h).roots = {i x}
⊢ map i h = map i (C h.leadingCoeff * (X - C x))

tactic: rw [eq_prod_roots_of_splits h_splits, h_roots]
state_before: case a
R : Type u_1
F : Type u
K : Type v
L : Type w
inst✝³ : CommRing R
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i : K →+* L
x : K
h : K[X]
h_splits : Splits i h
h_roots : (map i h).roots = {i x}
⊢ map i h = map i (C h.leadingCoeff * (X - C x))
state_after: case a
R : Type u_1
F : Type u
K : Type v
L : Type w
inst✝³ : CommRing R
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i : K →+* L
x : K
h : K[X]
h_splits : Splits i h
h_roots : (map i h).roots = {i x}
⊢ C (i h.leadingCoeff) * (Multiset.map (fun a => X - C a) {i x}).prod = map i (C h.leadingCoeff * (X - C x))

tactic: simp
state_before: case a
R : Type u_1
F : Type u
K : Type v
L : Type w
inst✝³ : CommRing R
inst✝² : Field K
inst✝¹ : Field L
inst✝ : Field F
i : K →+* L
x : K
h : K[X]
h_splits : Splits i h
h_roots : (map i h).roots = {i x}
⊢ C (i h.leadingCoeff) * (Multiset.map (fun a => X - C a) {i x}).prod = map i (C h.leadingCoeff * (X - C x))
state_after: no goals
Theorem: Nat.Ioc_filter_dvd_card_eq_div
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: induction' n with n IH
state_before: a b m n✝ p✝ n p : ℕ
⊢ (Finset.filter (fun x => p ∣ x) (Ioc 0 n)).card = n / p
state_after: case zero
a b m n p✝ p : ℕ
⊢ (Finset.filter (fun x => p ∣ x) (Ioc 0 0)).card = 0 / p

case succ
a b m n✝ p✝ p n : ℕ
IH : (Finset.filter (fun x => p ∣ x) (Ioc 0 n)).card = n / p
⊢ (Finset.filter (fun x => p ∣ x) (Ioc 0 (n + 1))).card = (n + 1) / p

tactic: simp [Nat.succ_div, add_ite, add_zero, h1, filter_insert, apply_ite card, card_insert_eq_ite, IH,
  Finset.mem_filter, mem_Ioc, not_le.2 (lt_add_one n)]
state_before: case succ
a b m n✝ p✝ p n : ℕ
IH : (Finset.filter (fun x => p ∣ x) (Ioc 0 n)).card = n / p
h1 : Ioc 0 n.succ = insert n.succ (Ioc 0 n)
⊢ (Finset.filter (fun x => p ∣ x) (Ioc 0 (n + 1))).card = (n + 1) / p
state_after: no goals

tactic: simp
state_before: case zero
a b m n p✝ p : ℕ
⊢ (Finset.filter (fun x => p ∣ x) (Ioc 0 0)).card = 0 / p
state_after: no goals

tactic: rcases n.eq_zero_or_pos with (rfl | hn)
state_before: a b m n✝ p✝ p n : ℕ
IH : (Finset.filter (fun x => p ∣ x) (Ioc 0 n)).card = n / p
⊢ Ioc 0 n.succ = insert n.succ (Ioc 0 n)
state_after: case inl
a b m n p✝ p : ℕ
IH : (Finset.filter (fun x => p ∣ x) (Ioc 0 0)).card = 0 / p
⊢ Ioc 0 (succ 0) = insert (succ 0) (Ioc 0 0)

case inr
a b m n✝ p✝ p n : ℕ
IH : (Finset.filter (fun x => p ∣ x) (Ioc 0 n)).card = n / p
hn : n > 0
⊢ Ioc 0 n.succ = insert n.succ (Ioc 0 n)

tactic: simp_rw [← Ico_succ_succ, Ico_insert_right (succ_le_succ hn.le), Ico_succ_right]
state_before: case inr
a b m n✝ p✝ p n : ℕ
IH : (Finset.filter (fun x => p ∣ x) (Ioc 0 n)).card = n / p
hn : n > 0
⊢ Ioc 0 n.succ = insert n.succ (Ioc 0 n)
state_after: no goals

tactic: simp
state_before: case inl
a b m n p✝ p : ℕ
IH : (Finset.filter (fun x => p ∣ x) (Ioc 0 0)).card = 0 / p
⊢ Ioc 0 (succ 0) = insert (succ 0) (Ioc 0 0)
state_after: no goals
Theorem: Algebra.IsAlgebraic.normalClosure_le_iSup_adjoin
File: Mathlib/FieldTheory/NormalClosure.lean

tactic: rw [mem_rootSet_of_ne (minpoly.ne_zero (Algebra.IsIntegral.isIntegral x)), ← hx,
  AlgHom.toRingHom_eq_coe, AlgHom.coe_toRingHom, aeval_algHom_apply, minpoly.aeval, map_zero]
state_before: F : Type u_1
K : Type u_2
L : Type u_3
inst✝⁵ : Field F
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Algebra F K
inst✝¹ : Algebra F L
inst✝ : Algebra.IsAlgebraic F K
f : K →ₐ[F] L
x✝¹ : L
x✝ : x✝¹ ∈ f.fieldRange
x : K
hx : f.toRingHom x = x✝¹
⊢ x✝¹ ∈ (minpoly F x).rootSet L
state_after: no goals