1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Polynomial.dickson_of_two_le
File: Mathlib/RingTheory/Polynomial/Dickson.lean

tactic: obtain ⟨n, rfl⟩ := Nat.exists_eq_add_of_le h
state_before: R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
k : ℕ
a : R
n : ℕ
h : 2 ≤ n
⊢ dickson k a n = X * dickson k a (n - 1) - C a * dickson k a (n - 2)
state_after: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
k : ℕ
a : R
n : ℕ
h : 2 ≤ 2 + n
⊢ dickson k a (2 + n) = X * dickson k a (2 + n - 1) - C a * dickson k a (2 + n - 2)

tactic: rw [add_comm]
state_before: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
k : ℕ
a : R
n : ℕ
h : 2 ≤ 2 + n
⊢ dickson k a (2 + n) = X * dickson k a (2 + n - 1) - C a * dickson k a (2 + n - 2)
state_after: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
k : ℕ
a : R
n : ℕ
h : 2 ≤ 2 + n
⊢ dickson k a (n + 2) = X * dickson k a (n + 2 - 1) - C a * dickson k a (n + 2 - 2)

tactic: exact dickson_add_two k a n
state_before: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommRing R
inst✝ : CommRing S
k : ℕ
a : R
n : ℕ
h : 2 ≤ 2 + n
⊢ dickson k a (n + 2) = X * dickson k a (n + 2 - 1) - C a * dickson k a (n + 2 - 2)
state_after: no goals
Theorem: AkraBazziRecurrence.continuous_sumCoeffsExp
File: Mathlib/Computability/AkraBazzi/AkraBazzi.lean

tactic: refine continuous_finset_sum Finset.univ fun i _ => Continuous.mul (by continuity) ?_
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
⊢ Continuous fun p => ∑ i : α, a i * b i ^ p
state_after: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
i : α
x✝ : i ∈ univ
⊢ Continuous (HPow.hPow (b i))

tactic: exact Continuous.rpow continuous_const continuous_id (fun x => Or.inl (ne_of_gt (R.b_pos i)))
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
i : α
x✝ : i ∈ univ
⊢ Continuous (HPow.hPow (b i))
state_after: no goals

tactic: continuity
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : Nonempty α
T : ℕ → ℝ
g : ℝ → ℝ
a b : α → ℝ
r : α → ℕ → ℕ
R : AkraBazziRecurrence T g a b r
i : α
x✝ : i ∈ univ
⊢ Continuous fun p => a i
state_after: no goals
Theorem: IsCyclotomicExtension.Rat.discr_prime_pow'
File: Mathlib/NumberTheory/Cyclotomic/Rat.lean

tactic: rw [← discr_prime_pow hζ (cyclotomic.irreducible_rat (p ^ k).pos)]
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {p ^ k} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ k)
⊢ Algebra.discr ℚ ⇑(IsPrimitiveRoot.subOnePowerBasis ℚ hζ).basis =
    (-1) ^ (φ (↑p ^ k) / 2) * ↑↑p ^ (↑p ^ (k - 1) * ((↑p - 1) * k - 1))
state_after: p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {p ^ k} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ k)
⊢ Algebra.discr ℚ ⇑(IsPrimitiveRoot.subOnePowerBasis ℚ hζ).basis =
    Algebra.discr ℚ ⇑(IsPrimitiveRoot.powerBasis ℚ hζ).basis

tactic: exact hζ.discr_zeta_eq_discr_zeta_sub_one.symm
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {p ^ k} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ k)
⊢ Algebra.discr ℚ ⇑(IsPrimitiveRoot.subOnePowerBasis ℚ hζ).basis =
    Algebra.discr ℚ ⇑(IsPrimitiveRoot.powerBasis ℚ hζ).basis
state_after: no goals
Theorem: Nat.not_dvd_iff_between_consec_multiples
File: Mathlib/Data/Nat/Defs.lean

tactic: refine
  ⟨fun ⟨k, hk1, hk2⟩ => not_dvd_of_between_consec_multiples hk1 hk2, fun han =>
    ⟨n / a, ⟨lt_of_le_of_ne (mul_div_le n a) ?_, lt_mul_div_succ _ ha⟩⟩⟩
