1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: CategoryTheory.exact_iso_comp
File: Mathlib/Algebra/Homology/Exact.lean

tactic: rw [← IsIso.inv_hom_id_assoc f g]
state_before: V : Type u
inst✝⁴ : Category.{v, u} V
inst✝³ : HasImages V
A B C D : V
f : A ⟶ B
g : B ⟶ C
h : C ⟶ D
inst✝² : HasZeroMorphisms V
inst✝¹ : HasEqualizers V
inst✝ : IsIso f
w : Exact (f ≫ g) h
⊢ Exact g h
state_after: V : Type u
inst✝⁴ : Category.{v, u} V
inst✝³ : HasImages V
A B C D : V
f : A ⟶ B
g : B ⟶ C
h : C ⟶ D
inst✝² : HasZeroMorphisms V
inst✝¹ : HasEqualizers V
inst✝ : IsIso f
w : Exact (f ≫ g) h
⊢ Exact (inv f ≫ f ≫ g) h

tactic: exact exact_epi_comp w
state_before: V : Type u
inst✝⁴ : Category.{v, u} V
inst✝³ : HasImages V
A B C D : V
f : A ⟶ B
g : B ⟶ C
h : C ⟶ D
inst✝² : HasZeroMorphisms V
inst✝¹ : HasEqualizers V
inst✝ : IsIso f
w : Exact (f ≫ g) h
⊢ Exact (inv f ≫ f ≫ g) h
state_after: no goals
Theorem: Tactic.NormNum.int_gcd_helper
File: Mathlib/Tactic/NormNum/GCD.lean

tactic: subst_vars
state_before: x y : ℤ
x' y' d : ℕ
hx : x.natAbs = x'
hy : y.natAbs = y'
h : x'.gcd y' = d
⊢ x.gcd y = d
state_after: x y : ℤ
⊢ x.gcd y = x.natAbs.gcd y.natAbs

tactic: rw [Int.gcd_def]
state_before: x y : ℤ
⊢ x.gcd y = x.natAbs.gcd y.natAbs
state_after: no goals
Theorem: WeierstrassCurve.Jacobian.map_negDblY
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

tactic: simp [negDblY]
state_before: R : Type u
inst✝² : CommRing R
W' : Jacobian R
F : Type v
inst✝¹ : Field F
W : Jacobian F
S : Type u_1
inst✝ : CommRing S
f : R →+* S
P Q : Fin 3 → R
⊢ negDblY (map W' f) (⇑f ∘ P) = f (W'.negDblY P)
state_after: no goals
Theorem: Fin.isCycle_cycleRange
File: Mathlib/GroupTheory/Perm/Fin.lean

tactic: cases' i with i hi
state_before: n : ℕ
i : Fin (n + 1)
h0 : i ≠ 0
⊢ i.cycleRange.IsCycle
state_after: case mk
n i : ℕ
hi : i < n + 1
h0 : ⟨i, hi⟩ ≠ 0
⊢ ⟨i, hi⟩.cycleRange.IsCycle

tactic: cases i
state_before: case mk
n i : ℕ
hi : i < n + 1
h0 : ⟨i, hi⟩ ≠ 0
⊢ ⟨i, hi⟩.cycleRange.IsCycle
state_after: case mk.zero
n : ℕ
hi : 0 < n + 1
h0 : ⟨0, hi⟩ ≠ 0
⊢ ⟨0, hi⟩.cycleRange.IsCycle

case mk.succ
n n✝ : ℕ
hi : n✝ + 1 < n + 1
h0 : ⟨n✝ + 1, hi⟩ ≠ 0
⊢ ⟨n✝ + 1, hi⟩.cycleRange.IsCycle

tactic: exact isCycle_finRotate.extendDomain _
state_before: case mk.succ
n n✝ : ℕ
hi : n✝ + 1 < n + 1
h0 : ⟨n✝ + 1, hi⟩ ≠ 0
⊢ ⟨n✝ + 1, hi⟩.cycleRange.IsCycle
state_after: no goals

