ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: RingHomSurjective.comp
File: Mathlib/Algebra/Ring/CompTypeclasses.lean

Proof steps:
state_before: R₁ : Type u_1
R₂ : Type u_2
R₃ : Type u_3
inst✝⁵ : Semiring R₁
inst✝⁴ : Semiring R₂
inst✝³ : Semiring R₃
σ₁₂ : R₁ →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R₁ →+* R₃
σ : R₁ →+* R₂
σ' : R₂ →+* R₁
inst✝² : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝¹ : RingHomSurjective σ₁₂
inst✝ : RingHomSurjective σ₂₃
⊢ Function.Surjective ⇑σ₁₃
state_after: R₁ : Type u_1
R₂ : Type u_2
R₃ : Type u_3
inst✝⁵ : Semiring R₁
inst✝⁴ : Semiring R₂
inst✝³ : Semiring R₃
σ₁₂ : R₁ →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R₁ →+* R₃
σ : R₁ →+* R₂
σ' : R₂ →+* R₁
inst✝² : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝¹ : RingHomSurjective σ₁₂
inst✝ : RingHomSurjective σ₂₃
this : Function.Surjective (⇑σ₂₃ ∘ ⇑σ₁₂)
⊢ Function.Surjective ⇑σ₁₃
tactic: have := σ₂₃.surjective.comp σ₁₂.surjective
state_before: R₁ : Type u_1
R₂ : Type u_2
R₃ : Type u_3
inst✝⁵ : Semiring R₁
inst✝⁴ : Semiring R₂
inst✝³ : Semiring R₃
σ₁₂ : R₁ →+* R₂
σ₂₃ : R₂ →+* R₃
σ₁₃ : R₁ →+* R₃
σ : R₁ →+* R₂
σ' : R₂ →+* R₁
inst✝² : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝¹ : RingHomSurjective σ₁₂
inst✝ : RingHomSurjective σ₂₃
this : Function.Surjective (⇑σ₂₃ ∘ ⇑σ₁₂)
⊢ Function.Surjective ⇑σ₁₃
state_after: no goals
tactic: rwa [← RingHom.coe_comp, RingHomCompTriple.comp_eq] at this
Theorem: MeasureTheory.pdf.integral_pdf_smul
File: Mathlib/Probability/Density.lean

Proof steps:
state_before: Ω : Type u_1
E : Type u_2
inst✝⁵ : MeasurableSpace E
m : MeasurableSpace Ω
ℙ : Measure Ω
μ : Measure E
F : Type u_3
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace F
inst✝¹ : IsFiniteMeasure ℙ
X : Ω → E
inst✝ : HasPDF X ℙ μ
f : E → F
hf : AEStronglyMeasurable f μ
⊢ ∫ (x : E), (pdf X ℙ μ x).toReal • f x ∂μ = ∫ (x : Ω), f (X x) ∂ℙ
state_after: no goals
tactic: rw [← integral_map (HasPDF.aemeasurable X ℙ μ) (hf.mono_ac HasPDF.absolutelyContinuous),
    map_eq_withDensity_pdf X ℙ μ, pdf_def, integral_rnDeriv_smul HasPDF.absolutelyContinuous,
    withDensity_rnDeriv_eq _ _ HasPDF.absolutelyContinuous]
Theorem: OrderEmbedding.image_Ioc
File: Mathlib/Order/Interval/Set/OrdConnected.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
e : α ↪o β
he : (range ⇑e).OrdConnected
x y : α
⊢ ⇑e '' Ioc x y = Ioc (e x) (e y)
state_after: no goals
tactic: rw [← e.preimage_Ioc, image_preimage_eq_inter_range,
    inter_eq_left.2 <| Ioc_subset_Icc_self.trans <| he.out ⟨_, rfl⟩ ⟨_, rfl⟩]
