ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: IsClosed.hausdorffDist_zero_iff_eq
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

Proof steps:
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
hs : IsClosed s
ht : IsClosed t
fin : hausdorffEdist s t ≠ ⊤
⊢ hausdorffDist s t = 0 ↔ s = t
state_after: no goals
tactic: simp [← hausdorffEdist_zero_iff_eq_of_closed hs ht, hausdorffDist, ENNReal.toReal_eq_zero_iff,
    fin]
Theorem: Nat.prod_divisors_prime_pow
File: Mathlib/NumberTheory/Divisors.lean

Proof steps:
state_before: n : ℕ
α : Type u_1
inst✝ : CommMonoid α
k p : ℕ
f : ℕ → α
h : Prime p
⊢ ∏ x ∈ (p ^ k).divisors, f x = ∏ x ∈ range (k + 1), f (p ^ x)
state_after: no goals
tactic: simp [h, divisors_prime_pow]
Theorem: Multiset.le_prod_nonempty_of_submultiplicative
File: Mathlib/Algebra/Order/BigOperators/Group/Multiset.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : CommMonoid α
inst✝ : OrderedCommMonoid β
f : α → β
h_mul : ∀ (a b : α), f (a * b) ≤ f a * f b
s : Multiset α
hs_nonempty : s ≠ ∅
⊢ ∀ (a b : α), (fun x => True) a → (fun x => True) b → f (a * b) ≤ f a * f b
state_after: no goals
tactic: simp [h_mul]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : CommMonoid α
inst✝ : OrderedCommMonoid β
f : α → β
h_mul : ∀ (a b : α), f (a * b) ≤ f a * f b
s : Multiset α
hs_nonempty : s ≠ ∅
⊢ ∀ (a b : α), (fun x => True) a → (fun x => True) b → (fun x => True) (a * b)
state_after: no goals
tactic: simp
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : CommMonoid α
inst✝ : OrderedCommMonoid β
f : α → β
h_mul : ∀ (a b : α), f (a * b) ≤ f a * f b
s : Multiset α
hs_nonempty : s ≠ ∅
⊢ ∀ a ∈ s, (fun x => True) a
state_after: no goals
tactic: simp
Theorem: Nat.dist_tri_left'
File: Mathlib/Data/Nat/Dist.lean

Proof steps:
state_before: n m : ℕ
⊢ n ≤ n.dist m + m
state_after: n m : ℕ
⊢ n ≤ m.dist n + m
tactic: rw [dist_comm]
state_before: n m : ℕ
⊢ n ≤ m.dist n + m
state_after: no goals
tactic: apply dist_tri_left
Theorem: Function.const_le_const
File: Mathlib/Order/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝¹ : Preorder α
inst✝ : Nonempty β
a b : α
⊢ const β a ≤ const β b ↔ a ≤ b
state_after: no goals
tactic: simp [Pi.le_def]
Theorem: Nat.pow_sub_lt_descFactorial'
File: Mathlib/Data/Nat/Factorial/Basic.lean