tactic: exact (h0 rfl).elim
state_before: case mk.zero
n : ℕ
hi : 0 < n + 1
h0 : ⟨0, hi⟩ ≠ 0
⊢ ⟨0, hi⟩.cycleRange.IsCycle
state_after: no goals
Theorem: Asymptotics.IsLittleO.add_add
File: Mathlib/Analysis/Asymptotics/Asymptotics.lean

tactic: refine (h₁.trans_le fun x => ?_).add (h₂.trans_le ?_) <;> simp [abs_of_nonneg, add_nonneg]
state_before: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
E' : Type u_6
F' : Type u_7
G' : Type u_8
E'' : Type u_9
F'' : Type u_10
G'' : Type u_11
E''' : Type u_12
R : Type u_13
R' : Type u_14
𝕜 : Type u_15
𝕜' : Type u_16
inst✝¹³ : Norm E
inst✝¹² : Norm F
inst✝¹¹ : Norm G
inst✝¹⁰ : SeminormedAddCommGroup E'
inst✝⁹ : SeminormedAddCommGroup F'
inst✝⁸ : SeminormedAddCommGroup G'
inst✝⁷ : NormedAddCommGroup E''
inst✝⁶ : NormedAddCommGroup F''
inst✝⁵ : NormedAddCommGroup G''
inst✝⁴ : SeminormedRing R
inst✝³ : SeminormedAddGroup E'''
inst✝² : SeminormedRing R'
inst✝¹ : NormedDivisionRing 𝕜
inst✝ : NormedDivisionRing 𝕜'
c c' c₁ c₂ : ℝ
f : α → E
g : α → F
k : α → G
f' : α → E'
g' : α → F'
k' : α → G'
f'' : α → E''
g'' : α → F''
k'' : α → G''
l l' : Filter α
f₁ f₂ : α → E'
g₁ g₂ : α → F'
h₁ : f₁ =o[l] g₁
h₂ : f₂ =o[l] g₂
⊢ (fun x => f₁ x + f₂ x) =o[l] fun x => ‖g₁ x‖ + ‖g₂ x‖
state_after: no goals
Theorem: Localization.mk_eq_mk'_apply
File: Mathlib/RingTheory/Localization/Basic.lean

tactic: rw [mk_eq_monoidOf_mk'_apply, mk', toLocalizationMap_eq_monoidOf]
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
x : R
y : ↥M
⊢ mk x y = mk' (Localization M) x y
state_after: no goals
Theorem: MonoidHom.map_finprod_of_preimage_one
File: Mathlib/Algebra/BigOperators/Finprod.lean

tactic: by_cases hg : (mulSupport <| g ∘ PLift.down).Finite
state_before: G : Type u_1
M : Type u_2
N : Type u_3
α : Sort u_4
β : Sort u_5
ι : Sort u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : M →* N
hf : ∀ (x : M), f x = 1 → x = 1
g : α → M
⊢ f (∏ᶠ (i : α), g i) = ∏ᶠ (i : α), f (g i)
state_after: case pos
G : Type u_1
M : Type u_2
N : Type u_3
α : Sort u_4
β : Sort u_5
ι : Sort u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : M →* N
hf : ∀ (x : M), f x = 1 → x = 1
g : α → M
hg : (mulSupport (g ∘ PLift.down)).Finite
⊢ f (∏ᶠ (i : α), g i) = ∏ᶠ (i : α), f (g i)

case neg
G : Type u_1
M : Type u_2
N : Type u_3
α : Sort u_4
β : Sort u_5
ι : Sort u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : M →* N
hf : ∀ (x : M), f x = 1 → x = 1
g : α → M
hg : ¬(mulSupport (g ∘ PLift.down)).Finite
⊢ f (∏ᶠ (i : α), g i) = ∏ᶠ (i : α), f (g i)

