ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Set.mk_preimage_prod_right_fn_eq_if
File: Mathlib/Data/Set/Prod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
s s₁ s₂ : Set α
t t₁ t₂ : Set β
a : α
b : β
inst✝ : DecidablePred fun x => x ∈ s
g : δ → β
⊢ (fun b => (a, g b)) ⁻¹' s ×ˢ t = if a ∈ s then g ⁻¹' t else ∅
state_after: no goals
tactic: rw [← mk_preimage_prod_right_eq_if, prod_preimage_right, preimage_preimage]
Theorem: ModularGroup.im_T_inv_smul
File: Mathlib/NumberTheory/Modular.lean

Proof steps:
state_before: g : SL(2, ℤ)
z : ℍ
⊢ (T⁻¹ • z).im = z.im
state_after: no goals
tactic: simpa using im_T_zpow_smul z (-1)
Theorem: Nat.prime_iff_card_units
File: Mathlib/Data/Nat/Totient.lean

Proof steps:
state_before: p : ℕ
inst✝ : Fintype (ZMod p)ˣ
⊢ Prime p ↔ Fintype.card (ZMod p)ˣ = p - 1
state_after: case inl
p : ℕ
inst✝ : Fintype (ZMod p)ˣ
hp : p = 0
⊢ Prime p ↔ Fintype.card (ZMod p)ˣ = p - 1

case inr
p : ℕ
inst✝ : Fintype (ZMod p)ˣ
hp : NeZero p
⊢ Prime p ↔ Fintype.card (ZMod p)ˣ = p - 1
tactic: cases' eq_zero_or_neZero p with hp hp
state_before: case inr
p : ℕ
inst✝ : Fintype (ZMod p)ˣ
hp : NeZero p
⊢ Prime p ↔ Fintype.card (ZMod p)ˣ = p - 1
state_after: no goals
tactic: rw [ZMod.card_units_eq_totient, Nat.totient_eq_iff_prime <| NeZero.pos p]
Theorem: Finset.Ico_diff_Ico_left
File: Mathlib/Order/Interval/Finset/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LocallyFiniteOrder α
a✝ b✝ a b c : α
⊢ Ico a b \ Ico a c = Ico (max a c) b
state_after: no goals
tactic: cases le_total a c with
  | inl h =>
    ext x
    rw [mem_sdiff, mem_Ico, mem_Ico, mem_Ico, max_eq_right h, and_right_comm, not_and, not_lt]
    exact and_congr_left' ⟨fun hx => hx.2 hx.1, fun hx => ⟨h.trans hx, fun _ => hx⟩⟩
  | inr h => rw [Ico_eq_empty_of_le h, sdiff_empty, max_eq_left h]
Theorem: HomologicalComplex.mkHomToSingle_f
File: Mathlib/Algebra/Homology/Single.lean

