1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: AffineSubspace.mem_affineSpan_singleton
File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

tactic: simp [← mem_coe]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
p₁ p₂ : P
⊢ p₁ ∈ affineSpan k {p₂} ↔ p₁ = p₂
state_after: no goals
Theorem: Nat.le_of_mul_le_mul_right
File: Mathlib/Data/Nat/Defs.lean

tactic: simpa [Nat.mul_comm]
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
h : a * c ≤ b * c
hc : 0 < c
⊢ c * a ≤ c * b
state_after: no goals
Theorem: ProbabilityTheory.kernel.setLIntegral_compProd
File: Mathlib/Probability/Kernel/Composition.lean

tactic: simp_rw [← kernel.restrict_apply (κ ⊗ₖ η) (hs.prod ht), ← compProd_restrict hs ht,
  lintegral_compProd _ _ _ hf, kernel.restrict_apply]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
mα : MeasurableSpace α
mβ : MeasurableSpace β
γ : Type u_4
mγ : MeasurableSpace γ
s✝ : Set (β × γ)
κ : ↥(kernel α β)
inst✝¹ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝ : IsSFiniteKernel η
a : α
f : β × γ → ℝ≥0∞
hf : Measurable f
s : Set β
t : Set γ
hs : MeasurableSet s
ht : MeasurableSet t
⊢ ∫⁻ (z : β × γ) in s ×ˢ t, f z ∂(κ ⊗ₖ η) a = ∫⁻ (x : β) in s, ∫⁻ (y : γ) in t, f (x, y) ∂η (a, x) ∂κ a
state_after: no goals
Theorem: EReal.preimage_coe_Ico_top
File: Mathlib/Data/Real/EReal.lean

tactic: rw [← Ici_inter_Iio]
state_before: x : ℝ
⊢ Real.toEReal ⁻¹' Ico ↑x ⊤ = Ici x
state_after: x : ℝ
⊢ Real.toEReal ⁻¹' (Ici ↑x ∩ Iio ⊤) = Ici x

tactic: simp
state_before: x : ℝ
⊢ Real.toEReal ⁻¹' (Ici ↑x ∩ Iio ⊤) = Ici x
state_after: no goals
Theorem: Fin.contractNth_apply_of_eq
File: Mathlib/Data/Fin/Tuple/Basic.lean

tactic: have : ¬(k : ℕ) < j := not_lt.2 (le_of_eq h.symm)
state_before: m n : ℕ
α : Type u_1
j : Fin (n + 1)
op : α → α → α
g : Fin (n + 1) → α
k : Fin n
h : ↑k = ↑j
⊢ j.contractNth op g k = op (g k.castSucc) (g k.succ)
state_after: m n : ℕ
α : Type u_1
j : Fin (n + 1)
op : α → α → α
g : Fin (n + 1) → α
k : Fin n
h : ↑k = ↑j
this : ¬↑k < ↑j
⊢ j.contractNth op g k = op (g k.castSucc) (g k.succ)

tactic: rw [contractNth, if_neg this, if_pos h]
state_before: m n : ℕ
α : Type u_1
j : Fin (n + 1)
op : α → α → α
g : Fin (n + 1) → α
k : Fin n
h : ↑k = ↑j
this : ¬↑k < ↑j
⊢ j.contractNth op g k = op (g k.castSucc) (g k.succ)
state_after: no goals
Theorem: Set.Sized.shadow_iterate
File: Mathlib/Combinatorics/SetFamily/Shadow.lean

tactic: simp_rw [Set.Sized, mem_coe, mem_shadow_iterate_iff_exists_sdiff]
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t : Finset α
a : α
k r : ℕ
h𝒜 : Set.Sized r ↑𝒜
⊢ Set.Sized (r - k) ↑(∂ ^[k] 𝒜)
state_after: α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t : Finset α
a : α
k r : ℕ
h𝒜 : Set.Sized r ↑𝒜
⊢ ∀ ⦃x : Finset α⦄, (∃ s ∈ 𝒜, x ⊆ s ∧ (s \ x).card = k) → x.card = r - k

tactic: rintro t ⟨s, hs, hts, rfl⟩
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s t : Finset α
a : α
k r : ℕ
h𝒜 : Set.Sized r ↑𝒜
⊢ ∀ ⦃x : Finset α⦄, (∃ s ∈ 𝒜, x ⊆ s ∧ (s \ x).card = k) → x.card = r - k
state_after: case intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s✝ t✝ : Finset α
a : α
r : ℕ
h𝒜 : Set.Sized r ↑𝒜
t s : Finset α
hs : s ∈ 𝒜
hts : t ⊆ s
⊢ t.card = r - (s \ t).card

