ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: List.kreplace_of_forall_not
File: Mathlib/Data/List/Sigma.lean

Proof steps:
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
b : β a
l : List (Sigma β)
H : ∀ (b : β a), ⟨a, b⟩ ∉ l
⊢ ∀ a_1 ∈ l, (if a = a_1.fst then some ⟨a, b⟩ else none) = none
state_after: case mk
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
b : β a
l : List (Sigma β)
H : ∀ (b : β a), ⟨a, b⟩ ∉ l
a' : α
b' : β a'
h : ⟨a', b'⟩ ∈ l
⊢ (if a = ⟨a', b'⟩.fst then some ⟨a, b⟩ else none) = none
tactic: rintro ⟨a', b'⟩ h
state_before: case mk
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
b : β a
l : List (Sigma β)
H : ∀ (b : β a), ⟨a, b⟩ ∉ l
a' : α
b' : β a'
h : ⟨a', b'⟩ ∈ l
⊢ (if a = ⟨a', b'⟩.fst then some ⟨a, b⟩ else none) = none
state_after: case mk
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
b : β a
l : List (Sigma β)
H : ∀ (b : β a), ⟨a, b⟩ ∉ l
a' : α
b' : β a'
h : ⟨a', b'⟩ ∈ l
⊢ (if a = a' then some ⟨a, b⟩ else none) = none
tactic: dsimp
state_before: case mk
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
b : β a
l : List (Sigma β)
H : ∀ (b : β a), ⟨a, b⟩ ∉ l
a' : α
b' : β a'
h : ⟨a', b'⟩ ∈ l
⊢ (if a = a' then some ⟨a, b⟩ else none) = none
state_after: case pos
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
b : β a
l : List (Sigma β)
H : ∀ (b : β a), ⟨a, b⟩ ∉ l
a' : α
b' : β a'
h : ⟨a', b'⟩ ∈ l
h✝ : a = a'
⊢ False

case neg
α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
inst✝ : DecidableEq α
a : α
b : β a
l : List (Sigma β)
H : ∀ (b : β a), ⟨a, b⟩ ∉ l
a' : α
b' : β a'
h : ⟨a', b'⟩ ∈ l
h✝ : ¬a = a'
⊢ none = none
tactic: split_ifs
Theorem: Set.toFinset_setOf
File: Mathlib/Data/Fintype/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s t : Set α
inst✝² : Fintype α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : Fintype ↑{x | p x}
⊢ {x | p x}.toFinset = filter p Finset.univ
state_after: case a
α : Type u_1
β : Type u_2
γ : Type u_3
s t : Set α
inst✝² : Fintype α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : Fintype ↑{x | p x}
a✝ : α
⊢ a✝ ∈ {x | p x}.toFinset ↔ a✝ ∈ filter p Finset.univ
tactic: ext
state_before: case a
α : Type u_1
β : Type u_2
γ : Type u_3
s t : Set α
inst✝² : Fintype α
p : α → Prop
inst✝¹ : DecidablePred p
inst✝ : Fintype ↑{x | p x}
a✝ : α
⊢ a✝ ∈ {x | p x}.toFinset ↔ a✝ ∈ filter p Finset.univ
state_after: no goals
tactic: simp
Theorem: contDiffOn_top_iff_fderiv_of_isOpen
File: Mathlib/Analysis/Calculus/ContDiff/Defs.lean

Proof steps:
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type uX
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
hs : IsOpen s
⊢ ContDiffOn 𝕜 ⊤ f s ↔ DifferentiableOn 𝕜 f s ∧ ContDiffOn 𝕜 ⊤ (fun y => fderiv 𝕜 f y) s
state_after: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type uX
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
hs : IsOpen s
⊢ DifferentiableOn 𝕜 f s ∧ ContDiffOn 𝕜 ⊤ (fun y => fderivWithin 𝕜 f s y) s ↔
    DifferentiableOn 𝕜 f s ∧ ContDiffOn 𝕜 ⊤ (fun y => fderiv 𝕜 f y) s
tactic: rw [contDiffOn_top_iff_fderivWithin hs.uniqueDiffOn]
state_before: 𝕜 : Type u
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type uX
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f f₁ : E → F
g : F → G
x x₀ : E
c : F
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
hs : IsOpen s
⊢ DifferentiableOn 𝕜 f s ∧ ContDiffOn 𝕜 ⊤ (fun y => fderivWithin 𝕜 f s y) s ↔
    DifferentiableOn 𝕜 f s ∧ ContDiffOn 𝕜 ⊤ (fun y => fderiv 𝕜 f y) s
state_after: no goals
tactic: exact Iff.rfl.and <| contDiffOn_congr fun x hx ↦ fderivWithin_of_isOpen hs hx
Theorem: Surreal.zsmul_pow_two_powHalf
File: Mathlib/SetTheory/Surreal/Dyadic.lean

Proof steps:
state_before: m : ℤ
n k : ℕ
⊢ ↑m * 2 ^ n * powHalf (n + k) = ↑m * powHalf k
state_after: m : ℤ
n k : ℕ
⊢ ↑m * (2 ^ n * powHalf (n + k)) = ↑m * powHalf k
tactic: rw [mul_assoc]
state_before: m : ℤ
n k : ℕ
⊢ ↑m * (2 ^ n * powHalf (n + k)) = ↑m * powHalf k
state_after: case e_a
m : ℤ
n k : ℕ
⊢ 2 ^ n * powHalf (n + k) = powHalf k
tactic: congr
state_before: case e_a
m : ℤ
n k : ℕ
⊢ 2 ^ n * powHalf (n + k) = powHalf k
state_after: no goals
tactic: exact nsmul_pow_two_powHalf' n k
Theorem: LieSubmodule.mem_iInf
File: Mathlib/Algebra/Lie/Submodule.lean

Proof steps:
state_before: R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N N' : LieSubmodule R L M
I J : LieIdeal R L
ι : Sort u_1
p : ι → LieSubmodule R L M
x : M
⊢ x ∈ ⨅ i, p i ↔ ∀ (i : ι), x ∈ p i
state_after: R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N N' : LieSubmodule R L M
I J : LieIdeal R L
ι : Sort u_1
p : ι → LieSubmodule R L M
x : M
⊢ (∀ (i : ι), x ∈ ↑(p i)) ↔ ∀ (i : ι), x ∈ p i
tactic: rw [← SetLike.mem_coe, iInf_coe, Set.mem_iInter]
state_before: R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N N' : LieSubmodule R L M
I J : LieIdeal R L
ι : Sort u_1
p : ι → LieSubmodule R L M
x : M
⊢ (∀ (i : ι), x ∈ ↑(p i)) ↔ ∀ (i : ι), x ∈ p i
state_after: no goals
tactic: rfl
Theorem: CategoryTheory.Limits.pullback.diagonal_comp
File: Mathlib/CategoryTheory/Limits/Shapes/Diagonal.lean

Proof steps:
state_before: C : Type u_1
inst✝⁸ : Category.{u_2, u_1} C
X Y Z : C
inst✝⁷ : HasPullbacks C
S T : C
f✝ : X ⟶ T
g✝ : Y ⟶ T
i : T ⟶ S
inst✝⁶ : HasPullback i i
inst✝⁵ : HasPullback f✝ g✝
inst✝⁴ : HasPullback (f✝ ≫ i) (g✝ ≫ i)
inst✝³ : HasPullback (diagonal i) (map (f✝ ≫ i) (g✝ ≫ i) i i f✝ g✝ (𝟙 S) ⋯ ⋯)
f : X ⟶ Y
g : Y ⟶ Z
inst✝² : HasPullback f f
inst✝¹ : HasPullback g g
inst✝ : HasPullback (f ≫ g) (f ≫ g)
⊢ diagonal (f ≫ g) =
    diagonal f ≫ (pullbackDiagonalMapIdIso f f g).inv ≫ snd (diagonal g) (map (f ≫ g) (f ≫ g) g g f f (𝟙 Z) ⋯ ⋯)
state_after: no goals
tactic: ext <;> simp
Theorem: Function.Antiperiodic.const_smul
File: Mathlib/Algebra/Periodic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f g : α → β
c c₁ c₂ x✝ : α
inst✝³ : AddMonoid α
inst✝² : Neg β
inst✝¹ : Group γ
inst✝ : DistribMulAction γ α
h : Antiperiodic f c
a : γ
x : α
⊢ (fun x => f (a • x)) (x + a⁻¹ • c) = -(fun x => f (a • x)) x
state_after: no goals
tactic: simpa only [smul_add, smul_inv_smul] using h (a • x)
Theorem: Mathlib.Vector.map₂_comm
File: Mathlib/Data/Vector/MapLemmas.lean

Proof steps:
state_before: α : Type u_2
n : ℕ
xs ys : Vector α n
β : Type u_1
f : α → α → β
comm : ∀ (a₁ a₂ : α), f a₁ a₂ = f a₂ a₁
⊢ map₂ f xs ys = map₂ f ys xs
state_after: no goals
tactic: induction xs, ys using Vector.inductionOn₂ <;> simp_all
Theorem: dist_mulIndicator
File: Mathlib/Analysis/Normed/Group/Basic.lean

Proof steps:
state_before: 𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s✝ : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
s t : Set α
f : α → E
x : α
⊢ dist (s.mulIndicator f x) (t.mulIndicator f x) = ‖(s ∆ t).mulIndicator f x‖
state_after: no goals
tactic: rw [dist_eq_norm_div, Set.apply_mulIndicator_symmDiff norm_inv']
Theorem: StrictConvexOn.congr
File: Mathlib/Analysis/Convex/Function.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
α : Type u_4
β : Type u_5
ι : Type u_6
inst✝⁷ : OrderedSemiring 𝕜
inst✝⁶ : AddCommMonoid E
inst✝⁵ : AddCommMonoid F
inst✝⁴ : OrderedAddCommMonoid α
inst✝³ : OrderedAddCommMonoid β
inst✝² : SMul 𝕜 E
inst✝¹ : SMul 𝕜 α
inst✝ : SMul 𝕜 β
s : Set E
f : E → β
g✝ : β → α
g : E → β
hf : StrictConvexOn 𝕜 s f
hfg : EqOn f g s
x : E
hx : x ∈ s
y : E
hy : y ∈ s
hxy : x ≠ y
a b : 𝕜
ha : 0 < a
hb : 0 < b
hab : a + b = 1
⊢ g (a • x + b • y) < a • g x + b • g y
state_after: no goals
tactic: simpa only [← hfg hx, ← hfg hy, ← hfg (hf.1 hx hy ha.le hb.le hab)] using
      hf.2 hx hy hxy ha hb hab
Theorem: MeasureTheory.lintegral_map
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
mβ : MeasurableSpace β
f : β → ℝ≥0∞
g : α → β
hf : Measurable f
hg : Measurable g
⊢ ∫⁻ (a : β), f a ∂Measure.map g μ = ∫⁻ (a : α), f (g a) ∂μ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
mβ : MeasurableSpace β
f : β → ℝ≥0∞
g : α → β
hf : Measurable f
hg : Measurable g
⊢ ⨆ n, (eapprox f n).lintegral (Measure.map g μ) = ⨆ n, (eapprox (f ∘ g) n).lintegral μ
tactic: erw [lintegral_eq_iSup_eapprox_lintegral hf, lintegral_eq_iSup_eapprox_lintegral (hf.comp hg)]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
mβ : MeasurableSpace β
f : β → ℝ≥0∞
g : α → β
hf : Measurable f
hg : Measurable g
⊢ ⨆ n, (eapprox f n).lintegral (Measure.map g μ) = ⨆ n, (eapprox (f ∘ g) n).lintegral μ
state_after: case e_s.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
mβ : MeasurableSpace β
f : β → ℝ≥0∞
g : α → β
hf : Measurable f
hg : Measurable g
n : ℕ
⊢ (eapprox f n).lintegral (Measure.map g μ) = (eapprox (f ∘ g) n).lintegral μ
tactic: congr with n : 1
state_before: case e_s.h
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
mβ : MeasurableSpace β
f : β → ℝ≥0∞
g : α → β
hf : Measurable f
hg : Measurable g
n : ℕ
⊢ (eapprox f n).lintegral (Measure.map g μ) = (eapprox (f ∘ g) n).lintegral μ
state_after: case h.e'_3.h.e'_3
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
mβ : MeasurableSpace β
f : β → ℝ≥0∞
g : α → β
hf : Measurable f
hg : Measurable g
n : ℕ
⊢ eapprox (f ∘ g) n = (eapprox f n).comp g hg
tactic: convert SimpleFunc.lintegral_map _ hg
state_before: case h.e'_3.h.e'_3
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
mβ : MeasurableSpace β
f : β → ℝ≥0∞
g : α → β
hf : Measurable f
hg : Measurable g
n : ℕ
⊢ eapprox (f ∘ g) n = (eapprox f n).comp g hg
state_after: case h.e'_3.h.e'_3.H
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
mβ : MeasurableSpace β
f : β → ℝ≥0∞
g : α → β
hf : Measurable f
hg : Measurable g
n : ℕ
x : α
⊢ ↑(eapprox (f ∘ g) n) x = ↑((eapprox f n).comp g hg) x
tactic: ext1 x
state_before: case h.e'_3.h.e'_3.H
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
mβ : MeasurableSpace β
f : β → ℝ≥0∞
g : α → β
hf : Measurable f
hg : Measurable g
n : ℕ
x : α
⊢ ↑(eapprox (f ∘ g) n) x = ↑((eapprox f n).comp g hg) x
state_after: no goals
tactic: simp only [eapprox_comp hf hg, coe_comp]
Theorem: Continuous.continuousOn
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 δ
f : α → β
s : Set α
h : Continuous f
⊢ ContinuousOn f s
state_after: α : 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 δ
f : α → β
s : Set α
h : ContinuousOn f univ
⊢ ContinuousOn f s
tactic: rw [continuous_iff_continuousOn_univ] at h
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 δ
f : α → β
s : Set α
h : ContinuousOn f univ
⊢ ContinuousOn f s
state_after: no goals
tactic: exact h.mono (subset_univ _)
Theorem: inf_eq_sub_posPart_sub
File: Mathlib/Algebra/Order/Group/PosPart.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝² : Lattice α
inst✝¹ : CommGroup α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b : α
⊢ a ⊓ b = a / (a / b)⁺ᵐ
state_after: no goals
tactic: simp [oneLePart, div_sup, inf_comm]
Theorem: uniformAddGroup_inf
File: Mathlib/Topology/Algebra/UniformGroup.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝³ : UniformSpace α
inst✝² : Group α
inst✝¹ : UniformGroup α
inst✝ : Group β
u₁ u₂ : UniformSpace β
h₁ : UniformGroup β
h₂ : UniformGroup β
⊢ UniformGroup β
state_after: α : Type u_1
β : Type u_2
inst✝³ : UniformSpace α
inst✝² : Group α
inst✝¹ : UniformGroup α
inst✝ : Group β
u₁ u₂ : UniformSpace β
h₁ : UniformGroup β
h₂ : UniformGroup β
b : Bool
⊢ UniformGroup β
tactic: refine uniformGroup_iInf fun b => ?_
state_before: α : Type u_1
β : Type u_2
inst✝³ : UniformSpace α
inst✝² : Group α
inst✝¹ : UniformGroup α
inst✝ : Group β
u₁ u₂ : UniformSpace β
h₁ : UniformGroup β
h₂ : UniformGroup β
b : Bool
⊢ UniformGroup β
state_after: no goals
tactic: cases b <;> assumption
Theorem: Set.nontrivial_of_einfsep_lt_top
File: Mathlib/Topology/MetricSpace/Infsep.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : EDist α
x y : α
s t : Set α
hs : s.einfsep < ⊤
⊢ s.Nontrivial
state_after: case intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝ : EDist α
x y : α
s t : Set α
hs : s.einfsep < ⊤
w✝¹ : α
hx : w✝¹ ∈ s
w✝ : α
hy : w✝ ∈ s
hxy : w✝¹ ≠ w✝
right✝ : edist w✝¹ w✝ < ⊤
⊢ s.Nontrivial
tactic: rcases einfsep_lt_top.1 hs with ⟨_, hx, _, hy, hxy, _⟩
state_before: case intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝ : EDist α
x y : α
s t : Set α
hs : s.einfsep < ⊤
w✝¹ : α
hx : w✝¹ ∈ s
w✝ : α
hy : w✝ ∈ s
hxy : w✝¹ ≠ w✝
right✝ : edist w✝¹ w✝ < ⊤
⊢ s.Nontrivial
state_after: no goals
tactic: exact ⟨_, hx, _, hy, hxy⟩
Theorem: Nat.head!_digits
File: Mathlib/Data/Nat/Digits.lean

Proof steps:
state_before: n✝ b n : ℕ
h : b ≠ 1
⊢ (b.digits n).head! = n % b
state_after: case pos
n✝ b n : ℕ
h : b ≠ 1
hb : 1 < b
⊢ (b.digits n).head! = n % b

case neg
n✝ b n : ℕ
h : b ≠ 1
hb : ¬1 < b
⊢ (b.digits n).head! = n % b
tactic: by_cases hb : 1 < b
Theorem: Function.Injective.noZeroDivisors
File: Mathlib/Algebra/GroupWithZero/InjSurj.lean

Proof steps:
state_before: M₀ : Type u_1
G₀ : Type u_2
M₀' : Type u_3
G₀' : Type u_4
inst✝⁴ : Mul M₀
inst✝³ : Zero M₀
inst✝² : Mul M₀'
inst✝¹ : Zero M₀'
f : M₀ → M₀'
hf : Injective f
zero : f 0 = 0
mul : ∀ (x y : M₀), f (x * y) = f x * f y
inst✝ : NoZeroDivisors M₀'
a b : M₀
H : a * b = 0
⊢ f a * f b = 0
state_after: no goals
tactic: rw [← mul, H, zero]
state_before: M₀ : Type u_1
G₀ : Type u_2
M₀' : Type u_3
G₀' : Type u_4
inst✝⁴ : Mul M₀
inst✝³ : Zero M₀
inst✝² : Mul M₀'
inst✝¹ : Zero M₀'
f : M₀ → M₀'
hf : Injective f
zero : f 0 = 0
mul : ∀ (x y : M₀), f (x * y) = f x * f y
inst✝ : NoZeroDivisors M₀'
a b : M₀
H✝ : a * b = 0
this : f a * f b = 0
H : f a = 0
⊢ f a = f 0
state_after: no goals
tactic: rwa [zero]
state_before: M₀ : Type u_1
G₀ : Type u_2
M₀' : Type u_3
G₀' : Type u_4
inst✝⁴ : Mul M₀
inst✝³ : Zero M₀
inst✝² : Mul M₀'
inst✝¹ : Zero M₀'
f : M₀ → M₀'
hf : Injective f
zero : f 0 = 0
mul : ∀ (x y : M₀), f (x * y) = f x * f y
inst✝ : NoZeroDivisors M₀'
a b : M₀
H✝ : a * b = 0
this : f a * f b = 0
H : f b = 0
⊢ f b = f 0
state_after: no goals
tactic: rwa [zero]
Theorem: Set.image_eq_iff_surjOn_mapsTo
File: Mathlib/Data/Set/Function.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
s s₁ s₂ : Set α
t t₁ t₂ : Set β
p : Set γ
f f₁ f₂ f₃ : α → β
g g₁ g₂ : β → γ
f' f₁' f₂' : β → α
g' : γ → β
a : α
b : β
⊢ f '' s = t ↔ SurjOn f s t ∧ MapsTo f s t
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
s s₁ s₂ : Set α
t t₁ t₂ : Set β
p : Set γ
f f₁ f₂ f₃ : α → β
g g₁ g₂ : β → γ
f' f₁' f₂' : β → α
g' : γ → β
a : α
b : β
⊢ f '' s = t → SurjOn f s t ∧ MapsTo f s t
tactic: refine ⟨?_, fun h => h.1.image_eq_of_mapsTo h.2⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
s s₁ s₂ : Set α
t t₁ t₂ : Set β
p : Set γ
f f₁ f₂ f₃ : α → β
g g₁ g₂ : β → γ
f' f₁' f₂' : β → α
g' : γ → β
a : α
b : β
⊢ f '' s = t → SurjOn f s t ∧ MapsTo f s t
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
s s₁ s₂ : Set α
t₁ t₂ : Set β
p : Set γ
f f₁ f₂ f₃ : α → β
g g₁ g₂ : β → γ
f' f₁' f₂' : β → α
g' : γ → β
a : α
b : β
⊢ SurjOn f s (f '' s) ∧ MapsTo f s (f '' s)
tactic: rintro rfl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
s s₁ s₂ : Set α
t₁ t₂ : Set β
p : Set γ
f f₁ f₂ f₃ : α → β
g g₁ g₂ : β → γ
f' f₁' f₂' : β → α
g' : γ → β
a : α
b : β
⊢ SurjOn f s (f '' s) ∧ MapsTo f s (f '' s)
state_after: no goals
tactic: exact ⟨s.surjOn_image f, s.mapsTo_image f⟩
Theorem: CategoryTheory.PrelaxFunctor.map₂_hom_inv_isIso
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
inst✝ : IsIso η
⊢ F.map₂ η ≫ F.map₂ (inv η) = 𝟙 (F.map f)
state_after: no goals
tactic: simp
Theorem: AddMonoidHom.apply_nat
File: Mathlib/Data/Nat/Cast/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : Monoid α
inst✝ : AddMonoid β
f : ℕ →+ β
n : ℕ
⊢ f n = n • f 1
state_after: no goals
tactic: rw [← multiplesHom_symm_apply, ← multiplesHom_apply, Equiv.apply_symm_apply]
Theorem: cfc_zpow
File: Mathlib/Analysis/CstarAlgebra/ContinuousFunctionalCalculus/Unital.lean

Proof steps:
state_before: R : Type u_1
A : Type u_2
p : A → Prop
inst✝¹¹ : Semifield R
inst✝¹⁰ : StarRing R
inst✝⁹ : MetricSpace R
inst✝⁸ : TopologicalSemiring R
inst✝⁷ : ContinuousStar R
inst✝⁶ : HasContinuousInv₀ R
inst✝⁵ : TopologicalSpace A
inst✝⁴ : Ring A
inst✝³ : StarRing A
inst✝² : Algebra R A
inst✝¹ : ContinuousFunctionalCalculus R p
f : R → R
a✝ : A
inst✝ : UniqueContinuousFunctionalCalculus R A
a : Aˣ
n : ℤ
ha : autoParam (p ↑a) _auto✝
⊢ cfc (fun x => x ^ n) ↑a = ↑(a ^ n)
state_after: no goals
tactic: cases n with
  | ofNat n => simpa using cfc_pow_id (a : A) n
  | negSucc n =>
    simp only [zpow_negSucc, ← inv_pow, Units.val_pow_eq_pow_val]
    have := cfc_pow (fun x ↦ x⁻¹ : R → R) (n + 1) (a : A)
    exact this.trans <| congr($(cfc_inv_id a) ^ (n + 1))
Theorem: Nat.bitwise_zero_right
File: Mathlib/Data/Nat/Bitwise.lean

Proof steps:
state_before: f : Bool → Bool → Bool
n : ℕ
⊢ bitwise f n 0 = if f true false = true then n else 0
state_after: f : Bool → Bool → Bool
n : ℕ
⊢ (if n = 0 then if f false true = true then 0 else 0
    else
      if 0 = 0 then if f true false = true then n else 0
      else
        let n' := n / 2;
        let m' := 0 / 2;
        let b₁ := n % 2 = 1;
        let b₂ := 0 % 2 = 1;
        let r := bitwise f n' m';
        if f (decide b₁) (decide b₂) = true then r + r + 1 else r + r) =
    if f true false = true then n else 0
tactic: unfold bitwise
state_before: f : Bool → Bool → Bool
n : ℕ
⊢ (if n = 0 then if f false true = true then 0 else 0
    else
      if 0 = 0 then if f true false = true then n else 0
      else
        let n' := n / 2;
        let m' := 0 / 2;
        let b₁ := n % 2 = 1;
        let b₂ := 0 % 2 = 1;
        let r := bitwise f n' m';
        if f (decide b₁) (decide b₂) = true then r + r + 1 else r + r) =
    if f true false = true then n else 0
state_after: f : Bool → Bool → Bool
n : ℕ
⊢ n = 0 → 0 = if f true false = true then n else 0
tactic: simp only [ite_self, decide_False, Nat.zero_div, ite_true, ite_eq_right_iff]
state_before: f : Bool → Bool → Bool
n : ℕ
⊢ n = 0 → 0 = if f true false = true then n else 0
state_after: case refl
f : Bool → Bool → Bool
⊢ 0 = if f true false = true then 0 else 0
tactic: rintro ⟨⟩
state_before: case refl
f : Bool → Bool → Bool
⊢ 0 = if f true false = true then 0 else 0
state_after: no goals
tactic: split_ifs <;> rfl
Theorem: Real.inner_le_Lp_mul_Lq_of_nonneg
File: Mathlib/Analysis/MeanInequalities.lean

Proof steps:
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ
p q : ℝ
hpq : p.IsConjExponent q
hf : ∀ i ∈ s, 0 ≤ f i
hg : ∀ i ∈ s, 0 ≤ g i
⊢ ∑ i ∈ s, f i * g i ≤ (∑ i ∈ s, f i ^ p) ^ (1 / p) * (∑ i ∈ s, g i ^ q) ^ (1 / q)
state_after: no goals
tactic: convert inner_le_Lp_mul_Lq s f g hpq using 3 <;> apply sum_congr rfl <;> intro i hi <;>
    simp only [abs_of_nonneg, hf i hi, hg i hi]
Theorem: Ordinal.add_right_cancel
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
n : ℕ
⊢ a + ↑n = b + ↑n ↔ a = b
state_after: no goals
tactic: simp only [le_antisymm_iff, add_le_add_iff_right]
Theorem: isConj_iff_conjugatesOf_eq
File: Mathlib/Algebra/Group/Conj.lean

Proof steps:
state_before: α : Type u
β : Type v
inst✝ : Monoid α
a b : α
h : conjugatesOf a = conjugatesOf b
⊢ IsConj a b
state_after: α : Type u
β : Type v
inst✝ : Monoid α
a b : α
h : conjugatesOf a = conjugatesOf b
ha : b ∈ conjugatesOf b
⊢ IsConj a b
tactic: have ha := @mem_conjugatesOf_self _ _ b
state_before: α : Type u
β : Type v
inst✝ : Monoid α
a b : α
h : conjugatesOf a = conjugatesOf b
ha : b ∈ conjugatesOf b
⊢ IsConj a b
state_after: no goals
tactic: rwa [← h] at ha