ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: MeasureTheory.Measure.addHaar_affineSubspace
File: Mathlib/MeasureTheory/Measure/Lebesgue/EqHaar.lean

Proof steps:
state_before: E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
inst✝¹ : FiniteDimensional ℝ E
μ : Measure E
inst✝ : μ.IsAddHaarMeasure
s : AffineSubspace ℝ E
hs : s ≠ ⊤
⊢ μ ↑s = 0
state_after: case inl
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
inst✝¹ : FiniteDimensional ℝ E
μ : Measure E
inst✝ : μ.IsAddHaarMeasure
hs : ⊥ ≠ ⊤
⊢ μ ↑⊥ = 0

case inr
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
inst✝¹ : FiniteDimensional ℝ E
μ : Measure E
inst✝ : μ.IsAddHaarMeasure
s : AffineSubspace ℝ E
hs : s ≠ ⊤
hne : (↑s).Nonempty
⊢ μ ↑s = 0
tactic: rcases s.eq_bot_or_nonempty with (rfl | hne)
state_before: case inr
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
inst✝¹ : FiniteDimensional ℝ E
μ : Measure E
inst✝ : μ.IsAddHaarMeasure
s : AffineSubspace ℝ E
hs : s ≠ ⊤
hne : (↑s).Nonempty
⊢ μ ↑s = 0
state_after: case inr
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
inst✝¹ : FiniteDimensional ℝ E
μ : Measure E
inst✝ : μ.IsAddHaarMeasure
s : AffineSubspace ℝ E
hs : ¬s.direction = ⊤
hne : (↑s).Nonempty
⊢ μ ↑s = 0
tactic: rw [Ne, ← AffineSubspace.direction_eq_top_iff_of_nonempty hne] at hs
state_before: case inr
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
inst✝¹ : FiniteDimensional ℝ E
μ : Measure E
inst✝ : μ.IsAddHaarMeasure
s : AffineSubspace ℝ E
hs : ¬s.direction = ⊤
hne : (↑s).Nonempty
⊢ μ ↑s = 0
state_after: case inr.intro
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
inst✝¹ : FiniteDimensional ℝ E
μ : Measure E
inst✝ : μ.IsAddHaarMeasure
s : AffineSubspace ℝ E
hs : ¬s.direction = ⊤
x : E
hx : x ∈ s
⊢ μ ↑s = 0
tactic: rcases hne with ⟨x, hx : x ∈ s⟩
state_before: case inr.intro
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : MeasurableSpace E
inst✝² : BorelSpace E
inst✝¹ : FiniteDimensional ℝ E
μ : Measure E
inst✝ : μ.IsAddHaarMeasure
s : AffineSubspace ℝ E
hs : ¬s.direction = ⊤
x : E
hx : x ∈ s
⊢ μ ↑s = 0
state_after: no goals
tactic: simpa only [AffineSubspace.coe_direction_eq_vsub_set_right hx, vsub_eq_sub, sub_eq_add_neg,
    image_add_right, neg_neg, measure_preimage_add_right] using addHaar_submodule μ s.direction hs
Theorem: Multiset.gcd_union
File: Mathlib/Algebra/GCDMonoid/Multiset.lean

Proof steps:
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s₁ s₂ : Multiset α
⊢ (s₁ ∪ s₂).gcd = GCDMonoid.gcd s₁.gcd s₂.gcd
state_after: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s₁ s₂ : Multiset α
⊢ ∀ (a : α), a ∈ s₁ ∪ s₂ ↔ a ∈ s₁ + s₂
tactic: rw [← gcd_dedup, dedup_ext.2, gcd_dedup, gcd_add]
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s₁ s₂ : Multiset α
⊢ ∀ (a : α), a ∈ s₁ ∪ s₂ ↔ a ∈ s₁ + s₂
state_after: no goals
tactic: simp
Theorem: CategoryTheory.isSeparating_unop_iff
File: Mathlib/CategoryTheory/Generator.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
𝒢 : Set Cᵒᵖ
⊢ IsSeparating 𝒢.unop ↔ IsCoseparating 𝒢
state_after: no goals
tactic: rw [← isCoseparating_op_iff, Set.unop_op]
Theorem: TensorAlgebra.ι_eq_algebraMap_iff
File: Mathlib/LinearAlgebra/TensorAlgebra/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝² : CommSemiring R
M : Type u_2
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x : M
r : R
⊢ (ι R) x = (algebraMap R (TensorAlgebra R M)) r ↔ x = 0 ∧ r = 0
state_after: case refine_1
R : Type u_1
inst✝² : CommSemiring R
M : Type u_2
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x : M
r : R
h : (ι R) x = (algebraMap R (TensorAlgebra R M)) r
⊢ x = 0 ∧ r = 0

