ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: MeasureTheory.measure_eq_measure_of_between_null_diff
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
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁✝ s₂✝ t s₁ s₂ s₃ : Set α
h12 : s₁ ⊆ s₂
h23 : s₂ ⊆ s₃
h_nulldiff : μ (s₃ \ s₁) = 0
⊢ μ s₁ = μ s₂ ∧ μ s₂ = μ s₃
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁✝ s₂✝ t s₁ s₂ s₃ : Set α
h12 : s₁ ⊆ s₂
h23 : s₂ ⊆ s₃
h_nulldiff : μ (s₃ \ s₁) = 0
le12 : μ s₁ ≤ μ s₂
⊢ μ s₁ = μ s₂ ∧ μ s₂ = μ s₃
tactic: have le12 : μ s₁ ≤ μ s₂ := measure_mono h12
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
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁✝ s₂✝ t s₁ s₂ s₃ : Set α
h12 : s₁ ⊆ s₂
h23 : s₂ ⊆ s₃
h_nulldiff : μ (s₃ \ s₁) = 0
le12 : μ s₁ ≤ μ s₂
⊢ μ s₁ = μ s₂ ∧ μ s₂ = μ s₃
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁✝ s₂✝ t s₁ s₂ s₃ : Set α
h12 : s₁ ⊆ s₂
h23 : s₂ ⊆ s₃
h_nulldiff : μ (s₃ \ s₁) = 0
le12 : μ s₁ ≤ μ s₂
le23 : μ s₂ ≤ μ s₃
⊢ μ s₁ = μ s₂ ∧ μ s₂ = μ s₃
tactic: have le23 : μ s₂ ≤ μ s₃ := measure_mono h23
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
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁✝ s₂✝ t s₁ s₂ s₃ : Set α
h12 : s₁ ⊆ s₂
h23 : s₂ ⊆ s₃
h_nulldiff : μ (s₃ \ s₁) = 0
le12 : μ s₁ ≤ μ s₂
le23 : μ s₂ ≤ μ s₃
⊢ μ s₁ = μ s₂ ∧ μ s₂ = μ s₃
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁✝ s₂✝ t s₁ s₂ s₃ : Set α
h12 : s₁ ⊆ s₂
h23 : s₂ ⊆ s₃
h_nulldiff : μ (s₃ \ s₁) = 0
le12 : μ s₁ ≤ μ s₂
le23 : μ s₂ ≤ μ s₃
key : μ s₃ ≤ μ s₁
⊢ μ s₁ = μ s₂ ∧ μ s₂ = μ s₃
tactic: have key : μ s₃ ≤ μ s₁ :=
    calc
      μ s₃ = μ (s₃ \ s₁ ∪ s₁) := by rw [diff_union_of_subset (h12.trans h23)]
      _ ≤ μ (s₃ \ s₁) + μ s₁ := measure_union_le _ _
      _ = μ s₁ := by simp only [h_nulldiff, zero_add]
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
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁✝ s₂✝ t s₁ s₂ s₃ : Set α
h12 : s₁ ⊆ s₂
h23 : s₂ ⊆ s₃
h_nulldiff : μ (s₃ \ s₁) = 0
le12 : μ s₁ ≤ μ s₂
le23 : μ s₂ ≤ μ s₃
key : μ s₃ ≤ μ s₁
⊢ μ s₁ = μ s₂ ∧ μ s₂ = μ s₃
state_after: no goals
tactic: exact ⟨le12.antisymm (le23.trans key), le23.antisymm (key.trans le12)⟩
Theorem: List.eq_of_length_one
File: Mathlib/Data/List/EditDistance/Defs.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
inst✝¹ : AddZeroClass δ
inst✝ : Min δ
C : Cost α β δ
x : List α
w : x.length = 1
⊢ let_fun this := ⋯;
  x = [x[0]]
state_after: no goals
tactic: match x, w with
  | [r], _ => rfl
Theorem: Submonoid.sup_eq_range
File: Mathlib/Algebra/Group/Submonoid/Membership.lean