tactic: rw [card_sdiff hts, ← h𝒜 hs, Nat.sub_sub_self (card_le_card hts)]
state_before: case intro.intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜 : Finset (Finset α)
s✝ t✝ : Finset α
a : α
r : ℕ
h𝒜 : Set.Sized r ↑𝒜
t s : Finset α
hs : s ∈ 𝒜
hts : t ⊆ s
⊢ t.card = r - (s \ t).card
state_after: no goals
Theorem: LucasLehmer.sMod_nonneg
File: Mathlib/NumberTheory/LucasLehmer.lean

tactic: cases i <;> dsimp [sMod]
state_before: p : ℕ
hp : p ≠ 0
i : ℕ
⊢ 0 ≤ sMod p i
state_after: case zero
p : ℕ
hp : p ≠ 0
⊢ 0 ≤ 4 % (2 ^ p - 1)

case succ
p : ℕ
hp : p ≠ 0
n✝ : ℕ
⊢ 0 ≤ (sMod p n✝ ^ 2 - 2) % (2 ^ p - 1)

tactic: exact sup_eq_right.mp rfl
state_before: case zero
p : ℕ
hp : p ≠ 0
⊢ 0 ≤ 4 % (2 ^ p - 1)
state_after: no goals

tactic: apply Int.emod_nonneg
state_before: case succ
p : ℕ
hp : p ≠ 0
n✝ : ℕ
⊢ 0 ≤ (sMod p n✝ ^ 2 - 2) % (2 ^ p - 1)
state_after: case succ.a
p : ℕ
hp : p ≠ 0
n✝ : ℕ
⊢ 2 ^ p - 1 ≠ 0

tactic: exact mersenne_int_ne_zero p hp
state_before: case succ.a
p : ℕ
hp : p ≠ 0
n✝ : ℕ
⊢ 2 ^ p - 1 ≠ 0
state_after: no goals
Theorem: Algebra.IsAlgebraic.trans
File: Mathlib/RingTheory/Algebraic.lean

tactic: rw [Algebra.isAlgebraic_iff_isIntegral] at L_alg A_alg ⊢
state_before: K : Type u_1
L : Type u_2
R : Type u_3
S : Type u_4
A : Type u_5
inst✝⁶ : Field K
inst✝⁵ : Field L
inst✝⁴ : Ring A
inst✝³ : Algebra K L
inst✝² : Algebra L A
inst✝¹ : Algebra K A
inst✝ : IsScalarTower K L A
L_alg : Algebra.IsAlgebraic K L
A_alg : Algebra.IsAlgebraic L A
⊢ Algebra.IsAlgebraic K A
state_after: K : Type u_1
L : Type u_2
R : Type u_3
S : Type u_4
A : Type u_5
inst✝⁶ : Field K
inst✝⁵ : Field L
inst✝⁴ : Ring A
inst✝³ : Algebra K L
inst✝² : Algebra L A
inst✝¹ : Algebra K A
inst✝ : IsScalarTower K L A
L_alg : Algebra.IsIntegral K L
A_alg : Algebra.IsIntegral L A
⊢ Algebra.IsIntegral K A

tactic: exact Algebra.IsIntegral.trans L
state_before: K : Type u_1
L : Type u_2
R : Type u_3
S : Type u_4
A : Type u_5
inst✝⁶ : Field K
inst✝⁵ : Field L
inst✝⁴ : Ring A
inst✝³ : Algebra K L
inst✝² : Algebra L A
inst✝¹ : Algebra K A
inst✝ : IsScalarTower K L A
L_alg : Algebra.IsIntegral K L
A_alg : Algebra.IsIntegral L A
⊢ Algebra.IsIntegral K A
state_after: no goals
Theorem: Field.primitive_element_iff_minpoly_natDegree_eq
File: Mathlib/FieldTheory/PrimitiveElement.lean

tactic: rw [← adjoin.finrank (IsIntegral.of_finite F α), ← finrank_top F E]
state_before: F✝ : Type u_1
E✝ : Type u_2
inst✝⁸ : Field F✝
inst✝⁷ : Field E✝
inst✝⁶ : Algebra F✝ E✝
inst✝⁵ : FiniteDimensional F✝ E✝
inst✝⁴ : IsSeparable F✝ E✝
F : Type u_3
E : Type u_4
inst✝³ : Field F
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
α : E
⊢ F⟮α⟯ = ⊤ ↔ (minpoly F α).natDegree = finrank F E
state_after: F✝ : Type u_1
E✝ : Type u_2
inst✝⁸ : Field F✝
inst✝⁷ : Field E✝
inst✝⁶ : Algebra F✝ E✝
inst✝⁵ : FiniteDimensional F✝ E✝
inst✝⁴ : IsSeparable F✝ E✝
F : Type u_3
E : Type u_4
inst✝³ : Field F
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
α : E
⊢ F⟮α⟯ = ⊤ ↔ finrank F ↥F⟮α⟯ = finrank F ↥⊤