state_before: a✝ b c d m n✝ k : ℕ
p q : ℕ → Prop
n a : ℕ
ha : 0 < a
⊢ (∃ k, a * k < n ∧ n < a * (k + 1)) ↔ ¬a ∣ n
state_after: a✝ b c d m n✝ k : ℕ
p q : ℕ → Prop
n a : ℕ
ha : 0 < a
han : ¬a ∣ n
⊢ a * (n / a) ≠ n
Theorem: Nat.ModEq.add
File: Mathlib/Data/Nat/ModEq.lean

tactic: rw [modEq_iff_dvd, Int.ofNat_add, Int.ofNat_add, add_sub_add_comm]
state_before: m n a b c d : ℕ
h₁ : a ≡ b [MOD n]
h₂ : c ≡ d [MOD n]
⊢ a + c ≡ b + d [MOD n]
state_after: m n a b c d : ℕ
h₁ : a ≡ b [MOD n]
h₂ : c ≡ d [MOD n]
⊢ ↑n ∣ ↑b - ↑a + (↑d - ↑c)

tactic: exact dvd_add h₁.dvd h₂.dvd
state_before: m n a b c d : ℕ
h₁ : a ≡ b [MOD n]
h₂ : c ≡ d [MOD n]
⊢ ↑n ∣ ↑b - ↑a + (↑d - ↑c)
state_after: no goals
Theorem: Rack.self_act_eq_iff_eq
File: Mathlib/Algebra/Quandle.lean

tactic: constructor
state_before: R : Type u_1
inst✝ : Rack R
x y : R
⊢ x ◃ x = y ◃ y ↔ x = y
state_after: case mp
R : Type u_1
inst✝ : Rack R
x y : R
⊢ x ◃ x = y ◃ y → x = y

case mpr
R : Type u_1
inst✝ : Rack R
x y : R
⊢ x = y → x ◃ x = y ◃ y

tactic: swap
state_before: case mp
R : Type u_1
inst✝ : Rack R
x y : R
⊢ x ◃ x = y ◃ y → x = y

case mpr
R : Type u_1
inst✝ : Rack R
x y : R
⊢ x = y → x ◃ x = y ◃ y
state_after: case mpr
R : Type u_1
inst✝ : Rack R
x y : R
⊢ x = y → x ◃ x = y ◃ y

case mp
R : Type u_1
inst✝ : Rack R
x y : R
⊢ x ◃ x = y ◃ y → x = y

tactic: intro h
state_before: case mp
R : Type u_1
inst✝ : Rack R
x y : R
⊢ x ◃ x = y ◃ y → x = y
state_after: case mp
R : Type u_1
inst✝ : Rack R
x y : R
h : x ◃ x = y ◃ y
⊢ x = y

tactic: trans (x ◃ x) ◃⁻¹ x ◃ x
state_before: case mp
R : Type u_1
inst✝ : Rack R
x y : R
h : x ◃ x = y ◃ y
⊢ x = y
state_after: R : Type u_1
inst✝ : Rack R
x y : R
h : x ◃ x = y ◃ y
⊢ x = (x ◃ x) ◃⁻¹ x ◃ x

R : Type u_1
inst✝ : Rack R
x y : R
h : x ◃ x = y ◃ y
⊢ (x ◃ x) ◃⁻¹ x ◃ x = y

tactic: rintro rfl
state_before: case mpr
R : Type u_1
inst✝ : Rack R
x y : R
⊢ x = y → x ◃ x = y ◃ y
state_after: case mpr
R : Type u_1
inst✝ : Rack R
x : R
⊢ x ◃ x = x ◃ x

tactic: rfl
state_before: case mpr
R : Type u_1
inst✝ : Rack R
x : R
⊢ x ◃ x = x ◃ x
state_after: no goals

tactic: rw [← left_cancel (x ◃ x), right_inv, self_act_act_eq]
state_before: R : Type u_1
inst✝ : Rack R
x y : R
h : x ◃ x = y ◃ y
⊢ x = (x ◃ x) ◃⁻¹ x ◃ x
state_after: no goals