Proof steps:
state_before: M : Type u_1
A : Type u_2
B : Type u_3
N : Type u_4
inst✝ : CommMonoid N
s t : Submonoid N
⊢ s ⊔ t = mrange (s.subtype.coprod t.subtype)
state_after: no goals
tactic: rw [mrange_eq_map, ← mrange_inl_sup_mrange_inr, map_sup, map_mrange, coprod_comp_inl, map_mrange,
    coprod_comp_inr, range_subtype, range_subtype]
Theorem: Fintype.sum_subset
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

Proof steps:
state_before: ι✝ : Type u_1
κ✝ : Type u_2
α✝ : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α✝
a : α✝
f✝ g : α✝ → β
ι : Type u_6
κ : Type u_7
α : Type u_8
inst✝² : Fintype ι
inst✝¹ : Fintype κ
inst✝ : CommMonoid α
s : Finset ι
f : ι → α
h : ∀ (i : ι), f i ≠ 1 → i ∈ s
⊢ ∀ x ∈ univ, x ∉ s → f x = 1
state_after: no goals
tactic: simpa [not_imp_comm (a := _ ∈ s)]
Theorem: toIocDiv_add_right
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 : α
⊢ toIocDiv hp a (b + p) = toIocDiv hp a b + 1
state_after: no goals
tactic: simpa only [one_zsmul] using toIocDiv_add_zsmul hp a b 1
Theorem: Comon_.mkIso_hom_hom
File: Mathlib/CategoryTheory/Monoidal/Comon_.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : MonoidalCategory C
M✝ M N : Comon_ C
f : M.X ≅ N.X
f_counit : autoParam (f.hom ≫ N.counit = M.counit) _auto✝
f_comul : autoParam (f.hom ≫ N.comul = M.comul ≫ (f.hom ⊗ f.hom)) _auto✝
⊢ f.inv ≫ M.counit = N.counit
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : MonoidalCategory C
M✝ M N : Comon_ C
f : M.X ≅ N.X
f_counit : autoParam (f.hom ≫ N.counit = M.counit) _auto✝
f_comul : autoParam (f.hom ≫ N.comul = M.comul ≫ (f.hom ⊗ f.hom)) _auto✝
⊢ f.inv ≫ f.hom ≫ N.counit = N.counit
tactic: rw [← f_counit]
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : MonoidalCategory C
M✝ M N : Comon_ C
f : M.X ≅ N.X
f_counit : autoParam (f.hom ≫ N.counit = M.counit) _auto✝
f_comul : autoParam (f.hom ≫ N.comul = M.comul ≫ (f.hom ⊗ f.hom)) _auto✝
⊢ f.inv ≫ f.hom ≫ N.counit = N.counit
state_after: no goals
tactic: simp
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : MonoidalCategory C
M✝ M N : Comon_ C
f : M.X ≅ N.X
f_counit : autoParam (f.hom ≫ N.counit = M.counit) _auto✝
f_comul : autoParam (f.hom ≫ N.comul = M.comul ≫ (f.hom ⊗ f.hom)) _auto✝
⊢ f.inv ≫ M.comul = N.comul ≫ (f.inv ⊗ f.inv)
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : MonoidalCategory C
M✝ M N : Comon_ C
f : M.X ≅ N.X
f_counit : autoParam (f.hom ≫ N.counit = M.counit) _auto✝
f_comul : autoParam (f.hom ≫ N.comul = M.comul ≫ (f.hom ⊗ f.hom)) _auto✝
⊢ f.hom ≫ f.inv ≫ M.comul = f.hom ≫ N.comul ≫ (f.inv ⊗ f.inv)
tactic: rw [← cancel_epi f.hom]
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : MonoidalCategory C
M✝ M N : Comon_ C
f : M.X ≅ N.X
f_counit : autoParam (f.hom ≫ N.counit = M.counit) _auto✝
f_comul : autoParam (f.hom ≫ N.comul = M.comul ≫ (f.hom ⊗ f.hom)) _auto✝
⊢ f.hom ≫ f.inv ≫ M.comul = f.hom ≫ N.comul ≫ (f.inv ⊗ f.inv)
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : MonoidalCategory C
M✝ M N : Comon_ C
f : M.X ≅ N.X
f_counit : autoParam (f.hom ≫ N.counit = M.counit) _auto✝
f_comul : autoParam (f.hom ≫ N.comul = M.comul ≫ (f.hom ⊗ f.hom)) _auto✝
⊢ f.hom ≫ f.inv ≫ M.comul = (M.comul ≫ (f.hom ⊗ f.hom)) ≫ (f.inv ⊗ f.inv)
tactic: slice_rhs 1 2 => rw [f_comul]
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
inst✝ : MonoidalCategory C
M✝ M N : Comon_ C
f : M.X ≅ N.X
f_counit : autoParam (f.hom ≫ N.counit = M.counit) _auto✝
f_comul : autoParam (f.hom ≫ N.comul = M.comul ≫ (f.hom ⊗ f.hom)) _auto✝
⊢ f.hom ≫ f.inv ≫ M.comul = (M.comul ≫ (f.hom ⊗ f.hom)) ≫ (f.inv ⊗ f.inv)
state_after: no goals
tactic: simp
Theorem: pow_add_pow_le'
File: Mathlib/Algebra/Order/Ring/Basic.lean

