tasksource/leandojo huggingface dataset:
Theorem: Finset.sum_single_ite
File: Mathlib/LinearAlgebra/FinsuppVectorSpace.lean

tactic: rw [Finset.sum_congr_set {i} (fun x : n => Finsupp.single x (ite (i = x) a 0)) fun _ =>
    Finsupp.single i a]
state_before: R : Type u_1
M : Type ?u.93176
n : Type u_2
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
a : R
i : n
⊢ (Finset.sum Finset.univ fun x => Finsupp.single x (if i = x then a else 0)) = Finsupp.single i a

tactic: intro x hx
state_before: case w'
R : Type u_1
M : Type ?u.93176
n : Type u_2
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
a : R
i : n
⊢ ∀ (x : n), ¬x ∈ {i} → Finsupp.single x (if i = x then a else 0) = 0

tactic: have hx' : ¬i = x := by
  refine' ne_comm.mp _
  rwa [mem_singleton_iff] at hx
state_before: case w'
R : Type u_1
M : Type ?u.93176
n : Type u_2
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
a : R
i x : n
hx : ¬x ∈ {i}
⊢ Finsupp.single x (if i = x then a else 0) = 0

tactic: simp [hx']
state_before: case w'
R : Type u_1
M : Type ?u.93176
n : Type u_2
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
a : R
i x : n
hx : ¬x ∈ {i}
hx' : ¬i = x
⊢ Finsupp.single x (if i = x then a else 0) = 0

tactic: simp
state_before: R : Type u_1
M : Type ?u.93176
n : Type u_2
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
a : R
i : n
⊢ (Finset.sum Finset.univ fun x => Finsupp.single i a) = Finsupp.single i a

tactic: intro x hx
state_before: case w
R : Type u_1
M : Type ?u.93176
n : Type u_2
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
a : R
i : n
⊢ ∀ (x : n), x ∈ {i} → Finsupp.single x (if i = x then a else 0) = Finsupp.single i a

tactic: rw [Set.mem_singleton_iff] at hx
state_before: case w
R : Type u_1
M : Type ?u.93176
n : Type u_2
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
a : R
i x : n
hx : x ∈ {i}
⊢ Finsupp.single x (if i = x then a else 0) = Finsupp.single i a

tactic: simp [hx]
state_before: case w
R : Type u_1
M : Type ?u.93176
n : Type u_2
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
a : R
i x : n
hx : x = i
⊢ Finsupp.single x (if i = x then a else 0) = Finsupp.single i a

tactic: refine' ne_comm.mp _
state_before: R : Type u_1
M : Type ?u.93176
n : Type u_2
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
a : R
i x : n
hx : ¬x ∈ {i}
⊢ ¬i = x

tactic: rwa [mem_singleton_iff] at hx
state_before: R : Type u_1
M : Type ?u.93176
n : Type u_2
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
a : R
i x : n
hx : ¬x ∈ {i}
⊢ x ≠ i
Theorem: Fin.image_castSucc
File: Mathlib/Data/Fintype/Basic.lean

tactic: rw [← Fin.succAbove_last, Fin.image_succAbove_univ]
state_before: α : Type ?u.103387
β : Type ?u.103390
γ : Type ?u.103393
n : ℕ
⊢ image (↑castSucc) univ = {last n}ᶜ
Theorem: Polynomial.roots_C_mul
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: by_cases hp : p = 0 <;>
  simp only [roots_mul, *, Ne.def, mul_eq_zero, C_eq_zero, or_self_iff, not_false_iff, roots_C,
    zero_add, MulZeroClass.mul_zero]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p✝ q p : R[X]
ha : a ≠ 0
⊢ roots (↑C a * p) = roots p
Theorem: SignType.self_eq_neg_iff
File: Mathlib/Data/Sign.lean

tactic: cases a <;> decide
state_before: a : SignType
⊢ a = -a ↔ a = 0
Theorem: MeasureTheory.snormEssSup_const_smul
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: simp_rw [snormEssSup, Pi.smul_apply, nnnorm_smul, ENNReal.coe_mul, ENNReal.essSup_const_mul]
state_before: α : Type u_1
E : Type ?u.5974976
F : Type u_2
G : Type ?u.5974982
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedAddCommGroup F
inst✝⁵ : NormedAddCommGroup G
𝕜 : Type u_3
inst✝⁴ : NormedDivisionRing 𝕜
inst✝³ : MulActionWithZero 𝕜 E
inst✝² : Module 𝕜 F
inst✝¹ : BoundedSMul 𝕜 E
inst✝ : BoundedSMul 𝕜 F
c : 𝕜
f : α → F
⊢ snormEssSup (c • f) μ = ↑‖c‖₊ * snormEssSup f μ
Theorem: AbsoluteValue.map_sub
File: Mathlib/Algebra/Order/AbsoluteValue.lean

tactic: rw [← neg_sub, abv.map_neg]
state_before: R : Type u_2
S : Type u_1
inst✝² : Ring R
inst✝¹ : OrderedCommRing S
abv : AbsoluteValue R S
inst✝ : NoZeroDivisors S
a b : R
⊢ ↑abv (a - b) = ↑abv (b - a)
Theorem: surjOn_Ioc_of_monotone_surjective
File: Mathlib/Data/Set/Intervals/SurjOn.lean

tactic: simpa using surjOn_Ico_of_monotone_surjective h_mono.dual h_surj (toDual b) (toDual a)
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a b : α
⊢ SurjOn f (Ioc a b) (Ioc (f a) (f b))
Theorem: NonUnitalStarAlgHom.fst_prod
File: Mathlib/Algebra/Star/StarAlgHom.lean

tactic: ext
state_before: R : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
inst✝⁹ : Monoid R
inst✝⁸ : NonUnitalNonAssocSemiring A
inst✝⁷ : DistribMulAction R A
inst✝⁶ : Star A
inst✝⁵ : NonUnitalNonAssocSemiring B
inst✝⁴ : DistribMulAction R B
inst✝³ : Star B
inst✝² : NonUnitalNonAssocSemiring C
inst✝¹ : DistribMulAction R C
inst✝ : Star C
f : A →⋆ₙₐ[R] B
g : A →⋆ₙₐ[R] C
⊢ comp (fst R B C) (prod f g) = f

tactic: rfl
state_before: case h
R : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
inst✝⁹ : Monoid R
inst✝⁸ : NonUnitalNonAssocSemiring A
inst✝⁷ : DistribMulAction R A
inst✝⁶ : Star A
inst✝⁵ : NonUnitalNonAssocSemiring B
inst✝⁴ : DistribMulAction R B
inst✝³ : Star B
inst✝² : NonUnitalNonAssocSemiring C
inst✝¹ : DistribMulAction R C
inst✝ : Star C
f : A →⋆ₙₐ[R] B
g : A →⋆ₙₐ[R] C
x✝ : A
⊢ ↑(comp (fst R B C) (prod f g)) x✝ = ↑f x✝
Theorem: compare_lt_iff_lt
File: Mathlib/Init/Algebra/Order.lean

tactic: rw [LinearOrder.compare_eq_compareOfLessAndEq, compareOfLessAndEq]
state_before: α : Type u
inst✝ : LinearOrder α
a b : α
⊢ compare a b = Ordering.lt ↔ a < b

tactic: split_ifs <;> simp only [*, lt_irrefl]
state_before: α : Type u
inst✝ : LinearOrder α
a b : α
⊢ (if a < b then Ordering.lt else if a = b then Ordering.eq else Ordering.gt) = Ordering.lt ↔ a < b
Theorem: Sylow.subtype_injective
File: Mathlib/GroupTheory/Sylow.lean

tactic: rw [SetLike.ext_iff] at h⊢
state_before: p : ℕ
G : Type u_1
inst✝¹ : Group G
P✝ : Sylow p G
K : Type ?u.48738
inst✝ : Group K
ϕ : K →* G
N : Subgroup G
P Q : Sylow p G
hP : ↑P ≤ N
hQ : ↑Q ≤ N
h : Sylow.subtype P hP = Sylow.subtype Q hQ
⊢ P = Q

tactic: exact fun g => ⟨fun hg => (h ⟨g, hP hg⟩).mp hg, fun hg => (h ⟨g, hQ hg⟩).mpr hg⟩
state_before: p : ℕ
G : Type u_1
inst✝¹ : Group G
P✝ : Sylow p G
K : Type ?u.48738
inst✝ : Group K
ϕ : K →* G
N : Subgroup G
P Q : Sylow p G
hP : ↑P ≤ N
hQ : ↑Q ≤ N
h✝ : Sylow.subtype P hP = Sylow.subtype Q hQ
h : ∀ (x : { x // x ∈ N }), x ∈ Sylow.subtype P hP ↔ x ∈ Sylow.subtype Q hQ
⊢ ∀ (x : G), x ∈ P ↔ x ∈ Q
Theorem: Complex.arg_zero
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

tactic: simp [arg, le_refl]
state_before: ⊢ arg 0 = 0
Theorem: Matrix.rank_reindex
File: Mathlib/Data/Matrix/Rank.lean

tactic: rw [rank, rank, mulVecLin_reindex, LinearMap.range_comp, LinearMap.range_comp,
  LinearEquiv.range, Submodule.map_top, LinearEquiv.finrank_map_eq]
state_before: l : Type ?u.175068
m : Type u_1
n : Type u_2
o : Type ?u.175077
R : Type u_3
m_fin : Fintype m
inst✝³ : Fintype n
inst✝² : Fintype o
inst✝¹ : CommRing R
inst✝ : Fintype m
e₁ e₂ : m ≃ n
A : Matrix m m R
⊢ rank (↑(reindex e₁ e₂) A) = rank A
Theorem: Asymptotics.SuperpolynomialDecay.mul
File: Mathlib/Analysis/Asymptotics/SuperpolynomialDecay.lean

tactic: simpa only [mul_assoc, one_mul, MulZeroClass.mul_zero, pow_zero] using (hf z).mul (hg 0)
state_before: α : Type u_2
β : Type u_1
l : Filter α
k f g g' : α → β
inst✝² : TopologicalSpace β
inst✝¹ : CommSemiring β
inst✝ : ContinuousMul β
hf : SuperpolynomialDecay l k f
hg : SuperpolynomialDecay l k g
z : ℕ
⊢ Tendsto (fun a => k a ^ z * (f * g) a) l (𝓝 0)
Theorem: List.getD_singleton_default_eq
File: Mathlib/Data/List/Basic.lean

tactic: cases n <;> simp
state_before: ι : Type ?u.502615
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l : List α
x : α
xs : List α
d : α
n✝ n : ℕ
⊢ getD [d] n d = d
Theorem: CategoryTheory.Limits.limit.pre_post
File: Mathlib/CategoryTheory/Limits/HasLimits.lean

tactic: haveI : HasLimit (E ⋙  F ⋙  G) := h
state_before: J : Type u₁
inst✝⁶ : Category J
K : Type u₂
inst✝⁵ : Category K
C : Type u
inst✝⁴ : Category C
F✝ : J ⥤ C
D : Type u'
inst✝³ : Category D
E : K ⥤ J
F : J ⥤ C
G : C ⥤ D
inst✝² : HasLimit F
inst✝¹ : HasLimit (E ⋙ F)
inst✝ : HasLimit (F ⋙ G)
h : HasLimit ((E ⋙ F) ⋙ G)
⊢ G.map (pre F E) ≫ post (E ⋙ F) G = post F G ≫ pre (F ⋙ G) E

tactic: ext
state_before: J : Type u₁
inst✝⁶ : Category J
K : Type u₂
inst✝⁵ : Category K
C : Type u
inst✝⁴ : Category C
F✝ : J ⥤ C
D : Type u'
inst✝³ : Category D
E : K ⥤ J
F : J ⥤ C
G : C ⥤ D
inst✝² : HasLimit F
inst✝¹ : HasLimit (E ⋙ F)
inst✝ : HasLimit (F ⋙ G)
h : HasLimit ((E ⋙ F) ⋙ G)
this : HasLimit (E ⋙ F ⋙ G)
⊢ G.map (pre F E) ≫ post (E ⋙ F) G = post F G ≫ pre (F ⋙ G) E

tactic: erw [assoc, limit.post_π, ← G.map_comp, limit.pre_π, assoc, limit.pre_π, limit.post_π]
state_before: case w
J : Type u₁
inst✝⁶ : Category J
K : Type u₂
inst✝⁵ : Category K
C : Type u
inst✝⁴ : Category C
F✝ : J ⥤ C
D : Type u'
inst✝³ : Category D
E : K ⥤ J
F : J ⥤ C
G : C ⥤ D
inst✝² : HasLimit F
inst✝¹ : HasLimit (E ⋙ F)
inst✝ : HasLimit (F ⋙ G)
h : HasLimit ((E ⋙ F) ⋙ G)
this : HasLimit (E ⋙ F ⋙ G)
j✝ : K
⊢ (G.map (pre F E) ≫ post (E ⋙ F) G) ≫ π ((E ⋙ F) ⋙ G) j✝ = (post F G ≫ pre (F ⋙ G) E) ≫ π ((E ⋙ F) ⋙ G) j✝
Theorem: Down.mem_compression_of_insert_mem_compression
File: Mathlib/Combinatorics/SetFamily/Compression/Down.lean

tactic: by_cases ha : a ∈ s
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
h : insert a s ∈ 𝓓 a 𝒜
⊢ s ∈ 𝓓 a 𝒜

tactic: rwa [insert_eq_of_mem ha] at h
state_before: case pos
α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
h : insert a s ∈ 𝓓 a 𝒜
ha : a ∈ s
⊢ s ∈ 𝓓 a 𝒜

tactic: rw [← erase_insert ha]
state_before: case neg
α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
h : insert a s ∈ 𝓓 a 𝒜
ha : ¬a ∈ s
⊢ s ∈ 𝓓 a 𝒜

tactic: exact erase_mem_compression_of_mem_compression h
state_before: case neg
α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
h : insert a s ∈ 𝓓 a 𝒜
ha : ¬a ∈ s
⊢ erase (insert a s) a ∈ 𝓓 a 𝒜
Theorem: orderOf_eq_orderOf_iff
File: Mathlib/GroupTheory/OrderOfElement.lean

tactic: simp_rw [← isPeriodicPt_mul_iff_pow_eq_one, ← minimalPeriod_eq_minimalPeriod_iff, orderOf]
state_before: G : Type u
A : Type v
x y✝ : G
a b : A
n m : ℕ
inst✝² : Monoid G
inst✝¹ : AddMonoid A
H : Type u_1
inst✝ : Monoid H
y : H
⊢ orderOf x = orderOf y ↔ ∀ (n : ℕ), x ^ n = 1 ↔ y ^ n = 1
Theorem: CategoryTheory.Limits.IsBilimit.binary_total
File: Mathlib/CategoryTheory/Preadditive/Biproducts.lean

tactic: rcases j with ⟨⟨⟩⟩ <;> simp
state_before: C : Type u
inst✝² : Category C
inst✝¹ : Preadditive C
J : Type
inst✝ : Fintype J
X Y : C
b : BinaryBicone X Y
i : BinaryBicone.IsBilimit b
j : Discrete WalkingPair
⊢ (b.fst ≫ b.inl + b.snd ≫ b.inr) ≫ (BinaryBicone.toCone b).π.app j = 𝟙 b.pt ≫ (BinaryBicone.toCone b).π.app j
Theorem: Action.ρ_one
File: Mathlib/RepresentationTheory/Action.lean

tactic: rw [MonoidHom.map_one]
state_before: V : Type (u + 1)
inst✝ : LargeCategory V
G : MonCat
A : Action V G
⊢ ↑A.ρ 1 = 𝟙 A.V

tactic: rfl
state_before: V : Type (u + 1)
inst✝ : LargeCategory V
G : MonCat
A : Action V G
⊢ 1 = 𝟙 A.V
Theorem: MvPolynomial.totalDegree_multiset_prod
File: Mathlib/Data/MvPolynomial/Variables.lean

tactic: refine' Quotient.inductionOn s fun l => _
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.471246
r : R
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
s : Multiset (MvPolynomial σ R)
⊢ totalDegree (Multiset.prod s) ≤ Multiset.sum (Multiset.map totalDegree s)

tactic: rw [Multiset.quot_mk_to_coe, Multiset.coe_prod, Multiset.coe_map, Multiset.coe_sum]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.471246
r : R
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
s : Multiset (MvPolynomial σ R)
l : List (MvPolynomial σ R)
⊢ totalDegree (Multiset.prod (Quotient.mk (List.isSetoid (MvPolynomial σ R)) l)) ≤
    Multiset.sum (Multiset.map totalDegree (Quotient.mk (List.isSetoid (MvPolynomial σ R)) l))

tactic: exact totalDegree_list_prod l
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type ?u.471246
r : R
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
s : Multiset (MvPolynomial σ R)
l : List (MvPolynomial σ R)
⊢ totalDegree (List.prod l) ≤ List.sum (List.map totalDegree l)
Theorem: Polynomial.eval₂_congr
File: Mathlib/Data/Polynomial/Eval.lean

tactic: rintro rfl rfl rfl
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✝
R : Type u_1
S : Type u_2
inst✝¹ : Semiring R
inst✝ : Semiring S
f g : R →+* S
s t : S
φ ψ : R[X]
⊢ f = g → s = t → φ = ψ → eval₂ f s φ = eval₂ g t ψ

tactic: rfl
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✝
R : Type u_1
S : Type u_2
inst✝¹ : Semiring R
inst✝ : Semiring S
f : R →+* S
s : S
φ : R[X]
⊢ eval₂ f s φ = eval₂ f s φ
Theorem: Basis.constr_range
File: Mathlib/LinearAlgebra/Basis.lean

tactic: rw [b.constr_def S f, LinearMap.range_comp, LinearMap.range_comp, LinearEquiv.range, ←
  Finsupp.supported_univ, Finsupp.lmapDomain_supported, ← Set.image_univ, ←
  Finsupp.span_image_eq_map_total, Set.image_id]
state_before: ι : Type u_1
ι' : Type ?u.531644
R : Type u_3
R₂ : Type ?u.531650
K : Type ?u.531653
M : Type u_4
M' : Type u_2
M'' : Type ?u.531662
V : Type u
V' : Type ?u.531667
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
S : Type u_5
inst✝³ : Semiring S
inst✝² : Module S M'
inst✝¹ : SMulCommClass R S M'
inst✝ : Nonempty ι
f : ι → M'
⊢ LinearMap.range (↑(constr b S) f) = span R (range f)
Theorem: Matrix.cons_vecAlt1
File: Mathlib/Data/Fin/VecNotation.lean

tactic: rwa [add_assoc n, add_comm 1, ← add_assoc, ← add_assoc, add_right_cancel_iff,
  add_right_cancel_iff] at h
state_before: α : Type u
m n o : ℕ
m' : Type ?u.52150
n' : Type ?u.52153
o' : Type ?u.52156
h : m + 1 + 1 = n + 1 + (n + 1)
x y : α
u : Fin m → α
⊢ m = n + n

tactic: ext i
state_before: α : Type u
m n o : ℕ
m' : Type ?u.52150
n' : Type ?u.52153
o' : Type ?u.52156
h : m + 1 + 1 = n + 1 + (n + 1)
x y : α
u : Fin m → α
⊢ vecAlt1 h (vecCons x (vecCons y u)) = vecCons y (vecAlt1 (_ : m = n + n) u)

tactic: simp_rw [vecAlt1]
state_before: case h
α : Type u
m n o : ℕ
m' : Type ?u.52150
n' : Type ?u.52153
o' : Type ?u.52156
h : m + 1 + 1 = n + 1 + (n + 1)
x y : α
u : Fin m → α
i : Fin (n + 1)
⊢ vecAlt1 h (vecCons x (vecCons y u)) i = vecCons y (vecAlt1 (_ : m = n + n) u) i

tactic: rcases i with ⟨⟨⟩ | i, hi⟩
state_before: case h
α : Type u
m n o : ℕ
m' : Type ?u.52150
n' : Type ?u.52153
o' : Type ?u.52156
h : m + 1 + 1 = n + 1 + (n + 1)
x y : α
u : Fin m → α
i : Fin (n + 1)
⊢ vecCons x (vecCons y u) { val := ↑i + ↑i + 1, isLt := (_ : ↑i + ↑i + 1 < m + 1 + 1) } =
    vecCons y (fun k => u { val := ↑k + ↑k + 1, isLt := (_ : ↑k + ↑k + 1 < m) }) i

tactic: rfl
state_before: case h.mk.zero
α : Type u
m n o : ℕ
m' : Type ?u.52150
n' : Type ?u.52153
o' : Type ?u.52156
h : m + 1 + 1 = n + 1 + (n + 1)
x y : α
u : Fin m → α
hi : Nat.zero < n + 1
⊢ vecCons x (vecCons y u)
      { val := ↑{ val := Nat.zero, isLt := hi } + ↑{ val := Nat.zero, isLt := hi } + 1,
        isLt := (_ : ↑{ val := Nat.zero, isLt := hi } + ↑{ val := Nat.zero, isLt := hi } + 1 < m + 1 + 1) } =
    vecCons y (fun k => u { val := ↑k + ↑k + 1, isLt := (_ : ↑k + ↑k + 1 < m) }) { val := Nat.zero, isLt := hi }

tactic: simp [vecAlt1, Nat.add_succ, Nat.succ_add]
state_before: case h.mk.succ
α : Type u
m n o : ℕ
m' : Type ?u.52150
n' : Type ?u.52153
o' : Type ?u.52156
h : m + 1 + 1 = n + 1 + (n + 1)
x y : α
u : Fin m → α
i : ℕ
hi : Nat.succ i < n + 1
⊢ vecCons x (vecCons y u)
      { val := ↑{ val := Nat.succ i, isLt := hi } + ↑{ val := Nat.succ i, isLt := hi } + 1,
        isLt := (_ : ↑{ val := Nat.succ i, isLt := hi } + ↑{ val := Nat.succ i, isLt := hi } + 1 < m + 1 + 1) } =
    vecCons y (fun k => u { val := ↑k + ↑k + 1, isLt := (_ : ↑k + ↑k + 1 < m) }) { val := Nat.succ i, isLt := hi }
Theorem: Option.map₂_right_comm
File: Mathlib/Data/Option/NAry.lean

tactic: cases a <;> cases b <;> cases c <;> simp [h_right_comm]
state_before: α : Type u_5
β : Type u_6
γ : Type u_4
f✝ : α → β → γ
a : Option α
b : Option β
c : Option γ
δ : Type u_1
ε : Type u_2
δ' : Type u_3
f : δ → γ → ε
g : α → β → δ
f' : α → γ → δ'
g' : δ' → β → ε
h_right_comm : ∀ (a : α) (b : β) (c : γ), f (g a b) c = g' (f' a c) b
⊢ map₂ f (map₂ g a b) c = map₂ g' (map₂ f' a c) b
Theorem: Nat.gcd_gcd_self_left_left
File: Std/Data/Nat/Gcd.lean

tactic: rw [gcd_comm m n, gcd_gcd_self_left_right]
state_before: m n : Nat
⊢ gcd (gcd m n) m = gcd m n
Theorem: split_equalCharZero_mixedCharZero
File: Mathlib/Algebra/CharP/MixedCharZero.lean

tactic: by_cases h : ∃ p > 0, MixedCharZero R p
state_before: R : Type u_1
inst✝¹ : CommRing R
P : Prop
inst✝ : CharZero R
h_equal : Algebra ℚ R → P
h_mixed : ∀ (p : ℕ), Nat.Prime p → MixedCharZero R p → P
⊢ P

tactic: rcases h with ⟨p, ⟨H, hp⟩⟩
state_before: case pos
R : Type u_1
inst✝¹ : CommRing R
P : Prop
inst✝ : CharZero R
h_equal : Algebra ℚ R → P
h_mixed : ∀ (p : ℕ), Nat.Prime p → MixedCharZero R p → P
h : ∃ p, p > 0 ∧ MixedCharZero R p
⊢ P

tactic: rw [← MixedCharZero.reduce_to_p_prime] at h_mixed
state_before: case pos.intro.intro
R : Type u_1
inst✝¹ : CommRing R
P : Prop
inst✝ : CharZero R
h_equal : Algebra ℚ R → P
h_mixed : ∀ (p : ℕ), Nat.Prime p → MixedCharZero R p → P
p : ℕ
H : p > 0
hp : MixedCharZero R p
⊢ P

tactic: exact h_mixed p H hp
state_before: case pos.intro.intro
R : Type u_1
inst✝¹ : CommRing R
P : Prop
inst✝ : CharZero R
h_equal : Algebra ℚ R → P
h_mixed : ∀ (p : ℕ), p > 0 → MixedCharZero R p → P
p : ℕ
H : p > 0
hp : MixedCharZero R p
⊢ P

tactic: apply h_equal
state_before: case neg
R : Type u_1
inst✝¹ : CommRing R
P : Prop
inst✝ : CharZero R
h_equal : Algebra ℚ R → P
h_mixed : ∀ (p : ℕ), Nat.Prime p → MixedCharZero R p → P
h : ¬∃ p, p > 0 ∧ MixedCharZero R p
⊢ P

tactic: rw [← isEmpty_algebraRat_iff_mixedCharZero, not_isEmpty_iff] at h
state_before: case neg
R : Type u_1
inst✝¹ : CommRing R
P : Prop
inst✝ : CharZero R
h_equal : Algebra ℚ R → P
h_mixed : ∀ (p : ℕ), Nat.Prime p → MixedCharZero R p → P
h : ¬∃ p, p > 0 ∧ MixedCharZero R p
⊢ Algebra ℚ R

tactic: exact h.some
state_before: case neg
R : Type u_1
inst✝¹ : CommRing R
P : Prop
inst✝ : CharZero R
h_equal : Algebra ℚ R → P
h_mixed : ∀ (p : ℕ), Nat.Prime p → MixedCharZero R p → P
h : Nonempty (Algebra ℚ R)
⊢ Algebra ℚ R
Theorem: CategoryTheory.NonPreadditiveAbelian.add_neg
File: Mathlib/CategoryTheory/Abelian/NonPreadditive.lean

tactic: rw [add_def, neg_neg]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : NonPreadditiveAbelian C
X Y : C
a b : X ⟶ Y
⊢ a + -b = a - b
Theorem: UInt8.toChar_aux
File: Mathlib/Data/UInt.lean

tactic: rw [UInt32.val_eq_of_lt]
state_before: n : ℕ
h : n < size
⊢ Nat.isValidChar ↑(UInt32.ofNat n).val

tactic: exact Or.inl $ Nat.lt_trans h $ by decide
state_before: n : ℕ
h : n < size
⊢ Nat.isValidChar n

n : ℕ
h : n < size
⊢ n < UInt32.size

tactic: exact Nat.lt_trans h $ by decide
state_before: n : ℕ
h : n < size
⊢ n < UInt32.size

tactic: decide
state_before: n : ℕ
h : n < size
⊢ size < 55296

tactic: decide
state_before: n : ℕ
h : n < size
⊢ size < UInt32.size
Theorem: Set.image_const_sub_Ico
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: have := image_comp (fun x => a + x) fun x => -x
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ (fun x => a - x) '' Ico b c = Ioc (a - c) (a - b)

tactic: dsimp [Function.comp] at this
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
this : ∀ (a_1 : Set α), ((fun x => a + x) ∘ fun x => -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)
⊢ (fun x => a - x) '' Ico b c = Ioc (a - c) (a - b)

tactic: simp [sub_eq_add_neg, this, add_comm]
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
this : ∀ (a_1 : Set α), (fun x => a + -x) '' a_1 = (fun x => a + x) '' ((fun x => -x) '' a_1)
⊢ (fun x => a - x) '' Ico b c = Ioc (a - c) (a - b)
Theorem: NNReal.tsum_eq_add_tsum_ite
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: refine' tsum_eq_add_tsum_ite' i (NNReal.summable_of_le (fun i' => _) hf)
state_before: α : Type u_1
β : Type ?u.330764
γ : Type ?u.330767
f : α → ℝ≥0
hf : Summable f
i : α
⊢ (∑' (x : α), f x) = f i + ∑' (x : α), if x = i then 0 else f x

tactic: rw [Function.update_apply]
state_before: α : Type u_1
β : Type ?u.330764
γ : Type ?u.330767
f : α → ℝ≥0
hf : Summable f
i i' : α
⊢ update (fun x => f x) i 0 i' ≤ f i'

tactic: split_ifs <;> simp only [zero_le', le_rfl]
state_before: α : Type u_1
β : Type ?u.330764
γ : Type ?u.330767
f : α → ℝ≥0
hf : Summable f
i i' : α
⊢ (if i' = i then 0 else f i') ≤ f i'
Theorem: Ordnode.insert'_eq_insertWith
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: unfold insert' insertWith
state_before: α : Type u_1
inst✝¹ : Preorder α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
x : α
size✝ : ℕ
l : Ordnode α
y : α
r : Ordnode α
⊢ insert' x (node size✝ l y r) = insertWith id x (node size✝ l y r)

tactic: cases cmpLE x y <;> simp [insert'_eq_insertWith]
state_before: α : Type u_1
inst✝¹ : Preorder α
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
x : α
size✝ : ℕ
l : Ordnode α
y : α
r : Ordnode α
⊢ (match cmpLE x y with
    | Ordering.lt => balanceL (insert' x l) y r
    | Ordering.eq => node size✝ l y r
    | Ordering.gt => balanceR l y (insert' x r)) =
    match cmpLE x y with
    | Ordering.lt => balanceL (insertWith id x l) y r
    | Ordering.eq => node size✝ l (id y) r
    | Ordering.gt => balanceR l y (insertWith id x r)