Proof steps:
state_before: n : ℕ
h : 0 + 2 ≤ n
⊢ (n - (0 + 1)) ^ (0 + 2) < n.descFactorial (0 + 2)
state_after: n : ℕ
h : 0 + 2 ≤ n
⊢ (n - (0 + 1)) * (n - (0 + 1)) < (n - 1) * n
tactic: rw [descFactorial_succ, Nat.pow_succ, Nat.pow_one, descFactorial_one]
state_before: n : ℕ
h : 0 + 2 ≤ n
⊢ (n - (0 + 1)) * (n - (0 + 1)) < (n - 1) * n
state_after: no goals
tactic: exact Nat.mul_lt_mul_of_pos_left (by omega) (Nat.sub_pos_of_lt h)
state_before: n k : ℕ
h : k + 1 + 2 ≤ n
⊢ (n - (k + 1 + 1)) ^ (k + 1 + 2) < n.descFactorial (k + 1 + 2)
state_after: n k : ℕ
h : k + 1 + 2 ≤ n
⊢ (n - (k + 1 + 1)) * (n - (k + 1 + 1)) ^ (k + 2) < (n - (k + 2)) * n.descFactorial (k + 2)
tactic: rw [descFactorial_succ, Nat.pow_succ, Nat.mul_comm]
state_before: n k : ℕ
h : k + 1 + 2 ≤ n
⊢ (n - (k + 1 + 1)) * (n - (k + 1 + 1)) ^ (k + 2) < (n - (k + 2)) * n.descFactorial (k + 2)
state_after: n k : ℕ
h : k + 1 + 2 ≤ n
⊢ (n - (k + 1 + 1)) ^ (k + 2) < n.descFactorial (k + 2)
tactic: refine Nat.mul_lt_mul_of_pos_left ?_ (Nat.sub_pos_of_lt h)
state_before: n k : ℕ
h : k + 1 + 2 ≤ n
⊢ (n - (k + 1 + 1)) ^ (k + 2) < n.descFactorial (k + 2)
state_after: n k : ℕ
h : k + 1 + 2 ≤ n
⊢ (n.succ - (k + 1 + 1)) ^ (k + 2) < n.descFactorial (k + 2)
tactic: refine Nat.lt_of_le_of_lt (Nat.pow_le_pow_left (Nat.sub_le_sub_right n.le_succ _) _) ?_
state_before: n k : ℕ
h : k + 1 + 2 ≤ n
⊢ (n.succ - (k + 1 + 1)) ^ (k + 2) < n.descFactorial (k + 2)
state_after: n k : ℕ
h : k + 1 + 2 ≤ n
⊢ (n - (k + 1)) ^ (k + 2) < n.descFactorial (k + 2)
tactic: rw [succ_sub_succ]
state_before: n k : ℕ
h : k + 1 + 2 ≤ n
⊢ (n - (k + 1)) ^ (k + 2) < n.descFactorial (k + 2)
state_after: no goals
tactic: exact pow_sub_lt_descFactorial' (Nat.le_trans (le_succ _) h)
Theorem: YoungDiagram.pos_of_mem_rowLens
File: Mathlib/Combinatorics/Young/YoungDiagram.lean

Proof steps:
state_before: μ : YoungDiagram
x : ℕ
hx : x ∈ μ.rowLens
⊢ 0 < x
state_after: μ : YoungDiagram
x : ℕ
hx : ∃ a ∈ List.range (μ.colLen 0), μ.rowLen a = x
⊢ 0 < x
tactic: rw [rowLens, List.mem_map] at hx
state_before: μ : YoungDiagram
x : ℕ
hx : ∃ a ∈ List.range (μ.colLen 0), μ.rowLen a = x
⊢ 0 < x
state_after: case intro.intro
μ : YoungDiagram
i : ℕ
hi : i ∈ List.range (μ.colLen 0)
⊢ 0 < μ.rowLen i
tactic: obtain ⟨i, hi, rfl : μ.rowLen i = x⟩ := hx
state_before: case intro.intro
μ : YoungDiagram
i : ℕ
hi : i ∈ List.range (μ.colLen 0)
⊢ 0 < μ.rowLen i
state_after: no goals
tactic: rwa [List.mem_range, ← mem_iff_lt_colLen, mem_iff_lt_rowLen] at hi
Theorem: AlgebraicGeometry.LocallyRingedSpace.IsOpenImmersion.isoRestrict_inv_ofRestrict
File: Mathlib/Geometry/RingedSpace/OpenImmersion.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : LocallyRingedSpace
f : X ⟶ Y
H : IsOpenImmersion f
⊢ (isoRestrict f).inv ≫ f = Y.ofRestrict ⋯
state_after: no goals
tactic: simp only [← isoRestrict_hom_ofRestrict f, Iso.inv_hom_id_assoc]
Theorem: toIocDiv_add_zsmul
File: Mathlib/Algebra/Order/ToIntervalMod.lean

