ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: MeasureTheory.JordanDecomposition.exists_compl_positive_negative
File: Mathlib/MeasureTheory/Decomposition/Jordan.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j : JordanDecomposition α
⊢ ∃ S,
    MeasurableSet S ∧
      VectorMeasure.restrict j.toSignedMeasure S ≤ VectorMeasure.restrict 0 S ∧
        VectorMeasure.restrict 0 Sᶜ ≤ VectorMeasure.restrict j.toSignedMeasure Sᶜ ∧ j.posPart S = 0 ∧ j.negPart Sᶜ = 0
state_after: case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j : JordanDecomposition α
S : Set α
hS₁ : MeasurableSet S
hS₂ : j.posPart S = 0
hS₃ : j.negPart Sᶜ = 0
⊢ ∃ S,
    MeasurableSet S ∧
      VectorMeasure.restrict j.toSignedMeasure S ≤ VectorMeasure.restrict 0 S ∧
        VectorMeasure.restrict 0 Sᶜ ≤ VectorMeasure.restrict j.toSignedMeasure Sᶜ ∧ j.posPart S = 0 ∧ j.negPart Sᶜ = 0
tactic: obtain ⟨S, hS₁, hS₂, hS₃⟩ := j.mutuallySingular
state_before: case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j : JordanDecomposition α
S : Set α
hS₁ : MeasurableSet S
hS₂ : j.posPart S = 0
hS₃ : j.negPart Sᶜ = 0
⊢ ∃ S,
    MeasurableSet S ∧
      VectorMeasure.restrict j.toSignedMeasure S ≤ VectorMeasure.restrict 0 S ∧
        VectorMeasure.restrict 0 Sᶜ ≤ VectorMeasure.restrict j.toSignedMeasure Sᶜ ∧ j.posPart S = 0 ∧ j.negPart Sᶜ = 0
state_after: case intro.intro.intro.refine_1
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j : JordanDecomposition α
S : Set α
hS₁ : MeasurableSet S
hS₂ : j.posPart S = 0
hS₃ : j.negPart Sᶜ = 0
⊢ VectorMeasure.restrict j.toSignedMeasure S ≤ VectorMeasure.restrict 0 S

case intro.intro.intro.refine_2
α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j : JordanDecomposition α
S : Set α
hS₁ : MeasurableSet S
hS₂ : j.posPart S = 0
hS₃ : j.negPart Sᶜ = 0
⊢ VectorMeasure.restrict 0 Sᶜ ≤ VectorMeasure.restrict j.toSignedMeasure Sᶜ
tactic: refine ⟨S, hS₁, ?_, ?_, hS₂, hS₃⟩
Theorem: AdjoinRoot.Minpoly.toAdjoin.surjective
File: Mathlib/RingTheory/AdjoinRoot.lean

