ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Nat.sum_totient'
File: Mathlib/Data/Nat/Totient.lean

Proof steps:
state_before: n : ℕ
⊢ ∑ m ∈ filter (fun x => x ∣ n) (range n.succ), φ m = n
state_after: case h.e'_2
n : ℕ
⊢ ∑ m ∈ filter (fun x => x ∣ n) (range n.succ), φ m = n.divisors.sum φ
tactic: convert sum_totient _ using 1
state_before: case h.e'_2
n : ℕ
⊢ ∑ m ∈ filter (fun x => x ∣ n) (range n.succ), φ m = n.divisors.sum φ
state_after: case h.e'_2
n : ℕ
⊢ (∑ a ∈ Ico 0 n.succ, if a ∣ n then φ a else 0) = ∑ a ∈ Ico 1 (n + 1), if a ∣ n then φ a else 0
tactic: simp only [Nat.divisors, sum_filter, range_eq_Ico]
state_before: case h.e'_2
n : ℕ
⊢ (∑ a ∈ Ico 0 n.succ, if a ∣ n then φ a else 0) = ∑ a ∈ Ico 1 (n + 1), if a ∣ n then φ a else 0
state_after: no goals
tactic: rw [sum_eq_sum_Ico_succ_bot] <;> simp
Theorem: PEquiv.self_trans_symm
File: Mathlib/Data/PEquiv.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
δ : Type x
f : α ≃. β
⊢ f.trans f.symm = ofSet {a | (f a).isSome = true}
state_after: case h.a
α : Type u
β : Type v
γ : Type w
δ : Type x
f : α ≃. β
x✝ a✝ : α
⊢ a✝ ∈ (f.trans f.symm) x✝ ↔ a✝ ∈ (ofSet {a | (f a).isSome = true}) x✝
tactic: ext
state_before: case h.a
α : Type u
β : Type v
γ : Type w
δ : Type x
f : α ≃. β
x✝ a✝ : α
⊢ a✝ ∈ (f.trans f.symm) x✝ ↔ a✝ ∈ (ofSet {a | (f a).isSome = true}) x✝
state_after: case h.a
α : Type u
β : Type v
γ : Type w
δ : Type x
f : α ≃. β
x✝ a✝ : α
⊢ a✝ ∈ (f x✝).bind ⇑f.symm ↔ a✝ ∈ (ofSet {a | (f a).isSome = true}) x✝
tactic: dsimp [PEquiv.trans]
state_before: case h.a
α : Type u
β : Type v
γ : Type w
δ : Type x
f : α ≃. β
x✝ a✝ : α
⊢ a✝ ∈ (f x✝).bind ⇑f.symm ↔ a✝ ∈ (ofSet {a | (f a).isSome = true}) x✝
state_after: case h.a
α : Type u
β : Type v
γ : Type w
δ : Type x
f : α ≃. β
x✝ a✝ : α
⊢ (∃ a, f x✝ = some a ∧ f a✝ = some a) ↔ a✝ = x✝ ∧ a✝ ∈ {a | ∃ a_1, f a = some a_1}
tactic: simp only [eq_some_iff f, Option.isSome_iff_exists, Option.mem_def, bind_eq_some',
    ofSet_eq_some_iff]
state_before: case h.a
α : Type u
β : Type v
γ : Type w
δ : Type x
f : α ≃. β
x✝ a✝ : α
⊢ (∃ a, f x✝ = some a ∧ f a✝ = some a) ↔ a✝ = x✝ ∧ a✝ ∈ {a | ∃ a_1, f a = some a_1}
state_after: case h.a.mp
α : Type u
β : Type v
γ : Type w
δ : Type x
f : α ≃. β
x✝ a✝ : α
⊢ (∃ a, f x✝ = some a ∧ f a✝ = some a) → a✝ = x✝ ∧ a✝ ∈ {a | ∃ a_1, f a = some a_1}

