ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: List.Sorted.le_head!
File: Mathlib/Data/List/Sort.lean

Proof steps:
state_before: α : Type u
r : α → α → Prop
a✝ : α
l✝ : List α
inst✝¹ : Inhabited α
inst✝ : Preorder α
a : α
l : List α
h : Sorted (fun x x_1 => x > x_1) l
ha : a ∈ l
⊢ a ≤ l.head!
state_after: α : Type u
r : α → α → Prop
a✝ : α
l✝ : List α
inst✝¹ : Inhabited α
inst✝ : Preorder α
a : α
l : List α
h : Sorted (fun x x_1 => x > x_1) (l.head! :: l.tail)
ha : a ∈ l.head! :: l.tail
⊢ a ≤ l.head!
tactic: rw [← List.cons_head!_tail (List.ne_nil_of_mem ha)] at h ha
state_before: α : Type u
r : α → α → Prop
a✝ : α
l✝ : List α
inst✝¹ : Inhabited α
inst✝ : Preorder α
a : α
l : List α
h : Sorted (fun x x_1 => x > x_1) (l.head! :: l.tail)
ha : a ∈ l.head! :: l.tail
⊢ a ≤ l.head!
state_after: case head
α : Type u
r : α → α → Prop
a : α
l✝ : List α
inst✝¹ : Inhabited α
inst✝ : Preorder α
l : List α
h : Sorted (fun x x_1 => x > x_1) (l.head! :: l.tail)
⊢ l.head! ≤ l.head!

case tail
α : Type u
r : α → α → Prop
a✝¹ : α
l✝ : List α
inst✝¹ : Inhabited α
inst✝ : Preorder α
a : α
l : List α
h : Sorted (fun x x_1 => x > x_1) (l.head! :: l.tail)
a✝ : Mem a l.tail
⊢ a ≤ l.head!
tactic: cases ha
Theorem: Hyperreal.st_neg
File: Mathlib/Data/Real/Hyperreal.lean

Proof steps:
state_before: x : ℝ*
h : x.Infinite
⊢ (-x).st = -x.st
state_after: no goals
tactic: rw [h.st_eq, (infinite_neg.2 h).st_eq, neg_zero]
Theorem: Stream'.get_tails
File: Mathlib/Data/Stream/Init.lean