tactic: rw [finprod, dif_neg, f.map_one, finprod, dif_neg]
state_before: case neg
G : Type u_1
M : Type u_2
N : Type u_3
α : Sort u_4
β : Sort u_5
ι : Sort u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : M →* N
hf : ∀ (x : M), f x = 1 → x = 1
g : α → M
hg : ¬(mulSupport (g ∘ PLift.down)).Finite
⊢ f (∏ᶠ (i : α), g i) = ∏ᶠ (i : α), f (g i)
state_after: case neg.hnc
G : Type u_1
M : Type u_2
N : Type u_3
α : Sort u_4
β : Sort u_5
ι : Sort u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : M →* N
hf : ∀ (x : M), f x = 1 → x = 1
g : α → M
hg : ¬(mulSupport (g ∘ PLift.down)).Finite
⊢ ¬(mulSupport ((fun i => f (g i)) ∘ PLift.down)).Finite

case neg.hnc
G : Type u_1
M : Type u_2
N : Type u_3
α : Sort u_4
β : Sort u_5
ι : Sort u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : M →* N
hf : ∀ (x : M), f x = 1 → x = 1
g : α → M
hg : ¬(mulSupport (g ∘ PLift.down)).Finite
⊢ ¬(mulSupport ((fun i => g i) ∘ PLift.down)).Finite

tactic: exacts [Infinite.mono (fun x hx => mt (hf (g x.down)) hx) hg, hg]
state_before: case neg.hnc
G : Type u_1
M : Type u_2
N : Type u_3
α : Sort u_4
β : Sort u_5
ι : Sort u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : M →* N
hf : ∀ (x : M), f x = 1 → x = 1
g : α → M
hg : ¬(mulSupport (g ∘ PLift.down)).Finite
⊢ ¬(mulSupport ((fun i => f (g i)) ∘ PLift.down)).Finite

case neg.hnc
G : Type u_1
M : Type u_2
N : Type u_3
α : Sort u_4
β : Sort u_5
ι : Sort u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : M →* N
hf : ∀ (x : M), f x = 1 → x = 1
g : α → M
hg : ¬(mulSupport (g ∘ PLift.down)).Finite
⊢ ¬(mulSupport ((fun i => g i) ∘ PLift.down)).Finite
state_after: no goals

tactic: exact f.map_finprod_plift g hg
state_before: case pos
G : Type u_1
M : Type u_2
N : Type u_3
α : Sort u_4
β : Sort u_5
ι : Sort u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : M →* N
hf : ∀ (x : M), f x = 1 → x = 1
g : α → M
hg : (mulSupport (g ∘ PLift.down)).Finite
⊢ f (∏ᶠ (i : α), g i) = ∏ᶠ (i : α), f (g i)
state_after: no goals
Theorem: MvPolynomial.finSuccEquiv_comp_C_eq_C
File: Mathlib/Algebra/MvPolynomial/Equiv.lean

tactic: refine RingHom.ext fun x => ?_
state_before: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R✝
e : ℕ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R✝
n✝ : ℕ
R : Type u
inst✝ : CommSemiring R
n : ℕ
⊢ (↑(finSuccEquiv R n).symm).comp (Polynomial.C.comp C) = C
state_after: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R✝
e : ℕ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R✝
n✝ : ℕ
R : Type u
inst✝ : CommSemiring R
n : ℕ
x : R
⊢ ((↑(finSuccEquiv R n).symm).comp (Polynomial.C.comp C)) x = C x

tactic: rw [RingHom.comp_apply]
state_before: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R✝
e : ℕ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R✝
n✝ : ℕ
R : Type u
inst✝ : CommSemiring R
n : ℕ
x : R
⊢ ((↑(finSuccEquiv R n).symm).comp (Polynomial.C.comp C)) x = C x
state_after: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R✝
e : ℕ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R✝
n✝ : ℕ
R : Type u
inst✝ : CommSemiring R
n : ℕ
x : R
⊢ ↑(finSuccEquiv R n).symm ((Polynomial.C.comp C) x) = C x

tactic: refine
  (MvPolynomial.finSuccEquiv R n).injective
    (Trans.trans ((MvPolynomial.finSuccEquiv R n).apply_symm_apply _) ?_)
state_before: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R✝
e : ℕ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R✝
n✝ : ℕ
R : Type u
inst✝ : CommSemiring R
n : ℕ
x : R
⊢ ↑(finSuccEquiv R n).symm ((Polynomial.C.comp C) x) = C x
state_after: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R✝
e : ℕ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R✝
n✝ : ℕ
R : Type u
inst✝ : CommSemiring R
n : ℕ
x : R
⊢ (Polynomial.C.comp C) x = (finSuccEquiv R n) (C x)