case h.a.mpr
α : Type u
β : Type v
γ : Type w
δ : Type x
f : α ≃. β
x✝ a✝ : α
⊢ a✝ = x✝ ∧ a✝ ∈ {a | ∃ a_1, f a = some a_1} → ∃ a, f x✝ = some a ∧ f a✝ = some a
tactic: constructor
Theorem: Finsupp.degree_eq_zero_iff
File: Mathlib/Data/Finsupp/Weight.lean

Proof steps:
state_before: σ : Type u_1
M : Type u_2
w : σ → M
d : σ →₀ ℕ
⊢ d.degree = 0 ↔ d = 0
state_after: no goals
tactic: simp only [degree, Finset.sum_eq_zero_iff, Finsupp.mem_support_iff, ne_eq, Decidable.not_imp_self,
    DFunLike.ext_iff, Finsupp.coe_zero, Pi.zero_apply]
Theorem: Ordnode.Valid'.node4L_lemma₂
File: Mathlib/Data/Ordmap/Ordset.lean

Proof steps:
state_before: α : Type u_1
inst✝ : Preorder α
b c d : ℕ
mr₂ : b + c + 1 ≤ 3 * d
⊢ c ≤ 3 * d
state_after: no goals
tactic: omega
Theorem: CategoryTheory.Sieve.id_mem_iff_eq_top
File: Mathlib/CategoryTheory/Sites/Sieves.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
F : C ⥤ D
X Y✝ Z : C
f✝ : Y✝ ⟶ X
S R : Sieve X
h : S.arrows (𝟙 X)
Y : C
f : Y ⟶ X
x✝ : ⊤.arrows f
⊢ S.arrows f
state_after: no goals
tactic: simpa using downward_closed _ h f
Theorem: CoalgebraCat.toComonObj_counit
File: Mathlib/Algebra/Category/CoalgebraCat/ComonEquivalence.lean

Proof steps:
state_before: R : Type u
inst✝ : CommRing R
X : CoalgebraCat R
⊢ ModuleCat.ofHom Coalgebra.comul ≫ ModuleCat.ofHom Coalgebra.counit ▷ ModuleCat.of R ↑X.toModuleCat =
    (λ_ (ModuleCat.of R ↑X.toModuleCat)).inv
state_after: no goals
tactic: simpa only [ModuleCat.of_coe] using Coalgebra.rTensor_counit_comp_comul
state_before: R : Type u
inst✝ : CommRing R
X : CoalgebraCat R
⊢ ModuleCat.ofHom Coalgebra.comul ≫ ModuleCat.of R ↑X.toModuleCat ◁ ModuleCat.ofHom Coalgebra.counit =
    (ρ_ (ModuleCat.of R ↑X.toModuleCat)).inv
state_after: no goals
tactic: simpa only [ModuleCat.of_coe] using Coalgebra.lTensor_counit_comp_comul
state_before: R : Type u
inst✝ : CommRing R
X : CoalgebraCat R
⊢ ModuleCat.ofHom Coalgebra.comul ≫ ModuleCat.of R ↑X.toModuleCat ◁ ModuleCat.ofHom Coalgebra.comul =
    ModuleCat.ofHom Coalgebra.comul ≫
      ModuleCat.ofHom Coalgebra.comul ▷ ModuleCat.of R ↑X.toModuleCat ≫
        (α_ (ModuleCat.of R ↑X.toModuleCat) (ModuleCat.of R ↑X.toModuleCat) (ModuleCat.of R ↑X.toModuleCat)).hom
state_after: R : Type u
inst✝ : CommRing R
X : CoalgebraCat R
⊢ ModuleCat.ofHom Coalgebra.comul ≫ X.toModuleCat ◁ ModuleCat.ofHom Coalgebra.comul =
    ModuleCat.ofHom Coalgebra.comul ≫
      ModuleCat.ofHom Coalgebra.comul ▷ X.toModuleCat ≫ (α_ X.toModuleCat X.toModuleCat X.toModuleCat).hom