Proof steps:
state_before: V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
K : HomologicalComplex V c
j : ι
A : V
φ : K.X j ⟶ A
hφ : ∀ (i : ι), c.Rel i j → K.d i j ≫ φ = 0
⊢ (mkHomToSingle φ hφ).f j = φ ≫ (singleObjXSelf c j A).inv
state_after: V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
K : HomologicalComplex V c
j : ι
A : V
φ : K.X j ⟶ A
hφ : ∀ (i : ι), c.Rel i j → K.d i j ≫ φ = 0
⊢ (if hi : j = j then 𝟙 (K.X j) ≫ φ ≫ (singleObjXIsoOfEq c j A j hi).inv else 0) = φ ≫ (singleObjXSelf c j A).inv
tactic: dsimp [mkHomToSingle]
state_before: V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
K : HomologicalComplex V c
j : ι
A : V
φ : K.X j ⟶ A
hφ : ∀ (i : ι), c.Rel i j → K.d i j ≫ φ = 0
⊢ (if hi : j = j then 𝟙 (K.X j) ≫ φ ≫ (singleObjXIsoOfEq c j A j hi).inv else 0) = φ ≫ (singleObjXSelf c j A).inv
state_after: V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
K : HomologicalComplex V c
j : ι
A : V
φ : K.X j ⟶ A
hφ : ∀ (i : ι), c.Rel i j → K.d i j ≫ φ = 0
⊢ φ ≫ (singleObjXIsoOfEq c j A j ⋯).inv = φ ≫ (singleObjXSelf c j A).inv
tactic: rw [dif_pos rfl, id_comp]
state_before: V : Type u
inst✝³ : Category.{v, u} V
inst✝² : HasZeroMorphisms V
inst✝¹ : HasZeroObject V
ι : Type u_1
inst✝ : DecidableEq ι
c : ComplexShape ι
K : HomologicalComplex V c
j : ι
A : V
φ : K.X j ⟶ A
hφ : ∀ (i : ι), c.Rel i j → K.d i j ≫ φ = 0
⊢ φ ≫ (singleObjXIsoOfEq c j A j ⋯).inv = φ ≫ (singleObjXSelf c j A).inv
state_after: no goals
tactic: rfl
Theorem: ProbabilityTheory.iIndepFun_iff_iIndep
File: Mathlib/Probability/Independence/Basic.lean

Proof steps:
state_before: Ω : Type u_1
ι : Type u_2
β✝ : Type u_3
γ : Type u_4
κ : ι → Type u_5
π : ι → Set (Set Ω)
m✝ : ι → MeasurableSpace Ω
x✝ : MeasurableSpace Ω
μ✝ : Measure Ω
S : Finset ι
s : ι → Set Ω
β : ι → Type u_6
m : (x : ι) → MeasurableSpace (β x)
f : (x : ι) → Ω → β x
μ : Measure Ω
⊢ iIndepFun m f μ ↔ iIndep (fun x => MeasurableSpace.comap (f x) (m x)) μ
state_after: no goals
tactic: simp only [iIndepFun, iIndep, Kernel.iIndepFun]
Theorem: DFinsupp.coe_tsub
File: Mathlib/Data/DFinsupp/Order.lean

Proof steps:
state_before: ι : Type u_1
α : ι → Type u_2
inst✝² : (i : ι) → CanonicallyOrderedAddCommMonoid (α i)
inst✝¹ : (i : ι) → Sub (α i)
inst✝ : ∀ (i : ι), OrderedSub (α i)
f✝ g✝ : Π₀ (i : ι), α i
i : ι
a b : α i
f g : Π₀ (i : ι), α i
⊢ ⇑(f - g) = ⇑f - ⇑g
state_after: case h
ι : Type u_1
α : ι → Type u_2
inst✝² : (i : ι) → CanonicallyOrderedAddCommMonoid (α i)
inst✝¹ : (i : ι) → Sub (α i)
inst✝ : ∀ (i : ι), OrderedSub (α i)
f✝ g✝ : Π₀ (i : ι), α i
i✝ : ι
a b : α i✝
f g : Π₀ (i : ι), α i
i : ι
⊢ (f - g) i = (⇑f - ⇑g) i
tactic: ext i
state_before: case h
ι : Type u_1
α : ι → Type u_2
inst✝² : (i : ι) → CanonicallyOrderedAddCommMonoid (α i)
inst✝¹ : (i : ι) → Sub (α i)
inst✝ : ∀ (i : ι), OrderedSub (α i)
f✝ g✝ : Π₀ (i : ι), α i
i✝ : ι
a b : α i✝
f g : Π₀ (i : ι), α i
i : ι
⊢ (f - g) i = (⇑f - ⇑g) i
state_after: no goals
tactic: exact tsub_apply f g i
Theorem: PFun.lift_graph
File: Mathlib/Data/PFun.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ι : Type u_6
f : α → β
a : α
b : β
⊢ (∃ (_ : True), f a = b) ↔ f a = b
state_after: no goals
tactic: simp
Theorem: Batteries.BinomialHeap.Imp.HeapNode.WF.toHeap
File: .lake/packages/batteries/Batteries/Data/BinomialHeap/Basic.lean

