tasksource/leandojo huggingface dataset:
Theorem: Polynomial.card_support_eq_two
File: Mathlib/Data/Polynomial/EraseLead.lean

tactic: refine' ⟨fun h => _, _⟩
state_before: R : Type u_1
inst✝ : Semiring R
f : R[X]
⊢ card (support f) = 2 ↔ ∃ k m hkm x y hx hy, f = ↑C x * X ^ k + ↑C y * X ^ m

tactic: obtain ⟨k, x, hk, hx, rfl⟩ := card_support_eq.mp h
state_before: case refine'_1
R : Type u_1
inst✝ : Semiring R
f : R[X]
h : card (support f) = 2
⊢ ∃ k m hkm x y hx hy, f = ↑C x * X ^ k + ↑C y * X ^ m

tactic: refine' ⟨k 0, k 1, hk Nat.zero_lt_one, x 0, x 1, hx 0, hx 1, _⟩
state_before: case refine'_1.intro.intro.intro.intro
R : Type u_1
inst✝ : Semiring R
k : Fin 2 → ℕ
x : Fin 2 → R
hk : StrictMono k
hx : ∀ (i : Fin 2), x i ≠ 0
h : card (support (∑ i : Fin 2, ↑C (x i) * X ^ k i)) = 2
⊢ ∃ k_1 m hkm x_1 y hx hy, ∑ i : Fin 2, ↑C (x i) * X ^ k i = ↑C x_1 * X ^ k_1 + ↑C y * X ^ m

tactic: rw [Fin.sum_univ_castSucc, Fin.sum_univ_one]
state_before: case refine'_1.intro.intro.intro.intro
R : Type u_1
inst✝ : Semiring R
k : Fin 2 → ℕ
x : Fin 2 → R
hk : StrictMono k
hx : ∀ (i : Fin 2), x i ≠ 0
h : card (support (∑ i : Fin 2, ↑C (x i) * X ^ k i)) = 2
⊢ ∑ i : Fin 2, ↑C (x i) * X ^ k i = ↑C (x 0) * X ^ k 0 + ↑C (x 1) * X ^ k 1

tactic: rfl
state_before: case refine'_1.intro.intro.intro.intro
R : Type u_1
inst✝ : Semiring R
k : Fin 2 → ℕ
x : Fin 2 → R
hk : StrictMono k
hx : ∀ (i : Fin 2), x i ≠ 0
h : card (support (∑ i : Fin 2, ↑C (x i) * X ^ k i)) = 2
⊢ ↑C (x (↑Fin.castSucc 0)) * X ^ k (↑Fin.castSucc 0) + ↑C (x (Fin.last 1)) * X ^ k (Fin.last 1) =
    ↑C (x 0) * X ^ k 0 + ↑C (x 1) * X ^ k 1

tactic: rintro ⟨k, m, hkm, x, y, hx, hy, rfl⟩
state_before: case refine'_2
R : Type u_1
inst✝ : Semiring R
f : R[X]
⊢ (∃ k m hkm x y hx hy, f = ↑C x * X ^ k + ↑C y * X ^ m) → card (support f) = 2

tactic: exact card_support_binomial hkm.ne hx hy
state_before: case refine'_2.intro.intro.intro.intro.intro.intro.intro
R : Type u_1
inst✝ : Semiring R
k m : ℕ
hkm : k < m
x y : R
hx : x ≠ 0
hy : y ≠ 0
⊢ card (support (↑C x * X ^ k + ↑C y * X ^ m)) = 2
Theorem: HahnSeries.support_embDomain_subset
File: Mathlib/RingTheory/HahnSeries.lean

tactic: intro g hg
state_before: Γ : Type u_1
R : Type u_3
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a b : Γ
r : R
Γ' : Type u_2
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x : HahnSeries Γ R
⊢ support (embDomain f x) ⊆ ↑f '' support x

tactic: contrapose! hg
state_before: Γ : Type u_1
R : Type u_3
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a b : Γ
r : R
Γ' : Type u_2
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x : HahnSeries Γ R
g : Γ'
hg : g ∈ support (embDomain f x)
⊢ g ∈ ↑f '' support x