tactic: simp only [MvPolynomial.finSuccEquiv_apply, MvPolynomial.eval₂Hom_C]
state_before: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R✝
e : ℕ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R✝
n✝ : ℕ
R : Type u
inst✝ : CommSemiring R
n : ℕ
x : R
⊢ (Polynomial.C.comp C) x = (finSuccEquiv R n) (C x)
state_after: no goals
Theorem: frequently_nhdsWithin_iff
File: Mathlib/Topology/ContinuousOn.lean

tactic: simp only [and_comm]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : TopologicalSpace α
z : α
s : Set α
p : α → Prop
⊢ (∃ᶠ (x : α) in 𝓝 z, x ∈ s ∧ p x) ↔ ∃ᶠ (x : α) in 𝓝 z, p x ∧ x ∈ s
state_after: no goals
Theorem: List.foldlIdx_eq_foldlIdxSpec
File: Mathlib/Data/List/Indexes.lean

tactic: induction bs generalizing start a
state_before: α : Type u
β : Type v
f : ℕ → α → β → α
a : α
bs : List β
start : ℕ
⊢ foldlIdx f a bs start = foldlIdxSpec f a bs start
state_after: case nil
α : Type u
β : Type v
f : ℕ → α → β → α
a : α
start : ℕ
⊢ foldlIdx f a [] start = foldlIdxSpec f a [] start

case cons
α : Type u
β : Type v
f : ℕ → α → β → α
head✝ : β
tail✝ : List β
tail_ih✝ : ∀ (a : α) (start : ℕ), foldlIdx f a tail✝ start = foldlIdxSpec f a tail✝ start
a : α
start : ℕ
⊢ foldlIdx f a (head✝ :: tail✝) start = foldlIdxSpec f a (head✝ :: tail✝) start

tactic: rfl
state_before: case nil
α : Type u
β : Type v
f : ℕ → α → β → α
a : α
start : ℕ
⊢ foldlIdx f a [] start = foldlIdxSpec f a [] start
state_after: no goals