Proof steps:
state_before: α : Type u
β : Type v
δ : Type w
⊢ ∀ (n : ℕ) (s : Stream' α), s.tails.get n = drop n s.tail
state_after: α : Type u
β : Type v
δ : Type w
n : ℕ
⊢ ∀ (s : Stream' α), s.tails.get n = drop n s.tail
tactic: intro n
state_before: α : Type u
β : Type v
δ : Type w
n : ℕ
⊢ ∀ (s : Stream' α), s.tails.get n = drop n s.tail
state_after: case zero
α : Type u
β : Type v
δ : Type w
⊢ ∀ (s : Stream' α), s.tails.get 0 = drop 0 s.tail

case succ
α : Type u
β : Type v
δ : Type w
n' : ℕ
ih : ∀ (s : Stream' α), s.tails.get n' = drop n' s.tail
⊢ ∀ (s : Stream' α), s.tails.get (n' + 1) = drop (n' + 1) s.tail
tactic: induction' n with n' ih
Theorem: List.Sublist.eraseP
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

Proof steps:
state_before: α✝ : Type u_1
l₁✝ l₂ : List α✝
p : α✝ → Bool
l₁ l₂✝ : List α✝
a : α✝
s : l₁ <+ l₂✝
⊢ eraseP p l₁ <+ eraseP p (a :: l₂✝)
state_after: case pos
α✝ : Type u_1
l₁✝ l₂ : List α✝
p : α✝ → Bool
l₁ l₂✝ : List α✝
a : α✝
s : l₁ <+ l₂✝
h : p a = true
⊢ eraseP p l₁ <+ l₂✝

case neg
α✝ : Type u_1
l₁✝ l₂ : List α✝
p : α✝ → Bool
l₁ l₂✝ : List α✝
a : α✝
s : l₁ <+ l₂✝
h : ¬p a = true
⊢ eraseP p l₁ <+ a :: eraseP p l₂✝
tactic: by_cases h : p a <;> simp [h]
state_before: case pos
α✝ : Type u_1
l₁✝ l₂ : List α✝
p : α✝ → Bool
l₁ l₂✝ : List α✝
a : α✝
s : l₁ <+ l₂✝
h : p a = true
⊢ eraseP p l₁ <+ l₂✝

case neg
α✝ : Type u_1
l₁✝ l₂ : List α✝
p : α✝ → Bool
l₁ l₂✝ : List α✝
a : α✝
s : l₁ <+ l₂✝
h : ¬p a = true
⊢ eraseP p l₁ <+ a :: eraseP p l₂✝
state_after: no goals
tactic: exacts [s.eraseP.trans (eraseP_sublist _), s.eraseP.cons _]
state_before: α✝ : Type u_1
l₁ l₂ : List α✝
p : α✝ → Bool
l₁✝ l₂✝ : List α✝
a : α✝
s : l₁✝ <+ l₂✝
⊢ eraseP p (a :: l₁✝) <+ eraseP p (a :: l₂✝)
state_after: case pos
α✝ : Type u_1
l₁ l₂ : List α✝
p : α✝ → Bool
l₁✝ l₂✝ : List α✝
a : α✝
s : l₁✝ <+ l₂✝
h : p a = true
⊢ l₁✝ <+ l₂✝

case neg
α✝ : Type u_1
l₁ l₂ : List α✝
p : α✝ → Bool
l₁✝ l₂✝ : List α✝
a : α✝
s : l₁✝ <+ l₂✝
h : ¬p a = true
⊢ eraseP p l₁✝ <+ eraseP p l₂✝
tactic: by_cases h : p a <;> simp [h]
state_before: case pos
α✝ : Type u_1
l₁ l₂ : List α✝
p : α✝ → Bool
l₁✝ l₂✝ : List α✝
a : α✝
s : l₁✝ <+ l₂✝
h : p a = true
⊢ l₁✝ <+ l₂✝

case neg
α✝ : Type u_1
l₁ l₂ : List α✝
p : α✝ → Bool
l₁✝ l₂✝ : List α✝
a : α✝
s : l₁✝ <+ l₂✝
h : ¬p a = true
⊢ eraseP p l₁✝ <+ eraseP p l₂✝
state_after: no goals
tactic: exacts [s, s.eraseP]
Theorem: IsOpen.vadd_left
File: Mathlib/Topology/Algebra/Group/Basic.lean

Proof steps:
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace β
inst✝² : Group α
inst✝¹ : MulAction α β
inst✝ : ContinuousConstSMul α β
s : Set α
t : Set β
ht : IsOpen t
⊢ IsOpen (s • t)
state_after: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace β
inst✝² : Group α
inst✝¹ : MulAction α β
inst✝ : ContinuousConstSMul α β
s : Set α
t : Set β
ht : IsOpen t
⊢ IsOpen (⋃ a ∈ s, a • t)
tactic: rw [← iUnion_smul_set]
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace β
inst✝² : Group α
inst✝¹ : MulAction α β
inst✝ : ContinuousConstSMul α β
s : Set α
t : Set β
ht : IsOpen t
⊢ IsOpen (⋃ a ∈ s, a • t)
state_after: no goals
tactic: exact isOpen_biUnion fun a _ => ht.smul _
Theorem: WeierstrassCurve.leadingCoeff_Φ
File: Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Degree.lean

Proof steps:
state_before: R : Type u
inst✝¹ : CommRing R
W : WeierstrassCurve R
inst✝ : Nontrivial R
n : ℤ
⊢ (W.Φ n).leadingCoeff = 1
state_after: no goals
tactic: rw [leadingCoeff, natDegree_Φ, coeff_Φ]
Theorem: Polynomial.natDegree_primPart
File: Mathlib/RingTheory/Polynomial/Content.lean

Proof steps:
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
⊢ p.primPart.natDegree = p.natDegree
state_after: case pos
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
h : C p.content = 0
⊢ p.primPart.natDegree = p.natDegree

case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
h : ¬C p.content = 0
⊢ p.primPart.natDegree = p.natDegree
tactic: by_cases h : C p.content = 0
state_before: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
p : R[X]
h : ¬C p.content = 0
⊢ p.primPart.natDegree = p.natDegree
state_after: no goals
tactic: conv_rhs =>
    rw [p.eq_C_content_mul_primPart, natDegree_mul h p.primPart_ne_zero, natDegree_C, zero_add]
Theorem: xor_not_not
File: Mathlib/Logic/Basic.lean

Proof steps:
state_before: a b : Prop
⊢ Xor' (¬a) ¬b ↔ Xor' a b
state_after: no goals
tactic: simp [Xor', or_comm, and_comm]
Theorem: AlgebraicGeometry.PresheafedSpace.colimitCocone_ι_app_c
File: Mathlib/Geometry/RingedSpace/PresheafedSpace/HasColimits.lean

Proof steps:
state_before: J : Type u'
inst✝³ : Category.{v', u'} J
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimitsOfShape J TopCat
inst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)
F : J ⥤ PresheafedSpace C
j j' : J
f : j ⟶ j'
⊢ F.map f ≫
      (fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) }) j' =
    (fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) }) j ≫
      ((Functor.const J).obj (colimit F)).map f
state_after: case w
J : Type u'
inst✝³ : Category.{v', u'} J
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimitsOfShape J TopCat
inst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)
F : J ⥤ PresheafedSpace C
j j' : J
f : j ⟶ j'
⊢ (F.map f ≫
        (fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })
          j').base =
    ((fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) }) j ≫
        ((Functor.const J).obj (colimit F)).map f).base