Proof steps:
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
m : ℤ
⊢ b + m • p - (toIocDiv hp a b + m) • p ∈ Set.Ioc a (a + p)
state_after: no goals
tactic: simpa only [add_smul, add_sub_add_right_eq_sub] using sub_toIocDiv_zsmul_mem_Ioc hp a b
Theorem: OreLocalization.smul_cancel
File: Mathlib/RingTheory/OreLocalization/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝² : Monoid R
S : Submonoid R
inst✝¹ : OreSet S
X : Type u_2
inst✝ : MulAction R X
r : X
s t : ↥S
⊢ (↑s /ₒ t) • (r /ₒ s) = r /ₒ t
state_after: no goals
tactic: simp [oreDiv_smul_char s.1 r t s 1 1 (by simp)]
Theorem: closedEmbedding_of_continuous_injective_closed
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
h₁ : Continuous f
h₂ : Injective f
h₃ : IsClosedMap f
⊢ ClosedEmbedding f
state_after: 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
h₁ : Continuous f
h₂ : Injective f
h₃ : IsClosedMap f
⊢ inst✝² = induced f inst✝¹
tactic: refine closedEmbedding_of_embedding_closed ⟨⟨?_⟩, h₂⟩ h₃
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
h₁ : Continuous f
h₂ : Injective f
h₃ : IsClosedMap f
⊢ inst✝² = induced f inst✝¹
state_after: 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
h₁ : Continuous f
h₂ : Injective f
h₃ : IsClosedMap f
s : Set X
hs : IsOpen s
⊢ IsOpen s
tactic: refine h₁.le_induced.antisymm fun s hs => ?_
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
h₁ : Continuous f
h₂ : Injective f
h₃ : IsClosedMap f
s : Set X
hs : IsOpen s
⊢ IsOpen s
state_after: 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
h₁ : Continuous f
h₂ : Injective f
h₃ : IsClosedMap f
s : Set X
hs : IsOpen s
⊢ f ⁻¹' (f '' sᶜ)ᶜ = s
tactic: refine ⟨(f '' sᶜ)ᶜ, (h₃ _ hs.isClosed_compl).isOpen_compl, ?_⟩
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
h₁ : Continuous f
h₂ : Injective f
h₃ : IsClosedMap f
s : Set X
hs : IsOpen s
⊢ f ⁻¹' (f '' sᶜ)ᶜ = s
state_after: no goals
tactic: rw [preimage_compl, preimage_image_eq _ h₂, compl_compl]
Theorem: Finset.subset_mulSpan
File: Mathlib/Combinatorics/Additive/Dissociation.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝³ : CommGroup α
inst✝² : CommGroup β
inst✝¹ : DecidableEq α
inst✝ : Fintype α
s t u : Finset α
a✝ : α
d : ℕ
a : α
ha : a ∈ s
b : α
⊢ Pi.single a 1 b = -1 ∨ Pi.single a 1 b = 0 ∨ Pi.single a 1 b = 1
state_after: no goals
tactic: obtain rfl | hab := eq_or_ne a b <;> simp [*]
state_before: α : Type u_1
β : Type u_2
inst✝³ : CommGroup α
inst✝² : CommGroup β
inst✝¹ : DecidableEq α
inst✝ : Fintype α
s t u : Finset α
a✝ : α
d : ℕ
a : α
ha : a ∈ s
⊢ ∏ a_1 ∈ s, a_1 ^ Pi.single a 1 a_1 = a
state_after: no goals
tactic: simp [Pi.single, Function.update, pow_ite, ha]
Theorem: PiLp.nndist_eq_of_L2
File: Mathlib/Analysis/Normed/Lp/PiLp.lean