case refine_2
R : Type u_1
inst✝² : CommSemiring R
M : Type u_2
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x : M
r : R
⊢ x = 0 ∧ r = 0 → (ι R) x = (algebraMap R (TensorAlgebra R M)) r
tactic: refine ⟨fun h => ?_, ?_⟩
Theorem: eq_zero_of_add_right
File: Mathlib/Algebra/Group/Units.lean

Proof steps:
state_before: α : Type u
inst✝¹ : CommMonoid α
inst✝ : Subsingleton αˣ
a b : α
h : a * b = 1
⊢ b * a = 1
state_after: no goals
tactic: rwa [mul_comm]
Theorem: Complex.norm_sub_mem_Icc_angle
File: Mathlib/Analysis/Complex/Angle.lean

Proof steps:
state_before: a x y : ℂ
hx : ‖x‖ = 1
hy : ‖y‖ = 1
⊢ ‖x - y‖ ∈ Icc (2 / π * angle x y) (angle x y)
state_after: x y : ℂ
hx : ‖x‖ = 1
hy : ‖y‖ = 1
⊢ ‖x - y‖ ∈ Icc (2 / π * angle x y) (angle x y)
tactic: clear a
state_before: x y : ℂ
hx : ‖x‖ = 1
hy : ‖y‖ = 1
⊢ ‖x - y‖ ∈ Icc (2 / π * angle x y) (angle x y)
state_after: case inr
x y : ℂ
hx : ‖x‖ = 1
hy : ‖y‖ = 1
this : ∀ {x y : ℂ}, ‖x‖ = 1 → ‖y‖ = 1 → y = 1 → ‖x - y‖ ∈ Icc (2 / π * angle x y) (angle x y)
h : ¬y = 1
⊢ ‖x - y‖ ∈ Icc (2 / π * angle x y) (angle x y)