tactic: refine ⟨fun h => ?_, fun h => eq_of_le_of_finrank_eq le_top h⟩
state_before: F✝ : Type u_1
E✝ : Type u_2
inst✝⁸ : Field F✝
inst✝⁷ : Field E✝
inst✝⁶ : Algebra F✝ E✝
inst✝⁵ : FiniteDimensional F✝ E✝
inst✝⁴ : IsSeparable F✝ E✝
F : Type u_3
E : Type u_4
inst✝³ : Field F
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
α : E
⊢ F⟮α⟯ = ⊤ ↔ finrank F ↥F⟮α⟯ = finrank F ↥⊤
state_after: F✝ : Type u_1
E✝ : Type u_2
inst✝⁸ : Field F✝
inst✝⁷ : Field E✝
inst✝⁶ : Algebra F✝ E✝
inst✝⁵ : FiniteDimensional F✝ E✝
inst✝⁴ : IsSeparable F✝ E✝
F : Type u_3
E : Type u_4
inst✝³ : Field F
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
α : E
h : F⟮α⟯ = ⊤
⊢ finrank F ↥F⟮α⟯ = finrank F ↥⊤

tactic: exact congr_arg (fun K : IntermediateField F E => finrank F K) h
state_before: F✝ : Type u_1
E✝ : Type u_2
inst✝⁸ : Field F✝
inst✝⁷ : Field E✝
inst✝⁶ : Algebra F✝ E✝
inst✝⁵ : FiniteDimensional F✝ E✝
inst✝⁴ : IsSeparable F✝ E✝
F : Type u_3
E : Type u_4
inst✝³ : Field F
inst✝² : Field E
inst✝¹ : Algebra F E
inst✝ : FiniteDimensional F E
α : E
h : F⟮α⟯ = ⊤
⊢ finrank F ↥F⟮α⟯ = finrank F ↥⊤
state_after: no goals
Theorem: Polynomial.coeff_update
File: Mathlib/Algebra/Polynomial/Basic.lean

tactic: ext
state_before: R : Type u
a✝ b : R
m n✝ : ℕ
inst✝ : Semiring R
p✝ q p : R[X]
n : ℕ
a : R
⊢ (p.update n a).coeff = Function.update p.coeff n a
state_after: case h
R : Type u
a✝ b : R
m n✝ : ℕ
inst✝ : Semiring R
p✝ q p : R[X]
n : ℕ
a : R
x✝ : ℕ
⊢ (p.update n a).coeff x✝ = Function.update p.coeff n a x✝

tactic: cases p
state_before: case h
R : Type u
a✝ b : R
m n✝ : ℕ
inst✝ : Semiring R
p✝ q p : R[X]
n : ℕ
a : R
x✝ : ℕ
⊢ (p.update n a).coeff x✝ = Function.update p.coeff n a x✝
state_after: case h.ofFinsupp
R : Type u
a✝ b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n : ℕ
a : R
x✝ : ℕ
toFinsupp✝ : R[ℕ]
⊢ ({ toFinsupp := toFinsupp✝ }.update n a).coeff x✝ = Function.update { toFinsupp := toFinsupp✝ }.coeff n a x✝

tactic: simp only [coeff, update, Function.update_apply, coe_update]
state_before: case h.ofFinsupp
R : Type u
a✝ b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n : ℕ
a : R
x✝ : ℕ
toFinsupp✝ : R[ℕ]
⊢ ({ toFinsupp := toFinsupp✝ }.update n a).coeff x✝ = Function.update { toFinsupp := toFinsupp✝ }.coeff n a x✝
state_after: no goals
Theorem: Matrix.rank_zero
File: Mathlib/Data/Matrix/Rank.lean

tactic: rw [rank, mulVecLin_zero, LinearMap.range_zero, finrank_bot]
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
R : Type u_5
inst✝³ : Fintype n
inst✝² : Fintype o
inst✝¹ : CommRing R
inst✝ : Nontrivial R
⊢ rank 0 = 0
state_after: no goals
Theorem: Quaternion.continuous_normSq
File: Mathlib/Analysis/Quaternion.lean