Proof steps:
state_before: p : ℝ≥0∞
𝕜 : Type u_1
ι : Type u_2
α : ι → Type u_3
β✝ : ι → Type u_4
inst✝² : Fact (1 ≤ p)
inst✝¹ : Fintype ι
β : ι → Type u_5
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x y : PiLp 2 β
⊢ ↑(nndist x y) = ↑(NNReal.sqrt (∑ i : ι, nndist (x i) (y i) ^ 2))
state_after: p : ℝ≥0∞
𝕜 : Type u_1
ι : Type u_2
α : ι → Type u_3
β✝ : ι → Type u_4
inst✝² : Fact (1 ≤ p)
inst✝¹ : Fintype ι
β : ι → Type u_5
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x y : PiLp 2 β
⊢ dist x y = √(∑ x_1 : ι, dist (x x_1) (y x_1) ^ 2)
tactic: push_cast
state_before: p : ℝ≥0∞
𝕜 : Type u_1
ι : Type u_2
α : ι → Type u_3
β✝ : ι → Type u_4
inst✝² : Fact (1 ≤ p)
inst✝¹ : Fintype ι
β : ι → Type u_5
inst✝ : (i : ι) → SeminormedAddCommGroup (β i)
x y : PiLp 2 β
⊢ dist x y = √(∑ x_1 : ι, dist (x x_1) (y x_1) ^ 2)
state_after: no goals
tactic: exact dist_eq_of_L2 _ _
Theorem: Finset.extract_gcd'
File: Mathlib/Algebra/GCDMonoid/Finset.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f✝ f g : β → α
hs : ∃ x ∈ s, f x ≠ 0
hg : ∀ b ∈ s, f b = s.gcd f * g b
⊢ s.gcd f * s.gcd g = s.gcd f
state_after: no goals
tactic: conv_lhs => rw [← normalize_gcd, ← gcd_mul_left, ← gcd_congr rfl hg]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f✝ f g : β → α
hs : ∃ x ∈ s, f x ≠ 0
hg : ∀ b ∈ s, f b = s.gcd f * g b
⊢ ¬s.gcd f = 0
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f✝ f g : β → α
hg : ∀ b ∈ s, f b = s.gcd f * g b
hs : s.gcd f = 0
⊢ ∀ x ∈ s, f x = 0
tactic: contrapose! hs
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : NormalizedGCDMonoid α
s s₁ s₂ : Finset β
f✝ f g : β → α
hg : ∀ b ∈ s, f b = s.gcd f * g b
hs : s.gcd f = 0
⊢ ∀ x ∈ s, f x = 0
state_after: no goals
tactic: exact gcd_eq_zero_iff.1 hs
Theorem: Trivialization.continuousAt_of_comp_right
File: Mathlib/Topology/FiberBundle/Trivialization.lean

Proof steps:
state_before: ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace F
proj : Z → B
inst✝² : TopologicalSpace Z
inst✝¹ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x : Z
X : Type u_6
inst✝ : TopologicalSpace X
f : Z → X
z : Z
e : Trivialization F proj
he : proj z ∈ e.baseSet
hf : ContinuousAt (f ∘ ↑e.symm) (↑e z)
⊢ ContinuousAt f z
state_after: ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace F
proj : Z → B
inst✝² : TopologicalSpace Z
inst✝¹ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x : Z
X : Type u_6
inst✝ : TopologicalSpace X
f : Z → X
z : Z
e : Trivialization F proj
he : proj z ∈ e.baseSet
hf : ContinuousAt (f ∘ ↑e.symm) (↑e z)
hez : z ∈ e.symm.target
⊢ ContinuousAt f z
tactic: have hez : z ∈ e.toPartialEquiv.symm.target := by
    rw [PartialEquiv.symm_target, e.mem_source]
    exact he
