tasksource/leandojo huggingface dataset:
Theorem: LinearMap.trace_conj'
File: Mathlib/LinearAlgebra/Trace.lean

tactic: rw [e.conj_apply, trace_comp_comm', ← comp_assoc, LinearEquiv.comp_coe,
  LinearEquiv.self_trans_symm, LinearEquiv.refl_toLinearMap, id_comp]
state_before: R : Type u_1
inst✝⁹ : CommRing R
M : Type u_2
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
N : Type u_3
inst✝⁶ : AddCommGroup N
inst✝⁵ : Module R N
ι : Type ?u.740490
inst✝⁴ : Module.Free R M
inst✝³ : Module.Finite R M
inst✝² : Module.Free R N
inst✝¹ : Module.Finite R N
inst✝ : Nontrivial R
f : M →ₗ[R] M
e : M ≃ₗ[R] N
⊢ ↑(trace R N) (↑(LinearEquiv.conj e) f) = ↑(trace R M) f
Theorem: MeasureTheory.IntegrableOn.continuousOn_smul
File: Mathlib/MeasureTheory/Function/LocallyIntegrable.lean

tactic: rw [IntegrableOn, ← integrable_norm_iff]
state_before: X : Type u_1
Y : Type ?u.2484781
E : Type u_3
R : Type ?u.2484787
inst✝⁹ : MeasurableSpace X
inst✝⁸ : TopologicalSpace X
inst✝⁷ : MeasurableSpace Y
inst✝⁶ : TopologicalSpace Y
inst✝⁵ : NormedAddCommGroup E
f✝ : X → E
μ : Measure X
s : Set X
inst✝⁴ : OpensMeasurableSpace X
A K : Set X
𝕜 : Type u_2
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : T2Space X
inst✝ : SecondCountableTopologyEither X 𝕜
g : X → E
hg : IntegrableOn g K
f : X → 𝕜
hf : ContinuousOn f K
hK : IsCompact K
⊢ IntegrableOn (fun x => f x • g x) K

tactic: simp_rw [norm_smul]
state_before: X : Type u_1
Y : Type ?u.2484781
E : Type u_3
R : Type ?u.2484787
inst✝⁹ : MeasurableSpace X
inst✝⁸ : TopologicalSpace X
inst✝⁷ : MeasurableSpace Y
inst✝⁶ : TopologicalSpace Y
inst✝⁵ : NormedAddCommGroup E
f✝ : X → E
μ : Measure X
s : Set X
inst✝⁴ : OpensMeasurableSpace X
A K : Set X
𝕜 : Type u_2
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : T2Space X
inst✝ : SecondCountableTopologyEither X 𝕜
g : X → E
hg : IntegrableOn g K
f : X → 𝕜
hf : ContinuousOn f K
hK : IsCompact K
⊢ Integrable fun a => ‖f a • g a‖

tactic: refine' IntegrableOn.continuousOn_mul _ hg.norm hK
state_before: X : Type u_1
Y : Type ?u.2484781
E : Type u_3
R : Type ?u.2484787
inst✝⁹ : MeasurableSpace X
inst✝⁸ : TopologicalSpace X
inst✝⁷ : MeasurableSpace Y
inst✝⁶ : TopologicalSpace Y
inst✝⁵ : NormedAddCommGroup E
f✝ : X → E
μ : Measure X
s : Set X
inst✝⁴ : OpensMeasurableSpace X
A K : Set X
𝕜 : Type u_2
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : T2Space X
inst✝ : SecondCountableTopologyEither X 𝕜
g : X → E
hg : IntegrableOn g K
f : X → 𝕜
hf : ContinuousOn f K
hK : IsCompact K
⊢ Integrable fun a => ‖f a‖ * ‖g a‖

tactic: exact continuous_norm.comp_continuousOn hf
state_before: X : Type u_1
Y : Type ?u.2484781
E : Type u_3
R : Type ?u.2484787
inst✝⁹ : MeasurableSpace X
inst✝⁸ : TopologicalSpace X
inst✝⁷ : MeasurableSpace Y
inst✝⁶ : TopologicalSpace Y
inst✝⁵ : NormedAddCommGroup E
f✝ : X → E
μ : Measure X
s : Set X
inst✝⁴ : OpensMeasurableSpace X
A K : Set X
𝕜 : Type u_2
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : T2Space X
inst✝ : SecondCountableTopologyEither X 𝕜
g : X → E
hg : IntegrableOn g K
f : X → 𝕜
hf : ContinuousOn f K
hK : IsCompact K
⊢ ContinuousOn (fun a => ‖f a‖) K