Proof steps:
state_before: R : Type u
S : Type v
K : Type w
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
x : S
⊢ Function.Surjective ⇑(toAdjoin R x)
state_after: R : Type u
S : Type v
K : Type w
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
x : S
⊢ adjoin R (Subtype.val ⁻¹' {x}) ≤ (toAdjoin R x).range
tactic: rw [← range_top_iff_surjective, _root_.eq_top_iff, ← adjoin_adjoin_coe_preimage]
state_before: R : Type u
S : Type v
K : Type w
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
x : S
⊢ adjoin R (Subtype.val ⁻¹' {x}) ≤ (toAdjoin R x).range
state_after: no goals
tactic: exact adjoin_le fun ⟨y₁, y₂⟩ h ↦ ⟨mk (minpoly R x) X, by simpa [toAdjoin] using h.symm⟩
Theorem: Real.rpow_neg
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

Proof steps:
state_before: x✝¹ y✝¹ z✝ w x✝ y✝ z x : ℝ
hx : 0 ≤ x
y : ℝ
⊢ x ^ (-y) = (x ^ y)⁻¹
state_after: x✝¹ y✝¹ z✝ w x✝ y✝ z x : ℝ
hx : 0 ≤ x
y : ℝ
⊢ (if x = 0 then if -y = 0 then 1 else 0 else rexp (log x * -y)) =
    (if x = 0 then if y = 0 then 1 else 0 else rexp (log x * y))⁻¹
tactic: simp only [rpow_def_of_nonneg hx]
state_before: x✝¹ y✝¹ z✝ w x✝ y✝ z x : ℝ
hx : 0 ≤ x
y : ℝ
⊢ (if x = 0 then if -y = 0 then 1 else 0 else rexp (log x * -y)) =
    (if x = 0 then if y = 0 then 1 else 0 else rexp (log x * y))⁻¹
state_after: no goals
tactic: split_ifs <;> simp_all [exp_neg]
Theorem: Matroid.loopyOn_empty
File: Mathlib/Data/Matroid/Constructions.lean

Proof steps:
state_before: α✝ : Type u_1
M : Matroid α✝
E B I X R J : Set α✝
α : Type u_2
⊢ loopyOn ∅ = emptyOn α
state_after: no goals
tactic: rw [← ground_eq_empty_iff, loopyOn_ground]
Theorem: Finset.prod_sdiff_div_prod_sdiff
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

Proof steps:
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝¹ : CommGroup β
inst✝ : DecidableEq α
⊢ (∏ x ∈ s₂ \ s₁, f x) / ∏ x ∈ s₁ \ s₂, f x = (∏ x ∈ s₂, f x) / ∏ x ∈ s₁, f x
state_after: no goals
tactic: simp [← Finset.prod_sdiff (@inf_le_left _ _ s₁ s₂), ← Finset.prod_sdiff (@inf_le_right _ _ s₁ s₂)]
Theorem: CategoryTheory.SimplicialObject.δ_comp_σ_self
File: Mathlib/AlgebraicTopology/SimplicialObject.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
X : SimplicialObject C
n : ℕ
i : Fin (n + 1)
⊢ X.σ i ≫ X.δ i.castSucc = 𝟙 (X _[n])
state_after: C : Type u
inst✝ : Category.{v, u} C
X : SimplicialObject C
n : ℕ
i : Fin (n + 1)
⊢ X.map (SimplexCategory.σ i).op ≫ X.map (SimplexCategory.δ i.castSucc).op = 𝟙 (X _[n])
tactic: dsimp [δ, σ]
state_before: C : Type u
inst✝ : Category.{v, u} C
X : SimplicialObject C
n : ℕ
i : Fin (n + 1)
⊢ X.map (SimplexCategory.σ i).op ≫ X.map (SimplexCategory.δ i.castSucc).op = 𝟙 (X _[n])
state_after: no goals
tactic: simp only [← X.map_comp, ← op_comp, SimplexCategory.δ_comp_σ_self, op_id, X.map_id]
Theorem: Finsupp.single_eq_same
File: Mathlib/Data/Finsupp/Defs.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✝ : Zero M
a a' : α
b : M
⊢ (single a b) a = b
state_after: no goals
tactic: classical exact Pi.single_eq_same (f := fun _ ↦ M) a b
Theorem: GradedTensorProduct.auxEquiv_one
File: Mathlib/LinearAlgebra/TensorProduct/Graded/Internal.lean

Proof steps:
state_before: R : Type u_1
ι : Type u_2
A : Type u_3
B : Type u_4
inst✝⁹ : CommSemiring ι
inst✝⁸ : Module ι (Additive ℤˣ)
inst✝⁷ : DecidableEq ι
inst✝⁶ : CommRing R
inst✝⁵ : Ring A
inst✝⁴ : Ring B
inst✝³ : Algebra R A
inst✝² : Algebra R B
𝒜 : ι → Submodule R A
ℬ : ι → Submodule R B
inst✝¹ : GradedAlgebra 𝒜
inst✝ : GradedAlgebra ℬ
⊢ (auxEquiv R 𝒜 ℬ) 1 = 1
state_after: no goals
tactic: rw [← of_one, Algebra.TensorProduct.one_def, auxEquiv_tmul 𝒜 ℬ, DirectSum.decompose_one,
    DirectSum.decompose_one, Algebra.TensorProduct.one_def]
Theorem: CategoryTheory.Square.toArrowArrowFunctor_obj_hom_right
File: Mathlib/CategoryTheory/Square.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
D : Type u'
inst✝ : Category.{v', u'} D
X✝ Y✝ : Square C
φ : X✝ ⟶ Y✝
⊢ Arrow.homMk ⋯ ≫ ((fun sq => Arrow.mk (Arrow.homMk ⋯)) Y✝).hom =
    ((fun sq => Arrow.mk (Arrow.homMk ⋯)) X✝).hom ≫ Arrow.homMk ⋯
state_after: no goals
tactic: aesop_cat
Theorem: CategoryTheory.Limits.Concrete.empty_of_initial_of_preserves
File: Mathlib/CategoryTheory/Limits/Shapes/ConcreteCategory.lean

Proof steps:
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : ConcreteCategory C
inst✝ : PreservesColimit (Functor.empty C) (forget C)
X : C
h : Nonempty (IsInitial X)
⊢ IsEmpty ((forget C).obj X)
state_after: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : ConcreteCategory C
inst✝ : PreservesColimit (Functor.empty C) (forget C)
X : C
h : Nonempty (IsInitial X)
⊢ Nonempty (IsInitial ((forget C).obj X))
tactic: rw [← Types.initial_iff_empty]
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : ConcreteCategory C
inst✝ : PreservesColimit (Functor.empty C) (forget C)
X : C
h : Nonempty (IsInitial X)
⊢ Nonempty (IsInitial ((forget C).obj X))
state_after: no goals
tactic: exact Nonempty.map (IsInitial.isInitialObj (forget C) _) h
Theorem: PMF.toOuterMeasure_uniformOfFinset_apply
File: Mathlib/Probability/Distributions/Uniform.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s : Finset α
hs : s.Nonempty
a : α
t : Set α
x : α
⊢ (if x ∈ t then (uniformOfFinset s hs) x else 0) = if x ∈ s ∧ x ∈ t then (↑s.card)⁻¹ else 0
state_after: no goals
tactic: simp_rw [uniformOfFinset_apply, ← ite_and, and_comm]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s : Finset α
hs : s.Nonempty
a : α
t : Set α
x : α
hx : x ∈ Finset.filter (fun x => x ∈ t) s
⊢ (if x ∈ s ∧ x ∈ t then (↑s.card)⁻¹ else 0) = (↑s.card)⁻¹
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
s : Finset α
hs : s.Nonempty
a : α
t : Set α
x : α
hx : x ∈ Finset.filter (fun x => x ∈ t) s
this : x ∈ s ∧ x ∈ t := Eq.mp Mathlib.Data.Finset.Basic._auxLemma.138 hx
⊢ (if x ∈ s ∧ x ∈ t then (↑s.card)⁻¹ else 0) = (↑s.card)⁻¹
tactic: let this : x ∈ s ∧ x ∈ t := by simpa using hx
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s : Finset α
hs : s.Nonempty
a : α
t : Set α
x : α
hx : x ∈ Finset.filter (fun x => x ∈ t) s
this : x ∈ s ∧ x ∈ t := Eq.mp Mathlib.Data.Finset.Basic._auxLemma.138 hx
⊢ (if x ∈ s ∧ x ∈ t then (↑s.card)⁻¹ else 0) = (↑s.card)⁻¹
state_after: no goals
tactic: simp only [this, and_self_iff, if_true]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s : Finset α
hs : s.Nonempty
a : α
t : Set α
⊢ ∑ _x ∈ Finset.filter (fun x => x ∈ t) s, (↑s.card)⁻¹ = ↑(Finset.filter (fun x => x ∈ t) s).card / ↑s.card
state_after: no goals
tactic: simp only [div_eq_mul_inv, Finset.sum_const, nsmul_eq_mul]
Theorem: String.Iterator.ValidFor.toEnd
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

Proof steps:
state_before: l r : List Char
it : Iterator
h : ValidFor l r it
⊢ ValidFor (r.reverse ++ l) [] it.toEnd
state_after: l r : List Char
it : Iterator
h : ValidFor l r it
⊢ ValidFor (r.reverse ++ l) [] { s := { data := l.reverseAux r }, i := { byteIdx := utf8Len l + utf8Len r } }
tactic: simp only [Iterator.toEnd, h.toString, endPos_eq, utf8Len_reverseAux]
state_before: l r : List Char
it : Iterator
h : ValidFor l r it
⊢ ValidFor (r.reverse ++ l) [] { s := { data := l.reverseAux r }, i := { byteIdx := utf8Len l + utf8Len r } }
state_after: no goals
tactic: exact .of_eq _ (by simp [List.reverseAux_eq]) (by simp [Nat.add_comm])
Theorem: Valuation.map_sub
File: Mathlib/RingTheory/Valuation/Basic.lean

Proof steps:
state_before: K : Type u_1
F : Type u_2
R : Type u_3
inst✝³ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝² : LinearOrderedCommMonoidWithZero Γ''₀
inst✝¹ : Ring R
inst✝ : LinearOrderedCommGroupWithZero Γ₀
v : Valuation R Γ₀
x✝ y✝ z x y : R
⊢ v (x - y) = v (x + -y)
state_after: no goals
tactic: rw [sub_eq_add_neg]
state_before: K : Type u_1
F : Type u_2
R : Type u_3
inst✝³ : DivisionRing K
Γ₀ : Type u_4
Γ'₀ : Type u_5
Γ''₀ : Type u_6
inst✝² : LinearOrderedCommMonoidWithZero Γ''₀
inst✝¹ : Ring R
inst✝ : LinearOrderedCommGroupWithZero Γ₀
v : Valuation R Γ₀
x✝ y✝ z x y : R
⊢ max (v x) (v (-y)) = max (v x) (v y)
state_after: no goals
tactic: rw [map_neg]
Theorem: Nat.Coprime.mul_add_mul_ne_mul
File: Mathlib/Data/Nat/GCD/Basic.lean

Proof steps:
state_before: m n a b : ℕ
cop : m.Coprime n
ha : a ≠ 0
hb : b ≠ 0
⊢ a * m + b * n ≠ m * n
state_after: m n a b : ℕ
cop : m.Coprime n
ha : a ≠ 0
hb : b ≠ 0
h : a * m + b * n = m * n
⊢ False
tactic: intro h
state_before: m n a b : ℕ
cop : m.Coprime n
ha : a ≠ 0
hb : b ≠ 0
h : a * m + b * n = m * n
⊢ False
state_after: case intro
m n b : ℕ
cop : m.Coprime n
hb : b ≠ 0
x : ℕ
ha : n * x ≠ 0
h : n * x * m + b * n = m * n
⊢ False
tactic: obtain ⟨x, rfl⟩ : n ∣ a :=
    cop.symm.dvd_of_dvd_mul_right
      ((Nat.dvd_add_iff_left (Nat.dvd_mul_left n b)).mpr
        ((congr_arg _ h).mpr (Nat.dvd_mul_left n m)))
state_before: case intro
m n b : ℕ
cop : m.Coprime n
hb : b ≠ 0
x : ℕ
ha : n * x ≠ 0
h : n * x * m + b * n = m * n
⊢ False
state_after: case intro.intro
m n : ℕ
cop : m.Coprime n
x : ℕ
ha : n * x ≠ 0
y : ℕ
hb : m * y ≠ 0
h : n * x * m + m * y * n = m * n
⊢ False
tactic: obtain ⟨y, rfl⟩ : m ∣ b :=
    cop.dvd_of_dvd_mul_right
      ((Nat.dvd_add_iff_right (Nat.dvd_mul_left m (n * x))).mpr
        ((congr_arg _ h).mpr (Nat.dvd_mul_right m n)))
state_before: case intro.intro
m n : ℕ
cop : m.Coprime n
x : ℕ
ha : n * x ≠ 0
y : ℕ
hb : m * y ≠ 0
h : n * x * m + m * y * n = m * n
⊢ False
state_after: case intro.intro
m n : ℕ
cop : m.Coprime n
x : ℕ
ha : 1 ≤ x ∧ n ≠ 0
y : ℕ
hb : 1 ≤ y ∧ m ≠ 0
h : n * x * m + m * y * n = m * n
⊢ False
tactic: rw [mul_comm, mul_ne_zero_iff, ← one_le_iff_ne_zero] at ha hb
state_before: case intro.intro
m n : ℕ
cop : m.Coprime n
x : ℕ
ha : 1 ≤ x ∧ n ≠ 0
y : ℕ
hb : 1 ≤ y ∧ m ≠ 0
h : n * x * m + m * y * n = m * n
⊢ False
state_after: case intro.intro
m n : ℕ
cop : m.Coprime n
x : ℕ
ha : 1 ≤ x ∧ n ≠ 0
y : ℕ
hb : 1 ≤ y ∧ m ≠ 0
h : n * x * m + m * y * n = m * n
⊢ (x + y) * (m * n) = m * n
tactic: refine mul_ne_zero hb.2 ha.2 (eq_zero_of_mul_eq_self_left (ne_of_gt (add_le_add ha.1 hb.1)) ?_)
state_before: case intro.intro
m n : ℕ
cop : m.Coprime n
x : ℕ
ha : 1 ≤ x ∧ n ≠ 0
y : ℕ
hb : 1 ≤ y ∧ m ≠ 0
h : n * x * m + m * y * n = m * n
⊢ (x + y) * (m * n) = m * n
state_after: no goals
tactic: rw [← mul_assoc, ← h, add_mul, add_mul, mul_comm _ n, ← mul_assoc, mul_comm y]
Theorem: Commute.add_pow_prime_eq
File: Mathlib/Algebra/CharP/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝ : Semiring R
p : ℕ
x y : R
hp : Nat.Prime p
h : Commute x y
⊢ (x + y) ^ p = x ^ p + y ^ p + ↑p * ∑ k ∈ Ioo 0 p, x ^ k * y ^ (p - k) * ↑(p.choose k / p)
state_after: no goals
tactic: simpa using h.add_pow_prime_pow_eq hp 1
Theorem: Pell.IsFundamental.y_strictMono
File: Mathlib/NumberTheory/Pell.lean

Proof steps:
state_before: d : ℤ
a : Solution₁ d
h : IsFundamental a
H : ∀ (n : ℤ), 0 ≤ n → (a ^ n).y < (a ^ (n + 1)).y
⊢ StrictMono fun n => (a ^ n).y
state_after: d : ℤ
a : Solution₁ d
h : IsFundamental a
H : ∀ (n : ℤ), 0 ≤ n → (a ^ n).y < (a ^ (n + 1)).y
n : ℤ
⊢ (a ^ n).y < (a ^ (n + 1)).y
tactic: refine strictMono_int_of_lt_succ fun n => ?_
state_before: d : ℤ
a : Solution₁ d
h : IsFundamental a
H : ∀ (n : ℤ), 0 ≤ n → (a ^ n).y < (a ^ (n + 1)).y
n : ℤ
⊢ (a ^ n).y < (a ^ (n + 1)).y
state_after: case inl
d : ℤ
a : Solution₁ d
h : IsFundamental a
H : ∀ (n : ℤ), 0 ≤ n → (a ^ n).y < (a ^ (n + 1)).y
n : ℤ
hn : 0 ≤ n
⊢ (a ^ n).y < (a ^ (n + 1)).y

case inr
d : ℤ
a : Solution₁ d
h : IsFundamental a
H : ∀ (n : ℤ), 0 ≤ n → (a ^ n).y < (a ^ (n + 1)).y
n : ℤ
hn : n < 0
⊢ (a ^ n).y < (a ^ (n + 1)).y
tactic: rcases le_or_lt 0 n with hn | hn
Theorem: smul_smul_smul_comm
File: Mathlib/Algebra/Group/Action/Defs.lean

Proof steps:
state_before: M : Type u_1
N : Type u_2
G : Type u_3
H : Type u_4
A : Type u_5
B : Type u_6
α : Type u_7
β : Type u_8
γ : Type u_9
δ : Type u_10
inst✝⁷ : SMul α β
inst✝⁶ : SMul α γ
inst✝⁵ : SMul β δ
inst✝⁴ : SMul α δ
inst✝³ : SMul γ δ
inst✝² : IsScalarTower α β δ
inst✝¹ : IsScalarTower α γ δ
inst✝ : SMulCommClass β γ δ
a : α
b : β
c : γ
d : δ
⊢ (a • b) • c • d = (a • c) • b • d
state_after: no goals
tactic: rw [smul_assoc, smul_assoc, smul_comm b]
Theorem: toIocMod_add_left
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 : α
⊢ toIocMod hp a (p + b) = toIocMod hp a b
state_after: no goals
tactic: rw [add_comm, toIocMod_add_right]
Theorem: Filter.IsBasis.hasBasis
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' : ι'
h : IsBasis p s
t : Set α
⊢ t ∈ h.filter ↔ ∃ i, p i ∧ s i ⊆ t
state_after: no goals
tactic: simp only [h.mem_filter_iff, exists_prop]
Theorem: Polynomial.degree_lt_iff_coeff_zero
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

Proof steps:
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
f : R[X]
n : ℕ
⊢ f.degree < ↑n ↔ ∀ (m : ℕ), n ≤ m → f.coeff m = 0
state_after: no goals
tactic: simp only [degree, Finset.sup_lt_iff (WithBot.bot_lt_coe n), mem_support_iff,
    WithBot.coe_lt_coe, ← @not_le ℕ, max_eq_sup_coe, Nat.cast_withBot, Ne, not_imp_not]
Theorem: PolyEquivTensor.toFunLinear_mul_tmul_mul_aux_1
File: Mathlib/RingTheory/PolynomialAlgebra.lean

Proof steps:
state_before: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Semiring A
inst✝ : Algebra R A
p : R[X]
k : ℕ
h : Decidable ¬p.coeff k = 0
a : A
⊢ (if ¬p.coeff k = 0 then a * (algebraMap R A) (p.coeff k) else 0) = a * (algebraMap R A) (p.coeff k)
state_after: no goals
tactic: classical split_ifs <;> simp [*]
Theorem: antilipschitzWith_lineMap
File: Mathlib/Analysis/NormedSpace/AddTorsor.lean

Proof steps:
state_before: α : Type u_1
V : Type u_2
P : Type u_3
W : Type u_4
Q : Type u_5
inst✝⁸ : SeminormedAddCommGroup V
inst✝⁷ : PseudoMetricSpace P
inst✝⁶ : NormedAddTorsor V P
inst✝⁵ : NormedAddCommGroup W
inst✝⁴ : MetricSpace Q
inst✝³ : NormedAddTorsor W Q
𝕜 : Type u_6
inst✝² : NormedField 𝕜
inst✝¹ : NormedSpace 𝕜 V
inst✝ : NormedSpace 𝕜 W
p₁ p₂ : Q
h : p₁ ≠ p₂
c₁ c₂ : 𝕜
⊢ dist c₁ c₂ ≤ ↑(nndist p₁ p₂)⁻¹ * dist ((lineMap p₁ p₂) c₁) ((lineMap p₁ p₂) c₂)
state_after: no goals
tactic: rw [dist_lineMap_lineMap, NNReal.coe_inv, ← dist_nndist, mul_left_comm,
      inv_mul_cancel (dist_ne_zero.2 h), mul_one]
Theorem: CategoryTheory.BinaryCofan.mono_inr_of_isVanKampen
File: Mathlib/CategoryTheory/Limits/VanKampen.lean

Proof steps:
state_before: J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.280541, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.280548, u_2} D
X✝ Y✝ : C
inst✝ : HasInitial C
X Y : C
c : BinaryCofan X Y
h : IsVanKampenColimit c
⊢ Mono c.inr
state_after: J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.280541, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.280548, u_2} D
X✝ Y✝ : C
inst✝ : HasInitial C
X Y : C
c : BinaryCofan X Y
h : IsVanKampenColimit c
⊢ IsPullback (𝟙 ((pair X Y).obj { as := WalkingPair.right })) (𝟙 ((pair X Y).obj { as := WalkingPair.right })) c.inr
    c.inr