tactic: simp_rw [ModuleCat.of_coe]
state_before: R : Type u
inst✝ : CommRing R
X : CoalgebraCat R
⊢ ModuleCat.ofHom Coalgebra.comul ≫ X.toModuleCat ◁ ModuleCat.ofHom Coalgebra.comul =
    ModuleCat.ofHom Coalgebra.comul ≫
      ModuleCat.ofHom Coalgebra.comul ▷ X.toModuleCat ≫ (α_ X.toModuleCat X.toModuleCat X.toModuleCat).hom
state_after: no goals
tactic: exact Coalgebra.coassoc.symm
Theorem: Polynomial.natDegree_eq_reverse_natDegree_add_natTrailingDegree
File: Mathlib/Algebra/Polynomial/Reverse.lean

Proof steps:
state_before: R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
⊢ f.natDegree = f.reverse.natDegree + f.natTrailingDegree
state_after: case pos
R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
hf : f = 0
⊢ f.natDegree = f.reverse.natDegree + f.natTrailingDegree

case neg
R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
hf : ¬f = 0
⊢ f.natDegree = f.reverse.natDegree + f.natTrailingDegree
tactic: by_cases hf : f = 0
state_before: case neg
R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
hf : ¬f = 0
⊢ f.natDegree = f.reverse.natDegree + f.natTrailingDegree
state_after: case neg.a
R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
hf : ¬f = 0
⊢ f.natDegree ≤ f.reverse.natDegree + f.natTrailingDegree

case neg.a
R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
hf : ¬f = 0
⊢ f.reverse.natDegree + f.natTrailingDegree ≤ f.natDegree
tactic: apply le_antisymm
Theorem: Set.iUnion_range_eq_sUnion
File: Mathlib/Data/Set/Lattice.lean

Proof steps:
state_before: α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
α : Type u_11
β : Type u_12
C : Set (Set α)
f : (s : ↑C) → β → ↑↑s
hf : ∀ (s : ↑C), Surjective (f s)
⊢ (⋃ y, range fun s => ↑(f s y)) = ⋃₀ C
state_after: case h
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
α : Type u_11
β : Type u_12
C : Set (Set α)
f : (s : ↑C) → β → ↑↑s
hf : ∀ (s : ↑C), Surjective (f s)
x : α
⊢ (x ∈ ⋃ y, range fun s => ↑(f s y)) ↔ x ∈ ⋃₀ C
tactic: ext x
state_before: case h
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
α : Type u_11
β : Type u_12
C : Set (Set α)
f : (s : ↑C) → β → ↑↑s
hf : ∀ (s : ↑C), Surjective (f s)
x : α
⊢ (x ∈ ⋃ y, range fun s => ↑(f s y)) ↔ x ∈ ⋃₀ C
state_after: case h.mp
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
α : Type u_11
β : Type u_12
C : Set (Set α)
f : (s : ↑C) → β → ↑↑s
hf : ∀ (s : ↑C), Surjective (f s)
x : α
⊢ (x ∈ ⋃ y, range fun s => ↑(f s y)) → x ∈ ⋃₀ C

case h.mpr
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
α : Type u_11
β : Type u_12
C : Set (Set α)
f : (s : ↑C) → β → ↑↑s
hf : ∀ (s : ↑C), Surjective (f s)
x : α
⊢ x ∈ ⋃₀ C → x ∈ ⋃ y, range fun s => ↑(f s y)
tactic: constructor
Theorem: Polynomial.derivative_X_sub_C_sq
File: Mathlib/Algebra/Polynomial/Derivative.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : CommRing R
c : R
⊢ derivative ((X - C c) ^ 2) = C 2 * (X - C c)
state_after: no goals
tactic: rw [derivative_sq, derivative_X_sub_C, mul_one]
Theorem: Int.sub_floor_div_mul_lt
File: Mathlib/Algebra/Order/Floor.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : LinearOrderedRing α
inst✝² : FloorRing α
z : ℤ
a✝ : α
k : Type u_4
inst✝¹ : LinearOrderedField k
inst✝ : FloorRing k
b a : k
hb : 0 < b
⊢ a < b + ↑⌊a / b⌋ * b
state_after: F : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : LinearOrderedRing α
inst✝² : FloorRing α
z : ℤ
a✝ : α
k : Type u_4
inst✝¹ : LinearOrderedField k
inst✝ : FloorRing k
b a : k
hb : 0 < b
⊢ a / b < ↑⌊a / b⌋ + 1
tactic: rw [← one_add_mul _ b, ← div_lt_iff hb, add_comm]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
inst✝³ : LinearOrderedRing α
inst✝² : FloorRing α
z : ℤ
a✝ : α
k : Type u_4
inst✝¹ : LinearOrderedField k
inst✝ : FloorRing k
b a : k
hb : 0 < b
⊢ a / b < ↑⌊a / b⌋ + 1
state_after: no goals
tactic: exact lt_floor_add_one _
Theorem: integrableOn_rpow_mul_exp_neg_mul_rpow
File: Mathlib/Analysis/SpecialFunctions/Gaussian/GaussianIntegral.lean