Proof steps:
state_before: α : Type u_1
M : Type u_2
R : Type u_3
inst✝ : OrderedSemiring R
a b x y : R
n m : ℕ
ha : 0 ≤ a
hb : 0 ≤ b
⊢ a ^ n + b ^ n ≤ 2 * (a + b) ^ n
state_after: α : Type u_1
M : Type u_2
R : Type u_3
inst✝ : OrderedSemiring R
a b x y : R
n m : ℕ
ha : 0 ≤ a
hb : 0 ≤ b
⊢ a ^ n + b ^ n ≤ (a + b) ^ n + (a + b) ^ n
tactic: rw [two_mul]
state_before: α : Type u_1
M : Type u_2
R : Type u_3
inst✝ : OrderedSemiring R
a b x y : R
n m : ℕ
ha : 0 ≤ a
hb : 0 ≤ b
⊢ a ^ n + b ^ n ≤ (a + b) ^ n + (a + b) ^ n
state_after: no goals
tactic: exact add_le_add (pow_le_pow_left ha (le_add_of_nonneg_right hb) _)
    (pow_le_pow_left hb (le_add_of_nonneg_left ha) _)
Theorem: Finset.noncommProd_lemma
File: Mathlib/Data/Finset/NoncommProd.lean

Proof steps:
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s : Finset α
f : α → β
comm : (↑s).Pairwise fun a b => Commute (f a) (f b)
⊢ {x | x ∈ Multiset.map f s.val}.Pairwise Commute
state_after: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s : Finset α
f : α → β
comm : (↑s).Pairwise fun a b => Commute (f a) (f b)
⊢ {x | ∃ a ∈ s.val, f a = x}.Pairwise Commute
tactic: simp_rw [Multiset.mem_map]
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s : Finset α
f : α → β
comm : (↑s).Pairwise fun a b => Commute (f a) (f b)
⊢ {x | ∃ a ∈ s.val, f a = x}.Pairwise Commute
state_after: case intro.intro.intro.intro
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s : Finset α
f : α → β
comm : (↑s).Pairwise fun a b => Commute (f a) (f b)
a : α
ha : a ∈ s.val
b : α
hb : b ∈ s.val
a✝ : f a ≠ f b
⊢ Commute (f a) (f b)
tactic: rintro _ ⟨a, ha, rfl⟩ _ ⟨b, hb, rfl⟩ _
state_before: case intro.intro.intro.intro
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝¹ : Monoid β
inst✝ : Monoid γ
s : Finset α
f : α → β
comm : (↑s).Pairwise fun a b => Commute (f a) (f b)
a : α
ha : a ∈ s.val
b : α
hb : b ∈ s.val
a✝ : f a ≠ f b
⊢ Commute (f a) (f b)
state_after: no goals
tactic: exact comm.of_refl ha hb
Theorem: IsNoetherian.disjoint_partialSups_eventually_bot
File: Mathlib/RingTheory/Noetherian.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
P : Type u_3
N : Type w
inst✝⁷ : Ring R
inst✝⁶ : AddCommGroup M
inst✝⁵ : Module R M
inst✝⁴ : AddCommGroup N
inst✝³ : Module R N
inst✝² : AddCommGroup P
inst✝¹ : Module R P
inst✝ : IsNoetherian R M
f : ℕ → Submodule R M
h : ∀ (n : ℕ), Disjoint ((partialSups f) n) (f (n + 1))
⊢ ∃ n, ∀ (m : ℕ), n ≤ m → f (m + 1) = ⊥
state_after: case intro
R : Type u_1
M : Type u_2
P : Type u_3
N : Type w
inst✝⁷ : Ring R
inst✝⁶ : AddCommGroup M
inst✝⁵ : Module R M
inst✝⁴ : AddCommGroup N
inst✝³ : Module R N
inst✝² : AddCommGroup P
inst✝¹ : Module R P
inst✝ : IsNoetherian R M
f : ℕ → Submodule R M
h : ∀ (n : ℕ), Disjoint ((partialSups f) n) (f (n + 1))
n : ℕ
w : ∀ (m : ℕ), n ≤ m → (partialSups f) n = (partialSups f) m
⊢ ∃ n, ∀ (m : ℕ), n ≤ m → f (m + 1) = ⊥
tactic: obtain ⟨n, w⟩ := monotone_stabilizes_iff_noetherian.mpr inferInstance (partialSups f)
state_before: case intro
R : Type u_1
M : Type u_2
P : Type u_3
N : Type w
inst✝⁷ : Ring R
inst✝⁶ : AddCommGroup M
inst✝⁵ : Module R M
inst✝⁴ : AddCommGroup N
inst✝³ : Module R N
inst✝² : AddCommGroup P
inst✝¹ : Module R P
inst✝ : IsNoetherian R M
f : ℕ → Submodule R M
h : ∀ (n : ℕ), Disjoint ((partialSups f) n) (f (n + 1))
n : ℕ
w : ∀ (m : ℕ), n ≤ m → (partialSups f) n = (partialSups f) m
⊢ ∃ n, ∀ (m : ℕ), n ≤ m → f (m + 1) = ⊥
state_after: no goals
tactic: exact
    ⟨n, fun m p =>
      (h m).eq_bot_of_ge <| sup_eq_left.1 <| (w (m + 1) <| le_add_right p).symm.trans <| w m p⟩
