1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Filter.subseq_tendsto_of_neBot
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: rw [← Filter.push_pull', map_neBot_iff] at hx
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : Filter α
inst✝ : f.IsCountablyGenerated
u : ℕ → α
hx : (f ⊓ map u atTop).NeBot
⊢ ∃ θ, StrictMono θ ∧ Tendsto (u ∘ θ) atTop f
state_after: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : Filter α
inst✝ : f.IsCountablyGenerated
u : ℕ → α
hx : (comap u f ⊓ atTop).NeBot
⊢ ∃ θ, StrictMono θ ∧ Tendsto (u ∘ θ) atTop f

tactic: rcases exists_seq_tendsto (comap u f ⊓ atTop) with ⟨φ, hφ⟩
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : Filter α
inst✝ : f.IsCountablyGenerated
u : ℕ → α
hx : (comap u f ⊓ atTop).NeBot
⊢ ∃ θ, StrictMono θ ∧ Tendsto (u ∘ θ) atTop f
state_after: case intro
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : Filter α
inst✝ : f.IsCountablyGenerated
u : ℕ → α
hx : (comap u f ⊓ atTop).NeBot
φ : ℕ → ℕ
hφ : Tendsto φ atTop (comap u f ⊓ atTop)
⊢ ∃ θ, StrictMono θ ∧ Tendsto (u ∘ θ) atTop f

tactic: rw [tendsto_inf, tendsto_comap_iff] at hφ
state_before: case intro
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : Filter α
inst✝ : f.IsCountablyGenerated
u : ℕ → α
hx : (comap u f ⊓ atTop).NeBot
φ : ℕ → ℕ
hφ : Tendsto φ atTop (comap u f ⊓ atTop)
⊢ ∃ θ, StrictMono θ ∧ Tendsto (u ∘ θ) atTop f
state_after: case intro
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : Filter α
inst✝ : f.IsCountablyGenerated
u : ℕ → α
hx : (comap u f ⊓ atTop).NeBot
φ : ℕ → ℕ
hφ : Tendsto (u ∘ φ) atTop f ∧ Tendsto φ atTop atTop
⊢ ∃ θ, StrictMono θ ∧ Tendsto (u ∘ θ) atTop f

tactic: obtain ⟨ψ, hψ, hψφ⟩ : ∃ ψ : ℕ → ℕ, StrictMono ψ ∧ StrictMono (φ ∘ ψ) :=
  strictMono_subseq_of_tendsto_atTop hφ.2
state_before: case intro
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : Filter α
inst✝ : f.IsCountablyGenerated
u : ℕ → α
hx : (comap u f ⊓ atTop).NeBot
φ : ℕ → ℕ
hφ : Tendsto (u ∘ φ) atTop f ∧ Tendsto φ atTop atTop
⊢ ∃ θ, StrictMono θ ∧ Tendsto (u ∘ θ) atTop f
state_after: case intro.intro.intro
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : Filter α
inst✝ : f.IsCountablyGenerated
u : ℕ → α
hx : (comap u f ⊓ atTop).NeBot
φ : ℕ → ℕ
hφ : Tendsto (u ∘ φ) atTop f ∧ Tendsto φ atTop atTop
ψ : ℕ → ℕ
hψ : StrictMono ψ
hψφ : StrictMono (φ ∘ ψ)
⊢ ∃ θ, StrictMono θ ∧ Tendsto (u ∘ θ) atTop f

tactic: exact ⟨φ ∘ ψ, hψφ, hφ.1.comp hψ.tendsto_atTop⟩
state_before: case intro.intro.intro
ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : Filter α
inst✝ : f.IsCountablyGenerated
u : ℕ → α
hx : (comap u f ⊓ atTop).NeBot
φ : ℕ → ℕ
hφ : Tendsto (u ∘ φ) atTop f ∧ Tendsto φ atTop atTop
ψ : ℕ → ℕ
hψ : StrictMono ψ
hψφ : StrictMono (φ ∘ ψ)
⊢ ∃ θ, StrictMono θ ∧ Tendsto (u ∘ θ) atTop f
state_after: no goals
Theorem: Real.cos_lt_cos_of_nonneg_of_le_pi_div_two
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: linarith
state_before: x y : ℝ
hx₁ : 0 ≤ x
hy₂ : y ≤ π / 2
hxy : x < y
⊢ π / 2 ≤ π
state_after: no goals
Theorem: Finset.prod_attach_univ
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

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 : α → β
inst✝¹ : CommMonoid α
inst✝ : Fintype ι
f : { i // i ∈ univ } → α
⊢ ∀ (x : { x // x ∈ univ }), f x = f ⟨(Equiv.subtypeUnivEquiv ⋯) x, ⋯⟩
state_after: no goals
Theorem: Part.map_id'
File: Mathlib/Data/Part.lean

tactic: rw [show f = id from funext H]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f : α → α
H : ∀ (x : α), f x = x
o : Part α
⊢ map f o = o
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
f : α → α
H : ∀ (x : α), f x = x
o : Part α
⊢ map id o = o

tactic: exact id_map o
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f : α → α
H : ∀ (x : α), f x = x
o : Part α
⊢ map id o = o
state_after: no goals
Theorem: CategoryTheory.cokernel.π_unop
File: Mathlib/CategoryTheory/Abelian/Opposite.lean

tactic: simp
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
X Y : C
f : X ⟶ Y
A B : Cᵒᵖ
g : A ⟶ B
⊢ (cokernel.π g.unop).op = (cokernelUnopOp g).hom ≫ kernel.ι g ≫ eqToHom ⋯
state_after: no goals
Theorem: WittVector.init_pow
File: Mathlib/RingTheory/WittVector/InitTail.lean

tactic: init_ring using fun p [Fact (Nat.Prime p)] n => wittPow_vars p m n
state_before: p : ℕ
hp : Fact (Nat.Prime p)
n✝ : ℕ
R : Type u_1
inst✝ : CommRing R
m : ℕ
x : 𝕎 R
n : ℕ
⊢ init n (x ^ m) = init n (init n x ^ m)
state_after: no goals
Theorem: hasBasis_nhdsSet
File: Mathlib/Topology/NhdsSet.lean

tactic: simp [mem_nhdsSet_iff_exists, and_assoc]
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
f : Filter X
s✝ t✝ s₁ s₂ t₁ t₂ : Set X
x : X
s t : Set X
⊢ t ∈ 𝓝ˢ s ↔ ∃ i, (IsOpen i ∧ s ⊆ i) ∧ i ⊆ t
state_after: no goals
Theorem: List.Sublist.eq_of_length
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: rw [s.eq_of_length (succ.inj h)]
state_before: α✝ : Type u_1
l₁ l₂ l₁✝ l₂✝ : List α✝
a : α✝
s : l₁✝ <+ l₂✝
h : (a :: l₁✝).length = (a :: l₂✝).length
⊢ a :: l₁✝ = a :: l₂✝
state_after: no goals
Theorem: CategoryTheory.ShortComplex.Exact.epi_f'
File: Mathlib/Algebra/Homology/ShortComplex/Exact.lean

tactic: haveI := hS.hasHomology
state_before: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.37320, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : S.Exact
h : S.LeftHomologyData
⊢ IsZero (CokernelCofork.ofπ h.π ⋯).pt
state_after: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.37320, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : S.Exact
h : S.LeftHomologyData
this : S.HasHomology
⊢ IsZero (CokernelCofork.ofπ h.π ⋯).pt

tactic: dsimp
state_before: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.37320, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : S.Exact
h : S.LeftHomologyData
this : S.HasHomology
⊢ IsZero (CokernelCofork.ofπ h.π ⋯).pt
state_after: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.37320, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : S.Exact
h : S.LeftHomologyData
this : S.HasHomology
⊢ IsZero h.H

tactic: simpa only [← h.exact_iff] using hS
state_before: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{?u.37320, u_2} D
inst✝¹ : Preadditive C
inst✝ : Preadditive D
S : ShortComplex C
hS : S.Exact
h : S.LeftHomologyData
this : S.HasHomology
⊢ IsZero h.H
state_after: no goals
Theorem: Vector.mapAccumr_eq_map_of_constant_state
File: Mathlib/Data/Vector/MapLemmas.lean

tactic: clear ys
state_before: α : Type u_2
n : ℕ
β : Type u_1
xs : Vector α n
ys : Vector β n
σ : Type
f : α → σ → σ × β
s : σ
h : ∀ (a : α), (f a s).1 = s
⊢ mapAccumr f xs s = (s, map (fun x => (f x s).2) xs)
state_after: α : Type u_2
n : ℕ
β : Type u_1
xs : Vector α n
σ : Type
f : α → σ → σ × β
s : σ
h : ∀ (a : α), (f a s).1 = s
⊢ mapAccumr f xs s = (s, map (fun x => (f x s).2) xs)

tactic: induction xs using revInductionOn <;> simp_all
state_before: α : Type u_2
n : ℕ
β : Type u_1
xs : Vector α n
σ : Type
f : α → σ → σ × β
s : σ
h : ∀ (a : α), (f a s).1 = s
⊢ mapAccumr f xs s = (s, map (fun x => (f x s).2) xs)
state_after: no goals
Theorem: CategoryTheory.MonoidalCategory.pentagon_hom_inv_inv_inv_hom
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: rw [← cancel_epi (α_ W X (Y ⊗ Z)).inv, ← cancel_mono ((α_ W X Y).inv ▷ Z)]
state_before: C✝ : Type u
𝒞 : Category.{v, u} C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : MonoidalCategory C
U V W X Y Z : C
⊢ (α_ W X (Y ⊗ Z)).hom ≫ W ◁ (α_ X Y Z).inv ≫ (α_ W (X ⊗ Y) Z).inv = (α_ (W ⊗ X) Y Z).inv ≫ (α_ W X Y).hom ▷ Z
state_after: C✝ : Type u
𝒞 : Category.{v, u} C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : MonoidalCategory C
U V W X Y Z : C
⊢ ((α_ W X (Y ⊗ Z)).inv ≫ (α_ W X (Y ⊗ Z)).hom ≫ W ◁ (α_ X Y Z).inv ≫ (α_ W (X ⊗ Y) Z).inv) ≫ (α_ W X Y).inv ▷ Z =
    ((α_ W X (Y ⊗ Z)).inv ≫ (α_ (W ⊗ X) Y Z).inv ≫ (α_ W X Y).hom ▷ Z) ≫ (α_ W X Y).inv ▷ Z

tactic: simp
state_before: C✝ : Type u
𝒞 : Category.{v, u} C✝
inst✝² : MonoidalCategory C✝
C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : MonoidalCategory C
U V W X Y Z : C
⊢ ((α_ W X (Y ⊗ Z)).inv ≫ (α_ W X (Y ⊗ Z)).hom ≫ W ◁ (α_ X Y Z).inv ≫ (α_ W (X ⊗ Y) Z).inv) ≫ (α_ W X Y).inv ▷ Z =
    ((α_ W X (Y ⊗ Z)).inv ≫ (α_ (W ⊗ X) Y Z).inv ≫ (α_ W X Y).hom ▷ Z) ≫ (α_ W X Y).inv ▷ Z
state_after: no goals
Theorem: MeasureTheory.Measure.restrict_iUnion_apply_ae
File: Mathlib/MeasureTheory/Measure/Restrict.lean

tactic: simp only [restrict_apply, ht, inter_iUnion]
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t✝ : Set α
inst✝ : Countable ι
s : ι → Set α
hd : Pairwise (AEDisjoint μ on s)
hm : ∀ (i : ι), NullMeasurableSet (s i) μ
t : Set α
ht : MeasurableSet t
⊢ (μ.restrict (⋃ i, s i)) t = ∑' (i : ι), (μ.restrict (s i)) t
state_after: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t✝ : Set α
inst✝ : Countable ι
s : ι → Set α
hd : Pairwise (AEDisjoint μ on s)
hm : ∀ (i : ι), NullMeasurableSet (s i) μ
t : Set α
ht : MeasurableSet t
⊢ μ (⋃ i, t ∩ s i) = ∑' (i : ι), μ (t ∩ s i)

tactic: exact
  measure_iUnion₀ (hd.mono fun i j h => h.mono inter_subset_right inter_subset_right)
    fun i => ht.nullMeasurableSet.inter (hm i)
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t✝ : Set α
inst✝ : Countable ι
s : ι → Set α
hd : Pairwise (AEDisjoint μ on s)
hm : ∀ (i : ι), NullMeasurableSet (s i) μ
t : Set α
ht : MeasurableSet t
⊢ μ (⋃ i, t ∩ s i) = ∑' (i : ι), μ (t ∩ s i)
state_after: no goals
Theorem: BumpCovering.toPOUFun_eq_mul_prod
File: Mathlib/Topology/PartitionOfUnity.lean

tactic: refine congr_arg _ (finprod_cond_eq_prod_of_cond_iff _ fun {j} hj => ?_)
state_before: ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s : Set X
f : BumpCovering ι X s
i : ι
x : X
t : Finset ι
ht : ∀ (j : ι), WellOrderingRel j i → (f j) x ≠ 0 → j ∈ t
⊢ f.toPOUFun i x = (f i) x * ∏ j ∈ Finset.filter (fun j => WellOrderingRel j i) t, (1 - (f j) x)
state_after: ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s : Set X
f : BumpCovering ι X s
i : ι
x : X
t : Finset ι
ht : ∀ (j : ι), WellOrderingRel j i → (f j) x ≠ 0 → j ∈ t
j : ι
hj : 1 - (f j) x ≠ 1
⊢ WellOrderingRel j i ↔ j ∈ Finset.filter (fun j => WellOrderingRel j i) t

tactic: rw [Ne, sub_eq_self] at hj
state_before: ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s : Set X
f : BumpCovering ι X s
i : ι
x : X
t : Finset ι
ht : ∀ (j : ι), WellOrderingRel j i → (f j) x ≠ 0 → j ∈ t
j : ι
hj : 1 - (f j) x ≠ 1
⊢ WellOrderingRel j i ↔ j ∈ Finset.filter (fun j => WellOrderingRel j i) t
state_after: ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s : Set X
f : BumpCovering ι X s
i : ι
x : X
t : Finset ι
ht : ∀ (j : ι), WellOrderingRel j i → (f j) x ≠ 0 → j ∈ t
j : ι
hj : ¬(f j) x = 0
⊢ WellOrderingRel j i ↔ j ∈ Finset.filter (fun j => WellOrderingRel j i) t

tactic: rw [Finset.mem_filter, Iff.comm, and_iff_right_iff_imp]
state_before: ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s : Set X
f : BumpCovering ι X s
i : ι
x : X
t : Finset ι
ht : ∀ (j : ι), WellOrderingRel j i → (f j) x ≠ 0 → j ∈ t
j : ι
hj : ¬(f j) x = 0
⊢ WellOrderingRel j i ↔ j ∈ Finset.filter (fun j => WellOrderingRel j i) t
state_after: ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s : Set X
f : BumpCovering ι X s
i : ι
x : X
t : Finset ι
ht : ∀ (j : ι), WellOrderingRel j i → (f j) x ≠ 0 → j ∈ t
j : ι
hj : ¬(f j) x = 0
⊢ WellOrderingRel j i → j ∈ t

tactic: exact flip (ht j) hj
state_before: ι : Type u
X : Type v
inst✝ : TopologicalSpace X
s : Set X
f : BumpCovering ι X s
i : ι
x : X
t : Finset ι
ht : ∀ (j : ι), WellOrderingRel j i → (f j) x ≠ 0 → j ∈ t
j : ι
hj : ¬(f j) x = 0
⊢ WellOrderingRel j i → j ∈ t
state_after: no goals
Theorem: sq_eq_sq_iff_abs_eq_abs
File: Mathlib/Algebra/Order/Ring/Abs.lean

tactic: simp only [le_antisymm_iff, sq_le_sq]
state_before: α : Type u_1
inst✝ : LinearOrderedRing α
n : ℕ
a✝ b✝ c a b : α
⊢ a ^ 2 = b ^ 2 ↔ |a| = |b|
state_after: no goals
Theorem: CategoryTheory.CommSq.right_adjoint
File: Mathlib/CategoryTheory/LiftingProperties/Adjunction.lean

tactic: simp only [Adjunction.homEquiv_unit, assoc, ← F.map_comp, sq.w]
state_before: C : Type u_1
D : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Category.{u_4, u_2} D
G : C ⥤ D
F : D ⥤ C
A B : C
X Y : D
i : A ⟶ B
p : X ⟶ Y
u : G.obj A ⟶ X
v : G.obj B ⟶ Y
sq : CommSq u (G.map i) p v
adj : G ⊣ F
⊢ (adj.homEquiv A X) u ≫ F.map p = i ≫ (adj.homEquiv B Y) v
state_after: C : Type u_1
D : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Category.{u_4, u_2} D
G : C ⥤ D
F : D ⥤ C
A B : C
X Y : D
i : A ⟶ B
p : X ⟶ Y
u : G.obj A ⟶ X
v : G.obj B ⟶ Y
sq : CommSq u (G.map i) p v
adj : G ⊣ F
⊢ adj.unit.app A ≫ F.map (G.map i ≫ v) = i ≫ adj.unit.app B ≫ F.map v

tactic: rw [F.map_comp, Adjunction.unit_naturality_assoc]
state_before: C : Type u_1
D : Type u_2
inst✝¹ : Category.{u_3, u_1} C
inst✝ : Category.{u_4, u_2} D
G : C ⥤ D
F : D ⥤ C
A B : C
X Y : D
i : A ⟶ B
p : X ⟶ Y
u : G.obj A ⟶ X
v : G.obj B ⟶ Y
sq : CommSq u (G.map i) p v
adj : G ⊣ F
⊢ adj.unit.app A ≫ F.map (G.map i ≫ v) = i ≫ adj.unit.app B ≫ F.map v
state_after: no goals
Theorem: cmpLE_swap
File: Mathlib/Order/Compare.lean

tactic: by_cases xy:x ≤ y <;> by_cases yx:y ≤ x <;> simp [cmpLE, *, Ordering.swap]
state_before: α✝ : Type u_1
β : Type u_2
α : Type u_3
inst✝² : LE α
inst✝¹ : IsTotal α fun x x_1 => x ≤ x_1
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
x y : α
⊢ (cmpLE x y).swap = cmpLE y x
state_after: case neg
α✝ : Type u_1
β : Type u_2
α : Type u_3
inst✝² : LE α
inst✝¹ : IsTotal α fun x x_1 => x ≤ x_1
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
x y : α
xy : ¬x ≤ y
yx : ¬y ≤ x
⊢ False

tactic: cases not_or_of_not xy yx (total_of _ _ _)
state_before: case neg
α✝ : Type u_1
β : Type u_2
α : Type u_3
inst✝² : LE α
inst✝¹ : IsTotal α fun x x_1 => x ≤ x_1
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
x y : α
xy : ¬x ≤ y
yx : ¬y ≤ x
⊢ False
state_after: no goals
Theorem: Multiset.add_inter_distrib
File: Mathlib/Data/Multiset/Basic.lean

tactic: rw [add_comm, inter_add_distrib, add_comm s, add_comm s]
state_before: α : Type u_1
β : Type v
γ : Type u_2
inst✝ : DecidableEq α
s✝ t✝ u✝ : Multiset α
a b : α
s t u : Multiset α
⊢ s + t ∩ u = (s + t) ∩ (s + u)
state_after: no goals
Theorem: IsLocalization.ext
File: Mathlib/RingTheory/Localization/Basic.lean

tactic: rw [this]
state_before: R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
g : R →+* P
hg : ∀ (y : ↥M), IsUnit (g ↑y)
j k : S → P
hj1 : j 1 = 1
hk1 : k 1 = 1
hjm : ∀ (a b : S), j (a * b) = j a * j b
hkm : ∀ (a b : S), k (a * b) = k a * k b
h : ∀ (a : R), j ((algebraMap R S) a) = k ((algebraMap R S) a)
j' : S →* P := { toFun := j, map_one' := hj1, map_mul' := hjm }
k' : S →* P := { toFun := k, map_one' := hk1, map_mul' := hkm }
this : j' = k'
⊢ (↑j').toFun = (↑k').toFun
state_after: no goals
Theorem: Ideal.Quotient.eq_zero_iff_dvd
File: Mathlib/RingTheory/Ideal/Quotient.lean

tactic: rw [Ideal.Quotient.eq_zero_iff_mem, Ideal.mem_span_singleton]
state_before: R : Type u
inst✝ : CommRing R
I : Ideal R
a b : R
S : Type v
x✝ y✝ x y : R
⊢ (mk (span {x})) y = 0 ↔ x ∣ y
state_after: no goals
Theorem: Hyperreal.infiniteNeg_mul_of_infinitePos_not_infinitesimal_neg
File: Mathlib/Data/Real/Hyperreal.lean

tactic: rw [← infinitePos_neg, ← neg_pos, neg_mul_eq_mul_neg, ← infinitesimal_neg]
state_before: x y : ℝ*
⊢ x.InfinitePos → ¬y.Infinitesimal → y < 0 → (x * y).InfiniteNeg
state_after: x y : ℝ*
⊢ x.InfinitePos → ¬(-y).Infinitesimal → 0 < -y → (x * -y).InfinitePos

tactic: exact infinitePos_mul_of_infinitePos_not_infinitesimal_pos
state_before: x y : ℝ*
⊢ x.InfinitePos → ¬(-y).Infinitesimal → 0 < -y → (x * -y).InfinitePos
state_after: no goals
Theorem: CategoryTheory.Arrow.AugmentedCechNerve.ExtraDegeneracy.s_comp_base
File: Mathlib/AlgebraicTopology/ExtraDegeneracy.lean

tactic: apply WidePullback.lift_base
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
f : Arrow C
inst✝ : ∀ (n : ℕ), HasWidePullback f.right (fun x => f.left) fun x => f.hom
S : SplitEpi f.hom
n : ℕ
⊢ (s f S n ≫ WidePullback.base fun x => f.hom) = WidePullback.base fun x => f.hom
state_after: no goals
Theorem: Real.logb_pos_iff_of_base_lt_one
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

tactic: rw [← @logb_one b, logb_lt_logb_iff_of_base_lt_one b_pos b_lt_one zero_lt_one hx]
state_before: b x y : ℝ
b_pos : 0 < b
b_lt_one : b < 1
hx : 0 < x
⊢ 0 < logb b x ↔ x < 1
state_after: no goals
Theorem: MulAction.period_inv
File: Mathlib/GroupTheory/GroupAction/Period.lean

tactic: simp only [period_eq_minimalPeriod, Function.minimalPeriod_eq_minimalPeriod_iff,
  isPeriodicPt_smul_iff]
state_before: α : Type v
G : Type u
inst✝³ : Group G
inst✝² : MulAction G α
M : Type u
inst✝¹ : Monoid M
inst✝ : MulAction M α
g : G
a : α
⊢ period g⁻¹ a = period g a
state_after: α : Type v
G : Type u
inst✝³ : Group G
inst✝² : MulAction G α
M : Type u
inst✝¹ : Monoid M
inst✝ : MulAction M α
g : G
a : α
⊢ ∀ (n : ℕ), g⁻¹ ^ n • a = a ↔ g ^ n • a = a

tactic: intro n
state_before: α : Type v
G : Type u
inst✝³ : Group G
inst✝² : MulAction G α
M : Type u
inst✝¹ : Monoid M
inst✝ : MulAction M α
g : G
a : α
⊢ ∀ (n : ℕ), g⁻¹ ^ n • a = a ↔ g ^ n • a = a
state_after: α : Type v
G : Type u
inst✝³ : Group G
inst✝² : MulAction G α
M : Type u
inst✝¹ : Monoid M
inst✝ : MulAction M α
g : G
a : α
n : ℕ
⊢ g⁻¹ ^ n • a = a ↔ g ^ n • a = a

tactic: rw [smul_eq_iff_eq_inv_smul, eq_comm, ← zpow_natCast, inv_zpow, inv_inv, zpow_natCast]
state_before: α : Type v
G : Type u
inst✝³ : Group G
inst✝² : MulAction G α
M : Type u
inst✝¹ : Monoid M
inst✝ : MulAction M α
g : G
a : α
n : ℕ
⊢ g⁻¹ ^ n • a = a ↔ g ^ n • a = a
state_after: no goals
Theorem: LieIdeal.comap_map_eq
File: Mathlib/Algebra/Lie/Submodule.lean

tactic: rw [← LieSubmodule.coe_toSubmodule_eq_iff, comap_coeSubmodule, I.map_coeSubmodule f h,
  LieSubmodule.sup_coe_toSubmodule, f.ker_coeSubmodule, Submodule.comap_map_eq]
state_before: R : Type u
L : Type v
L' : Type w₂
M : Type w
M' : Type w₁
inst✝¹² : CommRing R
inst✝¹¹ : LieRing L
inst✝¹⁰ : LieAlgebra R L
inst✝⁹ : LieRing L'
inst✝⁸ : LieAlgebra R L'
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
inst✝¹ : LieRingModule L M'
inst✝ : LieModule R L M'
f : L →ₗ⁅R⁆ L'
I : LieIdeal R L
J : LieIdeal R L'
h : ↑(map f I) = ⇑f '' ↑I
⊢ comap f (map f I) = I ⊔ f.ker
state_after: no goals
Theorem: ProbabilityTheory.geometricPMFRealSum
File: Mathlib/Probability/Distributions/Geometric.lean

tactic: unfold geometricPMFReal
state_before: p : ℝ
hp_pos : 0 < p
hp_le_one : p ≤ 1
⊢ HasSum (fun n => geometricPMFReal p n) 1
state_after: p : ℝ
hp_pos : 0 < p
hp_le_one : p ≤ 1
⊢ HasSum (fun n => (1 - p) ^ n * p) 1

tactic: have := hasSum_geometric_of_lt_one (sub_nonneg.mpr hp_le_one) (sub_lt_self 1 hp_pos)
state_before: p : ℝ
hp_pos : 0 < p
hp_le_one : p ≤ 1
⊢ HasSum (fun n => (1 - p) ^ n * p) 1
state_after: p : ℝ
hp_pos : 0 < p
hp_le_one : p ≤ 1
this : HasSum (fun n => (1 - p) ^ n) (1 - (1 - p))⁻¹
⊢ HasSum (fun n => (1 - p) ^ n * p) 1

tactic: apply (hasSum_mul_right_iff (hp_pos.ne')).mpr at this
state_before: p : ℝ
hp_pos : 0 < p
hp_le_one : p ≤ 1
this : HasSum (fun n => (1 - p) ^ n) (1 - (1 - p))⁻¹
⊢ HasSum (fun n => (1 - p) ^ n * p) 1
state_after: p : ℝ
hp_pos : 0 < p
hp_le_one : p ≤ 1
this : HasSum (fun i => (1 - p) ^ i * p) ((1 - (1 - p))⁻¹ * p)
⊢ HasSum (fun n => (1 - p) ^ n * p) 1

tactic: simp only [sub_sub_cancel] at this
state_before: p : ℝ
hp_pos : 0 < p
hp_le_one : p ≤ 1
this : HasSum (fun i => (1 - p) ^ i * p) ((1 - (1 - p))⁻¹ * p)
⊢ HasSum (fun n => (1 - p) ^ n * p) 1
state_after: p : ℝ
hp_pos : 0 < p
hp_le_one : p ≤ 1
this : HasSum (fun i => (1 - p) ^ i * p) (p⁻¹ * p)
⊢ HasSum (fun n => (1 - p) ^ n * p) 1

tactic: rw [inv_mul_eq_div, div_self hp_pos.ne'] at this
state_before: p : ℝ
hp_pos : 0 < p
hp_le_one : p ≤ 1
this : HasSum (fun i => (1 - p) ^ i * p) (p⁻¹ * p)
⊢ HasSum (fun n => (1 - p) ^ n * p) 1
state_after: p : ℝ
hp_pos : 0 < p
hp_le_one : p ≤ 1
this : HasSum (fun i => (1 - p) ^ i * p) 1
⊢ HasSum (fun n => (1 - p) ^ n * p) 1

tactic: exact this
state_before: p : ℝ
hp_pos : 0 < p
hp_le_one : p ≤ 1
this : HasSum (fun i => (1 - p) ^ i * p) 1
⊢ HasSum (fun n => (1 - p) ^ n * p) 1
state_after: no goals
Theorem: descPochhammer_natDegree
File: Mathlib/RingTheory/Polynomial/Pochhammer.lean

tactic: induction' n with n hn
state_before: R : Type u
inst✝² : Ring R
n : ℕ
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
⊢ (descPochhammer R n).natDegree = n
state_after: case zero
R : Type u
inst✝² : Ring R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
⊢ (descPochhammer R 0).natDegree = 0

case succ
R : Type u
inst✝² : Ring R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
n : ℕ
hn : (descPochhammer R n).natDegree = n
⊢ (descPochhammer R (n + 1)).natDegree = n + 1

tactic: simp
state_before: case zero
R : Type u
inst✝² : Ring R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
⊢ (descPochhammer R 0).natDegree = 0
state_after: no goals

tactic: have : natDegree (X - (n : R[X])) = 1 := natDegree_X_sub_C (n : R)
state_before: case succ
R : Type u
inst✝² : Ring R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
n : ℕ
hn : (descPochhammer R n).natDegree = n
⊢ (descPochhammer R (n + 1)).natDegree = n + 1
state_after: case succ
R : Type u
inst✝² : Ring R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
n : ℕ
hn : (descPochhammer R n).natDegree = n
this : (X - ↑n).natDegree = 1
⊢ (descPochhammer R (n + 1)).natDegree = n + 1

tactic: rw [descPochhammer_succ_right,
    natDegree_mul _ (ne_zero_of_natDegree_gt <| this.symm ▸ Nat.zero_lt_one), hn, this]
state_before: case succ
R : Type u
inst✝² : Ring R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
n : ℕ
hn : (descPochhammer R n).natDegree = n
this : (X - ↑n).natDegree = 1
⊢ (descPochhammer R (n + 1)).natDegree = n + 1
state_after: R : Type u
inst✝² : Ring R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
n : ℕ
hn : (descPochhammer R n).natDegree = n
this : (X - ↑n).natDegree = 1
⊢ descPochhammer R n ≠ 0

tactic: cases n
state_before: R : Type u
inst✝² : Ring R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
n : ℕ
hn : (descPochhammer R n).natDegree = n
this : (X - ↑n).natDegree = 1
⊢ descPochhammer R n ≠ 0
state_after: case zero
R : Type u
inst✝² : Ring R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
hn : (descPochhammer R 0).natDegree = 0
this : (X - ↑0).natDegree = 1
⊢ descPochhammer R 0 ≠ 0

case succ
R : Type u
inst✝² : Ring R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
n✝ : ℕ
hn : (descPochhammer R (n✝ + 1)).natDegree = n✝ + 1
this : (X - ↑(n✝ + 1)).natDegree = 1
⊢ descPochhammer R (n✝ + 1) ≠ 0

tactic: simp
state_before: case zero
R : Type u
inst✝² : Ring R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
hn : (descPochhammer R 0).natDegree = 0
this : (X - ↑0).natDegree = 1
⊢ descPochhammer R 0 ≠ 0
state_after: no goals

tactic: refine ne_zero_of_natDegree_gt <| hn.symm ▸ Nat.add_one_pos _
state_before: case succ
R : Type u
inst✝² : Ring R
inst✝¹ : NoZeroDivisors R
inst✝ : Nontrivial R
n✝ : ℕ
hn : (descPochhammer R (n✝ + 1)).natDegree = n✝ + 1
this : (X - ↑(n✝ + 1)).natDegree = 1
⊢ descPochhammer R (n✝ + 1) ≠ 0
state_after: no goals
Theorem: Polynomial.trinomial_leadingCoeff
File: Mathlib/Algebra/Polynomial/UnitTrinomial.lean

tactic: rw [leadingCoeff, trinomial_natDegree hkm hmn hw, trinomial_leading_coeff' hkm hmn]
state_before: R : Type u_1
inst✝ : Semiring R
k m n : ℕ
u v w : R
hkm : k < m
hmn : m < n
hw : w ≠ 0
⊢ (trinomial k m n u v w).leadingCoeff = w
state_after: no goals