1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Polynomial.derivWithin
File: Mathlib/Analysis/Calculus/Deriv/Polynomial.lean

tactic: rw [DifferentiableAt.derivWithin p.differentiableAt hxs]
state_before: 𝕜 : Type u
inst✝⁶ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
E : Type w
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Algebra R 𝕜
p : 𝕜[X]
q : R[X]
hxs : UniqueDiffWithinAt 𝕜 s x
⊢ derivWithin (fun x => eval x p) s x = eval x (derivative p)
state_after: 𝕜 : Type u
inst✝⁶ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
E : Type w
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Algebra R 𝕜
p : 𝕜[X]
q : R[X]
hxs : UniqueDiffWithinAt 𝕜 s x
⊢ deriv (fun x => eval x p) x = eval x (derivative p)

tactic: exact p.deriv
state_before: 𝕜 : Type u
inst✝⁶ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
E : Type w
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
R : Type u_1
inst✝¹ : CommSemiring R
inst✝ : Algebra R 𝕜
p : 𝕜[X]
q : R[X]
hxs : UniqueDiffWithinAt 𝕜 s x
⊢ deriv (fun x => eval x p) x = eval x (derivative p)
state_after: no goals
Theorem: WeierstrassCurve.ofJ_Δ
File: Mathlib/AlgebraicGeometry/EllipticCurve/Weierstrass.lean

tactic: simp only [ofJ, Δ, b₂, b₄, b₆, b₈]
state_before: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
j : R
⊢ (ofJ j).Δ = j ^ 2 * (j - 1728) ^ 9
state_after: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
j : R
⊢ -((j - 1728) ^ 2 + 4 * 0) ^ 2 *
            ((j - 1728) ^ 2 * -(j - 1728) ^ 5 + 4 * 0 * -(j - 1728) ^ 5 - (j - 1728) * 0 * (-36 * (j - 1728) ^ 3) +
                0 * 0 ^ 2 -
              (-36 * (j - 1728) ^ 3) ^ 2) -
          8 * (2 * (-36 * (j - 1728) ^ 3) + (j - 1728) * 0) ^ 3 -
        27 * (0 ^ 2 + 4 * -(j - 1728) ^ 5) ^ 2 +
      9 * ((j - 1728) ^ 2 + 4 * 0) * (2 * (-36 * (j - 1728) ^ 3) + (j - 1728) * 0) * (0 ^ 2 + 4 * -(j - 1728) ^ 5) =
    j ^ 2 * (j - 1728) ^ 9

tactic: ring1
state_before: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
j : R
⊢ -((j - 1728) ^ 2 + 4 * 0) ^ 2 *
            ((j - 1728) ^ 2 * -(j - 1728) ^ 5 + 4 * 0 * -(j - 1728) ^ 5 - (j - 1728) * 0 * (-36 * (j - 1728) ^ 3) +
                0 * 0 ^ 2 -
              (-36 * (j - 1728) ^ 3) ^ 2) -
          8 * (2 * (-36 * (j - 1728) ^ 3) + (j - 1728) * 0) ^ 3 -
        27 * (0 ^ 2 + 4 * -(j - 1728) ^ 5) ^ 2 +
      9 * ((j - 1728) ^ 2 + 4 * 0) * (2 * (-36 * (j - 1728) ^ 3) + (j - 1728) * 0) * (0 ^ 2 + 4 * -(j - 1728) ^ 5) =
    j ^ 2 * (j - 1728) ^ 9
state_after: no goals
Theorem: coe_finsetBasisOfLinearIndependentOfCardEqFinrank
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: rw [finsetBasisOfLinearIndependentOfCardEqFinrank]
state_before: K : Type u
V : Type v
inst✝² : DivisionRing K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
s : Finset V
hs : s.Nonempty
lin_ind : LinearIndependent K Subtype.val
card_eq : s.card = finrank K V
⊢ ⇑(finsetBasisOfLinearIndependentOfCardEqFinrank hs lin_ind card_eq) = Subtype.val
state_after: K : Type u
V : Type v
inst✝² : DivisionRing K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
s : Finset V
hs : s.Nonempty
lin_ind : LinearIndependent K Subtype.val
card_eq : s.card = finrank K V
⊢ ⇑(basisOfLinearIndependentOfCardEqFinrank lin_ind ⋯) = Subtype.val

