ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: ProbabilityTheory.evariance_eq_lintegral_ofReal
File: Mathlib/Probability/Variance.lean

Proof steps:
state_before: Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ✝ : Measure Ω
X : Ω → ℝ
μ : Measure Ω
⊢ evariance X μ = ∫⁻ (ω : Ω), ENNReal.ofReal ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2) ∂μ
state_after: Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ✝ : Measure Ω
X : Ω → ℝ
μ : Measure Ω
⊢ ∫⁻ (ω : Ω), ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 ∂μ = ∫⁻ (ω : Ω), ENNReal.ofReal ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2) ∂μ
tactic: rw [evariance]
state_before: Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ✝ : Measure Ω
X : Ω → ℝ
μ : Measure Ω
⊢ ∫⁻ (ω : Ω), ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 ∂μ = ∫⁻ (ω : Ω), ENNReal.ofReal ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2) ∂μ
state_after: case e_f
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ✝ : Measure Ω
X : Ω → ℝ
μ : Measure Ω
⊢ (fun ω => ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2) = fun ω => ENNReal.ofReal ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2)
tactic: congr
state_before: case e_f
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ✝ : Measure Ω
X : Ω → ℝ
μ : Measure Ω
⊢ (fun ω => ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2) = fun ω => ENNReal.ofReal ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2)
state_after: case e_f.h
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ✝ : Measure Ω
X : Ω → ℝ
μ : Measure Ω
ω : Ω
⊢ ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 = ENNReal.ofReal ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2)
tactic: ext1 ω
state_before: case e_f.h
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ✝ : Measure Ω
X : Ω → ℝ
μ : Measure Ω
ω : Ω
⊢ ↑‖X ω - ∫ (x : Ω), X x ∂μ‖₊ ^ 2 = ENNReal.ofReal ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2)
state_after: case e_f.h
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ✝ : Measure Ω
X : Ω → ℝ
μ : Measure Ω
ω : Ω
⊢ ↑‖(X ω - ∫ (x : Ω), X x ∂μ) ^ 2‖₊ = ENNReal.ofReal ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2)
tactic: rw [pow_two, ← ENNReal.coe_mul, ← nnnorm_mul, ← pow_two]
state_before: case e_f.h
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ✝ : Measure Ω
X : Ω → ℝ
μ : Measure Ω
ω : Ω
⊢ ↑‖(X ω - ∫ (x : Ω), X x ∂μ) ^ 2‖₊ = ENNReal.ofReal ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2)
state_after: case e_f.h.e_a
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ✝ : Measure Ω
X : Ω → ℝ
μ : Measure Ω
ω : Ω
⊢ ‖(X ω - ∫ (x : Ω), X x ∂μ) ^ 2‖₊ = ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2).toNNReal
tactic: congr
state_before: case e_f.h.e_a
Ω : Type u_1
m : MeasurableSpace Ω
X✝ : Ω → ℝ
μ✝ : Measure Ω
X : Ω → ℝ
μ : Measure Ω
ω : Ω
⊢ ‖(X ω - ∫ (x : Ω), X x ∂μ) ^ 2‖₊ = ((X ω - ∫ (x : Ω), X x ∂μ) ^ 2).toNNReal
state_after: no goals
tactic: exact (Real.toNNReal_eq_nnnorm_of_nonneg <| sq_nonneg _).symm
Theorem: ArithmeticFunction.sigma_zero_apply
File: Mathlib/NumberTheory/ArithmeticFunction.lean

Proof steps:
state_before: R : Type u_1
n : ℕ
⊢ (σ 0) n = n.divisors.card
state_after: no goals
tactic: simp [sigma_apply]
Theorem: ArithmeticFunction.vonMangoldt_apply_one
File: Mathlib/NumberTheory/VonMangoldt.lean

Proof steps:
state_before: ⊢ Λ 1 = 0
state_after: no goals
tactic: simp [vonMangoldt_apply]
Theorem: le_induced_generateFrom
File: Mathlib/Topology/Order.lean