case h
J : Type u'
inst✝³ : Category.{v', u'} J
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasColimitsOfShape J TopCat
inst✝ : ∀ (X : TopCat), HasLimitsOfShape Jᵒᵖ (Presheaf C X)
F : J ⥤ PresheafedSpace C
j j' : J
f : j ⟶ j'
⊢ (F.map f ≫
          (fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) })
            j').c ≫
      whiskerRight (eqToHom ⋯) (F.obj j).presheaf =
    ((fun j => { base := colimit.ι (F ⋙ forget C) j, c := limit.π (pushforwardDiagramToColimit F).leftOp (op j) }) j ≫
        ((Functor.const J).obj (colimit F)).map f).c
tactic: ext1
Theorem: MeasureTheory.SimpleFunc.lintegral_restrict_iUnion_of_directed
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ✝ ν : Measure α
ι : Type u_5
inst✝ : Countable ι
f : α →ₛ ℝ≥0∞
s : ι → Set α
hd : Directed (fun x x_1 => x ⊆ x_1) s
μ : Measure α
⊢ f.lintegral (μ.restrict (⋃ i, s i)) = ⨆ i, f.lintegral (μ.restrict (s i))
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ✝ ν : Measure α
ι : Type u_5
inst✝ : Countable ι
f : α →ₛ ℝ≥0∞
s : ι → Set α
hd : Directed (fun x x_1 => x ⊆ x_1) s
μ : Measure α
⊢ ∑ x ∈ f.range, ⨆ i, x * (μ.restrict (s i)) (↑f ⁻¹' {x}) = ⨆ i, ∑ x ∈ f.range, x * (μ.restrict (s i)) (↑f ⁻¹' {x})
tactic: simp only [lintegral, Measure.restrict_iUnion_apply_eq_iSup hd (measurableSet_preimage ..),
    ENNReal.mul_iSup]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ✝ ν : Measure α
