1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: CategoryTheory.NatTrans.epi_iff_epi_app
File: Mathlib/CategoryTheory/Adjunction/Evaluation.lean

tactic: constructor
state_before: C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D
F G : C ⥤ D
η : F ⟶ G
⊢ Epi η ↔ ∀ (c : C), Epi (η.app c)
state_after: case mp
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D
F G : C ⥤ D
η : F ⟶ G
⊢ Epi η → ∀ (c : C), Epi (η.app c)

case mpr
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D
F G : C ⥤ D
η : F ⟶ G
⊢ (∀ (c : C), Epi (η.app c)) → Epi η

tactic: intro h c
state_before: case mp
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D
F G : C ⥤ D
η : F ⟶ G
⊢ Epi η → ∀ (c : C), Epi (η.app c)
state_after: case mp
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D
F G : C ⥤ D
η : F ⟶ G
h : Epi η
c : C
⊢ Epi (η.app c)

tactic: exact (inferInstance : Epi (((evaluation _ _).obj c).map η))
state_before: case mp
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D
F G : C ⥤ D
η : F ⟶ G
h : Epi η
c : C
⊢ Epi (η.app c)
state_after: no goals

tactic: intros
state_before: case mpr
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D
F G : C ⥤ D
η : F ⟶ G
⊢ (∀ (c : C), Epi (η.app c)) → Epi η
state_after: case mpr
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D
F G : C ⥤ D
η : F ⟶ G
a✝ : ∀ (c : C), Epi (η.app c)
⊢ Epi η

tactic: apply NatTrans.epi_of_epi_app
state_before: case mpr
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
inst✝ : ∀ (a b : C), HasProductsOfShape (a ⟶ b) D
F G : C ⥤ D
η : F ⟶ G
a✝ : ∀ (c : C), Epi (η.app c)
⊢ Epi η
state_after: no goals
Theorem: MeasureTheory.FiniteMeasure.coeFn_smul
File: Mathlib/MeasureTheory/Measure/FiniteMeasure.lean

tactic: funext
state_before: Ω : Type u_1
inst✝⁵ : MeasurableSpace Ω
R : Type u_2
inst✝⁴ : SMul R ℝ≥0
inst✝³ : SMul R ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝ : IsScalarTower R ℝ≥0 ℝ≥0
c : R
μ : FiniteMeasure Ω
⊢ ⇑(c • μ) = c • ⇑μ
state_after: case h
Ω : Type u_1
inst✝⁵ : MeasurableSpace Ω
R : Type u_2
inst✝⁴ : SMul R ℝ≥0
inst✝³ : SMul R ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝ : IsScalarTower R ℝ≥0 ℝ≥0
c : R
μ : FiniteMeasure Ω
x✝ : Set Ω
⊢ (c • μ) x✝ = (c • ⇑μ) x✝

tactic: simp [← ENNReal.coe_inj, ENNReal.coe_smul]
state_before: case h
Ω : Type u_1
inst✝⁵ : MeasurableSpace Ω
R : Type u_2
inst✝⁴ : SMul R ℝ≥0
inst✝³ : SMul R ℝ≥0∞
inst✝² : IsScalarTower R ℝ≥0 ℝ≥0∞
inst✝¹ : IsScalarTower R ℝ≥0∞ ℝ≥0∞
inst✝ : IsScalarTower R ℝ≥0 ℝ≥0
c : R
μ : FiniteMeasure Ω
x✝ : Set Ω
⊢ (c • μ) x✝ = (c • ⇑μ) x✝
state_after: no goals
Theorem: SimpleGraph.boxProd_degree
File: Mathlib/Combinatorics/SimpleGraph/Prod.lean

tactic: rw [degree, degree, degree, boxProd_neighborFinset, Finset.card_disjUnion]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
G : SimpleGraph α
H : SimpleGraph β
x : α × β
inst✝² : Fintype ↑(G.neighborSet x.1)
inst✝¹ : Fintype ↑(H.neighborSet x.2)
inst✝ : Fintype ↑((G □ H).neighborSet x)
⊢ (G □ H).degree x = G.degree x.1 + H.degree x.2
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
G : SimpleGraph α
H : SimpleGraph β
x : α × β
inst✝² : Fintype ↑(G.neighborSet x.1)
inst✝¹ : Fintype ↑(H.neighborSet x.2)
inst✝ : Fintype ↑((G □ H).neighborSet x)
⊢ (G.neighborFinset x.1 ×ˢ {x.2}).card + ({x.1} ×ˢ H.neighborFinset x.2).card =
    (G.neighborFinset x.1).card + (H.neighborFinset x.2).card