Theorem: tsum_div_const
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₂ : α
inst✝ : T2Space α
⊢ ∑' (x : ι), f x / a = (∑' (x : ι), f x) / a
state_after: no goals
tactic: simpa only [div_eq_mul_inv] using tsum_mul_right
Theorem: RCLike.ofReal_le_ofReal
File: Mathlib/Analysis/RCLike/Basic.lean

Proof steps:
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
x y : ℝ
⊢ ↑x ≤ ↑y ↔ x ≤ y
state_after: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
x y : ℝ
⊢ re ↑x ≤ re ↑y ∧ im ↑x = im ↑y ↔ x ≤ y
tactic: rw [le_iff_re_im]
state_before: K : Type u_1
E : Type u_2
inst✝ : RCLike K
z w : K
x y : ℝ
⊢ re ↑x ≤ re ↑y ∧ im ↑x = im ↑y ↔ x ≤ y
state_after: no goals
tactic: simp
Theorem: ContinuousLinearMap.norm_toSpanSingleton
File: Mathlib/Analysis/NormedSpace/OperatorNorm/Mul.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : SeminormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
𝕜' : Type u_3
inst✝³ : NormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' E
inst✝ : IsScalarTower 𝕜 𝕜' E
x : E
⊢ ‖toSpanSingleton 𝕜 x‖ = ‖x‖
state_after: case refine_1
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : SeminormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
𝕜' : Type u_3
inst✝³ : NormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' E
inst✝ : IsScalarTower 𝕜 𝕜' E
x✝ : E
x : 𝕜
⊢ ‖(toSpanSingleton 𝕜 x✝) x‖ ≤ ‖x✝‖ * ‖x‖

