1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: GeneralizedContinuedFraction.numerators_recurrence
File: Mathlib/Algebra/ContinuedFractions/ContinuantsRecurrence.lean

tactic: obtain ⟨ppredConts, nth_conts_eq, ⟨rfl⟩⟩ : ∃ conts, g.continuants n = conts ∧ conts.a = ppredA :=
  exists_conts_a_of_num nth_num_eq
state_before: K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
ppredA predA : K
succ_nth_s_eq : g.s.get? (n + 1) = some gp
nth_num_eq : g.numerators n = ppredA
succ_nth_num_eq : g.numerators (n + 1) = predA
⊢ g.numerators (n + 2) = gp.b * predA + gp.a * ppredA
state_after: case intro.intro.refl
K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
predA : K
succ_nth_s_eq : g.s.get? (n + 1) = some gp
succ_nth_num_eq : g.numerators (n + 1) = predA
ppredConts : Pair K
nth_conts_eq : g.continuants n = ppredConts
nth_num_eq : g.numerators n = ppredConts.a
⊢ g.numerators (n + 2) = gp.b * predA + gp.a * ppredConts.a

tactic: obtain ⟨predConts, succ_nth_conts_eq, ⟨rfl⟩⟩ :
    ∃ conts, g.continuants (n + 1) = conts ∧ conts.a = predA :=
  exists_conts_a_of_num succ_nth_num_eq
state_before: case intro.intro.refl
K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
predA : K
succ_nth_s_eq : g.s.get? (n + 1) = some gp
succ_nth_num_eq : g.numerators (n + 1) = predA
ppredConts : Pair K
nth_conts_eq : g.continuants n = ppredConts
nth_num_eq : g.numerators n = ppredConts.a
⊢ g.numerators (n + 2) = gp.b * predA + gp.a * ppredConts.a
state_after: case intro.intro.refl.intro.intro.refl
K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
succ_nth_s_eq : g.s.get? (n + 1) = some gp
ppredConts : Pair K
nth_conts_eq : g.continuants n = ppredConts
nth_num_eq : g.numerators n = ppredConts.a
predConts : Pair K
succ_nth_conts_eq : g.continuants (n + 1) = predConts
succ_nth_num_eq : g.numerators (n + 1) = predConts.a
⊢ g.numerators (n + 2) = gp.b * predConts.a + gp.a * ppredConts.a

tactic: rw [num_eq_conts_a, continuants_recurrence succ_nth_s_eq nth_conts_eq succ_nth_conts_eq]
state_before: case intro.intro.refl.intro.intro.refl
K : Type u_1
g : GeneralizedContinuedFraction K
n : ℕ
inst✝ : DivisionRing K
gp : Pair K
succ_nth_s_eq : g.s.get? (n + 1) = some gp
ppredConts : Pair K
nth_conts_eq : g.continuants n = ppredConts
nth_num_eq : g.numerators n = ppredConts.a
predConts : Pair K
succ_nth_conts_eq : g.continuants (n + 1) = predConts
succ_nth_num_eq : g.numerators (n + 1) = predConts.a
⊢ g.numerators (n + 2) = gp.b * predConts.a + gp.a * ppredConts.a
state_after: no goals
Theorem: Ideal.one_eq_top
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: erw [Submodule.one_eq_range, LinearMap.range_id]
state_before: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
⊢ 1 = ⊤
state_after: no goals
Theorem: Matroid.freeOn_empty
File: Mathlib/Data/Matroid/Constructions.lean

tactic: simp [freeOn]
state_before: α✝ : Type u_1
M : Matroid α✝
E B I X R J : Set α✝
α : Type u_2
⊢ freeOn ∅ = emptyOn α
state_after: no goals
Theorem: List.chain'_isInfix
File: Mathlib/Data/List/Chain.lean

tactic: simp
state_before: α : Type u
β : Type v
R r : α → α → Prop
l✝ l₁ l₂ : List α
a✝ b✝ a b : α
l : List α
⊢ [] ++ [a, b] ++ l = a :: b :: l
state_after: no goals