ι : Type u_5
inst✝ : Countable ι
f : α →ₛ ℝ≥0∞
s : ι → Set α
hd : Directed (fun x x_1 => x ⊆ x_1) s
μ : Measure α
⊢ ∑ x ∈ f.range, ⨆ i, x * (μ.restrict (s i)) (↑f ⁻¹' {x}) = ⨆ i, ∑ x ∈ f.range, x * (μ.restrict (s i)) (↑f ⁻¹' {x})
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ✝ ν : Measure α
ι : Type u_5
inst✝ : Countable ι
f : α →ₛ ℝ≥0∞
s : ι → Set α
hd : Directed (fun x x_1 => x ⊆ x_1) s
μ : Measure α
i j k : ι
x✝ : (fun x x_1 => x ⊆ x_1) (s i) (s k) ∧ (fun x x_1 => x ⊆ x_1) (s j) (s k)
hik : (fun x x_1 => x ⊆ x_1) (s i) (s k)
hjk : (fun x x_1 => x ⊆ x_1) (s j) (s k)
a : ℝ≥0∞
⊢ a * (μ.restrict (s i)) (↑f ⁻¹' {a}) ≤ a * (μ.restrict (s k)) (↑f ⁻¹' {a}) ∧
    a * (μ.restrict (s j)) (↑f ⁻¹' {a}) ≤ a * (μ.restrict (s k)) (↑f ⁻¹' {a})
tactic: refine finsetSum_iSup fun i j ↦ (hd i j).imp fun k ⟨hik, hjk⟩ ↦ fun a ↦ ?_
Theorem: ProbabilityTheory.Kernel.prod_const
File: Mathlib/Probability/Kernel/Composition.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
mγ : MeasurableSpace γ
μ : Measure β
inst✝¹ : SFinite μ
ν : Measure γ
inst✝ : SFinite ν
⊢ const α μ ×ₖ const α ν = const α (μ.prod ν)
state_after: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
mγ : MeasurableSpace γ
μ : Measure β
inst✝¹ : SFinite μ
ν : Measure γ
inst✝ : SFinite ν
x : α
s✝ : Set (β × γ)
a✝ : MeasurableSet s✝
⊢ ((const α μ ×ₖ const α ν) x) s✝ = ((const α (μ.prod ν)) x) s✝
tactic: ext x
state_before: case h.h
α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
mγ : MeasurableSpace γ
μ : Measure β
inst✝¹ : SFinite μ
ν : Measure γ
inst✝ : SFinite ν
x : α
s✝ : Set (β × γ)
a✝ : MeasurableSet s✝
⊢ ((const α μ ×ₖ const α ν) x) s✝ = ((const α (μ.prod ν)) x) s✝
state_after: no goals
tactic: rw [const_apply, prod_apply, const_apply, const_apply]
Theorem: MeasurableSpace.exists_measurableSet_of_ne
File: Mathlib/MeasureTheory/MeasurableSpace/CountablyGenerated.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : SeparatesPoints α
x y : α
h : x ≠ y
⊢ ∃ s, MeasurableSet s ∧ x ∈ s ∧ y ∉ s
state_after: α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : SeparatesPoints α
x y : α
h : ∀ (s : Set α), MeasurableSet s → x ∈ s → y ∈ s
⊢ x = y
tactic: contrapose! h
state_before: α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : SeparatesPoints α
x y : α
h : ∀ (s : Set α), MeasurableSet s → x ∈ s → y ∈ s
⊢ x = y
state_after: no goals
tactic: exact separatesPoints_def h
Theorem: multiplicity.unique
File: Mathlib/RingTheory/Multiplicity.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
k : ℕ
hk : a ^ k ∣ b
hsucc : ¬a ^ (k + 1) ∣ b
⊢ multiplicity a b ≤ ↑k
state_after: α : Type u_1
β : Type u_2
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
k : ℕ
hk : a ^ k ∣ b
hsucc : ¬a ^ (k + 1) ∣ b
this : Finite a b
⊢ multiplicity a b ≤ ↑k
tactic: have : Finite a b := ⟨k, hsucc⟩
state_before: α : Type u_1
β : Type u_2
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
k : ℕ
hk : a ^ k ∣ b
hsucc : ¬a ^ (k + 1) ∣ b
this : Finite a b
⊢ multiplicity a b ≤ ↑k
state_after: α : Type u_1
β : Type u_2
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
k : ℕ
hk : a ^ k ∣ b
hsucc : ¬a ^ (k + 1) ∣ b
this : Finite a b
⊢ ∃ (h : (multiplicity a b).Dom), (multiplicity a b).get h ≤ k
tactic: rw [PartENat.le_coe_iff]
state_before: α : Type u_1
β : Type u_2
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : DecidableRel fun x x_1 => x ∣ x_1
inst✝ : DecidableRel fun x x_1 => x ∣ x_1
a b : α
k : ℕ
hk : a ^ k ∣ b
hsucc : ¬a ^ (k + 1) ∣ b
this : Finite a b
⊢ ∃ (h : (multiplicity a b).Dom), (multiplicity a b).get h ≤ k
state_after: no goals
tactic: exact ⟨this, Nat.find_min' _ hsucc⟩
Theorem: IsIdempotentElem.one_sub
File: Mathlib/Algebra/Ring/Idempotents.lean

