1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Pell.eq_of_xn_modEq_lem1
File: Mathlib/NumberTheory/PellMatiyasevic.lean

tactic: suffices xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n from
  (lt_or_eq_of_le (Nat.le_of_succ_le_succ ij)).elim
    (fun h => lt_trans (eq_of_xn_modEq_lem1 h (le_of_lt jn)) this) fun h => by
    rw [h]; exact this
state_before: a : ℕ
a1 : 1 < a
i n j : ℕ
ij : i < j + 1
jn : j + 1 < n
⊢ xn a1 i % xn a1 n < xn a1 (j + 1) % xn a1 n
state_after: a : ℕ
a1 : 1 < a
i n j : ℕ
ij : i < j + 1
jn : j + 1 < n
⊢ xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n

tactic: rw [Nat.mod_eq_of_lt (strictMono_x _ (Nat.lt_of_succ_lt jn)),
    Nat.mod_eq_of_lt (strictMono_x _ jn)]
state_before: a : ℕ
a1 : 1 < a
i n j : ℕ
ij : i < j + 1
jn : j + 1 < n
⊢ xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n
state_after: a : ℕ
a1 : 1 < a
i n j : ℕ
ij : i < j + 1
jn : j + 1 < n
⊢ xn a1 j < xn a1 (j + 1)

tactic: exact strictMono_x _ (Nat.lt_succ_self _)
state_before: a : ℕ
a1 : 1 < a
i n j : ℕ
ij : i < j + 1
jn : j + 1 < n
⊢ xn a1 j < xn a1 (j + 1)
state_after: no goals

tactic: rw [h]
state_before: a : ℕ
a1 : 1 < a
i n j : ℕ
ij : i < j + 1
jn : j + 1 < n
this : xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n
h : i = j
⊢ xn a1 i % xn a1 n < xn a1 (j + 1) % xn a1 n
state_after: a : ℕ
a1 : 1 < a
i n j : ℕ
ij : i < j + 1
jn : j + 1 < n
this : xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n
h : i = j
⊢ xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n

tactic: exact this
state_before: a : ℕ
a1 : 1 < a
i n j : ℕ
ij : i < j + 1
jn : j + 1 < n
this : xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n
h : i = j
⊢ xn a1 j % xn a1 n < xn a1 (j + 1) % xn a1 n
state_after: no goals
Theorem: AlgebraicGeometry.AffineTargetMorphismProperty.respectsIso_mk
File: Mathlib/AlgebraicGeometry/Morphisms/Basic.lean

tactic: constructor
state_before: P : AffineTargetMorphismProperty
h₁ : ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z], P f → P (e.hom ≫ f)
h₂ : ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y) [h : IsAffine Y], P f → P (f ≫ e.hom)
⊢ P.toProperty.RespectsIso
state_after: case left
P : AffineTargetMorphismProperty
h₁ : ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z], P f → P (e.hom ≫ f)
h₂ : ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y) [h : IsAffine Y], P f → P (f ≫ e.hom)
⊢ ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z), P.toProperty f → P.toProperty (e.hom ≫ f)

case right
P : AffineTargetMorphismProperty
h₁ : ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z], P f → P (e.hom ≫ f)
h₂ : ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y) [h : IsAffine Y], P f → P (f ≫ e.hom)
⊢ ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y), P.toProperty f → P.toProperty (f ≫ e.hom)

tactic: rintro X Y Z e f ⟨a, h⟩
state_before: case left
P : AffineTargetMorphismProperty
h₁ : ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z], P f → P (e.hom ≫ f)
h₂ : ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y) [h : IsAffine Y], P f → P (f ≫ e.hom)
⊢ ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z), P.toProperty f → P.toProperty (e.hom ≫ f)
state_after: case left.intro
P : AffineTargetMorphismProperty
h₁ : ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z], P f → P (e.hom ≫ f)
h₂ : ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y) [h : IsAffine Y], P f → P (f ≫ e.hom)
X Y Z : Scheme
e : X ≅ Y
f : Y ⟶ Z
a : IsAffine Z
h : P f
⊢ P.toProperty (e.hom ≫ f)