tactic: rw [h, ← left_cancel (y ◃ y), right_inv, self_act_act_eq]
state_before: R : Type u_1
inst✝ : Rack R
x y : R
h : x ◃ x = y ◃ y
⊢ (x ◃ x) ◃⁻¹ x ◃ x = y
state_after: no goals
Theorem: CategoryTheory.shiftFunctorComm_eq_refl
File: Mathlib/CategoryTheory/Shift/Basic.lean

tactic: rw [shiftFunctorComm_eq C i i (i + i) rfl, Iso.symm_self_id]
state_before: C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddCommMonoid A
inst✝ : HasShift C A
i : A
⊢ shiftFunctorComm C i i = Iso.refl (shiftFunctor C i ⋙ shiftFunctor C i)
state_after: no goals
Theorem: SimpleGraph.Walk.getVert_of_length_le
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: rfl
state_before: case nil
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u✝ : V
i : ℕ
hi : nil.length ≤ i
⊢ nil.getVert i = u✝
state_after: no goals

tactic: cases i
state_before: case cons
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u✝ v✝ w✝ : V
h✝ : G.Adj u✝ v✝
p✝ : G.Walk v✝ w✝
ih : ∀ {i : ℕ}, p✝.length ≤ i → p✝.getVert i = w✝
i : ℕ
hi : (cons h✝ p✝).length ≤ i
⊢ (cons h✝ p✝).getVert i = w✝
state_after: case cons.zero
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u✝ v✝ w✝ : V
h✝ : G.Adj u✝ v✝
p✝ : G.Walk v✝ w✝
ih : ∀ {i : ℕ}, p✝.length ≤ i → p✝.getVert i = w✝
hi : (cons h✝ p✝).length ≤ 0
⊢ (cons h✝ p✝).getVert 0 = w✝

case cons.succ
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u✝ v✝ w✝ : V
h✝ : G.Adj u✝ v✝
p✝ : G.Walk v✝ w✝
ih : ∀ {i : ℕ}, p✝.length ≤ i → p✝.getVert i = w✝
n✝ : ℕ
hi : (cons h✝ p✝).length ≤ n✝ + 1
⊢ (cons h✝ p✝).getVert (n✝ + 1) = w✝

tactic: cases hi
state_before: case cons.zero
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u✝ v✝ w✝ : V
h✝ : G.Adj u✝ v✝
p✝ : G.Walk v✝ w✝
ih : ∀ {i : ℕ}, p✝.length ≤ i → p✝.getVert i = w✝
hi : (cons h✝ p✝).length ≤ 0
⊢ (cons h✝ p✝).getVert 0 = w✝
state_after: no goals

tactic: exact ih (Nat.succ_le_succ_iff.1 hi)
state_before: case cons.succ
V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u✝ v✝ w✝ : V
h✝ : G.Adj u✝ v✝
p✝ : G.Walk v✝ w✝
ih : ∀ {i : ℕ}, p✝.length ≤ i → p✝.getVert i = w✝
n✝ : ℕ
hi : (cons h✝ p✝).length ≤ n✝ + 1
⊢ (cons h✝ p✝).getVert (n✝ + 1) = w✝
state_after: no goals
Theorem: Submodule.basisOfPid_bot
File: Mathlib/LinearAlgebra/FreeModule/PID.lean

tactic: obtain ⟨n, b'⟩ := Submodule.basisOfPid b ⊥
state_before: ι✝ : Type u_1
R : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsPrincipalIdealRing R
M : Type u_3
inst✝² : AddCommGroup M
inst✝¹ : Module R M
b✝ : ι✝ → M
ι : Type u_4
inst✝ : Finite ι
b : Basis ι R M
⊢ basisOfPid b ⊥ = ⟨0, Basis.empty ↥⊥⟩
state_after: case mk
ι✝ : Type u_1
R : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsPrincipalIdealRing R
M : Type u_3
inst✝² : AddCommGroup M
inst✝¹ : Module R M
b✝ : ι✝ → M
ι : Type u_4
inst✝ : Finite ι
b : Basis ι R M
n : ℕ
b' : Basis (Fin n) R ↥⊥
⊢ ⟨n, b'⟩ = ⟨0, Basis.empty ↥⊥⟩

