ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Submonoid.closure_closure_coe_preimage
File: Mathlib/Algebra/Group/Submonoid/Operations.lean

Proof steps:
state_before: M : Type u_1
N : Type u_2
P : Type u_3
inst✝³ : MulOneClass M
inst✝² : MulOneClass N
inst✝¹ : MulOneClass P
S : Submonoid M
A : Type u_4
inst✝ : SetLike A M
hA : SubmonoidClass A M
S' : A
s : Set M
x✝¹ : { x // x ∈ ↑(closure s) }
x : M
hx : x ∈ ↑(closure s)
x✝ : ⟨x, hx⟩ ∈ ⊤
⊢ ⟨x, hx⟩ ∈ closure (Subtype.val ⁻¹' s)
state_after: case refine_1
M : Type u_1
N : Type u_2
P : Type u_3
inst✝³ : MulOneClass M
inst✝² : MulOneClass N
inst✝¹ : MulOneClass P
S : Submonoid M
A : Type u_4
inst✝ : SetLike A M
hA : SubmonoidClass A M
S' : A
s : Set M
x✝¹ : { x // x ∈ ↑(closure s) }
x : M
hx : x ∈ ↑(closure s)
x✝ : ⟨x, hx⟩ ∈ ⊤
⊢ (fun y hy => ⟨y, hy⟩ ∈ closure (Subtype.val ⁻¹' s)) 1 ⋯

case refine_2
M : Type u_1
N : Type u_2
P : Type u_3
inst✝³ : MulOneClass M
inst✝² : MulOneClass N
inst✝¹ : MulOneClass P
S : Submonoid M
A : Type u_4
inst✝ : SetLike A M
hA : SubmonoidClass A M
S' : A
s : Set M
x✝¹ : { x // x ∈ ↑(closure s) }
x : M
hx : x ∈ ↑(closure s)
x✝ : ⟨x, hx⟩ ∈ ⊤
g₁ : M
g₂ : g₁ ∈ closure s
hg₁ : M
hg₂ : hg₁ ∈ closure s
⊢ (fun y hy => ⟨y, hy⟩ ∈ closure (Subtype.val ⁻¹' s)) g₁ g₂ →
    (fun y hy => ⟨y, hy⟩ ∈ closure (Subtype.val ⁻¹' s)) hg₁ hg₂ →
      (fun y hy => ⟨y, hy⟩ ∈ closure (Subtype.val ⁻¹' s)) (g₁ * hg₁) ⋯
tactic: refine closure_induction' (p := fun y hy ↦ ⟨y, hy⟩ ∈ closure (((↑) : closure s → M) ⁻¹' s))
        (fun g hg => subset_closure hg) ?_ (fun g₁ g₂ hg₁ hg₂ => ?_) hx
Theorem: Finset.Icc_mul_Ico_subset'
File: Mathlib/Data/Finset/Pointwise/Interval.lean

Proof steps:
state_before: α : Type u_1
inst✝⁵ : Mul α
inst✝⁴ : PartialOrder α
inst✝³ : DecidableEq α
inst✝² : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1
inst✝¹ : CovariantClass α α (Function.swap HMul.hMul) LT.lt
inst✝ : LocallyFiniteOrder α
a b c d : α
⊢ ↑(Icc a b * Ico c d) ⊆ ↑(Ico (a * c) (b * d))
state_after: no goals
tactic: simpa using Set.Icc_mul_Ico_subset' _ _ _ _
Theorem: CategoryTheory.Subgroupoid.mem_im_objs_iff
File: Mathlib/CategoryTheory/Groupoid/Subgroupoid.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Groupoid C
S : Subgroupoid C
D : Type u_1
inst✝ : Groupoid D
φ : C ⥤ D
hφ : Function.Injective φ.obj
d : D
⊢ d ∈ (im φ hφ).objs ↔ ∃ c, φ.obj c = d
state_after: no goals
tactic: simp only [im, mem_map_objs_iff, mem_top_objs, true_and]
Theorem: UniformOnFun.uniformContinuous_ofUniformFun
File: Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x : α
p : Filter ι
g : ι → α
inst✝ : UniformSpace β
𝔖 : Set (Set α)
⊢ UniformContinuous fun f => (ofFun 𝔖) (UniformFun.toFun f)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x : α
p : Filter ι
g : ι → α
inst✝ : UniformSpace β
𝔖 : Set (Set α)
⊢ ∀ i ∈ 𝔖,
    ∀ i_2 ∈ 𝓤 β,
      ∃ i_4 ∈ 𝓤 β,
        ∀ ⦃x : (α →ᵤ β) × (α →ᵤ β)⦄,
          x ∈ UniformFun.gen α β i_4 →
            ((ofFun 𝔖) (UniformFun.toFun x.1), (ofFun 𝔖) (UniformFun.toFun x.2)) ∈ UniformOnFun.gen 𝔖 i i_2
tactic: simp only [UniformContinuous, UniformOnFun.uniformity_eq, tendsto_iInf, tendsto_principal,
    (UniformFun.hasBasis_uniformity _ _).eventually_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
s s' : Set α
x : α
p : Filter ι
g : ι → α
inst✝ : UniformSpace β
𝔖 : Set (Set α)
⊢ ∀ i ∈ 𝔖,
    ∀ i_2 ∈ 𝓤 β,
      ∃ i_4 ∈ 𝓤 β,
        ∀ ⦃x : (α →ᵤ β) × (α →ᵤ β)⦄,
          x ∈ UniformFun.gen α β i_4 →
            ((ofFun 𝔖) (UniformFun.toFun x.1), (ofFun 𝔖) (UniformFun.toFun x.2)) ∈ UniformOnFun.gen 𝔖 i i_2
state_after: no goals
tactic: exact fun _ _ U hU ↦ ⟨U, hU, fun f hf x _ ↦ hf x⟩
Theorem: basis_toMatrix_mul_linearMap_toMatrix_mul_basis_toMatrix
File: Mathlib/LinearAlgebra/Matrix/Basis.lean

Proof steps:
state_before: ι : Type u_1
ι' : Type u_2
κ : Type u_3
κ' : Type u_4
R : Type u_5
M : Type u_6
inst✝¹³ : CommSemiring R
inst✝¹² : AddCommMonoid M
inst✝¹¹ : Module R M
R₂ : Type u_7
M₂ : Type u_8
inst✝¹⁰ : CommRing R₂
inst✝⁹ : AddCommGroup M₂
inst✝⁸ : Module R₂ M₂
e : Basis ι R M
v : ι' → M
i : ι
j : ι'
N : Type u_9
inst✝⁷ : AddCommMonoid N
inst✝⁶ : Module R N
b : Basis ι R M
b' : Basis ι' R M
c : Basis κ R N
c' : Basis κ' R N
f : M →ₗ[R] N
inst✝⁵ : Fintype ι'
inst✝⁴ : Finite κ
inst✝³ : Fintype ι
inst✝² : Fintype κ'
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq ι'
⊢ c.toMatrix ⇑c' * (toMatrix b' c') f * b'.toMatrix ⇑b = (toMatrix b c) f
state_after: case intro
ι : Type u_1
ι' : Type u_2
κ : Type u_3
κ' : Type u_4
R : Type u_5
M : Type u_6
inst✝¹³ : CommSemiring R
inst✝¹² : AddCommMonoid M
inst✝¹¹ : Module R M
R₂ : Type u_7
M₂ : Type u_8
inst✝¹⁰ : CommRing R₂
inst✝⁹ : AddCommGroup M₂
inst✝⁸ : Module R₂ M₂
e : Basis ι R M
v : ι' → M
i : ι
j : ι'
N : Type u_9
inst✝⁷ : AddCommMonoid N
inst✝⁶ : Module R N
b : Basis ι R M
b' : Basis ι' R M
c : Basis κ R N
c' : Basis κ' R N
f : M →ₗ[R] N
inst✝⁵ : Fintype ι'
inst✝⁴ : Finite κ
inst✝³ : Fintype ι
inst✝² : Fintype κ'
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq ι'
val✝ : Fintype κ
⊢ c.toMatrix ⇑c' * (toMatrix b' c') f * b'.toMatrix ⇑b = (toMatrix b c) f
tactic: cases nonempty_fintype κ
state_before: case intro
ι : Type u_1
ι' : Type u_2
κ : Type u_3
κ' : Type u_4
R : Type u_5
M : Type u_6
inst✝¹³ : CommSemiring R
inst✝¹² : AddCommMonoid M
inst✝¹¹ : Module R M
R₂ : Type u_7
M₂ : Type u_8
inst✝¹⁰ : CommRing R₂
inst✝⁹ : AddCommGroup M₂
inst✝⁸ : Module R₂ M₂
e : Basis ι R M
v : ι' → M
i : ι
j : ι'
N : Type u_9
inst✝⁷ : AddCommMonoid N
inst✝⁶ : Module R N
b : Basis ι R M
b' : Basis ι' R M
c : Basis κ R N
c' : Basis κ' R N
f : M →ₗ[R] N
inst✝⁵ : Fintype ι'
inst✝⁴ : Finite κ
inst✝³ : Fintype ι
inst✝² : Fintype κ'
inst✝¹ : DecidableEq ι
inst✝ : DecidableEq ι'
val✝ : Fintype κ
⊢ c.toMatrix ⇑c' * (toMatrix b' c') f * b'.toMatrix ⇑b = (toMatrix b c) f
state_after: no goals
tactic: rw [basis_toMatrix_mul_linearMap_toMatrix, linearMap_toMatrix_mul_basis_toMatrix]
Theorem: MeasureTheory.withDensity_tsum
File: Mathlib/MeasureTheory/Measure/WithDensity.lean

Proof steps:
state_before: α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
ι : Type u_2
inst✝ : Countable ι
f : ι → α → ℝ≥0∞
h : ∀ (i : ι), Measurable (f i)
⊢ μ.withDensity (∑' (n : ι), f n) = sum fun n => μ.withDensity (f n)
state_after: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
ι : Type u_2
inst✝ : Countable ι
f : ι → α → ℝ≥0∞
h : ∀ (i : ι), Measurable (f i)
s : Set α
hs : MeasurableSet s
⊢ (μ.withDensity (∑' (n : ι), f n)) s = (sum fun n => μ.withDensity (f n)) s
tactic: ext1 s hs
state_before: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
ι : Type u_2
inst✝ : Countable ι
f : ι → α → ℝ≥0∞
h : ∀ (i : ι), Measurable (f i)
s : Set α
hs : MeasurableSet s
⊢ (μ.withDensity (∑' (n : ι), f n)) s = (sum fun n => μ.withDensity (f n)) s
state_after: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
ι : Type u_2
inst✝ : Countable ι
f : ι → α → ℝ≥0∞
h : ∀ (i : ι), Measurable (f i)
s : Set α
hs : MeasurableSet s
⊢ ∫⁻ (a : α) in s, tsum (fun n => f n) a ∂μ = ∑' (i : ι), ∫⁻ (a : α) in s, f i a ∂μ
tactic: simp_rw [sum_apply _ hs, withDensity_apply _ hs]
state_before: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
ι : Type u_2
inst✝ : Countable ι
f : ι → α → ℝ≥0∞
h : ∀ (i : ι), Measurable (f i)
s : Set α
hs : MeasurableSet s
⊢ ∫⁻ (a : α) in s, tsum (fun n => f n) a ∂μ = ∑' (i : ι), ∫⁻ (a : α) in s, f i a ∂μ
state_after: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
ι : Type u_2
inst✝ : Countable ι
f : ι → α → ℝ≥0∞
h : ∀ (i : ι), Measurable (f i)
s : Set α
hs : MeasurableSet s
⊢ ∫⁻ (x : α) in s, tsum (fun n => f n) x ∂μ = ∑' (i : ι), ∫⁻ (x : α) in s, f i x ∂μ
tactic: change ∫⁻ x in s, (∑' n, f n) x ∂μ = ∑' i, ∫⁻ x, f i x ∂μ.restrict s
state_before: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
ι : Type u_2
inst✝ : Countable ι
f : ι → α → ℝ≥0∞
h : ∀ (i : ι), Measurable (f i)
s : Set α
hs : MeasurableSet s
⊢ ∫⁻ (x : α) in s, tsum (fun n => f n) x ∂μ = ∑' (i : ι), ∫⁻ (x : α) in s, f i x ∂μ
state_after: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
ι : Type u_2
inst✝ : Countable ι
f : ι → α → ℝ≥0∞
h : ∀ (i : ι), Measurable (f i)
s : Set α
hs : MeasurableSet s
⊢ ∫⁻ (x : α) in s, tsum (fun n => f n) x ∂μ = ∫⁻ (a : α) in s, ∑' (i : ι), f i a ∂μ
tactic: rw [← lintegral_tsum fun i => (h i).aemeasurable]
state_before: case h
α : Type u_1
m0 : MeasurableSpace α
μ : Measure α
ι : Type u_2
inst✝ : Countable ι
f : ι → α → ℝ≥0∞
h : ∀ (i : ι), Measurable (f i)
s : Set α
hs : MeasurableSet s
⊢ ∫⁻ (x : α) in s, tsum (fun n => f n) x ∂μ = ∫⁻ (a : α) in s, ∑' (i : ι), f i a ∂μ
state_after: no goals
tactic: exact lintegral_congr fun x => tsum_apply (Pi.summable.2 fun _ => ENNReal.summable)
Theorem: MvPolynomial.degrees_add_of_disjoint
File: Mathlib/Algebra/MvPolynomial/Degrees.lean

Proof steps:
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
p✝ q✝ : MvPolynomial σ R
inst✝ : DecidableEq σ
p q : MvPolynomial σ R
h : p.degrees.Disjoint q.degrees
⊢ (p + q).degrees = p.degrees ∪ q.degrees
state_after: case a
R : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
p✝ q✝ : MvPolynomial σ R
inst✝ : DecidableEq σ
p q : MvPolynomial σ R
h : p.degrees.Disjoint q.degrees
⊢ (p + q).degrees ≤ p.degrees ∪ q.degrees

case a
R : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
p✝ q✝ : MvPolynomial σ R
inst✝ : DecidableEq σ
p q : MvPolynomial σ R
h : p.degrees.Disjoint q.degrees
⊢ p.degrees ∪ q.degrees ≤ (p + q).degrees
tactic: apply le_antisymm
Theorem: holderOnWith_one
File: Mathlib/Topology/MetricSpace/Holder.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : PseudoEMetricSpace X
inst✝¹ : PseudoEMetricSpace Y
inst✝ : PseudoEMetricSpace Z
C : ℝ≥0
f : X → Y
s : Set X
⊢ HolderOnWith C 1 f s ↔ LipschitzOnWith C f s
state_after: no goals
tactic: simp only [HolderOnWith, LipschitzOnWith, NNReal.coe_one, ENNReal.rpow_one]
Theorem: ZFSet.map_fval
File: Mathlib/SetTheory/ZFC/Basic.lean

Proof steps:
state_before: f : ZFSet → ZFSet
H : PSet.Definable 1 f
x y : ZFSet
h : y ∈ x
z : ZFSet
⊢ Class.ToSet (fun x_1 => ↑(map f x) (x_1.pair z)) ↑y ↔ z = f y
state_after: f : ZFSet → ZFSet
H : PSet.Definable 1 f
x y : ZFSet
h : y ∈ x
z : ZFSet
⊢ (∃ z_1 ∈ x, z_1.pair (f z_1) = y.pair z) ↔ z = f y
tactic: rw [Class.toSet_of_ZFSet, Class.coe_apply, mem_map]
state_before: f : ZFSet → ZFSet
H : PSet.Definable 1 f
x y : ZFSet
h : y ∈ x
z : ZFSet
⊢ (∃ z_1 ∈ x, z_1.pair (f z_1) = y.pair z) ↔ z = f y
state_after: no goals
tactic: exact
      ⟨fun ⟨w, _, pr⟩ => by
        let ⟨wy, fw⟩ := ZFSet.pair_injective pr
        rw [← fw, wy], fun e => by
        subst e
        exact ⟨_, h, rfl⟩⟩
Theorem: ciSup_partialSups_eq
File: Mathlib/Order/PartialSups.lean

Proof steps:
state_before: α : Type u_1
inst✝ : ConditionallyCompleteLattice α
f : ℕ → α
h : BddAbove (Set.range f)
⊢ ⨆ n, (partialSups f) n = ⨆ n, f n
state_after: case refine_1
α : Type u_1
inst✝ : ConditionallyCompleteLattice α
f : ℕ → α
h : BddAbove (Set.range f)
n : ℕ
⊢ (partialSups f) n ≤ ⨆ n, f n

case refine_2
α : Type u_1
inst✝ : ConditionallyCompleteLattice α
f : ℕ → α
h : BddAbove (Set.range f)
⊢ BddAbove (Set.range fun n => (partialSups f) n)
tactic: refine (ciSup_le fun n => ?_).antisymm (ciSup_mono ?_ <| le_partialSups f)
Theorem: Matroid.map_id
File: Mathlib/Data/Matroid/Map.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
f : α → β
E I s : Set α
M : Matroid α
N : Matroid β
⊢ M.map id ⋯ = M
state_after: no goals
tactic: simp [eq_iff_indep_iff_indep_forall]
Theorem: ENNReal.pow_rpow_inv_natCast
File: Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean

Proof steps:
state_before: n : ℕ
hn : n ≠ 0
x : ℝ≥0∞
⊢ (x ^ n) ^ (↑n)⁻¹ = x
state_after: no goals
tactic: rw [← rpow_natCast, ← rpow_mul, mul_inv_cancel (by positivity), rpow_one]
Theorem: MeasureTheory.AEStronglyMeasurable.prod_swap
File: Mathlib/MeasureTheory/Constructions/Prod/Integral.lean

Proof steps:
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ✝ : Type u_5
E : Type u_6
inst✝⁸ : MeasurableSpace α
inst✝⁷ : MeasurableSpace α'
inst✝⁶ : MeasurableSpace β
inst✝⁵ : MeasurableSpace β'
inst✝⁴ : MeasurableSpace γ✝
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ✝
inst✝³ : NormedAddCommGroup E
γ : Type u_7
inst✝² : TopologicalSpace γ
inst✝¹ : SFinite μ
inst✝ : SFinite ν
f : β × α → γ
hf : AEStronglyMeasurable f (ν.prod μ)
⊢ AEStronglyMeasurable (fun z => f z.swap) (μ.prod ν)
state_after: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ✝ : Type u_5
E : Type u_6
inst✝⁸ : MeasurableSpace α
inst✝⁷ : MeasurableSpace α'
inst✝⁶ : MeasurableSpace β
inst✝⁵ : MeasurableSpace β'
inst✝⁴ : MeasurableSpace γ✝
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ✝
inst✝³ : NormedAddCommGroup E
γ : Type u_7
inst✝² : TopologicalSpace γ
inst✝¹ : SFinite μ
inst✝ : SFinite ν
f : β × α → γ
hf : AEStronglyMeasurable f (map Prod.swap (μ.prod ν))
⊢ AEStronglyMeasurable (fun z => f z.swap) (μ.prod ν)
tactic: rw [← prod_swap] at hf
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ✝ : Type u_5
E : Type u_6
inst✝⁸ : MeasurableSpace α
inst✝⁷ : MeasurableSpace α'
inst✝⁶ : MeasurableSpace β
inst✝⁵ : MeasurableSpace β'
inst✝⁴ : MeasurableSpace γ✝
μ μ' : Measure α
ν ν' : Measure β
τ : Measure γ✝
inst✝³ : NormedAddCommGroup E
γ : Type u_7
inst✝² : TopologicalSpace γ
inst✝¹ : SFinite μ
inst✝ : SFinite ν
f : β × α → γ
hf : AEStronglyMeasurable f (map Prod.swap (μ.prod ν))
⊢ AEStronglyMeasurable (fun z => f z.swap) (μ.prod ν)
state_after: no goals
tactic: exact hf.comp_measurable measurable_swap
Theorem: eq_mpr_bijective
File: Mathlib/Logic/Function/Basic.lean

Proof steps:
state_before: α✝ : Sort u_1
β✝ : Sort u_2
α β : Sort u_3
h : α = β
⊢ Bijective h.mpr
state_after: case refl
α✝ : Sort u_1
β : Sort u_2
α : Sort u_3
⊢ Bijective ⋯.mpr
tactic: cases h
state_before: case refl
α✝ : Sort u_1
β : Sort u_2
α : Sort u_3
⊢ Bijective ⋯.mpr
state_after: no goals
tactic: exact ⟨fun _ _ ↦ id, fun x ↦ ⟨x, rfl⟩⟩
Theorem: PMF.map_const
File: Mathlib/Probability/ProbabilityMassFunction/Constructions.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f : α → β
p : PMF α
b : β
⊢ map (Function.const α b) p = pure b
state_after: no goals
tactic: simp only [map, Function.comp, bind_const, Function.const]
Theorem: BoxIntegral.Prepartition.exists_iUnion_eq_diff
File: Mathlib/Analysis/BoxIntegral/Partition/Split.lean

Proof steps:
state_before: ι : Type u_1
M : Type u_2
n : ℕ
I J : Box ι
i : ι
x : ℝ
inst✝ : Finite ι
π : Prepartition I
⊢ ∃ π', π'.iUnion = ↑I \ π.iUnion
state_after: case intro
ι : Type u_1
M : Type u_2
n : ℕ
I J : Box ι
i : ι
x : ℝ
inst✝ : Finite ι
π : Prepartition I
s : Finset (ι × ℝ)
hs : π ⊓ splitMany I s = (splitMany I s).filter fun J => ↑J ⊆ π.iUnion
⊢ ∃ π', π'.iUnion = ↑I \ π.iUnion
tactic: rcases π.eventually_splitMany_inf_eq_filter.exists with ⟨s, hs⟩
state_before: case intro
ι : Type u_1
M : Type u_2
n : ℕ
I J : Box ι
i : ι
x : ℝ
inst✝ : Finite ι
π : Prepartition I
s : Finset (ι × ℝ)
hs : π ⊓ splitMany I s = (splitMany I s).filter fun J => ↑J ⊆ π.iUnion
⊢ ∃ π', π'.iUnion = ↑I \ π.iUnion
state_after: case h
ι : Type u_1
M : Type u_2
n : ℕ
I J : Box ι
i : ι
x : ℝ
inst✝ : Finite ι
π : Prepartition I
s : Finset (ι × ℝ)
hs : π ⊓ splitMany I s = (splitMany I s).filter fun J => ↑J ⊆ π.iUnion
⊢ ((splitMany I s).filter fun J => ¬↑J ⊆ π.iUnion).iUnion = ↑I \ π.iUnion
tactic: use (splitMany I s).filter fun J => ¬(J : Set (ι → ℝ)) ⊆ π.iUnion
state_before: case h
ι : Type u_1
M : Type u_2
n : ℕ
I J : Box ι
i : ι
x : ℝ
inst✝ : Finite ι
π : Prepartition I
s : Finset (ι × ℝ)
hs : π ⊓ splitMany I s = (splitMany I s).filter fun J => ↑J ⊆ π.iUnion
⊢ ((splitMany I s).filter fun J => ¬↑J ⊆ π.iUnion).iUnion = ↑I \ π.iUnion
state_after: no goals
tactic: simp [← hs]
Theorem: Set.Finite.cofinite_inf_principal_diff
File: Mathlib/Order/Filter/Cofinite.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
l : Filter α
s t : Set α
ht : t.Finite
⊢ cofinite ⊓ 𝓟 (s \ t) = cofinite ⊓ 𝓟 s
state_after: no goals
tactic: rw [diff_eq, ← inf_principal, ← inf_assoc, inf_right_comm, ht.cofinite_inf_principal_compl]
Theorem: TrivSqZeroExt.inv_zero
File: Mathlib/Algebra/TrivSqZeroExt.lean

Proof steps:
state_before: R : Type u
M : Type v
inst✝⁴ : DivisionSemiring R
inst✝³ : AddCommGroup M
inst✝² : Module Rᵐᵒᵖ M
inst✝¹ : Module R M
inst✝ : SMulCommClass R Rᵐᵒᵖ M
⊢ 0⁻¹ = 0
state_after: no goals
tactic: rw [← inl_zero, TrivSqZeroExt.inv_inl, inv_zero]
Theorem: MvFunctor.LiftR_def
File: Mathlib/Control/Functor/Multivariate.lean

Proof steps:
state_before: n : ℕ
α β γ : TypeVec.{u} n
F : TypeVec.{u} n → Type v
inst✝¹ : MvFunctor F
P : α ⟹ TypeVec.repeat n Prop
R : α ⊗ α ⟹ TypeVec.repeat n Prop
inst✝ : LawfulMvFunctor F
x y : F α
⊢ ∀ (u : F fun i => { p // (fun i x y => ofRepeat (R i (prod.mk i x y))) i p.1 p.2 }),
    (fun i t => (↑t).1) <$$> u = x ∧ (fun i t => (↑t).2) <$$> u = y ↔
      (prod.fst ⊚ subtypeVal R) <$$> toSubtype' R <$$> u = x ∧ (prod.snd ⊚ subtypeVal R) <$$> toSubtype' R <$$> u = y
state_after: n : ℕ
α β γ : TypeVec.{u} n
F : TypeVec.{u} n → Type v
inst✝¹ : MvFunctor F
P : α ⟹ TypeVec.repeat n Prop
R : α ⊗ α ⟹ TypeVec.repeat n Prop
inst✝ : LawfulMvFunctor F
x y : F α
⊢ ∀ (u : F fun i => { p // ofRepeat (R i (prod.mk i p.1 p.2)) }),
    (fun i t => (↑t).1) <$$> u = x ∧ (fun i t => (↑t).2) <$$> u = y ↔
      (prod.fst ⊚ fun i x => prod.mk i (↑x).1 (↑x).2) <$$> u = x ∧
        (prod.snd ⊚ fun i x => prod.mk i (↑x).1 (↑x).2) <$$> u = y
tactic: simp only [map_map, comp_assoc, subtypeVal_toSubtype']
state_before: n : ℕ
α β γ : TypeVec.{u} n
F : TypeVec.{u} n → Type v
inst✝¹ : MvFunctor F
P : α ⟹ TypeVec.repeat n Prop
R : α ⊗ α ⟹ TypeVec.repeat n Prop
inst✝ : LawfulMvFunctor F
x y : F α
⊢ ∀ (u : F fun i => { p // ofRepeat (R i (prod.mk i p.1 p.2)) }),
    (fun i t => (↑t).1) <$$> u = x ∧ (fun i t => (↑t).2) <$$> u = y ↔
      (prod.fst ⊚ fun i x => prod.mk i (↑x).1 (↑x).2) <$$> u = x ∧
        (prod.snd ⊚ fun i x => prod.mk i (↑x).1 (↑x).2) <$$> u = y
state_after: no goals
tactic: simp (config := { unfoldPartialApp := true }) [comp]
Theorem: CategoryTheory.OverPresheafAux.MakesOverArrow.map₂
File: Mathlib/CategoryTheory/Comma/Presheaf.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
A F : Cᵒᵖ ⥤ Type v
η : F ⟶ A
X Y : C
f : X ⟶ Y
s : yoneda.obj X ⟶ A
t : yoneda.obj Y ⟶ A
hst : yoneda.map f ≫ t = s
u : F.obj (op Y)
h : MakesOverArrow η t u
⊢ η.app (op X) (F.map f.op u) = yonedaEquiv s
state_after: no goals
tactic: rw [elementwise_of% η.naturality, h.app, yonedaEquiv_naturality, hst]
Theorem: Polynomial.smeval_monomial
File: Mathlib/Algebra/Polynomial/Smeval.lean

Proof steps:
state_before: R : Type u_1
inst✝³ : Semiring R
r : R
p : R[X]
S : Type u_2
inst✝² : AddCommMonoid S
inst✝¹ : Pow S ℕ
inst✝ : MulActionWithZero R S
x : S
n : ℕ
⊢ ((monomial n) r).smeval x = r • x ^ n
state_after: no goals
tactic: simp only [smeval_eq_sum, smul_pow, zero_smul, sum_monomial_index]
Theorem: toIocMod_sub_eq_sub
File: Mathlib/Algebra/Order/ToIntervalMod.lean

Proof steps:
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c✝ : α
n : ℤ
a b c : α
⊢ toIocMod hp a (b - c) = toIocMod hp (a + c) b - c
state_after: no goals
tactic: simp_rw [toIocMod, toIocDiv_sub_eq_toIocDiv_add, sub_right_comm]
Theorem: List.rdropWhile_concat
File: Mathlib/Data/List/DropRight.lean

Proof steps:
state_before: α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
⊢ rdropWhile p (l ++ [x]) = if p x = true then rdropWhile p l else l ++ [x]
state_after: α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
⊢ (match p x with
      | true => dropWhile p l.reverse
      | false => x :: l.reverse).reverse =
    if p x = true then (dropWhile p l.reverse).reverse else l ++ [x]
tactic: simp only [rdropWhile, dropWhile, reverse_append, reverse_singleton, singleton_append]
state_before: α : Type u_1
p : α → Bool
l : List α
n : ℕ
x : α
⊢ (match p x with
      | true => dropWhile p l.reverse
      | false => x :: l.reverse).reverse =
    if p x = true then (dropWhile p l.reverse).reverse else l ++ [x]
state_after: no goals
tactic: split_ifs with h <;> simp [h]
Theorem: NumberField.det_basisOfFractionalIdeal_eq_absNorm
File: Mathlib/NumberTheory/NumberField/FractionalIdeal.lean

Proof steps:
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
I : (FractionalIdeal (𝓞 K)⁰ K)ˣ
e : Free.ChooseBasisIndex ℤ (𝓞 K) ≃ Free.ChooseBasisIndex ℤ ↥↑↑I
⊢ |(integralBasis K).det ⇑((basisOfFractionalIdeal K I).reindex e.symm)| = FractionalIdeal.absNorm ↑I
state_after: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
I : (FractionalIdeal (𝓞 K)⁰ K)ˣ
e : Free.ChooseBasisIndex ℤ (𝓞 K) ≃ Free.ChooseBasisIndex ℤ ↥↑↑I
⊢ |(integralBasis K).det ⇑((basisOfFractionalIdeal K I).reindex e.symm)| =
    |(Basis.localizationLocalization ℚ ℤ⁰ K (RingOfIntegers.basis K)).det
        (Subtype.val ∘ ⇑((fractionalIdealBasis K ↑I).reindex e.symm))|
tactic: rw [← FractionalIdeal.abs_det_basis_change (RingOfIntegers.basis K) I.1
    ((fractionalIdealBasis K I.1).reindex e.symm)]
state_before: K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
I : (FractionalIdeal (𝓞 K)⁰ K)ˣ
e : Free.ChooseBasisIndex ℤ (𝓞 K) ≃ Free.ChooseBasisIndex ℤ ↥↑↑I
⊢ |(integralBasis K).det ⇑((basisOfFractionalIdeal K I).reindex e.symm)| =
    |(Basis.localizationLocalization ℚ ℤ⁰ K (RingOfIntegers.basis K)).det
        (Subtype.val ∘ ⇑((fractionalIdealBasis K ↑I).reindex e.symm))|
state_after: case e_a.h.e_6.h
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
I : (FractionalIdeal (𝓞 K)⁰ K)ˣ
e : Free.ChooseBasisIndex ℤ (𝓞 K) ≃ Free.ChooseBasisIndex ℤ ↥↑↑I
⊢ ⇑((basisOfFractionalIdeal K I).reindex e.symm) = Subtype.val ∘ ⇑((fractionalIdealBasis K ↑I).reindex e.symm)
tactic: congr
state_before: case e_a.h.e_6.h
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
I : (FractionalIdeal (𝓞 K)⁰ K)ˣ
e : Free.ChooseBasisIndex ℤ (𝓞 K) ≃ Free.ChooseBasisIndex ℤ ↥↑↑I
⊢ ⇑((basisOfFractionalIdeal K I).reindex e.symm) = Subtype.val ∘ ⇑((fractionalIdealBasis K ↑I).reindex e.symm)
state_after: case e_a.h.e_6.h.h
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
I : (FractionalIdeal (𝓞 K)⁰ K)ˣ
e : Free.ChooseBasisIndex ℤ (𝓞 K) ≃ Free.ChooseBasisIndex ℤ ↥↑↑I
x✝ : Free.ChooseBasisIndex ℤ (𝓞 K)
⊢ ((basisOfFractionalIdeal K I).reindex e.symm) x✝ = (Subtype.val ∘ ⇑((fractionalIdealBasis K ↑I).reindex e.symm)) x✝
tactic: ext
state_before: case e_a.h.e_6.h.h
K : Type u_1
inst✝¹ : Field K
inst✝ : NumberField K
I : (FractionalIdeal (𝓞 K)⁰ K)ˣ
e : Free.ChooseBasisIndex ℤ (𝓞 K) ≃ Free.ChooseBasisIndex ℤ ↥↑↑I
x✝ : Free.ChooseBasisIndex ℤ (𝓞 K)
⊢ ((basisOfFractionalIdeal K I).reindex e.symm) x✝ = (Subtype.val ∘ ⇑((fractionalIdealBasis K ↑I).reindex e.symm)) x✝
state_after: no goals
tactic: simpa using basisOfFractionalIdeal_apply K I _
Theorem: ArithmeticFunction.cardDistinctFactors_apply_prime
File: Mathlib/NumberTheory/ArithmeticFunction.lean

Proof steps:
state_before: R : Type u_1
p : ℕ
hp : Nat.Prime p
⊢ ω p = 1
state_after: no goals
tactic: rw [← pow_one p, cardDistinctFactors_apply_prime_pow hp one_ne_zero]
Theorem: List.ofFn_injective
File: Mathlib/Data/List/OfFn.lean

Proof steps:
state_before: α : Type u
n : ℕ
f g : Fin n → α
h : ofFn f = ofFn g
⊢ HEq f g
state_after: α : Type u
n : ℕ
f g : Fin n → α
h : ⟨n, f⟩ = ⟨n, g⟩
⊢ HEq f g
tactic: rw [ofFn_inj'] at h
state_before: α : Type u
n : ℕ
f g : Fin n → α
h : ⟨n, f⟩ = ⟨n, g⟩
⊢ HEq f g
state_after: case refl
α : Type u
n : ℕ
f : Fin n → α
⊢ HEq f f
tactic: cases h
state_before: case refl
α : Type u
n : ℕ
f : Fin n → α
⊢ HEq f f
state_after: no goals
tactic: rfl
Theorem: upperClosure_mul_distrib
File: Mathlib/Algebra/Order/UpperLower.lean

Proof steps:
state_before: α : Type u_1
inst✝ : OrderedCommGroup α
s t : Set α
a : α
⊢ ↑(upperClosure (s * t)) = ↑(upperClosure s * upperClosure t)
state_after: no goals
tactic: rw [UpperSet.coe_mul, mul_upperClosure, upperClosure_mul, UpperSet.upperClosure]