ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Fintype.choose_subtype_eq
File: Mathlib/Data/Fintype/Basic.lean

Proof steps:
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : Fintype α✝
p✝ : α✝ → Prop
inst✝² : DecidablePred p✝
α : Type u_4
p : α → Prop
inst✝¹ : Fintype { a // p a }
inst✝ : DecidableEq α
x y : { a // p a }
hy : (fun a => ↑a = ↑x) y
⊢ y = x
state_after: no goals
tactic: simpa [Subtype.ext_iff] using hy
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : Fintype α✝
p✝ : α✝ → Prop
inst✝² : DecidablePred p✝
α : Type u_4
p : α → Prop
inst✝¹ : Fintype { a // p a }
inst✝ : DecidableEq α
x : { a // p a }
h : optParam (∃! a, ↑a = ↑x) ⋯
⊢ choose (fun y => ↑y = ↑x) h = x
state_after: no goals
tactic: rw [Subtype.ext_iff, Fintype.choose_spec (fun y : { a : α // p a } => (y : α) = x) _]
Theorem: List.foldl_hom₂
File: Mathlib/Data/List/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
l : List ι
f : α → β → γ
op₁ : α → ι → α
op₂ : β → ι → β
op₃ : γ → ι → γ
a : α
b : β
h : ∀ (a : α) (b : β) (i : ι), f (op₁ a i) (op₂ b i) = op₃ (f a b) i
⊢ f (foldl op₁ a l) (foldl op₂ b l) = foldl op₃ (f a b) l
state_after: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
l : List ι
f : α → β → γ
op₁ : α → ι → α
op₂ : β → ι → β
op₃ : γ → ι → γ
h : ∀ (a : α) (b : β) (i : ι), f (op₁ a i) (op₂ b i) = op₃ (f a b) i
⊢ ∀ (a : α) (b : β), f (foldl op₁ a l) (foldl op₂ b l) = foldl op₃ (f a b) l
tactic: revert a b
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
l : List ι
f : α → β → γ
op₁ : α → ι → α
op₂ : β → ι → β
op₃ : γ → ι → γ
h : ∀ (a : α) (b : β) (i : ι), f (op₁ a i) (op₂ b i) = op₃ (f a b) i
⊢ ∀ (a : α) (b : β), f (foldl op₁ a l) (foldl op₂ b l) = foldl op₃ (f a b) l
state_after: no goals
tactic: induction l <;> intros <;> [rfl; simp only [*, foldl]]
Theorem: Rel.edgeDensity_le_one
File: Mathlib/Combinatorics/SimpleGraph/Density.lean

Proof steps:
state_before: 𝕜 : Type u_1
ι : Type u_2
κ : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝ : (a : α) → DecidablePred (r a)
s✝ s₁ s₂ : Finset α
t✝ t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
s : Finset α
t : Finset β
⊢ edgeDensity r s t ≤ 1
state_after: case h
𝕜 : Type u_1
ι : Type u_2
κ : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝ : (a : α) → DecidablePred (r a)
s✝ s₁ s₂ : Finset α
t✝ t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
s : Finset α
t : Finset β
⊢ ↑(interedges r s t).card ≤ ↑s.card * ↑t.card

case hb
𝕜 : Type u_1
ι : Type u_2
κ : Type u_3
α : Type u_4
β : Type u_5
inst✝¹ : LinearOrderedField 𝕜
r : α → β → Prop
inst✝ : (a : α) → DecidablePred (r a)
s✝ s₁ s₂ : Finset α
t✝ t₁ t₂ : Finset β
a : α
b : β
δ : 𝕜
s : Finset α
t : Finset β
⊢ 0 ≤ ↑s.card * ↑t.card
tactic: apply div_le_one_of_le
Theorem: RingHom.StableUnderComposition.respectsIso
File: Mathlib/RingTheory/RingHomProperties.lean

Proof steps:
state_before: P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : StableUnderComposition P
hP' : ∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), P e.toRingHom
⊢ RespectsIso P
state_after: case left
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : StableUnderComposition P
hP' : ∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), P e.toRingHom
⊢ ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : R →+* S) (e : S ≃+* T),
    P f → P (e.toRingHom.comp f)

case right
P : {R S : Type u} → [inst : CommRing R] → [inst_1 : CommRing S] → (R →+* S) → Prop
hP : StableUnderComposition P
hP' : ∀ {R S : Type u} [inst : CommRing R] [inst_1 : CommRing S] (e : R ≃+* S), P e.toRingHom
⊢ ∀ {R S T : Type u} [inst : CommRing R] [inst_1 : CommRing S] [inst_2 : CommRing T] (f : S →+* T) (e : R ≃+* S),
    P f → P (f.comp e.toRingHom)
tactic: constructor
Theorem: IsLocalization.AtPrime.mk'_mem_maximal_iff
File: Mathlib/RingTheory/Localization/AtPrime.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
A : Type u_4
inst✝² : CommRing A
inst✝¹ : IsDomain A
I : Ideal R
hI : I.IsPrime
inst✝ : IsLocalization.AtPrime S I
x : R
y : ↥I.primeCompl
h : optParam (LocalRing S) ⋯
⊢ mk' S x y ∉ LocalRing.maximalIdeal S ↔ x ∉ I
state_after: no goals
tactic: simpa only [LocalRing.mem_maximalIdeal, mem_nonunits_iff, Classical.not_not] using
      isUnit_mk'_iff S I x y
Theorem: Fin.castPred_eq_iff_eq_castSucc
File: Mathlib/Data/Fin/Basic.lean

Proof steps:
state_before: n m : ℕ
i : Fin (n + 1)
hi : i ≠ last n
j : Fin n
h : i.castPred hi = j
⊢ i = j.castSucc
state_after: no goals
tactic: rw [← h, castSucc_castPred]
state_before: n m : ℕ
i : Fin (n + 1)
hi : i ≠ last n
j : Fin n
h : i = j.castSucc
⊢ i.castPred hi = j
state_after: no goals
tactic: simp_rw [h, castPred_castSucc]
Theorem: ite_one_mul
File: Mathlib/Algebra/Group/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M✝ : Type u_4
M : Type u
inst✝¹ : MulOneClass M
P : Prop
inst✝ : Decidable P
a b : M
⊢ (if P then 1 else a * b) = (if P then 1 else a) * if P then 1 else b
state_after: no goals
tactic: by_cases h : P <;> simp [h]
Theorem: Set.sigmaToiUnion_surjective
File: Mathlib/Data/Set/Lattice.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
t : α → Set β
b : β
hb : b ∈ ⋃ i, t i
⊢ ∃ a, b ∈ t a
state_after: no goals
tactic: simpa using hb
Theorem: TopCat.GlueData.ι_injective
File: Mathlib/Topology/Gluing.lean

Proof steps:
state_before: D : GlueData
i : D.J
⊢ Function.Injective ⇑(D.ι i)
state_after: D : GlueData
i : D.J
x y : ↑(D.U i)
h : (D.ι i) x = (D.ι i) y
⊢ x = y
tactic: intro x y h
state_before: D : GlueData
i : D.J
x y : ↑(D.U i)
h : (D.ι i) x = (D.ι i) y
⊢ x = y
state_after: case inl.refl
D : GlueData
i : D.J
x : ↑(D.U i)
h : (D.ι i) x = (D.ι i) x
⊢ x = x

case inr.intro.intro
D : GlueData
i : D.J
x y : ↑(D.U i)
h : (D.ι i) x = (D.ι i) y
w✝ : ↑(D.V (⟨i, x⟩.fst, ⟨i, y⟩.fst))
e₁ : (D.f ⟨i, x⟩.fst ⟨i, y⟩.fst) w✝ = ⟨i, x⟩.snd
e₂ : (D.f ⟨i, y⟩.fst ⟨i, x⟩.fst) ((D.t ⟨i, x⟩.fst ⟨i, y⟩.fst) w✝) = ⟨i, y⟩.snd
⊢ x = y
tactic: rcases (D.ι_eq_iff_rel _ _ _ _).mp h with (⟨⟨⟩⟩ | ⟨_, e₁, e₂⟩)
Theorem: MeasureTheory.Measure.AbsolutelyContinuous.smul
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝⁴ : MeasurableSpace β
inst✝³ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f : α → β
inst✝² : Monoid R
inst✝¹ : DistribMulAction R ℝ≥0∞
inst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
h : μ ≪ ν
c : R
s : Set α
hνs : ν s = 0
⊢ (c • μ) s = 0
state_after: no goals
tactic: simp only [h hνs, smul_eq_mul, smul_apply, smul_zero]
Theorem: hasSum_div_const_iff
File: Mathlib/Topology/Algebra/InfiniteSum/Ring.lean

Proof steps:
state_before: ι : Type u_1
κ : Type u_2
R : Type u_3
α : Type u_4
inst✝² : DivisionSemiring α
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSemiring α
f g : ι → α
a a₁ a₂ : α
h : a₂ ≠ 0
⊢ HasSum (fun i => f i / a₂) (a₁ / a₂) ↔ HasSum f a₁
state_after: no goals
tactic: simpa only [div_eq_mul_inv] using hasSum_mul_right_iff (inv_ne_zero h)
Theorem: CategoryTheory.Iso.hom_eq_inv
File: Mathlib/CategoryTheory/Iso.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y Z : C
α : X ≅ Y
β : Y ≅ X
⊢ α.hom = β.inv ↔ β.hom = α.inv
state_after: C : Type u
inst✝ : Category.{v, u} C
X Y Z : C
α : X ≅ Y
β : Y ≅ X
⊢ β.hom = α.symm.hom ↔ β.hom = α.inv
tactic: erw [inv_eq_inv α.symm β, eq_comm]
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y Z : C
α : X ≅ Y
β : Y ≅ X
⊢ β.hom = α.symm.hom ↔ β.hom = α.inv
state_after: no goals
tactic: rfl
Theorem: simply_connected_iff_paths_homotopic
File: Mathlib/AlgebraicTopology/FundamentalGroupoid/SimplyConnected.lean

Proof steps:
state_before: Y : Type u_1
inst✝ : TopologicalSpace Y
⊢ SimplyConnectedSpace Y → PathConnectedSpace Y ∧ ∀ (x y : Y), Subsingleton (Path.Homotopic.Quotient x y)
state_after: Y : Type u_1
inst✝ : TopologicalSpace Y
a✝ : SimplyConnectedSpace Y
⊢ PathConnectedSpace Y ∧ ∀ (x y : Y), Subsingleton (Path.Homotopic.Quotient x y)
tactic: intro
state_before: Y : Type u_1
inst✝ : TopologicalSpace Y
a✝ : SimplyConnectedSpace Y
⊢ PathConnectedSpace Y ∧ ∀ (x y : Y), Subsingleton (Path.Homotopic.Quotient x y)
state_after: no goals
tactic: constructor <;> infer_instance
state_before: Y : Type u_1
inst✝ : TopologicalSpace Y
h : PathConnectedSpace Y ∧ ∀ (x y : Y), Subsingleton (Path.Homotopic.Quotient x y)
⊢ SimplyConnectedSpace Y
state_after: case intro
Y : Type u_1
inst✝ : TopologicalSpace Y
left✝ : PathConnectedSpace Y
right✝ : ∀ (x y : Y), Subsingleton (Path.Homotopic.Quotient x y)
⊢ SimplyConnectedSpace Y
tactic: cases h
state_before: case intro
Y : Type u_1
inst✝ : TopologicalSpace Y
left✝ : PathConnectedSpace Y
right✝ : ∀ (x y : Y), Subsingleton (Path.Homotopic.Quotient x y)
⊢ SimplyConnectedSpace Y
state_after: case intro
Y : Type u_1
inst✝ : TopologicalSpace Y
left✝ : PathConnectedSpace Y
right✝ : ∀ (x y : Y), Subsingleton (Path.Homotopic.Quotient x y)
⊢ Nonempty Y ∧ ∀ (x y : Y), Nonempty (Unique (Path.Homotopic.Quotient x y))
tactic: rw [simply_connected_iff_unique_homotopic]
state_before: case intro
Y : Type u_1
inst✝ : TopologicalSpace Y
left✝ : PathConnectedSpace Y
right✝ : ∀ (x y : Y), Subsingleton (Path.Homotopic.Quotient x y)
⊢ Nonempty Y ∧ ∀ (x y : Y), Nonempty (Unique (Path.Homotopic.Quotient x y))
state_after: no goals
tactic: exact ⟨inferInstance, fun x y => ⟨uniqueOfSubsingleton ⟦PathConnectedSpace.somePath x y⟧⟩⟩
Theorem: Set.mul_zero_subset
File: Mathlib/Data/Set/Pointwise/Basic.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : MulZeroClass α
s✝ t s : Set α
⊢ s * 0 ⊆ 0
state_after: no goals
tactic: simp [subset_def, mem_mul]
Theorem: Cardinal.aleph_zero
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

Proof steps:
state_before: ⊢ aleph 0 = ℵ₀
state_after: no goals
tactic: rw [aleph, add_zero, aleph'_omega]
Theorem: Order.Frame.MinimalAxioms.iSup_inf_eq
File: Mathlib/Order/CompleteBooleanAlgebra.lean

Proof steps:
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
minAx : MinimalAxioms α
s : Set α
a✝ b : α
f : ι → α
a : α
⊢ (⨆ i, f i) ⊓ a = ⨆ i, f i ⊓ a
state_after: no goals
tactic: rw [iSup, sSup_inf_eq, iSup_range]
Theorem: CategoryTheory.OplaxFunctor.bicategory_comp_app
File: Mathlib/CategoryTheory/Bicategory/FunctorBicategory.lean

Proof steps:
state_before: B : Type u₁
inst✝¹ : Bicategory B
C : Type u₂
inst✝ : Bicategory C
F G H I a b c : OplaxFunctor B C
f g : a ⟶ b
h i : b ⟶ c
η : f ⟶ g
θ : h ⟶ i
⊢ (fun {F G H} η x x_1 Γ => OplaxNatTrans.whiskerLeft η Γ) f h i θ ≫
      (fun {F G H} x x_1 Γ η => OplaxNatTrans.whiskerRight Γ η) f g η i =
    (fun {F G H} x x_1 Γ η => OplaxNatTrans.whiskerRight Γ η) f g η h ≫
      (fun {F G H} η x x_1 Γ => OplaxNatTrans.whiskerLeft η Γ) g h i θ
state_after: case w
B : Type u₁
inst✝¹ : Bicategory B
C : Type u₂
inst✝ : Bicategory C
F G H I a b c : OplaxFunctor B C
f g : a ⟶ b
h i : b ⟶ c
η : f ⟶ g
θ : h ⟶ i
b✝ : B
⊢ ((fun {F G H} η x x_1 Γ => OplaxNatTrans.whiskerLeft η Γ) f h i θ ≫
          (fun {F G H} x x_1 Γ η => OplaxNatTrans.whiskerRight Γ η) f g η i).app
      b✝ =
    ((fun {F G H} x x_1 Γ η => OplaxNatTrans.whiskerRight Γ η) f g η h ≫
          (fun {F G H} η x x_1 Γ => OplaxNatTrans.whiskerLeft η Γ) g h i θ).app
      b✝
tactic: ext
state_before: case w
B : Type u₁
inst✝¹ : Bicategory B
C : Type u₂
inst✝ : Bicategory C
F G H I a b c : OplaxFunctor B C
f g : a ⟶ b
h i : b ⟶ c
η : f ⟶ g
θ : h ⟶ i
b✝ : B
⊢ ((fun {F G H} η x x_1 Γ => OplaxNatTrans.whiskerLeft η Γ) f h i θ ≫
          (fun {F G H} x x_1 Γ η => OplaxNatTrans.whiskerRight Γ η) f g η i).app
      b✝ =
    ((fun {F G H} x x_1 Γ η => OplaxNatTrans.whiskerRight Γ η) f g η h ≫
          (fun {F G H} η x x_1 Γ => OplaxNatTrans.whiskerLeft η Γ) g h i θ).app
      b✝
state_after: no goals
tactic: exact whisker_exchange _ _
Theorem: groupCohomology.dTwo_apply
File: Mathlib/RepresentationTheory/GroupCohomology/LowDegree.lean

Proof steps:
state_before: k G : Type u
inst✝¹ : CommRing k
inst✝ : Group G
A : Rep k G
x y : G × G → CoeSort.coe A
g : G × G × G
⊢ (fun f g => (A.ρ g.1) (f (g.2.1, g.2.2)) - f (g.1 * g.2.1, g.2.2) + f (g.1, g.2.1 * g.2.2) - f (g.1, g.2.1)) (x + y)
      g =
    ((fun f g => (A.ρ g.1) (f (g.2.1, g.2.2)) - f (g.1 * g.2.1, g.2.2) + f (g.1, g.2.1 * g.2.2) - f (g.1, g.2.1)) x +
        (fun f g => (A.ρ g.1) (f (g.2.1, g.2.2)) - f (g.1 * g.2.1, g.2.2) + f (g.1, g.2.1 * g.2.2) - f (g.1, g.2.1)) y)
      g
state_after: k G : Type u
inst✝¹ : CommRing k
inst✝ : Group G
A : Rep k G
x y : G × G → CoeSort.coe A
g : G × G × G
⊢ (A.ρ g.1) (x (g.2.1, g.2.2) + y (g.2.1, g.2.2)) - (x (g.1 * g.2.1, g.2.2) + y (g.1 * g.2.1, g.2.2)) +
        (x (g.1, g.2.1 * g.2.2) + y (g.1, g.2.1 * g.2.2)) -
      (x (g.1, g.2.1) + y (g.1, g.2.1)) =
    (A.ρ g.1) (x (g.2.1, g.2.2)) - x (g.1 * g.2.1, g.2.2) + x (g.1, g.2.1 * g.2.2) - x (g.1, g.2.1) +
      ((A.ρ g.1) (y (g.2.1, g.2.2)) - y (g.1 * g.2.1, g.2.2) + y (g.1, g.2.1 * g.2.2) - y (g.1, g.2.1))
tactic: dsimp
state_before: k G : Type u
inst✝¹ : CommRing k
inst✝ : Group G
A : Rep k G
x y : G × G → CoeSort.coe A
g : G × G × G
⊢ (A.ρ g.1) (x (g.2.1, g.2.2) + y (g.2.1, g.2.2)) - (x (g.1 * g.2.1, g.2.2) + y (g.1 * g.2.1, g.2.2)) +
        (x (g.1, g.2.1 * g.2.2) + y (g.1, g.2.1 * g.2.2)) -
      (x (g.1, g.2.1) + y (g.1, g.2.1)) =
    (A.ρ g.1) (x (g.2.1, g.2.2)) - x (g.1 * g.2.1, g.2.2) + x (g.1, g.2.1 * g.2.2) - x (g.1, g.2.1) +
      ((A.ρ g.1) (y (g.2.1, g.2.2)) - y (g.1 * g.2.1, g.2.2) + y (g.1, g.2.1 * g.2.2) - y (g.1, g.2.1))
state_after: no goals
tactic: rw [map_add, add_sub_add_comm (A.ρ _ _), add_sub_assoc, add_sub_add_comm, add_add_add_comm,
        add_sub_assoc, add_sub_assoc]
state_before: k G : Type u
inst✝¹ : CommRing k
inst✝ : Group G
A : Rep k G
r : k
x : G × G → CoeSort.coe A
g : G × G × G
⊢ { toFun := fun f g => (A.ρ g.1) (f (g.2.1, g.2.2)) - f (g.1 * g.2.1, g.2.2) + f (g.1, g.2.1 * g.2.2) - f (g.1, g.2.1),
          map_add' := ⋯ }.toFun
      (r • x) g =
    ((RingHom.id k) r •
        {
              toFun := fun f g =>
                (A.ρ g.1) (f (g.2.1, g.2.2)) - f (g.1 * g.2.1, g.2.2) + f (g.1, g.2.1 * g.2.2) - f (g.1, g.2.1),
              map_add' := ⋯ }.toFun
          x)
      g
state_after: k G : Type u
inst✝¹ : CommRing k
inst✝ : Group G
A : Rep k G
r : k
x : G × G → CoeSort.coe A
g : G × G × G
⊢ (A.ρ g.1) (r • x (g.2.1, g.2.2)) - r • x (g.1 * g.2.1, g.2.2) + r • x (g.1, g.2.1 * g.2.2) - r • x (g.1, g.2.1) =
    r • ((A.ρ g.1) (x (g.2.1, g.2.2)) - x (g.1 * g.2.1, g.2.2) + x (g.1, g.2.1 * g.2.2) - x (g.1, g.2.1))
tactic: dsimp
state_before: k G : Type u
inst✝¹ : CommRing k
inst✝ : Group G
A : Rep k G
r : k
x : G × G → CoeSort.coe A
g : G × G × G
⊢ (A.ρ g.1) (r • x (g.2.1, g.2.2)) - r • x (g.1 * g.2.1, g.2.2) + r • x (g.1, g.2.1 * g.2.2) - r • x (g.1, g.2.1) =
    r • ((A.ρ g.1) (x (g.2.1, g.2.2)) - x (g.1 * g.2.1, g.2.2) + x (g.1, g.2.1 * g.2.2) - x (g.1, g.2.1))
state_after: no goals
tactic: simp only [map_smul, smul_add, smul_sub]
Theorem: String.utf8PrevAux_of_valid
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

Proof steps:
state_before: cs cs' : List Char
c : Char
i p : Nat
hp : i + (utf8Len cs + c.utf8Size) = p
⊢ utf8PrevAux (cs ++ c :: cs') { byteIdx := i } { byteIdx := p } = { byteIdx := i + utf8Len cs }
state_after: no goals
tactic: match cs with
  | [] => simp [utf8PrevAux, ← hp, Pos.addChar_eq]
  | c'::cs =>
    simp only [utf8PrevAux, Pos.addChar_eq, ← hp, utf8Len_cons, List.append_eq]
    rw [if_neg]
    case hnc =>
      simp only [Pos.ext_iff]
      rw [Nat.add_right_comm, Nat.add_left_comm]
      apply ne_add_csize_add_self
    refine (utf8PrevAux_of_valid (by simp [Nat.add_assoc, Nat.add_left_comm])).trans ?_
    simp [Nat.add_assoc, Nat.add_comm]
Theorem: ArithmeticFunction.cardDistinctFactors_zero
File: Mathlib/NumberTheory/ArithmeticFunction.lean

Proof steps:
state_before: R : Type u_1
⊢ ω 0 = 0
state_after: no goals
tactic: simp
Theorem: NonUnitalAlgHom.coe_mulHom_mk
File: Mathlib/Algebra/Algebra/NonUnitalHom.lean

Proof steps:
state_before: R : Type u
S : Type u₁
T : Type u_1
inst✝⁸ : Monoid R
inst✝⁷ : Monoid S
inst✝⁶ : Monoid T
φ : R →* S
A : Type v
B : Type w
C : Type w₁
inst✝⁵ : NonUnitalNonAssocSemiring A
inst✝⁴ : DistribMulAction R A
inst✝³ : NonUnitalNonAssocSemiring B
inst✝² : DistribMulAction S B
inst✝¹ : NonUnitalNonAssocSemiring C
inst✝ : DistribMulAction T C
f : A →ₛₙₐ[φ] B
h₁ : ∀ (m : R) (x : A), f (m • x) = φ m • f x
h₂ : { toFun := ⇑f, map_smul' := h₁ }.toFun 0 = 0
h₃ :
  ∀ (x y : A),
    { toFun := ⇑f, map_smul' := h₁ }.toFun (x + y) =
      { toFun := ⇑f, map_smul' := h₁ }.toFun x + { toFun := ⇑f, map_smul' := h₁ }.toFun y
h₄ :
  ∀ (x y : A),
    { toFun := ⇑f, map_smul' := h₁, map_zero' := h₂, map_add' := h₃ }.toFun (x * y) =
      { toFun := ⇑f, map_smul' := h₁, map_zero' := h₂, map_add' := h₃ }.toFun x *
        { toFun := ⇑f, map_smul' := h₁, map_zero' := h₂, map_add' := h₃ }.toFun y
⊢ ↑{ toFun := ⇑f, map_smul' := h₁, map_zero' := h₂, map_add' := h₃, map_mul' := h₄ } = { toFun := ⇑f, map_mul' := h₄ }
state_after: no goals
tactic: rfl
Theorem: CategoryTheory.Monad.comparison_obj_A
File: Mathlib/CategoryTheory/Monad/Adjunction.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
L : C ⥤ D
R : D ⥤ C
h : L ⊣ R
X : D
⊢ h.toMonad.μ.app (R.obj X) ≫ R.map (h.counit.app X) = h.toMonad.map (R.map (h.counit.app X)) ≫ R.map (h.counit.app X)
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
L : C ⥤ D
R : D ⥤ C
h : L ⊣ R
X : D
⊢ R.map (h.counit.app (L.obj (R.obj X))) ≫ R.map (h.counit.app X) =
    R.map (L.map (R.map (h.counit.app X))) ≫ R.map (h.counit.app X)
tactic: dsimp
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
L : C ⥤ D
R : D ⥤ C
h : L ⊣ R
X : D
⊢ R.map (h.counit.app (L.obj (R.obj X))) ≫ R.map (h.counit.app X) =
    R.map (L.map (R.map (h.counit.app X))) ≫ R.map (h.counit.app X)
state_after: no goals
tactic: rw [← R.map_comp, ← Adjunction.counit_naturality, R.map_comp]
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
L : C ⥤ D
R : D ⥤ C
h : L ⊣ R
X✝ Y✝ : D
f : X✝ ⟶ Y✝
⊢ h.toMonad.map (R.map f) ≫ ((fun X => { A := R.obj X, a := R.map (h.counit.app X), unit := ⋯, assoc := ⋯ }) Y✝).a =
    ((fun X => { A := R.obj X, a := R.map (h.counit.app X), unit := ⋯, assoc := ⋯ }) X✝).a ≫ R.map f
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
L : C ⥤ D
R : D ⥤ C
h : L ⊣ R
X✝ Y✝ : D
f : X✝ ⟶ Y✝
⊢ R.map (L.map (R.map f)) ≫ R.map (h.counit.app Y✝) = R.map (h.counit.app X✝) ≫ R.map f
tactic: dsimp
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
L : C ⥤ D
R : D ⥤ C
h : L ⊣ R
X✝ Y✝ : D
f : X✝ ⟶ Y✝
⊢ R.map (L.map (R.map f)) ≫ R.map (h.counit.app Y✝) = R.map (h.counit.app X✝) ≫ R.map f
state_after: no goals
tactic: rw [← R.map_comp, Adjunction.counit_naturality, R.map_comp]
Theorem: PresheafOfModules.Derivation.congr_d
File: Mathlib/Algebra/Category/ModuleCat/Differentials/Presheaf.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
S : Cᵒᵖ ⥤ CommRingCat
F : C ⥤ D
S' R : Dᵒᵖ ⥤ CommRingCat
M N : PresheafOfModules (R ⋙ forget₂ CommRingCat RingCat)
φ : S ⟶ F.op ⋙ R
φ' : S' ⟶ R
d d' : M.Derivation φ
h : d = d'
X : Dᵒᵖ
b : ↑(R.obj X)
⊢ d.d b = d'.d b
state_after: no goals
tactic: rw [h]
Theorem: disjoint_compl_left_iff
File: Mathlib/Order/BooleanAlgebra.lean

Proof steps:
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : BooleanAlgebra α
⊢ Disjoint xᶜ y ↔ y ≤ x
state_after: no goals
tactic: rw [← le_compl_iff_disjoint_left, compl_compl]
Theorem: IsSemisimpleModule.annihilator_isRadical
File: Mathlib/RingTheory/SimpleModule.lean

Proof steps:
state_before: ι : Type u_1
R✝ : Type u_2
S : Type u_3
inst✝⁹ : Ring R✝
inst✝⁸ : Ring S
M : Type u_4
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R✝ M
m : Submodule R✝ M
N : Type u_5
inst✝⁵ : AddCommGroup N
inst✝⁴ : Module R✝ N
inst✝³ : IsSemisimpleModule R✝ M
R : Type u_6
inst✝² : CommRing R
inst✝¹ : Module R M
inst✝ : IsSemisimpleModule R M
⊢ (Module.annihilator R M).IsRadical
state_after: ι : Type u_1
R✝ : Type u_2
S : Type u_3
inst✝⁹ : Ring R✝
inst✝⁸ : Ring S
M : Type u_4
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R✝ M
m : Submodule R✝ M
N : Type u_5
inst✝⁵ : AddCommGroup N
inst✝⁴ : Module R✝ N
inst✝³ : IsSemisimpleModule R✝ M
R : Type u_6
inst✝² : CommRing R
inst✝¹ : Module R M
inst✝ : IsSemisimpleModule R M
⊢ (⨅ i, (↑i).annihilator).IsRadical
tactic: rw [← Submodule.annihilator_top, ← sSup_simples_eq_top, sSup_eq_iSup', Submodule.annihilator_iSup]
state_before: ι : Type u_1
R✝ : Type u_2
S : Type u_3
inst✝⁹ : Ring R✝
inst✝⁸ : Ring S
M : Type u_4
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R✝ M
m : Submodule R✝ M
N : Type u_5
inst✝⁵ : AddCommGroup N
inst✝⁴ : Module R✝ N
inst✝³ : IsSemisimpleModule R✝ M
R : Type u_6
inst✝² : CommRing R
inst✝¹ : Module R M
inst✝ : IsSemisimpleModule R M
⊢ (⨅ i, (↑i).annihilator).IsRadical
state_after: no goals
tactic: exact Ideal.isRadical_iInf _ fun i ↦ (i.2.annihilator_isMaximal).isPrime.isRadical
Theorem: CategoryTheory.Limits.image.ι_zero'
File: Mathlib/CategoryTheory/Limits/Shapes/ZeroMorphisms.lean

Proof steps:
state_before: C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u'
inst✝⁴ : Category.{v', u'} D
inst✝³ : HasZeroMorphisms C
inst✝² : HasZeroObject C
inst✝¹ : HasEqualizers C
X Y : C
f : X ⟶ Y
h : f = 0
inst✝ : HasImage f
⊢ ι f = 0
state_after: C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u'
inst✝⁴ : Category.{v', u'} D
inst✝³ : HasZeroMorphisms C
inst✝² : HasZeroObject C
inst✝¹ : HasEqualizers C
X Y : C
f : X ⟶ Y
h : f = 0
inst✝ : HasImage f
⊢ (eqToIso h).hom ≫ ι 0 = 0
tactic: rw [image.eq_fac h]
state_before: C : Type u
inst✝⁵ : Category.{v, u} C
D : Type u'
inst✝⁴ : Category.{v', u'} D
inst✝³ : HasZeroMorphisms C
inst✝² : HasZeroObject C
inst✝¹ : HasEqualizers C
X Y : C
f : X ⟶ Y
h : f = 0
inst✝ : HasImage f
⊢ (eqToIso h).hom ≫ ι 0 = 0
state_after: no goals
tactic: simp
Theorem: CircleDeg1Lift.commute_nat_add
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

Proof steps:
state_before: f g : CircleDeg1Lift
n : ℕ
⊢ Function.Commute ⇑f fun x => ↑n + x
state_after: no goals
tactic: simpa only [nsmul_one, add_left_iterate] using Function.Commute.iterate_right f.map_one_add n
Theorem: MeasureTheory.lintegral_eq_lmarginal_univ
File: Mathlib/MeasureTheory/Integral/Marginal.lean

Proof steps:
state_before: δ : Type u_1
δ' : Type u_2
π : δ → Type u_3
inst✝³ : (x : δ) → MeasurableSpace (π x)
μ : (i : δ) → Measure (π i)
inst✝² : ∀ (i : δ), SigmaFinite (μ i)
inst✝¹ : DecidableEq δ
s t : Finset δ
f✝ g : ((i : δ) → π i) → ℝ≥0∞
x✝ y : (i : δ) → π i
i : δ
inst✝ : Fintype δ
f : ((i : δ) → π i) → ℝ≥0∞
x : (i : δ) → π i
⊢ ∫⁻ (x : (i : δ) → π i), f x ∂Measure.pi μ = (∫⋯∫⁻_Finset.univ, f ∂μ) x
state_after: no goals
tactic: simp
Theorem: UniformContinuous.neg
File: Mathlib/Topology/Algebra/UniformGroup.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝³ : UniformSpace α
inst✝² : Group α
inst✝¹ : UniformGroup α
inst✝ : UniformSpace β
f : β → α
hf : UniformContinuous f
⊢ UniformContinuous fun x => (f x)⁻¹
state_after: α : Type u_1
β : Type u_2
inst✝³ : UniformSpace α
inst✝² : Group α
inst✝¹ : UniformGroup α
inst✝ : UniformSpace β
f : β → α
hf : UniformContinuous f
this : UniformContinuous fun x => 1 / f x
⊢ UniformContinuous fun x => (f x)⁻¹
tactic: have : UniformContinuous fun x => 1 / f x := uniformContinuous_const.div hf
state_before: α : Type u_1
β : Type u_2
inst✝³ : UniformSpace α
inst✝² : Group α
inst✝¹ : UniformGroup α
inst✝ : UniformSpace β
f : β → α
hf : UniformContinuous f
this : UniformContinuous fun x => 1 / f x
⊢ UniformContinuous fun x => (f x)⁻¹
state_after: no goals
tactic: simp_all