tactic: exact ⟨a, h₁ e f h⟩
state_before: case left.intro
P : AffineTargetMorphismProperty
h₁ : ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z], P f → P (e.hom ≫ f)
h₂ : ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y) [h : IsAffine Y], P f → P (f ≫ e.hom)
X Y Z : Scheme
e : X ≅ Y
f : Y ⟶ Z
a : IsAffine Z
h : P f
⊢ P.toProperty (e.hom ≫ f)
state_after: no goals

tactic: rintro X Y Z e f ⟨a, h⟩
state_before: case right
P : AffineTargetMorphismProperty
h₁ : ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z], P f → P (e.hom ≫ f)
h₂ : ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y) [h : IsAffine Y], P f → P (f ≫ e.hom)
⊢ ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y), P.toProperty f → P.toProperty (f ≫ e.hom)
state_after: case right.intro
P : AffineTargetMorphismProperty
h₁ : ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z], P f → P (e.hom ≫ f)
h₂ : ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y) [h : IsAffine Y], P f → P (f ≫ e.hom)
X Y Z : Scheme
e : Y ≅ Z
f : X ⟶ Y
a : IsAffine Y
h : P f
⊢ P.toProperty (f ≫ e.hom)

tactic: exact ⟨isAffine_of_isIso e.inv, h₂ e f h⟩
state_before: case right.intro
P : AffineTargetMorphismProperty
h₁ : ∀ {X Y Z : Scheme} (e : X ≅ Y) (f : Y ⟶ Z) [inst : IsAffine Z], P f → P (e.hom ≫ f)
h₂ : ∀ {X Y Z : Scheme} (e : Y ≅ Z) (f : X ⟶ Y) [h : IsAffine Y], P f → P (f ≫ e.hom)
X Y Z : Scheme
e : Y ≅ Z
f : X ⟶ Y
a : IsAffine Y
h : P f
⊢ P.toProperty (f ≫ e.hom)
state_after: no goals
Theorem: smul_closedUnitBall_of_nonneg
File: Mathlib/Analysis/NormedSpace/Pointwise.lean

tactic: rw [smul_closedUnitBall, Real.norm_of_nonneg hr]
state_before: 𝕜 : Type u_1
E : Type u_2
inst✝³ : NormedField 𝕜
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
r : ℝ
hr : 0 ≤ r
⊢ r • closedBall 0 1 = closedBall 0 r
state_after: no goals
Theorem: PartENat.card_eq_coe_natCard
File: Mathlib/Data/Finite/Card.lean

tactic: unfold PartENat.card
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Finite α
⊢ card α = ↑(Nat.card α)
state_after: α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Finite α
⊢ Cardinal.toPartENat (Cardinal.mk α) = ↑(Nat.card α)

tactic: apply symm
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Finite α
⊢ Cardinal.toPartENat (Cardinal.mk α) = ↑(Nat.card α)
state_after: case a
α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Finite α
⊢ ↑(Nat.card α) = Cardinal.toPartENat (Cardinal.mk α)

tactic: rw [Cardinal.natCast_eq_toPartENat_iff]
state_before: case a
α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Finite α
⊢ ↑(Nat.card α) = Cardinal.toPartENat (Cardinal.mk α)
state_after: case a
α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Finite α
⊢ ↑(Nat.card α) = Cardinal.mk α

tactic: exact Finite.cast_card_eq_mk
state_before: case a
α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Finite α
⊢ ↑(Nat.card α) = Cardinal.mk α
state_after: no goals
Theorem: Complex.ofReal_pow
File: Mathlib/Data/Complex/Basic.lean

tactic: induction n <;> simp [*, ofReal_mul, pow_succ]
state_before: r : ℝ
n : ℕ
⊢ ↑(r ^ n) = ↑r ^ n
state_after: no goals
Theorem: List.alternatingProd_cons_cons
File: Mathlib/Algebra/BigOperators/Group/List.lean