tactic: simp
state_before: α : Type u
β : Type v
R r : α → α → Prop
l✝ l₁ l₂ : List α
a✝ b✝ a b : α
l : List α
x y : α
h : [x, y] <:+: b :: l
⊢ [a] ++ b :: l ++ [] = a :: b :: l
state_after: no goals
Theorem: Polynomial.degree_mul'
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: refine mt ?_ h
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.leadingCoeff * q.leadingCoeff ≠ 0
⊢ p ≠ 0
state_after: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.leadingCoeff * q.leadingCoeff ≠ 0
⊢ p = 0 → p.leadingCoeff * q.leadingCoeff = 0

tactic: exact fun hp => by rw [hp, leadingCoeff_zero, zero_mul]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.leadingCoeff * q.leadingCoeff ≠ 0
⊢ p = 0 → p.leadingCoeff * q.leadingCoeff = 0
state_after: no goals

tactic: rw [hp, leadingCoeff_zero, zero_mul]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.leadingCoeff * q.leadingCoeff ≠ 0
hp : p = 0
⊢ p.leadingCoeff * q.leadingCoeff = 0
state_after: no goals

tactic: refine mt ?_ h
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.leadingCoeff * q.leadingCoeff ≠ 0
hp : p ≠ 0
⊢ q ≠ 0
state_after: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.leadingCoeff * q.leadingCoeff ≠ 0
hp : p ≠ 0
⊢ q = 0 → p.leadingCoeff * q.leadingCoeff = 0

tactic: exact fun hq => by rw [hq, leadingCoeff_zero, mul_zero]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.leadingCoeff * q.leadingCoeff ≠ 0
hp : p ≠ 0
⊢ q = 0 → p.leadingCoeff * q.leadingCoeff = 0
state_after: no goals

tactic: rw [hq, leadingCoeff_zero, mul_zero]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.leadingCoeff * q.leadingCoeff ≠ 0
hp : p ≠ 0
hq : q = 0
⊢ p.leadingCoeff * q.leadingCoeff = 0
state_after: no goals

tactic: rw [degree_eq_natDegree hp, degree_eq_natDegree hq]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.leadingCoeff * q.leadingCoeff ≠ 0
hp : p ≠ 0
hq : q ≠ 0
⊢ p.degree + q.degree ≤ (p * q).degree
state_after: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.leadingCoeff * q.leadingCoeff ≠ 0
hp : p ≠ 0
hq : q ≠ 0
⊢ ↑p.natDegree + ↑q.natDegree ≤ (p * q).degree

tactic: refine le_degree_of_ne_zero (n := natDegree p + natDegree q) ?_
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.leadingCoeff * q.leadingCoeff ≠ 0
hp : p ≠ 0
hq : q ≠ 0
⊢ ↑p.natDegree + ↑q.natDegree ≤ (p * q).degree
state_after: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.leadingCoeff * q.leadingCoeff ≠ 0
hp : p ≠ 0
hq : q ≠ 0
⊢ (p * q).coeff (p.natDegree + q.natDegree) ≠ 0

tactic: rwa [coeff_mul_degree_add_degree]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
h : p.leadingCoeff * q.leadingCoeff ≠ 0
hp : p ≠ 0
hq : q ≠ 0
⊢ (p * q).coeff (p.natDegree + q.natDegree) ≠ 0
state_after: no goals
Theorem: ValuationSubring.toSubring_injective
File: Mathlib/RingTheory/Valuation/ValuationSubring.lean

tactic: cases x
state_before: K : Type u
inst✝ : Field K
A x y : ValuationSubring K
h : x.toSubring = y.toSubring
⊢ x = y
state_after: case mk
K : Type u
inst✝ : Field K
A y : ValuationSubring K
toSubring✝ : Subring K
mem_or_inv_mem'✝ : ∀ (x : K), x ∈ toSubring✝.carrier ∨ x⁻¹ ∈ toSubring✝.carrier
h : { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }.toSubring = y.toSubring
⊢ { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ } = y