tactic: simpa [← normSq_eq_norm_mul_self] using
  (continuous_norm.mul continuous_norm : Continuous fun q : ℍ => ‖q‖ * ‖q‖)
state_before: ⊢ Continuous ⇑normSq
state_after: no goals
Theorem: Mathlib.Meta.Positivity.nonneg_of_isRat
File: Mathlib/Tactic/Positivity/Core.lean

tactic: rw [eq, of_decide_eq_true h]
state_before: u : Level
α : Q(Type u)
zα : Q(Zero «$α»)
pα : Q(PartialOrder «$α»)
A : Type u_1
e : A
n : ℤ
d : ℕ
inst✝ : LinearOrderedRing A
inv : Invertible ↑d
eq : e = ↑n * ⅟↑d
h : decide (n = 0) = true
⊢ 0 ≤ e
state_after: u : Level
α : Q(Type u)
zα : Q(Zero «$α»)
pα : Q(PartialOrder «$α»)
A : Type u_1
e : A
n : ℤ
d : ℕ
inst✝ : LinearOrderedRing A
inv : Invertible ↑d
eq : e = ↑n * ⅟↑d
h : decide (n = 0) = true
⊢ 0 ≤ ↑0 * ⅟↑d

tactic: simp
state_before: u : Level
α : Q(Type u)
zα : Q(Zero «$α»)
pα : Q(PartialOrder «$α»)
A : Type u_1
e : A
n : ℤ
d : ℕ
inst✝ : LinearOrderedRing A
inv : Invertible ↑d
eq : e = ↑n * ⅟↑d
h : decide (n = 0) = true
⊢ 0 ≤ ↑0 * ⅟↑d
state_after: no goals
Theorem: IsPrimitiveRoot.isRoot_cyclotomic
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Roots.lean

tactic: rw [← mem_roots (cyclotomic_ne_zero n R), cyclotomic_eq_prod_X_sub_primitiveRoots h,
  roots_prod_X_sub_C, ← Finset.mem_def]
state_before: R : Type u_1
inst✝¹ : CommRing R
n : ℕ
inst✝ : IsDomain R
hpos : 0 < n
μ : R
h : IsPrimitiveRoot μ n
⊢ (cyclotomic n R).IsRoot μ
state_after: R : Type u_1
inst✝¹ : CommRing R
n : ℕ
inst✝ : IsDomain R
hpos : 0 < n
μ : R
h : IsPrimitiveRoot μ n
⊢ μ ∈ primitiveRoots n R

tactic: rwa [← mem_primitiveRoots hpos] at h
state_before: R : Type u_1
inst✝¹ : CommRing R
n : ℕ
inst✝ : IsDomain R
hpos : 0 < n
μ : R
h : IsPrimitiveRoot μ n
⊢ μ ∈ primitiveRoots n R
state_after: no goals
Theorem: ZFSet.toSet_sep
File: Mathlib/SetTheory/ZFC/Basic.lean

tactic: ext
state_before: a : ZFSet
p : ZFSet → Prop
⊢ (ZFSet.sep p a).toSet = {x | x ∈ a.toSet ∧ p x}
state_after: case h
a : ZFSet
p : ZFSet → Prop
x✝ : ZFSet
⊢ x✝ ∈ (ZFSet.sep p a).toSet ↔ x✝ ∈ {x | x ∈ a.toSet ∧ p x}

tactic: simp
state_before: case h
a : ZFSet
p : ZFSet → Prop
x✝ : ZFSet
⊢ x✝ ∈ (ZFSet.sep p a).toSet ↔ x✝ ∈ {x | x ∈ a.toSet ∧ p x}
state_after: no goals
Theorem: AlgebraicGeometry.StructureSheaf.toPushforwardStalk_comp
File: Mathlib/AlgebraicGeometry/Spec.lean

tactic: rw [StructureSheaf.toStalk]
state_before: R S : CommRingCat
f : R ⟶ S
p : PrimeSpectrum ↑R
⊢ f ≫ toPushforwardStalk f p =
    toStalk (↑R) p ≫ (TopCat.Presheaf.stalkFunctor CommRingCat p).map (Spec.sheafedSpaceMap f).c
state_after: R S : CommRingCat
f : R ⟶ S
p : PrimeSpectrum ↑R
⊢ f ≫ toPushforwardStalk f p =
    (toOpen ↑R ⊤ ≫ (structureSheaf ↑R).presheaf.germ ⟨p, True.intro⟩) ≫
      (TopCat.Presheaf.stalkFunctor CommRingCat p).map (Spec.sheafedSpaceMap f).c