Theorem: ENNReal.tendsto_nhds
File: Mathlib/Topology/Instances/ENNReal.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f : Filter α
u : α → ℝ≥0∞
a : ℝ≥0∞
ha : a ≠ ⊤
⊢ Tendsto u f (𝓝 a) ↔ ∀ ε > 0, ∀ᶠ (x : α) in f, u x ∈ Icc (a - ε) (a + ε)
state_after: no goals
tactic: simp only [nhds_of_ne_top ha, tendsto_iInf, tendsto_principal]
Theorem: Partrec.option_casesOn_right
File: Mathlib/Computability/Partrec.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
σ : Type u_4
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
o : α → Option β
f : α → σ
g : α → β →. σ
ho : Computable o
hf : Computable f
hg : Partrec₂ g
this : Partrec fun a => Nat.casesOn (encode (o a)) (Part.some (f a)) fun n => (↑(decode n)).bind (g a)
a : α
⊢ (Nat.casesOn (encode (o a)) (Part.some (f a)) fun n => (↑(decode n)).bind (g a)) =
    Option.casesOn (o a) (Part.some (f a)) (g a)
state_after: no goals
tactic: cases' o a with b <;> simp [encodek]
Theorem: le_nhdsAdjoint_iff'
File: Mathlib/Topology/Order.lean

Proof steps:
state_before: α : Type u
β : Type v
a : α
f : Filter α
t : TopologicalSpace α
⊢ t ≤ nhdsAdjoint a f ↔ 𝓝 a ≤ pure a ⊔ f ∧ ∀ (b : α), b ≠ a → 𝓝 b = pure b
state_after: no goals
tactic: classical
  simp_rw [le_iff_nhds, nhds_nhdsAdjoint, forall_update_iff, (pure_le_nhds _).le_iff_eq]
Theorem: Mathlib.Vector.get_replicate
File: Mathlib/Data/Vector/Basic.lean

Proof steps:
state_before: n : ℕ
α : Type u_1
a : α
i : Fin n
⊢ (replicate n a).get i = a
state_after: no goals
tactic: apply List.getElem_replicate
Theorem: Submodule.set_smul_le_iff
File: Mathlib/Algebra/Module/Submodule/Pointwise.lean

Proof steps:
state_before: α : Type u_1
R : Type u_2
M : Type u_3
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
S : Type u_4
inst✝³ : Monoid S
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : DistribMulAction S M
sR : Set R
s : Set S
N p : Submodule R M
⊢ s • N ≤ p ↔ ∀ ⦃r : S⦄ ⦃n : M⦄, r ∈ s → n ∈ N → r • n ∈ p
state_after: case mp
α : Type u_1
R : Type u_2
M : Type u_3
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
S : Type u_4
inst✝³ : Monoid S
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : DistribMulAction S M
sR : Set R
s : Set S
N p : Submodule R M
⊢ s • N ≤ p → ∀ ⦃r : S⦄ ⦃n : M⦄, r ∈ s → n ∈ N → r • n ∈ p

case mpr
α : Type u_1
R : Type u_2
M : Type u_3
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
S : Type u_4
inst✝³ : Monoid S
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : DistribMulAction S M
sR : Set R
s : Set S
N p : Submodule R M
⊢ (∀ ⦃r : S⦄ ⦃n : M⦄, r ∈ s → n ∈ N → r • n ∈ p) → s • N ≤ p
tactic: fconstructor
Theorem: Nat.binomial_eq
File: Mathlib/Data/Nat/Choose/Multinomial.lean

Proof steps:
state_before: α : Type u_1
s : Finset α
f : α → ℕ
a b : α
n : ℕ
inst✝ : DecidableEq α
h : a ≠ b
⊢ multinomial {a, b} f = (f a + f b)! / ((f a)! * (f b)!)
state_after: no goals
tactic: simp [multinomial, Finset.sum_pair h, Finset.prod_pair h]
Theorem: UpperHalfPlane.dist_comm
File: Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean

Proof steps:
state_before: z✝ w✝ : ℍ
r R : ℝ
z w : ℍ
⊢ dist z w = dist w z
state_after: no goals
tactic: simp only [dist_eq, dist_comm (z : ℂ), mul_comm]
Theorem: Polynomial.leadingCoeff_add_of_degree_lt
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