tactic: cases y
state_before: case mk
K : Type u
inst✝ : Field K
A y : ValuationSubring K
toSubring✝ : Subring K
mem_or_inv_mem'✝ : ∀ (x : K), x ∈ toSubring✝.carrier ∨ x⁻¹ ∈ toSubring✝.carrier
h : { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }.toSubring = y.toSubring
⊢ { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ } = y
state_after: case mk.mk
K : Type u
inst✝ : Field K
A : ValuationSubring K
toSubring✝¹ : Subring K
mem_or_inv_mem'✝¹ : ∀ (x : K), x ∈ toSubring✝¹.carrier ∨ x⁻¹ ∈ toSubring✝¹.carrier
toSubring✝ : Subring K
mem_or_inv_mem'✝ : ∀ (x : K), x ∈ toSubring✝.carrier ∨ x⁻¹ ∈ toSubring✝.carrier
h :
  { toSubring := toSubring✝¹, mem_or_inv_mem' := mem_or_inv_mem'✝¹ }.toSubring =
    { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }.toSubring
⊢ { toSubring := toSubring✝¹, mem_or_inv_mem' := mem_or_inv_mem'✝¹ } =
    { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }

tactic: congr
state_before: case mk.mk
K : Type u
inst✝ : Field K
A : ValuationSubring K
toSubring✝¹ : Subring K
mem_or_inv_mem'✝¹ : ∀ (x : K), x ∈ toSubring✝¹.carrier ∨ x⁻¹ ∈ toSubring✝¹.carrier
toSubring✝ : Subring K
mem_or_inv_mem'✝ : ∀ (x : K), x ∈ toSubring✝.carrier ∨ x⁻¹ ∈ toSubring✝.carrier
h :
  { toSubring := toSubring✝¹, mem_or_inv_mem' := mem_or_inv_mem'✝¹ }.toSubring =
    { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }.toSubring
⊢ { toSubring := toSubring✝¹, mem_or_inv_mem' := mem_or_inv_mem'✝¹ } =
    { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }
state_after: no goals
Theorem: Filter.Tendsto.lift'_closure
File: Mathlib/Topology/Basic.lean