tactic: simp_rw [Finset.card_product, Finset.card_singleton, mul_one, one_mul]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
G : SimpleGraph α
H : SimpleGraph β
x : α × β
inst✝² : Fintype ↑(G.neighborSet x.1)
inst✝¹ : Fintype ↑(H.neighborSet x.2)
inst✝ : Fintype ↑((G □ H).neighborSet x)
⊢ (G.neighborFinset x.1 ×ˢ {x.2}).card + ({x.1} ×ˢ H.neighborFinset x.2).card =
    (G.neighborFinset x.1).card + (H.neighborFinset x.2).card
state_after: no goals
Theorem: Set.subset_range_enumerate
File: Mathlib/Data/Set/Countable.lean

tactic: letI := h.toEncodable
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
h : s.Countable
default x : α
hx : x ∈ s
⊢ enumerateCountable h default (encode ⟨x, hx⟩) = x
state_after: α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
h : s.Countable
default x : α
hx : x ∈ s
this : Encodable ↑s := h.toEncodable
⊢ enumerateCountable h default (encode ⟨x, hx⟩) = x

tactic: simp [enumerateCountable, Encodable.encodek]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
h : s.Countable
default x : α
hx : x ∈ s
this : Encodable ↑s := h.toEncodable
⊢ enumerateCountable h default (encode ⟨x, hx⟩) = x
state_after: no goals
Theorem: eq_mul_of_inv_mul_eq₀
File: Mathlib/Algebra/GroupWithZero/Units/Basic.lean

tactic: rwa [← inv_mul_eq_iff_eq_mul₀]
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a b c d : G₀
m n : ℕ
hc : c ≠ 0
h : b⁻¹ * a = c
⊢ a = b * c
state_after: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a b c d : G₀
m n : ℕ
hc : c ≠ 0
h : b⁻¹ * a = c
⊢ b ≠ 0

tactic: rintro rfl
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a b c d : G₀
m n : ℕ
hc : c ≠ 0
h : b⁻¹ * a = c
⊢ b ≠ 0
state_after: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a c d : G₀
m n : ℕ
hc : c ≠ 0
h : 0⁻¹ * a = c
⊢ False

tactic: simp [hc.symm] at h
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a c d : G₀
m n : ℕ
hc : c ≠ 0
h : 0⁻¹ * a = c
⊢ False
state_after: no goals
Theorem: MvPolynomial.continuous_eval
File: Mathlib/Topology/Algebra/MvPolynomial.lean

tactic: continuity
state_before: X : Type u_1
σ : Type u_2
inst✝² : TopologicalSpace X
inst✝¹ : CommSemiring X
inst✝ : TopologicalSemiring X
p : MvPolynomial σ X
⊢ Continuous fun x => (eval x) p
state_after: no goals
Theorem: IsAssociatedPrime.annihilator_le
File: Mathlib/RingTheory/Ideal/AssociatedPrime.lean

tactic: obtain ⟨hI, x, rfl⟩ := h
state_before: R : Type u_1
inst✝⁴ : CommRing R
I J : Ideal R
M : Type u_2
inst✝³ : AddCommGroup M
inst✝² : Module R M
M' : Type u_3
inst✝¹ : AddCommGroup M'
inst✝ : Module R M'
f : M →ₗ[R] M'
h : IsAssociatedPrime I M
⊢ ⊤.annihilator ≤ I
state_after: case intro.intro
R : Type u_1
inst✝⁴ : CommRing R
J : Ideal R
M : Type u_2
inst✝³ : AddCommGroup M
inst✝² : Module R M
M' : Type u_3
inst✝¹ : AddCommGroup M'
inst✝ : Module R M'
f : M →ₗ[R] M'
x : M
hI : (Submodule.span R {x}).annihilator.IsPrime
⊢ ⊤.annihilator ≤ (Submodule.span R {x}).annihilator