state_before: ι : Type u_1
B : Type u_2
F : Type u_3
E : B → Type u_4
Z : Type u_5
inst✝⁴ : TopologicalSpace B
inst✝³ : TopologicalSpace F
proj : Z → B
inst✝² : TopologicalSpace Z
inst✝¹ : TopologicalSpace (TotalSpace F E)
e✝ : Trivialization F proj
x : Z
X : Type u_6
inst✝ : TopologicalSpace X
f : Z → X
z : Z
e : Trivialization F proj
he : proj z ∈ e.baseSet
hf : ContinuousAt (f ∘ ↑e.symm) (↑e z)
hez : z ∈ e.symm.target
⊢ ContinuousAt f z
state_after: no goals
tactic: rwa [e.toPartialHomeomorph.symm.continuousAt_iff_continuousAt_comp_right hez,
    PartialHomeomorph.symm_symm]
Theorem: Cardinal.isRegular_aleph_succ
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

Proof steps:
state_before: α : Type u_1
r : α → α → Prop
o : Ordinal.{u_2}
⊢ (aleph (succ o)).IsRegular
state_after: α : Type u_1
r : α → α → Prop
o : Ordinal.{u_2}
⊢ (succ (aleph o)).IsRegular
tactic: rw [aleph_succ]
state_before: α : Type u_1
r : α → α → Prop
o : Ordinal.{u_2}
⊢ (succ (aleph o)).IsRegular
state_after: no goals
tactic: exact isRegular_succ (aleph0_le_aleph o)
Theorem: Matrix.submatrix_updateColumn_equiv
File: Mathlib/Data/Matrix/RowCol.lean

Proof steps:
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
R : Type u_5
α : Type v
β : Type w
ι : Type u_6
M : Matrix m n α
i : m
j✝ : n
b : n → α
c✝ : m → α
inst✝¹ : DecidableEq o
inst✝ : DecidableEq n
A : Matrix m n α
j : n
c : m → α
e : l ≃ m
f : o ≃ n
⊢ (A.updateColumn j c).submatrix ⇑e ⇑f = (A.updateColumn (f (f.symm j)) fun i => c (e (e.symm i))).submatrix ⇑e ⇑f
state_after: no goals
tactic: simp_rw [Equiv.apply_symm_apply]
Theorem: Nat.eq_pow_of_factorization_eq_single
File: Mathlib/Data/Nat/Factorization/Basic.lean