Proof steps:
state_before: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ p)) (Ioi 0) volume
state_after: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ p)) (Ioi 0) volume
tactic: have hib : 0 < b ^ (-p⁻¹) := rpow_pos_of_pos hb _
state_before: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
⊢ IntegrableOn (fun x => x ^ s * rexp (-b * x ^ p)) (Ioi 0) volume
state_after: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
⊢ IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
tactic: suffices IntegrableOn (fun x ↦ (b ^ (-p⁻¹)) ^ s * (x ^ s * exp (-x ^ p))) (Ioi 0) by
    rw [show 0 = b ^ (-p⁻¹) * 0 by rw [mul_zero], ← integrableOn_Ioi_comp_mul_left_iff _ _ hib]
    refine this.congr_fun (fun _ hx => ?_) measurableSet_Ioi
    rw [← mul_assoc, mul_rpow, mul_rpow, ← rpow_mul (z := p), neg_mul, neg_mul, inv_mul_cancel,
      rpow_neg_one, mul_inv_cancel_left₀]
    all_goals linarith [mem_Ioi.mp hx]
state_before: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
⊢ IntegrableOn (fun x => (b ^ (-p⁻¹)) ^ s * (x ^ s * rexp (-x ^ p))) (Ioi 0) volume
state_after: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
⊢ Integrable (fun x => x ^ s * rexp (-x ^ p)) (volume.restrict (Ioi 0))
tactic: refine Integrable.const_mul ?_ _
state_before: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
⊢ Integrable (fun x => x ^ s * rexp (-x ^ p)) (volume.restrict (Ioi 0))
state_after: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
⊢ IntegrableOn (fun x => x ^ s * rexp (-x ^ p)) (Ioi 0) volume
tactic: rw [← IntegrableOn]
state_before: p s b : ℝ
hs : -1 < s
hp : 1 ≤ p
hb : 0 < b
hib : 0 < b ^ (-p⁻¹)
⊢ IntegrableOn (fun x => x ^ s * rexp (-x ^ p)) (Ioi 0) volume
state_after: no goals
tactic: exact integrableOn_rpow_mul_exp_neg_rpow hs hp
Theorem: Finset.prod_biUnion
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 : α → β
inst✝¹ : CommMonoid β
inst✝ : DecidableEq α
s : Finset γ
t : γ → Finset α
hs : (↑s).PairwiseDisjoint t
⊢ ∏ x ∈ s.biUnion t, f x = ∏ x ∈ s, ∏ i ∈ t x, f i
state_after: no goals
tactic: rw [← disjiUnion_eq_biUnion _ _ hs, prod_disjiUnion]
Theorem: DirectSum.fromAddMonoid_of
File: Mathlib/Algebra/DirectSum/Basic.lean

