ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: IsCompact.nhdsSet_basis_uniformity
File: Mathlib/Topology/UniformSpace/Basic.lean

Proof steps:
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
K : Set α
p : ι → Prop
V : ι → Set (α × α)
hbasis : (𝓤 α).HasBasis p V
hK : IsCompact K
U : Set α
⊢ U ∈ 𝓝ˢ K ↔ ∃ i, p i ∧ ⋃ x ∈ K, ball x (V i) ⊆ U
state_after: case mp
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
K : Set α
p : ι → Prop
V : ι → Set (α × α)
hbasis : (𝓤 α).HasBasis p V
hK : IsCompact K
U : Set α
⊢ U ∈ 𝓝ˢ K → ∃ i, p i ∧ ⋃ x ∈ K, ball x (V i) ⊆ U

case mpr
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
K : Set α
p : ι → Prop
V : ι → Set (α × α)
hbasis : (𝓤 α).HasBasis p V
hK : IsCompact K
U : Set α
⊢ (∃ i, p i ∧ ⋃ x ∈ K, ball x (V i) ⊆ U) → U ∈ 𝓝ˢ K
tactic: constructor
Theorem: neg_eq_self
File: Mathlib/Algebra/Module/Defs.lean

Proof steps:
state_before: α : Type u_1
R✝ : Type u_2
k : Type u_3
S : Type u_4
M✝ : Type u_5
M₂ : Type u_6
M₃ : Type u_7
ι : Type u_8
inst✝⁷ : Semiring R✝
inst✝⁶ : AddCommGroup M✝
inst✝⁵ : Module R✝ M✝
R : Type u_9
M : Type u_10
inst✝⁴ : Semiring R
inst✝³ : CharZero R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : NoZeroSMulDivisors R M
v : M
⊢ -v = v ↔ v = 0
state_after: no goals
tactic: rw [eq_comm, self_eq_neg R M]
Theorem: Set.encard_singleton
File: Mathlib/Data/Set/Card.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
s t : Set α
e : α
⊢ {e}.encard = 1
state_after: α : Type u_1
β : Type u_2
s t : Set α
e : α
⊢ 1 = PartENat.withTopEquiv.symm 1
tactic: rw [encard, ← PartENat.withTopEquiv.symm.injective.eq_iff, Equiv.symm_apply_apply,
    PartENat.card_eq_coe_fintype_card, Fintype.card_ofSubsingleton, Nat.cast_one]
state_before: α : Type u_1
β : Type u_2
s t : Set α
e : α
⊢ 1 = PartENat.withTopEquiv.symm 1
state_after: no goals
tactic: rfl
Theorem: one_le_sq_iff_one_le_abs
File: Mathlib/Algebra/Order/Ring/Abs.lean

Proof steps:
state_before: α : Type u_1
inst✝ : LinearOrderedRing α
n : ℕ
a✝ b c a : α
⊢ 1 ≤ a ^ 2 ↔ 1 ≤ |a|
state_after: no goals
tactic: simpa only [one_pow, abs_one] using @sq_le_sq _ _ 1 a
Theorem: Finset.exists_eq_pow_of_mul_eq_pow_of_coprime
File: Mathlib/RingTheory/IntegralDomain.lean

Proof steps:
state_before: M : Type u_1
inst✝⁵ : CancelMonoidWithZero M
inst✝⁴ : Finite M
ι : Type u_2
R : Type u_3
inst✝³ : CommSemiring R
inst✝² : IsDomain R
inst✝¹ : GCDMonoid R
inst✝ : Unique Rˣ
n : ℕ
c : R
s : Finset ι
f : ι → R
h : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → IsCoprime (f i) (f j)
hprod : ∏ i ∈ s, f i = c ^ n
⊢ ∀ i ∈ s, ∃ d, f i = d ^ n
state_after: no goals
tactic: classical
    intro i hi
    rw [← insert_erase hi, prod_insert (not_mem_erase i s)] at hprod
    refine
      exists_eq_pow_of_mul_eq_pow_of_coprime
        (IsCoprime.prod_right fun j hj => h i hi j (erase_subset i s hj) fun hij => ?_) hprod
    rw [hij] at hj
    exact (s.not_mem_erase _) hj