Proof steps:
state_before: α : Type u_1
le : α → α → Bool
a✝ : α
n✝ : Nat
s✝ : HeapNode α
h✝ : WF le a✝ s✝ n✝
res : Heap α
a : α
c s : HeapNode α
n : Nat
left✝ : ∀ [inst : TotalBLE le], le a✝ a = true
h : WF le a c n
h' : WF le a✝ s n
hr : Heap.WF le (node a c s).rank res
⊢ WF le a c ((node a c s).rank - 1)
state_after: α : Type u_1
le : α → α → Bool
a✝ : α
n✝ : Nat
s✝ : HeapNode α
h✝ : WF le a✝ s✝ n✝
res : Heap α
a : α
c s : HeapNode α
n : Nat
left✝ : ∀ [inst : TotalBLE le], le a✝ a = true
h : WF le a c s.rank
h' : WF le a✝ s n
hr : Heap.WF le (node a c s).rank res
⊢ WF le a c ((node a c s).rank - 1)
tactic: rw [← h'.rank_eq] at h
state_before: α : Type u_1
le : α → α → Bool
a✝ : α
n✝ : Nat
s✝ : HeapNode α
h✝ : WF le a✝ s✝ n✝
res : Heap α
a : α
c s : HeapNode α
n : Nat
left✝ : ∀ [inst : TotalBLE le], le a✝ a = true
h : WF le a c s.rank
h' : WF le a✝ s n
hr : Heap.WF le (node a c s).rank res
⊢ WF le a c ((node a c s).rank - 1)
state_after: no goals
tactic: exact h
Theorem: inf_eq_and_sup_eq_iff
File: Mathlib/Order/Lattice.lean

Proof steps:
state_before: α : Type u
β : Type v
inst✝ : Lattice α
a b c d : α
⊢ a ⊓ b = c ∧ a ⊔ b = c ↔ a = c ∧ b = c
state_after: case refine_1
α : Type u
β : Type v
inst✝ : Lattice α
a b c d : α
h : a ⊓ b = c ∧ a ⊔ b = c
⊢ a = c ∧ b = c

case refine_2
α : Type u
β : Type v
inst✝ : Lattice α
a b c d : α
⊢ a = c ∧ b = c → a ⊓ b = c ∧ a ⊔ b = c
tactic: refine ⟨fun h ↦ ?_, ?_⟩
Theorem: EReal.natCast_eq_iff
File: Mathlib/Data/Real/EReal.lean

Proof steps:
state_before: m n : ℕ
⊢ ↑m = ↑n ↔ m = n
state_after: no goals
tactic: rw [← coe_coe_eq_natCast n, ← coe_coe_eq_natCast m, EReal.coe_eq_coe_iff, Nat.cast_inj]
Theorem: Mathlib.Tactic.Group.zpow_trick_one
File: Mathlib/Tactic/Group.lean

Proof steps:
state_before: G : Type u_1
inst✝ : Group G
a b : G
m : ℤ
⊢ a * b * b ^ m = a * b ^ (m + 1)
state_after: no goals
tactic: rw [mul_assoc, mul_self_zpow]
Theorem: Nat.choose_mul_factorial_mul_factorial
File: Mathlib/Data/Nat/Choose/Basic.lean

Proof steps:
state_before: x✝ : ℕ
hk : x✝ ≤ 0
⊢ choose 0 x✝ * x✝! * (0 - x✝)! = 0!
state_after: no goals
tactic: simp [Nat.eq_zero_of_le_zero hk]
state_before: n : ℕ
x✝ : 0 ≤ n + 1
⊢ (n + 1).choose 0 * 0! * (n + 1 - 0)! = (n + 1)!
state_after: no goals
tactic: simp
state_before: n k : ℕ
hk : k.succ ≤ n + 1
⊢ (n + 1).choose k.succ * k.succ ! * (n + 1 - k.succ)! = (n + 1)!
state_after: case inl
n k : ℕ
hk : k.succ ≤ n + 1
hk₁ : k.succ < n + 1
⊢ (n + 1).choose k.succ * k.succ ! * (n + 1 - k.succ)! = (n + 1)!

case inr
n k : ℕ
hk : k.succ ≤ n + 1
hk₁ : k.succ = n + 1
⊢ (n + 1).choose k.succ * k.succ ! * (n + 1 - k.succ)! = (n + 1)!
tactic: rcases lt_or_eq_of_le hk with hk₁ | hk₁
Theorem: sSup_disjoint_iff
File: Mathlib/Order/CompleteBooleanAlgebra.lean

Proof steps:
state_before: α : Type u
β : Type v
ι : Sort w
κ : ι → Sort w'
inst✝ : Frame α
s✝ t : Set α
a b : α
s : Set α
⊢ Disjoint (sSup s) a ↔ ∀ b ∈ s, Disjoint b a
state_after: no goals
tactic: simp only [disjoint_iff, sSup_inf_eq, iSup_eq_bot]
Theorem: bihimp_top
File: Mathlib/Order/SymmDiff.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedHeytingAlgebra α
a b c d : α
⊢ a ⇔ ⊤ = a
state_after: no goals
tactic: rw [bihimp, himp_top, top_himp, inf_top_eq]
Theorem: TopologicalAddGroup.t2Space_of_zero_sep
File: Mathlib/Topology/Algebra/Group/Basic.lean

Proof steps:
state_before: G : Type w
H✝ : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
H : ∀ (x : G), x ≠ 1 → ∃ U ∈ 𝓝 1, x ∉ U
⊢ T2Space G
state_after: G : Type w
H✝ : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
H : ∀ (x : G), x ≠ 1 → ∃ U ∈ 𝓝 1, x ∉ U
⊢ T1Space G
tactic: suffices T1Space G from inferInstance
state_before: G : Type w
H✝ : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
H : ∀ (x : G), x ≠ 1 → ∃ U ∈ 𝓝 1, x ∉ U
⊢ T1Space G
state_after: G : Type w
H✝ : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
H : ∀ (x : G), x ≠ 1 → ∃ U ∈ 𝓝 1, x ∉ U
x y : G
hspec : x ⤳ y
hne : ¬x = y
⊢ False
tactic: refine t1Space_iff_specializes_imp_eq.2 fun x y hspec ↦ by_contra fun hne ↦ ?_
state_before: G : Type w
H✝ : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
H : ∀ (x : G), x ≠ 1 → ∃ U ∈ 𝓝 1, x ∉ U
x y : G
hspec : x ⤳ y
hne : ¬x = y
⊢ False
state_after: case intro.intro
G : Type w
H✝ : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
H : ∀ (x : G), x ≠ 1 → ∃ U ∈ 𝓝 1, x ∉ U
x y : G
hspec : x ⤳ y
hne : ¬x = y
U : Set G
hU₁ : U ∈ 𝓝 1
hU : x * y⁻¹ ∉ U
⊢ False
tactic: rcases H (x * y⁻¹) (by rwa [Ne, mul_inv_eq_one]) with ⟨U, hU₁, hU⟩
state_before: case intro.intro
G : Type w
H✝ : Type x
α : Type u
β : Type v
inst✝² : TopologicalSpace G
inst✝¹ : Group G
inst✝ : TopologicalGroup G
H : ∀ (x : G), x ≠ 1 → ∃ U ∈ 𝓝 1, x ∉ U
x y : G
hspec : x ⤳ y
hne : ¬x = y
U : Set G
hU₁ : U ∈ 𝓝 1
hU : x * y⁻¹ ∉ U
⊢ False
state_after: no goals
tactic: exact hU <| mem_of_mem_nhds <| hspec.map (continuous_mul_right y⁻¹) (by rwa [mul_inv_self])
Theorem: MeasureTheory.lintegral_add_measure
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∞
μ ν : Measure α
⊢ ∫⁻ (a : α), f a ∂(μ + ν) = ∫⁻ (a : α), f a ∂μ + ∫⁻ (a : α), f a ∂ν
state_after: no goals
tactic: simpa [tsum_fintype] using lintegral_sum_measure f fun b => cond b μ ν
Theorem: List.dropWhile_idempotent
File: Mathlib/Data/List/DropRight.lean

Proof steps:
state_before: α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ dropWhile p (dropWhile p l) = dropWhile p l
state_after: α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ ∀ (hl : 0 < (dropWhile p l).length), ¬p ((dropWhile p l).get ⟨0, hl⟩) = true
tactic: simp only [dropWhile_eq_self_iff]
state_before: α : Type u_1
p : α → Bool
l : List α
n : ℕ
⊢ ∀ (hl : 0 < (dropWhile p l).length), ¬p ((dropWhile p l).get ⟨0, hl⟩) = true
state_after: no goals
tactic: exact fun h => dropWhile_nthLe_zero_not p l h
Theorem: RootPairing.mapsTo_coreflection_coroot
File: Mathlib/LinearAlgebra/RootSystem/Defs.lean

Proof steps:
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
N : Type u_4
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
P : RootPairing ι R M N
i j : ι
⊢ MapsTo (⇑(P.coreflection i)) (range ⇑P.coroot) (range ⇑P.coroot)
state_after: case intro
ι : Type u_1
R : Type u_2
M : Type u_3
N : Type u_4
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
P : RootPairing ι R M N
i j✝ j : ι
⊢ (P.coreflection i) (P.coroot j) ∈ range ⇑P.coroot
tactic: rintro - ⟨j, rfl⟩
state_before: case intro
ι : Type u_1
R : Type u_2
M : Type u_3
N : Type u_4
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
P : RootPairing ι R M N
i j✝ j : ι
⊢ (P.coreflection i) (P.coroot j) ∈ range ⇑P.coroot
state_after: no goals
tactic: exact P.coroot_reflection_perm i j ▸ mem_range_self (P.reflection_perm i j)
Theorem: OrderIso.tendsto_atTop_iff
File: Mathlib/Order/Filter/AtTopBot.lean

Proof steps:
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : Preorder α
inst✝ : Preorder β
l : Filter γ
f : γ → α
e : α ≃o β
⊢ Tendsto (fun x => e (f x)) l atTop ↔ Tendsto f l atTop
state_after: no goals
tactic: rw [← e.comap_atTop, tendsto_comap_iff, Function.comp_def]
Theorem: iteratedDerivWithin_univ
File: Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x : 𝕜
⊢ iteratedDerivWithin n f univ = iteratedDeriv n f
state_after: case h
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ x : 𝕜
⊢ iteratedDerivWithin n f univ x = iteratedDeriv n f x
tactic: ext x
state_before: case h
𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type u_2
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type u_3
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
n : ℕ
f : 𝕜 → F
s : Set 𝕜
x✝ x : 𝕜
⊢ iteratedDerivWithin n f univ x = iteratedDeriv n f x
state_after: no goals
tactic: rw [iteratedDerivWithin, iteratedDeriv, iteratedFDerivWithin_univ]
Theorem: String.Iterator.ValidFor.next
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

Proof steps:
state_before: l : List Char
c : Char
r : List Char
it : Iterator
h : ValidFor l (c :: r) it
⊢ ValidFor (c :: l) r it.next
state_after: case refl
l : List Char
c : Char
r : List Char
h : ValidFor l (c :: r) { s := { data := l.reverse ++ c :: r }, i := { byteIdx := utf8Len l.reverse } }
⊢ ValidFor (c :: l) r { s := { data := l.reverse ++ c :: r }, i := { byteIdx := utf8Len l.reverse } }.next
tactic: cases h.out'
state_before: case refl
l : List Char
c : Char
r : List Char
h : ValidFor l (c :: r) { s := { data := l.reverse ++ c :: r }, i := { byteIdx := utf8Len l.reverse } }
⊢ ValidFor (c :: l) r { s := { data := l.reverse ++ c :: r }, i := { byteIdx := utf8Len l.reverse } }.next
state_after: case refl
l : List Char
c : Char
r : List Char
h : ValidFor l (c :: r) { s := { data := l.reverse ++ c :: r }, i := { byteIdx := utf8Len l.reverse } }
⊢ ValidFor (c :: l) r { s := { data := l.reverse ++ c :: r }, i := { byteIdx := utf8Len l.reverse + c.utf8Size } }
tactic: simp only [Iterator.next, next_of_valid l.reverse c r]
state_before: case refl
l : List Char
c : Char
r : List Char
h : ValidFor l (c :: r) { s := { data := l.reverse ++ c :: r }, i := { byteIdx := utf8Len l.reverse } }
⊢ ValidFor (c :: l) r { s := { data := l.reverse ++ c :: r }, i := { byteIdx := utf8Len l.reverse + c.utf8Size } }
state_after: case refl
l : List Char
c : Char
r : List Char
h : ValidFor l (c :: r) { s := { data := l.reverse ++ c :: r }, i := { byteIdx := utf8Len l.reverse } }
⊢ ValidFor (c :: l) r { s := { data := l.reverseAux (c :: r) }, i := { byteIdx := utf8Len l + c.utf8Size } }
tactic: rw [← List.reverseAux_eq, utf8Len_reverse]
state_before: case refl
l : List Char
c : Char
r : List Char
h : ValidFor l (c :: r) { s := { data := l.reverse ++ c :: r }, i := { byteIdx := utf8Len l.reverse } }
⊢ ValidFor (c :: l) r { s := { data := l.reverseAux (c :: r) }, i := { byteIdx := utf8Len l + c.utf8Size } }
state_after: no goals
tactic: constructor
Theorem: Subgroup.closure_singleton_one
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

Proof steps:
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝³ : Group G
inst✝² : Group G'
inst✝¹ : Group G''
A : Type u_4
inst✝ : AddGroup A
H K : Subgroup G
k : Set G
⊢ closure {1} = ⊥
state_after: no goals
tactic: simp [eq_bot_iff_forall, mem_closure_singleton]
Theorem: ProbabilityTheory.Kernel.measurable_singularPart_fun_right
File: Mathlib/Probability/Kernel/RadonNikodym.lean

Proof steps:
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ✝ η✝ : Kernel α γ
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
κ η : Kernel α γ
a : α
⊢ Measurable fun x => ↑(κ.rnDerivAux (κ + η) a x).toNNReal - ↑(1 - κ.rnDerivAux (κ + η) a x).toNNReal * κ.rnDeriv η a x
state_after: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ✝ η✝ : Kernel α γ
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
κ η : Kernel α γ
a : α
⊢ Measurable
    ((Function.uncurry fun a b =>
        ENNReal.ofReal (κ.rnDerivAux (κ + η) a b) - ENNReal.ofReal (1 - κ.rnDerivAux (κ + η) a b) * κ.rnDeriv η a b) ∘
      fun b => (a, b))
tactic: change Measurable ((Function.uncurry fun a b ↦
    ENNReal.ofReal (rnDerivAux κ (κ + η) a b)
    - ENNReal.ofReal (1 - rnDerivAux κ (κ + η) a b) * rnDeriv κ η a b) ∘ (fun b ↦ (a, b)))
state_before: α : Type u_1
γ : Type u_2
mα : MeasurableSpace α
mγ : MeasurableSpace γ
κ✝ η✝ : Kernel α γ
hαγ : MeasurableSpace.CountableOrCountablyGenerated α γ
κ η : Kernel α γ
a : α
⊢ Measurable
    ((Function.uncurry fun a b =>
        ENNReal.ofReal (κ.rnDerivAux (κ + η) a b) - ENNReal.ofReal (1 - κ.rnDerivAux (κ + η) a b) * κ.rnDeriv η a b) ∘
      fun b => (a, b))
state_after: no goals
tactic: exact (measurable_singularPart_fun κ η).comp measurable_prod_mk_left
Theorem: OpenEmbedding.isOpenMap_iff
File: Mathlib/Topology/Maps/Basic.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
ι : Type u_4
f : X → Y
g : Y → Z
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
hg : OpenEmbedding g
⊢ IsOpenMap f ↔ IsOpenMap (g ∘ f)
state_after: no goals
tactic: simp_rw [isOpenMap_iff_nhds_le, ← map_map, comp, ← hg.map_nhds_eq, Filter.map_le_map_iff hg.inj]
Theorem: Submonoid.card_le_one_iff_eq_bot
File: Mathlib/Algebra/Group/Submonoid/Membership.lean

Proof steps:
state_before: M : Type u_1
A : Type u_2
B : Type u_3
inst✝¹ : Monoid M
a : M
S : Submonoid M
inst✝ : Fintype ↥S
h : card ↥S ≤ 1
x : M
hx : x ∈ S
⊢ x = 1
state_after: no goals
tactic: simpa [Subtype.ext_iff] using card_le_one_iff.1 h ⟨x, hx⟩ 1
state_before: M : Type u_1
A : Type u_2
B : Type u_3
inst✝¹ : Monoid M
a : M
S : Submonoid M
inst✝ : Fintype ↥S
h : S = ⊥
⊢ card ↥S ≤ 1
state_after: no goals
tactic: simp [h]
Theorem: CategoryTheory.Monad.adj_unit
File: Mathlib/CategoryTheory/Monad/Algebra.lean

Proof steps:
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
T : Monad C
X : C
Y : T.Algebra
f : X ⟶ T.forget.obj Y
⊢ T.map (T.map f ≫ Y.a) ≫ Y.a = (T.free.obj X).a ≫ T.map f ≫ Y.a
state_after: C : Type u₁
inst✝ : Category.{v₁, u₁} C
T : Monad C
X : C
Y : T.Algebra
f : X ⟶ T.forget.obj Y
⊢ T.map (T.map f ≫ Y.a) ≫ Y.a = T.μ.app X ≫ T.map f ≫ Y.a
tactic: dsimp
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
T : Monad C
X : C
Y : T.Algebra
f : X ⟶ T.forget.obj Y
⊢ T.map (T.map f ≫ Y.a) ≫ Y.a = T.μ.app X ≫ T.map f ≫ Y.a
state_after: no goals
tactic: simp [← Y.assoc, ← T.μ.naturality_assoc]
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
T : Monad C
X : C
Y : T.Algebra
f : T.free.obj X ⟶ Y
⊢ (fun f => { f := T.map f ≫ Y.a, h := ⋯ }) ((fun f => T.η.app X ≫ f.f) f) = f
state_after: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
T : Monad C
X : C
Y : T.Algebra
f : T.free.obj X ⟶ Y
⊢ ((fun f => { f := T.map f ≫ Y.a, h := ⋯ }) ((fun f => T.η.app X ≫ f.f) f)).f = f.f
tactic: ext
state_before: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
T : Monad C
X : C
Y : T.Algebra
f : T.free.obj X ⟶ Y
⊢ ((fun f => { f := T.map f ≫ Y.a, h := ⋯ }) ((fun f => T.η.app X ≫ f.f) f)).f = f.f
state_after: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
T : Monad C
X : C
Y : T.Algebra
f : T.free.obj X ⟶ Y
⊢ T.map (T.η.app X ≫ f.f) ≫ Y.a = f.f
tactic: dsimp
state_before: case h
C : Type u₁
inst✝ : Category.{v₁, u₁} C
T : Monad C
X : C
Y : T.Algebra
f : T.free.obj X ⟶ Y
⊢ T.map (T.η.app X ≫ f.f) ≫ Y.a = f.f
state_after: no goals
tactic: simp
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
T : Monad C
X : C
Y : T.Algebra
f : X ⟶ T.forget.obj Y
⊢ (fun f => T.η.app X ≫ f.f) ((fun f => { f := T.map f ≫ Y.a, h := ⋯ }) f) = f
state_after: C : Type u₁
inst✝ : Category.{v₁, u₁} C
T : Monad C
X : C
Y : T.Algebra
f : X ⟶ T.forget.obj Y
⊢ T.η.app X ≫ T.map f ≫ Y.a = f
tactic: dsimp only [forget_obj]
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
T : Monad C
X : C
Y : T.Algebra
f : X ⟶ T.forget.obj Y
⊢ T.η.app X ≫ T.map f ≫ Y.a = f
state_after: C : Type u₁
inst✝ : Category.{v₁, u₁} C
T : Monad C
X : C
Y : T.Algebra
f : X ⟶ T.forget.obj Y
⊢ (𝟭 C).map f ≫ 𝟙 Y.A = f
tactic: rw [← T.η.naturality_assoc, Y.unit]
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
T : Monad C
X : C
Y : T.Algebra
f : X ⟶ T.forget.obj Y
⊢ (𝟭 C).map f ≫ 𝟙 Y.A = f
state_after: no goals
tactic: apply Category.comp_id
Theorem: LinearMap.convexOn
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✝¹ : Module 𝕜 E
inst✝ : Module 𝕜 β
f : E →ₗ[𝕜] β
s : Set E
hs : Convex 𝕜 s
x✝⁸ : E
x✝⁷ : x✝⁸ ∈ s
x✝⁶ : E
x✝⁵ : x✝⁶ ∈ s
x✝⁴ x✝³ : 𝕜
x✝² : 0 ≤ x✝⁴
x✝¹ : 0 ≤ x✝³
x✝ : x✝⁴ + x✝³ = 1
⊢ f (x✝⁴ • x✝⁸ + x✝³ • x✝⁶) ≤ x✝⁴ • f x✝⁸ + x✝³ • f x✝⁶
state_after: no goals
tactic: rw [f.map_add, f.map_smul, f.map_smul]
Theorem: MulEquiv.mapSubgroup_symm_apply
File: Mathlib/Algebra/Group/Subgroup/Basic.lean

Proof steps:
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
H✝ : Type u_5
inst✝¹ : Group H✝
H : Type u_6
inst✝ : Group H
f : G ≃* H
sg : Subgroup G
⊢ Subgroup.map (↑f.symm) (Subgroup.map (↑f) sg) = sg
state_after: no goals
tactic: simp [Subgroup.map_map]
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
H✝ : Type u_5
inst✝¹ : Group H✝
H : Type u_6
inst✝ : Group H
f : G ≃* H
sh : Subgroup H
⊢ Subgroup.map (↑f) (Subgroup.map (↑f.symm) sh) = sh
state_after: no goals
tactic: simp [Subgroup.map_map]
state_before: G : Type u_1
G' : Type u_2
G'' : Type u_3
inst✝⁵ : Group G
inst✝⁴ : Group G'
inst✝³ : Group G''
A : Type u_4
inst✝² : AddGroup A
H✝ : Type u_5
inst✝¹ : Group H✝
H : Type u_6
inst✝ : Group H
f : G ≃* H
sg1 sg2 : Subgroup G
h :
  { toFun := Subgroup.map ↑f, invFun := Subgroup.map ↑f.symm, left_inv := ⋯, right_inv := ⋯ } sg1 ≤
    { toFun := Subgroup.map ↑f, invFun := Subgroup.map ↑f.symm, left_inv := ⋯, right_inv := ⋯ } sg2
⊢ sg1 ≤ sg2
state_after: no goals
tactic: simpa [Subgroup.map_map] using
      Subgroup.map_mono (f := (f.symm : H →* G)) h