Proof steps:
state_before: ι : Type v
β : ι → Type w
inst✝² : (i : ι) → AddCommMonoid (β i)
inst✝¹ : DecidableEq ι
γ : Type u₁
inst✝ : AddCommMonoid γ
i : ι
f : γ →+ β i
⊢ fromAddMonoid ((of (fun i => γ →+ β i) i) f) = (of β i).comp f
state_after: ι : Type v
β : ι → Type w
inst✝² : (i : ι) → AddCommMonoid (β i)
inst✝¹ : DecidableEq ι
γ : Type u₁
inst✝ : AddCommMonoid γ
i : ι
f : γ →+ β i
⊢ (AddMonoidHom.compHom (of β i)) f = (of β i).comp f
tactic: rw [fromAddMonoid, toAddMonoid_of]
state_before: ι : Type v
β : ι → Type w
inst✝² : (i : ι) → AddCommMonoid (β i)
inst✝¹ : DecidableEq ι
γ : Type u₁
inst✝ : AddCommMonoid γ
i : ι
f : γ →+ β i
⊢ (AddMonoidHom.compHom (of β i)) f = (of β i).comp f
state_after: no goals
tactic: rfl
Theorem: PicardLindelof.FunSpace.dist_iterate_next_apply_le
File: Mathlib/Analysis/ODE/PicardLindelof.lean

Proof steps:
state_before: E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
v : PicardLindelof E
f : v.FunSpace
inst✝ : CompleteSpace E
f₁ f₂ : v.FunSpace
n : ℕ
t : ↑(Icc v.tMin v.tMax)
⊢ dist ((next^[n] f₁).toFun t) ((next^[n] f₂).toFun t) ≤ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * dist f₁ f₂
state_after: case zero
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
v : PicardLindelof E
f : v.FunSpace
inst✝ : CompleteSpace E
f₁ f₂ : v.FunSpace
t : ↑(Icc v.tMin v.tMax)
⊢ dist ((next^[0] f₁).toFun t) ((next^[0] f₂).toFun t) ≤ (↑v.L * |↑t - ↑v.t₀|) ^ 0 / ↑0! * dist f₁ f₂

case succ
E : Type u_1
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
v : PicardLindelof E
f : v.FunSpace
inst✝ : CompleteSpace E
f₁ f₂ : v.FunSpace
n : ℕ
ihn :
  ∀ (t : ↑(Icc v.tMin v.tMax)),
    dist ((next^[n] f₁).toFun t) ((next^[n] f₂).toFun t) ≤ (↑v.L * |↑t - ↑v.t₀|) ^ n / ↑n ! * dist f₁ f₂
t : ↑(Icc v.tMin v.tMax)
⊢ dist ((next^[n + 1] f₁).toFun t) ((next^[n + 1] f₂).toFun t) ≤
    (↑v.L * |↑t - ↑v.t₀|) ^ (n + 1) / ↑(n + 1)! * dist f₁ f₂
tactic: induction' n with n ihn generalizing t
Theorem: GenContFract.coe_of_s_rat_eq
File: Mathlib/Algebra/ContinuedFractions/Computation/TerminatesIffRat.lean