tactic: exact (hf.aestronglyMeasurable hK.measurableSet).smul hg.1
state_before: X : Type u_1
Y : Type ?u.2484781
E : Type u_3
R : Type ?u.2484787
inst✝⁹ : MeasurableSpace X
inst✝⁸ : TopologicalSpace X
inst✝⁷ : MeasurableSpace Y
inst✝⁶ : TopologicalSpace Y
inst✝⁵ : NormedAddCommGroup E
f✝ : X → E
μ : Measure X
s : Set X
inst✝⁴ : OpensMeasurableSpace X
A K : Set X
𝕜 : Type u_2
inst✝³ : NormedField 𝕜
inst✝² : NormedSpace 𝕜 E
inst✝¹ : T2Space X
inst✝ : SecondCountableTopologyEither X 𝕜
g : X → E
hg : IntegrableOn g K
f : X → 𝕜
hf : ContinuousOn f K
hK : IsCompact K
⊢ AEStronglyMeasurable (fun x => f x • g x) (Measure.restrict μ K)
Theorem: MeasureTheory.integrableOn_Ioi_deriv_of_nonpos
File: Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean

tactic: apply integrable_neg_iff.1
state_before: E : Type ?u.162446
f f' : ℝ → E
g g' : ℝ → ℝ
a b l : ℝ
m : E
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
hcont : ContinuousOn g (Ici a)
hderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x
g'neg : ∀ (x : ℝ), x ∈ Ioi a → g' x ≤ 0
hg : Tendsto g atTop (𝓝 l)
⊢ IntegrableOn g' (Ioi a)