Proof steps:
state_before: α✝ : Type u
β✝ : Type v
α : Type u_1
β : Type u_2
t : TopologicalSpace α
b : Set (Set β)
f : α → β
h : ∀ a ∈ b, IsOpen (f ⁻¹' a)
⊢ t ≤ induced f (generateFrom b)
state_after: α✝ : Type u
β✝ : Type v
α : Type u_1
β : Type u_2
t : TopologicalSpace α
b : Set (Set β)
f : α → β
h : ∀ a ∈ b, IsOpen (f ⁻¹' a)
⊢ t ≤ generateFrom (preimage f '' b)
tactic: rw [induced_generateFrom_eq]
state_before: α✝ : Type u
β✝ : Type v
α : Type u_1
β : Type u_2
t : TopologicalSpace α
b : Set (Set β)
f : α → β
h : ∀ a ∈ b, IsOpen (f ⁻¹' a)
⊢ t ≤ generateFrom (preimage f '' b)
state_after: case h
α✝ : Type u
β✝ : Type v
α : Type u_1
β : Type u_2
t : TopologicalSpace α
b : Set (Set β)
f : α → β
h : ∀ a ∈ b, IsOpen (f ⁻¹' a)
⊢ ∀ s ∈ preimage f '' b, IsOpen s
tactic: apply le_generateFrom
state_before: case h
α✝ : Type u
β✝ : Type v
α : Type u_1
β : Type u_2
t : TopologicalSpace α
b : Set (Set β)
f : α → β
h : ∀ a ∈ b, IsOpen (f ⁻¹' a)
⊢ ∀ s ∈ preimage f '' b, IsOpen s
state_after: case h
α✝ : Type u
β✝ : Type v
α : Type u_1
β : Type u_2
t : TopologicalSpace α
b : Set (Set β)
f : α → β
h : ∀ a ∈ b, IsOpen (f ⁻¹' a)
⊢ ∀ a ∈ b, IsOpen (f ⁻¹' a)
tactic: simp only [mem_image, and_imp, forall_apply_eq_imp_iff₂, exists_imp]
state_before: case h
α✝ : Type u
β✝ : Type v
α : Type u_1
β : Type u_2
t : TopologicalSpace α
b : Set (Set β)
f : α → β
h : ∀ a ∈ b, IsOpen (f ⁻¹' a)
⊢ ∀ a ∈ b, IsOpen (f ⁻¹' a)
state_after: no goals
tactic: exact h
Theorem: Finsupp.some_add
File: Mathlib/Data/Finsupp/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddCommMonoid M
f g : Option α →₀ M
⊢ (f + g).some = f.some + g.some
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddCommMonoid M
f g : Option α →₀ M
a✝ : α
⊢ (f + g).some a✝ = (f.some + g.some) a✝
tactic: ext
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝ : AddCommMonoid M
f g : Option α →₀ M
a✝ : α
⊢ (f + g).some a✝ = (f.some + g.some) a✝
state_after: no goals
tactic: simp
Theorem: CategoryTheory.Presieve.isSeparatedFor_top
File: Mathlib/CategoryTheory/Sites/IsSheafFor.lean

Proof steps:
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
P : Cᵒᵖ ⥤ Type w
x : FamilyOfElements P ⊤
t₁ t₂ : P.obj (op X)
h₁ : x.IsAmalgamation t₁
h₂ : x.IsAmalgamation t₂
⊢ t₁ = t₂
state_after: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
P : Cᵒᵖ ⥤ Type w
x : FamilyOfElements P ⊤
t₁ t₂ : P.obj (op X)
h₁ : x.IsAmalgamation t₁
h₂ : x.IsAmalgamation t₂
q₁ : P.map (𝟙 X).op t₁ = x (𝟙 X) trivial
⊢ t₁ = t₂
tactic: have q₁ := h₁ (𝟙 X) (by tauto)
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
P : Cᵒᵖ ⥤ Type w
x : FamilyOfElements P ⊤
t₁ t₂ : P.obj (op X)
h₁ : x.IsAmalgamation t₁
h₂ : x.IsAmalgamation t₂
q₁ : P.map (𝟙 X).op t₁ = x (𝟙 X) trivial
⊢ t₁ = t₂
state_after: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
P : Cᵒᵖ ⥤ Type w
x : FamilyOfElements P ⊤
t₁ t₂ : P.obj (op X)
h₁ : x.IsAmalgamation t₁
h₂ : x.IsAmalgamation t₂
q₁ : P.map (𝟙 X).op t₁ = x (𝟙 X) trivial
q₂ : P.map (𝟙 X).op t₂ = x (𝟙 X) trivial
⊢ t₁ = t₂
tactic: have q₂ := h₂ (𝟙 X) (by tauto)
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
P : Cᵒᵖ ⥤ Type w
x : FamilyOfElements P ⊤
t₁ t₂ : P.obj (op X)
h₁ : x.IsAmalgamation t₁
h₂ : x.IsAmalgamation t₂
q₁ : P.map (𝟙 X).op t₁ = x (𝟙 X) trivial
q₂ : P.map (𝟙 X).op t₂ = x (𝟙 X) trivial
⊢ t₁ = t₂
state_after: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
P : Cᵒᵖ ⥤ Type w
x : FamilyOfElements P ⊤
t₁ t₂ : P.obj (op X)
h₁ : x.IsAmalgamation t₁
h₂ : x.IsAmalgamation t₂
q₁ : t₁ = x (𝟙 X) trivial
q₂ : t₂ = x (𝟙 X) trivial
⊢ t₁ = t₂
tactic: simp only [op_id, FunctorToTypes.map_id_apply] at q₁ q₂
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
P✝ Q U : Cᵒᵖ ⥤ Type w
X Y : C
S : Sieve X
R : Presieve X
P : Cᵒᵖ ⥤ Type w
x : FamilyOfElements P ⊤
t₁ t₂ : P.obj (op X)
h₁ : x.IsAmalgamation t₁
h₂ : x.IsAmalgamation t₂
q₁ : t₁ = x (𝟙 X) trivial
q₂ : t₂ = x (𝟙 X) trivial
⊢ t₁ = t₂
state_after: no goals
tactic: rw [q₁, q₂]
Theorem: CategoryTheory.Limits.Fork.π_comp_hom
File: Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : C
f✝ g : X ⟶ Y
s t : Cofork f✝ g
f : s ⟶ t
⊢ s.π ≫ f.hom = t.π
state_after: case mk
C : Type u
inst✝ : Category.{v, u} C
X Y : C
f✝ g : X ⟶ Y
t : Cofork f✝ g
pt✝ : C
ι✝ : parallelPair f✝ g ⟶ (Functor.const WalkingParallelPair).obj pt✝
f : { pt := pt✝, ι := ι✝ } ⟶ t
⊢ Cofork.π { pt := pt✝, ι := ι✝ } ≫ f.hom = t.π
tactic: cases s
state_before: case mk
C : Type u
inst✝ : Category.{v, u} C
X Y : C
f✝ g : X ⟶ Y
t : Cofork f✝ g
pt✝ : C
ι✝ : parallelPair f✝ g ⟶ (Functor.const WalkingParallelPair).obj pt✝
f : { pt := pt✝, ι := ι✝ } ⟶ t
⊢ Cofork.π { pt := pt✝, ι := ι✝ } ≫ f.hom = t.π
state_after: case mk.mk
C : Type u
inst✝ : Category.{v, u} C
X Y : C
f✝ g : X ⟶ Y
pt✝¹ : C
ι✝¹ : parallelPair f✝ g ⟶ (Functor.const WalkingParallelPair).obj pt✝¹
pt✝ : C
ι✝ : parallelPair f✝ g ⟶ (Functor.const WalkingParallelPair).obj pt✝
f : { pt := pt✝¹, ι := ι✝¹ } ⟶ { pt := pt✝, ι := ι✝ }
⊢ Cofork.π { pt := pt✝¹, ι := ι✝¹ } ≫ f.hom = Cofork.π { pt := pt✝, ι := ι✝ }
tactic: cases t
state_before: case mk.mk
C : Type u
inst✝ : Category.{v, u} C
X Y : C
f✝ g : X ⟶ Y
pt✝¹ : C
ι✝¹ : parallelPair f✝ g ⟶ (Functor.const WalkingParallelPair).obj pt✝¹
pt✝ : C
ι✝ : parallelPair f✝ g ⟶ (Functor.const WalkingParallelPair).obj pt✝
f : { pt := pt✝¹, ι := ι✝¹ } ⟶ { pt := pt✝, ι := ι✝ }
⊢ Cofork.π { pt := pt✝¹, ι := ι✝¹ } ≫ f.hom = Cofork.π { pt := pt✝, ι := ι✝ }
state_after: case mk.mk.mk
C : Type u
inst✝ : Category.{v, u} C
X Y : C
f g : X ⟶ Y
pt✝¹ : C
ι✝¹ : parallelPair f g ⟶ (Functor.const WalkingParallelPair).obj pt✝¹
pt✝ : C
ι✝ : parallelPair f g ⟶ (Functor.const WalkingParallelPair).obj pt✝
hom✝ : { pt := pt✝¹, ι := ι✝¹ }.pt ⟶ { pt := pt✝, ι := ι✝ }.pt
w✝ : ∀ (j : WalkingParallelPair), { pt := pt✝¹, ι := ι✝¹ }.ι.app j ≫ hom✝ = { pt := pt✝, ι := ι✝ }.ι.app j
⊢ Cofork.π { pt := pt✝¹, ι := ι✝¹ } ≫ { hom := hom✝, w := w✝ }.hom = Cofork.π { pt := pt✝, ι := ι✝ }
tactic: cases f
state_before: case mk.mk.mk
C : Type u
inst✝ : Category.{v, u} C
X Y : C
f g : X ⟶ Y
pt✝¹ : C
ι✝¹ : parallelPair f g ⟶ (Functor.const WalkingParallelPair).obj pt✝¹
pt✝ : C
ι✝ : parallelPair f g ⟶ (Functor.const WalkingParallelPair).obj pt✝
hom✝ : { pt := pt✝¹, ι := ι✝¹ }.pt ⟶ { pt := pt✝, ι := ι✝ }.pt
w✝ : ∀ (j : WalkingParallelPair), { pt := pt✝¹, ι := ι✝¹ }.ι.app j ≫ hom✝ = { pt := pt✝, ι := ι✝ }.ι.app j
⊢ Cofork.π { pt := pt✝¹, ι := ι✝¹ } ≫ { hom := hom✝, w := w✝ }.hom = Cofork.π { pt := pt✝, ι := ι✝ }
state_after: no goals
tactic: aesop
Theorem: RingHom.injective_iff_ker_eq_bot
File: Mathlib/RingTheory/Ideal/Maps.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
F : Type u_1
inst✝² : Ring R
inst✝¹ : Semiring S
inst✝ : FunLike F R S
rc : RingHomClass F R S
f : F
⊢ Function.Injective ⇑f ↔ ker f = ⊥
state_after: R : Type u
S : Type v
T : Type w
F : Type u_1
inst✝² : Ring R
inst✝¹ : Semiring S
inst✝ : FunLike F R S
rc : RingHomClass F R S
f : F
⊢ Function.Injective ⇑f ↔ ∀ (x : R), x ∈ ⇑f ⁻¹' {0} ↔ x ∈ ↑⊥
tactic: rw [SetLike.ext'_iff, ker_eq, Set.ext_iff]
state_before: R : Type u
S : Type v
T : Type w
F : Type u_1
inst✝² : Ring R
inst✝¹ : Semiring S
inst✝ : FunLike F R S
rc : RingHomClass F R S
f : F
⊢ Function.Injective ⇑f ↔ ∀ (x : R), x ∈ ⇑f ⁻¹' {0} ↔ x ∈ ↑⊥
state_after: no goals
tactic: exact injective_iff_map_eq_zero' f
Theorem: integral_sin_sq
File: Mathlib/Analysis/SpecialFunctions/Integrals.lean

Proof steps:
state_before: a b : ℝ
n : ℕ
⊢ ∫ (x : ℝ) in a..b, sin x ^ 2 = (sin a * cos a - sin b * cos b + b - a) / 2
state_after: no goals
tactic: field_simp [integral_sin_pow, add_sub_assoc]
Theorem: WithTop.top_le_iff
File: Mathlib/Order/WithBot.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a✝ b : α
inst✝ : LE α
a : α
⊢ ⊤ ≤ ↑a ↔ ↑a = ⊤
state_after: no goals
tactic: simp [not_top_le_coe _]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
a b : α
inst✝ : LE α
⊢ ⊤ ≤ ⊤ ↔ ⊤ = ⊤
state_after: no goals
tactic: simp
Theorem: Finset.Colex.lt_iff_exists_filter_lt
File: Mathlib/Combinatorics/Colex.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
𝒜 𝒜₁ 𝒜₂ : Finset (Finset α)
s t u : Finset α
a b : α
r : ℕ
⊢ { ofColex := s } < { ofColex := t } ↔ ∃ w ∈ t \ s, filter (fun x => w < x) s = filter (fun x => w < x) t
state_after: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
𝒜 𝒜₁ 𝒜₂ : Finset (Finset α)
s t u : Finset α
a b : α
r : ℕ
⊢ (∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a) ↔ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)
tactic: simp only [lt_iff_exists_forall_lt, mem_sdiff, filter_inj, and_assoc]
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
𝒜 𝒜₁ 𝒜₂ : Finset (Finset α)
s t u : Finset α
a b : α
r : ℕ
⊢ (∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a) ↔ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)
state_after: case refine_1
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
𝒜 𝒜₁ 𝒜₂ : Finset (Finset α)
s t u : Finset α
a b : α
r : ℕ
h : ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a
⊢ ∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)

case refine_2
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
𝒜 𝒜₁ 𝒜₂ : Finset (Finset α)
s t u : Finset α
a b : α
r : ℕ
⊢ (∃ w ∈ t, w ∉ s ∧ ∀ ⦃a : α⦄, w < a → (a ∈ s ↔ a ∈ t)) → ∃ a ∈ t, a ∉ s ∧ ∀ b ∈ s, b ∉ t → b < a
tactic: refine ⟨fun h ↦ ?_, ?_⟩
Theorem: Polynomial.map_expand
File: Mathlib/Algebra/Polynomial/Expand.lean

Proof steps:
state_before: R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p✝ q✝ p : ℕ
f : R →+* S
q : R[X]
⊢ map f ((expand R p) q) = (expand S p) (map f q)
state_after: case pos
R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p✝ q✝ p : ℕ
f : R →+* S
q : R[X]
hp : p = 0
⊢ map f ((expand R p) q) = (expand S p) (map f q)

case neg
R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p✝ q✝ p : ℕ
f : R →+* S
q : R[X]
hp : ¬p = 0
⊢ map f ((expand R p) q) = (expand S p) (map f q)
tactic: by_cases hp : p = 0
state_before: case neg
R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p✝ q✝ p : ℕ
f : R →+* S
q : R[X]
hp : ¬p = 0
⊢ map f ((expand R p) q) = (expand S p) (map f q)
state_after: case neg.a
R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p✝ q✝ p : ℕ
f : R →+* S
q : R[X]
hp : ¬p = 0
n✝ : ℕ
⊢ (map f ((expand R p) q)).coeff n✝ = ((expand S p) (map f q)).coeff n✝
tactic: ext
state_before: case neg.a
R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p✝ q✝ p : ℕ
f : R →+* S
q : R[X]
hp : ¬p = 0
n✝ : ℕ
⊢ (map f ((expand R p) q)).coeff n✝ = ((expand S p) (map f q)).coeff n✝
state_after: case neg.a
R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p✝ q✝ p : ℕ
f : R →+* S
q : R[X]
hp : ¬p = 0
n✝ : ℕ
⊢ f (if p ∣ n✝ then q.coeff (n✝ / p) else 0) = if p ∣ n✝ then (map f q).coeff (n✝ / p) else 0
tactic: rw [coeff_map, coeff_expand (Nat.pos_of_ne_zero hp), coeff_expand (Nat.pos_of_ne_zero hp)]
state_before: case neg.a
R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p✝ q✝ p : ℕ
f : R →+* S
q : R[X]
hp : ¬p = 0
n✝ : ℕ
⊢ f (if p ∣ n✝ then q.coeff (n✝ / p) else 0) = if p ∣ n✝ then (map f q).coeff (n✝ / p) else 0
state_after: no goals
tactic: split_ifs <;> simp_all
Theorem: SimpleGraph.incMatrix_apply_mul_incMatrix_apply_of_not_adj
File: Mathlib/Combinatorics/SimpleGraph/IncMatrix.lean

Proof steps:
state_before: R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝ : MulZeroOneClass R
a b : α
e : Sym2 α
hab : a ≠ b
h : ¬G.Adj a b
⊢ incMatrix R G a e * incMatrix R G b e = 0
state_after: case h
R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝ : MulZeroOneClass R
a b : α
e : Sym2 α
hab : a ≠ b
h : ¬G.Adj a b
⊢ e ∉ G.incidenceSet a ∩ G.incidenceSet b
tactic: rw [incMatrix_apply_mul_incMatrix_apply, Set.indicator_of_not_mem]
state_before: case h
R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝ : MulZeroOneClass R
a b : α
e : Sym2 α
hab : a ≠ b
h : ¬G.Adj a b
⊢ e ∉ G.incidenceSet a ∩ G.incidenceSet b
state_after: case h
R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝ : MulZeroOneClass R
a b : α
e : Sym2 α
hab : a ≠ b
h : ¬G.Adj a b
⊢ e ∉ ∅
tactic: rw [G.incidenceSet_inter_incidenceSet_of_not_adj h hab]
state_before: case h
R : Type u_1
α : Type u_2
G : SimpleGraph α
inst✝ : MulZeroOneClass R
a b : α
e : Sym2 α
hab : a ≠ b
h : ¬G.Adj a b
⊢ e ∉ ∅
state_after: no goals
tactic: exact Set.not_mem_empty e
Theorem: BoxIntegral.Prepartition.isPartition_splitMany
File: Mathlib/Analysis/BoxIntegral/Partition/Split.lean

Proof steps:
state_before: ι : Type u_1
M : Type u_2
n : ℕ
I✝ J : Box ι
i : ι
x : ℝ
I : Box ι
s : Finset (ι × ℝ)
⊢ (splitMany I ∅).IsPartition
state_after: no goals
tactic: simp only [splitMany_empty, isPartitionTop]
state_before: ι : Type u_1
M : Type u_2
n : ℕ
I✝ J : Box ι
i : ι
x : ℝ
I : Box ι
s✝ : Finset (ι × ℝ)
a : ι × ℝ
s : Finset (ι × ℝ)
x✝ : a ∉ s
hs : (splitMany I s).IsPartition
⊢ (splitMany I (insert a s)).IsPartition
state_after: no goals
tactic: simpa only [splitMany_insert, inf_split] using hs.biUnion fun J _ => isPartitionSplit _ _ _
Theorem: CategoryTheory.Limits.Trident.ext_inv
File: Mathlib/CategoryTheory/Limits/Shapes/WideEqualizers.lean

Proof steps:
state_before: J : Type w
C : Type u
inst✝¹ : Category.{v, u} C
X Y : C
f : J → (X ⟶ Y)
inst✝ : Nonempty J
s t : Trident f
i : s.pt ≅ t.pt
w : autoParam (i.hom ≫ t.ι = s.ι) _auto✝
⊢ i.inv ≫ s.ι = t.ι
state_after: no goals
tactic: rw [← w, Iso.inv_hom_id_assoc]
Theorem: Real.volume_univ
File: Mathlib/MeasureTheory/Measure/Lebesgue/Basic.lean

Proof steps:
state_before: ι : Type u_1
inst✝ : Fintype ι
r : ℝ≥0
⊢ ↑r = volume (Icc 0 ↑r)
state_after: no goals
tactic: simp
Theorem: Subgroup.nontrivial_iff_ne_bot
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

Proof steps:
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H✝ K H : Subgroup G
⊢ Nontrivial ↥H ↔ H ≠ ⊥
state_after: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H✝ K H : Subgroup G
⊢ (∃ x ∈ H, x ≠ 1) ↔ ¬∀ x ∈ H, x = 1
tactic: rw [nontrivial_iff_exists_ne_one, ne_eq, eq_bot_iff_forall]
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H✝ K H : Subgroup G
⊢ (∃ x ∈ H, x ≠ 1) ↔ ¬∀ x ∈ H, x = 1
state_after: no goals
tactic: simp only [ne_eq, not_forall, exists_prop]
Theorem: SemiNormedGrp.isZero_of_subsingleton
File: Mathlib/Analysis/Normed/Group/SemiNormedGrp.lean

Proof steps:
state_before: V : SemiNormedGrp
inst✝ : Subsingleton ↑V
⊢ Limits.IsZero V
state_after: case refine_1
V : SemiNormedGrp
inst✝ : Subsingleton ↑V
X : SemiNormedGrp
f : V ⟶ X
⊢ f = default

case refine_2
V : SemiNormedGrp
inst✝ : Subsingleton ↑V
X : SemiNormedGrp
f : X ⟶ V
⊢ f = default
tactic: refine ⟨fun X => ⟨⟨⟨0⟩, fun f => ?_⟩⟩, fun X => ⟨⟨⟨0⟩, fun f => ?_⟩⟩⟩
Theorem: absorbent_nhds_zero
File: Mathlib/Analysis/LocallyConvex/Basic.lean

Proof steps:
state_before: 𝕜 : Type u_1
𝕝 : Type u_2
E : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝⁸ : NormedField 𝕜
inst✝⁷ : NormedRing 𝕝
inst✝⁶ : NormedSpace 𝕜 𝕝
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module 𝕜 E
inst✝³ : SMulWithZero 𝕝 E
inst✝² : IsScalarTower 𝕜 𝕝 E
s t u v A B : Set E
x✝ : E
a b : 𝕜
inst✝¹ : TopologicalSpace E
inst✝ : ContinuousSMul 𝕜 E
hA : A ∈ 𝓝 0
x : E
⊢ A ∈ 𝓝 (0 • x)
state_after: no goals
tactic: rwa [zero_smul]
Theorem: SimpleGraph.not_cliqueFree_card_of_top_embedding
File: Mathlib/Combinatorics/SimpleGraph/Clique.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
G H : SimpleGraph α
m n : ℕ
s : Finset α
inst✝ : Fintype α
f : ⊤ ↪g G
⊢ ¬G.CliqueFree (Fintype.card α)
state_after: α : Type u_1
β : Type u_2
G H : SimpleGraph α
m n : ℕ
s : Finset α
inst✝ : Fintype α
f : ⊤ ↪g G
⊢ Nonempty (⊤ ↪g G)
tactic: rw [not_cliqueFree_iff]
state_before: α : Type u_1
β : Type u_2
G H : SimpleGraph α
m n : ℕ
s : Finset α
inst✝ : Fintype α
f : ⊤ ↪g G
⊢ Nonempty (⊤ ↪g G)
state_after: no goals
tactic: exact ⟨(Iso.completeGraph (Fintype.equivFin α)).symm.toEmbedding.trans f⟩
Theorem: IsDedekindDomain.HeightOneSpectrum.valuedAdicCompletion_eq_valuation
File: Mathlib/RingTheory/DedekindDomain/AdicValuation.lean

Proof steps:
state_before: R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
⊢ Valued.v ↑r = v.valuation ↑r
state_after: no goals
tactic: convert Valued.valuedCompletion_apply (r : K)
Theorem: Polynomial.smeval_sub
File: Mathlib/Algebra/Polynomial/Smeval.lean

Proof steps:
state_before: R : Type u_1
inst✝³ : Ring R
S : Type u_2
inst✝² : AddCommGroup S
inst✝¹ : Pow S ℕ
inst✝ : Module R S
p q : R[X]
x : S
⊢ (p - q).smeval x = p.smeval x - q.smeval x
state_after: no goals
tactic: rw [sub_eq_add_neg, smeval_add, smeval_neg, sub_eq_add_neg]
Theorem: finAddFlip_apply_natAdd
File: Mathlib/Logic/Equiv/Fin.lean

Proof steps:
state_before: m✝ n : ℕ
k : Fin n
m : ℕ
⊢ finAddFlip (Fin.natAdd m k) = Fin.castAdd m k
state_after: no goals
tactic: simp [finAddFlip]
Theorem: CategoryTheory.Functor.map_isPushout
File: Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean

Proof steps:
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
F : C ⥤ D
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : PreservesColimit (span f g) F
s : IsPushout f g h i
⊢ IsPushout (F.map f) (F.map g) (F.map h) (F.map i)
state_after: case refine_1
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
F : C ⥤ D
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : PreservesColimit (span f g) F
s : IsPushout f g h i
⊢ ((Cocones.precompose (spanCompIso F f g).inv).obj (F.mapCocone s.cocone)).pt ≅ ⋯.cocone.pt

case refine_2
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
F : C ⥤ D
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : PreservesColimit (span f g) F
s : IsPushout f g h i
⊢ ((Cocones.precompose (spanCompIso F f g).inv).obj (F.mapCocone s.cocone)).ι.app WalkingCospan.left ≫ ?refine_1.hom =
    ⋯.cocone.ι.app WalkingCospan.left

case refine_3
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
F : C ⥤ D
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : PreservesColimit (span f g) F
s : IsPushout f g h i
⊢ ((Cocones.precompose (spanCompIso F f g).inv).obj (F.mapCocone s.cocone)).ι.app WalkingCospan.right ≫ ?refine_1.hom =
    ⋯.cocone.ι.app WalkingCospan.right
tactic: refine
    IsPushout.of_isColimit' (F.map_commSq s.toCommSq)
      (IsColimit.equivOfNatIsoOfIso (spanCompIso F f g) _ _ (WalkingSpan.ext ?_ ?_ ?_)
        (isColimitOfPreserves F s.isColimit))
Theorem: FirstOrder.Language.ElementaryEmbedding.theory_model_iff
File: Mathlib/ModelTheory/ElementaryMaps.lean

Proof steps:
state_before: L : Language
M : Type u_1
N : Type u_2
P : Type u_3
Q : Type u_4
inst✝³ : L.Structure M
inst✝² : L.Structure N
inst✝¹ : L.Structure P
inst✝ : L.Structure Q
f : M ↪ₑ[L] N
T : L.Theory
⊢ M ⊨ T ↔ N ⊨ T
state_after: no goals
tactic: simp only [Theory.model_iff, f.map_sentence]
Theorem: UniqueFactorizationMonoid.normalizedFactors_of_irreducible_pow
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

Proof steps:
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizationMonoid α
inst✝ : UniqueFactorizationMonoid α
p : α
hp : Irreducible p
k : ℕ
⊢ normalizedFactors (p ^ k) = Multiset.replicate k (normalize p)
state_after: no goals
tactic: rw [normalizedFactors_pow, normalizedFactors_irreducible hp, Multiset.nsmul_singleton]
Theorem: MeasureTheory.average_congr
File: Mathlib/MeasureTheory/Integral/Average.lean

Proof steps:
state_before: α : Type u_1
E : Type u_2
F : Type u_3
m0 : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
μ ν : Measure α
s t : Set α
f✝ g✝ f g : α → E
h : f =ᶠ[ae μ] g
⊢ ⨍ (x : α), f x ∂μ = ⨍ (x : α), g x ∂μ
state_after: no goals
tactic: simp only [average_eq, integral_congr_ae h]