Proof steps:
state_before: K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
q : ℚ
v_eq_q : v = ↑q
n : ℕ
⊢ Stream'.Seq.map (Pair.map Rat.cast) (of q).s = (of v).s
state_after: case h.a
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
q : ℚ
v_eq_q : v = ↑q
n✝ n : ℕ
a✝ : Pair K
⊢ a✝ ∈ (Stream'.Seq.map (Pair.map Rat.cast) (of q).s).get? n ↔ a✝ ∈ (of v).s.get? n
tactic: ext n
state_before: case h.a
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
q : ℚ
v_eq_q : v = ↑q
n✝ n : ℕ
a✝ : Pair K
⊢ a✝ ∈ (Stream'.Seq.map (Pair.map Rat.cast) (of q).s).get? n ↔ a✝ ∈ (of v).s.get? n
state_after: case h.a
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
q : ℚ
v_eq_q : v = ↑q
n✝ n : ℕ
a✝ : Pair K
⊢ a✝ ∈ (Stream'.Seq.map (Pair.map Rat.cast) (of q).s).get? n ↔ a✝ ∈ Option.map (Pair.map Rat.cast) ((of q).s.get? n)
tactic: rw [← coe_of_s_get?_rat_eq v_eq_q]
state_before: case h.a
K : Type u_1
inst✝¹ : LinearOrderedField K
inst✝ : FloorRing K
v : K
q : ℚ
v_eq_q : v = ↑q
n✝ n : ℕ
a✝ : Pair K
⊢ a✝ ∈ (Stream'.Seq.map (Pair.map Rat.cast) (of q).s).get? n ↔ a✝ ∈ Option.map (Pair.map Rat.cast) ((of q).s.get? n)
state_after: no goals
tactic: rfl
Theorem: MeasureTheory.lintegral_dirac
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 α
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSingletonClass α
a : α
f : α → ℝ≥0∞
⊢ ∫⁻ (a : α), f a ∂dirac a = f a
state_after: no goals
tactic: simp [lintegral_congr_ae (ae_eq_dirac f)]
Theorem: EuclideanGeometry.cospherical_or_collinear_of_two_zsmul_oangle_eq
File: Mathlib/Geometry/Euclidean/Angle/Sphere.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₄ : P
h : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄
⊢ Cospherical {p₁, p₂, p₃, p₄} ∨ Collinear ℝ {p₁, p₂, p₃, p₄}
state_after: case pos
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₄ : P
h : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄
hc : Collinear ℝ {p₁, p₂, p₄}
⊢ Cospherical {p₁, p₂, p₃, p₄} ∨ Collinear ℝ {p₁, p₂, p₃, p₄}

case neg
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₄ : P
h : 2 • ∡ p₁ p₂ p₄ = 2 • ∡ p₁ p₃ p₄
hc : ¬Collinear ℝ {p₁, p₂, p₄}
⊢ Cospherical {p₁, p₂, p₃, p₄} ∨ Collinear ℝ {p₁, p₂, p₃, p₄}
tactic: by_cases hc : Collinear ℝ ({p₁, p₂, p₄} : Set P)
Theorem: Submodule.span_pow
File: Mathlib/Algebra/Algebra/Operations.lean

Proof steps:
state_before: ι : Sort uι
R : Type u
inst✝² : CommSemiring R
A : Type v
inst✝¹ : Semiring A
inst✝ : Algebra R A
S T : Set A
M N P Q : Submodule R A
m n : A
s : Set A
⊢ span R s ^ 0 = span R (s ^ 0)
state_after: no goals
tactic: rw [pow_zero, pow_zero, one_eq_span_one_set]
state_before: ι : Sort uι
R : Type u
inst✝² : CommSemiring R
A : Type v
inst✝¹ : Semiring A
inst✝ : Algebra R A
S T : Set A
M N P Q : Submodule R A
m n✝ : A
s : Set A
n : ℕ
⊢ span R s ^ (n + 1) = span R (s ^ (n + 1))
state_after: no goals
tactic: rw [pow_succ, pow_succ, span_pow s n, span_mul_span]
Theorem: MvPolynomial.coeff_homogeneousComponent
File: Mathlib/RingTheory/MvPolynomial/Homogeneous.lean

Proof steps:
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
inst✝¹ inst✝ : CommSemiring R
n : ℕ
φ ψ : MvPolynomial σ R
d : σ →₀ ℕ
⊢ coeff d ((homogeneousComponent n) φ) = if d.degree = n then coeff d φ else 0
state_after: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
inst✝¹ inst✝ : CommSemiring R
n : ℕ
φ ψ : MvPolynomial σ R
d : σ →₀ ℕ
⊢ coeff d ((homogeneousComponent n) φ) = if (weight 1) d = n then coeff d φ else 0
tactic: rw [degree_eq_weight_one]
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
inst✝¹ inst✝ : CommSemiring R
n : ℕ
φ ψ : MvPolynomial σ R
d : σ →₀ ℕ
⊢ coeff d ((homogeneousComponent n) φ) = if (weight 1) d = n then coeff d φ else 0
state_after: no goals
tactic: convert coeff_weightedHomogeneousComponent n φ d
Theorem: hammingDist_triangle_left
File: Mathlib/InformationTheory/Hamming.lean

Proof steps:
state_before: α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝² : Fintype ι
inst✝¹ : (i : ι) → DecidableEq (β i)
γ : ι → Type u_4
inst✝ : (i : ι) → DecidableEq (γ i)
x y z : (i : ι) → β i
⊢ hammingDist x y ≤ hammingDist z x + hammingDist z y
state_after: α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝² : Fintype ι
inst✝¹ : (i : ι) → DecidableEq (β i)
γ : ι → Type u_4
inst✝ : (i : ι) → DecidableEq (γ i)
x y z : (i : ι) → β i
⊢ hammingDist x y ≤ hammingDist x z + hammingDist z y
tactic: rw [hammingDist_comm z]
state_before: α : Type u_1
ι : Type u_2
β : ι → Type u_3
inst✝² : Fintype ι
inst✝¹ : (i : ι) → DecidableEq (β i)
γ : ι → Type u_4
inst✝ : (i : ι) → DecidableEq (γ i)
x y z : (i : ι) → β i
⊢ hammingDist x y ≤ hammingDist x z + hammingDist z y
state_after: no goals
tactic: exact hammingDist_triangle _ _ _
Theorem: MeasureTheory.Memℒp.smul_of_top_right
File: Mathlib/MeasureTheory/Function/LpSeminorm/CompareExp.lean

Proof steps:
state_before: 𝕜 : Type u_1
α : Type u_2
E : Type u_3
F : Type u_4
m : MeasurableSpace α
μ : Measure α
inst✝⁶ : NormedRing 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : MulActionWithZero 𝕜 E
inst✝³ : BoundedSMul 𝕜 E
inst✝² : NormedAddCommGroup F
inst✝¹ : MulActionWithZero 𝕜 F
inst✝ : BoundedSMul 𝕜 F
f✝ : α → E
p : ℝ≥0∞
f : α → E
φ : α → 𝕜
hf : Memℒp f p μ
hφ : Memℒp φ ⊤ μ
⊢ Memℒp (φ • f) p μ
state_after: 𝕜 : Type u_1
α : Type u_2
E : Type u_3
F : Type u_4
m : MeasurableSpace α
μ : Measure α
inst✝⁶ : NormedRing 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : MulActionWithZero 𝕜 E
inst✝³ : BoundedSMul 𝕜 E
inst✝² : NormedAddCommGroup F
inst✝¹ : MulActionWithZero 𝕜 F
inst✝ : BoundedSMul 𝕜 F
f✝ : α → E
p : ℝ≥0∞
f : α → E
φ : α → 𝕜
hf : Memℒp f p μ
hφ : Memℒp φ ⊤ μ
⊢ 1 / p = 1 / ⊤ + 1 / p
tactic: apply hf.smul hφ
state_before: 𝕜 : Type u_1
α : Type u_2
E : Type u_3
F : Type u_4
m : MeasurableSpace α
μ : Measure α
inst✝⁶ : NormedRing 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : MulActionWithZero 𝕜 E
inst✝³ : BoundedSMul 𝕜 E
inst✝² : NormedAddCommGroup F
inst✝¹ : MulActionWithZero 𝕜 F
inst✝ : BoundedSMul 𝕜 F
f✝ : α → E
p : ℝ≥0∞
f : α → E
φ : α → 𝕜
hf : Memℒp f p μ
hφ : Memℒp φ ⊤ μ
⊢ 1 / p = 1 / ⊤ + 1 / p
state_after: no goals
tactic: simp only [ENNReal.div_top, zero_add]
Theorem: nhdsWithin_inter'
File: Mathlib/Topology/ContinuousOn.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : TopologicalSpace α
a : α
s t : Set α
⊢ 𝓝[s ∩ t] a = 𝓝[s] a ⊓ 𝓟 t
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : TopologicalSpace α
a : α
s t : Set α
⊢ 𝓝 a ⊓ 𝓟 (s ∩ t) = 𝓝 a ⊓ 𝓟 s ⊓ 𝓟 t
tactic: delta nhdsWithin
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : TopologicalSpace α
a : α
s t : Set α
⊢ 𝓝 a ⊓ 𝓟 (s ∩ t) = 𝓝 a ⊓ 𝓟 s ⊓ 𝓟 t
state_after: no goals
tactic: rw [← inf_principal, inf_assoc]
Theorem: Num.gcd_to_nat
File: Mathlib/Data/Num/Lemmas.lean

Proof steps:
state_before: ⊢ ∀ (a b : Num), ↑(a.gcd b) = (↑a).gcd ↑b
state_after: this : ∀ (a b : Num), (a * b).natSize ≤ a.natSize + b.natSize
⊢ ∀ (a b : Num), ↑(a.gcd b) = (↑a).gcd ↑b
tactic: have : ∀ a b : Num, (a * b).natSize ≤ a.natSize + b.natSize := by
    intros
    simp only [natSize_to_nat, cast_mul]
    rw [Nat.size_le, pow_add]
    exact mul_lt_mul'' (Nat.lt_size_self _) (Nat.lt_size_self _) (Nat.zero_le _) (Nat.zero_le _)
state_before: this : ∀ (a b : Num), (a * b).natSize ≤ a.natSize + b.natSize
⊢ ∀ (a b : Num), ↑(a.gcd b) = (↑a).gcd ↑b
state_after: this : ∀ (a b : Num), (a * b).natSize ≤ a.natSize + b.natSize
a✝ b✝ : Num
⊢ ↑(a✝.gcd b✝) = (↑a✝).gcd ↑b✝
tactic: intros
state_before: this : ∀ (a b : Num), (a * b).natSize ≤ a.natSize + b.natSize
a✝ b✝ : Num
⊢ ↑(a✝.gcd b✝) = (↑a✝).gcd ↑b✝
state_after: this : ∀ (a b : Num), (a * b).natSize ≤ a.natSize + b.natSize
a✝ b✝ : Num
⊢ ↑(if a✝ ≤ b✝ then gcdAux (a✝.natSize + b✝.natSize) a✝ b✝ else gcdAux (b✝.natSize + a✝.natSize) b✝ a✝) = (↑a✝).gcd ↑b✝
tactic: unfold gcd
state_before: this : ∀ (a b : Num), (a * b).natSize ≤ a.natSize + b.natSize
a✝ b✝ : Num
⊢ ↑(if a✝ ≤ b✝ then gcdAux (a✝.natSize + b✝.natSize) a✝ b✝ else gcdAux (b✝.natSize + a✝.natSize) b✝ a✝) = (↑a✝).gcd ↑b✝
state_after: case pos
this : ∀ (a b : Num), (a * b).natSize ≤ a.natSize + b.natSize
a✝ b✝ : Num
h : a✝ ≤ b✝
⊢ ↑(gcdAux (a✝.natSize + b✝.natSize) a✝ b✝) = (↑a✝).gcd ↑b✝

case neg
this : ∀ (a b : Num), (a * b).natSize ≤ a.natSize + b.natSize
a✝ b✝ : Num
h : ¬a✝ ≤ b✝
⊢ ↑(gcdAux (b✝.natSize + a✝.natSize) b✝ a✝) = (↑a✝).gcd ↑b✝
tactic: split_ifs with h
Theorem: Fin.le_cons
File: Mathlib/Data/Fin/Tuple/Basic.lean

Proof steps:
state_before: m n : ℕ
α : Fin (n + 1) → Type u
x✝ : α 0
q✝ : (i : Fin (n + 1)) → α i
p✝ : (i : Fin n) → α i.succ
i : Fin n
y : α i.succ
z : α 0
inst✝ : (i : Fin (n + 1)) → Preorder (α i)
x : α 0
q : (i : Fin (n + 1)) → α i
p : (i : Fin n) → α i.succ
j : Fin n
⊢ q j.succ ≤ cons x p j.succ ↔ tail q j ≤ p j
state_after: no goals
tactic: simp [tail]