tactic: erw [Category.assoc]
state_before: R S : CommRingCat
f : R ⟶ S
p : PrimeSpectrum ↑R
⊢ f ≫ toPushforwardStalk f p =
    (toOpen ↑R ⊤ ≫ (structureSheaf ↑R).presheaf.germ ⟨p, True.intro⟩) ≫
      (TopCat.Presheaf.stalkFunctor CommRingCat p).map (Spec.sheafedSpaceMap f).c
state_after: R S : CommRingCat
f : R ⟶ S
p : PrimeSpectrum ↑R
⊢ f ≫ toPushforwardStalk f p =
    toOpen ↑R ⊤ ≫
      (structureSheaf ↑R).presheaf.germ ⟨p, True.intro⟩ ≫
        (TopCat.Presheaf.stalkFunctor CommRingCat p).map (Spec.sheafedSpaceMap f).c

tactic: rw [TopCat.Presheaf.stalkFunctor_map_germ]
state_before: R S : CommRingCat
f : R ⟶ S
p : PrimeSpectrum ↑R
⊢ f ≫ toPushforwardStalk f p =
    toOpen ↑R ⊤ ≫
      (structureSheaf ↑R).presheaf.germ ⟨p, True.intro⟩ ≫
        (TopCat.Presheaf.stalkFunctor CommRingCat p).map (Spec.sheafedSpaceMap f).c
state_after: R S : CommRingCat
f : R ⟶ S
p : PrimeSpectrum ↑R
⊢ f ≫ toPushforwardStalk f p =
    toOpen ↑R ⊤ ≫
      (Spec.sheafedSpaceMap f).c.app { unop := ⊤ } ≫
        ((Spec.sheafedSpaceMap f).base _* (Spec.sheafedSpaceObj S).presheaf).germ ⟨p, True.intro⟩

tactic: exact Spec_Γ_naturality_assoc f _
state_before: R S : CommRingCat
f : R ⟶ S
p : PrimeSpectrum ↑R
⊢ f ≫ toPushforwardStalk f p =
    toOpen ↑R ⊤ ≫
      (Spec.sheafedSpaceMap f).c.app { unop := ⊤ } ≫
        ((Spec.sheafedSpaceMap f).base _* (Spec.sheafedSpaceObj S).presheaf).germ ⟨p, True.intro⟩
state_after: no goals
Theorem: le_mul_right
File: Mathlib/Algebra/Order/Monoid/Canonical/Defs.lean

tactic: simp
state_before: α : Type u
inst✝ : CanonicallyOrderedCommMonoid α
a b c d : α
h : a ≤ b
⊢ a = a * 1
state_after: no goals
Theorem: Associates.mul_eq_one_iff
File: Mathlib/Algebra/Associated.lean

tactic: rwa [mul_comm] at this
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
x y : Associates α
a b : α
h : ⟦a⟧ * ⟦b⟧ = 1
this : a * b ~ᵤ 1
⊢ b * ?m.120991 a b h this ~ᵤ 1
state_after: no goals

tactic: simp (config := { contextual := true })
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : CommMonoid α
x y : Associates α
⊢ x = 1 ∧ y = 1 → x * y = 1
state_after: no goals
Theorem: Nat.coprime_add_mul_right_left
File: Mathlib/Data/Nat/GCD/Basic.lean

tactic: rw [Coprime, Coprime, gcd_add_mul_right_left]
state_before: m n k : ℕ
⊢ (m + k * n).Coprime n ↔ m.Coprime n
state_after: no goals
Theorem: Complex.ofReal_exp_ofReal_re
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [← exp_conj, conj_ofReal]
state_before: x✝ y : ℂ
x : ℝ
⊢ (starRingEnd ℂ) (cexp ↑x) = cexp ↑x
state_after: no goals
Theorem: Real.sqrt_ne_zero
File: Mathlib/Data/Real/Sqrt.lean

tactic: rw [not_iff_not, sqrt_eq_zero h]
state_before: x y : ℝ
h : 0 ≤ x
⊢ √x ≠ 0 ↔ x ≠ 0
state_after: no goals
Theorem: Ordering.then_eq_gt
File: .lake/packages/batteries/Batteries/Classes/Order.lean