tactic: simp [foldlIdxSpec, *]
state_before: case cons
α : Type u
β : Type v
f : ℕ → α → β → α
head✝ : β
tail✝ : List β
tail_ih✝ : ∀ (a : α) (start : ℕ), foldlIdx f a tail✝ start = foldlIdxSpec f a tail✝ start
a : α
start : ℕ
⊢ foldlIdx f a (head✝ :: tail✝) start = foldlIdxSpec f a (head✝ :: tail✝) start
state_after: no goals
Theorem: Real.rpow_one_sub'
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: rw [rpow_sub' hx h, rpow_one]
state_before: x y z : ℝ
n : ℕ
hx : 0 ≤ x
h : 1 - y ≠ 0
⊢ x ^ (1 - y) = x / x ^ y
state_after: no goals
Theorem: HasCompactSupport.mul_left
File: Mathlib/Topology/Support.lean

tactic: rw [hasCompactSupport_iff_eventuallyEq] at hf ⊢
state_before: X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝¹ : TopologicalSpace α
inst✝ : MulZeroClass β
f f' : α → β
x : α
hf : HasCompactSupport f'
⊢ HasCompactSupport (f * f')
state_after: X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝¹ : TopologicalSpace α
inst✝ : MulZeroClass β
f f' : α → β
x : α
hf : f' =ᶠ[coclosedCompact α] 0
⊢ f * f' =ᶠ[coclosedCompact α] 0

tactic: exact hf.mono fun x hx => by simp_rw [Pi.mul_apply, hx, Pi.zero_apply, mul_zero]
state_before: X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝¹ : TopologicalSpace α
inst✝ : MulZeroClass β
f f' : α → β
x : α
hf : f' =ᶠ[coclosedCompact α] 0
⊢ f * f' =ᶠ[coclosedCompact α] 0
state_after: no goals

tactic: simp_rw [Pi.mul_apply, hx, Pi.zero_apply, mul_zero]
state_before: X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝¹ : TopologicalSpace α
inst✝ : MulZeroClass β
f f' : α → β
x✝ : α
hf : f' =ᶠ[coclosedCompact α] 0
x : α
hx : f' x = 0 x
⊢ (f * f') x = 0 x
state_after: no goals
Theorem: Finset.covBy_iff_exists_cons
File: Mathlib/Data/Finset/Grade.lean

tactic: rintro ⟨a, ha, rfl⟩
state_before: α : Type u_1
s t : Finset α
a : α
⊢ (∃ a, ∃ (ha : a ∉ s), cons a s ha = t) → s ⋖ t
state_after: case intro.intro
α : Type u_1
s : Finset α
a✝ a : α
ha : a ∉ s
⊢ s ⋖ cons a s ha

tactic: exact covBy_cons _
state_before: case intro.intro
α : Type u_1
s : Finset α
a✝ a : α
ha : a ∉ s
⊢ s ⋖ cons a s ha
state_after: no goals
Theorem: RegularExpression.zero_rmatch
File: Mathlib/Computability/RegularExpressions.lean

tactic: induction x <;> simp [rmatch, matchEpsilon, *]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
dec : DecidableEq α
a b : α
x : List α
⊢ rmatch 0 x = false
state_after: no goals
Theorem: oneLePart_inf_leOnePart_eq_one
File: Mathlib/Algebra/Order/Group/PosPart.lean

tactic: rw [← mul_left_inj a⁻ᵐ⁻¹, inf_mul, one_mul, mul_right_inv, ← div_eq_mul_inv,
  oneLePart_div_leOnePart, leOnePart_eq_inv_inf_one, inv_inv]
state_before: α : Type u_1
β : Type u_2
inst✝³ : Lattice α
inst✝² : Group α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
inst✝ : CovariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a✝ a : α
⊢ a⁺ᵐ ⊓ a⁻ᵐ = 1
state_after: no goals
Theorem: ascPochhammer_map
File: Mathlib/RingTheory/Polynomial/Pochhammer.lean

tactic: induction' n with n ih
state_before: S : Type u
inst✝¹ : Semiring S
T : Type v
inst✝ : Semiring T
f : S →+* T
n : ℕ
⊢ map f (ascPochhammer S n) = ascPochhammer T n
state_after: case zero
S : Type u
inst✝¹ : Semiring S
T : Type v
inst✝ : Semiring T
f : S →+* T
⊢ map f (ascPochhammer S 0) = ascPochhammer T 0

case succ
S : Type u
inst✝¹ : Semiring S
T : Type v
inst✝ : Semiring T
f : S →+* T
n : ℕ
ih : map f (ascPochhammer S n) = ascPochhammer T n
⊢ map f (ascPochhammer S (n + 1)) = ascPochhammer T (n + 1)

tactic: simp
state_before: case zero
S : Type u
inst✝¹ : Semiring S
T : Type v
inst✝ : Semiring T
f : S →+* T
⊢ map f (ascPochhammer S 0) = ascPochhammer T 0
state_after: no goals

tactic: simp [ih, ascPochhammer_succ_left, map_comp]
state_before: case succ
S : Type u
inst✝¹ : Semiring S
T : Type v
inst✝ : Semiring T
f : S →+* T
n : ℕ
ih : map f (ascPochhammer S n) = ascPochhammer T n
⊢ map f (ascPochhammer S (n + 1)) = ascPochhammer T (n + 1)
state_after: no goals
Theorem: Set.wellFoundedOn_insert
File: Mathlib/Order/WellFoundedSet.lean

tactic: simp only [← singleton_union, wellFoundedOn_union, wellFoundedOn_singleton, true_and_iff]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
π : ι → Type u_5
r : α → α → Prop
inst✝ : IsStrictOrder α r
s : Set α
a : α
⊢ (insert a s).WellFoundedOn r ↔ s.WellFoundedOn r
state_after: no goals
Theorem: ideal_eq_bot_of_localization'
File: Mathlib/RingTheory/LocalProperties.lean

tactic: simpa using h P hP
state_before: R S : Type u
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
M : Submonoid R
N : Submonoid S
R' S' : Type u
inst✝³ : CommRing R'
inst✝² : CommRing S'
f : R →+* S
inst✝¹ : Algebra R R'
inst✝ : Algebra S S'
I : Ideal R
h : ∀ (J : Ideal R) (hJ : J.IsMaximal), Ideal.map (algebraMap R (Localization.AtPrime J)) I = ⊥
P : Ideal R
hP : P.IsMaximal
⊢ Ideal.map (algebraMap R (Localization.AtPrime P)) I = Ideal.map (algebraMap R (Localization.AtPrime P)) ⊥
state_after: no goals
Theorem: ENNReal.toReal_nat
File: Mathlib/Data/ENNReal/Basic.lean

tactic: rw [← ENNReal.ofReal_natCast n, ENNReal.toReal_ofReal (Nat.cast_nonneg _)]
state_before: α : Type u_1
a b c d : ℝ≥0∞
r p q : ℝ≥0
n : ℕ
⊢ (↑n).toReal = ↑n
state_after: no goals
Theorem: MeasureTheory.SimpleFunc.map_restrict_of_zero
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

tactic: simp [hs, Set.indicator_comp_of_zero hg]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝² : MeasurableSpace α
K : Type u_5
inst✝¹ : Zero β
inst✝ : Zero γ
g : β → γ
hg : g 0 = 0
f : α →ₛ β
s : Set α
x : α
hs : MeasurableSet s
⊢ ↑(map g (f.restrict s)) x = ↑((map g f).restrict s) x
state_after: no goals

tactic: simp [restrict_of_not_measurable hs, hg]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝² : MeasurableSpace α
K : Type u_5
inst✝¹ : Zero β
inst✝ : Zero γ
g : β → γ
hg : g 0 = 0
f : α →ₛ β
s : Set α
x : α
hs : ¬MeasurableSet s
⊢ ↑(map g (f.restrict s)) x = ↑((map g f).restrict s) x
state_after: no goals
Theorem: sup_iSup_nat_succ
File: Mathlib/Order/CompleteLattice.lean

tactic: rw [iSup_union, iSup_singleton, iSup_range]
state_before: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : CompleteLattice α
f g s t : ι → α
a b : α
u : ℕ → α
⊢ u 0 ⊔ ⨆ i, u (i + 1) = ⨆ x ∈ {0} ∪ range Nat.succ, u x
state_after: no goals

tactic: rw [Nat.zero_union_range_succ, iSup_univ]
state_before: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : CompleteLattice α
f g s t : ι → α
a b : α
u : ℕ → α
⊢ ⨆ x ∈ {0} ∪ range Nat.succ, u x = ⨆ i, u i
state_after: no goals
Theorem: Polynomial.Monic.degree_le_zero_iff_eq_one
File: Mathlib/Algebra/Polynomial/Monic.lean

tactic: rw [← hp.natDegree_eq_zero_iff_eq_one, natDegree_eq_zero_iff_degree_le_zero]
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hp : p.Monic
⊢ p.degree ≤ 0 ↔ p = 1
state_after: no goals
Theorem: Units.divp_add_divp
File: Mathlib/Algebra/Ring/Units.lean

tactic: simp only [divp, add_mul, mul_inv_rev, val_mul]
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : CommRing α
a b : α
u₁ u₂ : αˣ
⊢ a /ₚ u₁ + b /ₚ u₂ = (a * ↑u₂ + ↑u₁ * b) /ₚ (u₁ * u₂)
state_after: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : CommRing α
a b : α
u₁ u₂ : αˣ
⊢ a * ↑u₁⁻¹ + b * ↑u₂⁻¹ = a * ↑u₂ * (↑u₂⁻¹ * ↑u₁⁻¹) + ↑u₁ * b * (↑u₂⁻¹ * ↑u₁⁻¹)

tactic: rw [mul_comm (↑u₁ * b), mul_comm b]
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : CommRing α
a b : α
u₁ u₂ : αˣ
⊢ a * ↑u₁⁻¹ + b * ↑u₂⁻¹ = a * ↑u₂ * (↑u₂⁻¹ * ↑u₁⁻¹) + ↑u₁ * b * (↑u₂⁻¹ * ↑u₁⁻¹)
state_after: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : CommRing α
a b : α
u₁ u₂ : αˣ
⊢ a * ↑u₁⁻¹ + ↑u₂⁻¹ * b = a * ↑u₂ * (↑u₂⁻¹ * ↑u₁⁻¹) + ↑u₂⁻¹ * ↑u₁⁻¹ * (↑u₁ * b)

tactic: rw [← mul_assoc, ← mul_assoc, mul_assoc a, mul_assoc (↑u₂⁻¹ : α), mul_inv, inv_mul, mul_one,
  mul_one]
state_before: α : Type u
β : Type v
γ : Type w
R : Type x
inst✝ : CommRing α
a b : α
u₁ u₂ : αˣ
⊢ a * ↑u₁⁻¹ + ↑u₂⁻¹ * b = a * ↑u₂ * (↑u₂⁻¹ * ↑u₁⁻¹) + ↑u₂⁻¹ * ↑u₁⁻¹ * (↑u₁ * b)
state_after: no goals
Theorem: AdicCompletion.piEquivFin_apply
File: Mathlib/RingTheory/AdicCompletion/Functoriality.lean

tactic: simp only [piEquivFin, piEquivOfFintype_apply]
state_before: R : Type u_1
inst✝¹² : CommRing R
I : Ideal R
M✝ : Type u_2
inst✝¹¹ : AddCommGroup M✝
inst✝¹⁰ : Module R M✝
N : Type u_3
inst✝⁹ : AddCommGroup N
inst✝⁸ : Module R N
P : Type u_4
inst✝⁷ : AddCommGroup P
inst✝⁶ : Module R P
T : Type u_5
inst✝⁵ : AddCommGroup T
inst✝⁴ : Module (AdicCompletion I R) T
ι : Type u_6
inst✝³ : DecidableEq ι
M : ι → Type u_7
inst✝² : (i : ι) → AddCommGroup (M i)
inst✝¹ : (i : ι) → Module R (M i)
inst✝ : Fintype ι
n : ℕ
x : AdicCompletion I (Fin n → R)
⊢ (piEquivFin I n) x = (pi I fun x => R) x
state_after: no goals
Theorem: Polynomial.mul_X_add_natCast_comp
File: Mathlib/Algebra/Polynomial/Eval.lean

tactic: rw [mul_add, add_comp, mul_X_comp, ← Nat.cast_comm, natCast_mul_comp, Nat.cast_comm, mul_add]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
⊢ (p * (X + ↑n)).comp q = p.comp q * (q + ↑n)
state_after: no goals
Theorem: FirstOrder.Language.ElementaryEmbedding.map_formula
File: Mathlib/ModelTheory/ElementaryMaps.lean

tactic: rw [Formula.Realize, Formula.Realize, ← f.map_boundedFormula, Unique.eq_default (f ∘ default)]
state_before: L : Language
M : Type u_1
N : Type u_2
P : Type u_3
Q : Type u_4
inst✝³ : L.Structure M
inst✝² : L.Structure N
inst✝¹ : L.Structure P
inst✝ : L.Structure Q
f : M ↪ₑ[L] N
α : Type u_5
φ : L.Formula α
x : α → M
⊢ φ.Realize (⇑f ∘ x) ↔ φ.Realize x
state_after: no goals
Theorem: EuclideanDomain.xgcdAux_rec
File: Mathlib/Algebra/EuclideanDomain/Defs.lean

tactic: conv =>
  lhs
  rw [xgcdAux]
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
r s t r' s' t' : R
h : r ≠ 0
⊢ xgcdAux r s t r' s' t' = xgcdAux (r' % r) (s' - r' / r * s) (t' - r' / r * t) r s t
state_after: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
r s t r' s' t' : R
h : r ≠ 0
⊢ (if _hr : r = 0 then (r', s', t')
    else
      let q := r' / r;
      let_fun x := ⋯;
      xgcdAux (r' % r) (s' - q * s) (t' - q * t) r s t) =
    xgcdAux (r' % r) (s' - r' / r * s) (t' - r' / r * t) r s t

tactic: exact if_neg h
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
r s t r' s' t' : R
h : r ≠ 0
⊢ (if _hr : r = 0 then (r', s', t')
    else
      let q := r' / r;
      let_fun x := ⋯;
      xgcdAux (r' % r) (s' - q * s) (t' - q * t) r s t) =
    xgcdAux (r' % r) (s' - r' / r * s) (t' - r' / r * t) r s t
state_after: no goals
Theorem: String.extract_zero_endPos
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

tactic: simp only [extract, Pos.byteIdx_zero, endPos_eq, utf8Len_cons, ge_iff_le, Nat.le_zero_eq,
  Nat.ne_of_gt add_csize_pos, ↓reduceIte]
state_before: c : Char
cs : List Char
⊢ { data := c :: cs }.extract 0 { data := c :: cs }.endPos = { data := c :: cs }
state_after: c : Char
cs : List Char
⊢ { data := extract.go₁ (c :: cs) 0 0 { byteIdx := utf8Len cs + c.utf8Size } } = { data := c :: cs }

tactic: congr
state_before: c : Char
cs : List Char
⊢ { data := extract.go₁ (c :: cs) 0 0 { byteIdx := utf8Len cs + c.utf8Size } } = { data := c :: cs }
state_after: case e_data
c : Char
cs : List Char
⊢ extract.go₁ (c :: cs) 0 0 { byteIdx := utf8Len cs + c.utf8Size } = c :: cs

tactic: apply extract.go₁_zero_utf8Len
state_before: case e_data
c : Char
cs : List Char
⊢ extract.go₁ (c :: cs) 0 0 { byteIdx := utf8Len cs + c.utf8Size } = c :: cs
state_after: no goals
Theorem: Finset.Nontrivial.erase_nonempty
File: Mathlib/Data/Finset/Basic.lean

tactic: aesop
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s t u v : Finset α
a b : α
hs : s.Nontrivial
⊢ ∀ (a_1 : α), a_1 ∈ s ∧ a_1 ≠ a → a_1 ∈ s.erase a
state_after: no goals
Theorem: ProjectiveSpectrum.basicOpen_zero
File: Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean

tactic: simp
state_before: R : Type u_1
A : Type u_2
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
⊢ ↑(basicOpen 𝒜 0) = ↑⊥
state_after: no goals
Theorem: Submonoid.mul_leftInvEquiv_symm
File: Mathlib/GroupTheory/Submonoid/Inverses.lean

tactic: convert S.leftInvEquiv_mul hS ((S.leftInvEquiv hS).symm x)
state_before: M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ ↑x * ↑((S.leftInvEquiv hS).symm x) = 1
state_after: case h.e'_2.h.e'_5.h.e'_3
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ x = (S.leftInvEquiv hS) ((S.leftInvEquiv hS).symm x)

tactic: simp
state_before: case h.e'_2.h.e'_5.h.e'_3
M : Type u_1
inst✝ : CommMonoid M
S : Submonoid M
hS : S ≤ IsUnit.submonoid M
x : ↥S
⊢ x = (S.leftInvEquiv hS) ((S.leftInvEquiv hS).symm x)
state_after: no goals
Theorem: Finset.sum_smul_vsub_eq_weightedVSubOfPoint_sub
File: Mathlib/LinearAlgebra/AffineSpace/Combination.lean

tactic: simp_rw [weightedVSubOfPoint_apply, ← sum_sub_distrib, ← smul_sub, vsub_sub_vsub_cancel_right]
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
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
w : ι → k
p₁ p₂ : ι → P
b : P
⊢ ∑ i ∈ s, w i • (p₁ i -ᵥ p₂ i) = (s.weightedVSubOfPoint p₁ b) w - (s.weightedVSubOfPoint p₂ b) w
state_after: no goals
Theorem: collinear_insert_iff_of_mem_affineSpan
File: Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean

tactic: rw [Collinear, Collinear, vectorSpan_insert_eq_vectorSpan h]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type u_4
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
s : Set P
p : P
h : p ∈ affineSpan k s
⊢ Collinear k (insert p s) ↔ Collinear k s
state_after: no goals