case refine_2
𝕜 : Type u_1
E : Type u_2
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : SeminormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
𝕜' : Type u_3
inst✝³ : NormedField 𝕜'
inst✝² : NormedAlgebra 𝕜 𝕜'
inst✝¹ : NormedSpace 𝕜' E
inst✝ : IsScalarTower 𝕜 𝕜' E
x : E
N : ℝ
x✝ : N ≥ 0
h : ∀ (x_1 : 𝕜), ‖(toSpanSingleton 𝕜 x) x_1‖ ≤ N * ‖x_1‖
⊢ ‖x‖ ≤ N
tactic: refine opNorm_eq_of_bounds (norm_nonneg _) (fun x => ?_) fun N _ h => ?_
Theorem: MeasureTheory.OuterMeasure.le_boundedBy
File: Mathlib/MeasureTheory/OuterMeasure/OfFunction.lean

Proof steps:
state_before: α : Type u_1
m : Set α → ℝ≥0∞
μ : OuterMeasure α
⊢ μ ≤ boundedBy m ↔ ∀ (s : Set α), μ s ≤ m s
state_after: α : Type u_1
m : Set α → ℝ≥0∞
μ : OuterMeasure α
⊢ ∀ (a : Set α), μ a ≤ ⨆ (_ : a.Nonempty), m a ↔ μ a ≤ m a
tactic: rw [boundedBy , le_ofFunction, forall_congr']
state_before: α : Type u_1
m : Set α → ℝ≥0∞
μ : OuterMeasure α
⊢ ∀ (a : Set α), μ a ≤ ⨆ (_ : a.Nonempty), m a ↔ μ a ≤ m a
state_after: α : Type u_1
m : Set α → ℝ≥0∞
μ : OuterMeasure α
s : Set α
⊢ μ s ≤ ⨆ (_ : s.Nonempty), m s ↔ μ s ≤ m s
tactic: intro s
state_before: α : Type u_1
m : Set α → ℝ≥0∞
μ : OuterMeasure α
s : Set α
⊢ μ s ≤ ⨆ (_ : s.Nonempty), m s ↔ μ s ≤ m s
state_after: no goals
tactic: rcases s.eq_empty_or_nonempty with h | h <;> simp [h, Set.not_nonempty_empty]
Theorem: Real.Angle.sign_antiperiodic
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

Proof steps:
state_before: θ : Angle
⊢ (θ + ↑π).sign = -θ.sign
state_after: no goals
tactic: rw [sign, sign, sin_add_pi, Left.sign_neg]
Theorem: CategoryTheory.MonoidalCategory.associator_inv_conjugation
File: Mathlib/CategoryTheory/Monoidal/Category.lean

Proof steps:
state_before: C✝ : Type u
𝒞 : Category.{v, u} C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : MonoidalCategory C
U V W X✝ Y✝ Z✝ X X' Y Y' Z Z' : C
f : X ⟶ X'
g : Y ⟶ Y'
h : Z ⟶ Z'
⊢ f ⊗ g ⊗ h = (α_ X Y Z).inv ≫ ((f ⊗ g) ⊗ h) ≫ (α_ X' Y' Z').hom
state_after: no goals
tactic: rw [associator_naturality, inv_hom_id_assoc]
Theorem: Nat.Primrec.prec1
File: Mathlib/Computability/Primrec.lean

Proof steps:
state_before: f : ℕ → ℕ
m : ℕ
hf : Nat.Primrec f
n : ℕ
⊢ unpaired (fun z n => Nat.rec m (fun y IH => f (unpair (Nat.pair z (Nat.pair y IH))).2) n) (Nat.pair 0 (id n)) =
    Nat.rec m (fun y IH => f (Nat.pair y IH)) n
state_after: no goals
tactic: simp
Theorem: CliffordAlgebra.foldl_algebraMap
File: Mathlib/LinearAlgebra/CliffordAlgebra/Fold.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
N : Type u_3
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : AddCommGroup N
inst✝¹ : Module R M
inst✝ : Module R N
Q : QuadraticForm R M
f : M →ₗ[R] N →ₗ[R] N
hf : ∀ (m : M) (x : N), (f m) ((f m) x) = Q m • x
n : N
r : R
⊢ ((foldl Q f hf) n) ((algebraMap R (CliffordAlgebra Q)) r) = r • n
state_after: no goals
tactic: rw [← foldr_reverse, reverse.commutes, foldr_algebraMap]
Theorem: Filter.countableGenerate_isGreatest
File: Mathlib/Order/Filter/CountableInter.lean

Proof steps:
state_before: ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
⊢ IsGreatest {f | CountableInterFilter f ∧ g ⊆ f.sets} (countableGenerate g)
state_after: ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
⊢ countableGenerate g ∈ upperBounds {f | CountableInterFilter f ∧ g ⊆ f.sets}
tactic: refine ⟨⟨inferInstance, fun s => CountableGenerateSets.basic⟩, ?_⟩
state_before: ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
⊢ countableGenerate g ∈ upperBounds {f | CountableInterFilter f ∧ g ⊆ f.sets}
state_after: case intro
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
f : Filter α
fct : CountableInterFilter f
hf : g ⊆ f.sets
⊢ f ≤ countableGenerate g
tactic: rintro f ⟨fct, hf⟩
state_before: case intro
ι : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
g : Set (Set α)
f : Filter α
fct : CountableInterFilter f
hf : g ⊆ f.sets
⊢ f ≤ countableGenerate g
state_after: no goals
tactic: rwa [@le_countableGenerate_iff_of_countableInterFilter _ _ _ fct]
Theorem: Complex.cos_surjective
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean

Proof steps:
state_before: ⊢ Function.Surjective cos
state_after: x : ℂ
⊢ ∃ a, cos a = x
tactic: intro x
state_before: x : ℂ
⊢ ∃ a, cos a = x
state_after: case intro.intro
x w : ℂ
w₀ : w ≠ 0
hw : 1 * w * w + -2 * x * w + 1 = 0
⊢ ∃ a, cos a = x
tactic: obtain ⟨w, w₀, hw⟩ : ∃ w ≠ 0, 1 * w * w + -2 * x * w + 1 = 0 := by
    rcases exists_quadratic_eq_zero one_ne_zero
        ⟨_, (cpow_nat_inv_pow _ two_ne_zero).symm.trans <| pow_two _⟩ with
      ⟨w, hw⟩
    refine ⟨w, ?_, hw⟩
    rintro rfl
    simp only [zero_add, one_ne_zero, mul_zero] at hw
state_before: case intro.intro
x w : ℂ
w₀ : w ≠ 0
hw : 1 * w * w + -2 * x * w + 1 = 0
⊢ ∃ a, cos a = x
state_after: case intro.intro
x w : ℂ
w₀ : w ≠ 0
hw : 1 * w * w + -2 * x * w + 1 = 0
⊢ cexp (log w / I * I) ^ 2 - 2 * x * cexp (log w / I * I) + 1 = 0
tactic: refine ⟨log w / I, cos_eq_iff_quadratic.2 ?_⟩
state_before: case intro.intro
x w : ℂ
w₀ : w ≠ 0
hw : 1 * w * w + -2 * x * w + 1 = 0
⊢ cexp (log w / I * I) ^ 2 - 2 * x * cexp (log w / I * I) + 1 = 0
state_after: case intro.intro
x w : ℂ
w₀ : w ≠ 0
hw : 1 * w * w + -2 * x * w + 1 = 0
⊢ w ^ 2 - 2 * x * w + 1 = 0
tactic: rw [div_mul_cancel₀ _ I_ne_zero, exp_log w₀]
state_before: case intro.intro
x w : ℂ
w₀ : w ≠ 0
hw : 1 * w * w + -2 * x * w + 1 = 0
⊢ w ^ 2 - 2 * x * w + 1 = 0
state_after: case h.e'_2
x w : ℂ
w₀ : w ≠ 0
hw : 1 * w * w + -2 * x * w + 1 = 0
⊢ w ^ 2 - 2 * x * w + 1 = 1 * w * w + -2 * x * w + 1
tactic: convert hw using 1
state_before: case h.e'_2
x w : ℂ
w₀ : w ≠ 0
hw : 1 * w * w + -2 * x * w + 1 = 0
⊢ w ^ 2 - 2 * x * w + 1 = 1 * w * w + -2 * x * w + 1
state_after: no goals
tactic: ring
Theorem: Real.sqrt_mul
File: Mathlib/Data/Real/Sqrt.lean

Proof steps:
state_before: x✝ y✝ x : ℝ
hx : 0 ≤ x
y : ℝ
⊢ √(x * y) = √x * √y
state_after: no goals
tactic: simp_rw [Real.sqrt, ← NNReal.coe_mul, NNReal.coe_inj, Real.toNNReal_mul hx, NNReal.sqrt_mul]
Theorem: set_fintype_card_eq_univ_iff
File: Mathlib/Data/Fintype/Card.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : Fintype α
s : Set α
inst✝ : Fintype ↑s
⊢ Fintype.card ↑s = Fintype.card α ↔ s = Set.univ
state_after: no goals
tactic: rw [← Set.toFinset_card, Finset.card_eq_iff_eq_univ, ← Set.toFinset_univ, Set.toFinset_inj]
Theorem: convex_parallelepiped
File: Mathlib/MeasureTheory/Measure/Haar/OfBasis.lean

Proof steps:
state_before: ι : Type u_1
ι' : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : Fintype ι
inst✝⁴ : Fintype ι'
inst✝³ : AddCommGroup E
inst✝² : Module ℝ E
inst✝¹ : AddCommGroup F
inst✝ : Module ℝ F
v : ι → E
⊢ Convex ℝ (parallelepiped v)
state_after: ι : Type u_1
ι' : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : Fintype ι
inst✝⁴ : Fintype ι'
inst✝³ : AddCommGroup E
inst✝² : Module ℝ E
inst✝¹ : AddCommGroup F
inst✝ : Module ℝ F
v : ι → E
⊢ Convex ℝ (∑ i : ι, segment ℝ 0 (v i))
tactic: rw [parallelepiped_eq_sum_segment]
state_before: ι : Type u_1
ι' : Type u_2
E : Type u_3
F : Type u_4
inst✝⁵ : Fintype ι
inst✝⁴ : Fintype ι'
inst✝³ : AddCommGroup E
inst✝² : Module ℝ E
inst✝¹ : AddCommGroup F
inst✝ : Module ℝ F
v : ι → E
⊢ Convex ℝ (∑ i : ι, segment ℝ 0 (v i))
state_after: no goals
tactic: exact convex_sum _ fun _i _hi => convex_segment _ _
Theorem: Filter.HasBasis.tendsto_iff
File: Mathlib/Order/Filter/Bases.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
la : Filter α
pa : ι → Prop
sa : ι → Set α
lb : Filter β
pb : ι' → Prop
sb : ι' → Set β
f : α → β
hla : la.HasBasis pa sa
hlb : lb.HasBasis pb sb
⊢ Tendsto f la lb ↔ ∀ (ib : ι'), pb ib → ∃ ia, pa ia ∧ ∀ x ∈ sa ia, f x ∈ sb ib
state_after: no goals
tactic: simp [hlb.tendsto_right_iff, hla.eventually_iff]
Theorem: Complex.comap_exp_nhdsWithin_zero
File: Mathlib/Analysis/SpecialFunctions/Exp.lean

Proof steps:
state_before: ⊢ comap cexp (𝓝[≠] 0) = comap re atBot
state_after: this : (cexp ⁻¹' {0})ᶜ = Set.univ
⊢ comap cexp (𝓝[≠] 0) = comap re atBot
tactic: have : (exp ⁻¹' {0})ᶜ = Set.univ := eq_univ_of_forall exp_ne_zero
state_before: this : (cexp ⁻¹' {0})ᶜ = Set.univ
⊢ comap cexp (𝓝[≠] 0) = comap re atBot
state_after: no goals
tactic: simp [nhdsWithin, comap_exp_nhds_zero, this]
Theorem: Group.sum_card_conj_classes_eq_card
File: Mathlib/GroupTheory/ClassEquation.lean

Proof steps:
state_before: G : Type u_1
inst✝¹ : Group G
inst✝ : Finite G
⊢ ∑ᶠ (x : ConjClasses G), x.carrier.ncard = Nat.card G
state_after: no goals
tactic: classical
  cases nonempty_fintype G
  rw [Nat.card_eq_fintype_card, ← sum_conjClasses_card_eq_card, finsum_eq_sum_of_fintype]
  simp [Set.ncard_eq_toFinset_card']
Theorem: MeasureTheory.ae_eq_restrict_iUnion_iff
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 α
inst✝ : Countable ι
s : ι → Set α
f g : α → δ
⊢ f =ᶠ[ae (μ.restrict (⋃ i, s i))] g ↔ ∀ (i : ι), f =ᶠ[ae (μ.restrict (s i))] g
state_after: no goals
tactic: simp_rw [EventuallyEq, ae_restrict_iUnion_eq, eventually_iSup]
Theorem: PythagoreanTriple.isPrimitiveClassified_of_coprime
File: Mathlib/NumberTheory/PythagoreanTriples.lean

Proof steps:
state_before: x y z : ℤ
h : PythagoreanTriple x y z
hc : x.gcd y = 1
⊢ h.IsPrimitiveClassified
state_after: case pos
x y z : ℤ
h : PythagoreanTriple x y z
hc : x.gcd y = 1
hz : 0 < z
⊢ h.IsPrimitiveClassified

case neg
x y z : ℤ
h : PythagoreanTriple x y z
hc : x.gcd y = 1
hz : ¬0 < z
⊢ h.IsPrimitiveClassified
tactic: by_cases hz : 0 < z
state_before: case neg
x y z : ℤ
h : PythagoreanTriple x y z
hc : x.gcd y = 1
hz : ¬0 < z
⊢ h.IsPrimitiveClassified
state_after: case neg
x y z : ℤ
h : PythagoreanTriple x y z
hc : x.gcd y = 1
hz : ¬0 < z
h' : PythagoreanTriple x y (-z)
⊢ h.IsPrimitiveClassified
tactic: have h' : PythagoreanTriple x y (-z) := by simpa [PythagoreanTriple, neg_mul_neg] using h.eq
state_before: case neg
x y z : ℤ
h : PythagoreanTriple x y z
hc : x.gcd y = 1
hz : ¬0 < z
h' : PythagoreanTriple x y (-z)
⊢ h.IsPrimitiveClassified
state_after: case neg
x y z : ℤ
h : PythagoreanTriple x y z
hc : x.gcd y = 1
hz : ¬0 < z
h' : PythagoreanTriple x y (-z)
⊢ 0 < -z
tactic: apply h'.isPrimitiveClassified_of_coprime_of_pos hc
state_before: case neg
x y z : ℤ
h : PythagoreanTriple x y z
hc : x.gcd y = 1
hz : ¬0 < z
h' : PythagoreanTriple x y (-z)
⊢ 0 < -z
state_after: x y z : ℤ
h : PythagoreanTriple x y z
hc : x.gcd y = 1
hz : ¬0 < z
h' : PythagoreanTriple x y (-z)
⊢ 0 ≤ -z
tactic: apply lt_of_le_of_ne _ (h'.ne_zero_of_coprime hc).symm
state_before: x y z : ℤ
h : PythagoreanTriple x y z
hc : x.gcd y = 1
hz : ¬0 < z
h' : PythagoreanTriple x y (-z)
⊢ 0 ≤ -z
state_after: no goals
tactic: exact le_neg.mp (not_lt.mp hz)
Theorem: Equiv.Perm.coe_subsingleton
File: Mathlib/Logic/Equiv/Defs.lean

Proof steps:
state_before: α✝ : Sort u
β : Sort v
γ : Sort w
α : Type u_1
inst✝ : Subsingleton α
e : Perm α
⊢ ⇑e = id
state_after: no goals
tactic: rw [Perm.subsingleton_eq_refl e, coe_refl]