tactic: exact Submodule.annihilator_mono le_top
state_before: case intro.intro
R : Type u_1
inst✝⁴ : CommRing R
J : Ideal R
M : Type u_2
inst✝³ : AddCommGroup M
inst✝² : Module R M
M' : Type u_3
inst✝¹ : AddCommGroup M'
inst✝ : Module R M'
f : M →ₗ[R] M'
x : M
hI : (Submodule.span R {x}).annihilator.IsPrime
⊢ ⊤.annihilator ≤ (Submodule.span R {x}).annihilator
state_after: no goals
Theorem: Rel.dom_inv
File: Mathlib/Data/Rel.lean

tactic: ext x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
⊢ r.inv.dom = r.codom
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
x : β
⊢ x ∈ r.inv.dom ↔ x ∈ r.codom

tactic: rfl
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
x : β
⊢ x ∈ r.inv.dom ↔ x ∈ r.codom
state_after: no goals
Theorem: List.findIdx?_eq_some_iff
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: induction xs generalizing i with
| nil => simp
| cons x xs ih =>
  simp only [findIdx?_cons, Nat.zero_add, findIdx?_succ, take_succ_cons, map_cons]
  split <;> cases i <;> simp_all [replicate_succ]
state_before: α : Type u_1
i : Nat
xs : List α
p : α → Bool
⊢ findIdx? p xs = some i ↔ map p (take (i + 1) xs) = replicate i false ++ [true]
state_after: no goals

tactic: simp
state_before: case nil
α : Type u_1
p : α → Bool
i : Nat
⊢ findIdx? p [] = some i ↔ map p (take (i + 1) []) = replicate i false ++ [true]
state_after: no goals

tactic: simp only [findIdx?_cons, Nat.zero_add, findIdx?_succ, take_succ_cons, map_cons]
state_before: case cons
α : Type u_1
p : α → Bool
x : α
xs : List α
ih : ∀ {i : Nat}, findIdx? p xs = some i ↔ map p (take (i + 1) xs) = replicate i false ++ [true]
i : Nat
⊢ findIdx? p (x :: xs) = some i ↔ map p (take (i + 1) (x :: xs)) = replicate i false ++ [true]
state_after: case cons
α : Type u_1
p : α → Bool
x : α
xs : List α
ih : ∀ {i : Nat}, findIdx? p xs = some i ↔ map p (take (i + 1) xs) = replicate i false ++ [true]
i : Nat
⊢ (if p x = true then some 0 else Option.map (fun i => i + 1) (findIdx? p xs)) = some i ↔
    p x :: map p (take i xs) = replicate i false ++ [true]

tactic: split <;> cases i <;> simp_all [replicate_succ]
state_before: case cons
α : Type u_1
p : α → Bool
x : α
xs : List α
ih : ∀ {i : Nat}, findIdx? p xs = some i ↔ map p (take (i + 1) xs) = replicate i false ++ [true]
i : Nat
⊢ (if p x = true then some 0 else Option.map (fun i => i + 1) (findIdx? p xs)) = some i ↔
    p x :: map p (take i xs) = replicate i false ++ [true]