tactic: refine PullbackCone.mono_of_isLimitMkIdId _ (IsPullback.isLimit ?_)
state_before: J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.280541, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.280548, u_2} D
X✝ Y✝ : C
inst✝ : HasInitial C
X Y : C
c : BinaryCofan X Y
h : IsVanKampenColimit c
⊢ IsPullback (𝟙 ((pair X Y).obj { as := WalkingPair.right })) (𝟙 ((pair X Y).obj { as := WalkingPair.right })) c.inr
    c.inr
state_after: case refine_1
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.280541, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.280548, u_2} D
X✝ Y✝ : C
inst✝ : HasInitial C
X Y : C
c : BinaryCofan X Y
h : IsVanKampenColimit c
⊢ mapPair (initial.to X) (𝟙 Y) ≫ c.ι =
    (BinaryCofan.mk (initial.to Y) (𝟙 Y)).ι ≫ (Functor.const (Discrete WalkingPair)).map c.inr

case refine_2
J : Type v'
inst✝⁴ : Category.{u', v'} J
C : Type u
inst✝³ : Category.{v, u} C
K : Type u_1
inst✝² : Category.{?u.280541, u_1} K
D : Type u_2
inst✝¹ : Category.{?u.280548, u_2} D
X✝ Y✝ : C
inst✝ : HasInitial C
X Y : C
c : BinaryCofan X Y
h : IsVanKampenColimit c
⊢ IsColimit (BinaryCofan.mk (initial.to Y) (𝟙 Y))
tactic: refine (h (BinaryCofan.mk (initial.to Y) (𝟙 Y)) (mapPair (initial.to X) (𝟙 Y)) c.inr ?_
      (mapPair_equifibered _)).mp ⟨?_⟩ ⟨WalkingPair.right⟩