Proof steps:
state_before: a b m n✝ p✝ n p k : ℕ
hn : n ≠ 0
h : n.factorization = single p k
⊢ n = p ^ k
state_after: a b m n✝ p✝ n p k : ℕ
hn : n ≠ 0
h : n.factorization = single p k
⊢ p ^ 0 = 1
tactic: rw [← Nat.factorization_prod_pow_eq_self hn, h, Finsupp.prod_single_index]
state_before: a b m n✝ p✝ n p k : ℕ
hn : n ≠ 0
h : n.factorization = single p k
⊢ p ^ 0 = 1
state_after: no goals
tactic: simp
Theorem: HasStrictFDerivAt.mem_implicitToPartialHomeomorphOfComplemented_target
File: Mathlib/Analysis/Calculus/Implicit.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝⁶ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : CompleteSpace E
F : Type u_3
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace 𝕜 F
inst✝ : CompleteSpace F
f : E → F
f' : E →L[𝕜] F
a : E
hf : HasStrictFDerivAt f f' a
hf' : range f' = ⊤
hker : (LinearMap.ker f').ClosedComplemented
⊢ (f a, 0) ∈ (implicitToPartialHomeomorphOfComplemented f f' hf hf' hker).target
state_after: no goals
tactic: simpa only [implicitToPartialHomeomorphOfComplemented_self] using
    (hf.implicitToPartialHomeomorphOfComplemented f f' hf' hker).map_source <|
      hf.mem_implicitToPartialHomeomorphOfComplemented_source hf' hker
Theorem: continuous_edist
File: Mathlib/Topology/Instances/ENNReal.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
⊢ Continuous fun p => edist p.1 p.2
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
⊢ ∀ (x y : α × α), edist x.1 x.2 ≤ edist y.1 y.2 + 2 * edist x y
tactic: apply continuous_of_le_add_edist 2 (by decide)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
⊢ ∀ (x y : α × α), edist x.1 x.2 ≤ edist y.1 y.2 + 2 * edist x y
state_after: case mk.mk
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
x y x' y' : α
⊢ edist (x, y).1 (x, y).2 ≤ edist (x', y').1 (x', y').2 + 2 * edist (x, y) (x', y')
tactic: rintro ⟨x, y⟩ ⟨x', y'⟩
state_before: case mk.mk
α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : PseudoEMetricSpace α
x y x' y' : α
⊢ edist (x, y).1 (x, y).2 ≤ edist (x', y').1 (x', y').2 + 2 * edist (x, y) (x', y')
state_after: no goals
tactic: calc
    edist x y ≤ edist x x' + edist x' y' + edist y' y := edist_triangle4 _ _ _ _
    _ = edist x' y' + (edist x x' + edist y y') := by simp only [edist_comm]; ac_rfl
    _ ≤ edist x' y' + (edist (x, y) (x', y') + edist (x, y) (x', y')) :=
      (add_le_add_left (add_le_add (le_max_left _ _) (le_max_right _ _)) _)
    _ = edist x' y' + 2 * edist (x, y) (x', y') := by rw [← mul_two, mul_comm]
Theorem: Nat.cast_div_charZero
File: Mathlib/Algebra/CharZero/Lemmas.lean

Proof steps:
state_before: R : Type u_1
inst✝³ : AddMonoidWithOne R
inst✝² : CharZero R
k : Type u_2
inst✝¹ : DivisionSemiring k
inst✝ : CharZero k
m n : ℕ
n_dvd : n ∣ m
⊢ ↑(m / n) = ↑m / ↑n
state_after: case inl
R : Type u_1
inst✝³ : AddMonoidWithOne R
inst✝² : CharZero R
k : Type u_2
inst✝¹ : DivisionSemiring k
inst✝ : CharZero k
m : ℕ
n_dvd : 0 ∣ m
⊢ ↑(m / 0) = ↑m / ↑0

case inr
R : Type u_1
inst✝³ : AddMonoidWithOne R
inst✝² : CharZero R
k : Type u_2
inst✝¹ : DivisionSemiring k
inst✝ : CharZero k
m n : ℕ
n_dvd : n ∣ m
hn : n ≠ 0
⊢ ↑(m / n) = ↑m / ↑n
tactic: rcases eq_or_ne n 0 with (rfl | hn)
Theorem: Set.pair_eq_pair_iff
File: Mathlib/Data/Set/Basic.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
x y z w : α
⊢ {x, y} = {z, w} ↔ x = z ∧ y = w ∨ x = w ∧ y = z
state_after: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
x y z w : α
⊢ ((x = z ∨ x = w) ∧ (y = z ∨ y = w)) ∧ (z = x ∨ z = y) ∧ (w = x ∨ w = y) ↔ x = z ∧ y = w ∨ x = w ∧ y = z
tactic: simp [subset_antisymm_iff, insert_subset_iff]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
x y z w : α
⊢ ((x = z ∨ x = w) ∧ (y = z ∨ y = w)) ∧ (z = x ∨ z = y) ∧ (w = x ∨ w = y) ↔ x = z ∧ y = w ∨ x = w ∧ y = z
state_after: no goals
tactic: aesop
Theorem: Polynomial.natDegree_mul_X
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

Proof steps:
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝¹ : Semiring R
inst✝ : Nontrivial R
p q : R[X]
n : ℕ
hp : p ≠ 0
⊢ (p * X).natDegree = p.natDegree + 1
state_after: no goals
tactic: rw [natDegree_mul' (by simpa), natDegree_X]
Theorem: CategoryTheory.Iso.hom_inv_id_triangle_hom₂
File: Mathlib/CategoryTheory/Triangulated/Basic.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasShift C ℤ
T₁ T₂ T₃ A B : Triangle C
e : A ≅ B
⊢ e.hom.hom₂ ≫ e.inv.hom₂ = 𝟙 A.obj₂
state_after: no goals
tactic: rw [← comp_hom₂, e.hom_inv_id, id_hom₂]
Theorem: ProbabilityTheory.gammaCDFReal_eq_integral
File: Mathlib/Probability/Distributions/Gamma.lean

Proof steps:
state_before: a r : ℝ
ha : 0 < a
hr : 0 < r
x : ℝ
⊢ ↑(gammaCDFReal a r) x = ∫ (x : ℝ) in Iic x, gammaPDFReal a r x
state_after: a r : ℝ
ha : 0 < a
hr : 0 < r
x : ℝ
this : IsProbabilityMeasure (gammaMeasure a r)
⊢ ↑(gammaCDFReal a r) x = ∫ (x : ℝ) in Iic x, gammaPDFReal a r x
tactic: have : IsProbabilityMeasure (gammaMeasure a r) := isProbabilityMeasureGamma ha hr
state_before: a r : ℝ
ha : 0 < a
hr : 0 < r
x : ℝ
this : IsProbabilityMeasure (gammaMeasure a r)
⊢ ↑(gammaCDFReal a r) x = ∫ (x : ℝ) in Iic x, gammaPDFReal a r x
state_after: a r : ℝ
ha : 0 < a
hr : 0 < r
x : ℝ
this : IsProbabilityMeasure (gammaMeasure a r)
⊢ (∫⁻ (a_1 : ℝ) in Iic x, gammaPDF a r a_1).toReal = ∫ (x : ℝ) in Iic x, gammaPDFReal a r x
tactic: rw [gammaCDFReal, cdf_eq_toReal, gammaMeasure, withDensity_apply _ measurableSet_Iic]
state_before: a r : ℝ
ha : 0 < a
hr : 0 < r
x : ℝ
this : IsProbabilityMeasure (gammaMeasure a r)
⊢ (∫⁻ (a_1 : ℝ) in Iic x, gammaPDF a r a_1).toReal = ∫ (x : ℝ) in Iic x, gammaPDFReal a r x
state_after: case refine_1
a r : ℝ
ha : 0 < a
hr : 0 < r
x : ℝ
this : IsProbabilityMeasure (gammaMeasure a r)
⊢ 0 ≤ᶠ[ae (ℙ.restrict (Iic x))] gammaPDFReal a r

case refine_2
a r : ℝ
ha : 0 < a
hr : 0 < r
x : ℝ
this : IsProbabilityMeasure (gammaMeasure a r)
⊢ AEStronglyMeasurable (gammaPDFReal a r) (ℙ.restrict (Iic x))
tactic: refine (integral_eq_lintegral_of_nonneg_ae ?_ ?_).symm
Theorem: AddCommGroup.equiv_directSum_zmod_of_finite
File: Mathlib/GroupTheory/FiniteAbelian.lean

Proof steps:
state_before: G : Type u
inst✝¹ : AddCommGroup G
inst✝ : Finite G
⊢ ∃ ι x p, ∃ (_ : ∀ (i : ι), Nat.Prime (p i)), ∃ e, Nonempty (G ≃+ ⨁ (i : ι), ZMod (p i ^ e i))
state_after: case intro
G : Type u
inst✝¹ : AddCommGroup G
inst✝ : Finite G
val✝ : Fintype G
⊢ ∃ ι x p, ∃ (_ : ∀ (i : ι), Nat.Prime (p i)), ∃ e, Nonempty (G ≃+ ⨁ (i : ι), ZMod (p i ^ e i))
tactic: cases nonempty_fintype G
state_before: case intro
G : Type u
inst✝¹ : AddCommGroup G
inst✝ : Finite G
val✝ : Fintype G
⊢ ∃ ι x p, ∃ (_ : ∀ (i : ι), Nat.Prime (p i)), ∃ e, Nonempty (G ≃+ ⨁ (i : ι), ZMod (p i ^ e i))
state_after: case intro.intro.intro.intro.intro.intro.intro.intro
G : Type u
inst✝¹ : AddCommGroup G
inst✝ : Finite G
val✝ : Fintype G
n : ℕ
ι : Type
fι : Fintype ι
p : ι → ℕ
hp : ∀ (i : ι), Nat.Prime (p i)
e : ι → ℕ
f : G ≃+ (Fin n →₀ ℤ) × ⨁ (i : ι), ZMod (p i ^ e i)
⊢ ∃ ι x p, ∃ (_ : ∀ (i : ι), Nat.Prime (p i)), ∃ e, Nonempty (G ≃+ ⨁ (i : ι), ZMod (p i ^ e i))
tactic: obtain ⟨n, ι, fι, p, hp, e, ⟨f⟩⟩ := equiv_free_prod_directSum_zmod G
state_before: case intro.intro.intro.intro.intro.intro.intro.intro
G : Type u
inst✝¹ : AddCommGroup G
inst✝ : Finite G
val✝ : Fintype G
n : ℕ
ι : Type
fι : Fintype ι
p : ι → ℕ
hp : ∀ (i : ι), Nat.Prime (p i)
e : ι → ℕ
f : G ≃+ (Fin n →₀ ℤ) × ⨁ (i : ι), ZMod (p i ^ e i)
⊢ ∃ ι x p, ∃ (_ : ∀ (i : ι), Nat.Prime (p i)), ∃ e, Nonempty (G ≃+ ⨁ (i : ι), ZMod (p i ^ e i))
state_after: case intro.intro.intro.intro.intro.intro.intro.intro.zero
G : Type u
inst✝¹ : AddCommGroup G
inst✝ : Finite G
val✝ : Fintype G
ι : Type
fι : Fintype ι
p : ι → ℕ
hp : ∀ (i : ι), Nat.Prime (p i)
e : ι → ℕ
f : G ≃+ (Fin 0 →₀ ℤ) × ⨁ (i : ι), ZMod (p i ^ e i)
⊢ ∃ ι x p, ∃ (_ : ∀ (i : ι), Nat.Prime (p i)), ∃ e, Nonempty (G ≃+ ⨁ (i : ι), ZMod (p i ^ e i))

case intro.intro.intro.intro.intro.intro.intro.intro.succ
G : Type u
inst✝¹ : AddCommGroup G
inst✝ : Finite G
val✝ : Fintype G
ι : Type
fι : Fintype ι
p : ι → ℕ
hp : ∀ (i : ι), Nat.Prime (p i)
e : ι → ℕ
n : ℕ
f : G ≃+ (Fin (n + 1) →₀ ℤ) × ⨁ (i : ι), ZMod (p i ^ e i)
⊢ ∃ ι x p, ∃ (_ : ∀ (i : ι), Nat.Prime (p i)), ∃ e, Nonempty (G ≃+ ⨁ (i : ι), ZMod (p i ^ e i))
tactic: cases' n with n
Theorem: MulAction.Quotient.mk_smul_out'
File: Mathlib/GroupTheory/GroupAction/Quotient.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
inst✝³ : Group α
inst✝² : Monoid β
inst✝¹ : MulAction β α
H : Subgroup α
inst✝ : QuotientAction β H
b : β
q : α ⧸ H
⊢ ↑(b • Quotient.out' q) = b • q
state_after: no goals
tactic: rw [← Quotient.smul_mk, QuotientGroup.out_eq']