tactic: let e : Fin n ≃ Fin 0 := b'.indexEquiv (Basis.empty _ : Basis (Fin 0) R (⊥ : Submodule R M))
state_before: case mk
ι✝ : Type u_1
R : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsPrincipalIdealRing R
M : Type u_3
inst✝² : AddCommGroup M
inst✝¹ : Module R M
b✝ : ι✝ → M
ι : Type u_4
inst✝ : Finite ι
b : Basis ι R M
n : ℕ
b' : Basis (Fin n) R ↥⊥
⊢ ⟨n, b'⟩ = ⟨0, Basis.empty ↥⊥⟩
state_after: case mk
ι✝ : Type u_1
R : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsPrincipalIdealRing R
M : Type u_3
inst✝² : AddCommGroup M
inst✝¹ : Module R M
b✝ : ι✝ → M
ι : Type u_4
inst✝ : Finite ι
b : Basis ι R M
n : ℕ
b' : Basis (Fin n) R ↥⊥
e : Fin n ≃ Fin 0 := b'.indexEquiv (Basis.empty ↥⊥)
⊢ ⟨n, b'⟩ = ⟨0, Basis.empty ↥⊥⟩

tactic: obtain rfl : n = 0 := by simpa using Fintype.card_eq.mpr ⟨e⟩
state_before: case mk
ι✝ : Type u_1
R : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsPrincipalIdealRing R
M : Type u_3
inst✝² : AddCommGroup M
inst✝¹ : Module R M
b✝ : ι✝ → M
ι : Type u_4
inst✝ : Finite ι
b : Basis ι R M
n : ℕ
b' : Basis (Fin n) R ↥⊥
e : Fin n ≃ Fin 0 := b'.indexEquiv (Basis.empty ↥⊥)
⊢ ⟨n, b'⟩ = ⟨0, Basis.empty ↥⊥⟩
state_after: case mk
ι✝ : Type u_1
R : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsPrincipalIdealRing R
M : Type u_3
inst✝² : AddCommGroup M
inst✝¹ : Module R M
b✝ : ι✝ → M
ι : Type u_4
inst✝ : Finite ι
b : Basis ι R M
b' : Basis (Fin 0) R ↥⊥
e : Fin 0 ≃ Fin 0 := b'.indexEquiv (Basis.empty ↥⊥)
⊢ ⟨0, b'⟩ = ⟨0, Basis.empty ↥⊥⟩

tactic: exact Sigma.eq rfl (Basis.eq_of_apply_eq <| finZeroElim)
state_before: case mk
ι✝ : Type u_1
R : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsPrincipalIdealRing R
M : Type u_3
inst✝² : AddCommGroup M
inst✝¹ : Module R M
b✝ : ι✝ → M
ι : Type u_4
inst✝ : Finite ι
b : Basis ι R M
b' : Basis (Fin 0) R ↥⊥
e : Fin 0 ≃ Fin 0 := b'.indexEquiv (Basis.empty ↥⊥)
⊢ ⟨0, b'⟩ = ⟨0, Basis.empty ↥⊥⟩
state_after: no goals

tactic: simpa using Fintype.card_eq.mpr ⟨e⟩
state_before: ι✝ : Type u_1
R : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsPrincipalIdealRing R
M : Type u_3
inst✝² : AddCommGroup M
inst✝¹ : Module R M
b✝ : ι✝ → M
ι : Type u_4
inst✝ : Finite ι
b : Basis ι R M
n : ℕ
b' : Basis (Fin n) R ↥⊥
e : Fin n ≃ Fin 0 := b'.indexEquiv (Basis.empty ↥⊥)
⊢ n = 0
state_after: no goals
Theorem: mem_residual_iff
File: Mathlib/Topology/GDelta.lean

tactic: simp_rw [subset_def, mem_setOf, forall_and, and_assoc]
state_before: X : Type u_1
Y : Type u_2
ι : Type u_3
ι' : Sort u_4
inst✝ : TopologicalSpace X
s : Set X
⊢ (∃ S ⊆ {t | IsOpen t ∧ Dense t}, S.Countable ∧ ⋂₀ S ⊆ s) ↔
    ∃ S, (∀ t ∈ S, IsOpen t) ∧ (∀ t ∈ S, Dense t) ∧ S.Countable ∧ ⋂₀ S ⊆ s