Theorem: Ideal.comap_eq_of_scalar_tower_quotient
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
p : Ideal R
P : Ideal S
inst✝² : Algebra R S
inst✝¹ : Algebra (R ⧸ p) (S ⧸ P)
inst✝ : IsScalarTower R (R ⧸ p) (S ⧸ P)
h : Function.Injective ⇑(algebraMap (R ⧸ p) (S ⧸ P))
⊢ comap (algebraMap R S) P = p
state_after: case h
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
p : Ideal R
P : Ideal S
inst✝² : Algebra R S
inst✝¹ : Algebra (R ⧸ p) (S ⧸ P)
inst✝ : IsScalarTower R (R ⧸ p) (S ⧸ P)
h : Function.Injective ⇑(algebraMap (R ⧸ p) (S ⧸ P))
x : R
⊢ x ∈ comap (algebraMap R S) P ↔ x ∈ p
tactic: ext x
state_before: case h
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
p : Ideal R
P : Ideal S
inst✝² : Algebra R S
inst✝¹ : Algebra (R ⧸ p) (S ⧸ P)
inst✝ : IsScalarTower R (R ⧸ p) (S ⧸ P)
h : Function.Injective ⇑(algebraMap (R ⧸ p) (S ⧸ P))
x : R
⊢ x ∈ comap (algebraMap R S) P ↔ x ∈ p
state_after: case h
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
p : Ideal R
P : Ideal S
inst✝² : Algebra R S
inst✝¹ : Algebra (R ⧸ p) (S ⧸ P)
inst✝ : IsScalarTower R (R ⧸ p) (S ⧸ P)
h : Function.Injective ⇑(algebraMap (R ⧸ p) (S ⧸ P))
x : R
⊢ (algebraMap (R ⧸ p) (S ⧸ P)) ((Quotient.mk p) x) = 0 ↔ (Quotient.mk p) x = 0
tactic: rw [mem_comap, ← Quotient.eq_zero_iff_mem, ← Quotient.eq_zero_iff_mem, Quotient.mk_algebraMap,
    IsScalarTower.algebraMap_apply R (R ⧸ p) (S ⧸ P), Quotient.algebraMap_eq]