tactic: rw [mem_support, embDomain_notin_image_support hg, Classical.not_not]
state_before: Γ : Type u_1
R : Type u_3
inst✝² : PartialOrder Γ
inst✝¹ : Zero R
a b : Γ
r : R
Γ' : Type u_2
inst✝ : PartialOrder Γ'
f : Γ ↪o Γ'
x : HahnSeries Γ R
g : Γ'
hg : ¬g ∈ (fun a => ↑f a) '' support x
⊢ ¬g ∈ support (embDomain f x)
Theorem: LiouvilleWith.nat_mul_iff
File: Mathlib/NumberTheory/Liouville/LiouvilleWith.lean

tactic: rw [mul_comm, mul_nat_iff hn]
state_before: p q x y : ℝ
r : ℚ
m : ℤ
n : ℕ
hn : n ≠ 0
⊢ LiouvilleWith p (↑n * x) ↔ LiouvilleWith p x
Theorem: minpoly.eq_of_algebraMap_eq
File: Mathlib/FieldTheory/Minpoly/Field.lean

tactic: rw [h, aeval_algebraMap_apply, minpoly.aeval, RingHom.map_zero]
state_before: A : Type ?u.197411
B : Type ?u.197414
inst✝⁹ : Field A
inst✝⁸ : Ring B
inst✝⁷ : Algebra A B
x✝ : B
K : Type u_1
S : Type u_2
T : Type u_3
inst✝⁶ : Field K
inst✝⁵ : CommRing S
inst✝⁴ : CommRing T
inst✝³ : Algebra K S
inst✝² : Algebra K T
inst✝¹ : Algebra S T
inst✝ : IsScalarTower K S T
hST : Injective ↑(algebraMap S T)
x : S
y : T
hx : IsIntegral K x
h : y = ↑(algebraMap S T) x
⊢ ↑(Polynomial.aeval y) (minpoly K x) = 0
Theorem: BoxIntegral.Prepartition.iUnion_split
File: Mathlib/Analysis/BoxIntegral/Partition/Split.lean

tactic: simp [split, ← inter_union_distrib_left, ← setOf_or, le_or_lt]
state_before: ι : Type u_1
M : Type ?u.28924
n : ℕ
I✝ J : Box ι
i✝ : ι
x✝ : ℝ
I : Box ι
i : ι
x : ℝ
⊢ Prepartition.iUnion (split I i x) = ↑I
Theorem: map_div_le_add
File: Mathlib/Algebra/Order/Hom/Basic.lean

tactic: rw [div_eq_mul_inv, ← map_inv_eq_map f y]
state_before: ι : Type ?u.34747
F : Type u_3
α : Type u_2
β : Type u_1
γ : Type ?u.34759
δ : Type ?u.34762
inst✝² : Group α
inst✝¹ : OrderedAddCommMonoid β
inst✝ : GroupSeminormClass F α β
f : F
x y : α
⊢ ↑f (x / y) ≤ ↑f x + ↑f y

tactic: exact map_mul_le_add _ _ _
state_before: ι : Type ?u.34747
F : Type u_3
α : Type u_2
β : Type u_1
γ : Type ?u.34759
δ : Type ?u.34762
inst✝² : Group α
inst✝¹ : OrderedAddCommMonoid β
inst✝ : GroupSeminormClass F α β
f : F
x y : α
⊢ ↑f (x * y⁻¹) ≤ ↑f x + ↑f y⁻¹
Theorem: MvPolynomial.degrees_mul
File: Mathlib/Data/MvPolynomial/Variables.lean

tactic: classical
refine' Finset.sup_le fun b hb => _
have := support_mul p q hb
simp only [Finset.mem_biUnion, Finset.mem_singleton] at this
rcases this with ⟨a₁, h₁, a₂, h₂, rfl⟩
rw [Finsupp.toMultiset_add]
exact add_le_add (Finset.le_sup h₁) (Finset.le_sup h₂)
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.36638
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p✝ q✝ p q : MvPolynomial σ R
⊢ degrees (p * q) ≤ degrees p + degrees q

tactic: refine' Finset.sup_le fun b hb => _
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.36638
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p✝ q✝ p q : MvPolynomial σ R
⊢ degrees (p * q) ≤ degrees p + degrees q

