tasksource/leandojo huggingface dataset:
Theorem: Encodable.Subtype.encode_eq
File: Mathlib/Logic/Encodable/Basic.lean

tactic: cases a
state_before: α : Type u_1
β : Type ?u.28657
P : α → Prop
encA : Encodable α
decP : DecidablePred P
a : Subtype P
⊢ encode a = encode ↑a

tactic: rfl
state_before: case mk
α : Type u_1
β : Type ?u.28657
P : α → Prop
encA : Encodable α
decP : DecidablePred P
val✝ : α
property✝ : P val✝
⊢ encode { val := val✝, property := property✝ } = encode ↑{ val := val✝, property := property✝ }
Theorem: Nat.Prime.coprime_iff_not_dvd
File: Mathlib/Data/Nat/Prime.lean

tactic: simp [d]
state_before: p n : ℕ
pp : Prime p
co : coprime p n
d : p ∣ n
⊢ p ∣ n * 1
Theorem: MeasureTheory.eventually_div_right_iff
File: Mathlib/MeasureTheory/Group/Measure.lean

tactic: conv_rhs => rw [Filter.Eventually, ← map_div_right_ae μ t]; rfl
state_before: 𝕜 : Type ?u.494359
G : Type u_1
H : Type ?u.494365
inst✝⁴ : MeasurableSpace G
inst✝³ : MeasurableSpace H
inst✝² : Group G
inst✝¹ : MeasurableMul G
μ : Measure G
inst✝ : IsMulRightInvariant μ
t : G
p : G → Prop
⊢ (∀ᵐ (x : G) ∂μ, p (x / t)) ↔ ∀ᵐ (x : G) ∂μ, p x
Theorem: Submodule.supIndep_torsionBy
File: Mathlib/Algebra/Module/Torsion.lean

tactic: convert supIndep_torsionBySet_ideal (M := M) fun i hi j hj ij =>
    (Ideal.sup_eq_top_iff_isCoprime (q i) _).mpr <| hq hi hj ij
state_before: R : Type u_3
M : Type u_2
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
s : Set R
a : R
ι : Type u_1
p : ι → Ideal R
S : Finset ι
hp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤
q : ι → R
hq : Set.Pairwise (↑S) (IsCoprime on q)
inst✝ : DecidableEq ι
⊢ Finset.SupIndep S fun i => torsionBy R M (q i)

tactic: exact (torsionBySet_span_singleton_eq (R := R) (M := M) _).symm
state_before: case h.e'_6.h
R : Type u_3
M : Type u_2
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
s : Set R
a : R
ι : Type u_1
p : ι → Ideal R
S : Finset ι
hp : Set.Pairwise ↑S fun i j => p i ⊔ p j = ⊤
q : ι → R
hq : Set.Pairwise (↑S) (IsCoprime on q)
inst✝ : DecidableEq ι
x✝ : ι
⊢ torsionBy R M (q x✝) = torsionBySet R M ↑(Ideal.span {q x✝})
Theorem: Set.PairwiseDisjoint.range
File: Mathlib/Data/Set/Pairwise/Basic.lean

tactic: rintro _ ⟨x, rfl⟩ _ ⟨y, rfl⟩ hxy
state_before: α : Type u_2
β : Type ?u.36838
γ : Type ?u.36841
ι : Type u_1
ι' : Type ?u.36847
r p q : α → α → Prop
inst✝¹ : PartialOrder α
inst✝ : OrderBot α
s t : Set ι
f g✝ : ι → α
g : ↑s → ι
hg : ∀ (i : ↑s), f (g i) ≤ f ↑i
ht : PairwiseDisjoint s f
⊢ PairwiseDisjoint (Set.range g) f

tactic: exact ((ht x.2 y.2) fun h => hxy <| congr_arg g <| Subtype.ext h).mono (hg x) (hg y)
state_before: case intro.intro
α : Type u_2
β : Type ?u.36838
γ : Type ?u.36841
ι : Type u_1
ι' : Type ?u.36847
r p q : α → α → Prop
inst✝¹ : PartialOrder α
inst✝ : OrderBot α
s t : Set ι
f g✝ : ι → α
g : ↑s → ι
hg : ∀ (i : ↑s), f (g i) ≤ f ↑i
ht : PairwiseDisjoint s f
x y : ↑s
hxy : g x ≠ g y
⊢ (Disjoint on f) (g x) (g y)
Theorem: Nat.choose_two_right
File: Mathlib/Data/Nat/Choose/Basic.lean