tactic: rw [div_eq_mul_inv, alternatingProd_cons_cons']
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
G : Type u_7
inst✝ : DivInvMonoid α
a b : α
l : List α
⊢ (a :: b :: l).alternatingProd = a / b * l.alternatingProd
state_after: no goals
Theorem: Cubic.splits_iff_card_roots
File: Mathlib/Algebra/CubicDiscriminant.lean

tactic: replace ha : (map φ P).a ≠ 0 := (_root_.map_ne_zero φ).mpr ha
state_before: R : Type u_1
S : Type u_2
F : Type u_3
K : Type u_4
P : Cubic F
inst✝¹ : Field F
inst✝ : Field K
φ : F →+* K
x y z : K
ha : P.a ≠ 0
⊢ Splits φ P.toPoly ↔ card (map φ P).roots = 3
state_after: R : Type u_1
S : Type u_2
F : Type u_3
K : Type u_4
P : Cubic F
inst✝¹ : Field F
inst✝ : Field K
φ : F →+* K
x y z : K
ha : (map φ P).a ≠ 0
⊢ Splits φ P.toPoly ↔ card (map φ P).roots = 3

tactic: nth_rw 1 [← RingHom.id_comp φ]
state_before: R : Type u_1
S : Type u_2
F : Type u_3
K : Type u_4
P : Cubic F
inst✝¹ : Field F
inst✝ : Field K
φ : F →+* K
x y z : K
ha : (map φ P).a ≠ 0
⊢ Splits φ P.toPoly ↔ card (map φ P).roots = 3
state_after: R : Type u_1
S : Type u_2
F : Type u_3
K : Type u_4
P : Cubic F
inst✝¹ : Field F
inst✝ : Field K
φ : F →+* K
x y z : K
ha : (map φ P).a ≠ 0
⊢ Splits ((RingHom.id K).comp φ) P.toPoly ↔ card (map φ P).roots = 3

tactic: rw [roots, ← splits_map_iff, ← map_toPoly, Polynomial.splits_iff_card_roots,
  ← ((degree_eq_iff_natDegree_eq <| ne_zero_of_a_ne_zero ha).1 <| degree_of_a_ne_zero ha : _ = 3)]
state_before: R : Type u_1
S : Type u_2
F : Type u_3
K : Type u_4
P : Cubic F
inst✝¹ : Field F
inst✝ : Field K
φ : F →+* K
x y z : K
ha : (map φ P).a ≠ 0
⊢ Splits ((RingHom.id K).comp φ) P.toPoly ↔ card (map φ P).roots = 3
state_after: no goals
Theorem: IsAlgClosed.roots_eq_zero_iff
File: Mathlib/FieldTheory/IsAlgClosed/Basic.lean

tactic: refine ⟨fun h => ?_, fun hp => by rw [hp, roots_C]⟩
state_before: k : Type u
inst✝¹ : Field k
inst✝ : IsAlgClosed k
p : k[X]
⊢ p.roots = 0 ↔ p = C (p.coeff 0)
state_after: k : Type u
inst✝¹ : Field k
inst✝ : IsAlgClosed k
p : k[X]
h : p.roots = 0
⊢ p = C (p.coeff 0)

tactic: rcases le_or_lt (degree p) 0 with hd | hd
state_before: k : Type u
inst✝¹ : Field k
inst✝ : IsAlgClosed k
p : k[X]
h : p.roots = 0
⊢ p = C (p.coeff 0)
state_after: case inl
k : Type u
inst✝¹ : Field k
inst✝ : IsAlgClosed k
p : k[X]
h : p.roots = 0
hd : p.degree ≤ 0
⊢ p = C (p.coeff 0)

case inr
k : Type u
inst✝¹ : Field k
inst✝ : IsAlgClosed k
p : k[X]
h : p.roots = 0
hd : 0 < p.degree
⊢ p = C (p.coeff 0)

tactic: rw [hp, roots_C]
state_before: k : Type u
inst✝¹ : Field k
inst✝ : IsAlgClosed k
p : k[X]
hp : p = C (p.coeff 0)
⊢ p.roots = 0
state_after: no goals

tactic: exact eq_C_of_degree_le_zero hd
state_before: case inl
k : Type u
inst✝¹ : Field k
inst✝ : IsAlgClosed k
p : k[X]
h : p.roots = 0
hd : p.degree ≤ 0
⊢ p = C (p.coeff 0)
state_after: no goals

tactic: obtain ⟨z, hz⟩ := IsAlgClosed.exists_root p hd.ne'
state_before: case inr
k : Type u
inst✝¹ : Field k
inst✝ : IsAlgClosed k
p : k[X]
h : p.roots = 0
hd : 0 < p.degree
⊢ p = C (p.coeff 0)
state_after: case inr.intro
k : Type u
inst✝¹ : Field k
inst✝ : IsAlgClosed k
p : k[X]
h : p.roots = 0
hd : 0 < p.degree
z : k
hz : p.IsRoot z
⊢ p = C (p.coeff 0)

tactic: rw [← mem_roots (ne_zero_of_degree_gt hd), h] at hz
state_before: case inr.intro
k : Type u
inst✝¹ : Field k
inst✝ : IsAlgClosed k
p : k[X]
h : p.roots = 0
hd : 0 < p.degree
z : k
hz : p.IsRoot z
⊢ p = C (p.coeff 0)
state_after: case inr.intro
k : Type u
inst✝¹ : Field k
inst✝ : IsAlgClosed k
p : k[X]
h : p.roots = 0
hd : 0 < p.degree
z : k
hz : z ∈ 0
⊢ p = C (p.coeff 0)

tactic: simp at hz
state_before: case inr.intro
k : Type u
inst✝¹ : Field k
inst✝ : IsAlgClosed k
p : k[X]
h : p.roots = 0
hd : 0 < p.degree
z : k
hz : z ∈ 0
⊢ p = C (p.coeff 0)
state_after: no goals
Theorem: WeierstrassCurve.Ψ_one
File: Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic.lean

tactic: erw [Ψ_ofNat, preΨ'_one, C_1, mul_one]
state_before: R : Type r
S : Type s
inst✝¹ : CommRing R
inst✝ : CommRing S
W : WeierstrassCurve R
⊢ W.Ψ 1 = 1
state_after: no goals
Theorem: Nat.mod_two_ne_zero
File: Mathlib/Data/Nat/Defs.lean

tactic: cases' mod_two_eq_zero_or_one n with h h <;> simp [h]
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
⊢ ¬n % 2 = 0 ↔ n % 2 = 1
state_after: no goals
Theorem: bernoulli'_four
File: Mathlib/NumberTheory/Bernoulli.lean

tactic: have : Nat.choose 4 2 = 6 := by decide
state_before: A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
⊢ bernoulli' 4 = -1 / 30
state_after: A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
this : Nat.choose 4 2 = 6
⊢ bernoulli' 4 = -1 / 30

tactic: rw [bernoulli'_def]
state_before: A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
this : Nat.choose 4 2 = 6
⊢ bernoulli' 4 = -1 / 30
state_after: A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
this : Nat.choose 4 2 = 6
⊢ 1 - ∑ k ∈ range 4, ↑(Nat.choose 4 k) / (↑4 - ↑k + 1) * bernoulli' k = -1 / 30

tactic: norm_num [sum_range_succ, sum_range_succ, sum_range_zero, this]
state_before: A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
this : Nat.choose 4 2 = 6
⊢ 1 - ∑ k ∈ range 4, ↑(Nat.choose 4 k) / (↑4 - ↑k + 1) * bernoulli' k = -1 / 30
state_after: no goals

tactic: decide
state_before: A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
⊢ Nat.choose 4 2 = 6
state_after: no goals
Theorem: CategoryTheory.Limits.Types.Quot.desc_toCocone_desc
File: Mathlib/CategoryTheory/Limits/Types.lean

tactic: obtain ⟨j, y, rfl⟩ := Quot.jointly_surjective x
state_before: J : Type v
inst✝ : Category.{w, v} J
F : J ⥤ Type u
c : Cocone F
α : Type u
f : Quot F → α
hc : IsColimit c
x : Quot F
⊢ hc.desc (toCocone f) (desc c x) = f x
state_after: case intro.intro
J : Type v
inst✝ : Category.{w, v} J
F : J ⥤ Type u
c : Cocone F
α : Type u
f : Quot F → α
hc : IsColimit c
j : J
y : F.obj j
⊢ hc.desc (toCocone f) (desc c (ι F j y)) = f (ι F j y)

tactic: simpa using congrFun (hc.fac _ j) y
state_before: case intro.intro
J : Type v
inst✝ : Category.{w, v} J
F : J ⥤ Type u
c : Cocone F
α : Type u
f : Quot F → α
hc : IsColimit c
j : J
y : F.obj j
⊢ hc.desc (toCocone f) (desc c (ι F j y)) = f (ι F j y)
state_after: no goals
Theorem: PosNum.cmp_to_nat_lemma
File: Mathlib/Data/Num/Lemmas.lean

tactic: intro h
state_before: α : Type u_1
m n : PosNum
⊢ ↑m < ↑n → ↑m + ↑m + 1 + 1 ≤ ↑n + ↑n
state_after: α : Type u_1
m n : PosNum
h : ↑m < ↑n
⊢ ↑m + ↑m + 1 + 1 ≤ ↑n + ↑n

tactic: rw [Nat.add_right_comm m m 1, add_assoc]
state_before: α : Type u_1
m n : PosNum
h : ↑m < ↑n
⊢ ↑m + ↑m + 1 + 1 ≤ ↑n + ↑n
state_after: α : Type u_1
m n : PosNum
h : ↑m < ↑n
⊢ ↑m + 1 + (↑m + 1) ≤ ↑n + ↑n

tactic: exact Nat.add_le_add h h
state_before: α : Type u_1
m n : PosNum
h : ↑m < ↑n
⊢ ↑m + 1 + (↑m + 1) ≤ ↑n + ↑n
state_after: no goals
Theorem: List.get_enumFrom
File: Mathlib/Data/List/Enum.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
l : List α
n : ℕ
i : Fin (enumFrom n l).length
⊢ (enumFrom n l).get i = (n + ↑i, l.get (Fin.cast ⋯ i))
state_after: no goals
Theorem: EuclideanDomain.gcd_zero_left
File: Mathlib/Algebra/EuclideanDomain/Defs.lean

tactic: rw [gcd]
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
a : R
⊢ gcd 0 a = a
state_after: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
a : R
⊢ (if a0 : 0 = 0 then a
    else
      let_fun x := ⋯;
      gcd (a % 0) 0) =
    a

tactic: exact if_pos rfl
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
a : R
⊢ (if a0 : 0 = 0 then a
    else
      let_fun x := ⋯;
      gcd (a % 0) 0) =
    a
state_after: no goals
Theorem: Pell.Solution₁.y_zpow_pos
File: Mathlib/NumberTheory/Pell.lean

tactic: lift n to ℕ using hn.le
state_before: d : ℤ
a : Solution₁ d
hax : 0 < a.x
hay : 0 < a.y
n : ℤ
hn : 0 < n
⊢ 0 < (a ^ n).y
state_after: case intro
d : ℤ
a : Solution₁ d
hax : 0 < a.x
hay : 0 < a.y
n : ℕ
hn : 0 < ↑n
⊢ 0 < (a ^ ↑n).y

tactic: norm_cast at hn ⊢
state_before: case intro
d : ℤ
a : Solution₁ d
hax : 0 < a.x
hay : 0 < a.y
n : ℕ
hn : 0 < ↑n
⊢ 0 < (a ^ ↑n).y
state_after: case intro
d : ℤ
a : Solution₁ d
hax : 0 < a.x
hay : 0 < a.y
n : ℕ
hn : 0 < n
⊢ 0 < (a ^ n).y

tactic: rw [← Nat.succ_pred_eq_of_pos hn]
state_before: case intro
d : ℤ
a : Solution₁ d
hax : 0 < a.x
hay : 0 < a.y
n : ℕ
hn : 0 < n
⊢ 0 < (a ^ n).y
state_after: case intro
d : ℤ
a : Solution₁ d
hax : 0 < a.x
hay : 0 < a.y
n : ℕ
hn : 0 < n
⊢ 0 < (a ^ n.pred.succ).y

tactic: exact y_pow_succ_pos hax hay _
state_before: case intro
d : ℤ
a : Solution₁ d
hax : 0 < a.x
hay : 0 < a.y
n : ℕ
hn : 0 < n
⊢ 0 < (a ^ n.pred.succ).y
state_after: no goals
Theorem: Set.image_mul_left
File: Mathlib/Data/Set/Pointwise/Basic.lean

tactic: rw [image_eq_preimage_of_inverse] <;> intro c <;> simp
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Group α
s t : Set α
a b : α
⊢ (fun x => a * x) '' t = (fun x => a⁻¹ * x) ⁻¹' t
state_after: no goals
Theorem: List.forall₂_take_append
File: Mathlib/Data/List/Forall2.lean

tactic: have h' : Forall₂ R (take (length l₁) l) (take (length l₁) (l₁ ++ l₂)) :=
  forall₂_take (length l₁) h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
l : List α
l₁ l₂ : List β
h : Forall₂ R l (l₁ ++ l₂)
⊢ Forall₂ R (take l₁.length l) l₁
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
l : List α
l₁ l₂ : List β
h : Forall₂ R l (l₁ ++ l₂)
h' : Forall₂ R (take l₁.length l) (take l₁.length (l₁ ++ l₂))
⊢ Forall₂ R (take l₁.length l) l₁

tactic: rwa [take_left] at h'
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
R S : α → β → Prop
P : γ → δ → Prop
Rₐ : α → α → Prop
l : List α
l₁ l₂ : List β
h : Forall₂ R l (l₁ ++ l₂)
h' : Forall₂ R (take l₁.length l) (take l₁.length (l₁ ++ l₂))
⊢ Forall₂ R (take l₁.length l) l₁
state_after: no goals
Theorem: mulLeftEmbedding_eq_mulRightEmbedding
File: Mathlib/Algebra/Group/Embedding.lean

tactic: ext
state_before: G : Type u_1
inst✝¹ : CommSemigroup G
inst✝ : IsCancelMul G
g : G
⊢ mulLeftEmbedding g = mulRightEmbedding g
state_after: case h
G : Type u_1
inst✝¹ : CommSemigroup G
inst✝ : IsCancelMul G
g x✝ : G
⊢ (mulLeftEmbedding g) x✝ = (mulRightEmbedding g) x✝

tactic: exact mul_comm _ _
state_before: case h
G : Type u_1
inst✝¹ : CommSemigroup G
inst✝ : IsCancelMul G
g x✝ : G
⊢ (mulLeftEmbedding g) x✝ = (mulRightEmbedding g) x✝
state_after: no goals
Theorem: Cubic.degree_of_d_ne_zero
File: Mathlib/Algebra/CubicDiscriminant.lean

tactic: rw [of_c_eq_zero ha hb hc, degree_C hd]
state_before: R : Type u_1
S : Type u_2
F : Type u_3
K : Type u_4
P Q : Cubic R
a b c d a' b' c' d' : R
inst✝ : Semiring R
ha : P.a = 0
hb : P.b = 0
hc : P.c = 0
hd : P.d ≠ 0
⊢ P.toPoly.degree = 0
state_after: no goals
Theorem: Complex.tan_ofReal_im
File: Mathlib/Data/Complex/Exponential.lean

tactic: rw [← ofReal_tan_ofReal_re, ofReal_im]
state_before: x✝ y : ℂ
x : ℝ
⊢ (tan ↑x).im = 0
state_after: no goals
Theorem: legendreSym.mul
File: Mathlib/NumberTheory/LegendreSymbol/Basic.lean

tactic: simp [legendreSym, Int.cast_mul, map_mul, quadraticCharFun_mul]
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
a b : ℤ
⊢ legendreSym p (a * b) = legendreSym p a * legendreSym p b
state_after: no goals
Theorem: rank_le_of_surjective_injective
File: Mathlib/LinearAlgebra/Dimension/Basic.lean

tactic: simpa only [lift_id] using lift_rank_le_of_surjective_injective i j hi hj hc
state_before: R : Type u
R' : Type u'
M M₁ : Type v
M' : Type v'
inst✝⁹ : Ring R
inst✝⁸ : Ring R'
inst✝⁷ : AddCommGroup M
inst✝⁶ : AddCommGroup M'
inst✝⁵ : AddCommGroup M₁
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M₁
inst✝¹ : Module R' M'
inst✝ : Module R' M₁
i : ZeroHom R R'
j : M →+ M₁
hi : Surjective ⇑i
hj : Injective ⇑j
hc : ∀ (r : R) (m : M), j (r • m) = i r • j m
⊢ Module.rank R M ≤ Module.rank R' M₁
state_after: no goals
Theorem: Polynomial.bernoulli_zero
File: Mathlib/NumberTheory/BernoulliPolynomials.lean

tactic: simp [bernoulli]
state_before: ⊢ bernoulli 0 = 1
state_after: no goals
Theorem: Matroid.freeOn_basis_iff
File: Mathlib/Data/Matroid/Constructions.lean

tactic: use fun h ↦ ⟨(freeOn_indep h.subset_ground).eq_of_basis h ,h.subset_ground⟩
state_before: α : Type u_1
M : Matroid α
E B I X R J : Set α
⊢ (freeOn E).Basis I X ↔ I = X ∧ X ⊆ E
state_after: case mpr
α : Type u_1
M : Matroid α
E B I X R J : Set α
⊢ I = X ∧ X ⊆ E → (freeOn E).Basis I X

tactic: rintro ⟨rfl, hIE⟩
state_before: case mpr
α : Type u_1
M : Matroid α
E B I X R J : Set α
⊢ I = X ∧ X ⊆ E → (freeOn E).Basis I X
state_after: case mpr.intro
α : Type u_1
M : Matroid α
E B I R J : Set α
hIE : I ⊆ E
⊢ (freeOn E).Basis I I

tactic: exact (freeOn_indep hIE).basis_self
state_before: case mpr.intro
α : Type u_1
M : Matroid α
E B I R J : Set α
hIE : I ⊆ E
⊢ (freeOn E).Basis I I
state_after: no goals
Theorem: HurwitzZeta.completedHurwitzZetaOdd_neg
File: Mathlib/NumberTheory/LSeries/HurwitzZetaOdd.lean

tactic: simp only [completedHurwitzZetaOdd, StrongFEPair.Λ, hurwitzOddFEPair, mellin, Function.comp_def,
  oddKernel_neg, ofReal_neg, smul_neg]
state_before: a : UnitAddCircle
s : ℂ
⊢ completedHurwitzZetaOdd (-a) s = -completedHurwitzZetaOdd a s
state_after: a : UnitAddCircle
s : ℂ
⊢ (∫ (t : ℝ) in Ioi 0, -(↑t ^ ((s + 1) / 2 - 1) • ↑(oddKernel a t))) / 2 =
    -((∫ (t : ℝ) in Ioi 0, ↑t ^ ((s + 1) / 2 - 1) • ↑(oddKernel a t)) / 2)

tactic: rw [integral_neg, neg_div]
state_before: a : UnitAddCircle
s : ℂ
⊢ (∫ (t : ℝ) in Ioi 0, -(↑t ^ ((s + 1) / 2 - 1) • ↑(oddKernel a t))) / 2 =
    -((∫ (t : ℝ) in Ioi 0, ↑t ^ ((s + 1) / 2 - 1) • ↑(oddKernel a t)) / 2)
state_after: no goals
Theorem: MvPolynomial.C_surjective
File: Mathlib/Algebra/MvPolynomial/Basic.lean

tactic: refine fun p => ⟨p.toFun 0, Finsupp.ext fun a => ?_⟩
state_before: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ✝ : Type u_1
a a' a₁ a₂ : R✝
e : ℕ
n m : σ✝
s : σ✝ →₀ ℕ
inst✝³ : CommSemiring R✝
inst✝² : CommSemiring S₁
p q : MvPolynomial σ✝ R✝
R : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : IsEmpty σ
⊢ Surjective ⇑C
state_after: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ✝ : Type u_1
a✝ a' a₁ a₂ : R✝
e : ℕ
n m : σ✝
s : σ✝ →₀ ℕ
inst✝³ : CommSemiring R✝
inst✝² : CommSemiring S₁
p✝ q : MvPolynomial σ✝ R✝
R : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : IsEmpty σ
p : MvPolynomial σ R
a : σ →₀ ℕ
⊢ (C (p.toFun 0)) a = p a

tactic: simp only [C_apply, ← single_eq_monomial, (Finsupp.ext isEmptyElim (α := σ) : a = 0),
  single_eq_same]
state_before: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ✝ : Type u_1
a✝ a' a₁ a₂ : R✝
e : ℕ
n m : σ✝
s : σ✝ →₀ ℕ
inst✝³ : CommSemiring R✝
inst✝² : CommSemiring S₁
p✝ q : MvPolynomial σ✝ R✝
R : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : IsEmpty σ
p : MvPolynomial σ R
a : σ →₀ ℕ
⊢ (C (p.toFun 0)) a = p a
state_after: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ✝ : Type u_1
a✝ a' a₁ a₂ : R✝
e : ℕ
n m : σ✝
s : σ✝ →₀ ℕ
inst✝³ : CommSemiring R✝
inst✝² : CommSemiring S₁
p✝ q : MvPolynomial σ✝ R✝
R : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : IsEmpty σ
p : MvPolynomial σ R
a : σ →₀ ℕ
⊢ p.toFun 0 = p 0

tactic: rfl
state_before: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ✝ : Type u_1
a✝ a' a₁ a₂ : R✝
e : ℕ
n m : σ✝
s : σ✝ →₀ ℕ
inst✝³ : CommSemiring R✝
inst✝² : CommSemiring S₁
p✝ q : MvPolynomial σ✝ R✝
R : Type u_2
inst✝¹ : CommSemiring R
σ : Type u_3
inst✝ : IsEmpty σ
p : MvPolynomial σ R
a : σ →₀ ℕ
⊢ p.toFun 0 = p 0
state_after: no goals
Theorem: Finset.prod_Ioi_mul_eq_prod_Ici
File: Mathlib/Algebra/BigOperators/Intervals.lean

tactic: rw [mul_comm, mul_prod_Ioi_eq_prod_Ici]
state_before: α : Type u_1
M : Type u_2
inst✝² : PartialOrder α
inst✝¹ : CommMonoid M
f : α → M
a✝ b : α
inst✝ : LocallyFiniteOrderTop α
a : α
⊢ (∏ x ∈ Ioi a, f x) * f a = ∏ x ∈ Ici a, f x
state_after: no goals
Theorem: MvPowerSeries.eq_mul_inv_iff_mul_eq
File: Mathlib/RingTheory/MvPowerSeries/Inverse.lean

tactic: simp [k, mul_assoc, MvPowerSeries.inv_mul_cancel _ h]
state_before: σ : Type u_1
R : Type u_2
k✝ : Type u_3
inst✝ : Field k✝
φ₁ φ₂ φ₃ : MvPowerSeries σ k✝
h : (constantCoeff σ k✝) φ₃ ≠ 0
k : φ₁ = φ₂ * φ₃⁻¹
⊢ φ₁ * φ₃ = φ₂
state_after: no goals

tactic: simp [← k, mul_assoc, MvPowerSeries.mul_inv_cancel _ h]
state_before: σ : Type u_1
R : Type u_2
k✝ : Type u_3
inst✝ : Field k✝
φ₁ φ₂ φ₃ : MvPowerSeries σ k✝
h : (constantCoeff σ k✝) φ₃ ≠ 0
k : φ₁ * φ₃ = φ₂
⊢ φ₁ = φ₂ * φ₃⁻¹
state_after: no goals