tasksource/leandojo huggingface dataset:
Theorem: Nat.prod_pow_factorization_eq_self
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: have h : ∀ x : ℕ, x ∈ f.support → x ^ f x ≠ 0 := fun p hp =>
  pow_ne_zero _ (Prime.ne_zero (hf p hp))
state_before: f : ℕ →₀ ℕ
hf : ∀ (p : ℕ), p ∈ f.support → Prime p
⊢ factorization (Finsupp.prod f fun x x_1 => x ^ x_1) = f

tactic: simp only [Finsupp.prod, factorization_prod h]
state_before: f : ℕ →₀ ℕ
hf : ∀ (p : ℕ), p ∈ f.support → Prime p
h : ∀ (x : ℕ), x ∈ f.support → x ^ ↑f x ≠ 0
⊢ factorization (Finsupp.prod f fun x x_1 => x ^ x_1) = f

tactic: conv =>
  rhs
  rw [(sum_single f).symm]
state_before: f : ℕ →₀ ℕ
hf : ∀ (p : ℕ), p ∈ f.support → Prime p
h : ∀ (x : ℕ), x ∈ f.support → x ^ ↑f x ≠ 0
⊢ ∑ x in f.support, factorization (x ^ ↑f x) = f

tactic: exact sum_congr rfl fun p hp => Prime.factorization_pow (hf p hp)
state_before: f : ℕ →₀ ℕ
hf : ∀ (p : ℕ), p ∈ f.support → Prime p
h : ∀ (x : ℕ), x ∈ f.support → x ^ ↑f x ≠ 0
⊢ ∑ x in f.support, factorization (x ^ ↑f x) = Finsupp.sum f single
Theorem: RingHom.mem_ker
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: rw [ker, Ideal.mem_comap, Submodule.mem_bot]
state_before: R : Type u
S : Type v
T : Type w
F : Type u_1
G : Type ?u.1679598
inst✝² : Semiring R
inst✝¹ : Semiring S
inst✝ : Semiring T
rcf : RingHomClass F R S
rcg : RingHomClass G T S
f : F
g : G
r : R
⊢ r ∈ ker f ↔ ↑f r = 0
Theorem: Int.emod_def
File: Std/Data/Int/DivMod.lean

tactic: rw [← Int.add_sub_cancel (a % b), emod_add_ediv]
state_before: a b : Int
⊢ a % b = a - b * (a / b)
Theorem: Basis.dualBasis_equivFun
File: Mathlib/LinearAlgebra/Dual.lean

tactic: rw [Basis.equivFun_apply, dualBasis_repr]
state_before: R : Type u
M : Type v
K : Type u₁
V : Type u₂
ι : Type w
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : DecidableEq ι
b : Basis ι R M
inst✝ : Fintype ι
l : Dual R M
i : ι
⊢ ↑(equivFun (dualBasis b)) l i = ↑l (↑b i)
Theorem: ContinuousLinearMap.hasFDerivAtFilter
File: Mathlib/Analysis/Calculus/FDeriv/Linear.lean

tactic: simp only [e.map_sub, sub_self]
state_before: 𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type ?u.18148
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.18243
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x✝ : E
s t : Set E
L L₁ L₂ : Filter E
x : E
⊢ 0 = ↑e x - ↑e x✝ - ↑e (x - x✝)
Theorem: toIcoDiv_add_right
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: simpa only [one_zsmul] using toIcoDiv_add_zsmul hp a b 1
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIcoDiv hp a (b + p) = toIcoDiv hp a b + 1
Theorem: continuousOn_boolIndicator_iff_clopen
File: Mathlib/Topology/SubsetProperties.lean