state_after: no goals
Theorem: GaussianInt.sq_add_sq_of_nat_prime_of_not_irreducible
File: Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean

tactic: rw [norm_natCast, Int.natAbs_mul, mul_eq_one]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
hpi : ¬Irreducible ↑p
⊢ ¬(norm ↑p).natAbs = 1
state_after: p : ℕ
hp : Fact (Nat.Prime p)
hpi : ¬Irreducible ↑p
⊢ ¬((↑p).natAbs = 1 ∧ (↑p).natAbs = 1)

tactic: exact fun h => (ne_of_lt hp.1.one_lt).symm h.1
state_before: p : ℕ
hp : Fact (Nat.Prime p)
hpi : ¬Irreducible ↑p
⊢ ¬((↑p).natAbs = 1 ∧ (↑p).natAbs = 1)
state_after: no goals

tactic: simpa only [true_and, not_false_iff, exists_prop, irreducible_iff, hpu, not_forall, not_or]
  using hpi
state_before: p : ℕ
hp : Fact (Nat.Prime p)
hpi : ¬Irreducible ↑p
hpu : ¬IsUnit ↑p
⊢ ∃ a b, ↑p = a * b ∧ ¬IsUnit a ∧ ¬IsUnit b
state_after: no goals

tactic: rw [← Int.natCast_inj, Int.natCast_pow, sq, ← @norm_natCast (-1), hpab]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
hpi : ¬Irreducible ↑p
hpu : ¬IsUnit ↑p
hab : ∃ a b, ↑p = a * b ∧ ¬IsUnit a ∧ ¬IsUnit b
a b : ℤ[i]
hpab : ↑p = a * b
hau : ¬IsUnit a
hbu : ¬IsUnit b
⊢ (norm a).natAbs * (norm b).natAbs = p ^ 2
state_after: p : ℕ
hp : Fact (Nat.Prime p)
hpi : ¬Irreducible ↑p
hpu : ¬IsUnit ↑p
hab : ∃ a b, ↑p = a * b ∧ ¬IsUnit a ∧ ¬IsUnit b
a b : ℤ[i]
hpab : ↑p = a * b
hau : ¬IsUnit a
hbu : ¬IsUnit b
⊢ ↑((norm a).natAbs * (norm b).natAbs) = norm (a * b)

tactic: simp
state_before: p : ℕ
hp : Fact (Nat.Prime p)
hpi : ¬Irreducible ↑p
hpu : ¬IsUnit ↑p
hab : ∃ a b, ↑p = a * b ∧ ¬IsUnit a ∧ ¬IsUnit b
a b : ℤ[i]
hpab : ↑p = a * b
hau : ¬IsUnit a
hbu : ¬IsUnit b
⊢ ↑((norm a).natAbs * (norm b).natAbs) = norm (a * b)
state_after: no goals

tactic: simpa [natAbs_norm_eq, sq] using hnap
state_before: p : ℕ
hp : Fact (Nat.Prime p)
hpi : ¬Irreducible ↑p
hpu : ¬IsUnit ↑p
hab : ∃ a b, ↑p = a * b ∧ ¬IsUnit a ∧ ¬IsUnit b
a b : ℤ[i]
hpab : ↑p = a * b
hau : ¬IsUnit a
hbu : ¬IsUnit b
hnap : (norm a).natAbs = p
⊢ a.re.natAbs ^ 2 + a.im.natAbs ^ 2 = p
state_after: no goals
Theorem: Finset.fin_mono
File: Mathlib/Data/Finset/Image.lean

tactic: simpa using @h x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
n : ℕ
s t : Finset ℕ
h : s ≤ t
x : Fin n
⊢ x ∈ Finset.fin n s → x ∈ Finset.fin n t
state_after: no goals
Theorem: List.IsPrefix.get_eq
File: Mathlib/Data/List/Infix.lean

tactic: simp only [get_eq_getElem, IsPrefix.getElem h hn]
state_before: α : Type u_1
β : Type u_2
l l₁ l₂ l₃ : List α
a b : α
m n✝ : ℕ
x y : List α
h : x <+: y
n : ℕ
hn : n < x.length
⊢ x.get ⟨n, hn⟩ = y.get ⟨n, ⋯⟩
state_after: no goals
Theorem: Polynomial.monic_normalize
File: Mathlib/Algebra/Polynomial/FieldDivision.lean