tactic: cases o₁ <;> cases o₂ <;> decide
state_before: o₁ o₂ : Ordering
⊢ o₁.then o₂ = gt ↔ o₁ = gt ∨ o₁ = eq ∧ o₂ = gt
state_after: no goals
Theorem: Disjoint.exists_uniform_thickening_of_basis
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: rcases h.exists_uniform_thickening hA hB with ⟨V, hV, hVAB⟩
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
K : Set α
p : ι → Prop
s : ι → Set (α × α)
hU : (𝓤 α).HasBasis p s
A B : Set α
hA : IsCompact A
hB : IsClosed B
h : Disjoint A B
⊢ ∃ i, p i ∧ Disjoint (⋃ x ∈ A, ball x (s i)) (⋃ x ∈ B, ball x (s i))
state_after: case intro.intro
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
K : Set α
p : ι → Prop
s : ι → Set (α × α)
hU : (𝓤 α).HasBasis p s
A B : Set α
hA : IsCompact A
hB : IsClosed B
h : Disjoint A B
V : Set (α × α)
hV : V ∈ 𝓤 α
hVAB : Disjoint (⋃ x ∈ A, ball x V) (⋃ x ∈ B, ball x V)
⊢ ∃ i, p i ∧ Disjoint (⋃ x ∈ A, ball x (s i)) (⋃ x ∈ B, ball x (s i))

tactic: rcases hU.mem_iff.1 hV with ⟨i, hi, hiV⟩
state_before: case intro.intro
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
K : Set α
p : ι → Prop
s : ι → Set (α × α)
hU : (𝓤 α).HasBasis p s
A B : Set α
hA : IsCompact A
hB : IsClosed B
h : Disjoint A B
V : Set (α × α)
hV : V ∈ 𝓤 α
hVAB : Disjoint (⋃ x ∈ A, ball x V) (⋃ x ∈ B, ball x V)
⊢ ∃ i, p i ∧ Disjoint (⋃ x ∈ A, ball x (s i)) (⋃ x ∈ B, ball x (s i))
state_after: case intro.intro.intro.intro
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
K : Set α
p : ι → Prop
s : ι → Set (α × α)
hU : (𝓤 α).HasBasis p s
A B : Set α
hA : IsCompact A
hB : IsClosed B
h : Disjoint A B
V : Set (α × α)
hV : V ∈ 𝓤 α
hVAB : Disjoint (⋃ x ∈ A, ball x V) (⋃ x ∈ B, ball x V)
i : ι
hi : p i
hiV : s i ⊆ V
⊢ ∃ i, p i ∧ Disjoint (⋃ x ∈ A, ball x (s i)) (⋃ x ∈ B, ball x (s i))

tactic: exact ⟨i, hi, hVAB.mono (iUnion₂_mono fun a _ => ball_mono hiV a)
  (iUnion₂_mono fun b _ => ball_mono hiV b)⟩
state_before: case intro.intro.intro.intro
α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
K : Set α
p : ι → Prop
s : ι → Set (α × α)
hU : (𝓤 α).HasBasis p s
A B : Set α
hA : IsCompact A
hB : IsClosed B
h : Disjoint A B
V : Set (α × α)
hV : V ∈ 𝓤 α
hVAB : Disjoint (⋃ x ∈ A, ball x V) (⋃ x ∈ B, ball x V)
i : ι
hi : p i
hiV : s i ⊆ V
⊢ ∃ i, p i ∧ Disjoint (⋃ x ∈ A, ball x (s i)) (⋃ x ∈ B, ball x (s i))
state_after: no goals
Theorem: Real.tendsto_comp_exp_atBot
File: Mathlib/Analysis/SpecialFunctions/Exp.lean