tactic: have := support_mul p q hb
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.36638
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p✝ q✝ p q : MvPolynomial σ R
b : σ →₀ ℕ
hb : b ∈ support (p * q)
⊢ ↑toMultiset b ≤ degrees p + degrees q

tactic: simp only [Finset.mem_biUnion, Finset.mem_singleton] at this
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.36638
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p✝ q✝ p q : MvPolynomial σ R
b : σ →₀ ℕ
hb : b ∈ support (p * q)
this : b ∈ Finset.biUnion (support p) fun a => Finset.biUnion (support q) fun b => {a + b}
⊢ ↑toMultiset b ≤ degrees p + degrees q

tactic: rcases this with ⟨a₁, h₁, a₂, h₂, rfl⟩
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.36638
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p✝ q✝ p q : MvPolynomial σ R
b : σ →₀ ℕ
hb : b ∈ support (p * q)
this : ∃ a, a ∈ support p ∧ ∃ a_1, a_1 ∈ support q ∧ b = a + a_1
⊢ ↑toMultiset b ≤ degrees p + degrees q

tactic: rw [Finsupp.toMultiset_add]
state_before: case intro.intro.intro.intro
R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.36638
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p✝ q✝ p q : MvPolynomial σ R
a₁ : σ →₀ ℕ
h₁ : a₁ ∈ support p
a₂ : σ →₀ ℕ
h₂ : a₂ ∈ support q
hb : a₁ + a₂ ∈ support (p * q)
⊢ ↑toMultiset (a₁ + a₂) ≤ degrees p + degrees q

tactic: exact add_le_add (Finset.le_sup h₁) (Finset.le_sup h₂)
state_before: case intro.intro.intro.intro
R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.36638
r : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝ : CommSemiring R
p✝ q✝ p q : MvPolynomial σ R
a₁ : σ →₀ ℕ
h₁ : a₁ ∈ support p
a₂ : σ →₀ ℕ
h₂ : a₂ ∈ support q
hb : a₁ + a₂ ∈ support (p * q)
⊢ ↑toMultiset a₁ + ↑toMultiset a₂ ≤ degrees p + degrees q
Theorem: Basis.toBasis_toOrthonormalBasis
File: Mathlib/Analysis/InnerProductSpace/PiL2.lean

tactic: simp [Basis.toOrthonormalBasis, OrthonormalBasis.toBasis]
state_before: ι : Type u_1
ι' : Type ?u.1155026
𝕜 : Type u_2
inst✝⁹ : IsROrC 𝕜
E : Type u_3
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : InnerProductSpace 𝕜 E
E' : Type ?u.1155055
inst✝⁶ : NormedAddCommGroup E'
inst✝⁵ : InnerProductSpace 𝕜 E'
F : Type ?u.1155073
inst✝⁴ : NormedAddCommGroup F
inst✝³ : InnerProductSpace ℝ F
F' : Type ?u.1155093
inst✝² : NormedAddCommGroup F'
inst✝¹ : InnerProductSpace ℝ F'
inst✝ : Fintype ι
v : Basis ι 𝕜 E
hv : Orthonormal 𝕜 ↑v
⊢ OrthonormalBasis.toBasis (Basis.toOrthonormalBasis v hv) = v
Theorem: MeasureTheory.biSup_measure_Iic
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [← measure_biUnion_eq_iSup hsc]
state_before: α : Type u_1
β : Type ?u.593622
γ : Type ?u.593625
δ : Type ?u.593628
ι : Type ?u.593631
R : Type ?u.593634
R' : Type ?u.593637
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
inst✝ : Preorder α
s : Set α
hsc : Set.Countable s
hst : ∀ (x : α), ∃ y, y ∈ s ∧ x ≤ y
hdir : DirectedOn (fun x x_1 => x ≤ x_1) s
⊢ (⨆ (x : α) (_ : x ∈ s), ↑↑μ (Iic x)) = ↑↑μ univ