x✝ y✝ x y : ℂ
hx : ‖x‖ = 1
hy : ‖y‖ = 1
h : y = 1
⊢ ‖x - y‖ ∈ Icc (2 / π * angle x y) (angle x y)
tactic: wlog h : y = 1
state_before: x✝ y✝ x y : ℂ
hx : ‖x‖ = 1
hy : ‖y‖ = 1
h : y = 1
⊢ ‖x - y‖ ∈ Icc (2 / π * angle x y) (angle x y)
state_after: x✝ y x : ℂ
hx : ‖x‖ = 1
hy : ‖1‖ = 1
⊢ ‖x - 1‖ ∈ Icc (2 / π * angle x 1) (angle x 1)
tactic: subst y
state_before: x✝ y x : ℂ
hx : ‖x‖ = 1
hy : ‖1‖ = 1
⊢ ‖x - 1‖ ∈ Icc (2 / π * angle x 1) (angle x 1)
state_after: x✝ y x : ℂ
hx : ∃ θ ∈ Ioc (-π) π, cexp (↑θ * I) = x
hy : ‖1‖ = 1
⊢ ‖x - 1‖ ∈ Icc (2 / π * angle x 1) (angle x 1)
tactic: rw [norm_eq_abs, abs_eq_one_iff'] at hx
state_before: x✝ y x : ℂ
hx : ∃ θ ∈ Ioc (-π) π, cexp (↑θ * I) = x
hy : ‖1‖ = 1
⊢ ‖x - 1‖ ∈ Icc (2 / π * angle x 1) (angle x 1)
state_after: case intro.intro
x y : ℂ
hy : ‖1‖ = 1
θ : ℝ
hθ : θ ∈ Ioc (-π) π
⊢ ‖cexp (↑θ * I) - 1‖ ∈ Icc (2 / π * angle (cexp (↑θ * I)) 1) (angle (cexp (↑θ * I)) 1)
tactic: obtain ⟨θ, hθ, rfl⟩ := hx
state_before: case intro.intro
x y : ℂ
hy : ‖1‖ = 1
θ : ℝ
hθ : θ ∈ Ioc (-π) π
⊢ ‖cexp (↑θ * I) - 1‖ ∈ Icc (2 / π * angle (cexp (↑θ * I)) 1) (angle (cexp (↑θ * I)) 1)
state_after: case intro.intro
x y : ℂ
hy : ‖1‖ = 1
θ : ℝ
hθ : θ ∈ Ioc (-π) π
⊢ ‖cos ↑θ - 1 + sin ↑θ * I‖ ∈ Icc (2 / π * |θ|) |θ|

case intro.intro
x y : ℂ
hy : ‖1‖ = 1
θ : ℝ
hθ : θ ∈ Ioc (-π) π
⊢ θ ∈ Ioc (-π) (-π + 2 * π)
tactic: rw [angle_exp_one, exp_mul_I, add_sub_right_comm, (toIocMod_eq_self _).2]
Theorem: CategoryTheory.Limits.Cone.toUnder_pt
File: Mathlib/CategoryTheory/Limits/ConeCategory.lean

Proof steps:
state_before: J : Type u₁
inst✝³ : Category.{v₁, u₁} J
K : Type u₂
inst✝² : Category.{v₂, u₂} K
C : Type u₃
inst✝¹ : Category.{v₃, u₃} C
D : Type u₄
inst✝ : Category.{v₄, u₄} D
F : J ⥤ C
c : Cone F
j : J
⊢ (((const J).obj (Under.mk (𝟙 c.pt))).obj j).hom ≫ c.π.app j =
    ((c.toStructuredArrow ⋙ StructuredArrow.toUnder c.pt F).obj j).hom
state_after: no goals
tactic: simp
Theorem: Filter.Germ.isConstant_compTendsto
File: Mathlib/Order/Filter/Germ/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
l : Filter α
f✝ g✝ h : α → β
f : l.Germ β
lc : Filter γ
g : γ → α
hf : f.IsConstant
hg : Tendsto g lc l
⊢ (f.compTendsto g hg).IsConstant
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
l : Filter α
f✝ g✝ h : α → β
lc : Filter γ
g : γ → α
hg : Tendsto g lc l
f : α → β
hf : IsConstant ⟦f⟧
⊢ (compTendsto ⟦f⟧ g hg).IsConstant
tactic: induction f using Quotient.inductionOn with | _ f => ?_
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
l : Filter α
f✝ g✝ h : α → β
lc : Filter γ
g : γ → α
hg : Tendsto g lc l
f : α → β
hf : IsConstant ⟦f⟧
⊢ (compTendsto ⟦f⟧ g hg).IsConstant
state_after: no goals
tactic: exact isConstant_comp_tendsto hf hg
Theorem: LinearMap.inr_injective
File: Mathlib/LinearAlgebra/Prod.lean

Proof steps:
state_before: R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
M₅ : Type u_1
M₆ : Type u_2
S : Type u_3
inst✝¹³ : Semiring R
inst✝¹² : Semiring S
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid M₂
inst✝⁹ : AddCommMonoid M₃
inst✝⁸ : AddCommMonoid M₄
inst✝⁷ : AddCommMonoid M₅
inst✝⁶ : AddCommMonoid M₆
inst✝⁵ : Module R M
inst✝⁴ : Module R M₂
inst✝³ : Module R M₃
inst✝² : Module R M₄
inst✝¹ : Module R M₅
inst✝ : Module R M₆
f : M →ₗ[R] M₂
x✝ : M₂
⊢ ∀ ⦃a₂ : M₂⦄, (inr R M M₂) x✝ = (inr R M M₂) a₂ → x✝ = a₂
state_after: no goals
tactic: simp
Theorem: FiniteDimensional.rank_linearMap_self
File: Mathlib/LinearAlgebra/FreeModule/Finite/Matrix.lean

Proof steps:
state_before: R : Type u
S : Type u'
M : Type v
N : Type w
inst✝¹⁴ : Ring R
inst✝¹³ : Ring S
inst✝¹² : AddCommGroup M
inst✝¹¹ : Module R M
inst✝¹⁰ : Module.Free R M
inst✝⁹ : Module.Finite R M
inst✝⁸ : AddCommGroup N
inst✝⁷ : Module R N
inst✝⁶ : Module S N
inst✝⁵ : SMulCommClass R S N
inst✝⁴ : StrongRankCondition R
inst✝³ : StrongRankCondition S
inst✝² : Module.Free S N
inst✝¹ : Module R S
inst✝ : SMulCommClass R S S
⊢ Module.rank S (M →ₗ[R] S) = lift.{u', v} (Module.rank R M)
state_after: no goals
tactic: rw [rank_linearMap, rank_self, lift_one, mul_one]
Theorem: IsLUB.insert
File: Mathlib/Order/Bounds/Basic.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
s✝ t : Set α
a✝ b✝ : α
inst✝ : SemilatticeSup γ
a b : γ
s : Set γ
hs : IsLUB s b
⊢ IsLUB (insert a s) (a ⊔ b)
state_after: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
s✝ t : Set α
a✝ b✝ : α
inst✝ : SemilatticeSup γ
a b : γ
s : Set γ
hs : IsLUB s b
⊢ IsLUB ({a} ∪ s) (a ⊔ b)
tactic: rw [insert_eq]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
s✝ t : Set α
a✝ b✝ : α
inst✝ : SemilatticeSup γ
a b : γ
s : Set γ
hs : IsLUB s b
⊢ IsLUB ({a} ∪ s) (a ⊔ b)
state_after: no goals
tactic: exact isLUB_singleton.union hs
Theorem: continuous_if_const
File: Mathlib/Topology/ContinuousOn.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : TopologicalSpace α
ι : Type u_5
π : ι → Type u_6
inst✝⁴ : (i : ι) → TopologicalSpace (π i)
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : TopologicalSpace δ
p : Prop
f g : α → β
inst✝ : Decidable p
hf : p → Continuous f
hg : ¬p → Continuous g
⊢ Continuous fun a => if p then f a else g a
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : TopologicalSpace α
ι : Type u_5
π : ι → Type u_6
inst✝⁴ : (i : ι) → TopologicalSpace (π i)
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : TopologicalSpace δ
p : Prop
f g : α → β
inst✝ : Decidable p
hf : p → Continuous f
hg : ¬p → Continuous g
h : p
⊢ Continuous fun a => f a

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : TopologicalSpace α
ι : Type u_5
π : ι → Type u_6
inst✝⁴ : (i : ι) → TopologicalSpace (π i)
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : TopologicalSpace δ
p : Prop
f g : α → β
inst✝ : Decidable p
hf : p → Continuous f
hg : ¬p → Continuous g
h : ¬p
⊢ Continuous fun a => g a
tactic: split_ifs with h
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : TopologicalSpace α
ι : Type u_5
π : ι → Type u_6
inst✝⁴ : (i : ι) → TopologicalSpace (π i)
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : TopologicalSpace δ
p : Prop
f g : α → β
inst✝ : Decidable p
hf : p → Continuous f
hg : ¬p → Continuous g
h : p
⊢ Continuous fun a => f a

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁵ : TopologicalSpace α
ι : Type u_5
π : ι → Type u_6
inst✝⁴ : (i : ι) → TopologicalSpace (π i)
inst✝³ : TopologicalSpace β
inst✝² : TopologicalSpace γ
inst✝¹ : TopologicalSpace δ
p : Prop
f g : α → β
inst✝ : Decidable p
hf : p → Continuous f
hg : ¬p → Continuous g
h : ¬p
⊢ Continuous fun a => g a
state_after: no goals
tactic: exacts [hf h, hg h]
Theorem: ProbabilityTheory.exponentialPDF_of_nonneg
File: Mathlib/Probability/Distributions/Exponential.lean

Proof steps:
state_before: r x : ℝ
hx : 0 ≤ x
⊢ exponentialPDF r x = ENNReal.ofReal (r * rexp (-(r * x)))
state_after: no goals
tactic: simp only [exponentialPDF_eq, if_pos hx]
Theorem: List.mapIdx_eq_nil
File: Mathlib/Data/List/Indexes.lean

Proof steps:
state_before: α : Type u
β : Type v
f : ℕ → α → β
l : List α
⊢ mapIdx f l = [] ↔ l = []
state_after: no goals
tactic: rw [List.mapIdx_eq_enum_map, List.map_eq_nil, List.enum_eq_nil]
Theorem: HasSum.sigma
File: Mathlib/Topology/Algebra/InfiniteSum/Constructions.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ✝ : Type u_3
δ : Type u_4
inst✝³ : CommMonoid α
inst✝² : TopologicalSpace α
inst✝¹ : ContinuousMul α
inst✝ : RegularSpace α
γ : β → Type u_5
f : (b : β) × γ b → α
g : β → α
a : α
ha : HasProd f a
hf : ∀ (b : β), HasProd (fun c => f ⟨b, c⟩) (g b)
⊢ HasProd g a
state_after: no goals
tactic: classical
  refine (atTop_basis.tendsto_iff (closed_nhds_basis a)).mpr ?_
  rintro s ⟨hs, hsc⟩
  rcases mem_atTop_sets.mp (ha hs) with ⟨u, hu⟩
  use u.image Sigma.fst, trivial
  intro bs hbs
  simp only [Set.mem_preimage, Finset.le_iff_subset] at hu
  have : Tendsto (fun t : Finset (Σb, γ b) ↦ ∏ p ∈ t.filter fun p ↦ p.1 ∈ bs, f p) atTop
      (𝓝 <| ∏ b ∈ bs, g b) := by
    simp only [← sigma_preimage_mk, prod_sigma]
    refine tendsto_finset_prod _ fun b _ ↦ ?_
    change
      Tendsto (fun t ↦ (fun t ↦ ∏ s ∈ t, f ⟨b, s⟩) (preimage t (Sigma.mk b) _)) atTop (𝓝 (g b))
    exact (hf b).comp (tendsto_finset_preimage_atTop_atTop (sigma_mk_injective))
  refine hsc.mem_of_tendsto this (eventually_atTop.2 ⟨u, fun t ht ↦ hu _ fun x hx ↦ ?_⟩)
  exact mem_filter.2 ⟨ht hx, hbs <| mem_image_of_mem _ hx⟩
Theorem: MeasureTheory.upcrossingsBefore_pos_eq
File: Mathlib/Probability/Martingale/Upcrossing.lean

Proof steps:
state_before: Ω : Type u_1
ι : Type u_2
m0 : MeasurableSpace Ω
μ : Measure Ω
a b : ℝ
f : ℕ → Ω → ℝ
N n m : ℕ
ω : Ω
ℱ : Filtration ℕ m0
hab : a < b
⊢ upcrossingsBefore 0 (b - a) (fun n ω => (f n ω - a)⁺) N ω = upcrossingsBefore a b f N ω
state_after: no goals
tactic: simp_rw [upcrossingsBefore, (crossing_pos_eq hab).1]
Theorem: CompleteSublattice.isCompl_iff
File: Mathlib/Order/CompleteSublattice.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : CompleteLattice α
inst✝ : CompleteLattice β
f : CompleteLatticeHom α β
L : CompleteSublattice α
a b : ↥L
⊢ IsCompl a b ↔ IsCompl ↑a ↑b
state_after: no goals
tactic: rw [isCompl_iff, isCompl_iff, CompleteSublattice.disjoint_iff, CompleteSublattice.codisjoint_iff]
Theorem: sub_one_mul_padicValNat_choose_eq_sub_sum_digits
File: Mathlib/NumberTheory/Padics/PadicVal.lean

Proof steps:
state_before: p k n : ℕ
hp : Fact (Nat.Prime p)
h : k ≤ n
⊢ (p - 1) * padicValNat p (n.choose k) = (p.digits k).sum + (p.digits (n - k)).sum - (p.digits n).sum
state_after: case h.e'_2.h.e'_6.h.e'_2.h.e'_1
p k n : ℕ
hp : Fact (Nat.Prime p)
h : k ≤ n
⊢ n = n - k + k

case h.e'_3.h.e'_6.h.e'_4.h.e'_2
p k n : ℕ
hp : Fact (Nat.Prime p)
h : k ≤ n
⊢ n = n - k + k
tactic: convert @sub_one_mul_padicValNat_choose_eq_sub_sum_digits' _ _ _ ‹_›
state_before: case h.e'_2.h.e'_6.h.e'_2.h.e'_1
p k n : ℕ
hp : Fact (Nat.Prime p)
h : k ≤ n
⊢ n = n - k + k

case h.e'_3.h.e'_6.h.e'_4.h.e'_2
p k n : ℕ
hp : Fact (Nat.Prime p)
h : k ≤ n
⊢ n = n - k + k
state_after: no goals
tactic: all_goals omega
Theorem: Batteries.AssocList.toList_replace
File: .lake/packages/batteries/Batteries/Data/AssocList.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : BEq α
a : α
b : β
l : AssocList α β
⊢ (replace a b l).toList = List.replaceF (fun x => bif x.fst == a then some (a, b) else none) l.toList
state_after: case cons
α : Type u_1
β : Type u_2
inst✝ : BEq α
a : α
b : β
key✝ : α
value✝ : β
tail✝ : AssocList α β
tail_ih✝ : (replace a b tail✝).toList = List.replaceF (fun x => bif x.fst == a then some (a, b) else none) tail✝.toList
⊢ (match key✝ == a with
      | true => cons a b tail✝
      | false => cons key✝ value✝ (replace a b tail✝)).toList =
    match bif key✝ == a then some (a, b) else none with
    | none => (key✝, value✝) :: List.replaceF (fun x => bif x.fst == a then some (a, b) else none) tail✝.toList
    | some a => a :: tail✝.toList
tactic: induction l <;> simp [replace]
state_before: case cons
α : Type u_1
β : Type u_2
inst✝ : BEq α
a : α
b : β
key✝ : α
value✝ : β
tail✝ : AssocList α β
tail_ih✝ : (replace a b tail✝).toList = List.replaceF (fun x => bif x.fst == a then some (a, b) else none) tail✝.toList
⊢ (match key✝ == a with
      | true => cons a b tail✝
      | false => cons key✝ value✝ (replace a b tail✝)).toList =
    match bif key✝ == a then some (a, b) else none with
    | none => (key✝, value✝) :: List.replaceF (fun x => bif x.fst == a then some (a, b) else none) tail✝.toList
    | some a => a :: tail✝.toList
state_after: no goals
tactic: split <;> simp [*]
Theorem: OrderEmbedding.preimage_Ico
File: Mathlib/Order/Interval/Set/OrderEmbedding.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
e : α ↪o β
x y : α
⊢ ⇑e ⁻¹' Ico (e x) (e y) = Ico x y
state_after: case h
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
e : α ↪o β
x y x✝ : α
⊢ x✝ ∈ ⇑e ⁻¹' Ico (e x) (e y) ↔ x✝ ∈ Ico x y
tactic: ext
state_before: case h
α : Type u_1
β : Type u_2
inst✝¹ : Preorder α
inst✝ : Preorder β
e : α ↪o β
x y x✝ : α
⊢ x✝ ∈ ⇑e ⁻¹' Ico (e x) (e y) ↔ x✝ ∈ Ico x y
state_after: no goals
tactic: simp
Theorem: oneLePart_inf_leOnePart_eq_one
File: Mathlib/Algebra/Order/Group/PosPart.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝³ : Lattice α
inst✝² : Group α
a✝ : α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a : α
⊢ a⁺ᵐ ⊓ a⁻ᵐ = 1
state_after: no goals
tactic: rw [← mul_left_inj a⁻ᵐ⁻¹, inf_mul, one_mul, mul_right_inv, ← div_eq_mul_inv,
    oneLePart_div_leOnePart, leOnePart_eq_inv_inf_one, inv_inv]
Theorem: BoxIntegral.Prepartition.sum_biUnion_boxes
File: Mathlib/Analysis/BoxIntegral/Partition/Basic.lean

Proof steps:
state_before: ι : Type u_1
I J J₁ J₂ : Box ι
π✝ π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ : (J : Box ι) → Prepartition J
M : Type u_2
inst✝ : AddCommMonoid M
π : Prepartition I
πi : (J : Box ι) → Prepartition J
f : Box ι → M
⊢ ∑ J ∈ π.boxes.biUnion fun J => (πi J).boxes, f J = ∑ J ∈ π.boxes, ∑ J' ∈ (πi J).boxes, f J'
state_after: ι : Type u_1
I J J₁✝ J₂✝ : Box ι
π✝ π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ : (J : Box ι) → Prepartition J
M : Type u_2
inst✝ : AddCommMonoid M
π : Prepartition I
πi : (J : Box ι) → Prepartition J
f : Box ι → M
J₁ : Box ι
h₁ : J₁ ∈ ↑π.boxes
J₂ : Box ι
h₂ : J₂ ∈ ↑π.boxes
hne : J₁ ≠ J₂
J' : Box ι
h₁' : J' ∈ (fun J => (πi J).boxes) J₁
h₂' : J' ∈ (fun J => (πi J).boxes) J₂
⊢ False
tactic: refine Finset.sum_biUnion fun J₁ h₁ J₂ h₂ hne => Finset.disjoint_left.2 fun J' h₁' h₂' => ?_
state_before: ι : Type u_1
I J J₁✝ J₂✝ : Box ι
π✝ π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ : (J : Box ι) → Prepartition J
M : Type u_2
inst✝ : AddCommMonoid M
π : Prepartition I
πi : (J : Box ι) → Prepartition J
f : Box ι → M
J₁ : Box ι
h₁ : J₁ ∈ ↑π.boxes
J₂ : Box ι
h₂ : J₂ ∈ ↑π.boxes
hne : J₁ ≠ J₂
J' : Box ι
h₁' : J' ∈ (fun J => (πi J).boxes) J₁
h₂' : J' ∈ (fun J => (πi J).boxes) J₂
⊢ False
state_after: no goals
tactic: exact hne (π.eq_of_le_of_le h₁ h₂ ((πi J₁).le_of_mem h₁') ((πi J₂).le_of_mem h₂'))
Theorem: Rack.self_act_invAct_eq
File: Mathlib/Algebra/Quandle.lean

Proof steps:
state_before: R : Type u_1
inst✝ : Rack R
x y : R
⊢ (x ◃ x) ◃⁻¹ y = x ◃⁻¹ y
state_after: R : Type u_1
inst✝ : Rack R
x y : R
⊢ (x ◃ x) ◃ (x ◃ x) ◃⁻¹ y = (x ◃ x) ◃ x ◃⁻¹ y
tactic: rw [← left_cancel (x ◃ x)]
state_before: R : Type u_1
inst✝ : Rack R
x y : R
⊢ (x ◃ x) ◃ (x ◃ x) ◃⁻¹ y = (x ◃ x) ◃ x ◃⁻¹ y
state_after: R : Type u_1
inst✝ : Rack R
x y : R
⊢ y = (x ◃ x) ◃ x ◃⁻¹ y
tactic: rw [right_inv]
state_before: R : Type u_1
inst✝ : Rack R
x y : R
⊢ y = (x ◃ x) ◃ x ◃⁻¹ y
state_after: R : Type u_1
inst✝ : Rack R
x y : R
⊢ y = x ◃ x ◃⁻¹ y
tactic: rw [self_act_act_eq]
state_before: R : Type u_1
inst✝ : Rack R
x y : R
⊢ y = x ◃ x ◃⁻¹ y
state_after: no goals
tactic: rw [right_inv]
Theorem: Bornology.isBounded_pi
File: Mathlib/Topology/Bornology/Constructions.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
⊢ IsBounded (univ.pi S) ↔ (∃ i, S i = ∅) ∨ ∀ (i : ι), IsBounded (S i)
state_after: case pos
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
hne : ∃ i, S i = ∅
⊢ IsBounded (univ.pi S) ↔ (∃ i, S i = ∅) ∨ ∀ (i : ι), IsBounded (S i)

case neg
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
hne : ¬∃ i, S i = ∅
⊢ IsBounded (univ.pi S) ↔ (∃ i, S i = ∅) ∨ ∀ (i : ι), IsBounded (S i)
tactic: by_cases hne : ∃ i, S i = ∅
Theorem: Complex.lipschitz_equivRealProd
File: Mathlib/Analysis/Complex/Basic.lean

Proof steps:
state_before: z : ℂ
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℂ E
⊢ LipschitzWith 1 ⇑equivRealProd
state_after: no goals
tactic: simpa using AddMonoidHomClass.lipschitz_of_bound equivRealProdLm 1 equivRealProd_apply_le'
Theorem: Real.volume_Iic
File: Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean

Proof steps:
state_before: ι : Type u_1
inst✝ : Fintype ι
a : ℝ
⊢ volume (Iic a) = ⊤
state_after: ι : Type u_1
inst✝ : Fintype ι
a : ℝ
⊢ volume (Iio a) = ⊤
tactic: rw [← measure_congr Iio_ae_eq_Iic]
state_before: ι : Type u_1
inst✝ : Fintype ι
a : ℝ
⊢ volume (Iio a) = ⊤
state_after: no goals
tactic: simp
Theorem: Ideal.map_mk_eq_bot_of_le
File: Mathlib/RingTheory/Ideal/QuotientOperations.lean

Proof steps:
state_before: R : Type u
S : Type v
F : Type w
inst✝¹ : CommRing R
inst✝ : Semiring S
I J : Ideal R
h : I ≤ J
⊢ map (Quotient.mk J) I = ⊥
state_after: R : Type u
S : Type v
F : Type w
inst✝¹ : CommRing R
inst✝ : Semiring S
I J : Ideal R
h : I ≤ J
⊢ I ≤ J
tactic: rw [map_eq_bot_iff_le_ker, mk_ker]
state_before: R : Type u
S : Type v
F : Type w
inst✝¹ : CommRing R
inst✝ : Semiring S
I J : Ideal R
h : I ≤ J
⊢ I ≤ J
state_after: no goals
tactic: exact h
Theorem: CategoryTheory.PrelaxFunctor.map₂_inv_hom
File: Mathlib/CategoryTheory/Bicategory/Functor/Prelax.lean

Proof steps:
state_before: B : Type u₁
inst✝² : Bicategory B
C : Type u₂
inst✝¹ : Bicategory C
D : Type u₃
inst✝ : Bicategory D
F : PrelaxFunctor B C
a b : B
f g : a ⟶ b
η : f ≅ g
⊢ F.map₂ η.inv ≫ F.map₂ η.hom = 𝟙 (F.map g)
state_after: no goals
tactic: rw [← F.map₂_comp, Iso.inv_hom_id, F.map₂_id]