tactic: rw [Ne, ← leadingCoeff_eq_zero, ← Ne, ← isUnit_iff_ne_zero] at hp0
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝¹ : Field R
p q : R[X]
inst✝ : DecidableEq R
hp0 : p ≠ 0
⊢ (normalize p).Monic
state_after: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝¹ : Field R
p q : R[X]
inst✝ : DecidableEq R
hp0 : IsUnit p.leadingCoeff
⊢ (normalize p).Monic

tactic: rw [Monic, leadingCoeff_normalize, normalize_eq_one]
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝¹ : Field R
p q : R[X]
inst✝ : DecidableEq R
hp0 : IsUnit p.leadingCoeff
⊢ (normalize p).Monic
state_after: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝¹ : Field R
p q : R[X]
inst✝ : DecidableEq R
hp0 : IsUnit p.leadingCoeff
⊢ IsUnit p.leadingCoeff

tactic: apply hp0
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝¹ : Field R
p q : R[X]
inst✝ : DecidableEq R
hp0 : IsUnit p.leadingCoeff
⊢ IsUnit p.leadingCoeff
state_after: no goals
Theorem: dite_dite_distrib_right
File: Mathlib/Logic/Lemmas.lean

tactic: split_ifs <;> rfl
state_before: α : Sort u_1
p q r : Prop
inst✝¹ : Decidable p
inst✝ : Decidable q
a✝ b✝ c✝ : α
a : p → q → α
b : p → ¬q → α
c : ¬p → α
⊢ dite p (fun hp => dite q (a hp) (b hp)) c =
    if hq : q then dite p (fun hp => a hp hq) c else dite p (fun hp => b hp hq) c
state_after: no goals
Theorem: InnerProductSpace.Core.inner_self_ofReal_re
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: norm_num [ext_iff, inner_self_im]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝² : _root_.RCLike 𝕜
inst✝¹ : AddCommGroup F
inst✝ : Module 𝕜 F
c : Core 𝕜 F
x : F
⊢ ↑(re ⟪x, x⟫_𝕜) = ⟪x, x⟫_𝕜
state_after: no goals
Theorem: CategoryTheory.Functor.preservesMonomorphisms.of_iso
File: Mathlib/CategoryTheory/Functor/EpiMono.lean

tactic: haveI : Mono (F.map f ≫ (α.app Y).hom) := mono_comp _ _
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
E : Type u₃
inst✝¹ : Category.{v₃, u₃} E
F G : C ⥤ D
inst✝ : F.PreservesMonomorphisms
α : F ≅ G
X Y : C
f : X ⟶ Y
h : Mono f
⊢ Mono (G.map f)
state_after: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
E : Type u₃
inst✝¹ : Category.{v₃, u₃} E
F G : C ⥤ D
inst✝ : F.PreservesMonomorphisms
α : F ≅ G
X Y : C
f : X ⟶ Y
h : Mono f
this : Mono (F.map f ≫ (α.app Y).hom)
⊢ Mono (G.map f)

tactic: convert (mono_comp _ _ : Mono ((α.app X).inv ≫ F.map f ≫ (α.app Y).hom))
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
E : Type u₃
inst✝¹ : Category.{v₃, u₃} E
F G : C ⥤ D
inst✝ : F.PreservesMonomorphisms
α : F ≅ G
X Y : C
f : X ⟶ Y
h : Mono f
this : Mono (F.map f ≫ (α.app Y).hom)
⊢ Mono (G.map f)
state_after: case h.e'_5
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
E : Type u₃
inst✝¹ : Category.{v₃, u₃} E
F G : C ⥤ D
inst✝ : F.PreservesMonomorphisms
α : F ≅ G
X Y : C
f : X ⟶ Y
h : Mono f
this : Mono (F.map f ≫ (α.app Y).hom)
⊢ G.map f = (α.app X).inv ≫ F.map f ≫ (α.app Y).hom