tactic: rw [← map_exp_atBot, tendsto_map'_iff]
state_before: α : Type u_1
x y z : ℝ
l : Filter α
f : ℝ → α
⊢ Tendsto (fun x => f (rexp x)) atBot l ↔ Tendsto f (𝓝[>] 0) l
state_after: α : Type u_1
x y z : ℝ
l : Filter α
f : ℝ → α
⊢ Tendsto (fun x => f (rexp x)) atBot l ↔ Tendsto (f ∘ rexp) atBot l

tactic: rfl
state_before: α : Type u_1
x y z : ℝ
l : Filter α
f : ℝ → α
⊢ Tendsto (fun x => f (rexp x)) atBot l ↔ Tendsto (f ∘ rexp) atBot l
state_after: no goals
Theorem: SimpleGraph.Subgraph.induce_empty
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: ext <;> simp
state_before: ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' G'' : G.Subgraph
s s' : Set V
⊢ G'.induce ∅ = ⊥
state_after: no goals
Theorem: Submodule.closedComplemented_bot
File: Mathlib/Topology/Algebra/Module/Basic.lean

tactic: simp only [zero_apply, eq_zero_of_bot_submodule x]
state_before: R : Type u_1
inst✝⁶ : Ring R
M : Type u_2
inst✝⁵ : TopologicalSpace M
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
M₂ : Type u_3
inst✝² : TopologicalSpace M₂
inst✝¹ : AddCommGroup M₂
inst✝ : Module R M₂
x : ↥⊥
⊢ 0 ↑x = x
state_after: no goals
Theorem: Polynomial.reverse_natDegree_le
File: Mathlib/Algebra/Polynomial/Reverse.lean

tactic: rw [natDegree_le_iff_degree_le, degree_le_iff_coeff_zero]
state_before: R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
⊢ f.reverse.natDegree ≤ f.natDegree
state_after: R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
⊢ ∀ (m : ℕ), ↑f.natDegree < ↑m → f.reverse.coeff m = 0

tactic: intro n hn
state_before: R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
⊢ ∀ (m : ℕ), ↑f.natDegree < ↑m → f.reverse.coeff m = 0
state_after: R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
n : ℕ
hn : ↑f.natDegree < ↑n
⊢ f.reverse.coeff n = 0

tactic: rw [Nat.cast_lt] at hn
state_before: R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
n : ℕ
hn : ↑f.natDegree < ↑n
⊢ f.reverse.coeff n = 0
state_after: R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
n : ℕ
hn : f.natDegree < n
⊢ f.reverse.coeff n = 0

tactic: rw [coeff_reverse, revAt, Function.Embedding.coeFn_mk, if_neg (not_le_of_gt hn),
  coeff_eq_zero_of_natDegree_lt hn]
state_before: R : Type u_1
inst✝ : Semiring R
f✝ f : R[X]
n : ℕ
hn : f.natDegree < n
⊢ f.reverse.coeff n = 0
state_after: no goals
Theorem: Fintype.card_eq_one_iff
File: Mathlib/Data/Fintype/Card.lean

tactic: rw [← card_unit, card_eq]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : Fintype α
inst✝ : Fintype β
⊢ card α = 1 ↔ ∃ x, ∀ (y : α), y = x
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : Fintype α
inst✝ : Fintype β
⊢ Nonempty (α ≃ Unit) ↔ ∃ x, ∀ (y : α), y = x

tactic: exact
  ⟨fun ⟨a⟩ => ⟨a.symm (), fun y => a.injective (Subsingleton.elim _ _)⟩,
   fun ⟨x, hx⟩ =>
    ⟨⟨fun _ => (), fun _ => x, fun _ => (hx _).trans (hx _).symm, fun _ =>
        Subsingleton.elim _ _⟩⟩⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : Fintype α
inst✝ : Fintype β
⊢ Nonempty (α ≃ Unit) ↔ ∃ x, ∀ (y : α), y = x
state_after: no goals
Theorem: Measurable.forall
File: Mathlib/MeasureTheory/MeasurableSpace/Basic.lean

tactic: rw [setOf_forall]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p✝ q : α → Prop
inst✝ : Countable ι
p : ι → α → Prop
hp : ∀ (i : ι), Measurable (p i)
⊢ MeasurableSet {a | ∀ (i : ι), p i a}
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p✝ q : α → Prop
inst✝ : Countable ι
p : ι → α → Prop
hp : ∀ (i : ι), Measurable (p i)
⊢ MeasurableSet (⋂ i, {x | p i x})

tactic: exact MeasurableSet.iInter fun i ↦ (hp i).setOf
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s t u : Set α
inst✝¹ : MeasurableSpace α
p✝ q : α → Prop
inst✝ : Countable ι
p : ι → α → Prop
hp : ∀ (i : ι), Measurable (p i)
⊢ MeasurableSet (⋂ i, {x | p i x})
state_after: no goals
Theorem: Finset.Ico_inter_Ico
File: Mathlib/Order/Interval/Finset/Basic.lean

tactic: rw [← coe_inj, coe_inter, coe_Ico, coe_Ico, coe_Ico, ← inf_eq_min, ← sup_eq_max,
  Set.Ico_inter_Ico]
state_before: ι : Type u_1
α : Type u_2
inst✝¹ : LinearOrder α
inst✝ : LocallyFiniteOrder α
a✝ b✝ a b c d : α
⊢ Ico a b ∩ Ico c d = Ico (max a c) (min b d)
state_after: no goals
Theorem: Sylow.exists_subgroup_le_card_pow_prime_of_le_card
File: Mathlib/GroupTheory/Sylow.lean

tactic: obtain ⟨H', H'card⟩ := exists_subgroup_card_pow_prime_of_le_card hp (h.to_subgroup H) hn
state_before: G : Type u
α : Type v
β : Type w
inst✝ : Group G
n p : ℕ
hp : Nat.Prime p
h : IsPGroup p G
H : Subgroup G
hn : p ^ n ≤ Nat.card ↥H
⊢ ∃ H' ≤ H, Nat.card ↥H' = p ^ n
state_after: case intro
G : Type u
α : Type v
β : Type w
inst✝ : Group G
n p : ℕ
hp : Nat.Prime p
h : IsPGroup p G
H : Subgroup G
hn : p ^ n ≤ Nat.card ↥H
H' : Subgroup ↥H
H'card : Nat.card ↥H' = p ^ n
⊢ ∃ H' ≤ H, Nat.card ↥H' = p ^ n

tactic: refine ⟨H'.map H.subtype, map_subtype_le _, ?_⟩
state_before: case intro
G : Type u
α : Type v
β : Type w
inst✝ : Group G
n p : ℕ
hp : Nat.Prime p
h : IsPGroup p G
H : Subgroup G
hn : p ^ n ≤ Nat.card ↥H
H' : Subgroup ↥H
H'card : Nat.card ↥H' = p ^ n
⊢ ∃ H' ≤ H, Nat.card ↥H' = p ^ n
state_after: case intro
G : Type u
α : Type v
β : Type w
inst✝ : Group G
n p : ℕ
hp : Nat.Prime p
h : IsPGroup p G
H : Subgroup G
hn : p ^ n ≤ Nat.card ↥H
H' : Subgroup ↥H
H'card : Nat.card ↥H' = p ^ n
⊢ Nat.card ↥(Subgroup.map H.subtype H') = p ^ n

tactic: rw [← H'card]
state_before: case intro
G : Type u
α : Type v
β : Type w
inst✝ : Group G
n p : ℕ
hp : Nat.Prime p
h : IsPGroup p G
H : Subgroup G
hn : p ^ n ≤ Nat.card ↥H
H' : Subgroup ↥H
H'card : Nat.card ↥H' = p ^ n
⊢ Nat.card ↥(Subgroup.map H.subtype H') = p ^ n
state_after: case intro
G : Type u
α : Type v
β : Type w
inst✝ : Group G
n p : ℕ
hp : Nat.Prime p
h : IsPGroup p G
H : Subgroup G
hn : p ^ n ≤ Nat.card ↥H
H' : Subgroup ↥H
H'card : Nat.card ↥H' = p ^ n
⊢ Nat.card ↥(Subgroup.map H.subtype H') = Nat.card ↥H'

tactic: let e : H' ≃* H'.map H.subtype := H'.equivMapOfInjective (Subgroup.subtype H) H.subtype_injective
state_before: case intro
G : Type u
α : Type v
β : Type w
inst✝ : Group G
n p : ℕ
hp : Nat.Prime p
h : IsPGroup p G
H : Subgroup G
hn : p ^ n ≤ Nat.card ↥H
H' : Subgroup ↥H
H'card : Nat.card ↥H' = p ^ n
⊢ Nat.card ↥(Subgroup.map H.subtype H') = Nat.card ↥H'
state_after: case intro
G : Type u
α : Type v
β : Type w
inst✝ : Group G
n p : ℕ
hp : Nat.Prime p
h : IsPGroup p G
H : Subgroup G
hn : p ^ n ≤ Nat.card ↥H
H' : Subgroup ↥H
H'card : Nat.card ↥H' = p ^ n
e : ↥H' ≃* ↥(Subgroup.map H.subtype H') := H'.equivMapOfInjective H.subtype ⋯
⊢ Nat.card ↥(Subgroup.map H.subtype H') = Nat.card ↥H'

tactic: exact Nat.card_congr e.symm.toEquiv
state_before: case intro
G : Type u
α : Type v
β : Type w
inst✝ : Group G
n p : ℕ
hp : Nat.Prime p
h : IsPGroup p G
H : Subgroup G
hn : p ^ n ≤ Nat.card ↥H
H' : Subgroup ↥H
H'card : Nat.card ↥H' = p ^ n
e : ↥H' ≃* ↥(Subgroup.map H.subtype H') := H'.equivMapOfInjective H.subtype ⋯
⊢ Nat.card ↥(Subgroup.map H.subtype H') = Nat.card ↥H'
state_after: no goals