Theorem: MeasureTheory.IsSetRing.inter_mem
File: Mathlib/MeasureTheory/SetSemiring.lean

Proof steps:
state_before: α : Type u_1
C : Set (Set α)
s t : Set α
hC : IsSetRing C
hs : s ∈ C
ht : t ∈ C
⊢ s ∩ t ∈ C
state_after: α : Type u_1
C : Set (Set α)
s t : Set α
hC : IsSetRing C
hs : s ∈ C
ht : t ∈ C
⊢ s \ (s \ t) ∈ C
tactic: rw [← diff_diff_right_self]
state_before: α : Type u_1
C : Set (Set α)
s t : Set α
hC : IsSetRing C
hs : s ∈ C
ht : t ∈ C
⊢ s \ (s \ t) ∈ C
state_after: no goals
tactic: exact hC.diff_mem hs (hC.diff_mem hs ht)
Theorem: Submonoid.disjoint_def
File: Mathlib/Algebra/Group/Submonoid/Basic.lean

Proof steps:
state_before: M : Type u_1
N : Type u_2
A : Type u_3
inst✝¹ : MulOneClass M
s : Set M
inst✝ : AddZeroClass A
t : Set A
S p₁ p₂ : Submonoid M
⊢ Disjoint p₁ p₂ ↔ ∀ {x : M}, x ∈ p₁ → x ∈ p₂ → x = 1
state_after: no goals
tactic: simp_rw [disjoint_iff_inf_le, SetLike.le_def, mem_inf, and_imp, mem_bot]
Theorem: ContinuousLinearEquiv.uniqueDiffOn_preimage_iff
File: Mathlib/Analysis/Calculus/FDeriv/Equiv.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝⁴ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
F : Type u_3
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
f : E → F
s : Set E
f' : E →L[𝕜] F
e : F ≃L[𝕜] E
⊢ UniqueDiffOn 𝕜 (⇑e ⁻¹' s) ↔ UniqueDiffOn 𝕜 s
state_after: no goals
tactic: rw [← e.image_symm_eq_preimage, e.symm.uniqueDiffOn_image_iff]
Theorem: WittVector.remainder_vars
File: Mathlib/RingTheory/WittVector/MulCoeff.lean

Proof steps:
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝ : CommRing k
n : ℕ
⊢ (remainder p n).vars ⊆ univ ×ˢ range (n + 1)
state_after: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝ : CommRing k
n : ℕ
⊢ ((∑ x ∈ range (n + 1), (rename (Prod.mk 0)) ((monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) *
        ∑ x ∈ range (n + 1), (rename (Prod.mk 1)) ((monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))).vars ⊆
    univ ×ˢ range (n + 1)
tactic: rw [remainder]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝ : CommRing k
n : ℕ
⊢ ((∑ x ∈ range (n + 1), (rename (Prod.mk 0)) ((monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))) *
        ∑ x ∈ range (n + 1), (rename (Prod.mk 1)) ((monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))).vars ⊆
    univ ×ˢ range (n + 1)
state_after: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝ : CommRing k
n : ℕ
⊢ (∑ x ∈ range (n + 1), (rename (Prod.mk 0)) ((monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))).vars ∪
      (∑ x ∈ range (n + 1), (rename (Prod.mk 1)) ((monomial (Finsupp.single x (p ^ (n + 1 - x)))) (↑p ^ x))).vars ⊆
    univ ×ˢ range (n + 1)
tactic: apply Subset.trans (vars_mul _ _)
Theorem: Fin.castPred_le_pred_iff
File: Mathlib/Data/Fin/Basic.lean

Proof steps:
state_before: n m : ℕ
a b : Fin (n + 1)
ha : a ≠ last n
hb : b ≠ 0
⊢ a.castPred ha ≤ b.pred hb ↔ a < b
state_after: no goals
tactic: rw [le_pred_iff, succ_castPred_le_iff]
Theorem: Multiset.Nat.card_antidiagonal
File: Mathlib/Data/Multiset/NatAntidiagonal.lean

Proof steps:
state_before: n : ℕ
⊢ card (antidiagonal n) = n + 1
state_after: no goals
tactic: rw [antidiagonal, coe_card, List.Nat.length_antidiagonal]
Theorem: CategoryTheory.isDetecting_op_iff
File: Mathlib/CategoryTheory/Generator.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
𝒢 : Set C
⊢ IsDetecting 𝒢.op ↔ IsCodetecting 𝒢
state_after: case refine_1
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
𝒢 : Set C
h𝒢 : IsDetecting 𝒢.op
X Y : C
f : X ⟶ Y
hf : ∀ G ∈ 𝒢, ∀ (h : X ⟶ G), ∃! h', f ≫ h' = h
⊢ IsIso f

case refine_2
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
𝒢 : Set C
h𝒢 : IsCodetecting 𝒢
X Y : Cᵒᵖ
f : X ⟶ Y
hf : ∀ G ∈ 𝒢.op, ∀ (h : G ⟶ Y), ∃! h', h' ≫ f = h
⊢ IsIso f
tactic: refine ⟨fun h𝒢 X Y f hf => ?_, fun h𝒢 X Y f hf => ?_⟩
Theorem: AddSubmonoid.LocalizationMap.map_mk'
File: Mathlib/GroupTheory/MonoidLocalization/Basic.lean

Proof steps:
state_before: M : Type u_1
inst✝³ : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝² : CommMonoid N
P : Type u_3
inst✝¹ : CommMonoid P
f : S.LocalizationMap N
g : M →* P
hg : ∀ (y : ↥S), IsUnit (g ↑y)
T : Submonoid P
hy : ∀ (y : ↥S), g ↑y ∈ T
Q : Type u_4
inst✝ : CommMonoid Q
k : T.LocalizationMap Q
x : M
y : ↥S
⊢ (f.map hy k) (f.mk' x y) = k.mk' (g x) ⟨g ↑y, ⋯⟩
state_after: M : Type u_1
inst✝³ : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝² : CommMonoid N
P : Type u_3
inst✝¹ : CommMonoid P
f : S.LocalizationMap N
g : M →* P
hg : ∀ (y : ↥S), IsUnit (g ↑y)
T : Submonoid P
hy : ∀ (y : ↥S), g ↑y ∈ T
Q : Type u_4
inst✝ : CommMonoid Q
k : T.LocalizationMap Q
x : M
y : ↥S
⊢ (k.toMap.comp g) x = (k.toMap.comp g) ↑y * k.mk' (g x) ⟨g ↑y, ⋯⟩
tactic: rw [map, lift_mk', mul_inv_left]
state_before: M : Type u_1
inst✝³ : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝² : CommMonoid N
P : Type u_3
inst✝¹ : CommMonoid P
f : S.LocalizationMap N
g : M →* P
hg : ∀ (y : ↥S), IsUnit (g ↑y)
T : Submonoid P
hy : ∀ (y : ↥S), g ↑y ∈ T
Q : Type u_4
inst✝ : CommMonoid Q
k : T.LocalizationMap Q
x : M
y : ↥S
⊢ (k.toMap.comp g) x = (k.toMap.comp g) ↑y * k.mk' (g x) ⟨g ↑y, ⋯⟩
state_after: M : Type u_1
inst✝³ : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝² : CommMonoid N
P : Type u_3
inst✝¹ : CommMonoid P
f : S.LocalizationMap N
g : M →* P
hg : ∀ (y : ↥S), IsUnit (g ↑y)
T : Submonoid P
hy : ∀ (y : ↥S), g ↑y ∈ T
Q : Type u_4
inst✝ : CommMonoid Q
k : T.LocalizationMap Q
x : M
y : ↥S
⊢ k.toMap (g x) = k.toMap (g ↑y) * k.mk' (g x) ⟨g ↑y, ⋯⟩
tactic: show k.toMap (g x) = k.toMap (g y) * _
state_before: M : Type u_1
inst✝³ : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝² : CommMonoid N
P : Type u_3
inst✝¹ : CommMonoid P
f : S.LocalizationMap N
g : M →* P
hg : ∀ (y : ↥S), IsUnit (g ↑y)
T : Submonoid P
hy : ∀ (y : ↥S), g ↑y ∈ T
Q : Type u_4
inst✝ : CommMonoid Q
k : T.LocalizationMap Q
x : M
y : ↥S
⊢ k.toMap (g x) = k.toMap (g ↑y) * k.mk' (g x) ⟨g ↑y, ⋯⟩
state_after: M : Type u_1
inst✝³ : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝² : CommMonoid N
P : Type u_3
inst✝¹ : CommMonoid P
f : S.LocalizationMap N
g : M →* P
hg : ∀ (y : ↥S), IsUnit (g ↑y)
T : Submonoid P
hy : ∀ (y : ↥S), g ↑y ∈ T
Q : Type u_4
inst✝ : CommMonoid Q
k : T.LocalizationMap Q
x : M
y : ↥S
⊢ k.toMap (g x) = k.mk' (g ↑y * g x) ⟨g ↑y, ⋯⟩
tactic: rw [mul_mk'_eq_mk'_of_mul]
state_before: M : Type u_1
inst✝³ : CommMonoid M
S : Submonoid M
N : Type u_2
inst✝² : CommMonoid N
P : Type u_3
inst✝¹ : CommMonoid P
f : S.LocalizationMap N
g : M →* P
hg : ∀ (y : ↥S), IsUnit (g ↑y)
T : Submonoid P
hy : ∀ (y : ↥S), g ↑y ∈ T
Q : Type u_4
inst✝ : CommMonoid Q
k : T.LocalizationMap Q
x : M
y : ↥S
⊢ k.toMap (g x) = k.mk' (g ↑y * g x) ⟨g ↑y, ⋯⟩
state_after: no goals
tactic: exact (k.mk'_mul_cancel_left (g x) ⟨g y, hy y⟩).symm
Theorem: Nat.Ico_filter_coprime_le
File: Mathlib/Data/Nat/Totient.lean

Proof steps:
state_before: a k n : ℕ
a_pos : 0 < a
⊢ (filter a.Coprime (Ico k (k + n))).card ≤ φ a * (n / a + 1)
state_after: a k n : ℕ
a_pos : 0 < a
⊢ (filter a.Coprime (Ico k (k + (n % a + a * (n / a))))).card ≤ φ a * (n / a + 1)
tactic: conv_lhs => rw [← Nat.mod_add_div n a]
state_before: a k n : ℕ
a_pos : 0 < a
⊢ (filter a.Coprime (Ico k (k + (n % a + a * (n / a))))).card ≤ φ a * (n / a + 1)
state_after: case zero
a k n : ℕ
a_pos : 0 < a
⊢ (filter a.Coprime (Ico k (k + (n % a + a * 0)))).card ≤ φ a * (0 + 1)

case succ
a k n : ℕ
a_pos : 0 < a
i : ℕ
ih : (filter a.Coprime (Ico k (k + (n % a + a * i)))).card ≤ φ a * (i + 1)
⊢ (filter a.Coprime (Ico k (k + (n % a + a * (i + 1))))).card ≤ φ a * (i + 1 + 1)
tactic: induction' n / a with i ih
state_before: case succ
a k n : ℕ
a_pos : 0 < a
i : ℕ
ih : (filter a.Coprime (Ico k (k + (n % a + a * i)))).card ≤ φ a * (i + 1)
⊢ (filter a.Coprime (Ico k (k + (n % a + a * (i + 1))))).card ≤ φ a * (i + 1 + 1)
state_after: case succ
a k n : ℕ
a_pos : 0 < a
i : ℕ
ih : (filter a.Coprime (Ico k (k + (n % a + a * i)))).card ≤ φ a * (i + 1)
⊢ (filter a.Coprime (Ico k (k + (n % a + (a * i + a))))).card ≤ φ a * i + φ a + φ a
tactic: simp only [mul_succ]
state_before: case succ
a k n : ℕ
a_pos : 0 < a
i : ℕ
ih : (filter a.Coprime (Ico k (k + (n % a + a * i)))).card ≤ φ a * (i + 1)
⊢ (filter a.Coprime (Ico k (k + (n % a + (a * i + a))))).card ≤ φ a * i + φ a + φ a
state_after: case succ
a k n : ℕ
a_pos : 0 < a
i : ℕ
ih : (filter a.Coprime (Ico k (k + n % a + a * i))).card ≤ φ a * (i + 1)
⊢ (filter a.Coprime (Ico k (k + n % a + a * i + a))).card ≤ φ a * i + φ a + φ a
tactic: simp_rw [← add_assoc] at ih ⊢
Theorem: Finset.orderEmbOfFin_last
File: Mathlib/Data/Finset/Sort.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : LinearOrder α
s : Finset α
k : ℕ
h : s.card = k
hz : 0 < k
⊢ (s.orderEmbOfFin h) ⟨k - 1, ⋯⟩ = s.max' ⋯
state_after: no goals
tactic: simp [orderEmbOfFin_apply, max'_eq_sorted_last, h]
Theorem: AddSubmonoid.exists_multiset_of_mem_closure
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✝
M : Type u_4
inst✝ : CommMonoid M
s : Set M
x : M
hx : x ∈ closure s
⊢ ∃ l, (∀ y ∈ l, y ∈ s) ∧ l.prod = x
state_after: case intro.intro
M✝ : Type u_1
A : Type u_2
B : Type u_3
inst✝¹ : Monoid M✝
a : M✝
M : Type u_4
inst✝ : CommMonoid M
s : Set M
x : M
hx : x ∈ closure s
l : List M
h1 : ∀ y ∈ l, y ∈ s
h2 : l.prod = x
⊢ ∃ l, (∀ y ∈ l, y ∈ s) ∧ l.prod = x
tactic: obtain ⟨l, h1, h2⟩ := exists_list_of_mem_closure hx
state_before: case intro.intro
M✝ : Type u_1
A : Type u_2
B : Type u_3
inst✝¹ : Monoid M✝
a : M✝
M : Type u_4
inst✝ : CommMonoid M
s : Set M
x : M
hx : x ∈ closure s
l : List M
h1 : ∀ y ∈ l, y ∈ s
h2 : l.prod = x
⊢ ∃ l, (∀ y ∈ l, y ∈ s) ∧ l.prod = x
state_after: no goals
tactic: exact ⟨l, h1, (Multiset.prod_coe l).trans h2⟩
Theorem: CharP.neg_one_ne_one
File: Mathlib/Algebra/CharP/Defs.lean

Proof steps:
state_before: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : Fact (2 < p)
⊢ -1 ≠ 1
state_after: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : Fact (2 < p)
⊢ 2 ≠ 0
tactic: suffices (2 : R) ≠ 0 by
    intro h
    symm at h
    rw [← sub_eq_zero, sub_neg_eq_add] at h
    norm_num at h
    exact this h
state_before: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : Fact (2 < p)
⊢ 2 ≠ 0
state_after: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : Fact (2 < p)
h : 2 = 0
⊢ False
tactic: intro h
state_before: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : Fact (2 < p)
h : 2 = 0
⊢ False
state_after: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : Fact (2 < p)
h : ↑2 = 0
⊢ False
tactic: rw [show (2 : R) = (2 : ℕ) by norm_cast] at h
state_before: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : Fact (2 < p)
h : ↑2 = 0
⊢ False
state_after: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : Fact (2 < p)
h : ↑2 = 0
this : p ∣ 2
⊢ False
tactic: have := (CharP.cast_eq_zero_iff R p 2).mp h
state_before: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : Fact (2 < p)
h : ↑2 = 0
this : p ∣ 2
⊢ False
state_after: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : Fact (2 < p)
h : ↑2 = 0
this✝ : p ∣ 2
this : p ≤ 2
⊢ False
tactic: have := Nat.le_of_dvd (by decide) this
state_before: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : Fact (2 < p)
h : ↑2 = 0
this✝ : p ∣ 2
this : p ≤ 2
⊢ False
state_after: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : 2 < p
h : ↑2 = 0
this✝ : p ∣ 2
this : p ≤ 2
⊢ False
tactic: rw [fact_iff] at *
state_before: R : Type u_1
inst✝² : Ring R
p : ℕ
inst✝¹ : CharP R p
inst✝ : 2 < p
h : ↑2 = 0
this✝ : p ∣ 2
this : p ≤ 2
⊢ False
state_after: no goals
tactic: omega
Theorem: List.mergeSort_cons_cons
File: Mathlib/Data/List/Sort.lean

Proof steps:
state_before: α : Type u
r : α → α → Prop
inst✝ : DecidableRel r
a b : α
l l₁ l₂ : List α
h : (a :: b :: l).split = (l₁, l₂)
⊢ mergeSort r (a :: b :: l) = merge (fun x x_1 => decide (r x x_1)) (mergeSort r l₁) (mergeSort r l₂)
state_after: no goals
tactic: simp only [mergeSort, h]
Theorem: CategoryTheory.Square.map_f₃₄
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
sq : Square C
F : C ⥤ D
⊢ F.map sq.f₁₂ ≫ F.map sq.f₂₄ = F.map sq.f₁₃ ≫ F.map sq.f₃₄
state_after: no goals
tactic: simpa using F.congr_map sq.fac
Theorem: RingQuot.sub_quot
File: Mathlib/Algebra/RingQuot.lean

Proof steps:
state_before: R✝ : Type uR
inst✝⁴ : Semiring R✝
S : Type uS
inst✝³ : CommSemiring S
T : Type uT
A : Type uA
inst✝² : Semiring A
inst✝¹ : Algebra S A
r✝ : R✝ → R✝ → Prop
R : Type uR
inst✝ : Ring R
r : R → R → Prop
a b : R
⊢ { toQuot := Quot.mk (Rel r) a } - { toQuot := Quot.mk (Rel r) b } = { toQuot := Quot.mk (Rel r) (a - b) }
state_after: R✝ : Type uR
inst✝⁴ : Semiring R✝
S : Type uS
inst✝³ : CommSemiring S
T : Type uT
A : Type uA
inst✝² : Semiring A
inst✝¹ : Algebra S A
r✝ : R✝ → R✝ → Prop
R : Type uR
inst✝ : Ring R
r : R → R → Prop
a b : R
⊢ RingQuot.sub r { toQuot := Quot.mk (Rel r) a } { toQuot := Quot.mk (Rel r) b } = { toQuot := Quot.mk (Rel r) (a - b) }
tactic: show sub r _ _ = _
state_before: R✝ : Type uR
inst✝⁴ : Semiring R✝
S : Type uS
inst✝³ : CommSemiring S
T : Type uT
A : Type uA
inst✝² : Semiring A
inst✝¹ : Algebra S A
r✝ : R✝ → R✝ → Prop
R : Type uR
inst✝ : Ring R
r : R → R → Prop
a b : R
⊢ RingQuot.sub r { toQuot := Quot.mk (Rel r) a } { toQuot := Quot.mk (Rel r) b } = { toQuot := Quot.mk (Rel r) (a - b) }
state_after: R✝ : Type uR
inst✝⁴ : Semiring R✝
S : Type uS
inst✝³ : CommSemiring S
T : Type uT
A : Type uA
inst✝² : Semiring A
inst✝¹ : Algebra S A
r✝ : R✝ → R✝ → Prop
R : Type uR
inst✝ : Ring R
r : R → R → Prop
a b : R
⊢ (match { toQuot := Quot.mk (Rel r) a }, { toQuot := Quot.mk (Rel r) b } with
    | { toQuot := a }, { toQuot := b } => { toQuot := Quot.map₂ Sub.sub ⋯ ⋯ a b }) =
    { toQuot := Quot.mk (Rel r) (a - b) }
tactic: rw [sub_def]
state_before: R✝ : Type uR
inst✝⁴ : Semiring R✝
S : Type uS
inst✝³ : CommSemiring S
T : Type uT
A : Type uA
inst✝² : Semiring A
inst✝¹ : Algebra S A
r✝ : R✝ → R✝ → Prop
R : Type uR
inst✝ : Ring R
r : R → R → Prop
a b : R
⊢ (match { toQuot := Quot.mk (Rel r) a }, { toQuot := Quot.mk (Rel r) b } with
    | { toQuot := a }, { toQuot := b } => { toQuot := Quot.map₂ Sub.sub ⋯ ⋯ a b }) =
    { toQuot := Quot.mk (Rel r) (a - b) }
state_after: no goals
tactic: rfl
Theorem: Equiv.Perm.SameCycle.apply_eq_self_iff
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
p : α → Prop
x y z : α
x✝ : f.SameCycle x y
i : ℤ
hi : (f ^ i) x = y
⊢ f x = x ↔ f y = y
state_after: no goals
tactic: rw [← hi, ← mul_apply, ← zpow_one_add, add_comm, zpow_add_one, mul_apply,
    (f ^ i).injective.eq_iff]
Theorem: Finset.image_add_right_Ioc
File: Mathlib/Algebra/Order/Interval/Finset.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
inst✝³ : OrderedCancelAddCommMonoid α
inst✝² : ExistsAddOfLE α
inst✝¹ : LocallyFiniteOrder α
inst✝ : DecidableEq α
a b c : α
⊢ image (fun x => x + c) (Ioc a b) = Ioc (a + c) (b + c)
state_after: no goals
tactic: rw [← map_add_right_Ioc, map_eq_image, addRightEmbedding, Embedding.coeFn_mk]
Theorem: MeasureTheory.measure_setOf_frequently_eq_zero
File: Mathlib/MeasureTheory/Measure/Restrict.lean

Proof steps:
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
inst✝ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
p : ℕ → α → Prop
hp : ∑' (i : ℕ), μ {x | p i x} ≠ ⊤
⊢ μ {x | ∃ᶠ (n : ℕ) in atTop, p n x} = 0
state_after: no goals
tactic: simpa only [limsup_eq_iInf_iSup_of_nat, frequently_atTop, ← bex_def, setOf_forall,
    setOf_exists] using measure_limsup_eq_zero hp
Theorem: quotient_norm_mk_eq
File: Mathlib/Analysis/Normed/Group/Quotient.lean

Proof steps:
state_before: M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
m : M
⊢ ‖(mk' S) m‖ = sInf ((fun x => ‖m + x‖) '' ↑S)
state_after: M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
m : M
⊢ ⨅ y, dist (-m) ↑y = ⨅ a, ‖m + ↑a‖
tactic: rw [mk'_apply, norm_mk, sInf_image', ← infDist_image isometry_neg, image_neg,
    neg_coe_set (H := S), infDist_eq_iInf]
state_before: M : Type u_1
N : Type u_2
inst✝¹ : SeminormedAddCommGroup M
inst✝ : SeminormedAddCommGroup N
S : AddSubgroup M
m : M
⊢ ⨅ y, dist (-m) ↑y = ⨅ a, ‖m + ↑a‖
state_after: no goals
tactic: simp only [dist_eq_norm', sub_neg_eq_add, add_comm]
Theorem: MeasureTheory.convolution_integrand_bound_right_of_le_of_subset
File: Mathlib/Analysis/Convolution.lean

Proof steps:
state_before: 𝕜 : Type u𝕜
G : Type uG
E : Type uE
E' : Type uE'
E'' : Type uE''
F : Type uF
F' : Type uF'
F'' : Type uF''
P : Type uP
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : NormedAddCommGroup E''
inst✝⁷ : NormedAddCommGroup F
f f' : G → E
g g' : G → E'
x✝ x' : G
y y' : E
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedSpace 𝕜 E
inst✝⁴ : NormedSpace 𝕜 E'
inst✝³ : NormedSpace 𝕜 E''
inst✝² : NormedSpace 𝕜 F
L : E →L[𝕜] E' →L[𝕜] F
inst✝¹ : AddGroup G
inst✝ : TopologicalSpace G
C : ℝ
hC : ∀ (i : G), ‖g i‖ ≤ C
x t : G
s u : Set G
hx : x ∈ s
hu : -tsupport g + s ⊆ u
⊢ ‖(L (f t)) (g (x - t))‖ ≤ u.indicator (fun t => ‖L‖ * ‖f t‖ * C) t
state_after: case refine_1
𝕜 : Type u𝕜
G : Type uG
E : Type uE
E' : Type uE'
E'' : Type uE''
F : Type uF
F' : Type uF'
F'' : Type uF''
P : Type uP
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : NormedAddCommGroup E''
inst✝⁷ : NormedAddCommGroup F
f f' : G → E
g g' : G → E'
x✝¹ x' : G
y y' : E
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedSpace 𝕜 E
inst✝⁴ : NormedSpace 𝕜 E'
inst✝³ : NormedSpace 𝕜 E''
inst✝² : NormedSpace 𝕜 F
L : E →L[𝕜] E' →L[𝕜] F
inst✝¹ : AddGroup G
inst✝ : TopologicalSpace G
C : ℝ
hC : ∀ (i : G), ‖g i‖ ≤ C
x t✝ : G
s u : Set G
hx : x ∈ s
hu : -tsupport g + s ⊆ u
t : G
x✝ : t ∈ u
⊢ (fun t => ‖(L (f t)) (g (x - t))‖) t ≤ ‖L‖ * ‖f t‖ * C

case refine_2
𝕜 : Type u𝕜
G : Type uG
E : Type uE
E' : Type uE'
E'' : Type uE''
F : Type uF
F' : Type uF'
F'' : Type uF''
P : Type uP
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : NormedAddCommGroup E''
inst✝⁷ : NormedAddCommGroup F
f f' : G → E
g g' : G → E'
x✝ x' : G
y y' : E
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedSpace 𝕜 E
inst✝⁴ : NormedSpace 𝕜 E'
inst✝³ : NormedSpace 𝕜 E''
inst✝² : NormedSpace 𝕜 F
L : E →L[𝕜] E' →L[𝕜] F
inst✝¹ : AddGroup G
inst✝ : TopologicalSpace G
C : ℝ
hC : ∀ (i : G), ‖g i‖ ≤ C
x t✝ : G
s u : Set G
hx : x ∈ s
hu : -tsupport g + s ⊆ u
t : G
ht : t ∉ u
⊢ (fun t => ‖(L (f t)) (g (x - t))‖) t ≤ 0
tactic: refine le_indicator (f := fun t ↦ ‖L (f t) (g (x - t))‖) (fun t _ => ?_) (fun t ht => ?_) t
Theorem: Int.pow_dvd_pow_iff
File: Mathlib/Data/Int/GCD.lean

Proof steps:
state_before: m n : ℤ
k : ℕ
k0 : k ≠ 0
⊢ m ^ k ∣ n ^ k ↔ m ∣ n
state_after: m n : ℤ
k : ℕ
k0 : k ≠ 0
h : m ^ k ∣ n ^ k
⊢ m ∣ n
tactic: refine ⟨fun h => ?_, fun h => pow_dvd_pow_of_dvd h _⟩
state_before: m n : ℤ
k : ℕ
k0 : k ≠ 0
h : m ^ k ∣ n ^ k
⊢ m ∣ n
state_after: no goals
tactic: rwa [← natAbs_dvd_natAbs, ← Nat.pow_dvd_pow_iff k0, ← Int.natAbs_pow, ← Int.natAbs_pow,
    natAbs_dvd_natAbs]
Theorem: Sbtw.oangle₃₂₁_eq_pi
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.lean

Proof steps:
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
h : Sbtw ℝ p₁ p₂ p₃
⊢ ∡ p₃ p₂ p₁ = ↑π
state_after: no goals
tactic: rw [oangle_eq_pi_iff_oangle_rev_eq_pi, ← h.oangle₁₂₃_eq_pi]
Theorem: CategoryTheory.MonoOver.image_obj
File: Mathlib/CategoryTheory/Subobject/MonoOver.lean

Proof steps:
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
X Y Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : HasImages C
f g : Over X
k : f ⟶ g
⊢ (fun f => imageMonoOver f.hom) f ⟶ (fun f => imageMonoOver f.hom) g
state_after: C : Type u₁
inst✝² : Category.{v₁, u₁} C
X Y Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : HasImages C
f g : Over X
k : f ⟶ g
⊢ (forget X).obj ((fun f => imageMonoOver f.hom) f) ⟶ (forget X).obj ((fun f => imageMonoOver f.hom) g)
tactic: apply (forget X).preimage _
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
X Y Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : HasImages C
f g : Over X
k : f ⟶ g
⊢ (forget X).obj ((fun f => imageMonoOver f.hom) f) ⟶ (forget X).obj ((fun f => imageMonoOver f.hom) g)
state_after: C : Type u₁
inst✝² : Category.{v₁, u₁} C
X Y Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : HasImages C
f g : Over X
k : f ⟶ g
⊢ ((forget X).obj ((fun f => imageMonoOver f.hom) f)).left ⟶ ((forget X).obj ((fun f => imageMonoOver f.hom) g)).left

C : Type u₁
inst✝² : Category.{v₁, u₁} C
X Y Z : C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : HasImages C
f g : Over X
k : f ⟶ g
⊢ ?m.153502 ≫ ((forget X).obj ((fun f => imageMonoOver f.hom) g)).hom =
    ((forget X).obj ((fun f => imageMonoOver f.hom) f)).hom
tactic: apply Over.homMk _ _