ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: MeasureTheory.Measure.isEverywherePos_iff_of_forall_exists_nhds_eq
File: Mathlib/MeasureTheory/Measure/EverywherePos.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ ν : Measure α
s k : Set α
h : ∀ x ∈ s, ∃ t ∈ 𝓝 x, ∀ u ⊆ t, ν u = μ u
⊢ ν.IsEverywherePos s ↔ μ.IsEverywherePos s
state_after: α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ ν : Measure α
s k : Set α
h : ∀ x ∈ s, ∃ t ∈ 𝓝 x, ∀ u ⊆ t, ν u = μ u
H : ν.IsEverywherePos s
⊢ ∀ x ∈ s, ∃ t ∈ 𝓝 x, ∀ u ⊆ t, μ u = ν u
tactic: refine ⟨fun H ↦ H.of_forall_exists_nhds_eq ?_, fun H ↦ H.of_forall_exists_nhds_eq h⟩
state_before: α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ ν : Measure α
s k : Set α
h : ∀ x ∈ s, ∃ t ∈ 𝓝 x, ∀ u ⊆ t, ν u = μ u
H : ν.IsEverywherePos s
⊢ ∀ x ∈ s, ∃ t ∈ 𝓝 x, ∀ u ⊆ t, μ u = ν u
state_after: α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ ν : Measure α
s k : Set α
h : ∀ x ∈ s, ∃ t ∈ 𝓝 x, ∀ u ⊆ t, ν u = μ u
H : ν.IsEverywherePos s
x : α
hx : x ∈ s
⊢ ∃ t ∈ 𝓝 x, ∀ u ⊆ t, μ u = ν u
tactic: intro x hx
state_before: α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ ν : Measure α
s k : Set α
h : ∀ x ∈ s, ∃ t ∈ 𝓝 x, ∀ u ⊆ t, ν u = μ u
H : ν.IsEverywherePos s
x : α
hx : x ∈ s
⊢ ∃ t ∈ 𝓝 x, ∀ u ⊆ t, μ u = ν u
state_after: case intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ ν : Measure α
s k : Set α
h : ∀ x ∈ s, ∃ t ∈ 𝓝 x, ∀ u ⊆ t, ν u = μ u
H : ν.IsEverywherePos s
x : α
hx : x ∈ s
t : Set α
ht : t ∈ 𝓝 x
h't : ∀ u ⊆ t, ν u = μ u
⊢ ∃ t ∈ 𝓝 x, ∀ u ⊆ t, μ u = ν u
tactic: rcases h x hx with ⟨t, ht, h't⟩
state_before: case intro.intro
α : Type u_1
inst✝¹ : TopologicalSpace α
inst✝ : MeasurableSpace α
μ ν : Measure α
s k : Set α
h : ∀ x ∈ s, ∃ t ∈ 𝓝 x, ∀ u ⊆ t, ν u = μ u
H : ν.IsEverywherePos s
x : α
hx : x ∈ s
t : Set α
ht : t ∈ 𝓝 x
h't : ∀ u ⊆ t, ν u = μ u
⊢ ∃ t ∈ 𝓝 x, ∀ u ⊆ t, μ u = ν u
state_after: no goals
tactic: exact ⟨t, ht, fun u hu ↦ (h't u hu).symm⟩
Theorem: Polynomial.algEquivOfCompEqX_apply
File: Mathlib/Algebra/Polynomial/AlgebraMap.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
A : Type z
A' : Type u_1
B : Type u_2
a b : R
n : ℕ
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
inst✝⁴ : CommSemiring A'
inst✝³ : Semiring B
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R B
p✝ q✝ : R[X]
x : A
p q : R[X]
hpq : p.comp q = X
hqp : q.comp p = X
⊢ R[X] ≃ₐ[R] R[X]
state_after: no goals
tactic: refine AlgEquiv.ofAlgHom (aeval p) (aeval q) ?_ ?_ <;>
    exact AlgHom.ext fun _ ↦ by simp [← comp_eq_aeval, comp_assoc, hpq, hqp]
Theorem: AddSubmonoid.eq_bot_of_subsingleton
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
inst✝ : Subsingleton ↥S
⊢ S = ⊥
state_after: 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
inst✝ : Subsingleton ↥S
⊢ ∀ x ∈ S, x = 1
tactic: rw [eq_bot_iff_forall]
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
inst✝ : Subsingleton ↥S
⊢ ∀ x ∈ S, x = 1
state_after: 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
inst✝ : Subsingleton ↥S
y : M
hy : y ∈ S
⊢ y = 1
tactic: intro y hy
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
inst✝ : Subsingleton ↥S
y : M
hy : y ∈ S
⊢ y = 1
state_after: no goals
tactic: simpa using congr_arg ((↑) : S → M) <| Subsingleton.elim (⟨y, hy⟩ : S) 1
Theorem: toZ_iterate_succ_of_not_isMax
File: Mathlib/Order/SuccPred/LinearLocallyFinite.lean

Proof steps:
state_before: ι : Type u_1
inst✝³ : LinearOrder ι
inst✝² : SuccOrder ι
inst✝¹ : IsSuccArchimedean ι
inst✝ : PredOrder ι
i0 i : ι
n : ℕ
hn : ¬IsMax (succ^[n] i0)
⊢ toZ i0 (succ^[n] i0) = ↑n
state_after: ι : Type u_1
inst✝³ : LinearOrder ι
inst✝² : SuccOrder ι
inst✝¹ : IsSuccArchimedean ι
inst✝ : PredOrder ι
i0 i : ι
n : ℕ
hn : ¬IsMax (succ^[n] i0)
m : ℕ := (toZ i0 (succ^[n] i0)).toNat
⊢ toZ i0 (succ^[n] i0) = ↑n
tactic: let m := (toZ i0 (succ^[n] i0)).toNat
state_before: ι : Type u_1
inst✝³ : LinearOrder ι
inst✝² : SuccOrder ι
inst✝¹ : IsSuccArchimedean ι
inst✝ : PredOrder ι
i0 i : ι
n : ℕ
hn : ¬IsMax (succ^[n] i0)
m : ℕ := (toZ i0 (succ^[n] i0)).toNat
⊢ toZ i0 (succ^[n] i0) = ↑n
state_after: ι : Type u_1
inst✝³ : LinearOrder ι
inst✝² : SuccOrder ι
inst✝¹ : IsSuccArchimedean ι
inst✝ : PredOrder ι
i0 i : ι
n : ℕ
hn : ¬IsMax (succ^[n] i0)
m : ℕ := (toZ i0 (succ^[n] i0)).toNat
h_eq : succ^[m] i0 = succ^[n] i0
⊢ toZ i0 (succ^[n] i0) = ↑n
tactic: have h_eq : succ^[m] i0 = succ^[n] i0 := iterate_succ_toZ _ (le_succ_iterate _ _)
state_before: ι : Type u_1
inst✝³ : LinearOrder ι
inst✝² : SuccOrder ι
inst✝¹ : IsSuccArchimedean ι
inst✝ : PredOrder ι
i0 i : ι
n : ℕ
hn : ¬IsMax (succ^[n] i0)
m : ℕ := (toZ i0 (succ^[n] i0)).toNat
h_eq : succ^[m] i0 = succ^[n] i0
⊢ toZ i0 (succ^[n] i0) = ↑n
state_after: case pos
ι : Type u_1
inst✝³ : LinearOrder ι
inst✝² : SuccOrder ι
inst✝¹ : IsSuccArchimedean ι
inst✝ : PredOrder ι
i0 i : ι
n : ℕ
hn : ¬IsMax (succ^[n] i0)
m : ℕ := (toZ i0 (succ^[n] i0)).toNat
h_eq : succ^[m] i0 = succ^[n] i0
hmn : m = n
⊢ toZ i0 (succ^[n] i0) = ↑n

case neg
ι : Type u_1
inst✝³ : LinearOrder ι
inst✝² : SuccOrder ι
inst✝¹ : IsSuccArchimedean ι
inst✝ : PredOrder ι
i0 i : ι
n : ℕ
hn : ¬IsMax (succ^[n] i0)
m : ℕ := (toZ i0 (succ^[n] i0)).toNat
h_eq : succ^[m] i0 = succ^[n] i0
hmn : ¬m = n
⊢ toZ i0 (succ^[n] i0) = ↑n
tactic: by_cases hmn : m = n
state_before: case neg
ι : Type u_1
inst✝³ : LinearOrder ι
inst✝² : SuccOrder ι
inst✝¹ : IsSuccArchimedean ι
inst✝ : PredOrder ι
i0 i : ι
n : ℕ
hn : ¬IsMax (succ^[n] i0)
m : ℕ := (toZ i0 (succ^[n] i0)).toNat
h_eq : succ^[m] i0 = succ^[n] i0
hmn : ¬m = n
⊢ toZ i0 (succ^[n] i0) = ↑n
state_after: case neg
ι : Type u_1
inst✝³ : LinearOrder ι
inst✝² : SuccOrder ι
inst✝¹ : IsSuccArchimedean ι
inst✝ : PredOrder ι
i0 i : ι
n : ℕ
hn : ¬IsMax (succ^[n] i0)
m : ℕ := (toZ i0 (succ^[n] i0)).toNat
h_eq : succ^[m] i0 = succ^[n] i0
hmn : ¬m = n
⊢ IsMax (succ^[n] i0)
tactic: suffices IsMax (succ^[n] i0) from absurd this hn
state_before: case neg
ι : Type u_1
inst✝³ : LinearOrder ι
inst✝² : SuccOrder ι
inst✝¹ : IsSuccArchimedean ι
inst✝ : PredOrder ι
i0 i : ι
n : ℕ
hn : ¬IsMax (succ^[n] i0)
m : ℕ := (toZ i0 (succ^[n] i0)).toNat
h_eq : succ^[m] i0 = succ^[n] i0
hmn : ¬m = n
⊢ IsMax (succ^[n] i0)
state_after: no goals
tactic: exact isMax_iterate_succ_of_eq_of_ne h_eq.symm (Ne.symm hmn)
Theorem: CategoryTheory.CategoryOfElements.toCostructuredArrow_obj
File: Mathlib/CategoryTheory/Elements.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
F✝ : C ⥤ Type w
F : Cᵒᵖ ⥤ Type v
X✝ Y✝ : F.Elementsᵒᵖ
f : X✝ ⟶ Y✝
⊢ (fun X => CostructuredArrow.mk (yonedaEquiv.symm (unop X).snd)) X✝ ⟶
    (fun X => CostructuredArrow.mk (yonedaEquiv.symm (unop X).snd)) Y✝
state_after: case g
C : Type u
inst✝ : Category.{v, u} C
F✝ : C ⥤ Type w
F : Cᵒᵖ ⥤ Type v
X✝ Y✝ : F.Elementsᵒᵖ
f : X✝ ⟶ Y✝
⊢ ((fun X => CostructuredArrow.mk (yonedaEquiv.symm (unop X).snd)) X✝).left ⟶
    ((fun X => CostructuredArrow.mk (yonedaEquiv.symm (unop X).snd)) Y✝).left

case w
C : Type u
inst✝ : Category.{v, u} C
F✝ : C ⥤ Type w
F : Cᵒᵖ ⥤ Type v
X✝ Y✝ : F.Elementsᵒᵖ
f : X✝ ⟶ Y✝
⊢ autoParam
    (yoneda.map ?g ≫ ((fun X => CostructuredArrow.mk (yonedaEquiv.symm (unop X).snd)) Y✝).hom =
      ((fun X => CostructuredArrow.mk (yonedaEquiv.symm (unop X).snd)) X✝).hom)
    _auto✝
tactic: fapply CostructuredArrow.homMk
Theorem: Filter.HasBasis.hasBasis_self_subset
File: Mathlib/Order/Filter/Bases.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
l l' : Filter α
p✝ : ι → Prop
s : ι → Set α
t : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
p : Set α → Prop
h : l.HasBasis (fun s => s ∈ l ∧ p s) id
V : Set α
hV : V ∈ l
⊢ l.HasBasis (fun s => s ∈ l ∧ p s ∧ s ⊆ V) id
state_after: no goals
tactic: simpa only [and_assoc] using h.restrict_subset hV
Theorem: Set.prod_iInter
File: Mathlib/Data/Set/Lattice.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
s : Set α
t : ι → Set β
hι : Nonempty ι
⊢ s ×ˢ ⋂ i, t i = ⋂ i, s ×ˢ t i
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
s : Set α
t : ι → Set β
hι : Nonempty ι
x : α × β
⊢ x ∈ s ×ˢ ⋂ i, t i ↔ x ∈ ⋂ i, s ×ˢ t i
tactic: ext x
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
s : Set α
t : ι → Set β
hι : Nonempty ι
x : α × β
⊢ x ∈ s ×ˢ ⋂ i, t i ↔ x ∈ ⋂ i, s ×ˢ t i
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
s : Set α
t : ι → Set β
hι : Nonempty ι
x : α × β
⊢ (x.1 ∈ s ∧ ∀ (i : ι), x.2 ∈ t i) ↔ ∀ (i : ι), x.1 ∈ s ∧ x.2 ∈ t i
tactic: simp only [mem_prod, mem_iInter]
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
s : Set α
t : ι → Set β
hι : Nonempty ι
x : α × β
⊢ (x.1 ∈ s ∧ ∀ (i : ι), x.2 ∈ t i) ↔ ∀ (i : ι), x.1 ∈ s ∧ x.2 ∈ t i
state_after: no goals
tactic: exact ⟨fun h i => ⟨h.1, h.2 i⟩, fun h => ⟨(h hι.some).1, fun i => (h i).2⟩⟩
Theorem: Finset.univ_sum_single
File: Mathlib/Algebra/BigOperators/Pi.lean

Proof steps:
state_before: I : Type u_1
inst✝² : DecidableEq I
Z : I → Type u_2
inst✝¹ : (i : I) → CommMonoid (Z i)
inst✝ : Fintype I
f : (i : I) → Z i
⊢ ∏ i : I, Pi.mulSingle i (f i) = f
state_after: case h
I : Type u_1
inst✝² : DecidableEq I
Z : I → Type u_2
inst✝¹ : (i : I) → CommMonoid (Z i)
inst✝ : Fintype I
f : (i : I) → Z i
a : I
⊢ (∏ i : I, Pi.mulSingle i (f i)) a = f a
tactic: ext a
state_before: case h
I : Type u_1
inst✝² : DecidableEq I
Z : I → Type u_2
inst✝¹ : (i : I) → CommMonoid (Z i)
inst✝ : Fintype I
f : (i : I) → Z i
a : I
⊢ (∏ i : I, Pi.mulSingle i (f i)) a = f a
state_after: no goals
tactic: simp
Theorem: AlgebraicGeometry.PresheafedSpace.GlueData.ι_openEmbedding
File: Mathlib/Geometry/RingedSpace/PresheafedSpace/Gluing.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i : D.J
⊢ OpenEmbedding ⇑(D.ι i).base
state_after: C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i : D.J
⊢ OpenEmbedding ⇑((D.mapGlueData (forget C)).ι i ≫ (D.gluedIso (forget C)).inv)
tactic: rw [← show _ = (𝖣.ι i).base from 𝖣.ι_gluedIso_inv (PresheafedSpace.forget _) _]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i : D.J
⊢ OpenEmbedding ⇑((D.mapGlueData (forget C)).ι i ≫ (D.gluedIso (forget C)).inv)
state_after: C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i : D.J
⊢ OpenEmbedding (⇑(D.gluedIso (forget C)).inv ∘ ⇑((D.mapGlueData (forget C)).ι i))
tactic: erw [coe_comp]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
D : GlueData C
inst✝ : HasLimits C
i : D.J
⊢ OpenEmbedding (⇑(D.gluedIso (forget C)).inv ∘ ⇑((D.mapGlueData (forget C)).ι i))
state_after: no goals
tactic: refine
    OpenEmbedding.comp
      (TopCat.homeoOfIso (𝖣.gluedIso (PresheafedSpace.forget _)).symm).openEmbedding
      (D.toTopGlueData.ι_openEmbedding i)
Theorem: Module.nontrivial_dual_iff
File: Mathlib/LinearAlgebra/Dual.lean

Proof steps:
state_before: K : Type uK
V : Type uV
inst✝³ : CommRing K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : Free K V
⊢ Nontrivial (Dual K V) ↔ Nontrivial V
state_after: no goals
tactic: rw [← not_iff_not, not_nontrivial_iff_subsingleton, not_nontrivial_iff_subsingleton,
    subsingleton_dual_iff]
Theorem: Finset.sym2_toFinset
File: Mathlib/Data/Finset/Sym.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
s t : Finset α
a b : α
inst✝ : DecidableEq α
m : Multiset α
⊢ m.toFinset.sym2 = m.sym2.toFinset
state_after: case a
α : Type u_1
β : Type u_2
s t : Finset α
a b : α
inst✝ : DecidableEq α
m : Multiset α
z : Sym2 α
⊢ z ∈ m.toFinset.sym2 ↔ z ∈ m.sym2.toFinset
tactic: ext z
state_before: case a
α : Type u_1
β : Type u_2
s t : Finset α
a b : α
inst✝ : DecidableEq α
m : Multiset α
z : Sym2 α
⊢ z ∈ m.toFinset.sym2 ↔ z ∈ m.sym2.toFinset
state_after: case a
α : Type u_1
β : Type u_2
s t : Finset α
a b : α
inst✝ : DecidableEq α
m : Multiset α
z : Sym2 α
x y : α
⊢ s(x, y) ∈ m.toFinset.sym2 ↔ s(x, y) ∈ m.sym2.toFinset
tactic: refine z.ind fun x y ↦ ?_
state_before: case a
α : Type u_1
β : Type u_2
s t : Finset α
a b : α
inst✝ : DecidableEq α
m : Multiset α
z : Sym2 α
x y : α
⊢ s(x, y) ∈ m.toFinset.sym2 ↔ s(x, y) ∈ m.sym2.toFinset
state_after: no goals
tactic: simp only [mk_mem_sym2_iff, Multiset.mem_toFinset, Multiset.mk_mem_sym2_iff]
Theorem: LazyList.mem_nil
File: .lake/packages/batteries/Batteries/Data/LazyList.lean

Proof steps:
state_before: α : Type u_1
x : α
⊢ x ∈ nil ↔ False
state_after: no goals
tactic: simp [Membership.mem, LazyList.Mem]
Theorem: Ideal.exists_ideal_over_maximal_of_isIntegral
File: Mathlib/RingTheory/Ideal/Over.lean

Proof steps:
state_before: R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I J : Ideal S
inst✝¹ : Algebra R S
inst✝ : Algebra.IsIntegral R S
P : Ideal R
P_max : P.IsMaximal
hP : RingHom.ker (algebraMap R S) ≤ P
⊢ ∃ Q, Q.IsMaximal ∧ comap (algebraMap R S) Q = P
state_after: case intro.intro.intro
R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I J : Ideal S
inst✝¹ : Algebra R S
inst✝ : Algebra.IsIntegral R S
P : Ideal R
P_max : P.IsMaximal
hP : RingHom.ker (algebraMap R S) ≤ P
Q : Ideal S
Q_prime : Q.IsPrime
hQ : comap (algebraMap R S) Q = P
⊢ ∃ Q, Q.IsMaximal ∧ comap (algebraMap R S) Q = P
tactic: obtain ⟨Q, -, Q_prime, hQ⟩ := exists_ideal_over_prime_of_isIntegral P ⊥ hP
state_before: case intro.intro.intro
R : Type u_1
inst✝³ : CommRing R
S : Type u_2
inst✝² : CommRing S
f : R →+* S
I J : Ideal S
inst✝¹ : Algebra R S
inst✝ : Algebra.IsIntegral R S
P : Ideal R
P_max : P.IsMaximal
hP : RingHom.ker (algebraMap R S) ≤ P
Q : Ideal S
Q_prime : Q.IsPrime
hQ : comap (algebraMap R S) Q = P
⊢ ∃ Q, Q.IsMaximal ∧ comap (algebraMap R S) Q = P
state_after: no goals
tactic: exact ⟨Q, isMaximal_of_isIntegral_of_isMaximal_comap _ (hQ.symm ▸ P_max), hQ⟩
Theorem: CategoryTheory.Idempotents.KaroubiKaroubi.p_comm_f
File: Mathlib/CategoryTheory/Idempotents/KaroubiKaroubi.lean

Proof steps:
state_before: C : Type u_1
inst✝ : Category.{u_2, u_1} C
P Q : Karoubi (Karoubi C)
f : P ⟶ Q
⊢ P.p.f ≫ f.f.f = f.f.f ≫ Q.p.f
state_after: no goals
tactic: simpa only [hom_ext_iff, comp_f] using p_comm f
Theorem: Real.Gamma_one_half_eq
File: Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianIntegral.lean

Proof steps:
state_before: ⊢ Gamma (1 / 2) = √π
state_after: ⊢ ∫ (x : ℝ) in Ioi 0, (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) = √π
tactic: rw [Gamma_eq_integral one_half_pos, ← integral_comp_rpow_Ioi_of_pos zero_lt_two]
state_before: ⊢ ∫ (x : ℝ) in Ioi 0, (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) = √π
state_after: case h.e'_2

⊢ ∫ (x : ℝ) in Ioi 0, (2 * x ^ (2 - 1)) • (rexp (-x ^ 2) * (x ^ 2) ^ (1 / 2 - 1)) =
    2 * ∫ (x : ℝ) in Ioi 0, rexp (-1 * x ^ 2)

case h.e'_3

⊢ √π = 2 * (√(π / 1) / 2)
tactic: convert congr_arg (fun x : ℝ => 2 * x) (integral_gaussian_Ioi 1) using 1
Theorem: Polynomial.cardPowDegree_apply
File: Mathlib/Algebra/Polynomial/Degree/CardPowDegree.lean

Proof steps:
state_before: Fq : Type u_1
inst✝² : Field Fq
inst✝¹ : Fintype Fq
inst✝ : DecidableEq Fq
p : Fq[X]
⊢ cardPowDegree p = if p = 0 then 0 else ↑(Fintype.card Fq) ^ p.natDegree
state_after: Fq : Type u_1
inst✝² : Field Fq
inst✝¹ : Fintype Fq
inst✝ : DecidableEq Fq
p : Fq[X]
⊢ (let_fun card_pos := ⋯;
      let_fun pow_pos := ⋯;
      { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ p.natDegree, map_mul' := ⋯, nonneg' := ⋯,
        eq_zero' := ⋯, add_le' := ⋯ })
      p =
    if p = 0 then 0 else ↑(Fintype.card Fq) ^ p.natDegree
tactic: rw [cardPowDegree]
state_before: Fq : Type u_1
inst✝² : Field Fq
inst✝¹ : Fintype Fq
inst✝ : DecidableEq Fq
p : Fq[X]
⊢ (let_fun card_pos := ⋯;
      let_fun pow_pos := ⋯;
      { toFun := fun p => if p = 0 then 0 else ↑(Fintype.card Fq) ^ p.natDegree, map_mul' := ⋯, nonneg' := ⋯,
        eq_zero' := ⋯, add_le' := ⋯ })
      p =
    if p = 0 then 0 else ↑(Fintype.card Fq) ^ p.natDegree
state_after: Fq : Type u_1
inst✝² : Field Fq
inst✝¹ : Fintype Fq
inst✝ : DecidableEq Fq
p : Fq[X]
⊢ (if p = 0 then 0 else ↑(Fintype.card Fq) ^ p.natDegree) = if p = 0 then 0 else ↑(Fintype.card Fq) ^ p.natDegree
tactic: dsimp
state_before: Fq : Type u_1
inst✝² : Field Fq
inst✝¹ : Fintype Fq
inst✝ : DecidableEq Fq
p : Fq[X]
⊢ (if p = 0 then 0 else ↑(Fintype.card Fq) ^ p.natDegree) = if p = 0 then 0 else ↑(Fintype.card Fq) ^ p.natDegree
state_after: no goals
tactic: convert rfl
Theorem: Submodule.toAffineSubspace_direction
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

Proof steps:
state_before: k : Type u_1
V : Type u_2
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
s : Submodule k V
⊢ s.toAffineSubspace.direction = s
state_after: case h
k : Type u_1
V : Type u_2
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
s : Submodule k V
x : V
⊢ x ∈ s.toAffineSubspace.direction ↔ x ∈ s
tactic: ext x
state_before: case h
k : Type u_1
V : Type u_2
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
s : Submodule k V
x : V
⊢ x ∈ s.toAffineSubspace.direction ↔ x ∈ s
state_after: no goals
tactic: simp [← s.toAffineSubspace.vadd_mem_iff_mem_direction _ s.zero_mem]
Theorem: Filter.map₂_eq_bot_iff
File: Mathlib/Order/Filter/NAry.lean

Proof steps:
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
m : α → β → γ
f f₁ f₂ : Filter α
g g₁ g₂ : Filter β
h h₁ h₂ : Filter γ
s s₁ s₂ : Set α
t t₁ t₂ : Set β
u : Set γ
v : Set δ
a : α
b : β
c : γ
⊢ map₂ m f g = ⊥ ↔ f = ⊥ ∨ g = ⊥
state_after: no goals
tactic: simp [← map_prod_eq_map₂]
Theorem: Wbtw.trans_left_ne
File: Mathlib/Analysis/Convex/Between.lean

Proof steps:
state_before: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁷ : OrderedRing R
inst✝⁶ : AddCommGroup V
inst✝⁵ : Module R V
inst✝⁴ : AddTorsor V P
inst✝³ : AddCommGroup V'
inst✝² : Module R V'
inst✝¹ : AddTorsor V' P'
inst✝ : NoZeroSMulDivisors R V
w x y z : P
h₁ : Wbtw R w y z
h₂ : Wbtw R w x y
h : y ≠ z
⊢ x ≠ z
state_after: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁷ : OrderedRing R
inst✝⁶ : AddCommGroup V
inst✝⁵ : Module R V
inst✝⁴ : AddTorsor V P
inst✝³ : AddCommGroup V'
inst✝² : Module R V'
inst✝¹ : AddTorsor V' P'
inst✝ : NoZeroSMulDivisors R V
w x y : P
h₂ : Wbtw R w x y
h₁ : Wbtw R w y x
h : y ≠ x
⊢ False
tactic: rintro rfl
state_before: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁷ : OrderedRing R
inst✝⁶ : AddCommGroup V
inst✝⁵ : Module R V
inst✝⁴ : AddTorsor V P
inst✝³ : AddCommGroup V'
inst✝² : Module R V'
inst✝¹ : AddTorsor V' P'
inst✝ : NoZeroSMulDivisors R V
w x y : P
h₂ : Wbtw R w x y
h₁ : Wbtw R w y x
h : y ≠ x
⊢ False
state_after: no goals
tactic: exact h (h₁.swap_right_iff.1 h₂)
Theorem: Metric.eventually_prod_nhds_iff
File: Mathlib/Topology/MetricSpace/Pseudo/Defs.lean

Proof steps:
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
f : Filter ι
x₀ : α
p : ι × α → Prop
⊢ (∀ᶠ (x : ι × α) in f ×ˢ 𝓝 x₀, p x) ↔
    ∃ pa, (∀ᶠ (i : ι) in f, pa i) ∧ ∃ ε > 0, ∀ {i : ι}, pa i → ∀ {x : α}, dist x x₀ < ε → p (i, x)
state_after: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
f : Filter ι
x₀ : α
p : ι × α → Prop
⊢ (∃ ε > 0, ∃ pa, (∀ᶠ (i : ι) in f, pa i) ∧ ∀ {x : α}, dist x x₀ < ε → ∀ {i : ι}, pa i → p (x, i).swap) ↔
    ∃ pa, (∀ᶠ (i : ι) in f, pa i) ∧ ∃ ε > 0, ∀ {i : ι}, pa i → ∀ {x : α}, dist x x₀ < ε → p (i, x)
tactic: rw [eventually_swap_iff, Metric.eventually_nhds_prod_iff]
Theorem: Filter.map₂_right_identity
File: Mathlib/Order/Filter/NAry.lean

Proof steps:
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
m : α → β → γ
f✝ f₁ f₂ : Filter α
g g₁ g₂ : Filter β
h✝ h₁ h₂ : Filter γ
s s₁ s₂ : Set α
t t₁ t₂ : Set β
u : Set γ
v : Set δ
a : α
b✝ : β
c : γ
f : α → β → α
b : β
h : ∀ (a : α), f a b = a
l : Filter α
⊢ map₂ f l (pure b) = l
state_after: no goals
tactic: rw [map₂_pure_right, funext h, map_id']
Theorem: nhds_pi
File: Mathlib/Topology/Constructions.lean

Proof steps:
state_before: X : Type u
Y : Type v
Z : Type u_1
W : Type u_2
ε : Type u_3
ζ : Type u_4
ι : Type u_5
π : ι → Type u_6
κ : Type u_7
inst✝ : TopologicalSpace X
T : (i : ι) → TopologicalSpace (π i)
f : X → (i : ι) → π i
a : (i : ι) → π i
⊢ 𝓝 a = Filter.pi fun i => 𝓝 (a i)
state_after: no goals
tactic: simp only [nhds_iInf, nhds_induced, Filter.pi]
Theorem: Basis.equiv_trans
File: Mathlib/LinearAlgebra/Basis.lean

Proof steps:
state_before: ι : Type u_1
ι' : Type u_2
R : Type u_3
R₂ : Type u_4
K : Type u_5
M : Type u_6
M' : Type u_7
M'' : Type u_8
V : Type u
V' : Type u_9
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid M'
inst✝² : Module R M'
b b₁ : Basis ι R M
i✝ : ι
c : R
x : M
b' : Basis ι' R M'
e✝ : ι ≃ ι'
inst✝¹ : AddCommMonoid M''
inst✝ : Module R M''
ι'' : Type u_10
b'' : Basis ι'' R M''
e : ι ≃ ι'
e' : ι' ≃ ι''
i : ι
⊢ (b.equiv b' e ≪≫ₗ b'.equiv b'' e') (b i) = (b.equiv b'' (e.trans e')) (b i)
state_after: no goals
tactic: simp
Theorem: X_pow_mul_sub_C_irreducible
File: Mathlib/FieldTheory/KummerExtension.lean

Proof steps:
state_before: K : Type u
inst✝ : Field K
n m : ℕ
a : K
hm : Irreducible (X ^ m - C a)
hn :
  ∀ (E : Type u) [inst : Field E] [inst_1 : Algebra K E] (x : E),
    minpoly K x = X ^ m - C a → Irreducible (X ^ n - C (AdjoinSimple.gen K x))
⊢ Irreducible (X ^ (n * m) - C a)
state_after: K : Type u
inst✝ : Field K
n m : ℕ
a : K
hm : Irreducible (X ^ m - C a)
hn :
  ∀ (E : Type u) [inst : Field E] [inst_1 : Algebra K E] (x : E),
    minpoly K x = X ^ m - C a → Irreducible (X ^ n - C (AdjoinSimple.gen K x))
hm' : m ≠ 0
⊢ Irreducible (X ^ (n * m) - C a)
tactic: have hm' : m ≠ 0 := by
    rintro rfl
    rw [pow_zero, ← C.map_one, ← map_sub] at hm
    exact not_irreducible_C _ hm
state_before: K : Type u
inst✝ : Field K
n m : ℕ
a : K
hm : Irreducible (X ^ m - C a)
hn :
  ∀ (E : Type u) [inst : Field E] [inst_1 : Algebra K E] (x : E),
    minpoly K x = X ^ m - C a → Irreducible (X ^ n - C (AdjoinSimple.gen K x))
hm' : m ≠ 0
⊢ Irreducible (X ^ (n * m) - C a)
state_after: no goals
tactic: simpa [pow_mul] using irreducible_comp (monic_X_pow_sub_C a hm') (monic_X_pow n) hm
    (by simpa only [Polynomial.map_pow, map_X] using hn)
Theorem: EuclideanDomain.dvd_lcm_right
File: Mathlib/Algebra/EuclideanDomain/Basic.lean

Proof steps:
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
x y : R
hxy : gcd x y = 0
⊢ y ∣ lcm x y
state_after: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
x y : R
hxy : gcd x y = 0
⊢ y ∣ 0
tactic: rw [lcm, hxy, div_zero]
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
x y : R
hxy : gcd x y = 0
⊢ y ∣ 0
state_after: no goals
tactic: exact dvd_zero _
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
x y : R
hxy : ¬gcd x y = 0
z : R
hz : x = gcd x y * z
⊢ gcd x y * (y * z) = x * y
state_after: no goals
tactic: rw [← mul_assoc, mul_right_comm, ← hz]