tactic: exact Basis.coe_mk _ _
state_before: K : Type u
V : Type v
inst✝² : DivisionRing K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
s : Finset V
hs : s.Nonempty
lin_ind : LinearIndependent K Subtype.val
card_eq : s.card = finrank K V
⊢ ⇑(basisOfLinearIndependentOfCardEqFinrank lin_ind ⋯) = Subtype.val
state_after: no goals
Theorem: List.Ico.bagInter_consecutive
File: Mathlib/Data/List/Intervals.lean

tactic: convert inter_consecutive n m l
state_before: n m l : ℕ
⊢ Ico n m ∩ Ico m l = []
state_after: no goals
Theorem: CategoryTheory.Bicategory.whiskerRight_iff
File: Mathlib/CategoryTheory/Bicategory/Basic.lean

tactic: simp
state_before: B : Type u
inst✝ : Bicategory B
a b c d e : B
f g : a ⟶ b
η θ : f ⟶ g
⊢ η ▷ 𝟙 b = θ ▷ 𝟙 b ↔ η = θ
state_after: no goals
Theorem: Option.elim'_eq_elim
File: Mathlib/Data/Option/Defs.lean

tactic: cases a <;> rfl
state_before: α✝ : Type u_1
β✝ : Type u_2
α : Type u_3
β : Type u_4
b : β
f : α → β
a : Option α
⊢ Option.elim' b f a = a.elim b f
state_after: no goals
Theorem: Associates.prod_add
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: simp
state_before: α : Type u_1
inst✝ : CancelCommMonoidWithZero α
b : FactorSet α
⊢ (⊤ + b).prod = ⊤.prod * b.prod
state_after: no goals

tactic: simp
state_before: α : Type u_1
inst✝ : CancelCommMonoidWithZero α
a : FactorSet α
⊢ (a + ⊤).prod = a.prod * ⊤.prod
state_after: no goals