Proof steps:
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.degree < q.degree
⊢ (p + q).leadingCoeff = q.leadingCoeff
state_after: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.degree < q.degree
this : p.coeff q.natDegree = 0
⊢ (p + q).leadingCoeff = q.leadingCoeff
tactic: have : coeff p (natDegree q) = 0 := coeff_natDegree_eq_zero_of_degree_lt h
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.degree < q.degree
this : p.coeff q.natDegree = 0
⊢ (p + q).leadingCoeff = q.leadingCoeff
state_after: no goals
tactic: simp only [leadingCoeff, natDegree_eq_of_degree_eq (degree_add_eq_right_of_degree_lt h), this,
    coeff_add, zero_add]
Theorem: Equiv.hasProd_iff
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CommMonoid α
inst✝ : TopologicalSpace α
f g : β → α
a b : α
s : Finset β
e : γ ≃ β
⊢ ∀ x ∉ Set.range ⇑e, f x = 1
state_after: no goals
tactic: simp
Theorem: MonoidHom.map_mul_inv
File: Mathlib/Algebra/Group/Hom/Defs.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
H : Type u_8
F : Type u_9
inst✝³ : Group G
inst✝² : CommGroup H
inst✝¹ : Group α
inst✝ : DivisionMonoid β
f : α →* β
g h : α
⊢ f (g * h⁻¹) = f g * (f h)⁻¹
state_after: no goals
tactic: simp
Theorem: Finset.sorted_last_eq_max'_aux
File: Mathlib/Data/Finset/Sort.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
s : Finset α
h : (sort (fun x x_1 => x ≤ x_1) s).length - 1 < (sort (fun x x_1 => x ≤ x_1) s).length
H : s.Nonempty
l : List α := sort (fun x x_1 => x ≤ x_1) s
⊢ (sort (fun x x_1 => x ≤ x_1) s).get ⟨(sort (fun x x_1 => x ≤ x_1) s).length - 1, h⟩ = s.max' H
state_after: case a
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
s : Finset α
h : (sort (fun x x_1 => x ≤ x_1) s).length - 1 < (sort (fun x x_1 => x ≤ x_1) s).length
H : s.Nonempty
l : List α := sort (fun x x_1 => x ≤ x_1) s
⊢ (sort (fun x x_1 => x ≤ x_1) s).get ⟨(sort (fun x x_1 => x ≤ x_1) s).length - 1, h⟩ ≤ s.max' H

case a
α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
s : Finset α
h : (sort (fun x x_1 => x ≤ x_1) s).length - 1 < (sort (fun x x_1 => x ≤ x_1) s).length
H : s.Nonempty
l : List α := sort (fun x x_1 => x ≤ x_1) s
⊢ s.max' H ≤ (sort (fun x x_1 => x ≤ x_1) s).get ⟨(sort (fun x x_1 => x ≤ x_1) s).length - 1, h⟩
tactic: apply le_antisymm
Theorem: ArithmeticFunction.IsMultiplicative.ppow
File: Mathlib/NumberTheory/ArithmeticFunction.lean

Proof steps:
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: induction' k with k hi
Theorem: NNReal.rpow_add_of_nonneg
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