state_after: no goals
Theorem: Associates.mem_factors_of_dvd
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: rw [factors_mk _ ha0]
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a p : α
ha0 : a ≠ 0
hp : Irreducible p
hd : p ∣ a
⊢ Associates.mk p ∈ (Associates.mk a).factors
state_after: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a p : α
ha0 : a ≠ 0
hp : Irreducible p
hd : p ∣ a
⊢ Associates.mk p ∈ ↑(factors' a)

tactic: exact mem_factorSet_some.mpr (mem_factors'_of_dvd ha0 hp hd)
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : UniqueFactorizationMonoid α
a p : α
ha0 : a ≠ 0
hp : Irreducible p
hd : p ∣ a
⊢ Associates.mk p ∈ ↑(factors' a)
state_after: no goals
Theorem: List.destutter_eq_self_iff
File: Mathlib/Data/List/Destutter.lean

tactic: simp
state_before: α : Type u_1
l : List α
R : α → α → Prop
inst✝ : DecidableRel R
a b : α
⊢ destutter R [] = [] ↔ Chain' R []
state_after: no goals
Theorem: EuclideanDomain.gcd_eq_left
File: Mathlib/Algebra/EuclideanDomain/Basic.lean

tactic: rw [← h]
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
a b : R
h : gcd a b = a
⊢ a ∣ b
state_after: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
a b : R
h : gcd a b = a
⊢ gcd a b ∣ b

tactic: apply gcd_dvd_right
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
a b : R
h : gcd a b = a
⊢ gcd a b ∣ b
state_after: no goals

tactic: rw [gcd_val, mod_eq_zero.2 h, gcd_zero_left]
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
a b : R
h : a ∣ b
⊢ gcd a b = a
state_after: no goals
Theorem: MvPowerSeries.mul_inv_cancel
File: Mathlib/RingTheory/MvPowerSeries/Inverse.lean

tactic: rw [← invOfUnit_eq φ h, mul_invOfUnit φ (Units.mk0 _ h) rfl]
state_before: σ : Type u_1
R : Type u_2
k : Type u_3
inst✝ : Field k
φ : MvPowerSeries σ k
h : (constantCoeff σ k) φ ≠ 0
⊢ φ * φ⁻¹ = 1
state_after: no goals
Theorem: CategoryTheory.obj_μ_zero_app
File: Mathlib/CategoryTheory/Monoidal/End.lean

tactic: rw [← obj_ε_inv_app_assoc, ← Functor.map_comp]
state_before: C : Type u
inst✝² : Category.{v, u} C
M : Type u_1
inst✝¹ : Category.{u_2, u_1} M
inst✝ : MonoidalCategory M
F : MonoidalFunctor M (C ⥤ C)
m₁ m₂ : M
X : C
⊢ (F.μ (𝟙_ M) m₂).app ((F.obj m₁).obj X) ≫
      (F.μ m₁ (𝟙_ M ⊗ m₂)).app X ≫ (F.map (α_ m₁ (𝟙_ M) m₂).inv).app X ≫ (F.μIso (m₁ ⊗ 𝟙_ M) m₂).inv.app X =
    (F.μ (𝟙_ M) m₂).app ((F.obj m₁).obj X) ≫
      (F.map (λ_ m₂).hom).app ((F.obj m₁).obj X) ≫ (F.obj m₂).map ((F.map (ρ_ m₁).inv).app X)
state_after: C : Type u
inst✝² : Category.{v, u} C
M : Type u_1
inst✝¹ : Category.{u_2, u_1} M
inst✝ : MonoidalCategory M
F : MonoidalFunctor M (C ⥤ C)
m₁ m₂ : M
X : C
⊢ (F.μ (𝟙_ M) m₂).app ((F.obj m₁).obj X) ≫
      (F.μ m₁ (𝟙_ M ⊗ m₂)).app X ≫ (F.map (α_ m₁ (𝟙_ M) m₂).inv).app X ≫ (F.μIso (m₁ ⊗ 𝟙_ M) m₂).inv.app X =
    (F.obj m₂).map (F.εIso.inv.app ((F.obj m₁).obj X) ≫ (F.map (ρ_ m₁).inv).app X)

tactic: simp
state_before: C : Type u
inst✝² : Category.{v, u} C
M : Type u_1
inst✝¹ : Category.{u_2, u_1} M
inst✝ : MonoidalCategory M
F : MonoidalFunctor M (C ⥤ C)
m₁ m₂ : M
X : C
⊢ (F.μ (𝟙_ M) m₂).app ((F.obj m₁).obj X) ≫
      (F.μ m₁ (𝟙_ M ⊗ m₂)).app X ≫ (F.map (α_ m₁ (𝟙_ M) m₂).inv).app X ≫ (F.μIso (m₁ ⊗ 𝟙_ M) m₂).inv.app X =
    (F.obj m₂).map (F.εIso.inv.app ((F.obj m₁).obj X) ≫ (F.map (ρ_ m₁).inv).app X)
state_after: no goals
Theorem: List.forall_mem_ofFn_iff
File: Mathlib/Data/List/OfFn.lean

tactic: simp only [mem_ofFn, Set.forall_mem_range]
state_before: α : Type u
n : ℕ
f : Fin n → α
P : α → Prop
⊢ (∀ i ∈ ofFn f, P i) ↔ ∀ (j : Fin n), P (f j)
state_after: no goals
Theorem: le_nhdsAdjoint_iff'
File: Mathlib/Topology/Order.lean

tactic: classical
simp_rw [le_iff_nhds, nhds_nhdsAdjoint, forall_update_iff, (pure_le_nhds _).le_iff_eq]
state_before: α : Type u
β : Type v
a : α
f : Filter α
t : TopologicalSpace α
⊢ t ≤ nhdsAdjoint a f ↔ 𝓝 a ≤ pure a ⊔ f ∧ ∀ (b : α), b ≠ a → 𝓝 b = pure b
state_after: no goals

tactic: simp_rw [le_iff_nhds, nhds_nhdsAdjoint, forall_update_iff, (pure_le_nhds _).le_iff_eq]
state_before: α : Type u
β : Type v
a : α
f : Filter α
t : TopologicalSpace α
⊢ t ≤ nhdsAdjoint a f ↔ 𝓝 a ≤ pure a ⊔ f ∧ ∀ (b : α), b ≠ a → 𝓝 b = pure b
state_after: no goals
Theorem: ContinuousLinearEquiv.comp_right_differentiableAt_iff
File: Mathlib/Analysis/Calculus/FDeriv/Equiv.lean

tactic: simp only [← differentiableWithinAt_univ, ← iso.comp_right_differentiableWithinAt_iff,
  preimage_univ]
state_before: 𝕜 : Type u_1
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type u_4
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type u_5
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f✝ f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x✝ : E
s t : Set E
L L₁ L₂ : Filter E
iso : E ≃L[𝕜] F
f : F → G
x : E
⊢ DifferentiableAt 𝕜 (f ∘ ⇑iso) x ↔ DifferentiableAt 𝕜 f (iso x)
state_after: no goals
Theorem: Nat.b_id_helper
File: Mathlib/NumberTheory/FermatPsp.lean

tactic: rw [Nat.le_div_iff_mul_le (Nat.zero_lt_succ _)]
state_before: a b : ℕ
ha : 2 ≤ a
hb : 2 < b
⊢ 2 ≤ (a ^ b + 1) / (a + 1)
state_after: a b : ℕ
ha : 2 ≤ a
hb : 2 < b
⊢ 2 * a.succ ≤ a ^ b + 1

tactic: apply Nat.succ_le_succ
state_before: a b : ℕ
ha : 2 ≤ a
hb : 2 < b
⊢ 2 * a.succ ≤ a ^ b + 1
state_after: case a
a b : ℕ
ha : 2 ≤ a
hb : 2 < b
⊢ Nat.mul 2 a + 1 ≤ a ^ b

tactic: calc
  2 * a + 1 ≤ a ^ 2 * a := by nlinarith
  _ = a ^ 3 := by rw [Nat.pow_succ a 2]
  _ ≤ a ^ b := pow_le_pow_right (Nat.le_of_succ_le ha) hb
state_before: case a
a b : ℕ
ha : 2 ≤ a
hb : 2 < b
⊢ Nat.mul 2 a + 1 ≤ a ^ b
state_after: no goals

tactic: nlinarith
state_before: a b : ℕ
ha : 2 ≤ a
hb : 2 < b
⊢ 2 * a + 1 ≤ a ^ 2 * a
state_after: no goals

tactic: rw [Nat.pow_succ a 2]
state_before: a b : ℕ
ha : 2 ≤ a
hb : 2 < b
⊢ a ^ 2 * a = a ^ 3
state_after: no goals
Theorem: Nat.dvd_of_factors_subperm
File: Mathlib/Data/Nat/Factors.lean

tactic: rcases b.eq_zero_or_pos with (rfl | hb)
state_before: a b : ℕ
ha : a ≠ 0
h : a.factors <+~ b.factors
⊢ a ∣ b
state_after: case inl
a : ℕ
ha : a ≠ 0
h : a.factors <+~ factors 0
⊢ a ∣ 0

case inr
a b : ℕ
ha : a ≠ 0
h : a.factors <+~ b.factors
hb : b > 0
⊢ a ∣ b

tactic: rcases a with (_ | _ | a)
state_before: case inr
a b : ℕ
ha : a ≠ 0
h : a.factors <+~ b.factors
hb : b > 0
⊢ a ∣ b
state_after: case inr.zero
b : ℕ
hb : b > 0
ha : 0 ≠ 0
h : factors 0 <+~ b.factors
⊢ 0 ∣ b

case inr.succ.zero
b : ℕ
hb : b > 0
ha : 0 + 1 ≠ 0
h : (0 + 1).factors <+~ b.factors
⊢ 0 + 1 ∣ b

case inr.succ.succ
b : ℕ
hb : b > 0
a : ℕ
ha : a + 1 + 1 ≠ 0
h : (a + 1 + 1).factors <+~ b.factors
⊢ a + 1 + 1 ∣ b

tactic: use (@List.diff _ instBEqOfDecidableEq b.factors a.succ.succ.factors).prod
state_before: case inr.succ.succ
b : ℕ
hb : b > 0
a : ℕ
ha : a + 1 + 1 ≠ 0
h : (a + 1 + 1).factors <+~ b.factors
⊢ a + 1 + 1 ∣ b
state_after: case h
b : ℕ
hb : b > 0
a : ℕ
ha : a + 1 + 1 ≠ 0
h : (a + 1 + 1).factors <+~ b.factors
⊢ b = (a + 1 + 1) * (b.factors.diff a.succ.succ.factors).prod

tactic: nth_rw 1 [← Nat.prod_factors ha]
state_before: case h
b : ℕ
hb : b > 0
a : ℕ
ha : a + 1 + 1 ≠ 0
h : (a + 1 + 1).factors <+~ b.factors
⊢ b = (a + 1 + 1) * (b.factors.diff a.succ.succ.factors).prod
state_after: case h
b : ℕ
hb : b > 0
a : ℕ
ha : a + 1 + 1 ≠ 0
h : (a + 1 + 1).factors <+~ b.factors
⊢ b = (a + 1 + 1).factors.prod * (b.factors.diff a.succ.succ.factors).prod

tactic: rw [← List.prod_append,
  List.Perm.prod_eq <| List.subperm_append_diff_self_of_count_le <| List.subperm_ext_iff.mp h,
  Nat.prod_factors hb.ne']
state_before: case h
b : ℕ
hb : b > 0
a : ℕ
ha : a + 1 + 1 ≠ 0
h : (a + 1 + 1).factors <+~ b.factors
⊢ b = (a + 1 + 1).factors.prod * (b.factors.diff a.succ.succ.factors).prod
state_after: no goals

tactic: exact dvd_zero _
state_before: case inl
a : ℕ
ha : a ≠ 0
h : a.factors <+~ factors 0
⊢ a ∣ 0
state_after: no goals

tactic: exact (ha rfl).elim
state_before: case inr.zero
b : ℕ
hb : b > 0
ha : 0 ≠ 0
h : factors 0 <+~ b.factors
⊢ 0 ∣ b
state_after: no goals

tactic: exact one_dvd _
state_before: case inr.succ.zero
b : ℕ
hb : b > 0
ha : 0 + 1 ≠ 0
h : (0 + 1).factors <+~ b.factors
⊢ 0 + 1 ∣ b
state_after: no goals
Theorem: AlgebraicGeometry.PresheafedSpace.restrictStalkIso_inv_eq_germ
File: Mathlib/Geometry/RingedSpace/Stalks.lean

tactic: rw [← restrictStalkIso_hom_eq_germ, Category.assoc, Iso.hom_inv_id, Category.comp_id]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : HasColimits C
U : TopCat
X : PresheafedSpace C
f : U ⟶ ↑X
h : OpenEmbedding ⇑f
V : Opens ↑U
x : ↑U
hx : x ∈ V
⊢ X.presheaf.germ ⟨f x, ⋯⟩ ≫ (X.restrictStalkIso h x).inv = (X.restrict h).presheaf.germ ⟨x, hx⟩
state_after: no goals
Theorem: Finset.mem_sum
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

tactic: classical
  refine s.induction_on (by simp) ?_
  intro a t hi ih
  simp [sum_insert hi, ih, or_and_right, exists_or]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
f : α → Multiset β
s : Finset α
b : β
⊢ b ∈ ∑ x ∈ s, f x ↔ ∃ a ∈ s, b ∈ f a
state_after: no goals

tactic: refine s.induction_on (by simp) ?_
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
f : α → Multiset β
s : Finset α
b : β
⊢ b ∈ ∑ x ∈ s, f x ↔ ∃ a ∈ s, b ∈ f a
state_after: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
f : α → Multiset β
s : Finset α
b : β
⊢ ∀ ⦃a : α⦄ {s : Finset α},
    a ∉ s → (b ∈ ∑ x ∈ s, f x ↔ ∃ a ∈ s, b ∈ f a) → (b ∈ ∑ x ∈ insert a s, f x ↔ ∃ a_3 ∈ insert a s, b ∈ f a_3)

tactic: intro a t hi ih
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
f : α → Multiset β
s : Finset α
b : β
⊢ ∀ ⦃a : α⦄ {s : Finset α},
    a ∉ s → (b ∈ ∑ x ∈ s, f x ↔ ∃ a ∈ s, b ∈ f a) → (b ∈ ∑ x ∈ insert a s, f x ↔ ∃ a_3 ∈ insert a s, b ∈ f a_3)
state_after: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
f : α → Multiset β
s : Finset α
b : β
a : α
t : Finset α
hi : a ∉ t
ih : b ∈ ∑ x ∈ t, f x ↔ ∃ a ∈ t, b ∈ f a
⊢ b ∈ ∑ x ∈ insert a t, f x ↔ ∃ a_1 ∈ insert a t, b ∈ f a_1

tactic: simp [sum_insert hi, ih, or_and_right, exists_or]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a✝ : α
f✝ g : α → β
f : α → Multiset β
s : Finset α
b : β
a : α
t : Finset α
hi : a ∉ t
ih : b ∈ ∑ x ∈ t, f x ↔ ∃ a ∈ t, b ∈ f a
⊢ b ∈ ∑ x ∈ insert a t, f x ↔ ∃ a_1 ∈ insert a t, b ∈ f a_1
state_after: no goals

tactic: simp
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
f : α → Multiset β
s : Finset α
b : β
⊢ b ∈ ∑ x ∈ ∅, f x ↔ ∃ a ∈ ∅, b ∈ f a
state_after: no goals
Theorem: intrinsicClosure_nonempty
File: Mathlib/Analysis/Convex/Intrinsic.lean

tactic: simp_rw [nonempty_iff_ne_empty]
state_before: 𝕜 : Type u_1
V : Type u_2
W : Type u_3
Q : Type u_4
P : Type u_5
inst✝⁴ : Ring 𝕜
inst✝³ : AddCommGroup V
inst✝² : Module 𝕜 V
inst✝¹ : TopologicalSpace P
inst✝ : AddTorsor V P
s t : Set P
x : P
⊢ (intrinsicClosure 𝕜 s).Nonempty → s.Nonempty
state_after: 𝕜 : Type u_1
V : Type u_2
W : Type u_3
Q : Type u_4
P : Type u_5
inst✝⁴ : Ring 𝕜
inst✝³ : AddCommGroup V
inst✝² : Module 𝕜 V
inst✝¹ : TopologicalSpace P
inst✝ : AddTorsor V P
s t : Set P
x : P
⊢ intrinsicClosure 𝕜 s ≠ ∅ → s ≠ ∅

tactic: rintro h rfl
state_before: 𝕜 : Type u_1
V : Type u_2
W : Type u_3
Q : Type u_4
P : Type u_5
inst✝⁴ : Ring 𝕜
inst✝³ : AddCommGroup V
inst✝² : Module 𝕜 V
inst✝¹ : TopologicalSpace P
inst✝ : AddTorsor V P
s t : Set P
x : P
⊢ intrinsicClosure 𝕜 s ≠ ∅ → s ≠ ∅
state_after: 𝕜 : Type u_1
V : Type u_2
W : Type u_3
Q : Type u_4
P : Type u_5
inst✝⁴ : Ring 𝕜
inst✝³ : AddCommGroup V
inst✝² : Module 𝕜 V
inst✝¹ : TopologicalSpace P
inst✝ : AddTorsor V P
t : Set P
x : P
h : intrinsicClosure 𝕜 ∅ ≠ ∅
⊢ False

tactic: exact h intrinsicClosure_empty
state_before: 𝕜 : Type u_1
V : Type u_2
W : Type u_3
Q : Type u_4
P : Type u_5
inst✝⁴ : Ring 𝕜
inst✝³ : AddCommGroup V
inst✝² : Module 𝕜 V
inst✝¹ : TopologicalSpace P
inst✝ : AddTorsor V P
t : Set P
x : P
h : intrinsicClosure 𝕜 ∅ ≠ ∅
⊢ False
state_after: no goals
Theorem: isOpenMap_sum
File: Mathlib/Topology/Constructions.lean

tactic: simp only [isOpenMap_iff_nhds_le, Sum.forall, nhds_inl, nhds_inr, Filter.map_map, comp]
state_before: X : Type u
Y : Type v
Z : Type u_1
W : Type u_2
ε : Type u_3
ζ : Type u_4
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f : X ⊕ Y → Z
⊢ IsOpenMap f ↔ (IsOpenMap fun a => f (inl a)) ∧ IsOpenMap fun b => f (inr b)
state_after: no goals