tactic: congr
state_before: α : Type u_1
β : Type ?u.593622
γ : Type ?u.593625
δ : Type ?u.593628
ι : Type ?u.593631
R : Type ?u.593634
R' : Type ?u.593637
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
inst✝ : Preorder α
s : Set α
hsc : Set.Countable s
hst : ∀ (x : α), ∃ y, y ∈ s ∧ x ≤ y
hdir : DirectedOn (fun x x_1 => x ≤ x_1) s
⊢ ↑↑μ (⋃ (i : α) (_ : i ∈ s), Iic i) = ↑↑μ univ

tactic: simp only [← bex_def] at hst
state_before: case e_a
α : Type u_1
β : Type ?u.593622
γ : Type ?u.593625
δ : Type ?u.593628
ι : Type ?u.593631
R : Type ?u.593634
R' : Type ?u.593637
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
inst✝ : Preorder α
s : Set α
hsc : Set.Countable s
hst : ∀ (x : α), ∃ y, y ∈ s ∧ x ≤ y
hdir : DirectedOn (fun x x_1 => x ≤ x_1) s
⊢ (⋃ (i : α) (_ : i ∈ s), Iic i) = univ

tactic: exact iUnion₂_eq_univ_iff.2 hst
state_before: case e_a
α : Type u_1
β : Type ?u.593622
γ : Type ?u.593625
δ : Type ?u.593628
ι : Type ?u.593631
R : Type ?u.593634
R' : Type ?u.593637
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
inst✝ : Preorder α
s : Set α
hsc : Set.Countable s
hdir : DirectedOn (fun x x_1 => x ≤ x_1) s
hst : ∀ (x : α), ∃ x_1 x_2, x ≤ x_1
⊢ (⋃ (i : α) (_ : i ∈ s), Iic i) = univ

tactic: exact directedOn_iff_directed.2 (hdir.directed_val.mono_comp _ fun x y => Iic_subset_Iic.2)
state_before: α : Type u_1
β : Type ?u.593622
γ : Type ?u.593625
δ : Type ?u.593628
ι : Type ?u.593631
R : Type ?u.593634
R' : Type ?u.593637
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
inst✝ : Preorder α
s : Set α
hsc : Set.Countable s
hst : ∀ (x : α), ∃ y, y ∈ s ∧ x ≤ y
hdir : DirectedOn (fun x x_1 => x ≤ x_1) s
⊢ DirectedOn ((fun x x_1 => x ⊆ x_1) on fun x => Iic x) s
Theorem: memℓp_gen_iff
File: Mathlib/Analysis/NormedSpace/lpSpace.lean

tactic: rw [ENNReal.toReal_pos_iff] at hp
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < ENNReal.toReal p
f : (i : α) → E i
⊢ Memℓp f p ↔ Summable fun i => ‖f i‖ ^ ENNReal.toReal p

tactic: dsimp [Memℓp]
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < p ∧ p < ⊤
f : (i : α) → E i
⊢ Memℓp f p ↔ Summable fun i => ‖f i‖ ^ ENNReal.toReal p