state_before: case h
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
p : Ideal R
P : Ideal S
inst✝² : Algebra R S
inst✝¹ : Algebra (R ⧸ p) (S ⧸ P)
inst✝ : IsScalarTower R (R ⧸ p) (S ⧸ P)
h : Function.Injective ⇑(algebraMap (R ⧸ p) (S ⧸ P))
x : R
⊢ (algebraMap (R ⧸ p) (S ⧸ P)) ((Quotient.mk p) x) = 0 ↔ (Quotient.mk p) x = 0
state_after: case h.mp
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
p : Ideal R
P : Ideal S
inst✝² : Algebra R S
inst✝¹ : Algebra (R ⧸ p) (S ⧸ P)
inst✝ : IsScalarTower R (R ⧸ p) (S ⧸ P)
h : Function.Injective ⇑(algebraMap (R ⧸ p) (S ⧸ P))
x : R
⊢ (algebraMap (R ⧸ p) (S ⧸ P)) ((Quotient.mk p) x) = 0 → (Quotient.mk p) x = 0

case h.mpr
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I J : Ideal S
p : Ideal R
P : Ideal S
inst✝² : Algebra R S
inst✝¹ : Algebra (R ⧸ p) (S ⧸ P)
inst✝ : IsScalarTower R (R ⧸ p) (S ⧸ P)
h : Function.Injective ⇑(algebraMap (R ⧸ p) (S ⧸ P))
x : R
⊢ (Quotient.mk p) x = 0 → (algebraMap (R ⧸ p) (S ⧸ P)) ((Quotient.mk p) x) = 0
tactic: constructor
Theorem: Multiset.disjoint_singleton
File: Mathlib/Data/Multiset/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type v
γ : Type u_2
l : Multiset α
a : α
⊢ l.Disjoint {a} ↔ a ∉ l
state_after: no goals
tactic: rw [disjoint_comm, singleton_disjoint]
Theorem: SimpleGraph.card_commonNeighbors_le_degree_left
File: Mathlib/Combinatorics/SimpleGraph/Finite.lean

Proof steps:
state_before: V : Type u_1
G : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v w : V
⊢ Fintype.card ↑(G.commonNeighbors v w) ≤ G.degree v
state_after: V : Type u_1
G : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v w : V
⊢ Fintype.card ↑(G.commonNeighbors v w) ≤ Fintype.card ↑(G.neighborSet v)
tactic: rw [← card_neighborSet_eq_degree]
state_before: V : Type u_1
G : SimpleGraph V
e : Sym2 V
inst✝¹ : Fintype V
inst✝ : DecidableRel G.Adj
v w : V
⊢ Fintype.card ↑(G.commonNeighbors v w) ≤ Fintype.card ↑(G.neighborSet v)
state_after: no goals
tactic: exact Set.card_le_card Set.inter_subset_left
Theorem: Multiset.count_eq_card
File: Mathlib/Data/Multiset/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type v
γ : Type u_2
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
⊢ count a s = card s ↔ ∀ x ∈ s, a = x
state_after: no goals
tactic: simp [countP_eq_card, count, @eq_comm _ a]