tactic: rw [continuousOn_iff_continuous_restrict, ← continuous_boolIndicator_iff_clopen]
state_before: α : Type u
β : Type v
ι : Type ?u.179439
π : ι → Type ?u.179444
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
s✝ t : Set α
X : Type u_1
inst✝ : TopologicalSpace X
s U : Set X
⊢ ContinuousOn (boolIndicator U) s ↔ IsClopen (Subtype.val ⁻¹' U)

tactic: rfl
state_before: α : Type u
β : Type v
ι : Type ?u.179439
π : ι → Type ?u.179444
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
s✝ t : Set α
X : Type u_1
inst✝ : TopologicalSpace X
s U : Set X
⊢ Continuous (restrict s (boolIndicator U)) ↔ Continuous (boolIndicator (Subtype.val ⁻¹' U))
Theorem: List.length_insertNth_le_succ
File: Mathlib/Data/List/Basic.lean

tactic: cases' le_or_lt n l.length with hn hn
state_before: ι : Type ?u.124260
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a : α
l : List α
x : α
n : ℕ
⊢ length (insertNth n x l) ≤ length l + 1

tactic: rw [length_insertNth _ _ hn]
state_before: case inl
ι : Type ?u.124260
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a : α
l : List α
x : α
n : ℕ
hn : n ≤ length l
⊢ length (insertNth n x l) ≤ length l + 1

tactic: rw [insertNth_of_length_lt _ _ _ hn]
state_before: case inr
ι : Type ?u.124260
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a : α
l : List α
x : α
n : ℕ
hn : length l < n
⊢ length (insertNth n x l) ≤ length l + 1

tactic: exact (Nat.lt_succ_self _).le
state_before: case inr
ι : Type ?u.124260
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
a : α
l : List α
x : α
n : ℕ
hn : length l < n
⊢ length l ≤ length l + 1
Theorem: Finset.Icc_ssubset_Icc_right
File: Mathlib/Data/Finset/LocallyFinite.lean

tactic: rw [← coe_ssubset, coe_Icc, coe_Icc]
state_before: ι : Type ?u.27279
α : Type u_1
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
hI : a₂ ≤ b₂
ha : a₂ ≤ a₁
hb : b₁ < b₂
⊢ Icc a₁ b₁ ⊂ Icc a₂ b₂

tactic: exact Set.Icc_ssubset_Icc_right hI ha hb
state_before: ι : Type ?u.27279
α : Type u_1
inst✝¹ : Preorder α
inst✝ : LocallyFiniteOrder α
a a₁ a₂ b b₁ b₂ c x : α
hI : a₂ ≤ b₂
ha : a₂ ≤ a₁
hb : b₁ < b₂
⊢ Set.Icc a₁ b₁ ⊂ Set.Icc a₂ b₂
Theorem: Prod.eq_iff_fst_eq_snd_eq
File: Mathlib/Data/Prod/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.4899
δ : Type ?u.4902
p₁ : α
p₂ : β
q₁ : α
q₂ : β
⊢ (p₁, p₂) = (q₁, q₂) ↔ (p₁, p₂).fst = (q₁, q₂).fst ∧ (p₁, p₂).snd = (q₁, q₂).snd
Theorem: Polynomial.mirror_zero
File: Mathlib/Data/Polynomial/Mirror.lean

tactic: simp [mirror]
state_before: R : Type u_1
inst✝ : Semiring R
p q : R[X]
⊢ mirror 0 = 0
Theorem: Multiset.le_cons_erase
File: Mathlib/Data/Multiset/Basic.lean

tactic: rw [erase_of_not_mem h]
state_before: α : Type u_1
β : Type ?u.96069
γ : Type ?u.96072
inst✝ : DecidableEq α
s✝ t : Multiset α
a✝ b : α
s : Multiset α
a : α
h : ¬a ∈ s
⊢ s ≤ a ::ₘ erase s a

tactic: apply le_cons_self
state_before: α : Type u_1
β : Type ?u.96069
γ : Type ?u.96072
inst✝ : DecidableEq α
s✝ t : Multiset α
a✝ b : α
s : Multiset α
a : α
h : ¬a ∈ s
⊢ s ≤ a ::ₘ s
Theorem: Absorbent.absorbs_finite
File: Mathlib/Analysis/LocallyConvex/Basic.lean

tactic: rw [← Set.biUnion_of_singleton v]
state_before: 𝕜 : Type u_2
𝕝 : Type ?u.10601
E : Type u_1
ι : Sort ?u.10607
κ : ι → Sort ?u.10612
inst✝¹ : SeminormedRing 𝕜
inst✝ : SMul 𝕜 E
s✝ t u v✝ A B s : Set E
hs : Absorbent 𝕜 s
v : Set E
hv : Set.Finite v
⊢ Absorbs 𝕜 s v

tactic: exact hv.absorbs_iUnion.mpr fun _ _ => hs.absorbs
state_before: 𝕜 : Type u_2
𝕝 : Type ?u.10601
E : Type u_1
ι : Sort ?u.10607
κ : ι → Sort ?u.10612
inst✝¹ : SeminormedRing 𝕜
inst✝ : SMul 𝕜 E
s✝ t u v✝ A B s : Set E
hs : Absorbent 𝕜 s
v : Set E
hv : Set.Finite v
⊢ Absorbs 𝕜 s (⋃ (x : E) (_ : x ∈ v), {x})
Theorem: Submodule.map_op_one
File: Mathlib/Algebra/Algebra/Operations.lean

tactic: ext x
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
⊢ map (↑(opLinearEquiv R)) 1 = 1

tactic: induction x using MulOpposite.rec'
state_before: case h
ι : 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
x : Aᵐᵒᵖ
⊢ x ∈ map (↑(opLinearEquiv R)) 1 ↔ x ∈ 1

tactic: simp
state_before: case h.h
ι : 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 X✝ : A
⊢ op X✝ ∈ map (↑(opLinearEquiv R)) 1 ↔ op X✝ ∈ 1
Theorem: Finset.filter_false_of_mem
File: Mathlib/Data/Finset/Basic.lean

tactic: simpa only [eq_empty_iff_forall_not_mem, mem_filter, not_and] using h
state_before: α : Type u_1
β : Type ?u.323235
γ : Type ?u.323238
p q : α → Prop
inst✝¹ : DecidablePred p
inst✝ : DecidablePred q
s : Finset α
h : ∀ (x : α), x ∈ s → ¬p x
⊢ ∀ (x : α), ¬x ∈ filter p s
Theorem: integral_sin_pow_even
File: Mathlib/Analysis/SpecialFunctions/Integrals.lean

tactic: induction' n with k ih
state_before: a b : ℝ
n : ℕ
⊢ (∫ (x : ℝ) in 0 ..π, sin x ^ (2 * n)) = π * ∏ i in Finset.range n, (2 * ↑i + 1) / (2 * ↑i + 2)

tactic: rw [prod_range_succ_comm, mul_left_comm, ← ih, mul_succ, integral_sin_pow]
state_before: case succ
a b : ℝ
n k : ℕ
ih : (∫ (x : ℝ) in 0 ..π, sin x ^ (2 * k)) = π * ∏ i in Finset.range k, (2 * ↑i + 1) / (2 * ↑i + 2)
⊢ (∫ (x : ℝ) in 0 ..π, sin x ^ (2 * succ k)) = π * ∏ i in Finset.range (succ k), (2 * ↑i + 1) / (2 * ↑i + 2)

tactic: norm_cast
state_before: case succ
a b : ℝ
n k : ℕ
ih : (∫ (x : ℝ) in 0 ..π, sin x ^ (2 * k)) = π * ∏ i in Finset.range k, (2 * ↑i + 1) / (2 * ↑i + 2)
⊢ ((sin 0 ^ (2 * k + 1) * cos 0 - sin π ^ (2 * k + 1) * cos π) / (↑(2 * k) + 2) +
      (↑(2 * k) + 1) / (↑(2 * k) + 2) * ∫ (x : ℝ) in 0 ..π, sin x ^ (2 * k)) =
    (2 * ↑k + 1) / (2 * ↑k + 2) * ∫ (x : ℝ) in 0 ..π, sin x ^ (2 * k)

tactic: simp [-cast_add, field_simps]
state_before: case succ
a b : ℝ
n k : ℕ
ih : (∫ (x : ℝ) in 0 ..π, sin x ^ (2 * k)) = π * ∏ i in Finset.range k, (2 * ↑i + 1) / (2 * ↑i + 2)
⊢ ((sin 0 ^ (2 * k + 1) * cos 0 - sin π ^ (2 * k + 1) * cos π) / ↑(2 * k + 2) +
      ↑(2 * k + 1) / ↑(2 * k + 2) * ∫ (x : ℝ) in 0 ..π, sin x ^ (2 * k)) =
    ↑(2 * k + 1) / ↑(2 * k + 2) * ∫ (x : ℝ) in 0 ..π, sin x ^ (2 * k)

tactic: simp
state_before: case zero
a b : ℝ
n : ℕ
⊢ (∫ (x : ℝ) in 0 ..π, sin x ^ (2 * zero)) = π * ∏ i in Finset.range zero, (2 * ↑i + 1) / (2 * ↑i + 2)
Theorem: Ordinal.deriv_id_of_nfp_id
File: Mathlib/SetTheory/Ordinal/FixedPoint.lean

tactic: simp [h]
state_before: f✝ : Ordinal → Ordinal
f : Ordinal → Ordinal
h : nfp f = id
⊢ deriv f 0 = id 0 ∧ ∀ (a : Ordinal), deriv f a = id a → deriv f (succ a) = id (succ a)
Theorem: IsConformalMap.smul
File: Mathlib/Analysis/NormedSpace/ConformalLinearMap.lean

tactic: rcases hf with ⟨c', hc', li, rfl⟩
state_before: R : Type u_1
M : Type u_2
N : Type u_3
G : Type ?u.124862
M' : Type ?u.124865
inst✝⁸ : NormedField R
inst✝⁷ : SeminormedAddCommGroup M
inst✝⁶ : SeminormedAddCommGroup N
inst✝⁵ : SeminormedAddCommGroup G
inst✝⁴ : NormedSpace R M
inst✝³ : NormedSpace R N
inst✝² : NormedSpace R G
inst✝¹ : NormedAddCommGroup M'
inst✝ : NormedSpace R M'
f : M →L[R] N
g : N →L[R] G
c✝ : R
hf : IsConformalMap f
c : R
hc : c ≠ 0
⊢ IsConformalMap (c • f)

tactic: exact ⟨c * c', mul_ne_zero hc hc', li, smul_smul _ _ _⟩
state_before: case intro.intro.intro
R : Type u_1
M : Type u_2
N : Type u_3
G : Type ?u.124862
M' : Type ?u.124865
inst✝⁸ : NormedField R
inst✝⁷ : SeminormedAddCommGroup M
inst✝⁶ : SeminormedAddCommGroup N
inst✝⁵ : SeminormedAddCommGroup G
inst✝⁴ : NormedSpace R M
inst✝³ : NormedSpace R N
inst✝² : NormedSpace R G
inst✝¹ : NormedAddCommGroup M'
inst✝ : NormedSpace R M'
g : N →L[R] G
c✝ c : R
hc : c ≠ 0
c' : R
hc' : c' ≠ 0
li : M →ₗᵢ[R] N
⊢ IsConformalMap (c • c' • toContinuousLinearMap li)
Theorem: Cardinal.mk_finsupp_lift_of_fintype
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: simpa using (@Finsupp.equivFunOnFinite α β _ _).cardinal_eq
state_before: α✝ β✝ α : Type u
β : Type v
inst✝¹ : Fintype α
inst✝ : Zero β
⊢ (#α →₀ β) = lift (#β) ^ Fintype.card α
Theorem: AffineIndependent.affineSpan_eq_of_le_of_card_eq_finrank_add_one
File: Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean

tactic: rw [← Finset.card_univ] at hc
state_before: k : Type u_2
V : Type u_3
P : Type u_4
ι : Type u_1
inst✝⁵ : DivisionRing k
inst✝⁴ : AddCommGroup V
inst✝³ : Module k V
inst✝² : AffineSpace V P
inst✝¹ : Fintype ι
p : ι → P
hi : AffineIndependent k p
sp : AffineSubspace k P
inst✝ : FiniteDimensional k { x // x ∈ direction sp }
hle : affineSpan k (Set.range p) ≤ sp
hc : Fintype.card ι = finrank k { x // x ∈ direction sp } + 1
⊢ affineSpan k (Set.range p) = sp

tactic: rw [← Set.image_univ, ← Finset.coe_univ, ← Finset.coe_image] at hle⊢
state_before: k : Type u_2
V : Type u_3
P : Type u_4
ι : Type u_1
inst✝⁵ : DivisionRing k
inst✝⁴ : AddCommGroup V
inst✝³ : Module k V
inst✝² : AffineSpace V P
inst✝¹ : Fintype ι
p : ι → P
hi : AffineIndependent k p
sp : AffineSubspace k P
inst✝ : FiniteDimensional k { x // x ∈ direction sp }
hle : affineSpan k (Set.range p) ≤ sp
hc : Finset.card Finset.univ = finrank k { x // x ∈ direction sp } + 1
⊢ affineSpan k (Set.range p) = sp

tactic: exact hi.affineSpan_image_finset_eq_of_le_of_card_eq_finrank_add_one hle hc
state_before: k : Type u_2
V : Type u_3
P : Type u_4
ι : Type u_1
inst✝⁵ : DivisionRing k
inst✝⁴ : AddCommGroup V
inst✝³ : Module k V
inst✝² : AffineSpace V P
inst✝¹ : Fintype ι
p : ι → P
hi : AffineIndependent k p
sp : AffineSubspace k P
inst✝ : FiniteDimensional k { x // x ∈ direction sp }
hle✝¹ : affineSpan k (p '' Set.univ) ≤ sp
hle✝ : affineSpan k (p '' ↑Finset.univ) ≤ sp
hle : affineSpan k ↑(Finset.image p Finset.univ) ≤ sp
hc : Finset.card Finset.univ = finrank k { x // x ∈ direction sp } + 1
⊢ affineSpan k ↑(Finset.image p Finset.univ) = sp
Theorem: Equiv.Perm.cycleOf_pow_apply_self
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

tactic: intro n
state_before: ι : Type ?u.2116608
α : Type u_1
β : Type ?u.2116614
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ g : Perm α
x✝ y : α
f : Perm α
x : α
⊢ ∀ (n : ℕ), ↑(cycleOf f x ^ n) x = ↑(f ^ n) x

tactic: induction' n with n hn
state_before: ι : Type ?u.2116608
α : Type u_1
β : Type ?u.2116614
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ g : Perm α
x✝ y : α
f : Perm α
x : α
n : ℕ
⊢ ↑(cycleOf f x ^ n) x = ↑(f ^ n) x

tactic: rfl
state_before: case zero
ι : Type ?u.2116608
α : Type u_1
β : Type ?u.2116614
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ g : Perm α
x✝ y : α
f : Perm α
x : α
⊢ ↑(cycleOf f x ^ Nat.zero) x = ↑(f ^ Nat.zero) x

tactic: rw [pow_succ, mul_apply, cycleOf_apply, hn, if_pos, pow_succ, mul_apply]
state_before: case succ
ι : Type ?u.2116608
α : Type u_1
β : Type ?u.2116614
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ g : Perm α
x✝ y : α
f : Perm α
x : α
n : ℕ
hn : ↑(cycleOf f x ^ n) x = ↑(f ^ n) x
⊢ ↑(cycleOf f x ^ Nat.succ n) x = ↑(f ^ Nat.succ n) x

tactic: simpa [SameCycle] using ⟨n,rfl⟩
state_before: case succ.hc
ι : Type ?u.2116608
α : Type u_1
β : Type ?u.2116614
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ g : Perm α
x✝ y : α
f : Perm α
x : α
n : ℕ
hn : ↑(cycleOf f x ^ n) x = ↑(f ^ n) x
⊢ SameCycle f x (↑(f ^ n) x)
Theorem: Cardinal.mk_ord_out
File: Mathlib/SetTheory/Ordinal/Basic.lean

tactic: simp
state_before: α : Type ?u.229879
β : Type ?u.229882
γ : Type ?u.229885
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
c : Cardinal
⊢ (#(Quotient.out (ord c)).α) = c
Theorem: PiNat.eq_of_dist_eq_zero
File: Mathlib/Topology/MetricSpace/PiNat.lean

tactic: rcases eq_or_ne x y with (rfl | h)
state_before: E : ℕ → Type u_1
x y : (n : ℕ) → E n
hxy : dist x y = 0
⊢ x = y

tactic: simp [dist_eq_of_ne h] at hxy
state_before: case inr
E : ℕ → Type u_1
x y : (n : ℕ) → E n
hxy : dist x y = 0
h : x ≠ y
⊢ x = y

tactic: exact (two_ne_zero (pow_eq_zero hxy)).elim
state_before: case inr
E : ℕ → Type u_1
x y : (n : ℕ) → E n
h : x ≠ y
hxy : 2 ^ firstDiff x y = 0
⊢ x = y

tactic: rfl
state_before: case inl
E : ℕ → Type u_1
x : (n : ℕ) → E n
hxy : dist x x = 0
⊢ x = x
Theorem: HasDerivWithinAt.complexToReal_fderiv'
File: Mathlib/Analysis/Complex/RealDeriv.lean

tactic: simpa only [Complex.restrictScalars_one_smulRight'] using
  h.hasFDerivWithinAt.restrictScalars ℝ
state_before: e : ℂ → ℂ
e' : ℂ
z : ℝ
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
f : ℂ → E
s : Set ℂ
x : ℂ
f' : E
h : HasDerivWithinAt f f' s x
⊢ HasFDerivWithinAt f (ContinuousLinearMap.smulRight reClm f' + I • ContinuousLinearMap.smulRight imClm f') s x
Theorem: Polynomial.eval₂_modByMonic_eq_self_of_root
File: Mathlib/Data/Polynomial/Div.lean

tactic: rw [modByMonic_eq_sub_mul_div p hq, eval₂_sub, eval₂_mul, hx, MulZeroClass.zero_mul, sub_zero]
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝¹ : CommRing R
p✝ q✝ : R[X]
inst✝ : CommRing S
f : R →+* S
p q : R[X]
hq : Monic q
x : S
hx : eval₂ f x q = 0
⊢ eval₂ f x (p %ₘ q) = eval₂ f x p
Theorem: Int.sub_nonneg_of_le
File: Std/Data/Int/Lemmas.lean

tactic: have h := Int.add_le_add_right h (-b)
state_before: a b : Int
h : b ≤ a
⊢ 0 ≤ a - b

tactic: rwa [Int.add_right_neg] at h
state_before: a b : Int
h✝ : b ≤ a
h : b + -b ≤ a + -b
⊢ 0 ≤ a - b
Theorem: CategoryTheory.Under.w
File: Mathlib/CategoryTheory/Over.lean

tactic: have := f.w
state_before: T : Type u₁
inst✝ : Category T
X : T
A B : Under X
f : A ⟶ B
⊢ A.hom ≫ f.right = B.hom

tactic: aesop_cat
state_before: T : Type u₁
inst✝ : Category T
X : T
A B : Under X
f : A ⟶ B
this : (Functor.fromPUnit X).map f.left ≫ B.hom = A.hom ≫ (𝟭 T).map f.right
⊢ A.hom ≫ f.right = B.hom
Theorem: Nat.fast_fib_aux_eq
File: Mathlib/Data/Nat/Fib.lean

tactic: apply Nat.binaryRec _ (fun b n' ih => _) n
state_before: n : ℕ
⊢ fastFibAux n = (fib n, fib (n + 1))

tactic: simp [fastFibAux]
state_before: n : ℕ
⊢ fastFibAux 0 = (fib 0, fib (0 + 1))

tactic: intro b
state_before: n : ℕ
⊢ ∀ (b : Bool) (n' : ℕ),
    fastFibAux n' = (fib n', fib (n' + 1)) → fastFibAux (bit b n') = (fib (bit b n'), fib (bit b n' + 1))

tactic: intro n'
state_before: n : ℕ
b : Bool
⊢ ∀ (n' : ℕ), fastFibAux n' = (fib n', fib (n' + 1)) → fastFibAux (bit b n') = (fib (bit b n'), fib (bit b n' + 1))

tactic: intro ih
state_before: n : ℕ
b : Bool
n' : ℕ
⊢ fastFibAux n' = (fib n', fib (n' + 1)) → fastFibAux (bit b n') = (fib (bit b n'), fib (bit b n' + 1))

tactic: cases b <;>
      simp only [fast_fib_aux_bit_ff, fast_fib_aux_bit_tt, congr_arg Prod.fst ih,
        congr_arg Prod.snd ih, Prod.mk.inj_iff] <;>
      simp [bit, fib_bit0, fib_bit1, fib_bit0_succ, fib_bit1_succ]
state_before: n : ℕ
b : Bool
n' : ℕ
ih : fastFibAux n' = (fib n', fib (n' + 1))
⊢ fastFibAux (bit b n') = (fib (bit b n'), fib (bit b n' + 1))
Theorem: Order.Ico_pred_left
File: Mathlib/Order/SuccPred/Basic.lean

tactic: simp_rw [← Ici_inter_Iio, Ici_pred, insert_inter_of_mem (mem_Iio.2 h)]
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : PredOrder α
a b : α
h : pred a < b
⊢ Ico (pred a) b = insert (pred a) (Ico a b)
Theorem: Dfinsupp.filter_ne_eq_erase'
File: Mathlib/Data/Dfinsupp/Basic.lean

tactic: rw [← filter_ne_eq_erase f i]
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✝ : ι
f : Π₀ (i : ι), β i
i : ι
⊢ filter ((fun x x_1 => x ≠ x_1) i) f = erase i f

tactic: congr with j
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✝ : ι
f : Π₀ (i : ι), β i
i : ι
⊢ filter ((fun x x_1 => x ≠ x_1) i) f = filter (fun x => x ≠ i) f

tactic: exact ne_comm
state_before: case e_p.h.a
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
dec : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s : Finset ι
x : (i : ↑↑s) → β ↑i
i✝ : ι
f : Π₀ (i : ι), β i
i j : ι
⊢ (fun x x_1 => x ≠ x_1) i j ↔ j ≠ i
Theorem: CategoryTheory.Limits.PreservesPushout.inl_iso_hom
File: Mathlib/CategoryTheory/Limits/Preserves/Shapes/Pullbacks.lean

tactic: delta PreservesPushout.iso
state_before: C : Type u₁
inst✝⁴ : Category C
D : Type u₂
inst✝³ : Category D
G : C ⥤ D
W X Y Z : C
h : X ⟶ Z
k : Y ⟶ Z
f : W ⟶ X
g : W ⟶ Y
comm : f ≫ h = g ≫ k
inst✝² : PreservesColimit (span f g) G
inst✝¹ : HasPushout f g
inst✝ : HasPushout (G.map f) (G.map g)
⊢ pushout.inl ≫ (iso G f g).hom = G.map pushout.inl

tactic: simp
state_before: C : Type u₁
inst✝⁴ : Category C
D : Type u₂
inst✝³ : Category D
G : C ⥤ D
W X Y Z : C
h : X ⟶ Z
k : Y ⟶ Z
f : W ⟶ X
g : W ⟶ Y
comm : f ≫ h = g ≫ k
inst✝² : PreservesColimit (span f g) G
inst✝¹ : HasPushout f g
inst✝ : HasPushout (G.map f) (G.map g)
⊢ pushout.inl ≫
      (IsColimit.coconePointUniqueUpToIso (colimit.isColimit (span (G.map f) (G.map g)))
          (isColimitOfHasPushoutOfPreservesColimit G f g)).hom =
    G.map pushout.inl
Theorem: MeasureTheory.OuterMeasure.smul_iSup
File: Mathlib/MeasureTheory/Measure/OuterMeasure.lean

tactic: simp only [smul_apply, iSup_apply, ENNReal.smul_iSup]
state_before: α : Type u_3
β : Type ?u.70023
R : Type u_1
R' : Type ?u.70029
ms : Set (OuterMeasure α)
m : OuterMeasure α
inst✝¹ : SMul R ℝ≥0∞
inst✝ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
ι : Sort u_2
f : ι → OuterMeasure α
c : R
s : Set α
⊢ ↑(c • ⨆ (i : ι), f i) s = ↑(⨆ (i : ι), c • f i) s
Theorem: Fintype.mem_piFinset
File: Mathlib/Data/Fintype/Pi.lean

tactic: constructor
state_before: α : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
δ : α → Type u_1
t : (a : α) → Finset (δ a)
f : (a : α) → δ a
⊢ f ∈ piFinset t ↔ ∀ (a : α), f a ∈ t a

tactic: simp only [piFinset, mem_map, and_imp, forall_prop_of_true, exists_prop, mem_univ, exists_imp,
  mem_pi]
state_before: case mp
α : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
δ : α → Type u_1
t : (a : α) → Finset (δ a)
f : (a : α) → δ a
⊢ f ∈ piFinset t → ∀ (a : α), f a ∈ t a

tactic: rintro g hg hgf a
state_before: case mp
α : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
δ : α → Type u_1
t : (a : α) → Finset (δ a)
f : (a : α) → δ a
⊢ ∀ (x : (a : α) → a ∈ univ → δ a),
    (∀ (a : α), x a (_ : a ∈ univ) ∈ t a) →
      ↑{ toFun := fun f a => f a (_ : a ∈ univ),
                inj' :=
                  (_ :
                    ∀ (x x_1 : (a : α) → a ∈ univ → δ a),
                      ((fun a => x a (_ : a ∈ univ)) = fun a => x_1 a (_ : a ∈ univ)) → x = x_1) }
            x =
          f →
        ∀ (a : α), f a ∈ t a

tactic: rw [← hgf]
state_before: case mp
α : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
δ : α → Type u_1
t : (a : α) → Finset (δ a)
f : (a : α) → δ a
g : (a : α) → a ∈ univ → δ a
hg : ∀ (a : α), g a (_ : a ∈ univ) ∈ t a
hgf :
  ↑{ toFun := fun f a => f a (_ : a ∈ univ),
          inj' :=
            (_ :
              ∀ (x x_1 : (a : α) → a ∈ univ → δ a),
                ((fun a => x a (_ : a ∈ univ)) = fun a => x_1 a (_ : a ∈ univ)) → x = x_1) }
      g =
    f
a : α
⊢ f a ∈ t a

tactic: exact hg a
state_before: case mp
α : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
δ : α → Type u_1
t : (a : α) → Finset (δ a)
f : (a : α) → δ a
g : (a : α) → a ∈ univ → δ a
hg : ∀ (a : α), g a (_ : a ∈ univ) ∈ t a
hgf :
  ↑{ toFun := fun f a => f a (_ : a ∈ univ),
          inj' :=
            (_ :
              ∀ (x x_1 : (a : α) → a ∈ univ → δ a),
                ((fun a => x a (_ : a ∈ univ)) = fun a => x_1 a (_ : a ∈ univ)) → x = x_1) }
      g =
    f
a : α
⊢ ↑{ toFun := fun f a => f a (_ : a ∈ univ),
          inj' :=
            (_ :
              ∀ (x x_1 : (a : α) → a ∈ univ → δ a),
                ((fun a => x a (_ : a ∈ univ)) = fun a => x_1 a (_ : a ∈ univ)) → x = x_1) }
      g a ∈
    t a

tactic: simp only [piFinset, mem_map, forall_prop_of_true, exists_prop, mem_univ, mem_pi]
state_before: case mpr
α : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
δ : α → Type u_1
t : (a : α) → Finset (δ a)
f : (a : α) → δ a
⊢ (∀ (a : α), f a ∈ t a) → f ∈ piFinset t

tactic: exact fun hf => ⟨fun a _ => f a, hf, rfl⟩
state_before: case mpr
α : Type u_2
inst✝¹ : DecidableEq α
inst✝ : Fintype α
δ : α → Type u_1
t : (a : α) → Finset (δ a)
f : (a : α) → δ a
⊢ (∀ (a : α), f a ∈ t a) →
    ∃ a,
      (∀ (a_1 : α), a a_1 (_ : a_1 ∈ univ) ∈ t a_1) ∧
        ↑{ toFun := fun f a => f a (_ : a ∈ univ),
                inj' :=
                  (_ :
                    ∀ (x x_1 : (a : α) → a ∈ univ → δ a),
                      ((fun a => x a (_ : a ∈ univ)) = fun a => x_1 a (_ : a ∈ univ)) → x = x_1) }
            a =
          f
Theorem: one_div_mul_add_mul_one_div_eq_one_div_add_one_div
File: Mathlib/Algebra/Field/Basic.lean

tactic: rw [mul_add, one_div_mul_cancel ha, add_mul, one_mul, mul_assoc, mul_one_div_cancel hb, mul_one,
  add_comm]
state_before: α : Type u_1
β : Type ?u.4001
K : Type ?u.4004
inst✝ : DivisionSemiring α
a b c d : α
ha : a ≠ 0
hb : b ≠ 0
⊢ 1 / a * (a + b) * (1 / b) = 1 / a + 1 / b
Theorem: Function.Embedding.equiv_toEmbedding_trans_symm_toEmbedding
File: Mathlib/Logic/Embedding/Basic.lean

tactic: ext
state_before: α : Sort u_1
β : Sort u_2
e : α ≃ β
⊢ Embedding.trans (Equiv.toEmbedding e) (Equiv.toEmbedding e.symm) = Embedding.refl α

tactic: simp
state_before: case h
α : Sort u_1
β : Sort u_2
e : α ≃ β
x✝ : α
⊢ ↑(Embedding.trans (Equiv.toEmbedding e) (Equiv.toEmbedding e.symm)) x✝ = ↑(Embedding.refl α) x✝