tactic: exact integrableOn_Ioi_deriv_of_nonneg hcont.neg (fun x hx => (hderiv x hx).neg)
  (fun x hx => neg_nonneg_of_nonpos (g'neg x hx)) hg.neg
state_before: E : Type ?u.162446
f f' : ℝ → E
g g' : ℝ → ℝ
a b l : ℝ
m : E
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : CompleteSpace E
hcont : ContinuousOn g (Ici a)
hderiv : ∀ (x : ℝ), x ∈ Ioi a → HasDerivAt g (g' x) x
g'neg : ∀ (x : ℝ), x ∈ Ioi a → g' x ≤ 0
hg : Tendsto g atTop (𝓝 l)
⊢ Integrable (-g')
Theorem: Std.BinomialHeapImp.Heap.WellFormed.size_eq
File: Std/Data/BinomialHeap.lean

tactic: simp [size, Nat.shiftLeft, size_eq h₂, Nat.pow_succ, Nat.mul_succ]
state_before: α : Type u_1
le : α → α → Bool
n a✝³ : Nat
a✝² : α
a✝¹ : HeapNode α
a✝ : Heap α
left✝ : n ≤ a✝³
h₁ : HeapNode.WellFormed le a✝² a✝¹ a✝³
h₂ : WellFormed le (a✝³ + 1) a✝
⊢ size (cons a✝³ a✝² a✝¹ a✝) = realSize (cons a✝³ a✝² a✝¹ a✝)

tactic: simp [Nat.add_assoc, Nat.one_shiftLeft, h₁.realSize_eq, h₂.size_eq]
state_before: α : Type u_1
le : α → α → Bool
n a✝³ : Nat
a✝² : α
a✝¹ : HeapNode α
a✝ : Heap α
left✝ : n ≤ a✝³
h₁ : HeapNode.WellFormed le a✝² a✝¹ a✝³
h₂ : WellFormed le (a✝³ + 1) a✝
⊢ 2 ^ a✝³ + realSize a✝ = HeapNode.realSize a✝¹ + 1 + realSize a✝
Theorem: Stream'.Seq.join_cons_nil
File: Mathlib/Data/Seq/Seq.lean

tactic: simp [join]
state_before: α : Type u
β : Type v
γ : Type w
a : α
S : Seq (Seq1 α)
⊢ destruct (join (cons (a, nil) S)) = some (a, join S)
Theorem: MeasureTheory.snorm'_le_snorm'_of_exponent_le
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: have h_le_μ := snorm'_le_snorm'_mul_rpow_measure_univ hp0_lt hpq hf
state_before: α : Type u_1
E : Type u_2
F : Type ?u.4184586
G : Type ?u.4184589
m✝ m0 : MeasurableSpace α
p✝ : ℝ≥0∞
q✝ : ℝ
μ✝ ν : Measure α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedAddCommGroup G
m : MeasurableSpace α
p q : ℝ
hp0_lt : 0 < p
hpq : p ≤ q
μ : Measure α
inst✝ : IsProbabilityMeasure μ
f : α → E
hf : AEStronglyMeasurable f μ
⊢ snorm' f p μ ≤ snorm' f q μ

tactic: rwa [measure_univ, ENNReal.one_rpow, mul_one] at h_le_μ
state_before: α : Type u_1
E : Type u_2
F : Type ?u.4184586
G : Type ?u.4184589
m✝ m0 : MeasurableSpace α
p✝ : ℝ≥0∞
q✝ : ℝ
μ✝ ν : Measure α
inst✝³ : NormedAddCommGroup E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedAddCommGroup G
m : MeasurableSpace α
p q : ℝ
hp0_lt : 0 < p
hpq : p ≤ q
μ : Measure α
inst✝ : IsProbabilityMeasure μ
f : α → E
hf : AEStronglyMeasurable f μ
h_le_μ : snorm' f p μ ≤ snorm' f q μ * ↑↑μ Set.univ ^ (1 / p - 1 / q)
⊢ snorm' f p μ ≤ snorm' f q μ
Theorem: Asymptotics.IsEquivalent.div
File: Mathlib/Analysis/Asymptotics/AsymptoticEquivalent.lean

tactic: simpa only [div_eq_mul_inv] using htu.mul hvw.inv
state_before: α : Type u_1
β : Type u_2
inst✝ : NormedField β
t u v w : α → β
l : Filter α
htu : t ~[l] u
hvw : v ~[l] w
⊢ (fun x => t x / v x) ~[l] fun x => u x / w x
Theorem: Complex.cos_eq
File: Mathlib/Data/Complex/Exponential.lean

tactic: convert cos_add_mul_I z.re z.im
state_before: x y z : ℂ
⊢ cos z = cos ↑z.re * cosh ↑z.im - sin ↑z.re * sinh ↑z.im * I

tactic: exact (re_add_im z).symm
state_before: case h.e'_2.h.e'_1
x y z : ℂ
⊢ z = ↑z.re + ↑z.im * I
Theorem: Polynomial.eval₂_X
File: Mathlib/Data/Polynomial/Eval.lean

tactic: simp [eval₂_eq_sum]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q r : R[X]
inst✝ : Semiring S
f : R →+* S
x : S
⊢ eval₂ f x X = x
Theorem: Real.rpow_sub'
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: simp only [sub_eq_add_neg] at h⊢
state_before: x✝ y✝ z✝ x : ℝ
hx : 0 ≤ x
y z : ℝ
h : y - z ≠ 0
⊢ x ^ (y - z) = x ^ y / x ^ z

tactic: simp only [rpow_add' hx h, rpow_neg hx, div_eq_mul_inv]
state_before: x✝ y✝ z✝ x : ℝ
hx : 0 ≤ x
y z : ℝ
h : y + -z ≠ 0
⊢ x ^ (y + -z) = x ^ y / x ^ z
Theorem: HasDerivAt.clm_comp
File: Mathlib/Analysis/Calculus/Deriv/Mul.lean

tactic: rw [← hasDerivWithinAt_univ] at *
state_before: 𝕜 : Type u
inst✝⁶ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
E : Type w
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
G : Type u_1
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
c : 𝕜 → F →L[𝕜] G
c' : F →L[𝕜] G
d : 𝕜 → E →L[𝕜] F
d' : E →L[𝕜] F
u : 𝕜 → F
u' : F
hc : HasDerivAt c c' x
hd : HasDerivAt d d' x
⊢ HasDerivAt (fun y => comp (c y) (d y)) (comp c' (d x) + comp (c x) d') x

tactic: exact hc.clm_comp hd
state_before: 𝕜 : Type u
inst✝⁶ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
E : Type w
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
G : Type u_1
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
c : 𝕜 → F →L[𝕜] G
c' : F →L[𝕜] G
d : 𝕜 → E →L[𝕜] F
d' : E →L[𝕜] F
u : 𝕜 → F
u' : F
hc : HasDerivWithinAt c c' univ x
hd : HasDerivWithinAt d d' univ x
⊢ HasDerivWithinAt (fun y => comp (c y) (d y)) (comp c' (d x) + comp (c x) d') univ x
Theorem: LocalizedModule.smul_zero'
File: Mathlib/Algebra/Module/LocalizedModule.lean

tactic: induction' x using Localization.induction_on with data
state_before: R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
x : Localization S
⊢ x • 0 = 0

tactic: rcases data with ⟨r, s⟩
state_before: case H
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
data : R × { x // x ∈ S }
⊢ Localization.mk data.fst data.snd • 0 = 0

tactic: rw [← zero_mk s, mk_smul_mk, smul_zero, zero_mk, zero_mk]
state_before: case H.mk
R : Type u
inst✝² : CommSemiring R
S : Submonoid R
M : Type v
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
r : R
s : { x // x ∈ S }
⊢ Localization.mk (r, s).fst (r, s).snd • 0 = 0
Theorem: tsub_div
File: Mathlib/Algebra/Order/Field/Canonical/Basic.lean

tactic: simp_rw [div_eq_mul_inv, tsub_mul]
state_before: α : Type u_1
inst✝² : CanonicallyLinearOrderedSemifield α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c : α
⊢ (a - b) / c = a / c - b / c
Theorem: CategoryTheory.Limits.PullbackCone.unop_inl
File: Mathlib/CategoryTheory/Limits/Opposites.lean

tactic: aesop_cat
state_before: C : Type u₁
inst✝¹ : Category C
J : Type u₂
inst✝ : Category J
X✝ : Type v₂
X Y Z : Cᵒᵖ
f : X ⟶ Z
g : Y ⟶ Z
c : PullbackCone f g
⊢ PushoutCocone.inl (unop c) = (fst c).unop
Theorem: Multiset.card_erase_eq_ite
File: Mathlib/Data/Multiset/Basic.lean

tactic: by_cases h : a ∈ s
state_before: α : Type u_1
β : Type ?u.109096
γ : Type ?u.109099
inst✝ : DecidableEq α
s✝ t : Multiset α
a✝ b a : α
s : Multiset α
⊢ ↑card (erase s a) = if a ∈ s then pred (↑card s) else ↑card s

tactic: rwa [card_erase_of_mem h, if_pos]
state_before: case pos
α : Type u_1
β : Type ?u.109096
γ : Type ?u.109099
inst✝ : DecidableEq α
s✝ t : Multiset α
a✝ b a : α
s : Multiset α
h : a ∈ s
⊢ ↑card (erase s a) = if a ∈ s then pred (↑card s) else ↑card s

tactic: rwa [erase_of_not_mem h, if_neg]
state_before: case neg
α : Type u_1
β : Type ?u.109096
γ : Type ?u.109099
inst✝ : DecidableEq α
s✝ t : Multiset α
a✝ b a : α
s : Multiset α
h : ¬a ∈ s
⊢ ↑card (erase s a) = if a ∈ s then pred (↑card s) else ↑card s
Theorem: Int.neg_add_cancel_right
File: Std/Data/Int/Lemmas.lean

tactic: rw [Int.add_assoc, Int.add_left_neg, Int.add_zero]
state_before: a b : Int
⊢ a + -b + b = a
Theorem: Filter.mem_comap_iff_compl
File: Mathlib/Order/Filter/Basic.lean

tactic: simp only [mem_comap', compl_def, mem_image, mem_setOf_eq, not_exists, not_and', not_not]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type ?u.226876
ι : Sort x
f : α → β
l : Filter β
p : α → Prop
s : Set α
⊢ s ∈ comap f l ↔ (f '' sᶜ)ᶜ ∈ l
Theorem: Int.add_emod_eq_add_mod_right
File: Mathlib/Data/Int/Order/Basic.lean

tactic: rw [← emod_add_emod, ← emod_add_emod k, H]
state_before: a b : ℤ
n✝ : ℕ
m n k i : ℤ
H : m % n = k % n
⊢ (m + i) % n = (k + i) % n
Theorem: Finset.image₂_inter_left
File: Mathlib/Data/Finset/NAry.lean

tactic: push_cast
state_before: α : Type u_1
α' : Type ?u.39933
β : Type u_2
β' : Type ?u.39939
γ : Type u_3
γ' : Type ?u.39945
δ : Type ?u.39948
δ' : Type ?u.39951
ε : Type ?u.39954
ε' : Type ?u.39957
ζ : Type ?u.39960
ζ' : Type ?u.39963
ν : Type ?u.39966
inst✝⁸ : DecidableEq α'
inst✝⁷ : DecidableEq β'
inst✝⁶ : DecidableEq γ
inst✝⁵ : DecidableEq γ'
inst✝⁴ : DecidableEq δ
inst✝³ : DecidableEq δ'
inst✝² : DecidableEq ε
inst✝¹ : DecidableEq ε'
f f' : α → β → γ
g g' : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
inst✝ : DecidableEq α
hf : Injective2 f
⊢ ↑(image₂ f (s ∩ s') t) = ↑(image₂ f s t ∩ image₂ f s' t)

tactic: exact image2_inter_left hf
state_before: α : Type u_1
α' : Type ?u.39933
β : Type u_2
β' : Type ?u.39939
γ : Type u_3
γ' : Type ?u.39945
δ : Type ?u.39948
δ' : Type ?u.39951
ε : Type ?u.39954
ε' : Type ?u.39957
ζ : Type ?u.39960
ζ' : Type ?u.39963
ν : Type ?u.39966
inst✝⁸ : DecidableEq α'
inst✝⁷ : DecidableEq β'
inst✝⁶ : DecidableEq γ
inst✝⁵ : DecidableEq γ'
inst✝⁴ : DecidableEq δ
inst✝³ : DecidableEq δ'
inst✝² : DecidableEq ε
inst✝¹ : DecidableEq ε'
f f' : α → β → γ
g g' : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
inst✝ : DecidableEq α
hf : Injective2 f
⊢ image2 f (↑s ∩ ↑s') ↑t = image2 f ↑s ↑t ∩ image2 f ↑s' ↑t
Theorem: MeasureTheory.measure_compl
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [compl_eq_univ_diff]
state_before: α : Type u_1
β : Type ?u.30071
γ : Type ?u.30074
δ : Type ?u.30077
ι : Type ?u.30080
R : Type ?u.30083
R' : Type ?u.30086
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁ s₂ t : Set α
h₁ : MeasurableSet s
h_fin : ↑↑μ s ≠ ⊤
⊢ ↑↑μ (sᶜ) = ↑↑μ univ - ↑↑μ s

tactic: exact measure_diff (subset_univ s) h₁ h_fin
state_before: α : Type u_1
β : Type ?u.30071
γ : Type ?u.30074
δ : Type ?u.30077
ι : Type ?u.30080
R : Type ?u.30083
R' : Type ?u.30086
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁ s₂ t : Set α
h₁ : MeasurableSet s
h_fin : ↑↑μ s ≠ ⊤
⊢ ↑↑μ (univ \ s) = ↑↑μ univ - ↑↑μ s
Theorem: MeasureTheory.snorm'_exponent_zero
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: rw [snorm', _root_.div_zero, ENNReal.rpow_zero]
state_before: α : Type u_1
E : Type ?u.909486
F : Type u_2
G : Type ?u.909492
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
⊢ snorm' f 0 μ = 1
Theorem: Polynomial.coeff_reverse
File: Mathlib/Data/Polynomial/Reverse.lean

tactic: rw [reverse, coeff_reflect]
state_before: R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
n : ℕ
⊢ coeff (reverse f) n = coeff f (↑(revAt (natDegree f)) n)
Theorem: Mathlib.Meta.NormNum.isRat_ratCast
File: Mathlib/Tactic/NormNum/Basic.lean

tactic: norm_cast
state_before: R : Type u_1
inst✝¹ : DivisionRing R
inst✝ : CharZero R
num✝ : ℤ
denom✝ : ℕ
qi : ℚ
invOf_mul_self✝ : qi * ↑denom✝ = 1
mul_invOf_self✝ : ↑denom✝ * qi = 1
⊢ ↑qi * ↑denom✝ = 1

tactic: norm_cast
state_before: R : Type u_1
inst✝¹ : DivisionRing R
inst✝ : CharZero R
num✝ : ℤ
denom✝ : ℕ
qi : ℚ
invOf_mul_self✝ : qi * ↑denom✝ = 1
mul_invOf_self✝ : ↑denom✝ * qi = 1
⊢ ↑denom✝ * ↑qi = 1

tactic: simp only []
state_before: R : Type u_1
inst✝¹ : DivisionRing R
inst✝ : CharZero R
num✝ : ℤ
denom✝ : ℕ
qi : ℚ
invOf_mul_self✝ : qi * ↑denom✝ = 1
mul_invOf_self✝ : ↑denom✝ * qi = 1
⊢ ↑(↑num✝ * ⅟↑denom✝) = ↑num✝ * ⅟↑denom✝

tactic: norm_cast
state_before: R : Type u_1
inst✝¹ : DivisionRing R
inst✝ : CharZero R
num✝ : ℤ
denom✝ : ℕ
qi : ℚ
invOf_mul_self✝ : qi * ↑denom✝ = 1
mul_invOf_self✝ : ↑denom✝ * qi = 1
⊢ ↑(↑num✝ * qi) = ↑num✝ * ↑qi
Theorem: sdiff_sup_self'
File: Mathlib/Order/BooleanAlgebra.lean

tactic: rw [sup_inf_self]
state_before: α : Type u
β : Type ?u.3131
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ y \ x ⊔ x = y \ x ⊔ (x ⊔ x ⊓ y)

tactic: ac_rfl
state_before: α : Type u
β : Type ?u.3131
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ y \ x ⊔ (x ⊔ x ⊓ y) = y ⊓ x ⊔ y \ x ⊔ x

tactic: rw [sup_inf_sdiff]
state_before: α : Type u
β : Type ?u.3131
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ y ⊓ x ⊔ y \ x ⊔ x = y ⊔ x
Theorem: Mathlib.Tactic.Ring.zero_pow
File: Mathlib/Tactic/Ring/Basic.lean

tactic: simp [pow_succ]
state_before: u : Lean.Level
R : Type u_1
α : Q(Type u)
sα : Q(CommSemiring «$α»)
inst✝ : CommSemiring R
b✝ b : ℕ
x✝ : 0 < b + 1
⊢ 0 ^ (b + 1) = 0
Theorem: Complex.norm_rat
File: Mathlib/Analysis/Complex/Basic.lean

tactic: rw [← ofReal_rat_cast]
state_before: E : Type ?u.188465
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
r : ℚ
⊢ ‖↑r‖ = Abs.abs ↑r

tactic: exact norm_real _
state_before: E : Type ?u.188465
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
r : ℚ
⊢ ‖↑↑r‖ = Abs.abs ↑r
Theorem: ack_succ_succ
File: Mathlib/Computability/Ackermann.lean

tactic: rw [ack]
state_before: m n : ℕ
⊢ ack (m + 1) (n + 1) = ack m (ack (m + 1) n)
Theorem: PEquiv.toMatrix_trans
File: Mathlib/Data/Matrix/PEquiv.lean

tactic: ext (i j)
state_before: k : Type ?u.18057
l : Type u_3
m : Type u_1
n : Type u_2
α : Type v
inst✝³ : Fintype m
inst✝² : DecidableEq m
inst✝¹ : DecidableEq n
inst✝ : Semiring α
f : l ≃. m
g : m ≃. n
⊢ toMatrix (PEquiv.trans f g) = toMatrix f ⬝ toMatrix g

tactic: rw [mul_matrix_apply]
state_before: case a.h
k : Type ?u.18057
l : Type u_3
m : Type u_1
n : Type u_2
α : Type v
inst✝³ : Fintype m
inst✝² : DecidableEq m
inst✝¹ : DecidableEq n
inst✝ : Semiring α
f : l ≃. m
g : m ≃. n
i : l
j : n
⊢ toMatrix (PEquiv.trans f g) i j = (toMatrix f ⬝ toMatrix g) i j

tactic: dsimp [toMatrix, PEquiv.trans]
state_before: case a.h
k : Type ?u.18057
l : Type u_3
m : Type u_1
n : Type u_2
α : Type v
inst✝³ : Fintype m
inst✝² : DecidableEq m
inst✝¹ : DecidableEq n
inst✝ : Semiring α
f : l ≃. m
g : m ≃. n
i : l
j : n
⊢ toMatrix (PEquiv.trans f g) i j = Option.casesOn (↑f i) 0 fun fi => toMatrix g fi j

tactic: cases f i <;> simp
state_before: case a.h
k : Type ?u.18057
l : Type u_3
m : Type u_1
n : Type u_2
α : Type v
inst✝³ : Fintype m
inst✝² : DecidableEq m
inst✝¹ : DecidableEq n
inst✝ : Semiring α
f : l ≃. m
g : m ≃. n
i : l
j : n
⊢ (if j ∈ Option.bind (↑f i) ↑g then 1 else 0) = Option.rec 0 (fun val => if j ∈ ↑g val then 1 else 0) (↑f i)
Theorem: IntermediateField.bot_toSubalgebra
File: Mathlib/FieldTheory/Adjoin.lean

tactic: ext
state_before: F : Type u_2
inst✝² : Field F
E : Type u_1
inst✝¹ : Field E
inst✝ : Algebra F E
⊢ ⊥.toSubalgebra = ⊥

tactic: rw [mem_toSubalgebra, Algebra.mem_bot, mem_bot]
state_before: case h
F : Type u_2
inst✝² : Field F
E : Type u_1
inst✝¹ : Field E
inst✝ : Algebra F E
x✝ : E
⊢ x✝ ∈ ⊥.toSubalgebra ↔ x✝ ∈ ⊥
Theorem: Equiv.Perm.cycleFactorsFinset_eq_singleton_iff
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: suffices f = g → (g.IsCycle ↔ f.IsCycle) by
  rw [cycleFactorsFinset_eq_finset]
  simpa [eq_comm]
state_before: ι : Type ?u.2753358
α : Type u_1
β : Type ?u.2753364
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ f g : Perm α
⊢ cycleFactorsFinset f = {g} ↔ IsCycle f ∧ f = g

tactic: rintro rfl
state_before: ι : Type ?u.2753358
α : Type u_1
β : Type ?u.2753364
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ f g : Perm α
⊢ f = g → (IsCycle g ↔ IsCycle f)

tactic: exact Iff.rfl
state_before: ι : Type ?u.2753358
α : Type u_1
β : Type ?u.2753364
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ f : Perm α
⊢ IsCycle f ↔ IsCycle f

tactic: rw [cycleFactorsFinset_eq_finset]
state_before: ι : Type ?u.2753358
α : Type u_1
β : Type ?u.2753364
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ f g : Perm α
this : f = g → (IsCycle g ↔ IsCycle f)
⊢ cycleFactorsFinset f = {g} ↔ IsCycle f ∧ f = g

tactic: simpa [eq_comm]
state_before: ι : Type ?u.2753358
α : Type u_1
β : Type ?u.2753364
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ f g : Perm α
this : f = g → (IsCycle g ↔ IsCycle f)
⊢ ((∀ (f : Perm α), f ∈ {g} → IsCycle f) ∧
      ∃ h, noncommProd {g} id (_ : Set.Pairwise ↑{g} fun a b => _root_.Commute (id a) (id b)) = f) ↔
    IsCycle f ∧ f = g
Theorem: Complex.cosh_add_aux
File: Mathlib/Data/Complex/Exponential.lean

tactic: ring
state_before: x y a b c d : ℂ
⊢ (a + b) * (c + d) + (a - b) * (c - d) = 2 * (a * c + b * d)
Theorem: Quaternion.sq_eq_normSq
File: Mathlib/Algebra/Quaternion.lean

tactic: rw [← star_eq_self, ← star_mul_self, sq, mul_eq_mul_right_iff, eq_comm]
state_before: R : Type u_1
inst✝ : LinearOrderedCommRing R
a : ℍ[R]
⊢ a ^ 2 = ↑(↑normSq a) ↔ a = ↑a.re

tactic: exact or_iff_left_of_imp fun ha ↦ ha.symm ▸ star_zero _
state_before: R : Type u_1
inst✝ : LinearOrderedCommRing R
a : ℍ[R]
⊢ star a = a ∨ a = 0 ↔ star a = a
Theorem: Real.arcsin_neg_one
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean

tactic: rw [sin_neg, sin_pi_div_two]
state_before: ⊢ sin (-(π / 2)) = -1
Theorem: Nat.Prime.dvd_iff_one_le_factorization
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: simp
state_before: p n : ℕ
pp : Prime p
hn : n ≠ 0
⊢ p ∣ n ↔ p ^ 1 ∣ n
Theorem: CochainComplex.single₀_obj_x_dFrom
File: Mathlib/Algebra/Homology/Single.lean

tactic: rw [dFrom_eq ((single₀ V).obj X) rfl]
state_before: V : Type u
inst✝² : Category V
inst✝¹ : HasZeroMorphisms V
inst✝ : HasZeroObject V
X : V
j : ℕ
⊢ dFrom ((single₀ V).obj X) j = 0

tactic: simp
state_before: V : Type u
inst✝² : Category V
inst✝¹ : HasZeroMorphisms V
inst✝ : HasZeroObject V
X : V
j : ℕ
⊢ d ((single₀ V).obj X) j (j + 1) ≫ (xNextIso ((single₀ V).obj X) (_ : j + 1 = j + 1)).inv = 0
Theorem: Real.is_glb_sInf
File: Mathlib/Data/Real/Basic.lean

tactic: rw [sInf_def, ← isLUB_neg', neg_neg]
state_before: x y : ℝ
S : Set ℝ
h₁ : Set.Nonempty S
h₂ : BddBelow S
⊢ IsGLB S (sInf S)

tactic: exact Real.isLUB_sSup _ h₁.neg h₂.neg
state_before: x y : ℝ
S : Set ℝ
h₁ : Set.Nonempty S
h₂ : BddBelow S
⊢ IsLUB (-S) (sSup (-S))
Theorem: LieSubmodule.sInf_coe
File: Mathlib/Algebra/Lie/Submodule.lean

tactic: rw [← LieSubmodule.coe_toSubmodule, sInf_coe_toSubmodule, Submodule.sInf_coe]
state_before: R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N N' : LieSubmodule R L M
I J : LieIdeal R L
S : Set (LieSubmodule R L M)
⊢ ↑(sInf S) = ⋂ (s : LieSubmodule R L M) (_ : s ∈ S), ↑s

tactic: ext m
state_before: R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N N' : LieSubmodule R L M
I J : LieIdeal R L
S : Set (LieSubmodule R L M)
⊢ (⋂ (p : Submodule R M) (_ : p ∈ {x | ∃ s, s ∈ S ∧ ↑s = x}), ↑p) = ⋂ (s : LieSubmodule R L M) (_ : s ∈ S), ↑s

tactic: simp only [mem_iInter, mem_setOf_eq, forall_apply_eq_imp_iff₂, exists_imp,
  and_imp, SetLike.mem_coe, mem_coeSubmodule]
state_before: case h
R : Type u
L : Type v
M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : LieRing L
inst✝⁴ : LieAlgebra R L
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : LieRingModule L M
inst✝ : LieModule R L M
N N' : LieSubmodule R L M
I J : LieIdeal R L
S : Set (LieSubmodule R L M)
m : M
⊢ (m ∈ ⋂ (p : Submodule R M) (_ : p ∈ {x | ∃ s, s ∈ S ∧ ↑s = x}), ↑p) ↔ m ∈ ⋂ (s : LieSubmodule R L M) (_ : s ∈ S), ↑s
Theorem: Dfinsupp.single_eq_zero
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: rw [← single_zero i, single_eq_single_iff]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s : Finset ι
x : (i : ↑↑s) → β ↑i
i✝ i : ι
xi : β i
⊢ single i xi = 0 ↔ xi = 0

tactic: simp
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s : Finset ι
x : (i : ↑↑s) → β ↑i
i✝ i : ι
xi : β i
⊢ i = i ∧ HEq xi 0 ∨ xi = 0 ∧ 0 = 0 ↔ xi = 0