tactic: rw [Iso.eq_inv_comp, Iso.app_hom, Iso.app_hom, NatTrans.naturality]
state_before: case h.e'_5
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
E : Type u₃
inst✝¹ : Category.{v₃, u₃} E
F G : C ⥤ D
inst✝ : F.PreservesMonomorphisms
α : F ≅ G
X Y : C
f : X ⟶ Y
h : Mono f
this : Mono (F.map f ≫ (α.app Y).hom)
⊢ G.map f = (α.app X).inv ≫ F.map f ≫ (α.app Y).hom
state_after: no goals
Theorem: Finset.card_eq_two
File: Mathlib/Data/Finset/Card.lean

tactic: constructor
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
⊢ s.card = 2 ↔ ∃ x y, x ≠ y ∧ s = {x, y}
state_after: case mp
α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
⊢ s.card = 2 → ∃ x y, x ≠ y ∧ s = {x, y}

case mpr
α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
⊢ (∃ x y, x ≠ y ∧ s = {x, y}) → s.card = 2

tactic: rw [card_eq_succ]
state_before: case mp
α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
⊢ s.card = 2 → ∃ x y, x ≠ y ∧ s = {x, y}
state_after: case mp
α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
⊢ (∃ a t, a ∉ t ∧ insert a t = s ∧ t.card = 1) → ∃ x y, x ≠ y ∧ s = {x, y}

tactic: simp_rw [card_eq_one]
state_before: case mp
α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
⊢ (∃ a t, a ∉ t ∧ insert a t = s ∧ t.card = 1) → ∃ x y, x ≠ y ∧ s = {x, y}
state_after: case mp
α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
⊢ (∃ a t, a ∉ t ∧ insert a t = s ∧ ∃ a, t = {a}) → ∃ x y, x ≠ y ∧ s = {x, y}

tactic: rintro ⟨a, _, hab, rfl, b, rfl⟩
state_before: case mp
α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
⊢ (∃ a t, a ∉ t ∧ insert a t = s ∧ ∃ a, t = {a}) → ∃ x y, x ≠ y ∧ s = {x, y}
state_after: case mp.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
R : Type u_3
t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
a b : α
hab : a ∉ {b}
⊢ ∃ x y, x ≠ y ∧ {a, b} = {x, y}

tactic: exact ⟨a, b, not_mem_singleton.1 hab, rfl⟩
state_before: case mp.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
R : Type u_3
t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
a b : α
hab : a ∉ {b}
⊢ ∃ x y, x ≠ y ∧ {a, b} = {x, y}
state_after: no goals

tactic: rintro ⟨x, y, h, rfl⟩
state_before: case mpr
α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
⊢ (∃ x y, x ≠ y ∧ s = {x, y}) → s.card = 2
state_after: case mpr.intro.intro.intro
α : Type u_1
β : Type u_2
R : Type u_3
t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
x y : α
h : x ≠ y
⊢ {x, y}.card = 2

tactic: exact card_pair h
state_before: case mpr.intro.intro.intro
α : Type u_1
β : Type u_2
R : Type u_3
t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
x y : α
h : x ≠ y
⊢ {x, y}.card = 2
state_after: no goals
Theorem: ZNum.of_intCast
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [← cast_to_int, to_of_int]
state_before: α : Type u_1
inst✝ : AddGroupWithOne α
n : ℤ
⊢ ↑↑n = ↑n
state_after: no goals
Theorem: Finset.Nat.prod_antidiagonal_subst
File: Mathlib/Algebra/BigOperators/NatAntidiagonal.lean

tactic: rw [mem_antidiagonal.mp hp]
state_before: M : Type u_1
N : Type u_2
inst✝¹ : CommMonoid M
inst✝ : AddCommMonoid N
n : ℕ
f : ℕ × ℕ → ℕ → M
p : ℕ × ℕ
hp : p ∈ antidiagonal n
⊢ f p n = f p (p.1 + p.2)
state_after: no goals
Theorem: Ideal.Polynomial.isJacobson_polynomial_iff_isJacobson
File: Mathlib/RingTheory/Jacobson.lean