tactic: rw [← FactorSet.coe_add, prod_coe, prod_coe, prod_coe, Multiset.map_add, Multiset.prod_add]
state_before: α : Type u_1
inst✝ : CancelCommMonoidWithZero α
a b : Multiset { a // Irreducible a }
⊢ (↑a + ↑b).prod = FactorSet.prod ↑a * FactorSet.prod ↑b
state_after: no goals
Theorem: MeasureTheory.measure_iUnion_fintype_le
File: Mathlib/MeasureTheory/OuterMeasure/Basic.lean

tactic: simpa using measure_biUnion_finset_le Finset.univ s
state_before: α : Type u_1
ι : Type u_2
F : Type u_3
inst✝² : FunLike F (Set α) ℝ≥0∞
inst✝¹ : OuterMeasureClass F α
μ✝ : F
s✝ t : Set α
inst✝ : Fintype ι
μ : F
s : ι → Set α
⊢ μ (⋃ i, s i) ≤ ∑ i : ι, μ (s i)
state_after: no goals
Theorem: RootPairing.IsOrthogonal.symm
File: Mathlib/LinearAlgebra/RootSystem/Defs.lean

tactic: simp only [IsOrthogonal, and_comm]
state_before: ι : Type u_1
R : Type u_2
M : Type u_3
N : Type u_4
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : AddCommGroup N
inst✝ : Module R N
P : RootPairing ι R M N
i j : ι
⊢ P.IsOrthogonal i j ↔ P.IsOrthogonal j i
state_after: no goals
Theorem: List.sublistsLenAux_eq
File: Mathlib/Data/List/Sublists.lean

tactic: rw [sublistsLen, ← sublistsLenAux_append]
state_before: α : Type u
β : Type v
γ : Type w
l : List α
n : ℕ
f : List α → β
r : List β
⊢ sublistsLenAux n l f r = map f (sublistsLen n l) ++ r
state_after: α : Type u
β : Type v
γ : Type w
l : List α
n : ℕ
f : List α → β
r : List β
⊢ sublistsLenAux n l f r = sublistsLenAux n l (f ∘ id) (map f [] ++ r)

tactic: rfl
state_before: α : Type u
β : Type v
γ : Type w
l : List α
n : ℕ
f : List α → β
r : List β
⊢ sublistsLenAux n l f r = sublistsLenAux n l (f ∘ id) (map f [] ++ r)
state_after: no goals
Theorem: smul_nonneg'
File: Mathlib/Algebra/Order/Module/Defs.lean

tactic: simpa only [zero_smul] using smul_le_smul_of_nonneg_right ha hb
state_before: α : Type u_1
β : Type u_2
a a₁ a₂ : α
b b₁ b₂ : β
inst✝⁵ : Zero α
inst✝⁴ : Zero β
inst✝³ : SMulWithZero α β
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : SMulPosMono α β
ha : 0 ≤ a
hb : 0 ≤ b₁
⊢ 0 ≤ a • b₁
state_after: no goals
Theorem: ThreeGPFree.eq_right
File: Mathlib/Combinatorics/Additive/AP/Three/Defs.lean

tactic: rintro a ha b hb c hc habc
state_before: F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
inst✝ : CancelCommMonoid α
s : Set α
a : α
hs : ThreeGPFree s
⊢ ∀ ⦃a : α⦄, a ∈ s → ∀ ⦃b : α⦄, b ∈ s → ∀ ⦃c : α⦄, c ∈ s → a * c = b * b → b = c
state_after: F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
inst✝ : CancelCommMonoid α
s : Set α
a✝ : α
hs : ThreeGPFree s
a : α
ha : a ∈ s
b : α
hb : b ∈ s
c : α
hc : c ∈ s
habc : a * c = b * b
⊢ b = c

tactic: obtain rfl := hs ha hb hc habc
state_before: F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
inst✝ : CancelCommMonoid α
s : Set α
a✝ : α
hs : ThreeGPFree s
a : α
ha : a ∈ s
b : α
hb : b ∈ s
c : α
hc : c ∈ s
habc : a * c = b * b
⊢ b = c
state_after: F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
inst✝ : CancelCommMonoid α
s : Set α
a✝ : α
hs : ThreeGPFree s
a : α
ha : a ∈ s
c : α
hc : c ∈ s
hb : a ∈ s
habc : a * c = a * a
⊢ a = c

tactic: simpa using habc.symm
state_before: F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
inst✝ : CancelCommMonoid α
s : Set α
a✝ : α
hs : ThreeGPFree s
a : α
ha : a ∈ s
c : α
hc : c ∈ s
hb : a ∈ s
habc : a * c = a * a
⊢ a = c
state_after: no goals
Theorem: Complex.ofReal_cpow_of_nonpos
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: rcases hx.eq_or_lt with (rfl | hlt)
state_before: x : ℝ
hx : x ≤ 0
y : ℂ
⊢ ↑x ^ y = (-↑x) ^ y * cexp (↑π * I * y)
state_after: case inl
y : ℂ
hx : 0 ≤ 0
⊢ ↑0 ^ y = (-↑0) ^ y * cexp (↑π * I * y)

case inr
x : ℝ
hx : x ≤ 0
y : ℂ
hlt : x < 0
⊢ ↑x ^ y = (-↑x) ^ y * cexp (↑π * I * y)

tactic: have hne : (x : ℂ) ≠ 0 := ofReal_ne_zero.mpr hlt.ne
state_before: case inr
x : ℝ
hx : x ≤ 0
y : ℂ
hlt : x < 0
⊢ ↑x ^ y = (-↑x) ^ y * cexp (↑π * I * y)
state_after: case inr
x : ℝ
hx : x ≤ 0
y : ℂ
hlt : x < 0
hne : ↑x ≠ 0
⊢ ↑x ^ y = (-↑x) ^ y * cexp (↑π * I * y)

tactic: rw [cpow_def_of_ne_zero hne, cpow_def_of_ne_zero (neg_ne_zero.2 hne), ← exp_add, ← add_mul, log,
  log, abs.map_neg, arg_ofReal_of_neg hlt, ← ofReal_neg,
  arg_ofReal_of_nonneg (neg_nonneg.2 hx), ofReal_zero, zero_mul, add_zero]
state_before: case inr
x : ℝ
hx : x ≤ 0
y : ℂ
hlt : x < 0
hne : ↑x ≠ 0
⊢ ↑x ^ y = (-↑x) ^ y * cexp (↑π * I * y)
state_after: no goals

tactic: rcases eq_or_ne y 0 with (rfl | hy) <;> simp [*]
state_before: case inl
y : ℂ
hx : 0 ≤ 0
⊢ ↑0 ^ y = (-↑0) ^ y * cexp (↑π * I * y)
state_after: no goals
Theorem: Nat.gcd_fib_add_self
File: Mathlib/Data/Nat/Fib/Basic.lean

tactic: rcases Nat.eq_zero_or_pos n with h | h
state_before: m n : ℕ
⊢ (fib m).gcd (fib (n + m)) = (fib m).gcd (fib n)
state_after: case inl
m n : ℕ
h : n = 0
⊢ (fib m).gcd (fib (n + m)) = (fib m).gcd (fib n)

case inr
m n : ℕ
h : n > 0
⊢ (fib m).gcd (fib (n + m)) = (fib m).gcd (fib n)

tactic: replace h := Nat.succ_pred_eq_of_pos h
state_before: case inr
m n : ℕ
h : n > 0
⊢ (fib m).gcd (fib (n + m)) = (fib m).gcd (fib n)
state_after: case inr
m n : ℕ
h : n.pred.succ = n
⊢ (fib m).gcd (fib (n + m)) = (fib m).gcd (fib n)

tactic: rw [← h, succ_eq_add_one]
state_before: case inr
m n : ℕ
h : n.pred.succ = n
⊢ (fib m).gcd (fib (n + m)) = (fib m).gcd (fib n)
state_after: case inr
m n : ℕ
h : n.pred.succ = n
⊢ (fib m).gcd (fib (n.pred + 1 + m)) = (fib m).gcd (fib (n.pred + 1))

tactic: calc
  gcd (fib m) (fib (n.pred + 1 + m)) =
      gcd (fib m) (fib n.pred * fib m + fib (n.pred + 1) * fib (m + 1)) := by
      rw [← fib_add n.pred _]
      ring_nf
  _ = gcd (fib m) (fib (n.pred + 1) * fib (m + 1)) := by
      rw [add_comm, gcd_add_mul_right_right (fib m) _ (fib n.pred)]
  _ = gcd (fib m) (fib (n.pred + 1)) :=
    Coprime.gcd_mul_right_cancel_right (fib (n.pred + 1)) (Coprime.symm (fib_coprime_fib_succ m))
state_before: case inr
m n : ℕ
h : n.pred.succ = n
⊢ (fib m).gcd (fib (n.pred + 1 + m)) = (fib m).gcd (fib (n.pred + 1))
state_after: no goals

tactic: rw [h]
state_before: case inl
m n : ℕ
h : n = 0
⊢ (fib m).gcd (fib (n + m)) = (fib m).gcd (fib n)
state_after: case inl
m n : ℕ
h : n = 0
⊢ (fib m).gcd (fib (0 + m)) = (fib m).gcd (fib 0)

tactic: simp
state_before: case inl
m n : ℕ
h : n = 0
⊢ (fib m).gcd (fib (0 + m)) = (fib m).gcd (fib 0)
state_after: no goals

tactic: rw [← fib_add n.pred _]
state_before: m n : ℕ
h : n.pred.succ = n
⊢ (fib m).gcd (fib (n.pred + 1 + m)) = (fib m).gcd (fib n.pred * fib m + fib (n.pred + 1) * fib (m + 1))
state_after: m n : ℕ
h : n.pred.succ = n
⊢ (fib m).gcd (fib (n.pred + 1 + m)) = (fib m).gcd (fib (n.pred + m + 1))

tactic: ring_nf
state_before: m n : ℕ
h : n.pred.succ = n
⊢ (fib m).gcd (fib (n.pred + 1 + m)) = (fib m).gcd (fib (n.pred + m + 1))
state_after: no goals

tactic: rw [add_comm, gcd_add_mul_right_right (fib m) _ (fib n.pred)]
state_before: m n : ℕ
h : n.pred.succ = n
⊢ (fib m).gcd (fib n.pred * fib m + fib (n.pred + 1) * fib (m + 1)) = (fib m).gcd (fib (n.pred + 1) * fib (m + 1))
state_after: no goals
Theorem: discrim_lt_zero
File: Mathlib/Algebra/QuadraticDiscriminant.lean

tactic: have : ∀ x : K, 0 ≤ a * x * x + b * x + c := fun x => le_of_lt (h x)
state_before: K : Type u_1
inst✝ : LinearOrderedField K
a b c : K
ha : a ≠ 0
h : ∀ (x : K), 0 < a * x * x + b * x + c
⊢ discrim a b c < 0
state_after: K : Type u_1
inst✝ : LinearOrderedField K
a b c : K
ha : a ≠ 0
h : ∀ (x : K), 0 < a * x * x + b * x + c
this : ∀ (x : K), 0 ≤ a * x * x + b * x + c
⊢ discrim a b c < 0

tactic: refine lt_of_le_of_ne (discrim_le_zero this) fun h' ↦ ?_
state_before: K : Type u_1
inst✝ : LinearOrderedField K
a b c : K
ha : a ≠ 0
h : ∀ (x : K), 0 < a * x * x + b * x + c
this : ∀ (x : K), 0 ≤ a * x * x + b * x + c
⊢ discrim a b c < 0
state_after: K : Type u_1
inst✝ : LinearOrderedField K
a b c : K
ha : a ≠ 0
h : ∀ (x : K), 0 < a * x * x + b * x + c
this : ∀ (x : K), 0 ≤ a * x * x + b * x + c
h' : discrim a b c = 0
⊢ False

tactic: have := h (-b / (2 * a))
state_before: K : Type u_1
inst✝ : LinearOrderedField K
a b c : K
ha : a ≠ 0
h : ∀ (x : K), 0 < a * x * x + b * x + c
this : ∀ (x : K), 0 ≤ a * x * x + b * x + c
h' : discrim a b c = 0
⊢ False
state_after: K : Type u_1
inst✝ : LinearOrderedField K
a b c : K
ha : a ≠ 0
h : ∀ (x : K), 0 < a * x * x + b * x + c
this✝ : ∀ (x : K), 0 ≤ a * x * x + b * x + c
h' : discrim a b c = 0
this : 0 < a * (-b / (2 * a)) * (-b / (2 * a)) + b * (-b / (2 * a)) + c
⊢ False

tactic: have : a * (-b / (2 * a)) * (-b / (2 * a)) + b * (-b / (2 * a)) + c = 0 := by
  rw [quadratic_eq_zero_iff_of_discrim_eq_zero ha h' (-b / (2 * a))]
state_before: K : Type u_1
inst✝ : LinearOrderedField K
a b c : K
ha : a ≠ 0
h : ∀ (x : K), 0 < a * x * x + b * x + c
this✝ : ∀ (x : K), 0 ≤ a * x * x + b * x + c
h' : discrim a b c = 0
this : 0 < a * (-b / (2 * a)) * (-b / (2 * a)) + b * (-b / (2 * a)) + c
⊢ False
state_after: K : Type u_1
inst✝ : LinearOrderedField K
a b c : K
ha : a ≠ 0
h : ∀ (x : K), 0 < a * x * x + b * x + c
this✝¹ : ∀ (x : K), 0 ≤ a * x * x + b * x + c
h' : discrim a b c = 0
this✝ : 0 < a * (-b / (2 * a)) * (-b / (2 * a)) + b * (-b / (2 * a)) + c
this : a * (-b / (2 * a)) * (-b / (2 * a)) + b * (-b / (2 * a)) + c = 0
⊢ False

tactic: linarith
state_before: K : Type u_1
inst✝ : LinearOrderedField K
a b c : K
ha : a ≠ 0
h : ∀ (x : K), 0 < a * x * x + b * x + c
this✝¹ : ∀ (x : K), 0 ≤ a * x * x + b * x + c
h' : discrim a b c = 0
this✝ : 0 < a * (-b / (2 * a)) * (-b / (2 * a)) + b * (-b / (2 * a)) + c
this : a * (-b / (2 * a)) * (-b / (2 * a)) + b * (-b / (2 * a)) + c = 0
⊢ False
state_after: no goals

tactic: rw [quadratic_eq_zero_iff_of_discrim_eq_zero ha h' (-b / (2 * a))]
state_before: K : Type u_1
inst✝ : LinearOrderedField K
a b c : K
ha : a ≠ 0
h : ∀ (x : K), 0 < a * x * x + b * x + c
this✝ : ∀ (x : K), 0 ≤ a * x * x + b * x + c
h' : discrim a b c = 0
this : 0 < a * (-b / (2 * a)) * (-b / (2 * a)) + b * (-b / (2 * a)) + c
⊢ a * (-b / (2 * a)) * (-b / (2 * a)) + b * (-b / (2 * a)) + c = 0
state_after: no goals
Theorem: nhdsSet_le
File: Mathlib/Topology/NhdsSet.lean

tactic: simp [nhdsSet]
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 ≤ f ↔ ∀ x ∈ s, 𝓝 x ≤ f
state_after: no goals
Theorem: UpperSet.mem_iSup₂_iff
File: Mathlib/Order/UpperLower/Basic.lean

tactic: simp_rw [mem_iSup_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
κ : ι → Sort u_5
inst✝ : LE α
S : Set (UpperSet α)
s t : UpperSet α
a : α
f : (i : ι) → κ i → UpperSet α
⊢ a ∈ ⨆ i, ⨆ j, f i j ↔ ∀ (i : ι) (j : κ i), a ∈ f i j
state_after: no goals
Theorem: Zspan.measure_fundamentalDomain_ne_zero
File: Mathlib/Algebra/Module/Zlattice/Basic.lean

tactic: convert (Zspan.isAddFundamentalDomain b μ).measure_ne_zero (NeZero.ne μ)
state_before: E : Type u_1
ι : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
b : Basis ι ℝ E
inst✝³ : Finite ι
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : μ.IsAddHaarMeasure
⊢ μ (fundamentalDomain b) ≠ 0
state_after: E : Type u_1
ι : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
b : Basis ι ℝ E
inst✝³ : Finite ι
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : μ.IsAddHaarMeasure
⊢ Countable ↥(span ℤ (Set.range ⇑b)).toAddSubgroup

tactic: simp only [mem_toAddSubgroup]
state_before: E : Type u_1
ι : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
b : Basis ι ℝ E
inst✝³ : Finite ι
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : μ.IsAddHaarMeasure
⊢ Countable ↥(span ℤ (Set.range ⇑b)).toAddSubgroup
state_after: E : Type u_1
ι : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
b : Basis ι ℝ E
inst✝³ : Finite ι
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : μ.IsAddHaarMeasure
⊢ Countable ↥(span ℤ (Set.range ⇑b))

tactic: infer_instance
state_before: E : Type u_1
ι : Type u_2
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
b : Basis ι ℝ E
inst✝³ : Finite ι
inst✝² : MeasurableSpace E
inst✝¹ : BorelSpace E
μ : Measure E
inst✝ : μ.IsAddHaarMeasure
⊢ Countable ↥(span ℤ (Set.range ⇑b))
state_after: no goals
Theorem: MvPolynomial.totalDegree_monomial
File: Mathlib/Algebra/MvPolynomial/Degrees.lean

tactic: classical simp [totalDegree, support_monomial, if_neg hc]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
s : σ →₀ ℕ
c : R
hc : c ≠ 0
⊢ ((monomial s) c).totalDegree = s.sum fun x e => e
state_after: no goals

tactic: simp [totalDegree, support_monomial, if_neg hc]
state_before: R : Type u
S : Type v
σ : Type u_1
τ : Type u_2
r : R
e : ℕ
n m : σ
s✝ : σ →₀ ℕ
inst✝ : CommSemiring R
p q : MvPolynomial σ R
s : σ →₀ ℕ
c : R
hc : c ≠ 0
⊢ ((monomial s) c).totalDegree = s.sum fun x e => e
state_after: no goals
Theorem: MeasureTheory.average_zero_measure
File: Mathlib/MeasureTheory/Integral/Average.lean

tactic: rw [average, smul_zero, integral_zero_measure]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
m0 : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
μ ν : Measure α
s t : Set α
f✝ g f : α → E
⊢ ⨍ (x : α), f x ∂0 = 0
state_after: no goals
Theorem: Relation.reflGen_transGen
File: Mathlib/Logic/Relation.lean

tactic: ext x y
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ζ : Type u_6
r : α → α → Prop
a b c d : α
⊢ ReflGen (TransGen r) = ReflTransGen r
state_after: case h.h.a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ζ : Type u_6
r : α → α → Prop
a b c d x y : α
⊢ ReflGen (TransGen r) x y ↔ ReflTransGen r x y

tactic: simp_rw [reflTransGen_iff_eq_or_transGen, reflGen_iff]
state_before: case h.h.a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ε : Type u_5
ζ : Type u_6
r : α → α → Prop
a b c d x y : α
⊢ ReflGen (TransGen r) x y ↔ ReflTransGen r x y
state_after: no goals
Theorem: WeierstrassCurve.Jacobian.dblZ_of_Z_eq_zero
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

tactic: rw [dblZ, hPz, zero_mul]
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → R
hPz : P z = 0
⊢ W'.dblZ P = 0
state_after: no goals
Theorem: Batteries.RBNode.All.lowerBound?_lb
File: .lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean

tactic: rw [← reverse_reverse t, lowerBound?_reverse]
state_before: α : Type u_1
p : α → Prop
lb : Option α
cut : α → Ordering
x : α
t : RBNode α
hp : All p t
H : ∀ {x : α}, lb = some x → p x
⊢ lowerBound? cut t lb = some x → p x
state_after: α : Type u_1
p : α → Prop
lb : Option α
cut : α → Ordering
x : α
t : RBNode α
hp : All p t
H : ∀ {x : α}, lb = some x → p x
⊢ RBNode.upperBound? (fun x => (cut x).swap) t.reverse lb = some x → p x

tactic: exact All.upperBound?_ub (All.reverse.2 hp) H
state_before: α : Type u_1
p : α → Prop
lb : Option α
cut : α → Ordering
x : α
t : RBNode α
hp : All p t
H : ∀ {x : α}, lb = some x → p x
⊢ RBNode.upperBound? (fun x => (cut x).swap) t.reverse lb = some x → p x
state_after: no goals
Theorem: Nat.mem_factors_mul_left
File: Mathlib/Data/Nat/Factors.lean

tactic: rcases eq_or_ne a 0 with (rfl | ha)
state_before: p a b : ℕ
hpa : p ∈ a.factors
hb : b ≠ 0
⊢ p ∈ (a * b).factors
state_after: case inl
p b : ℕ
hb : b ≠ 0
hpa : p ∈ factors 0
⊢ p ∈ (0 * b).factors

case inr
p a b : ℕ
hpa : p ∈ a.factors
hb : b ≠ 0
ha : a ≠ 0
⊢ p ∈ (a * b).factors

tactic: apply (mem_factors_mul ha hb).2 (Or.inl hpa)
state_before: case inr
p a b : ℕ
hpa : p ∈ a.factors
hb : b ≠ 0
ha : a ≠ 0
⊢ p ∈ (a * b).factors
state_after: no goals

tactic: simp at hpa
state_before: case inl
p b : ℕ
hb : b ≠ 0
hpa : p ∈ factors 0
⊢ p ∈ (0 * b).factors
state_after: no goals
Theorem: IsMetricSeparated.finite_iUnion_right_iff
File: Mathlib/Topology/MetricSpace/MetricSeparated.lean

tactic: simpa only [@comm _ _ s] using finite_iUnion_left_iff hI
state_before: X : Type u_1
inst✝ : EMetricSpace X
s✝ t✝ : Set X
x y : X
ι : Type u_2
I : Set ι
hI : I.Finite
s : Set X
t : ι → Set X
⊢ IsMetricSeparated s (⋃ i ∈ I, t i) ↔ ∀ i ∈ I, IsMetricSeparated s (t i)
state_after: no goals
Theorem: hasDerivAt_fourier
File: Mathlib/Analysis/Fourier/AddCircle.lean

tactic: simp_rw [fourier_coe_apply]
state_before: T : ℝ
n : ℤ
x : ℝ
⊢ HasDerivAt (fun y => (fourier n) ↑y) (2 * ↑π * I * ↑n / ↑T * (fourier n) ↑x) x
state_after: T : ℝ
n : ℤ
x : ℝ
⊢ HasDerivAt (fun y => cexp (2 * ↑π * I * ↑n * ↑y / ↑T)) (2 * ↑π * I * ↑n / ↑T * cexp (2 * ↑π * I * ↑n * ↑x / ↑T)) x

tactic: refine (?_ : HasDerivAt (fun y => exp (2 * π * I * n * y / T)) _ _).comp_ofReal
state_before: T : ℝ
n : ℤ
x : ℝ
⊢ HasDerivAt (fun y => cexp (2 * ↑π * I * ↑n * ↑y / ↑T)) (2 * ↑π * I * ↑n / ↑T * cexp (2 * ↑π * I * ↑n * ↑x / ↑T)) x
state_after: T : ℝ
n : ℤ
x : ℝ
⊢ HasDerivAt (fun y => cexp (2 * ↑π * I * ↑n * y / ↑T)) (2 * ↑π * I * ↑n / ↑T * cexp (2 * ↑π * I * ↑n * ↑x / ↑T)) ↑x

tactic: rw [(fun α β => by ring : ∀ α β : ℂ, α * exp β = exp β * α)]
state_before: T : ℝ
n : ℤ
x : ℝ
⊢ HasDerivAt (fun y => cexp (2 * ↑π * I * ↑n * y / ↑T)) (2 * ↑π * I * ↑n / ↑T * cexp (2 * ↑π * I * ↑n * ↑x / ↑T)) ↑x
state_after: T : ℝ
n : ℤ
x : ℝ
⊢ HasDerivAt (fun y => cexp (2 * ↑π * I * ↑n * y / ↑T)) (cexp (2 * ↑π * I * ↑n * ↑x / ↑T) * (2 * ↑π * I * ↑n / ↑T)) ↑x

tactic: refine (hasDerivAt_exp _).comp (x : ℂ) ?_
state_before: T : ℝ
n : ℤ
x : ℝ
⊢ HasDerivAt (fun y => cexp (2 * ↑π * I * ↑n * y / ↑T)) (cexp (2 * ↑π * I * ↑n * ↑x / ↑T) * (2 * ↑π * I * ↑n / ↑T)) ↑x
state_after: T : ℝ
n : ℤ
x : ℝ
⊢ HasDerivAt (fun y => 2 * ↑π * I * ↑n * y / ↑T) (2 * ↑π * I * ↑n / ↑T) ↑x

tactic: convert hasDerivAt_mul_const (2 * ↑π * I * ↑n / T) using 1
state_before: T : ℝ
n : ℤ
x : ℝ
⊢ HasDerivAt (fun y => 2 * ↑π * I * ↑n * y / ↑T) (2 * ↑π * I * ↑n / ↑T) ↑x
state_after: case h.e'_6
T : ℝ
n : ℤ
x : ℝ
⊢ (fun y => 2 * ↑π * I * ↑n * y / ↑T) = fun x => x * (2 * ↑π * I * ↑n / ↑T)

tactic: ext1 y
state_before: case h.e'_6
T : ℝ
n : ℤ
x : ℝ
⊢ (fun y => 2 * ↑π * I * ↑n * y / ↑T) = fun x => x * (2 * ↑π * I * ↑n / ↑T)
state_after: case h.e'_6.h
T : ℝ
n : ℤ
x : ℝ
y : ℂ
⊢ 2 * ↑π * I * ↑n * y / ↑T = y * (2 * ↑π * I * ↑n / ↑T)

tactic: ring
state_before: case h.e'_6.h
T : ℝ
n : ℤ
x : ℝ
y : ℂ
⊢ 2 * ↑π * I * ↑n * y / ↑T = y * (2 * ↑π * I * ↑n / ↑T)
state_after: no goals

tactic: ring
state_before: T : ℝ
n : ℤ
x : ℝ
α β : ℂ
⊢ α * cexp β = cexp β * α
state_after: no goals
Theorem: map_nhds_induced_of_mem
File: Mathlib/Topology/Order.lean

tactic: rw [nhds_induced, Filter.map_comap_of_mem h]
state_before: α : Type u_1
β : Type u_2
t : TopologicalSpace β
f : α → β
a : α
h : range f ∈ 𝓝 (f a)
⊢ map f (𝓝 a) = 𝓝 (f a)
state_after: no goals