Proof steps:
state_before: M : Type u_1
N : Type u_2
S : Type u_3
M₀ : Type u_4
M₁ : Type u_5
R : Type u_6
G : Type u_7
G₀ : Type u_8
inst✝⁷ : Mul M
inst✝⁶ : Monoid N
inst✝⁵ : Semigroup S
inst✝⁴ : MulZeroClass M₀
inst✝³ : MulOneClass M₁
inst✝² : NonAssocRing R
inst✝¹ : Group G
inst✝ : CancelMonoidWithZero G₀
p : R
h : IsIdempotentElem p
⊢ IsIdempotentElem (1 - p)
state_after: no goals
tactic: rw [IsIdempotentElem, mul_sub, mul_one, sub_mul, one_mul, h.eq, sub_self, sub_zero]
Theorem: IsLocalization.localization_localization_map_units
File: Mathlib/RingTheory/Localization/LocalizationLocalization.lean

Proof steps:
state_before: R : Type u_1
inst✝⁹ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommSemiring S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommSemiring P
N : Submonoid S
T : Type u_4
inst✝⁵ : CommSemiring T
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsLocalization N T
y : ↥(localizationLocalizationSubmodule M N)
⊢ IsUnit ((algebraMap R T) ↑y)
state_after: case intro.intro
R : Type u_1
inst✝⁹ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommSemiring S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommSemiring P
N : Submonoid S
T : Type u_4
inst✝⁵ : CommSemiring T
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsLocalization N T
y : ↥(localizationLocalizationSubmodule M N)
y' : ↥N
z : ↥M
eq : (algebraMap R S) ↑y = ↑y' * (algebraMap R S) ↑z
⊢ IsUnit ((algebraMap R T) ↑y)
tactic: obtain ⟨y', z, eq⟩ := mem_localizationLocalizationSubmodule.mp y.prop
state_before: case intro.intro
R : Type u_1
inst✝⁹ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommSemiring S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommSemiring P
N : Submonoid S
T : Type u_4
inst✝⁵ : CommSemiring T
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsLocalization N T
y : ↥(localizationLocalizationSubmodule M N)
y' : ↥N
z : ↥M
eq : (algebraMap R S) ↑y = ↑y' * (algebraMap R S) ↑z
⊢ IsUnit ((algebraMap R T) ↑y)
state_after: case intro.intro
R : Type u_1
inst✝⁹ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommSemiring S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommSemiring P
N : Submonoid S
T : Type u_4
inst✝⁵ : CommSemiring T
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsLocalization N T
y : ↥(localizationLocalizationSubmodule M N)
y' : ↥N
z : ↥M
eq : (algebraMap R S) ↑y = ↑y' * (algebraMap R S) ↑z
⊢ IsUnit ((algebraMap S T) ↑y') ∧ IsUnit ((algebraMap S T) ((algebraMap R S) ↑z))
tactic: rw [IsScalarTower.algebraMap_apply R S T, eq, RingHom.map_mul, IsUnit.mul_iff]
state_before: case intro.intro
R : Type u_1
inst✝⁹ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝⁸ : CommSemiring S
inst✝⁷ : Algebra R S
P : Type u_3
inst✝⁶ : CommSemiring P
N : Submonoid S
T : Type u_4
inst✝⁵ : CommSemiring T
inst✝⁴ : Algebra R T
inst✝³ : Algebra S T
inst✝² : IsScalarTower R S T
inst✝¹ : IsLocalization M S
inst✝ : IsLocalization N T
y : ↥(localizationLocalizationSubmodule M N)
y' : ↥N
z : ↥M
eq : (algebraMap R S) ↑y = ↑y' * (algebraMap R S) ↑z
⊢ IsUnit ((algebraMap S T) ↑y') ∧ IsUnit ((algebraMap S T) ((algebraMap R S) ↑z))
state_after: no goals
tactic: exact ⟨IsLocalization.map_units T y', (IsLocalization.map_units _ z).map (algebraMap S T)⟩
Theorem: Algebra.mul_sub_algebraMap_commutes
File: Mathlib/Algebra/Algebra/Basic.lean

Proof steps:
state_before: R : Type u
S : Type v
A : Type w
B : Type u_1
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
x : A
r : R
⊢ x * (x - (algebraMap R A) r) = (x - (algebraMap R A) r) * x
state_after: no goals
tactic: rw [mul_sub, ← commutes, sub_mul]
Theorem: smul_le_smul_iff_of_neg_left
File: Mathlib/Algebra/Order/Module/Defs.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝⁴ : OrderedRing α
inst✝³ : OrderedAddCommGroup β
inst✝² : Module α β
inst✝¹ : PosSMulMono α β
inst✝ : PosSMulReflectLE α β
ha : a < 0
⊢ a • b₁ ≤ a • b₂ ↔ b₂ ≤ b₁
state_after: α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝⁴ : OrderedRing α
inst✝³ : OrderedAddCommGroup β
inst✝² : Module α β
inst✝¹ : PosSMulMono α β
inst✝ : PosSMulReflectLE α β
ha : a < 0
⊢ -a • b₂ ≤ -a • b₁ ↔ b₂ ≤ b₁
tactic: rw [← neg_neg a, neg_smul, neg_smul (-a), neg_le_neg_iff]
state_before: α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝⁴ : OrderedRing α
inst✝³ : OrderedAddCommGroup β
inst✝² : Module α β
inst✝¹ : PosSMulMono α β
inst✝ : PosSMulReflectLE α β
ha : a < 0
⊢ -a • b₂ ≤ -a • b₁ ↔ b₂ ≤ b₁
state_after: no goals
tactic: exact smul_le_smul_iff_of_pos_left (neg_pos_of_neg ha)
Theorem: MeasureTheory.Measure.haarScalarFactor_pos_of_isHaarMeasure
File: Mathlib/MeasureTheory/Measure/Haar/Unique.lean

Proof steps:
state_before: G : Type u_1
inst✝⁶ : TopologicalSpace G
inst✝⁵ : Group G
inst✝⁴ : TopologicalGroup G
inst✝³ : MeasurableSpace G
inst✝² : BorelSpace G
μ' μ : Measure G
inst✝¹ : μ.IsHaarMeasure
inst✝ : μ'.IsHaarMeasure
H : μ'.haarScalarFactor μ = 0
⊢ False
state_after: no goals
tactic: simpa [H] using haarScalarFactor_eq_mul μ' μ μ'
Theorem: CategoryTheory.NatTrans.hcomp_app
File: Mathlib/CategoryTheory/Functor/Category.lean

Proof steps:
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
E : Type u₃
inst✝ : Category.{v₃, u₃} E
F G H✝ I✝ : C ⥤ D
H I : D ⥤ E
α : F ⟶ G
β : H ⟶ I
X Y : C
f : X ⟶ Y
⊢ (F ⋙ H).map f ≫ (fun X => β.app (F.obj X) ≫ I.map (α.app X)) Y =
    (fun X => β.app (F.obj X) ≫ I.map (α.app X)) X ≫ (G ⋙ I).map f
state_after: no goals
tactic: rw [Functor.comp_map, Functor.comp_map, ← assoc, naturality, assoc, ← map_comp I, naturality,
      map_comp, assoc]
Theorem: MvPolynomial.mem_ideal_span_monomial_image_iff_dvd
File: Mathlib/RingTheory/MvPolynomial/Ideal.lean

Proof steps:
state_before: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
x : MvPolynomial σ R
s : Set (σ →₀ ℕ)
⊢ x ∈ Ideal.span ((fun s => (monomial s) 1) '' s) ↔
    ∀ xi ∈ x.support, ∃ si ∈ s, (monomial si) 1 ∣ (monomial xi) (coeff xi x)
state_after: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
x : MvPolynomial σ R
s : Set (σ →₀ ℕ)
xi : σ →₀ ℕ
hxi : xi ∈ x.support
⊢ (∃ si ∈ s, si ≤ xi) ↔ ∃ si ∈ s, (monomial si) 1 ∣ (monomial xi) (coeff xi x)
tactic: refine mem_ideal_span_monomial_image.trans (forall₂_congr fun xi hxi => ?_)
state_before: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
x : MvPolynomial σ R
s : Set (σ →₀ ℕ)
xi : σ →₀ ℕ
hxi : xi ∈ x.support
⊢ (∃ si ∈ s, si ≤ xi) ↔ ∃ si ∈ s, (monomial si) 1 ∣ (monomial xi) (coeff xi x)
state_after: no goals
tactic: simp_rw [monomial_dvd_monomial, one_dvd, and_true_iff, mem_support_iff.mp hxi, false_or_iff]
Theorem: DedekindDomain.FiniteIntegralAdeles.Coe.ringHom_apply
File: Mathlib/RingTheory/DedekindDomain/FiniteAdeleRing.lean

Proof steps:
state_before: R : Type u_1
K : Type u_2
inst✝⁴ : CommRing R
inst✝³ : IsDedekindDomain R
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
x y : R_hat R K
⊢ { toFun := fun x v => ↑(x v), map_one' := ⋯ }.toFun (x * y) =
    { toFun := fun x v => ↑(x v), map_one' := ⋯ }.toFun x * { toFun := fun x v => ↑(x v), map_one' := ⋯ }.toFun y
state_after: R : Type u_1
K : Type u_2
inst✝⁴ : CommRing R
inst✝³ : IsDedekindDomain R
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
x y : R_hat R K
p : HeightOneSpectrum R
⊢ { toFun := fun x v => ↑(x v), map_one' := ⋯ }.toFun (x * y) p =
    ({ toFun := fun x v => ↑(x v), map_one' := ⋯ }.toFun x * { toFun := fun x v => ↑(x v), map_one' := ⋯ }.toFun y) p
tactic: refine funext fun p => ?_
state_before: R : Type u_1
K : Type u_2
inst✝⁴ : CommRing R
inst✝³ : IsDedekindDomain R
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
x y : R_hat R K
p : HeightOneSpectrum R
⊢ { toFun := fun x v => ↑(x v), map_one' := ⋯ }.toFun (x * y) p =
    ({ toFun := fun x v => ↑(x v), map_one' := ⋯ }.toFun x * { toFun := fun x v => ↑(x v), map_one' := ⋯ }.toFun y) p
state_after: R : Type u_1
K : Type u_2
inst✝⁴ : CommRing R
inst✝³ : IsDedekindDomain R
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
x y : R_hat R K
p : HeightOneSpectrum R
⊢ ↑((x * y) p) = ((fun v => ↑(x v)) * fun v => ↑(y v)) p
tactic: simp only [Pi.mul_apply, Subring.coe_mul]
state_before: R : Type u_1
K : Type u_2
inst✝⁴ : CommRing R
inst✝³ : IsDedekindDomain R
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
x y : R_hat R K
p : HeightOneSpectrum R
⊢ ↑((x * y) p) = ((fun v => ↑(x v)) * fun v => ↑(y v)) p
state_after: no goals
tactic: erw [Pi.mul_apply, Pi.mul_apply, Subring.coe_mul]
Theorem: List.replaceF_cons_of_none
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

Proof steps:
state_before: α : Type u_1
a : α
l : List α
p : α → Option α
h : p a = none
⊢ replaceF p (a :: l) = a :: replaceF p l
state_after: no goals
tactic: simp [replaceF_cons, h]
Theorem: toIcoMod_zsmul_add'
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 : α
m : ℤ
⊢ toIcoMod hp (m • p + a) b = m • p + toIcoMod hp a b
state_after: no goals
tactic: rw [add_comm, toIcoMod_add_zsmul', add_comm]