tactic: refine ⟨?_, isJacobson_polynomial_of_isJacobson⟩
state_before: R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : IsDomain S
Rₘ : Type u_3
Sₘ : Type u_4
inst✝¹ : CommRing Rₘ
inst✝ : CommRing Sₘ
⊢ IsJacobson R[X] ↔ IsJacobson R
state_after: R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : IsDomain S
Rₘ : Type u_3
Sₘ : Type u_4
inst✝¹ : CommRing Rₘ
inst✝ : CommRing Sₘ
⊢ IsJacobson R[X] → IsJacobson R

tactic: intro H
state_before: R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : IsDomain S
Rₘ : Type u_3
Sₘ : Type u_4
inst✝¹ : CommRing Rₘ
inst✝ : CommRing Sₘ
⊢ IsJacobson R[X] → IsJacobson R
state_after: R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : IsDomain S
Rₘ : Type u_3
Sₘ : Type u_4
inst✝¹ : CommRing Rₘ
inst✝ : CommRing Sₘ
H : IsJacobson R[X]
⊢ IsJacobson R

tactic: exact isJacobson_of_surjective ⟨eval₂RingHom (RingHom.id _) 1, fun x =>
  ⟨C x, by simp only [coe_eval₂RingHom, RingHom.id_apply, eval₂_C]⟩⟩
state_before: R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : IsDomain S
Rₘ : Type u_3
Sₘ : Type u_4
inst✝¹ : CommRing Rₘ
inst✝ : CommRing Sₘ
H : IsJacobson R[X]
⊢ IsJacobson R
state_after: no goals

tactic: simp only [coe_eval₂RingHom, RingHom.id_apply, eval₂_C]
state_before: R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : CommRing S
inst✝² : IsDomain S
Rₘ : Type u_3
Sₘ : Type u_4
inst✝¹ : CommRing Rₘ
inst✝ : CommRing Sₘ
H : IsJacobson R[X]
x : R
⊢ (eval₂RingHom (RingHom.id R) 1) (C x) = x
state_after: no goals
Theorem: WeierstrassCurve.coeff_ΨSq_ne_zero
File: Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Degree.lean

tactic: rwa [coeff_ΨSq, pow_ne_zero_iff two_ne_zero]
state_before: R : Type u
inst✝¹ : CommRing R
W : WeierstrassCurve R
inst✝ : NoZeroDivisors R
n : ℤ
h : ↑n ≠ 0
⊢ (W.ΨSq n).coeff (n.natAbs ^ 2 - 1) ≠ 0
state_after: no goals
Theorem: PowerSeries.eq_shift_mul_X_add_const
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: ext (_ | n)
state_before: R : Type u_1
inst✝ : Semiring R
φ : R⟦X⟧
⊢ φ = (mk fun p => (coeff R (p + 1)) φ) * X + (C R) ((constantCoeff R) φ)
state_after: case h.zero
R : Type u_1
inst✝ : Semiring R
φ : R⟦X⟧
⊢ (coeff R 0) φ = (coeff R 0) ((mk fun p => (coeff R (p + 1)) φ) * X + (C R) ((constantCoeff R) φ))

case h.succ
R : Type u_1
inst✝ : Semiring R
φ : R⟦X⟧
n : ℕ
⊢ (coeff R (n + 1)) φ = (coeff R (n + 1)) ((mk fun p => (coeff R (p + 1)) φ) * X + (C R) ((constantCoeff R) φ))

tactic: simp only [Nat.zero_eq, coeff_zero_eq_constantCoeff, map_add, map_mul, constantCoeff_X,
  mul_zero, coeff_zero_C, zero_add]
state_before: case h.zero
R : Type u_1
inst✝ : Semiring R
φ : R⟦X⟧
⊢ (coeff R 0) φ = (coeff R 0) ((mk fun p => (coeff R (p + 1)) φ) * X + (C R) ((constantCoeff R) φ))
state_after: no goals

tactic: simp only [coeff_succ_mul_X, coeff_mk, LinearMap.map_add, coeff_C, n.succ_ne_zero, sub_zero,
  if_false, add_zero]
state_before: case h.succ
R : Type u_1
inst✝ : Semiring R
φ : R⟦X⟧
n : ℕ
⊢ (coeff R (n + 1)) φ = (coeff R (n + 1)) ((mk fun p => (coeff R (p + 1)) φ) * X + (C R) ((constantCoeff R) φ))
state_after: no goals