tactic: rw [if_neg hp.1.ne', if_neg hp.2.ne]
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝ : (i : α) → NormedAddCommGroup (E i)
hp : 0 < p ∧ p < ⊤
f : (i : α) → E i
⊢ (if p = 0 then Set.Finite {i | ¬f i = 0}
    else if p = ⊤ then BddAbove (Set.range fun i => ‖f i‖) else Summable fun i => ‖f i‖ ^ ENNReal.toReal p) ↔
    Summable fun i => ‖f i‖ ^ ENNReal.toReal p
Theorem: Nat.one_eq_bit1
File: Mathlib/Data/Nat/Bits.lean

tactic: subst h
state_before: n✝ n : ℕ
h : n = 0
⊢ 1 = bit1 n

tactic: rfl
state_before: n : ℕ
⊢ 1 = bit1 0
Theorem: CategoryTheory.Limits.pullbackSymmetry_hom_comp_fst
File: Mathlib/CategoryTheory/Limits/Shapes/Pullbacks.lean

tactic: simp [pullbackSymmetry]
state_before: C : Type u
inst✝² : Category C
D : Type u₂
inst✝¹ : Category D
W X Y Z : C
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : HasPullback f g
⊢ (pullbackSymmetry f g).hom ≫ pullback.fst = pullback.snd
Theorem: Finset.Ioo_insert_left
File: Mathlib/Data/Finset/LocallyFinite.lean

tactic: rw [← coe_inj, coe_insert, coe_Ioo, coe_Ico, Set.insert_eq, Set.union_comm, Set.Ioo_union_left h]
state_before: ι : Type ?u.94215
α : Type u_1
inst✝² : PartialOrder α
inst✝¹ : LocallyFiniteOrder α
a b c : α
inst✝ : DecidableEq α
h : a < b
⊢ insert a (Ioo a b) = Ico a b
Theorem: invOf_nonpos
File: Mathlib/Algebra/Order/Invertible.lean

tactic: simp only [← not_lt, invOf_pos]
state_before: α : Type u_1
inst✝¹ : LinearOrderedSemiring α
a : α
inst✝ : Invertible a
⊢ ⅟a ≤ 0 ↔ a ≤ 0
Theorem: AlgebraicTopology.DoldKan.HigherFacesVanish.of_comp
File: Mathlib/AlgebraicTopology/DoldKan/Faces.lean

tactic: rw [assoc, v j hj, comp_zero]
state_before: C : Type u_2
inst✝¹ : Category C
inst✝ : Preadditive C
X : SimplicialObject C
Y Z : C
q n : ℕ
φ : Y ⟶ X.obj [n + 1].op
v : HigherFacesVanish q φ
f : Z ⟶ Y
j : Fin (n + 1)
hj : n + 1 ≤ ↑j + q
⊢ (f ≫ φ) ≫ δ X (Fin.succ j) = 0
Theorem: LinearPMap.inverse_graph
File: Mathlib/LinearAlgebra/LinearPMap.lean

tactic: rw [inverse, Submodule.toLinearPMap_graph_eq]
state_before: R : Type u_3
inst✝⁶ : Ring R
E : Type u_1
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module R E
F : Type u_2
inst✝³ : AddCommGroup F
inst✝² : Module R F
G : Type ?u.694525
inst✝¹ : AddCommGroup G
inst✝ : Module R G
f : E →ₗ.[R] F
hf : LinearMap.ker f.toFun = ⊥
⊢ graph (inverse hf) = Submodule.map (LinearEquiv.prodComm R E F) (graph f)
Theorem: Basis.equiv_trans
File: Mathlib/LinearAlgebra/Basis.lean

tactic: simp
state_before: ι : Type u_4
ι' : Type u_5
R : Type u_2
R₂ : Type ?u.554939
K : Type ?u.554942
M : Type u_6
M' : Type u_7
M'' : Type u_3
V : Type u
V' : Type ?u.554956
inst✝⁶ : Semiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid M'
inst✝² : Module R M'
b b₁ : Basis ι R M
i✝ : ι
c : R
x : M
b' : Basis ι' R M'
e✝ : ι ≃ ι'
inst✝¹ : AddCommMonoid M''
inst✝ : Module R M''
ι'' : Type u_1
b'' : Basis ι'' R M''
e : ι ≃ ι'
e' : ι' ≃ ι''
i : ι
⊢ ↑(LinearEquiv.trans (Basis.equiv b b' e) (Basis.equiv b' b'' e')) (↑b i) = ↑(Basis.equiv b b'' (e.trans e')) (↑b i)
Theorem: Behrend.sum_eq
File: Mathlib/Combinatorics/Additive/Behrend.lean

tactic: refine' (Nat.div_eq_of_eq_mul_left zero_lt_two _).symm
state_before: α : Type ?u.504241
β : Type ?u.504244
n d k N : ℕ
x : Fin n → ℕ
⊢ ∑ i : Fin n, d * (2 * d + 1) ^ ↑i = ((2 * d + 1) ^ n - 1) / 2

tactic: rw [← sum_range fun i => d * (2 * d + 1) ^ (i : ℕ), ← mul_sum, mul_right_comm, mul_comm d, ←
  geom_sum_mul_add, add_tsub_cancel_right, mul_comm]
state_before: α : Type ?u.504241
β : Type ?u.504244
n d k N : ℕ
x : Fin n → ℕ
⊢ (2 * d + 1) ^ n - 1 = (∑ i : Fin n, d * (2 * d + 1) ^ ↑i) * 2
Theorem: IsUpperSet.thickening'
File: Mathlib/Analysis/Normed/Order/UpperLower.lean

tactic: rw [← ball_mul_one]
state_before: α : Type u_1
ι : Type ?u.23
inst✝ : NormedOrderedGroup α
s : Set α
hs : IsUpperSet s
ε : ℝ
⊢ IsUpperSet (thickening ε s)

tactic: exact hs.mul_left
state_before: α : Type u_1
ι : Type ?u.23
inst✝ : NormedOrderedGroup α
s : Set α
hs : IsUpperSet s
ε : ℝ
⊢ IsUpperSet (ball 1 ε * s)
Theorem: Polynomial.derivative_pow
File: Mathlib/Data/Polynomial/Derivative.lean

tactic: rw [pow_zero, derivative_one, Nat.cast_zero, C_0, zero_mul, zero_mul]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝ : CommSemiring R
p : R[X]
n : ℕ
⊢ ↑derivative (p ^ Nat.zero) = ↑C ↑Nat.zero * p ^ (Nat.zero - 1) * ↑derivative p

tactic: rw [p.derivative_pow_succ n, n.succ_sub_one, n.cast_succ]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝¹ : ℕ
inst✝ : CommSemiring R
p : R[X]
n✝ n : ℕ
⊢ ↑derivative (p ^ Nat.succ n) = ↑C ↑(Nat.succ n) * p ^ (Nat.succ n - 1) * ↑derivative p
Theorem: sum_hom_units
File: Mathlib/RingTheory/IntegralDomain.lean

tactic: split_ifs with h
state_before: R : Type u_2
G : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : Group G
inst✝¹ : Fintype G
f : G →* R
inst✝ : Decidable (f = 1)
⊢ ∑ g : G, ↑f g = ↑(if f = 1 then Fintype.card G else 0)

tactic: simp [h, card_univ]
state_before: case inl
R : Type u_2
G : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : Group G
inst✝¹ : Fintype G
f : G →* R
inst✝ : Decidable (f = 1)
h : f = 1
⊢ ∑ g : G, ↑f g = ↑(Fintype.card G)

tactic: rw [cast_zero]
state_before: case inr
R : Type u_2
G : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : Group G
inst✝¹ : Fintype G
f : G →* R
inst✝ : Decidable (f = 1)
h : ¬f = 1
⊢ ∑ g : G, ↑f g = ↑0

tactic: exact sum_hom_units_eq_zero f h
state_before: case inr
R : Type u_2
G : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : Group G
inst✝¹ : Fintype G
f : G →* R
inst✝ : Decidable (f = 1)
h : ¬f = 1
⊢ ∑ g : G, ↑f g = 0
Theorem: Equiv.Perm.support_swap_mul_swap
File: Mathlib/GroupTheory/Perm/Support.lean

tactic: simp only [List.not_mem_nil, and_true_iff, List.mem_cons, not_false_iff, List.nodup_cons,
  List.mem_singleton, and_self_iff, List.nodup_nil] at h
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y z : α
h : List.Nodup [x, y, z]
⊢ support (swap x y * swap y z) = {x, y, z}

tactic: push_neg  at h
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y z : α
h : ¬(x = y ∨ x = z ∨ False) ∧ ¬(y = z ∨ False)
⊢ support (swap x y * swap y z) = {x, y, z}

tactic: apply le_antisymm
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y z : α
h : (x ≠ y ∧ x ≠ z ∧ ¬False) ∧ y ≠ z ∧ ¬False
⊢ support (swap x y * swap y z) = {x, y, z}

tactic: convert support_mul_le (swap x y) (swap y z) using 1
state_before: case a
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y z : α
h : (x ≠ y ∧ x ≠ z ∧ ¬False) ∧ y ≠ z ∧ ¬False
⊢ support (swap x y * swap y z) ≤ {x, y, z}

tactic: rw [support_swap h.left.left, support_swap h.right.left]
state_before: case h.e'_4
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y z : α
h : (x ≠ y ∧ x ≠ z ∧ ¬False) ∧ y ≠ z ∧ ¬False
⊢ {x, y, z} = support (swap x y) ⊔ support (swap y z)

tactic: simp only [sup_eq_union]
state_before: case h.e'_4
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y z : α
h : (x ≠ y ∧ x ≠ z ∧ ¬False) ∧ y ≠ z ∧ ¬False
⊢ {x, y, z} = {x, y} ⊔ {y, z}

tactic: simp only [mem_singleton, mem_insert, union_insert, insert_union, mem_union, true_or, or_true,
  insert_eq_of_mem]
state_before: case h.e'_4
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y z : α
h : (x ≠ y ∧ x ≠ z ∧ ¬False) ∧ y ≠ z ∧ ¬False
⊢ {x, y, z} = {x, y} ∪ {y, z}

tactic: rfl
state_before: case h.e'_4
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y z : α
h : (x ≠ y ∧ x ≠ z ∧ ¬False) ∧ y ≠ z ∧ ¬False
⊢ {x, y, z} = insert x ({y} ∪ {z})

tactic: intro
state_before: case a
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y z : α
h : (x ≠ y ∧ x ≠ z ∧ ¬False) ∧ y ≠ z ∧ ¬False
⊢ {x, y, z} ≤ support (swap x y * swap y z)

tactic: simp only [mem_insert, mem_singleton]
state_before: case a
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y z : α
h : (x ≠ y ∧ x ≠ z ∧ ¬False) ∧ y ≠ z ∧ ¬False
a✝ : α
⊢ a✝ ∈ {x, y, z} → a✝ ∈ support (swap x y * swap y z)

tactic: rintro (rfl | rfl | rfl | _) <;>
  simp [swap_apply_of_ne_of_ne, h.left.left, h.left.left.symm, h.left.right.symm,
    h.left.right.left.symm, h.right.left.symm]
state_before: case a
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
x y z : α
h : (x ≠ y ∧ x ≠ z ∧ ¬False) ∧ y ≠ z ∧ ¬False
a✝ : α
⊢ a✝ = x ∨ a✝ = y ∨ a✝ = z → a✝ ∈ support (swap x y * swap y z)
Theorem: addRothNumber_Ico
File: Mathlib/Combinatorics/Additive/SalemSpencer.lean

tactic: obtain h | h := le_total b a
state_before: F : Type ?u.153476
α : Type ?u.153479
β : Type ?u.153482
𝕜 : Type ?u.153485
E : Type ?u.153488
s : Finset ℕ
k n a b : ℕ
⊢ ↑addRothNumber (Ico a b) = ↑rothNumberNat (b - a)

tactic: convert addRothNumber_map_add_left _ a
state_before: case inr
F : Type ?u.153476
α : Type ?u.153479
β : Type ?u.153482
𝕜 : Type ?u.153485
E : Type ?u.153488
s : Finset ℕ
k n a b : ℕ
h : a ≤ b
⊢ ↑addRothNumber (Ico a b) = ↑rothNumberNat (b - a)

tactic: rw [range_eq_Ico, map_eq_image]
state_before: case h.e'_2.h.e'_6
F : Type ?u.153476
α : Type ?u.153479
β : Type ?u.153482
𝕜 : Type ?u.153485
E : Type ?u.153488
s : Finset ℕ
k n a b : ℕ
h : a ≤ b
⊢ Ico a b = map (addLeftEmbedding a) (range (b - a))

tactic: convert(image_add_left_Ico 0 (b - a) _).symm
state_before: case h.e'_2.h.e'_6
F : Type ?u.153476
α : Type ?u.153479
β : Type ?u.153482
𝕜 : Type ?u.153485
E : Type ?u.153488
s : Finset ℕ
k n a b : ℕ
h : a ≤ b
⊢ Ico a b = image (↑(addLeftEmbedding a)) (Ico 0 (b - a))

tactic: exact (add_tsub_cancel_of_le h).symm
state_before: case h.e'_2.h.e'_5
F : Type ?u.153476
α : Type ?u.153479
β : Type ?u.153482
𝕜 : Type ?u.153485
E : Type ?u.153488
s : Finset ℕ
k n a b : ℕ
h : a ≤ b
⊢ b = a + (b - a)

tactic: rw [tsub_eq_zero_of_le h, Ico_eq_empty_of_le h, rothNumberNat_zero, addRothNumber_empty]
state_before: case inl
F : Type ?u.153476
α : Type ?u.153479
β : Type ?u.153482
𝕜 : Type ?u.153485
E : Type ?u.153488
s : Finset ℕ
k n a b : ℕ
h : b ≤ a
⊢ ↑addRothNumber (Ico a b) = ↑rothNumberNat (b - a)
Theorem: Set.diff_eq_compl_inter
File: Mathlib/Data/Set/Basic.lean

tactic: rw [diff_eq, inter_comm]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s✝ s₁ s₂ t✝ t₁ t₂ u s t : Set α
⊢ s \ t = tᶜ ∩ s
Theorem: QuotientGroup.subgroup_eq_top_of_subsingleton
File: Mathlib/GroupTheory/QuotientGroup.lean

tactic: have this : 1⁻¹ * x ∈ H := QuotientGroup.eq.1 (Subsingleton.elim _ _)
state_before: G : Type u
inst✝¹ : Group G
N : Subgroup G
nN : Subgroup.Normal N
H✝ : Type v
inst✝ : Group H✝
φ : G →* H✝
H : Subgroup G
h : Subsingleton (G ⧸ H)
x : G
x✝ : x ∈ ⊤
⊢ x ∈ H

tactic: rwa [inv_one, one_mul] at this
state_before: G : Type u
inst✝¹ : Group G
N : Subgroup G
nN : Subgroup.Normal N
H✝ : Type v
inst✝ : Group H✝
φ : G →* H✝
H : Subgroup G
h : Subsingleton (G ⧸ H)
x : G
x✝ : x ∈ ⊤
this : 1⁻¹ * x ∈ H
⊢ x ∈ H
Theorem: one_le_one_div
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rwa [le_one_div (@zero_lt_one α _ _ _ _ _) h1, one_div_one]
state_before: ι : Type ?u.88530
α : Type u_1
β : Type ?u.88536
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
h1 : 0 < a
h2 : a ≤ 1
⊢ 1 ≤ 1 / a
Theorem: joinedIn_univ
File: Mathlib/Topology/PathConnected.lean

tactic: simp [JoinedIn, Joined, exists_true_iff_nonempty]
state_before: X : Type u_1
Y : Type ?u.615739
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type ?u.615754
F : Set X
⊢ JoinedIn univ x y ↔ Joined x y
Theorem: MeasureTheory.integral_add
File: Mathlib/MeasureTheory/Integral/Bochner.lean

tactic: simp only [integral, L1.integral]
state_before: α : Type u_2
E : Type u_1
F : Type ?u.886766
𝕜 : Type ?u.886769
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : CompleteSpace E
inst✝⁵ : NontriviallyNormedField 𝕜
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : SMulCommClass ℝ 𝕜 E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
f g : α → E
m : MeasurableSpace α
μ : Measure α
hf : Integrable f
hg : Integrable g
⊢ (∫ (a : α), f a + g a ∂μ) = (∫ (a : α), f a ∂μ) + ∫ (a : α), g a ∂μ

tactic: exact setToFun_add (dominatedFinMeasAdditive_weightedSMul μ) hf hg
state_before: α : Type u_2
E : Type u_1
F : Type ?u.886766
𝕜 : Type ?u.886769
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : CompleteSpace E
inst✝⁵ : NontriviallyNormedField 𝕜
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : SMulCommClass ℝ 𝕜 E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
f g : α → E
m : MeasurableSpace α
μ : Measure α
hf : Integrable f
hg : Integrable g
⊢ (if hf : Integrable fun a => f a + g a then ↑L1.integralCLM (Integrable.toL1 (fun a => f a + g a) hf) else 0) =
    (if hf : Integrable fun a => f a then ↑L1.integralCLM (Integrable.toL1 (fun a => f a) hf) else 0) +
      if hf : Integrable fun a => g a then ↑L1.integralCLM (Integrable.toL1 (fun a => g a) hf) else 0