tactic: filter_upwards [mem_lift' (h hs)] using (mapsTo_preimage _ _).closure hf
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
inst✝ : TopologicalSpace Z
f : X → Y
s✝ : Set X
x : X
y : Y
hf : Continuous f
l : Filter X
l' : Filter Y
h : Tendsto f l l'
s : Set Y
hs : s ∈ l'
⊢ ∀ᶠ (a : X) in l.lift' closure, f a ∈ closure s
state_after: no goals
Theorem: Filter.Tendsto.atTop_nsmul_const
File: Mathlib/Order/Filter/Archimedean.lean

tactic: refine tendsto_atTop.mpr fun s => ?_
state_before: α : Type u_1
R : Type u_2
l : Filter α
f✝ : α → R
r : R
inst✝¹ : LinearOrderedCancelAddCommMonoid R
inst✝ : Archimedean R
f : α → ℕ
hr : 0 < r
hf : Tendsto f l atTop
⊢ Tendsto (fun x => f x • r) l atTop
state_after: α : Type u_1
R : Type u_2
l : Filter α
f✝ : α → R
r : R
inst✝¹ : LinearOrderedCancelAddCommMonoid R
inst✝ : Archimedean R
f : α → ℕ
hr : 0 < r
hf : Tendsto f l atTop
s : R
⊢ ∀ᶠ (a : α) in l, s ≤ f a • r

tactic: obtain ⟨n : ℕ, hn : s ≤ n • r⟩ := Archimedean.arch s hr
state_before: α : Type u_1
R : Type u_2
l : Filter α
f✝ : α → R
r : R
inst✝¹ : LinearOrderedCancelAddCommMonoid R
inst✝ : Archimedean R
f : α → ℕ
hr : 0 < r
hf : Tendsto f l atTop
s : R
⊢ ∀ᶠ (a : α) in l, s ≤ f a • r
state_after: case intro
α : Type u_1
R : Type u_2
l : Filter α
f✝ : α → R
r : R
inst✝¹ : LinearOrderedCancelAddCommMonoid R
inst✝ : Archimedean R
f : α → ℕ
hr : 0 < r
hf : Tendsto f l atTop
s : R
n : ℕ
hn : s ≤ n • r
⊢ ∀ᶠ (a : α) in l, s ≤ f a • r

tactic: exact (tendsto_atTop.mp hf n).mono fun a ha => hn.trans (nsmul_le_nsmul_left hr.le ha)
state_before: case intro
α : Type u_1
R : Type u_2
l : Filter α
f✝ : α → R
r : R
inst✝¹ : LinearOrderedCancelAddCommMonoid R
inst✝ : Archimedean R
f : α → ℕ
hr : 0 < r
hf : Tendsto f l atTop
s : R
n : ℕ
hn : s ≤ n • r
⊢ ∀ᶠ (a : α) in l, s ≤ f a • r
state_after: no goals
Theorem: continuousOn_Ioc_extendFrom_Ioo
File: Mathlib/Topology/Order/ExtendFrom.lean

tactic: have := @continuousOn_Ico_extendFrom_Ioo αᵒᵈ _ _ _ _ _ _ _ f _ _ lb hab
state_before: α : Type u_1
β : Type u_2
inst✝⁵ : TopologicalSpace α
inst✝⁴ : LinearOrder α
inst✝³ : DenselyOrdered α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : RegularSpace β
f : α → β
a b : α
lb : β
hab : a < b
hf : ContinuousOn f (Ioo a b)
hb : Tendsto f (𝓝[<] b) (𝓝 lb)
⊢ ContinuousOn (extendFrom (Ioo a b) f) (Ioc a b)
state_after: α : Type u_1
β : Type u_2
inst✝⁵ : TopologicalSpace α
inst✝⁴ : LinearOrder α
inst✝³ : DenselyOrdered α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : RegularSpace β
f : α → β
a b : α
lb : β
hab : a < b
hf : ContinuousOn f (Ioo a b)
hb : Tendsto f (𝓝[<] b) (𝓝 lb)
this : ContinuousOn f (Ioo b a) → Tendsto f (𝓝[>] b) (𝓝 lb) → ContinuousOn (extendFrom (Ioo b a) f) (Ico b a)
⊢ ContinuousOn (extendFrom (Ioo a b) f) (Ioc a b)

tactic: erw [dual_Ico, dual_Ioi, dual_Ioo] at this
state_before: α : Type u_1
β : Type u_2
inst✝⁵ : TopologicalSpace α
inst✝⁴ : LinearOrder α
inst✝³ : DenselyOrdered α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : RegularSpace β
f : α → β
a b : α
lb : β
hab : a < b
hf : ContinuousOn f (Ioo a b)
hb : Tendsto f (𝓝[<] b) (𝓝 lb)
this : ContinuousOn f (Ioo b a) → Tendsto f (𝓝[>] b) (𝓝 lb) → ContinuousOn (extendFrom (Ioo b a) f) (Ico b a)
⊢ ContinuousOn (extendFrom (Ioo a b) f) (Ioc a b)
state_after: α : Type u_1
β : Type u_2
inst✝⁵ : TopologicalSpace α
inst✝⁴ : LinearOrder α
inst✝³ : DenselyOrdered α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : RegularSpace β
f : α → β
a b : α
lb : β
hab : a < b
hf : ContinuousOn f (Ioo a b)
hb : Tendsto f (𝓝[<] b) (𝓝 lb)
this :
  ContinuousOn f (⇑OrderDual.ofDual ⁻¹' Ioo a b) →
    Tendsto f (𝓝[⇑OrderDual.ofDual ⁻¹' Iio b] b) (𝓝 lb) →
      ContinuousOn (extendFrom (⇑OrderDual.ofDual ⁻¹' Ioo a b) f) (⇑OrderDual.ofDual ⁻¹' Ioc a b)
⊢ ContinuousOn (extendFrom (Ioo a b) f) (Ioc a b)

tactic: exact this hf hb
state_before: α : Type u_1
β : Type u_2
inst✝⁵ : TopologicalSpace α
inst✝⁴ : LinearOrder α
inst✝³ : DenselyOrdered α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : RegularSpace β
f : α → β
a b : α
lb : β
hab : a < b
hf : ContinuousOn f (Ioo a b)
hb : Tendsto f (𝓝[<] b) (𝓝 lb)
this :
  ContinuousOn f (⇑OrderDual.ofDual ⁻¹' Ioo a b) →
    Tendsto f (𝓝[⇑OrderDual.ofDual ⁻¹' Iio b] b) (𝓝 lb) →
      ContinuousOn (extendFrom (⇑OrderDual.ofDual ⁻¹' Ioo a b) f) (⇑OrderDual.ofDual ⁻¹' Ioc a b)
⊢ ContinuousOn (extendFrom (Ioo a b) f) (Ioc a b)
state_after: no goals
Theorem: Ring.inverse_add_inverse
File: Mathlib/Algebra/Ring/Invertible.lean

tactic: by_cases ha : IsUnit a
state_before: α : Type u
inst✝ : Semiring α
a b : α
h : IsUnit a ↔ IsUnit b
⊢ inverse a + inverse b = inverse a * (a + b) * inverse b
state_after: case pos
α : Type u
inst✝ : Semiring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : IsUnit a
⊢ inverse a + inverse b = inverse a * (a + b) * inverse b

case neg
α : Type u
inst✝ : Semiring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : ¬IsUnit a
⊢ inverse a + inverse b = inverse a * (a + b) * inverse b

tactic: have hb := h.mp ha
state_before: case pos
α : Type u
inst✝ : Semiring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : IsUnit a
⊢ inverse a + inverse b = inverse a * (a + b) * inverse b
state_after: case pos
α : Type u
inst✝ : Semiring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : IsUnit a
hb : IsUnit b
⊢ inverse a + inverse b = inverse a * (a + b) * inverse b

tactic: obtain ⟨ia⟩ := ha.nonempty_invertible
state_before: case pos
α : Type u
inst✝ : Semiring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : IsUnit a
hb : IsUnit b
⊢ inverse a + inverse b = inverse a * (a + b) * inverse b
state_after: case pos.intro
α : Type u
inst✝ : Semiring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : IsUnit a
hb : IsUnit b
ia : Invertible a
⊢ inverse a + inverse b = inverse a * (a + b) * inverse b

tactic: obtain ⟨ib⟩ := hb.nonempty_invertible
state_before: case pos.intro
α : Type u
inst✝ : Semiring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : IsUnit a
hb : IsUnit b
ia : Invertible a
⊢ inverse a + inverse b = inverse a * (a + b) * inverse b
state_after: case pos.intro.intro
α : Type u
inst✝ : Semiring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : IsUnit a
hb : IsUnit b
ia : Invertible a
ib : Invertible b
⊢ inverse a + inverse b = inverse a * (a + b) * inverse b

tactic: simp_rw [inverse_invertible, invOf_add_invOf]
state_before: case pos.intro.intro
α : Type u
inst✝ : Semiring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : IsUnit a
hb : IsUnit b
ia : Invertible a
ib : Invertible b
⊢ inverse a + inverse b = inverse a * (a + b) * inverse b
state_after: no goals

tactic: have hb := h.not.mp ha
state_before: case neg
α : Type u
inst✝ : Semiring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : ¬IsUnit a
⊢ inverse a + inverse b = inverse a * (a + b) * inverse b
state_after: case neg
α : Type u
inst✝ : Semiring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : ¬IsUnit a
hb : ¬IsUnit b
⊢ inverse a + inverse b = inverse a * (a + b) * inverse b

tactic: simp [inverse_non_unit, ha, hb]
state_before: case neg
α : Type u
inst✝ : Semiring α
a b : α
h : IsUnit a ↔ IsUnit b
ha : ¬IsUnit a
hb : ¬IsUnit b
⊢ inverse a + inverse b = inverse a * (a + b) * inverse b
state_after: no goals
Theorem: WeierstrassCurve.Jacobian.toAffine_negAddY_of_eq
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

tactic: linear_combination (norm := (rw [Affine.negAddY, toAffine_addX_of_eq hPz hd]; ring1))
  -n * P x / (P z ^ 3 * d) * div_self (pow_ne_zero 2 hd)
    - P y / P z ^ 3 * div_self (pow_ne_zero 3 hd)
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
n d : F
hPz : P z ≠ 0
hd : d ≠ 0
⊢ W.toAffine.negAddY (P x / P z ^ 2) (P x / P z ^ 2) (P y / P z ^ 3) (-n / (P z * d)) =
    (-n * (n ^ 2 - W.a₁ * n * P z * d - W.a₂ * P z ^ 2 * d ^ 2 - 2 * P x * d ^ 2 - P x * d ^ 2) + P y * d ^ 3) /
      (P z * d) ^ 3
state_after: no goals

tactic: rw [Affine.negAddY, toAffine_addX_of_eq hPz hd]
state_before: case a
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
n d : F
hPz : P z ≠ 0
hd : d ≠ 0
⊢ W.toAffine.negAddY (P x / P z ^ 2) (P x / P z ^ 2) (P y / P z ^ 3) (-n / (P z * d)) -
        (-n * (n ^ 2 - W.a₁ * n * P z * d - W.a₂ * P z ^ 2 * d ^ 2 - 2 * P x * d ^ 2 - P x * d ^ 2) + P y * d ^ 3) /
          (P z * d) ^ 3 -
      (-n * P x / (P z ^ 3 * d) * (d ^ 2 / d ^ 2) - P y / P z ^ 3 * (d ^ 3 / d ^ 3) -
        (-n * P x / (P z ^ 3 * d) * 1 - P y / P z ^ 3 * 1)) =
    0
state_after: case a
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
n d : F
hPz : P z ≠ 0
hd : d ≠ 0
⊢ -n / (P z * d) *
            ((n ^ 2 - W.a₁ * n * P z * d - W.a₂ * P z ^ 2 * d ^ 2 - 2 * P x * d ^ 2) / (P z * d) ^ 2 - P x / P z ^ 2) +
          P y / P z ^ 3 -
        (-n * (n ^ 2 - W.a₁ * n * P z * d - W.a₂ * P z ^ 2 * d ^ 2 - 2 * P x * d ^ 2 - P x * d ^ 2) + P y * d ^ 3) /
          (P z * d) ^ 3 -
      (-n * P x / (P z ^ 3 * d) * (d ^ 2 / d ^ 2) - P y / P z ^ 3 * (d ^ 3 / d ^ 3) -
        (-n * P x / (P z ^ 3 * d) * 1 - P y / P z ^ 3 * 1)) =
    0

tactic: ring1
state_before: case a
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
n d : F
hPz : P z ≠ 0
hd : d ≠ 0
⊢ -n / (P z * d) *
            ((n ^ 2 - W.a₁ * n * P z * d - W.a₂ * P z ^ 2 * d ^ 2 - 2 * P x * d ^ 2) / (P z * d) ^ 2 - P x / P z ^ 2) +
          P y / P z ^ 3 -
        (-n * (n ^ 2 - W.a₁ * n * P z * d - W.a₂ * P z ^ 2 * d ^ 2 - 2 * P x * d ^ 2 - P x * d ^ 2) + P y * d ^ 3) /
          (P z * d) ^ 3 -
      (-n * P x / (P z ^ 3 * d) * (d ^ 2 / d ^ 2) - P y / P z ^ 3 * (d ^ 3 / d ^ 3) -
        (-n * P x / (P z ^ 3 * d) * 1 - P y / P z ^ 3 * 1)) =
    0
state_after: no goals
Theorem: MeasureTheory.measure_union₀_aux
File: Mathlib/MeasureTheory/Measure/NullMeasurable.lean

tactic: rw [union_eq_iUnion, measure_iUnion₀, tsum_fintype, Fintype.sum_bool, cond, cond]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hs : NullMeasurableSet s μ
ht : NullMeasurableSet t μ
hd : AEDisjoint μ s t
⊢ μ (s ∪ t) = μ s + μ t
state_after: case hd
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hs : NullMeasurableSet s μ
ht : NullMeasurableSet t μ
hd : AEDisjoint μ s t
⊢ Pairwise (AEDisjoint μ on fun b => bif b then s else t)

case h
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hs : NullMeasurableSet s μ
ht : NullMeasurableSet t μ
hd : AEDisjoint μ s t
⊢ ∀ (i : Bool), NullMeasurableSet (bif i then s else t) μ

tactic: exacts [(pairwise_on_bool AEDisjoint.symmetric).2 hd, fun b => Bool.casesOn b ht hs]
state_before: case hd
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hs : NullMeasurableSet s μ
ht : NullMeasurableSet t μ
hd : AEDisjoint μ s t
⊢ Pairwise (AEDisjoint μ on fun b => bif b then s else t)

case h
ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
m0 : MeasurableSpace α
μ : Measure α
s t : Set α
hs : NullMeasurableSet s μ
ht : NullMeasurableSet t μ
hd : AEDisjoint μ s t
⊢ ∀ (i : Bool), NullMeasurableSet (bif i then s else t) μ
state_after: no goals
Theorem: Real.deriv2_negMulLog
File: Mathlib/Analysis/SpecialFunctions/Log/NegMulLog.lean

tactic: rw [negMulLog_eq_neg]
state_before: x : ℝ
hx : x ≠ 0
⊢ deriv^[2] negMulLog x = -x⁻¹
state_after: x : ℝ
hx : x ≠ 0
⊢ deriv^[2] (fun x => -(x * log x)) x = -x⁻¹

tactic: have h := deriv2_mul_log hx
state_before: x : ℝ
hx : x ≠ 0
⊢ deriv^[2] (fun x => -(x * log x)) x = -x⁻¹
state_after: x : ℝ
hx : x ≠ 0
h : deriv^[2] (fun x => x * log x) x = x⁻¹
⊢ deriv^[2] (fun x => -(x * log x)) x = -x⁻¹

tactic: simp only [Function.iterate_succ, Function.iterate_zero, Function.id_comp,
  Function.comp_apply, deriv.neg', differentiableAt_id', differentiableAt_log_iff, ne_eq] at h ⊢
state_before: x : ℝ
hx : x ≠ 0
h : deriv^[2] (fun x => x * log x) x = x⁻¹
⊢ deriv^[2] (fun x => -(x * log x)) x = -x⁻¹
state_after: x : ℝ
hx : x ≠ 0
h : deriv (deriv fun x => x * log x) x = x⁻¹
⊢ -deriv (deriv fun y => y * log y) x = -x⁻¹

tactic: rw [h]
state_before: x : ℝ
hx : x ≠ 0
h : deriv (deriv fun x => x * log x) x = x⁻¹
⊢ -deriv (deriv fun y => y * log y) x = -x⁻¹
state_after: no goals
Theorem: Polynomial.C_0
File: Mathlib/Algebra/Polynomial/Basic.lean

tactic: simp
state_before: R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
p q : R[X]
⊢ C 0 = 0
state_after: no goals
Theorem: FractionalIdeal.equivNum_apply
File: Mathlib/RingTheory/FractionalIdeal/Basic.lean

tactic: change Algebra.linearMap R P _ = _
state_before: R : Type u_1
inst✝⁴ : CommRing R
S : Submonoid R
P : Type u_2
inst✝³ : CommRing P
inst✝² : Algebra R P
loc : IsLocalization S P
inst✝¹ : Nontrivial P
inst✝ : NoZeroSMulDivisors R P
I : FractionalIdeal S P
h_nz : ↑I.den ≠ 0
x : ↥I
⊢ (algebraMap R P) ↑((equivNum h_nz) x) = I.den • ↑x
state_after: R : Type u_1
inst✝⁴ : CommRing R
S : Submonoid R
P : Type u_2
inst✝³ : CommRing P
inst✝² : Algebra R P
loc : IsLocalization S P
inst✝¹ : Nontrivial P
inst✝ : NoZeroSMulDivisors R P
I : FractionalIdeal S P
h_nz : ↑I.den ≠ 0
x : ↥I
⊢ (Algebra.linearMap R P) ↑((equivNum h_nz) x) = I.den • ↑x

tactic: rw [equivNum, LinearEquiv.trans_apply, LinearEquiv.ofBijective_apply, LinearMap.restrict_apply,
  Submodule.map_equivMapOfInjective_symm_apply, Subtype.coe_mk,
  DistribMulAction.toLinearMap_apply]
state_before: R : Type u_1
inst✝⁴ : CommRing R
S : Submonoid R
P : Type u_2
inst✝³ : CommRing P
inst✝² : Algebra R P
loc : IsLocalization S P
inst✝¹ : Nontrivial P
inst✝ : NoZeroSMulDivisors R P
I : FractionalIdeal S P
h_nz : ↑I.den ≠ 0
x : ↥I
⊢ (Algebra.linearMap R P) ↑((equivNum h_nz) x) = I.den • ↑x
state_after: no goals
Theorem: HasDerivWithinAt.finset_prod
File: Mathlib/Analysis/Calculus/Deriv/Mul.lean

tactic: simpa [ContinuousLinearMap.sum_apply, ContinuousLinearMap.smul_apply] using
  (HasFDerivWithinAt.finset_prod (fun i hi ↦ (hf i hi).hasFDerivWithinAt)).hasDerivWithinAt
state_before: 𝕜 : Type u
inst✝⁹ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁸ : NormedAddCommGroup F
inst✝⁷ : NormedSpace 𝕜 F
E : Type w
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace 𝕜 E
G : Type u_1
inst✝⁴ : NormedAddCommGroup G
inst✝³ : NormedSpace 𝕜 G
f✝ f₀ f₁ g : 𝕜 → F
f'✝ f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
ι : Type u_2
inst✝² : DecidableEq ι
𝔸' : Type u_3
inst✝¹ : NormedCommRing 𝔸'
inst✝ : NormedAlgebra 𝕜 𝔸'
u : Finset ι
f : ι → 𝕜 → 𝔸'
f' : ι → 𝔸'
hf : ∀ i ∈ u, HasDerivWithinAt (f i) (f' i) s x
⊢ HasDerivWithinAt (fun x => ∏ i ∈ u, f i x) (∑ i ∈ u, (∏ j ∈ u.erase i, f j x) • f' i) s x
state_after: no goals
Theorem: List.range_add
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: rw [← range'_eq_map_range]
state_before: a b : Nat
⊢ range (a + b) = range a ++ map (fun x => a + x) (range b)
state_after: a b : Nat
⊢ range (a + b) = range a ++ range' a b

tactic: simpa [range_eq_range', Nat.add_comm] using (range'_append_1 0 a b).symm
state_before: a b : Nat
⊢ range (a + b) = range a ++ range' a b
state_after: no goals
Theorem: guard_false
File: Mathlib/Control/Basic.lean

tactic: simp [guard, if_neg not_false]
state_before: α β γ : Type u
F : Type → Type v
inst✝ : Alternative F
h : Decidable False
⊢ guard False = failure
state_after: no goals