ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Finset.pluennecke_ruzsa_inequality_nsmul_add
File: Mathlib/Combinatorics/Additive/PluenneckeRuzsa.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : CommGroup α
inst✝ : DecidableEq α
A B✝ C : Finset α
hA : A.Nonempty
B : Finset α
n : ℕ
⊢ ↑(B ^ n).card ≤ (↑(A * B).card / ↑A.card) ^ n * ↑A.card
state_after: no goals
tactic: simpa only [_root_.pow_zero, div_one] using pluennecke_ruzsa_inequality_pow_div_pow_mul hA _ _ 0
Theorem: Submonoid.closure_induction_right
File: Mathlib/Algebra/Group/Submonoid/Membership.lean

Proof steps:
state_before: M : Type u_1
A : Type u_2
B : Type u_3
inst✝ : Monoid M
a : M
s : Set M
p : (m : M) → m ∈ closure s → Prop
one : p 1 ⋯
mul_right : ∀ (x : M) (hx : x ∈ closure s) (y : M) (hy : y ∈ s), p x hx → p (x * y) ⋯
x : M
h : x ∈ closure s
m : Mᵐᵒᵖ
hm : m ∈ closure (MulOpposite.unop ⁻¹' s)
⊢ MulOpposite.unop m ∈ closure s
state_after: no goals
tactic: rwa [← op_closure] at hm
state_before: M : Type u_1
A : Type u_2
B : Type u_3
inst✝ : Monoid M
a : M
s : Set M
p : (m : M) → m ∈ closure s → Prop
one : p 1 ⋯
mul_right : ∀ (x : M) (hx : x ∈ closure s) (y : M) (hy : y ∈ s), p x hx → p (x * y) ⋯
x : M
h : x ∈ closure s
⊢ { unop' := x } ∈ closure (MulOpposite.unop ⁻¹' s)
state_after: no goals
tactic: rwa [← op_closure]
Theorem: String.Iterator.ValidFor.out'
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

Proof steps:
state_before: l r : List Char
⊢ { s := { data := l.reverseAux r }, i := { byteIdx := utf8Len l } } =
    { s := { data := l.reverse ++ r }, i := { byteIdx := utf8Len l.reverse } }
state_after: no goals
tactic: simp [List.reverseAux_eq]
Theorem: List.mem_pure
File: Mathlib/Data/List/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
x y : α
⊢ x ∈ pure y ↔ x = y
state_after: no goals
tactic: simp
Theorem: Lagrange.basis_eq_prod_sub_inv_mul_nodal_div
File: Mathlib/LinearAlgebra/Lagrange.lean

Proof steps:
state_before: F : Type u_1
inst✝¹ : Field F
ι : Type u_2
inst✝ : DecidableEq ι
s : Finset ι
v r : ι → F
i : ι
x : F
hi : i ∈ s
⊢ Lagrange.basis s v i = C (nodalWeight s v i) * (nodal s v / (X - C (v i)))
state_after: no goals
tactic: simp_rw [Lagrange.basis, basisDivisor, nodalWeight, prod_mul_distrib, map_prod, ←
    nodal_erase_eq_nodal_div hi, nodal]
Theorem: Matrix.mul_diagonal
File: Mathlib/Data/Matrix/Basic.lean

Proof steps:
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝² : NonUnitalNonAssocSemiring α
inst✝¹ : Fintype n
inst✝ : DecidableEq n
d : n → α
M : Matrix m n α
i : m
j : n
⊢ (M * diagonal d) i j = M i j * d j
state_after: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝² : NonUnitalNonAssocSemiring α
inst✝¹ : Fintype n
inst✝ : DecidableEq n
d : n → α
M : Matrix m n α
i : m
j : n
⊢ (M * (diagonal d)ᵀ) i j = M i j * d j
tactic: rw [← diagonal_transpose]
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝² : NonUnitalNonAssocSemiring α
inst✝¹ : Fintype n
inst✝ : DecidableEq n
d : n → α
M : Matrix m n α
i : m
j : n
⊢ (M * (diagonal d)ᵀ) i j = M i j * d j
state_after: no goals
tactic: apply dotProduct_diagonal
Theorem: Quaternion.mul_imK
File: Mathlib/Algebra/Quaternion.lean

Proof steps:
state_before: S : Type u_1
T : Type u_2
R : Type u_3
inst✝ : CommRing R
r x y z : R
a b c : ℍ[R]
⊢ a.re * b.imK + a.imI * b.imJ - a.imJ * b.imI + a.imK * b.re =
    a.re * b.imK + a.imI * b.imJ - a.imJ * b.imI + a.imK * b.re
state_after: no goals
tactic: simp only [one_mul, neg_mul, sub_eq_add_neg, neg_neg]
Theorem: add_mul_self_eq
File: Mathlib/Algebra/Ring/Defs.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : CommSemiring α
a✝ b✝ c a b : α
⊢ (a + b) * (a + b) = a * a + 2 * a * b + b * b
state_after: no goals
tactic: simp only [two_mul, add_mul, mul_add, add_assoc, mul_comm b]
Theorem: Multiset.count_eq_of_nodup
File: Mathlib/Data/Multiset/Nodup.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s✝ t : Multiset α
a✝ : α
inst✝ : DecidableEq α
a : α
s : Multiset α
d : s.Nodup
⊢ count a s = if a ∈ s then 1 else 0
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s✝ t : Multiset α
a✝ : α
inst✝ : DecidableEq α
a : α
s : Multiset α
d : s.Nodup
h : a ∈ s
⊢ count a s = 1

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s✝ t : Multiset α
a✝ : α
inst✝ : DecidableEq α
a : α
s : Multiset α
d : s.Nodup
h : a ∉ s
⊢ count a s = 0
tactic: split_ifs with h
Theorem: ProbabilityTheory.condDistrib_ae_eq_condexp
File: Mathlib/Probability/Kernel/CondDistrib.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
Ω : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : NormedAddCommGroup F
mα : MeasurableSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
X : α → β
Y : α → Ω
mβ : MeasurableSpace β
s : Set Ω
t : Set β
f : β × Ω → F
hX : Measurable X
hY : Measurable Y
hs : MeasurableSet s
⊢ (fun a => (((condDistrib Y X μ) (X a)) s).toReal) =ᶠ[ae μ]
    μ[(Y ⁻¹' s).indicator fun ω => 1|MeasurableSpace.comap X mβ]
state_after: case refine_1
α : Type u_1
β : Type u_2
Ω : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : NormedAddCommGroup F
mα : MeasurableSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
X : α → β
Y : α → Ω
mβ : MeasurableSpace β
s : Set Ω
t : Set β
f : β × Ω → F
hX : Measurable X
hY : Measurable Y
hs : MeasurableSet s
⊢ Integrable ((Y ⁻¹' s).indicator fun ω => 1) μ

case refine_2
α : Type u_1
β : Type u_2
Ω : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : NormedAddCommGroup F
mα : MeasurableSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
X : α → β
Y : α → Ω
mβ : MeasurableSpace β
s : Set Ω
t : Set β
f : β × Ω → F
hX : Measurable X
hY : Measurable Y
hs : MeasurableSet s
⊢ ∀ (s_1 : Set α), MeasurableSet s_1 → μ s_1 < ⊤ → IntegrableOn (fun a => (((condDistrib Y X μ) (X a)) s).toReal) s_1 μ

case refine_3
α : Type u_1
β : Type u_2
Ω : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : NormedAddCommGroup F
mα : MeasurableSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
X : α → β
Y : α → Ω
mβ : MeasurableSpace β
s : Set Ω
t : Set β
f : β × Ω → F
hX : Measurable X
hY : Measurable Y
hs : MeasurableSet s
⊢ ∀ (s_1 : Set α),
    MeasurableSet s_1 →
      μ s_1 < ⊤ →
        ∫ (x : α) in s_1, (((condDistrib Y X μ) (X x)) s).toReal ∂μ =
          ∫ (x : α) in s_1, (Y ⁻¹' s).indicator (fun ω => 1) x ∂μ

case refine_4
α : Type u_1
β : Type u_2
Ω : Type u_3
F : Type u_4
inst✝⁴ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
inst✝¹ : NormedAddCommGroup F
mα : MeasurableSpace α
μ : Measure α
inst✝ : IsFiniteMeasure μ
X : α → β
Y : α → Ω
mβ : MeasurableSpace β
s : Set Ω
t : Set β
f : β × Ω → F
hX : Measurable X
hY : Measurable Y
hs : MeasurableSet s
⊢ AEStronglyMeasurable' (MeasurableSpace.comap X mβ) (fun a => (((condDistrib Y X μ) (X a)) s).toReal) μ
tactic: refine ae_eq_condexp_of_forall_setIntegral_eq hX.comap_le ?_ ?_ ?_ ?_
Theorem: CategoryTheory.Square.map_f₁₃
File: Mathlib/CategoryTheory/Square.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
sq : Square C
F : C ⥤ D
⊢ F.map sq.f₁₂ ≫ F.map sq.f₂₄ = F.map sq.f₁₃ ≫ F.map sq.f₃₄
state_after: no goals
tactic: simpa using F.congr_map sq.fac
Theorem: Finset.Colex.toColex_image_le_toColex_image
File: Mathlib/Combinatorics/Colex.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
𝒜 𝒜₁ 𝒜₂ : Finset (Finset α)
s t u : Finset α
a b : α
r : ℕ
hf : StrictMono f
⊢ { ofColex := image f s } ≤ { ofColex := image f t } ↔ { ofColex := s } ≤ { ofColex := t }
state_after: no goals
tactic: simp [toColex_le_toColex, hf.le_iff_le, hf.injective.eq_iff]
Theorem: NumberField.Units.dirichletUnitTheorem.sum_logEmbedding_component
File: Mathlib/NumberTheory/NumberField/Units/DirichletTheorem.lean

Proof steps:
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
⊢ ∑ w : { w // w ≠ w₀ }, (logEmbedding K) x w = -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x))
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h :
  Real.log (∏ w : InfinitePlace K, w ((algebraMap (𝓞 K) K) ↑x) ^ w.mult) =
    Real.log ↑|(Algebra.norm ℚ) ((algebraMap (𝓞 K) K) ↑x)|
⊢ ∑ w : { w // w ≠ w₀ }, (logEmbedding K) x w = -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x))
tactic: have h := congr_arg Real.log (prod_eq_abs_norm (x : K))
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h :
  Real.log (∏ w : InfinitePlace K, w ((algebraMap (𝓞 K) K) ↑x) ^ w.mult) =
    Real.log ↑|(Algebra.norm ℚ) ((algebraMap (𝓞 K) K) ↑x)|
⊢ ∑ w : { w // w ≠ w₀ }, (logEmbedding K) x w = -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x))
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : ∑ i : InfinitePlace K, Real.log (i ((algebraMap (𝓞 K) K) ↑x) ^ i.mult) = 0
⊢ ∑ w : { w // w ≠ w₀ }, (logEmbedding K) x w = -↑w₀.mult * Real.log (w₀ ((algebraMap (𝓞 K) K) ↑x))

case hf
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
x : (𝓞 K)ˣ
h : Real.log (∏ w : InfinitePlace K, w ((algebraMap (𝓞 K) K) ↑x) ^ w.mult) = 0
⊢ ∀ x_1 ∈ univ, x_1 ((algebraMap (𝓞 K) K) ↑x) ^ x_1.mult ≠ 0
tactic: rw [Units.norm, Rat.cast_one, Real.log_one, Real.log_prod] at h
Theorem: CochainComplex.mappingCone.ofHom_lift
File: Mathlib/Algebra/Homology/HomotopyCategory/MappingCone.lean

Proof steps:
state_before: C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_3, u_1} C
inst✝³ : Category.{?u.207600, u_2} D
inst✝² : Preadditive C
inst✝¹ : Preadditive D
F G : CochainComplex C ℤ
φ : F ⟶ G
inst✝ : HasHomotopyCofiber φ
K : CochainComplex C ℤ
α : Cocycle K F 1
β : Cochain K G 0
eq : δ 0 1 β + (↑α).comp (Cochain.ofHom φ) ⋯ = 0
⊢ Cochain.ofHom (lift φ α β eq) = liftCochain φ (↑α) β ⋯
state_after: no goals
tactic: simp only [lift, Cocycle.cochain_ofHom_homOf_eq_coe, liftCocycle_coe]
Theorem: Multiset.ndinsert_le
File: Mathlib/Data/Multiset/FinsetOps.lean

Proof steps:
state_before: α : Type u_1
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s t : Multiset α
x✝ : s ≤ t ∧ a ∈ t
l : s ≤ t
m : a ∈ t
h : a ∈ s
⊢ ndinsert a s ≤ t
state_after: no goals
tactic: simp [h, l]
state_before: α : Type u_1
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s t : Multiset α
x✝ : s ≤ t ∧ a ∈ t
l : s ≤ t
m : a ∈ t
h : a ∉ s
⊢ ndinsert a s ≤ t
state_after: α : Type u_1
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s t : Multiset α
x✝ : s ≤ t ∧ a ∈ t
l : s ≤ t
m : a ∈ t
h : a ∉ s
⊢ s ≤ t
tactic: rw [ndinsert_of_not_mem h, ← cons_erase m, cons_le_cons_iff, ← le_cons_of_not_mem h,
          cons_erase m]
state_before: α : Type u_1
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s t : Multiset α
x✝ : s ≤ t ∧ a ∈ t
l : s ≤ t
m : a ∈ t
h : a ∉ s
⊢ s ≤ t
state_after: no goals
tactic: exact l
Theorem: Real.nat_floor_real_sqrt_eq_nat_sqrt
File: Mathlib/Data/Real/Sqrt.lean

Proof steps:
state_before: x✝ y✝ x y : ℝ
a : ℕ
⊢ ⌊√↑a⌋₊ = a.sqrt
state_after: x✝ y✝ x y : ℝ
a : ℕ
⊢ ↑a.sqrt ≤ √↑a ∧ √↑a < ↑a.sqrt + 1
tactic: rw [Nat.floor_eq_iff (sqrt_nonneg a)]
state_before: x✝ y✝ x y : ℝ
a : ℕ
⊢ ↑a.sqrt ≤ √↑a ∧ √↑a < ↑a.sqrt + 1
state_after: no goals
tactic: exact ⟨nat_sqrt_le_real_sqrt, real_sqrt_lt_nat_sqrt_succ⟩
Theorem: ComplexShape.prev_eq_self
File: Mathlib/Algebra/Homology/ComplexShape.lean

Proof steps:
state_before: ι : Type u_1
c : ComplexShape ι
j : ι
hj : ¬c.Rel (c.prev j) j
k : ι
hk' : c.Rel k j
⊢ c.Rel (c.prev j) j
state_after: no goals
tactic: simpa only [c.prev_eq' hk'] using hk'
Theorem: IsometryEquiv.piFinTwo_toFun
File: Mathlib/Topology/MetricSpace/Isometry.lean

Proof steps:
state_before: ι : Type u_1
α✝ : Type u
β : Type v
γ : Type w
inst✝³ : PseudoEMetricSpace α✝
inst✝² : PseudoEMetricSpace β
inst✝¹ : PseudoEMetricSpace γ
α : Fin 2 → Type u_2
inst✝ : (i : Fin 2) → PseudoEMetricSpace (α i)
x hx : (i : Fin 2) → α i
⊢ edist ((piFinTwoEquiv α).toFun x) ((piFinTwoEquiv α).toFun hx) = edist x hx
state_after: no goals
tactic: simp [edist_pi_def, Fin.univ_succ, Prod.edist_eq]
Theorem: NormedAddGroupHom.isQuotientQuotient
File: Mathlib/Analysis/Normed/Group/Quotient.lean

Proof steps:
state_before: M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
m : M
⊢ ‖S.normedMk m‖ = sInf ((fun m_1 => ‖m + m_1‖) '' ↑S.normedMk.ker)
state_after: no goals
tactic: simpa [S.ker_normedMk] using quotient_norm_mk_eq _ m
Theorem: PartENat.withTopEquiv_symm_one
File: Mathlib/Data/Nat/PartENat.lean

Proof steps:
state_before: ⊢ withTopEquiv.symm 1 = 1
state_after: no goals
tactic: simp
Theorem: homeomorphUnitSphereProd_apply_snd_coe
File: Mathlib/Analysis/NormedSpace/SphereNormEquiv.lean

Proof steps:
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : ↑{0}ᶜ
⊢ ‖↑x‖⁻¹ • ↑x ∈ sphere 0 1
state_after: no goals
tactic: rw [mem_sphere_zero_iff_norm, norm_smul, norm_inv, norm_norm,
      inv_mul_cancel (norm_ne_zero_iff.2 x.2)]
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : ↑{0}ᶜ
⊢ ↑((fun x => ⟨↑x.2 • ↑x.1, ⋯⟩) ((fun x => (⟨‖↑x‖⁻¹ • ↑x, ⋯⟩, ⟨‖↑x‖, ⋯⟩)) x)) = ↑x
state_after: no goals
tactic: simp [smul_inv_smul₀ (norm_ne_zero_iff.2 x.2)]
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
hx : x ∈ sphere 0 1
r : ℝ
hr : r ∈ Ioi 0
⊢ (fun x => (⟨‖↑x‖⁻¹ • ↑x, ⋯⟩, ⟨‖↑x‖, ⋯⟩)) ((fun x => ⟨↑x.2 • ↑x.1, ⋯⟩) (⟨x, hx⟩, ⟨r, hr⟩)) = (⟨x, hx⟩, ⟨r, hr⟩)
state_after: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
hx✝ : x ∈ sphere 0 1
hx : ‖x‖ = 1
r : ℝ
hr : r ∈ Ioi 0
⊢ (fun x => (⟨‖↑x‖⁻¹ • ↑x, ⋯⟩, ⟨‖↑x‖, ⋯⟩)) ((fun x => ⟨↑x.2 • ↑x.1, ⋯⟩) (⟨x, hx✝⟩, ⟨r, hr⟩)) = (⟨x, hx✝⟩, ⟨r, hr⟩)
tactic: rw [mem_sphere_zero_iff_norm] at hx
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
hx✝ : x ∈ sphere 0 1
hx : ‖x‖ = 1
r : ℝ
hr : r ∈ Ioi 0
⊢ (fun x => (⟨‖↑x‖⁻¹ • ↑x, ⋯⟩, ⟨‖↑x‖, ⋯⟩)) ((fun x => ⟨↑x.2 • ↑x.1, ⋯⟩) (⟨x, hx✝⟩, ⟨r, hr⟩)) = (⟨x, hx✝⟩, ⟨r, hr⟩)
state_after: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
hx✝ : x ∈ sphere 0 1
hx : ‖x‖ = 1
r : ℝ
hr✝ : r ∈ Ioi 0
hr : 0 < r
⊢ (fun x => (⟨‖↑x‖⁻¹ • ↑x, ⋯⟩, ⟨‖↑x‖, ⋯⟩)) ((fun x => ⟨↑x.2 • ↑x.1, ⋯⟩) (⟨x, hx✝⟩, ⟨r, hr✝⟩)) = (⟨x, hx✝⟩, ⟨r, hr✝⟩)
tactic: rw [mem_Ioi] at hr
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
hx✝ : x ∈ sphere 0 1
hx : ‖x‖ = 1
r : ℝ
hr✝ : r ∈ Ioi 0
hr : 0 < r
⊢ (fun x => (⟨‖↑x‖⁻¹ • ↑x, ⋯⟩, ⟨‖↑x‖, ⋯⟩)) ((fun x => ⟨↑x.2 • ↑x.1, ⋯⟩) (⟨x, hx✝⟩, ⟨r, hr✝⟩)) = (⟨x, hx✝⟩, ⟨r, hr✝⟩)
state_after: no goals
tactic: ext <;> simp [hx, norm_smul, hr.le, abs_of_pos hr, hr.ne']
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ Continuous
    { toFun := fun x => (⟨‖↑x‖⁻¹ • ↑x, ⋯⟩, ⟨‖↑x‖, ⋯⟩), invFun := fun x => ⟨↑x.2 • ↑x.1, ⋯⟩, left_inv := ⋯,
        right_inv := ⋯ }.toFun
state_after: case refine_1
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ Continuous fun x => ‖↑x‖

case refine_2
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ ∀ (x : ↑{0}ᶜ), ‖↑x‖ ≠ 0

case refine_3
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ Continuous Subtype.val

case refine_4
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ Continuous fun x => ⟨‖↑x‖, ⋯⟩
tactic: refine .prod_mk (.codRestrict (.smul (.inv₀ ?_ ?_) ?_) _) ?_
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ Continuous
    { toFun := fun x => (⟨‖↑x‖⁻¹ • ↑x, ⋯⟩, ⟨‖↑x‖, ⋯⟩), invFun := fun x => ⟨↑x.2 • ↑x.1, ⋯⟩, left_inv := ⋯,
        right_inv := ⋯ }.invFun
state_after: no goals
tactic: apply Continuous.subtype_mk (by fun_prop)
Theorem: Real.logb_nonneg_of_base_lt_one
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

Proof steps:
state_before: b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
hx' : x ≤ 1
⊢ 0 ≤ logb b x
state_after: b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
hx' : x ≤ 1
⊢ x ≤ 1
tactic: rw [logb_nonneg_iff_of_base_lt_one b_pos b_lt_one hx]
state_before: b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
hx' : x ≤ 1
⊢ x ≤ 1
state_after: no goals
tactic: exact hx'
Theorem: Set.subsingleton_coe
File: Mathlib/Data/Set/Subsingleton.lean

Proof steps:
state_before: α : Type u
a : α
s✝ t s : Set α
⊢ Subsingleton ↑s ↔ s.Subsingleton
state_after: case mp
α : Type u
a : α
s✝ t s : Set α
⊢ Subsingleton ↑s → s.Subsingleton

case mpr
α : Type u
a : α
s✝ t s : Set α
⊢ s.Subsingleton → Subsingleton ↑s
tactic: constructor
Theorem: MeasureTheory.Measure.dirac_unit_compProd
File: Mathlib/Probability/Kernel/MeasureCompProd.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
μ : Measure α
κ✝ η : Kernel α β
κ : Kernel Unit β
inst✝ : IsSFiniteKernel κ
⊢ dirac () ⊗ₘ κ = map (Prod.mk ()) (κ ())
state_after: case h
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
μ : Measure α
κ✝ η : Kernel α β
κ : Kernel Unit β
inst✝ : IsSFiniteKernel κ
s : Set (Unit × β)
hs : MeasurableSet s
⊢ (dirac () ⊗ₘ κ) s = (map (Prod.mk ()) (κ ())) s
tactic: ext s hs
state_before: case h
α : Type u_1
β : Type u_2
mα : MeasurableSpace α
mβ : MeasurableSpace β
μ : Measure α
κ✝ η : Kernel α β
κ : Kernel Unit β
inst✝ : IsSFiniteKernel κ
s : Set (Unit × β)
hs : MeasurableSet s
⊢ (dirac () ⊗ₘ κ) s = (map (Prod.mk ()) (κ ())) s
state_after: no goals
tactic: rw [dirac_compProd_apply hs, Measure.map_apply measurable_prod_mk_left hs]
Theorem: LinearMap.ofIsCompl_smul
File: Mathlib/LinearAlgebra/Projection.lean

Proof steps:
state_before: R✝ : Type u_1
inst✝¹⁴ : Ring R✝
E✝ : Type u_2
inst✝¹³ : AddCommGroup E✝
inst✝¹² : Module R✝ E✝
F✝ : Type u_3
inst✝¹¹ : AddCommGroup F✝
inst✝¹⁰ : Module R✝ F✝
G : Type u_4
inst✝⁹ : AddCommGroup G
inst✝⁸ : Module R✝ G
p✝ q✝ : Submodule R✝ E✝
S : Type u_5
inst✝⁷ : Semiring S
M : Type u_6
inst✝⁶ : AddCommMonoid M
inst✝⁵ : Module S M
m : Submodule S M
R : Type u_7
inst✝⁴ : CommRing R
E : Type u_8
inst✝³ : AddCommGroup E
inst✝² : Module R E
F : Type u_9
inst✝¹ : AddCommGroup F
inst✝ : Module R F
p q : Submodule R E
h : IsCompl p q
φ : ↥p →ₗ[R] F
ψ : ↥q →ₗ[R] F
c : R
⊢ ∀ (u : ↥p), (c • φ) u = (c • ofIsCompl h φ ψ) ↑u
state_after: no goals
tactic: simp
state_before: R✝ : Type u_1
inst✝¹⁴ : Ring R✝
E✝ : Type u_2
inst✝¹³ : AddCommGroup E✝
inst✝¹² : Module R✝ E✝
F✝ : Type u_3
inst✝¹¹ : AddCommGroup F✝
inst✝¹⁰ : Module R✝ F✝
G : Type u_4
inst✝⁹ : AddCommGroup G
inst✝⁸ : Module R✝ G
p✝ q✝ : Submodule R✝ E✝
S : Type u_5
inst✝⁷ : Semiring S
M : Type u_6
inst✝⁶ : AddCommMonoid M
inst✝⁵ : Module S M
m : Submodule S M
R : Type u_7
inst✝⁴ : CommRing R
E : Type u_8
inst✝³ : AddCommGroup E
inst✝² : Module R E
F : Type u_9
inst✝¹ : AddCommGroup F
inst✝ : Module R F
p q : Submodule R E
h : IsCompl p q
φ : ↥p →ₗ[R] F
ψ : ↥q →ₗ[R] F
c : R
⊢ ∀ (u : ↥q), (c • ψ) u = (c • ofIsCompl h φ ψ) ↑u
state_after: no goals
tactic: simp
Theorem: Polynomial.add_scaleRoots_of_natDegree_eq
File: Mathlib/RingTheory/Polynomial/ScaleRoots.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Field K
p q : R[X]
r : R
h : p.natDegree = q.natDegree
⊢ r ^ (p.natDegree - (p + q).natDegree) • (p + q).scaleRoots r = p.scaleRoots r + q.scaleRoots r
state_after: case a
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Field K
p q : R[X]
r : R
h : p.natDegree = q.natDegree
n : ℕ
⊢ (r ^ (p.natDegree - (p + q).natDegree) • (p + q).scaleRoots r).coeff n = (p.scaleRoots r + q.scaleRoots r).coeff n
tactic: ext n
state_before: case a
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Field K
p q : R[X]
r : R
h : p.natDegree = q.natDegree
n : ℕ
⊢ (r ^ (p.natDegree - (p + q).natDegree) • (p + q).scaleRoots r).coeff n = (p.scaleRoots r + q.scaleRoots r).coeff n
state_after: case a
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Field K
p q : R[X]
r : R
h : p.natDegree = q.natDegree
n : ℕ
⊢ (p.coeff n + q.coeff n) * r ^ ((p + q).natDegree - n) * r ^ (p.natDegree - (p + q).natDegree) =
    (p.coeff n + q.coeff n) * r ^ (p.natDegree - n)
tactic: simp only [coeff_smul, coeff_scaleRoots, coeff_add, smul_eq_mul,
    mul_comm (r ^ _), ← pow_add, ← h, ← add_mul, add_comm (_ - n)]
state_before: case a
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Field K
p q : R[X]
r : R
h : p.natDegree = q.natDegree
n : ℕ
⊢ (p.coeff n + q.coeff n) * r ^ ((p + q).natDegree - n) * r ^ (p.natDegree - (p + q).natDegree) =
    (p.coeff n + q.coeff n) * r ^ (p.natDegree - n)
state_after: case a
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Field K
p q : R[X]
r : R
h : p.natDegree = q.natDegree
n : ℕ
⊢ (p.coeff n + q.coeff n) * r ^ ((p + q).natDegree - n + (p.natDegree - (p + q).natDegree)) =
    (p.coeff n + q.coeff n) * r ^ (p.natDegree - n)
tactic: rw [mul_assoc, ← pow_add]
state_before: case a
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝³ : Semiring S
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Field K
p q : R[X]
r : R
h : p.natDegree = q.natDegree
n : ℕ
⊢ (p.coeff n + q.coeff n) * r ^ ((p + q).natDegree - n + (p.natDegree - (p + q).natDegree)) =
    (p.coeff n + q.coeff n) * r ^ (p.natDegree - n)
state_after: no goals
tactic: cases lt_or_le (natDegree (p + q)) n with
  | inl hn => simp only [← coeff_add, coeff_eq_zero_of_natDegree_lt hn, zero_mul]
  | inr hn =>
      rw [add_comm (_ - n), tsub_add_tsub_cancel (natDegree_add_le_of_degree_le le_rfl h.ge) hn]
Theorem: lt_neg_add_iff_lt
File: Mathlib/Algebra/Order/Group/Unbundled/Basic.lean

Proof steps:
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LT α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1
a b c : α
⊢ 1 < b⁻¹ * a ↔ b < a
state_after: no goals
tactic: rw [← mul_lt_mul_iff_left b, mul_one, mul_inv_cancel_left]
Theorem: Nat.exists_prime_lt_and_le_two_mul
File: Mathlib/NumberTheory/Bertrand.lean

Proof steps:
state_before: n : ℕ
hn0 : n ≠ 0
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
state_after: case inl
n : ℕ
hn0 : n ≠ 0
h : 511 < n
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n

case inr
n : ℕ
hn0 : n ≠ 0
h : n ≤ 511
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
tactic: cases' lt_or_le 511 n with h h
state_before: case inr
n : ℕ
hn0 : n ≠ 0
h : n ≤ 511
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
state_after: case inr
n : ℕ
hn0 : n ≠ 0
h : n < 521
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
tactic: replace h : n < 521 := h.trans_lt (by norm_num1)
state_before: case inr
n : ℕ
hn0 : n ≠ 0
h : n < 521
⊢ ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
state_after: case inr
n : ℕ
hn0 : n ≠ 0
⊢ n < 521 → ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
tactic: revert h
state_before: case inr
n : ℕ
hn0 : n ≠ 0
⊢ n < 521 → ∃ p, Prime p ∧ n < p ∧ p ≤ 2 * n
state_after: no goals
tactic: open Lean Elab Tactic in
  run_tac do
    for i in [317, 163, 83, 43, 23, 13, 7, 5, 3, 2] do
      let i : Term := quote i
      evalTactic <| ←
        `(tactic| refine exists_prime_lt_and_le_two_mul_succ $i (by norm_num1) (by norm_num1) ?_)
  exact fun h2 => ⟨2, prime_two, h2, Nat.mul_le_mul_left 2 (Nat.pos_of_ne_zero hn0)⟩