tactic: induction' n with n ih
state_before: n : ℕ
⊢ choose n 2 = n * (n - 1) / 2

tactic: . simp
state_before: case zero

⊢ choose zero 2 = zero * (zero - 1) / 2

case succ
n : ℕ
ih : choose n 2 = n * (n - 1) / 2
⊢ choose (succ n) 2 = succ n * (succ n - 1) / 2

tactic: simp
state_before: case zero

⊢ choose zero 2 = zero * (zero - 1) / 2

tactic: rw [triangle_succ n, choose, ih]
state_before: case succ
n : ℕ
ih : choose n 2 = n * (n - 1) / 2
⊢ choose (succ n) 2 = succ n * (succ n - 1) / 2

tactic: simp [add_comm]
state_before: case succ
n : ℕ
ih : choose n 2 = n * (n - 1) / 2
⊢ choose n 1 + n * (n - 1) / 2 = n * (n - 1) / 2 + n
Theorem: frontier_Iio'
File: Mathlib/Topology/Order/Basic.lean

tactic: simp [frontier, closure_Iio' ha, Iic_diff_Iio, Icc_self]
state_before: α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
a✝ b : α
s : Set α
a : α
ha : Set.Nonempty (Iio a)
⊢ frontier (Iio a) = {a}
Theorem: SubgroupClass.inclusion_inclusion
File: Mathlib/GroupTheory/Subgroup/Basic.lean

tactic: cases x
state_before: G : Type u_2
G' : Type ?u.63896
inst✝⁶ : Group G
inst✝⁵ : Group G'
A : Type ?u.63905
inst✝⁴ : AddGroup A
M : Type ?u.63911
S : Type u_1
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
L : S
hHK : H ≤ K
hKL : K ≤ L
x : { x // x ∈ H }
⊢ ↑(inclusion hKL) (↑(inclusion hHK) x) = ↑(inclusion (_ : H ≤ L)) x

tactic: rfl
state_before: case mk
G : Type u_2
G' : Type ?u.63896
inst✝⁶ : Group G
inst✝⁵ : Group G'
A : Type ?u.63905
inst✝⁴ : AddGroup A
M : Type ?u.63911
S : Type u_1
inst✝³ : DivInvMonoid M
inst✝² : SetLike S M
hSM : SubgroupClass S M
H K : S
inst✝¹ : SetLike S G
inst✝ : SubgroupClass S G
L : S
hHK : H ≤ K
hKL : K ≤ L
val✝ : G
property✝ : val✝ ∈ H
⊢ ↑(inclusion hKL) (↑(inclusion hHK) { val := val✝, property := property✝ }) =
    ↑(inclusion (_ : H ≤ L)) { val := val✝, property := property✝ }
Theorem: MeasureTheory.OuterMeasure.restrict_iSup
File: Mathlib/MeasureTheory/Measure/OuterMeasure.lean

tactic: simp [restrict]
state_before: α : Type u_2
β : Type ?u.105796
R : Type ?u.105799
R' : Type ?u.105802
ms : Set (OuterMeasure α)
m✝ : OuterMeasure α
ι : Sort u_1
s : Set α
m : ι → OuterMeasure α
⊢ ↑(restrict s) (⨆ (i : ι), m i) = ⨆ (i : ι), ↑(restrict s) (m i)
Theorem: QuadraticForm.nondegenerate_of_anisotropic
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

tactic: rw [← hx x]
state_before: S : Type ?u.480390
R : Type u_1
R₁ : Type ?u.480396
M : Type u_2
inst✝³ : Ring R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : Invertible 2
Q : QuadraticForm R M
hB : Anisotropic Q
x : M
hx : ∀ (n : M), bilin (↑associated' Q) x n = 0
⊢ ↑Q x = 0

tactic: exact (associated_eq_self_apply _ _ x).symm
state_before: S : Type ?u.480390
R : Type u_1
R₁ : Type ?u.480396
M : Type u_2
inst✝³ : Ring R
inst✝² : AddCommGroup M
inst✝¹ : Module R M
inst✝ : Invertible 2
Q : QuadraticForm R M
hB : Anisotropic Q
x : M
hx : ∀ (n : M), bilin (↑associated' Q) x n = 0
⊢ ↑Q x = bilin (↑associated' Q) x x
Theorem: MeasureTheory.memℒp_norm_iff
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: rw [← snorm_norm]
state_before: α : Type u_1
E : Type u_2
F : Type ?u.2312369
G : Type ?u.2312372
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → E
hf : AEStronglyMeasurable f μ
h : Memℒp (fun x => ‖f x‖) p
⊢ snorm f p μ < ⊤

tactic: exact h.2
state_before: α : Type u_1
E : Type u_2
F : Type ?u.2312369
G : Type ?u.2312372
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → E
hf : AEStronglyMeasurable f μ
h : Memℒp (fun x => ‖f x‖) p
⊢ snorm (fun x => ‖f x‖) p μ < ⊤
Theorem: Homotopy.nullHomotopicMap'_comp
File: Mathlib/Algebra/Homology/Homotopy.lean

tactic: ext n
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g✝ : C ⟶ D
h k : D ⟶ E
i : ι
hom : (i j : ι) → ComplexShape.Rel c j i → (X C i ⟶ X D j)
g : D ⟶ E
⊢ nullHomotopicMap' hom ≫ g = nullHomotopicMap' fun i j hij => hom i j hij ≫ Hom.f g j

tactic: erw [nullHomotopicMap_comp]
state_before: case h
ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g✝ : C ⟶ D
h k : D ⟶ E
i : ι
hom : (i j : ι) → ComplexShape.Rel c j i → (X C i ⟶ X D j)
g : D ⟶ E
n : ι
⊢ Hom.f (nullHomotopicMap' hom ≫ g) n = Hom.f (nullHomotopicMap' fun i j hij => hom i j hij ≫ Hom.f g j) n

tactic: congr
state_before: case h
ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g✝ : C ⟶ D
h k : D ⟶ E
i : ι
hom : (i j : ι) → ComplexShape.Rel c j i → (X C i ⟶ X D j)
g : D ⟶ E
n : ι
⊢ Hom.f (nullHomotopicMap fun i j => (dite (ComplexShape.Rel c j i) (hom i j) fun x => 0) ≫ Hom.f g j) n =
    Hom.f (nullHomotopicMap' fun i j hij => hom i j hij ≫ Hom.f g j) n

tactic: ext (i j)
state_before: case h.e_self.e_hom
ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g✝ : C ⟶ D
h k : D ⟶ E
i : ι
hom : (i j : ι) → ComplexShape.Rel c j i → (X C i ⟶ X D j)
g : D ⟶ E
n : ι
⊢ (fun i j => (dite (ComplexShape.Rel c j i) (hom i j) fun x => 0) ≫ Hom.f g j) = fun i j =>
    dite (ComplexShape.Rel c j i) ((fun i j hij => hom i j hij ≫ Hom.f g j) i j) fun x => 0

tactic: split_ifs
state_before: case h.e_self.e_hom.h.h
ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g✝ : C ⟶ D
h k : D ⟶ E
i✝ : ι
hom : (i j : ι) → ComplexShape.Rel c j i → (X C i ⟶ X D j)
g : D ⟶ E
n i j : ι
⊢ (dite (ComplexShape.Rel c j i) (hom i j) fun x => 0) ≫ Hom.f g j =
    dite (ComplexShape.Rel c j i) ((fun i j hij => hom i j hij ≫ Hom.f g j) i j) fun x => 0

tactic: rfl
state_before: case h.e_self.e_hom.h.h.inl
ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g✝ : C ⟶ D
h k : D ⟶ E
i✝ : ι
hom : (i j : ι) → ComplexShape.Rel c j i → (X C i ⟶ X D j)
g : D ⟶ E
n i j : ι
h✝ : ComplexShape.Rel c j i
⊢ hom i j h✝ ≫ Hom.f g j = (fun i j hij => hom i j hij ≫ Hom.f g j) i j h✝

tactic: rw [zero_comp]
state_before: case h.e_self.e_hom.h.h.inr
ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : Preadditive V
c : ComplexShape ι
C D E : HomologicalComplex V c
f g✝ : C ⟶ D
h k : D ⟶ E
i✝ : ι
hom : (i j : ι) → ComplexShape.Rel c j i → (X C i ⟶ X D j)
g : D ⟶ E
n i j : ι
h✝ : ¬ComplexShape.Rel c j i
⊢ 0 ≫ Hom.f g j = 0
Theorem: Unitization.inr_mul
File: Mathlib/Algebra/Algebra/Unitization.lean

tactic: simp only [zero_smul, zero_add]
state_before: R : Type u_1
A : Type u_2
inst✝³ : Semiring R
inst✝² : AddCommMonoid A
inst✝¹ : Mul A
inst✝ : SMulWithZero R A
a₁ a₂ : A
⊢ a₁ * a₂ = 0 • a₂ + 0 • a₁ + a₁ * a₂
Theorem: Nat.ascFactorial_eq_div
File: Mathlib/Data/Nat/Factorial/Basic.lean

tactic: apply mul_left_cancel₀ n.factorial_ne_zero
state_before: n k : ℕ
⊢ ascFactorial n k = (n + k)! / n !

tactic: rw [factorial_mul_ascFactorial]
state_before: n k : ℕ
⊢ n ! * ascFactorial n k = n ! * ((n + k)! / n !)

tactic: exact (Nat.mul_div_cancel' <| factorial_dvd_factorial <| le.intro rfl).symm
state_before: n k : ℕ
⊢ (n + k)! = n ! * ((n + k)! / n !)
Theorem: List.maximum_concat
File: Mathlib/Data/List/MinMax.lean

tactic: simp only [maximum, argmax_concat, id]
state_before: α : Type u_1
β : Type ?u.92933
inst✝ : LinearOrder α
l✝ : List α
a✝ m a : α
l : List α
⊢ maximum (l ++ [a]) = max (maximum l) ↑a

tactic: cases h : argmax id l
state_before: α : Type u_1
β : Type ?u.92933
inst✝ : LinearOrder α
l✝ : List α
a✝ m a : α
l : List α
⊢ Option.rec (some a) (fun val => if val < a then some a else some val) (argmax (fun a => a) l) =
    max (argmax (fun a => a) l) ↑a

tactic: exact (max_eq_right bot_le).symm
state_before: case none
α : Type u_1
β : Type ?u.92933
inst✝ : LinearOrder α
l✝ : List α
a✝ m a : α
l : List α
h : argmax id l = none
⊢ Option.rec (some a) (fun val => if val < a then some a else some val) none = max none ↑a

tactic: simp [WithBot.some_eq_coe, max_def_lt, WithBot.coe_lt_coe]
state_before: case some
α : Type u_1
β : Type ?u.92933
inst✝ : LinearOrder α
l✝ : List α
a✝ m a : α
l : List α
val✝ : α
h : argmax id l = some val✝
⊢ Option.rec (some a) (fun val => if val < a then some a else some val) (some val✝) = max (some val✝) ↑a
Theorem: Set.inv_Ioi
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: rw [inv_eq_iff_eq_inv, inv_Ioo_0_left (inv_pos.2 ha), inv_inv]
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a✝ a : α
ha : 0 < a
⊢ (Ioi a)⁻¹ = Ioo 0 a⁻¹
Theorem: Matrix.diag_col_mul_row
File: Mathlib/Data/Matrix/Basic.lean

tactic: ext
state_before: l : Type ?u.281699
m : Type ?u.281702
n : Type u_1
o : Type ?u.281708
m' : o → Type ?u.281713
n' : o → Type ?u.281718
R : Type ?u.281721
S : Type ?u.281724
α : Type v
β : Type w
γ : Type ?u.281731
inst✝ : NonUnitalNonAssocSemiring α
a b : n → α
⊢ diag (col a ⬝ row b) = a * b

tactic: simp [Matrix.mul_apply, col, row]
state_before: case h
l : Type ?u.281699
m : Type ?u.281702
n : Type u_1
o : Type ?u.281708
m' : o → Type ?u.281713
n' : o → Type ?u.281718
R : Type ?u.281721
S : Type ?u.281724
α : Type v
β : Type w
γ : Type ?u.281731
inst✝ : NonUnitalNonAssocSemiring α
a b : n → α
x✝ : n
⊢ diag (col a ⬝ row b) x✝ = (a * b) x✝
Theorem: MeasureTheory.Measure.add_haar_closedBall_mul_of_pos
File: Mathlib/MeasureTheory/Measure/Lebesgue/EqHaar.lean

tactic: have : closedBall (0 : E) (r * s) = r • closedBall (0 : E) s := by
  simp [smul_closedBall' hr.ne' (0 : E), abs_of_nonneg hr.le]
state_before: E : Type u_1
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : MeasurableSpace E
inst✝⁵ : BorelSpace E
inst✝⁴ : FiniteDimensional ℝ E
μ : Measure E
inst✝³ : IsAddHaarMeasure μ
F : Type ?u.1987762
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
s✝ : Set E
x : E
r : ℝ
hr : 0 < r
s : ℝ
⊢ ↑↑μ (closedBall x (r * s)) = ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 s)

tactic: simp only [this, add_haar_smul, abs_of_nonneg hr.le, add_haar_closedBall_center, abs_pow]
state_before: E : Type u_1
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : MeasurableSpace E
inst✝⁵ : BorelSpace E
inst✝⁴ : FiniteDimensional ℝ E
μ : Measure E
inst✝³ : IsAddHaarMeasure μ
F : Type ?u.1987762
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
s✝ : Set E
x : E
r : ℝ
hr : 0 < r
s : ℝ
this : closedBall 0 (r * s) = r • closedBall 0 s
⊢ ↑↑μ (closedBall x (r * s)) = ENNReal.ofReal (r ^ finrank ℝ E) * ↑↑μ (closedBall 0 s)

tactic: simp [smul_closedBall' hr.ne' (0 : E), abs_of_nonneg hr.le]
state_before: E : Type u_1
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedSpace ℝ E
inst✝⁶ : MeasurableSpace E
inst✝⁵ : BorelSpace E
inst✝⁴ : FiniteDimensional ℝ E
μ : Measure E
inst✝³ : IsAddHaarMeasure μ
F : Type ?u.1987762
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
s✝ : Set E
x : E
r : ℝ
hr : 0 < r
s : ℝ
⊢ closedBall 0 (r * s) = r • closedBall 0 s
Theorem: Finsupp.support_subset_iff
File: Mathlib/Data/Finsupp/Defs.lean

tactic: simp only [Set.subset_def, mem_coe, mem_support_iff]
state_before: α : Type u_1
β : Type ?u.22547
γ : Type ?u.22550
ι : Type ?u.22553
M : Type u_2
M' : Type ?u.22559
N : Type ?u.22562
P : Type ?u.22565
G : Type ?u.22568
H : Type ?u.22571
R : Type ?u.22574
S : Type ?u.22577
inst✝ : Zero M
s : Set α
f : α →₀ M
⊢ ↑f.support ⊆ s ↔ ∀ (a : α), ¬a ∈ s → ↑f a = 0

tactic: exact forall_congr' fun a => not_imp_comm
state_before: α : Type u_1
β : Type ?u.22547
γ : Type ?u.22550
ι : Type ?u.22553
M : Type u_2
M' : Type ?u.22559
N : Type ?u.22562
P : Type ?u.22565
G : Type ?u.22568
H : Type ?u.22571
R : Type ?u.22574
S : Type ?u.22577
inst✝ : Zero M
s : Set α
f : α →₀ M
⊢ (∀ (x : α), ↑f x ≠ 0 → x ∈ s) ↔ ∀ (a : α), ¬a ∈ s → ↑f a = 0
Theorem: Finset.lcm_image
File: Mathlib/Algebra/GCDMonoid/Finset.lean

tactic: classical induction' s using Finset.induction with c s _ ih <;> simp [*]
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
s✝ s₁ s₂ : Finset β
f : β → α
inst✝ : DecidableEq β
g : γ → β
s : Finset γ
⊢ lcm (image g s) f = lcm s (f ∘ g)

tactic: induction' s using Finset.induction with c s _ ih <;> simp [*]
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
s✝ s₁ s₂ : Finset β
f : β → α
inst✝ : DecidableEq β
g : γ → β
s : Finset γ
⊢ lcm (image g s) f = lcm s (f ∘ g)
Theorem: min_eq_bot
File: Mathlib/Order/BoundedOrder.lean

tactic: simp only [← inf_eq_min, ← le_bot_iff, inf_le_iff]
state_before: α : Type u
β : Type v
γ : Type ?u.43317
δ : Type ?u.43320
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
a b : α
⊢ min a b = ⊥ ↔ a = ⊥ ∨ b = ⊥
Theorem: List.length_eraseP_add_one
File: Mathlib/Data/List/Basic.lean

tactic: let ⟨_, l₁, l₂, _, _, h₁, h₂⟩ := exists_of_eraseP al pa
state_before: ι : Type ?u.424384
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
p : α → Bool
l : List α
a : α
al : a ∈ l
pa : p a = true
⊢ length (eraseP p l) + 1 = length l

tactic: rw [h₂, h₁, length_append, length_append]
state_before: ι : Type ?u.424384
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂✝ : List α
p : α → Bool
l : List α
a : α
al : a ∈ l
pa : p a = true
w✝ : α
l₁ l₂ : List α
left✝¹ : ∀ (b : α), b ∈ l₁ → ¬p b = true
left✝ : p w✝ = true
h₁ : l = l₁ ++ w✝ :: l₂
h₂ : eraseP p l = l₁ ++ l₂
⊢ length (eraseP p l) + 1 = length l

tactic: rfl
state_before: ι : Type ?u.424384
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁✝ l₂✝ : List α
p : α → Bool
l : List α
a : α
al : a ∈ l
pa : p a = true
w✝ : α
l₁ l₂ : List α
left✝¹ : ∀ (b : α), b ∈ l₁ → ¬p b = true
left✝ : p w✝ = true
h₁ : l = l₁ ++ w✝ :: l₂
h₂ : eraseP p l = l₁ ++ l₂
⊢ length l₁ + length l₂ + 1 = length l₁ + length (w✝ :: l₂)
Theorem: Complex.nndist_self_conj
File: Mathlib/Analysis/Complex/Basic.lean

tactic: rw [nndist_comm, nndist_conj_self]
state_before: E : Type ?u.129445
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℂ E
z : ℂ
⊢ nndist z (↑(starRingEnd ℂ) z) = 2 * ↑Real.nnabs z.im
Theorem: Subgroup.subgroupOf_normalizer_eq
File: Mathlib/GroupTheory/Subgroup/Basic.lean

tactic: apply comap_normalizer_eq_of_injective_of_le_range
state_before: G : Type u_1
G' : Type ?u.626768
inst✝³ : Group G
inst✝² : Group G'
A : Type ?u.626777
inst✝¹ : AddGroup A
N✝ : Type ?u.626783
inst✝ : Group N✝
f : G →* N✝
H N : Subgroup G
h : normalizer H ≤ N
⊢ subgroupOf (normalizer H) N = normalizer (subgroupOf H N)

tactic: exact Subtype.coe_injective
state_before: case hf
G : Type u_1
G' : Type ?u.626768
inst✝³ : Group G
inst✝² : Group G'
A : Type ?u.626777
inst✝¹ : AddGroup A
N✝ : Type ?u.626783
inst✝ : Group N✝
f : G →* N✝
H N : Subgroup G
h : normalizer H ≤ N
⊢ Injective ↑(Subgroup.subtype N)

case h
G : Type u_1
G' : Type ?u.626768
inst✝³ : Group G
inst✝² : Group G'
A : Type ?u.626777
inst✝¹ : AddGroup A
N✝ : Type ?u.626783
inst✝ : Group N✝
f : G →* N✝
H N : Subgroup G
h : normalizer H ≤ N
⊢ normalizer H ≤ range (Subgroup.subtype N)

tactic: simpa
state_before: case h
G : Type u_1
G' : Type ?u.626768
inst✝³ : Group G
inst✝² : Group G'
A : Type ?u.626777
inst✝¹ : AddGroup A
N✝ : Type ?u.626783
inst✝ : Group N✝
f : G →* N✝
H N : Subgroup G
h : normalizer H ≤ N
⊢ normalizer H ≤ range (Subgroup.subtype N)
Theorem: HasDerivAt.const_mul
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 𝕜
𝕜' : Type ?u.263867
𝔸 : Type u_1
inst✝³ : NormedField 𝕜'
inst✝² : NormedRing 𝔸
inst✝¹ : NormedAlgebra 𝕜 𝕜'
inst✝ : NormedAlgebra 𝕜 𝔸
c✝ d : 𝕜 → 𝔸
c' d' : 𝔸
u v : 𝕜 → 𝕜'
c : 𝔸
hd : HasDerivAt d d' x
⊢ HasDerivAt (fun y => c * d y) (c * d') x

tactic: exact hd.const_mul c
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 𝕜
𝕜' : Type ?u.263867
𝔸 : Type u_1
inst✝³ : NormedField 𝕜'
inst✝² : NormedRing 𝔸
inst✝¹ : NormedAlgebra 𝕜 𝕜'
inst✝ : NormedAlgebra 𝕜 𝔸
c✝ d : 𝕜 → 𝔸
c' d' : 𝔸
u v : 𝕜 → 𝕜'
c : 𝔸
hd : HasDerivWithinAt d d' univ x
⊢ HasDerivWithinAt (fun y => c * d y) (c * d') univ x
Theorem: Finset.sum_pow_mul_eq_add_pow
File: Mathlib/Algebra/BigOperators/Ring.lean

tactic: rw [← prod_const, prod_add]
state_before: α✝ : Type u
β : Type v
γ : Type w
s✝ s₁ s₂ : Finset α✝
a✝ : α✝
b✝ : β
f g : α✝ → β
inst✝¹ : CommSemiring β
α : Type u_1
R : Type u_2
inst✝ : CommSemiring R
a b : R
s : Finset α
⊢ ∑ t in powerset s, a ^ card t * b ^ (card s - card t) = (a + b) ^ card s

tactic: refine' Finset.sum_congr rfl fun t ht => _
state_before: α✝ : Type u
β : Type v
γ : Type w
s✝ s₁ s₂ : Finset α✝
a✝ : α✝
b✝ : β
f g : α✝ → β
inst✝¹ : CommSemiring β
α : Type u_1
R : Type u_2
inst✝ : CommSemiring R
a b : R
s : Finset α
⊢ ∑ t in powerset s, a ^ card t * b ^ (card s - card t) = ∑ t in powerset s, (∏ a_1 in t, a) * ∏ a in s \ t, b

tactic: rw [prod_const, prod_const, ← card_sdiff (mem_powerset.1 ht)]
state_before: α✝ : Type u
β : Type v
γ : Type w
s✝ s₁ s₂ : Finset α✝
a✝ : α✝
b✝ : β
f g : α✝ → β
inst✝¹ : CommSemiring β
α : Type u_1
R : Type u_2
inst✝ : CommSemiring R
a b : R
s t : Finset α
ht : t ∈ powerset s
⊢ a ^ card t * b ^ (card s - card t) = (∏ a_1 in t, a) * ∏ a in s \ t, b
Theorem: Filter.Tendsto.atBot_mul_neg
File: Mathlib/Topology/Algebra/Order/Field.lean

tactic: have := (tendsto_neg_atBot_atTop.comp hf).atTop_mul_neg hC hg
state_before: 𝕜 : Type u_1
α : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
l : Filter α
f g : α → 𝕜
C : 𝕜
hC : C < 0
hf : Tendsto f l atBot
hg : Tendsto g l (𝓝 C)
⊢ Tendsto (fun x => f x * g x) l atTop
Theorem: CategoryTheory.Paths.lift_spec
File: Mathlib/CategoryTheory/PathCategory.lean

tactic: fapply Prefunctor.ext
state_before: V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
φ : V ⥤q C
⊢ of ⋙q (lift φ).toPrefunctor = φ

tactic: rintro X
state_before: case h_obj
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
φ : V ⥤q C
⊢ ∀ (X : V), (of ⋙q (lift φ).toPrefunctor).obj X = φ.obj X

tactic: rfl
state_before: case h_obj
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
φ : V ⥤q C
X : V
⊢ (of ⋙q (lift φ).toPrefunctor).obj X = φ.obj X

tactic: rintro X Y f
state_before: case h_map
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
φ : V ⥤q C
⊢ ∀ (X Y : V) (f : X ⟶ Y),
    (of ⋙q (lift φ).toPrefunctor).map f =
      Eq.recOn (_ : φ.obj Y = (of ⋙q (lift φ).toPrefunctor).obj Y)
        (Eq.recOn (_ : φ.obj X = (of ⋙q (lift φ).toPrefunctor).obj X) (φ.map f))

tactic: rcases φ with ⟨φo, φm⟩
state_before: case h_map
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
φ : V ⥤q C
X Y : V
f : X ⟶ Y
⊢ (of ⋙q (lift φ).toPrefunctor).map f =
    Eq.recOn (_ : φ.obj Y = (of ⋙q (lift φ).toPrefunctor).obj Y)
      (Eq.recOn (_ : φ.obj X = (of ⋙q (lift φ).toPrefunctor).obj X) (φ.map f))

tactic: dsimp [lift, Quiver.Hom.toPath]
state_before: case h_map.mk
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
X Y : V
f : X ⟶ Y
φo : V → C
φm : {X Y : V} → (X ⟶ Y) → (φo X ⟶ φo Y)
⊢ (of ⋙q (lift { obj := φo, map := φm }).toPrefunctor).map f =
    Eq.recOn (_ : { obj := φo, map := φm }.obj Y = (of ⋙q (lift { obj := φo, map := φm }).toPrefunctor).obj Y)
      (Eq.recOn (_ : { obj := φo, map := φm }.obj X = (of ⋙q (lift { obj := φo, map := φm }).toPrefunctor).obj X)
        ({ obj := φo, map := φm }.map f))

tactic: simp only [Category.id_comp]
state_before: case h_map.mk
V : Type u₁
inst✝¹ : Quiver V
C : Type u_1
inst✝ : Category C
X Y : V
f : X ⟶ Y
φo : V → C
φm : {X Y : V} → (X ⟶ Y) → (φo X ⟶ φo Y)
⊢ 𝟙 (φo X) ≫ φm f = φm f
Theorem: smul_pos_iff_of_pos
File: Mathlib/Algebra/Order/SMul.lean

tactic: rw [smul_zero]
state_before: ι : Type ?u.45479
𝕜 : Type ?u.45482
R : Type u_1
M : Type u_2
N : Type ?u.45491
inst✝³ : OrderedSemiring R
inst✝² : OrderedAddCommMonoid M
inst✝¹ : SMulWithZero R M
inst✝ : OrderedSMul R M
s : Set M
a b : M
c : R
hc : 0 < c
⊢ 0 < c • a ↔ c • 0 < c • a
Theorem: Algebra.adjoin_attach_biUnion
File: Mathlib/RingTheory/Adjoin/Basic.lean

tactic: simp [adjoin_iUnion]
state_before: R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Semiring B
inst✝² : Algebra R A
inst✝¹ : Algebra R B
s✝ t : Set A
inst✝ : DecidableEq A
α : Type u_1
s : Finset α
f : { x // x ∈ s } → Finset A
⊢ adjoin R ↑(Finset.biUnion (Finset.attach s) f) = ⨆ (x : { x // x ∈ s }), adjoin R ↑(f x)
Theorem: Equiv.Perm.pow_apply_eq_of_apply_apply_eq_self
File: Mathlib/GroupTheory/Perm/Support.lean

tactic: rw [pow_succ, mul_apply, h]
state_before: α : Type u_1
f g h✝ : Perm α
x : α
hffx : ↑f (↑f x) = x
n : ℕ
h : ↑(f ^ n) x = x
⊢ ↑(f ^ (n + 1)) x = ↑f x

tactic: rw [pow_succ, mul_apply, h, hffx]
state_before: α : Type u_1
f g h✝ : Perm α
x : α
hffx : ↑f (↑f x) = x
n : ℕ
h : ↑(f ^ n) x = ↑f x
⊢ ↑(f ^ (n + 1)) x = x