Proof steps:
state_before: w x✝ y✝ z✝ : ℝ
x : ℝ≥0
y z : ℝ
hy : 0 ≤ y
hz : 0 ≤ z
⊢ x ^ (y + z) = x ^ y * x ^ z
state_after: case a
w x✝ y✝ z✝ : ℝ
x : ℝ≥0
y z : ℝ
hy : 0 ≤ y
hz : 0 ≤ z
⊢ ↑(x ^ (y + z)) = ↑(x ^ y * x ^ z)
tactic: ext
state_before: case a
w x✝ y✝ z✝ : ℝ
x : ℝ≥0
y z : ℝ
hy : 0 ≤ y
hz : 0 ≤ z
⊢ ↑(x ^ (y + z)) = ↑(x ^ y * x ^ z)
state_after: no goals
tactic: exact Real.rpow_add_of_nonneg x.2 hy hz
Theorem: EulerProduct.summable_and_hasSum_factoredNumbers_prod_filter_prime_tsum
File: Mathlib/NumberTheory/EulerProduct/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : ∀ {p : ℕ}, Nat.Prime p → Summable fun n => ‖f (p ^ n)‖
s : Finset ℕ
⊢ (Summable fun m => ‖f ↑m‖) ∧ HasSum (fun m => f ↑m) (∏ p ∈ filter Nat.Prime s, ∑' (n : ℕ), f (p ^ n))
state_after: case empty
R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : ∀ {p : ℕ}, Nat.Prime p → Summable fun n => ‖f (p ^ n)‖
⊢ (Summable fun m => ‖f ↑m‖) ∧ HasSum (fun m => f ↑m) (∏ p ∈ filter Nat.Prime ∅, ∑' (n : ℕ), f (p ^ n))

case insert
R : Type u_1
inst✝¹ : NormedCommRing R
inst✝ : CompleteSpace R
f : ℕ → R
hf₁ : f 1 = 1
hmul : ∀ {m n : ℕ}, m.Coprime n → f (m * n) = f m * f n
hsum : ∀ {p : ℕ}, Nat.Prime p → Summable fun n => ‖f (p ^ n)‖
p : ℕ
s : Finset ℕ
hp : p ∉ s
ih : (Summable fun m => ‖f ↑m‖) ∧ HasSum (fun m => f ↑m) (∏ p ∈ filter Nat.Prime s, ∑' (n : ℕ), f (p ^ n))
⊢ (Summable fun m => ‖f ↑m‖) ∧ HasSum (fun m => f ↑m) (∏ p ∈ filter Nat.Prime (insert p s), ∑' (n : ℕ), f (p ^ n))
tactic: induction' s using Finset.induction with p s hp ih
Theorem: WeierstrassCurve.Projective.eval_polynomialY
File: Mathlib/AlgebraicGeometry/EllipticCurve/Projective.lean

Proof steps:
state_before: R : Type u
inst✝ : CommRing R
W : Projective R
P : Fin 3 → R
⊢ (eval P) W.polynomialY = 2 * P 1 * P 2 + W.a₁ * P 0 * P 2 + W.a₃ * P 2 ^ 2
state_after: R : Type u
inst✝ : CommRing R
W : Projective R
P : Fin 3 → R
⊢ (eval P) (C 2 * X 1 * X 2 + C W.a₁ * X 0 * X 2 + C W.a₃ * X 2 ^ 2) = 2 * P 1 * P 2 + W.a₁ * P 0 * P 2 + W.a₃ * P 2 ^ 2
tactic: rw [polynomialY_eq]
state_before: R : Type u
inst✝ : CommRing R
W : Projective R
P : Fin 3 → R
⊢ (eval P) (C 2 * X 1 * X 2 + C W.a₁ * X 0 * X 2 + C W.a₃ * X 2 ^ 2) = 2 * P 1 * P 2 + W.a₁ * P 0 * P 2 + W.a₃ * P 2 ^ 2
state_after: no goals
tactic: eval_simp
Theorem: CategoryTheory.coyonedaEquiv_comp
File: Mathlib/CategoryTheory/Yoneda.lean

Proof steps:
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
X : C
F G : C ⥤ Type v₁
α : coyoneda.obj (op X) ⟶ F
β : F ⟶ G
⊢ coyonedaEquiv (α ≫ β) = β.app X (coyonedaEquiv α)
state_after: no goals
tactic: rfl
Theorem: Mathlib.Vector.traverse_def
File: Mathlib/Data/Vector/Basic.lean

Proof steps:
state_before: n : ℕ
F G : Type u → Type u
inst✝¹ : Applicative F
inst✝ : Applicative G
α β : Type u
f : α → F β
x : α
⊢ ∀ (xs : Vector α n), Vector.traverse f (x ::ᵥ xs) = Seq.seq (cons <$> f x) fun x => Vector.traverse f xs
state_after: case mk
F G : Type u → Type u
inst✝¹ : Applicative F
inst✝ : Applicative G
α β : Type u
f : α → F β
x : α
xs : List α
⊢ Vector.traverse f (x ::ᵥ ⟨xs, ⋯⟩) = Seq.seq (cons <$> f x) fun x => Vector.traverse f ⟨xs, ⋯⟩
tactic: rintro ⟨xs, rfl⟩
state_before: case mk
F G : Type u → Type u
inst✝¹ : Applicative F
inst✝ : Applicative G
α β : Type u
f : α → F β
x : α
xs : List α
⊢ Vector.traverse f (x ::ᵥ ⟨xs, ⋯⟩) = Seq.seq (cons <$> f x) fun x => Vector.traverse f ⟨xs, ⋯⟩
state_after: no goals
tactic: rfl
Theorem: ZMod.cast_cast_zmod_of_le
File: Mathlib/Data/ZMod/Basic.lean

Proof steps:
state_before: m✝ n✝ m n : ℕ
hm : NeZero m
h : m ≤ n
a : ZMod m
⊢ a.cast.cast = a
state_after: m✝ n✝ m n : ℕ
hm : NeZero m
h : m ≤ n
a : ZMod m
this : NeZero n
⊢ a.cast.cast = a
tactic: have : NeZero n := ⟨((Nat.zero_lt_of_ne_zero hm.out).trans_le h).ne'⟩
state_before: m✝ n✝ m n : ℕ
hm : NeZero m
h : m ≤ n
a : ZMod m
this : NeZero n
⊢ a.cast.cast = a
state_after: no goals
tactic: rw [cast_eq_val, val_cast_eq_val_of_lt (a.val_lt.trans_le h), natCast_zmod_val]
Theorem: Fin.pred_le_iff
File: Mathlib/Data/Fin/Basic.lean

Proof steps:
state_before: n m : ℕ
j : Fin n
i : Fin (n + 1)
hi : i ≠ 0
⊢ i.pred hi ≤ j ↔ i ≤ j.succ
state_after: no goals
tactic: rw [← succ_le_succ_iff, succ_pred]
Theorem: Nontrivial.of_not_isCyclic
File: Mathlib/GroupTheory/SpecificGroups/Cyclic.lean

Proof steps:
state_before: α : Type u
a : α
inst✝ : Group α
nc : ¬IsCyclic α
⊢ Nontrivial α
state_after: α : Type u
a : α
inst✝ : Group α
nc : ¬Nontrivial α
⊢ IsCyclic α
tactic: contrapose! nc
state_before: α : Type u
a : α
inst✝ : Group α
nc : ¬Nontrivial α
⊢ IsCyclic α
state_after: no goals
tactic: exact @isCyclic_of_subsingleton _ _ (not_nontrivial_iff_subsingleton.mp nc)
Theorem: Set.subset_image_iff
File: Mathlib/Data/Set/Image.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
s t✝ : Set α
t : Set β
⊢ t ⊆ f '' s ↔ ∃ u ⊆ s, f '' u = t
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
s t✝ : Set α
t : Set β
h : t ⊆ f '' s
⊢ f '' (f ⁻¹' t ∩ s) = t
tactic: refine ⟨fun h ↦ ⟨f ⁻¹' t ∩ s, inter_subset_right, ?_⟩,
    fun ⟨u, hu, hu'⟩ ↦ hu'.symm ▸ image_mono hu⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
s t✝ : Set α
t : Set β
h : t ⊆ f '' s
⊢ f '' (f ⁻¹' t ∩ s) = t
state_after: no goals
tactic: rwa [image_preimage_inter, inter_eq_left]
Theorem: List.exists_of_replaceF
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

Proof steps:
state_before: α : Type u_1
p : α → Option α
b : α
l : List α
a a' : α
al : a ∈ b :: l
pa : p a = some a'
b' : α
pb : p b = some b'
⊢ b :: l = [] ++ b :: l ∧ replaceF p (b :: l) = [] ++ b' :: l
state_after: no goals
tactic: simp [pb]
state_before: α : Type u_1
p : α → Option α
b✝ : α
l : List α
a a' : α
al✝ : a ∈ b✝ :: l
pa : p a = some a'
b : α
al : Mem a l
pb : p b = none
c c' : α
l₁ l₂ : List α
h₁ : ∀ (b : α), b ∈ l₁ → p b = none
h₂ : p c = some c'
h₃ : l = l₁ ++ c :: l₂
h₄ : replaceF p l = l₁ ++ c' :: l₂
⊢ b :: l = b :: l₁ ++ c :: l₂
state_after: no goals
tactic: rw [h₃, cons_append]
state_before: α : Type u_1
p : α → Option α
b✝ : α
l : List α
a a' : α
al✝ : a ∈ b✝ :: l
pa : p a = some a'
b : α
al : Mem a l
pb : p b = none
c c' : α
l₁ l₂ : List α
h₁ : ∀ (b : α), b ∈ l₁ → p b = none
h₂ : p c = some c'
h₃ : l = l₁ ++ c :: l₂
h₄ : replaceF p l = l₁ ++ c' :: l₂
⊢ replaceF p (b :: l) = b :: l₁ ++ c' :: l₂
state_after: no goals
tactic: simp [pb, h₄]
Theorem: cfc_mono
File: Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unital.lean

Proof steps:
state_before: R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁵ : OrderedCommSemiring R
inst✝¹⁴ : StarRing R
inst✝¹³ : StarOrderedRing R
inst✝¹² : MetricSpace R
inst✝¹¹ : TopologicalSemiring R
inst✝¹⁰ : ContinuousStar R
inst✝⁹ : ∀ (α : Type ?u.689974) [inst : TopologicalSpace α], StarOrderedRing C(α, R)
inst✝⁸ : TopologicalSpace A
inst✝⁷ : Ring A
inst✝⁶ : StarRing A
inst✝⁵ : PartialOrder A
inst✝⁴ : StarOrderedRing A
inst✝³ : Algebra R A
inst✝² : StarModule R A
inst✝¹ : ContinuousFunctionalCalculus R p
inst✝ : NonnegSpectrumClass R A
f g : R → R
a : A
h : ∀ x ∈ spectrum R a, f x ≤ g x
hf : autoParam (ContinuousOn f (spectrum R a)) _auto✝
hg : autoParam (ContinuousOn g (spectrum R a)) _auto✝
⊢ cfc f a ≤ cfc g a
state_after: case pos
R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁵ : OrderedCommSemiring R
inst✝¹⁴ : StarRing R
inst✝¹³ : StarOrderedRing R
inst✝¹² : MetricSpace R
inst✝¹¹ : TopologicalSemiring R
inst✝¹⁰ : ContinuousStar R
inst✝⁹ : ∀ (α : Type ?u.689974) [inst : TopologicalSpace α], StarOrderedRing C(α, R)
inst✝⁸ : TopologicalSpace A
inst✝⁷ : Ring A
inst✝⁶ : StarRing A
inst✝⁵ : PartialOrder A
inst✝⁴ : StarOrderedRing A
inst✝³ : Algebra R A
inst✝² : StarModule R A
inst✝¹ : ContinuousFunctionalCalculus R p
inst✝ : NonnegSpectrumClass R A
f g : R → R
a : A
h : ∀ x ∈ spectrum R a, f x ≤ g x
hf : autoParam (ContinuousOn f (spectrum R a)) _auto✝
hg : autoParam (ContinuousOn g (spectrum R a)) _auto✝
ha : p a
⊢ cfc f a ≤ cfc g a

case neg
R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹⁵ : OrderedCommSemiring R
inst✝¹⁴ : StarRing R
inst✝¹³ : StarOrderedRing R
inst✝¹² : MetricSpace R
inst✝¹¹ : TopologicalSemiring R
inst✝¹⁰ : ContinuousStar R
inst✝⁹ : ∀ (α : Type ?u.689974) [inst : TopologicalSpace α], StarOrderedRing C(α, R)
inst✝⁸ : TopologicalSpace A
inst✝⁷ : Ring A
inst✝⁶ : StarRing A
inst✝⁵ : PartialOrder A
inst✝⁴ : StarOrderedRing A
inst✝³ : Algebra R A
inst✝² : StarModule R A
inst✝¹ : ContinuousFunctionalCalculus R p
inst✝ : NonnegSpectrumClass R A
f g : R → R
a : A
h : ∀ x ∈ spectrum R a, f x ≤ g x
hf : autoParam (ContinuousOn f (spectrum R a)) _auto✝
hg : autoParam (ContinuousOn g (spectrum R a)) _auto✝
ha : ¬p a
⊢ cfc f a ≤ cfc g a
tactic: by_cases ha : p a
Theorem: FreeGroup.map.comp
File: Mathlib/GroupTheory/FreeGroup/Basic.lean

Proof steps:
state_before: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
β : Type v
f✝ : α → β
x✝ y : FreeGroup α
γ : Type w
f : α → β
g : β → γ
x : FreeGroup α
⊢ (map g) ((map f) x) = (map (g ∘ f)) x
state_after: case mk
α : Type u
L✝ L₁ L₂ L₃ L₄ : List (α × Bool)
β : Type v
f✝ : α → β
x✝ y : FreeGroup α
γ : Type w
f : α → β
g : β → γ
x : FreeGroup α
L : List (α × Bool)
⊢ (map g) ((map f) (Quot.mk Red.Step L)) = (map (g ∘ f)) (Quot.mk Red.Step L)
tactic: rcases x with ⟨L⟩
Theorem: isBounded_iff_forall_norm_le
File: Mathlib/Analysis/Normed/Group/Bounded.lean

Proof steps:
state_before: α : Type u_1
ι : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
⊢ Bornology.IsBounded s ↔ ∃ C, ∀ x ∈ s, ‖x‖ ≤ C
state_after: no goals
tactic: simpa only [Set.subset_def, mem_closedBall_one_iff] using isBounded_iff_subset_closedBall (1 : E)
Theorem: tsum_dite_left
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝² : CommMonoid α
inst✝¹ : TopologicalSpace α
f g : β → α
a a₁ a₂ : α
P : Prop
inst✝ : Decidable P
x : β → P → α
⊢ (∏' (b : β), if h : P then x b h else 1) = if h : P then ∏' (b : β), x b h else 1
state_after: no goals
tactic: by_cases hP : P <;> simp [hP]
Theorem: HomologicalComplex.eq_liftCycles_homologyπ_up_to_refinements
File: Mathlib/Algebra/Homology/Refinements.lean

Proof steps:
state_before: C : Type u_1
ι : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
K : HomologicalComplex C c
A : C
i : ι
γ : A ⟶ K.homology i
j : ι
hj : c.next i = j
⊢ ∃ A' π, ∃ (_ : Epi π), ∃ z, ∃ (hz : z ≫ K.d i j = 0), π ≫ γ = K.liftCycles z j hj hz ≫ K.homologyπ i
state_after: C : Type u_1
ι : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
K : HomologicalComplex C c
A : C
i : ι
γ : A ⟶ K.homology i
⊢ ∃ A' π, ∃ (_ : Epi π), ∃ z, ∃ (hz : z ≫ K.d i (c.next i) = 0), π ≫ γ = K.liftCycles z (c.next i) ⋯ hz ≫ K.homologyπ i
tactic: subst hj
state_before: C : Type u_1
ι : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Abelian C
c : ComplexShape ι
K : HomologicalComplex C c
A : C
i : ι
γ : A ⟶ K.homology i
⊢ ∃ A' π, ∃ (_ : Epi π), ∃ z, ∃ (hz : z ≫ K.d i (c.next i) = 0), π ≫ γ = K.liftCycles z (c.next i) ⋯ hz ≫ K.homologyπ i
state_after: no goals
tactic: exact (K.sc i).eq_liftCycles_homologyπ_up_to_refinements γ
Theorem: Ordnode.Valid'.balance'_aux
File: Mathlib/Data/Ordmap/Ordset.lean

Proof steps:
state_before: α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H₁ : 2 * r.size ≤ 9 * l.size + 5 ∨ r.size ≤ 3
H₂ : 2 * l.size ≤ 9 * r.size + 5 ∨ l.size ≤ 3
⊢ Valid' o₁ (l.balance' x r) o₂
state_after: α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H₁ : 2 * r.size ≤ 9 * l.size + 5 ∨ r.size ≤ 3
H₂ : 2 * l.size ≤ 9 * r.size + 5 ∨ l.size ≤ 3
⊢ Valid' o₁
    (if l.size + r.size ≤ 1 then l.node' x r
    else
      if r.size > delta * l.size then l.rotateL x r else if l.size > delta * r.size then l.rotateR x r else l.node' x r)
    o₂
tactic: rw [balance']
state_before: α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H₁ : 2 * r.size ≤ 9 * l.size + 5 ∨ r.size ≤ 3
H₂ : 2 * l.size ≤ 9 * r.size + 5 ∨ l.size ≤ 3
⊢ Valid' o₁
    (if l.size + r.size ≤ 1 then l.node' x r
    else
      if r.size > delta * l.size then l.rotateL x r else if l.size > delta * r.size then l.rotateR x r else l.node' x r)
    o₂
state_after: case pos
α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H₁ : 2 * r.size ≤ 9 * l.size + 5 ∨ r.size ≤ 3
H₂ : 2 * l.size ≤ 9 * r.size + 5 ∨ l.size ≤ 3
h : l.size + r.size ≤ 1
⊢ Valid' o₁ (l.node' x r) o₂

case pos
α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H₁ : 2 * r.size ≤ 9 * l.size + 5 ∨ r.size ≤ 3
H₂ : 2 * l.size ≤ 9 * r.size + 5 ∨ l.size ≤ 3
h : ¬l.size + r.size ≤ 1
h_1 : r.size > delta * l.size
⊢ Valid' o₁ (l.rotateL x r) o₂

case pos
α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H₁ : 2 * r.size ≤ 9 * l.size + 5 ∨ r.size ≤ 3
H₂ : 2 * l.size ≤ 9 * r.size + 5 ∨ l.size ≤ 3
h : ¬l.size + r.size ≤ 1
h_1 : ¬r.size > delta * l.size
h_2 : l.size > delta * r.size
⊢ Valid' o₁ (l.rotateR x r) o₂

case neg
α : Type u_1
inst✝ : Preorder α
l : Ordnode α
x : α
r : Ordnode α
o₁ : WithBot α
o₂ : WithTop α
hl : Valid' o₁ l ↑x
hr : Valid' (↑x) r o₂
H₁ : 2 * r.size ≤ 9 * l.size + 5 ∨ r.size ≤ 3
H₂ : 2 * l.size ≤ 9 * r.size + 5 ∨ l.size ≤ 3
h : ¬l.size + r.size ≤ 1
h_1 : ¬r.size > delta * l.size
h_2 : ¬l.size > delta * r.size
⊢ Valid' o₁ (l.node' x r) o₂
tactic: split_ifs with h h_1 h_2
Theorem: PiNat.apply_firstDiff_ne
File: Mathlib/Topology/MetricSpace/PiNat.lean

Proof steps:
state_before: E : ℕ → Type u_1
x y : (n : ℕ) → E n
h : x ≠ y
⊢ x (firstDiff x y) ≠ y (firstDiff x y)
state_after: E : ℕ → Type u_1
x y : (n : ℕ) → E n
h : x ≠ y
⊢ x (Nat.find ⋯) ≠ y (Nat.find ⋯)
tactic: rw [firstDiff_def, dif_pos h]
state_before: E : ℕ → Type u_1
x y : (n : ℕ) → E n
h : x ≠ y
⊢ x (Nat.find ⋯) ≠ y (Nat.find ⋯)
state_after: no goals
tactic: exact Nat.find_spec (ne_iff.1 h)
Theorem: BoxIntegral.IntegrationParams.toFilteriUnion_congr
File: Mathlib/Analysis/BoxIntegral/Partition/Filter.lean

Proof steps:
state_before: ι : Type u_1
inst✝ : Fintype ι
I✝ J : Box ι
c c₁ c₂ : ℝ≥0
r r₁ r₂ : (ι → ℝ) → ↑(Set.Ioi 0)
π π₁✝ π₂✝ : TaggedPrepartition I✝
l✝ l₁ l₂ : IntegrationParams
I : Box ι
l : IntegrationParams
π₁ π₂ : Prepartition I
h : π₁.iUnion = π₂.iUnion
⊢ l.toFilteriUnion I π₁ = l.toFilteriUnion I π₂
state_after: no goals
tactic: simp only [toFilteriUnion, toFilterDistortioniUnion, h]