1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Polynomial.ne_zero_of_mem_nthRootsFinset
File: Mathlib/Algebra/Polynomial/Roots.lean

tactic: nontriviality R
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
η : R
hη : η ∈ nthRootsFinset n R
⊢ η ≠ 0
state_after: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝² : CommRing R
inst✝¹ : IsDomain R
p q : R[X]
η : R
hη : η ∈ nthRootsFinset n R
inst✝ : Nontrivial R
⊢ η ≠ 0

tactic: rintro rfl
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝² : CommRing R
inst✝¹ : IsDomain R
p q : R[X]
η : R
hη : η ∈ nthRootsFinset n R
inst✝ : Nontrivial R
⊢ η ≠ 0
state_after: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝² : CommRing R
inst✝¹ : IsDomain R
p q : R[X]
inst✝ : Nontrivial R
hη : 0 ∈ nthRootsFinset n R
⊢ False

tactic: cases n with
| zero =>
  simp only [Nat.zero_eq, nthRootsFinset_zero, not_mem_empty] at hη
| succ n =>
  rw [mem_nthRootsFinset n.succ_pos, zero_pow n.succ_ne_zero] at hη
  exact zero_ne_one hη
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝² : CommRing R
inst✝¹ : IsDomain R
p q : R[X]
inst✝ : Nontrivial R
hη : 0 ∈ nthRootsFinset n R
⊢ False
state_after: no goals

tactic: simp only [Nat.zero_eq, nthRootsFinset_zero, not_mem_empty] at hη
state_before: case zero
R : Type u
S : Type v
T : Type w
a b : R
inst✝² : CommRing R
inst✝¹ : IsDomain R
p q : R[X]
inst✝ : Nontrivial R
hη : 0 ∈ nthRootsFinset 0 R
⊢ False
state_after: no goals

tactic: rw [mem_nthRootsFinset n.succ_pos, zero_pow n.succ_ne_zero] at hη
state_before: case succ
R : Type u
S : Type v
T : Type w
a b : R
inst✝² : CommRing R
inst✝¹ : IsDomain R
p q : R[X]
inst✝ : Nontrivial R
n : ℕ
hη : 0 ∈ nthRootsFinset (n + 1) R
⊢ False
state_after: case succ
R : Type u
S : Type v
T : Type w
a b : R
inst✝² : CommRing R
inst✝¹ : IsDomain R
p q : R[X]
inst✝ : Nontrivial R
n : ℕ
hη : 0 = 1
⊢ False

tactic: exact zero_ne_one hη
state_before: case succ
R : Type u
S : Type v
T : Type w
a b : R
inst✝² : CommRing R
inst✝¹ : IsDomain R
p q : R[X]
inst✝ : Nontrivial R
n : ℕ
hη : 0 = 1
⊢ False
state_after: no goals
Theorem: quasispectrum.isCompact
File: Mathlib/Analysis/NormedSpace/Spectrum.lean

tactic: rw [Unitization.quasispectrum_eq_spectrum_inr' 𝕜 𝕜,
  ← AlgEquiv.spectrum_eq (WithLp.unitizationAlgEquiv 𝕜).symm (a : Unitization 𝕜 B)]
state_before: 𝕜 : Type u_1
A : Type u_2
inst✝⁹ : NormedField 𝕜
inst✝⁸ : NormedRing A
inst✝⁷ : NormedAlgebra 𝕜 A
inst✝⁶ : CompleteSpace A
B : Type u_3
inst✝⁵ : NonUnitalNormedRing B
inst✝⁴ : NormedSpace 𝕜 B
inst✝³ : CompleteSpace B
inst✝² : IsScalarTower 𝕜 B B
inst✝¹ : SMulCommClass 𝕜 B B
inst✝ : ProperSpace 𝕜
a : B
⊢ IsCompact (quasispectrum 𝕜 a)
state_after: 𝕜 : Type u_1
A : Type u_2
inst✝⁹ : NormedField 𝕜
inst✝⁸ : NormedRing A
inst✝⁷ : NormedAlgebra 𝕜 A
inst✝⁶ : CompleteSpace A
B : Type u_3
inst✝⁵ : NonUnitalNormedRing B
inst✝⁴ : NormedSpace 𝕜 B
inst✝³ : CompleteSpace B
inst✝² : IsScalarTower 𝕜 B B
inst✝¹ : SMulCommClass 𝕜 B B
inst✝ : ProperSpace 𝕜
a : B
⊢ IsCompact (σ ((WithLp.unitizationAlgEquiv 𝕜).symm ↑a))

tactic: exact spectrum.isCompact _
state_before: 𝕜 : Type u_1
A : Type u_2
inst✝⁹ : NormedField 𝕜
inst✝⁸ : NormedRing A
inst✝⁷ : NormedAlgebra 𝕜 A
inst✝⁶ : CompleteSpace A
B : Type u_3
inst✝⁵ : NonUnitalNormedRing B
inst✝⁴ : NormedSpace 𝕜 B
inst✝³ : CompleteSpace B
inst✝² : IsScalarTower 𝕜 B B
inst✝¹ : SMulCommClass 𝕜 B B
inst✝ : ProperSpace 𝕜
a : B
⊢ IsCompact (σ ((WithLp.unitizationAlgEquiv 𝕜).symm ↑a))
state_after: no goals
Theorem: Complex.tan_eq_zero_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean

tactic: rw [tan, div_eq_zero_iff, ← mul_eq_zero, ← mul_right_inj' two_ne_zero, mul_zero,
  ← mul_assoc, ← sin_two_mul, sin_eq_zero_iff]
state_before: θ : ℂ
⊢ tan θ = 0 ↔ ∃ k, ↑k * ↑π / 2 = θ
state_after: θ : ℂ
⊢ (∃ k, 2 * θ = ↑k * ↑π) ↔ ∃ k, ↑k * ↑π / 2 = θ

tactic: field_simp [mul_comm, eq_comm]
state_before: θ : ℂ
⊢ (∃ k, 2 * θ = ↑k * ↑π) ↔ ∃ k, ↑k * ↑π / 2 = θ
state_after: no goals
Theorem: Polynomial.zero_scaleRoots
File: Mathlib/RingTheory/Polynomial/ScaleRoots.lean

tactic: ext
state_before: R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
s : R
⊢ scaleRoots 0 s = 0
state_after: case a
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
s : R
n✝ : ℕ
⊢ (scaleRoots 0 s).coeff n✝ = coeff 0 n✝

tactic: simp
state_before: case a
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
s : R
n✝ : ℕ
⊢ (scaleRoots 0 s).coeff n✝ = coeff 0 n✝
state_after: no goals
Theorem: CategoryTheory.Pretriangulated.comp_distTriang_mor_zero₃₁
File: Mathlib/CategoryTheory/Triangulated/Pretriangulated.lean

tactic: have H₂ := rot_of_distTriang T.rotate (rot_of_distTriang T H)
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
H : T ∈ distinguishedTriangles
⊢ T.mor₃ ≫ (shiftFunctor C 1).map T.mor₁ = 0
state_after: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
H : T ∈ distinguishedTriangles
H₂ : T.rotate.rotate ∈ distinguishedTriangles
⊢ T.mor₃ ≫ (shiftFunctor C 1).map T.mor₁ = 0

tactic: simpa using comp_distTriang_mor_zero₁₂ T.rotate.rotate H₂
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
H : T ∈ distinguishedTriangles
H₂ : T.rotate.rotate ∈ distinguishedTriangles
⊢ T.mor₃ ≫ (shiftFunctor C 1).map T.mor₁ = 0
state_after: no goals
Theorem: Fin.nat_find_mem_find
File: Mathlib/Data/Fin/Tuple/Basic.lean

tactic: let ⟨i, hin, hi⟩ := h
state_before: m n : ℕ
p : Fin n → Prop
inst✝ : DecidablePred p
h : ∃ i, ∃ (hin : i < n), p ⟨i, hin⟩
⊢ ⟨Nat.find h, ⋯⟩ ∈ find p
state_after: m n : ℕ
p : Fin n → Prop
inst✝ : DecidablePred p
h : ∃ i, ∃ (hin : i < n), p ⟨i, hin⟩
i : ℕ
hin : i < n
hi : p ⟨i, hin⟩
⊢ ⟨Nat.find ⋯, ⋯⟩ ∈ find p

tactic: cases' hf : find p with f
state_before: m n : ℕ
p : Fin n → Prop
inst✝ : DecidablePred p
h : ∃ i, ∃ (hin : i < n), p ⟨i, hin⟩
i : ℕ
hin : i < n
hi : p ⟨i, hin⟩
⊢ ⟨Nat.find ⋯, ⋯⟩ ∈ find p
state_after: case none
m n : ℕ
p : Fin n → Prop
inst✝ : DecidablePred p
h : ∃ i, ∃ (hin : i < n), p ⟨i, hin⟩
i : ℕ
hin : i < n
hi : p ⟨i, hin⟩
hf : find p = none
⊢ ⟨Nat.find ⋯, ⋯⟩ ∈ none

case some
m n : ℕ
p : Fin n → Prop
inst✝ : DecidablePred p
h : ∃ i, ∃ (hin : i < n), p ⟨i, hin⟩
i : ℕ
hin : i < n
hi : p ⟨i, hin⟩
f : Fin n
hf : find p = some f
⊢ ⟨Nat.find ⋯, ⋯⟩ ∈ some f

tactic: rw [find_eq_none_iff] at hf
state_before: case none
m n : ℕ
p : Fin n → Prop
inst✝ : DecidablePred p
h : ∃ i, ∃ (hin : i < n), p ⟨i, hin⟩
i : ℕ
hin : i < n
hi : p ⟨i, hin⟩
hf : find p = none
⊢ ⟨Nat.find ⋯, ⋯⟩ ∈ none
state_after: case none
m n : ℕ
p : Fin n → Prop
inst✝ : DecidablePred p
h : ∃ i, ∃ (hin : i < n), p ⟨i, hin⟩
i : ℕ
hin : i < n
hi : p ⟨i, hin⟩
hf : ∀ (i : Fin n), ¬p i
⊢ ⟨Nat.find ⋯, ⋯⟩ ∈ none

tactic: exact (hf ⟨i, hin⟩ hi).elim
state_before: case none
m n : ℕ
p : Fin n → Prop
inst✝ : DecidablePred p
h : ∃ i, ∃ (hin : i < n), p ⟨i, hin⟩
i : ℕ
hin : i < n
hi : p ⟨i, hin⟩
hf : ∀ (i : Fin n), ¬p i
⊢ ⟨Nat.find ⋯, ⋯⟩ ∈ none
state_after: no goals

tactic: refine Option.some_inj.2 (le_antisymm ?_ ?_)
state_before: case some
m n : ℕ
p : Fin n → Prop
inst✝ : DecidablePred p
h : ∃ i, ∃ (hin : i < n), p ⟨i, hin⟩
i : ℕ
hin : i < n
hi : p ⟨i, hin⟩
f : Fin n
hf : find p = some f
⊢ ⟨Nat.find ⋯, ⋯⟩ ∈ some f
state_after: case some.refine_1
m n : ℕ
p : Fin n → Prop
inst✝ : DecidablePred p
h : ∃ i, ∃ (hin : i < n), p ⟨i, hin⟩
i : ℕ
hin : i < n
hi : p ⟨i, hin⟩
f : Fin n
hf : find p = some f
⊢ f ≤ ⟨Nat.find ⋯, ⋯⟩

case some.refine_2
m n : ℕ
p : Fin n → Prop
inst✝ : DecidablePred p
h : ∃ i, ∃ (hin : i < n), p ⟨i, hin⟩
i : ℕ
hin : i < n
hi : p ⟨i, hin⟩
f : Fin n
hf : find p = some f
⊢ ⟨Nat.find ⋯, ⋯⟩ ≤ f

tactic: exact find_min' hf (Nat.find_spec h).snd
state_before: case some.refine_1
m n : ℕ
p : Fin n → Prop
inst✝ : DecidablePred p
h : ∃ i, ∃ (hin : i < n), p ⟨i, hin⟩
i : ℕ
hin : i < n
hi : p ⟨i, hin⟩
f : Fin n
hf : find p = some f
⊢ f ≤ ⟨Nat.find ⋯, ⋯⟩
state_after: no goals

tactic: exact Nat.find_min' _ ⟨f.2, by convert find_spec p hf⟩
state_before: case some.refine_2
m n : ℕ
p : Fin n → Prop
inst✝ : DecidablePred p
h : ∃ i, ∃ (hin : i < n), p ⟨i, hin⟩
i : ℕ
hin : i < n
hi : p ⟨i, hin⟩
f : Fin n
hf : find p = some f
⊢ ⟨Nat.find ⋯, ⋯⟩ ≤ f
state_after: no goals

tactic: convert find_spec p hf
state_before: m n : ℕ
p : Fin n → Prop
inst✝ : DecidablePred p
h : ∃ i, ∃ (hin : i < n), p ⟨i, hin⟩
i : ℕ
hin : i < n
hi : p ⟨i, hin⟩
f : Fin n
hf : find p = some f
⊢ p ⟨↑f, ⋯⟩
state_after: no goals
Theorem: Matroid.dual_base_iff'
File: Mathlib/Data/Matroid/Dual.lean

tactic: rw [dual_base_iff, and_iff_left h]
state_before: α : Type u_1
M : Matroid α
I B X : Set α
h : B ⊆ M.E
⊢ M✶.Base B ↔ M.Base (M.E \ B) ∧ B ⊆ M.E
state_after: no goals
Theorem: Real.cos_sq
File: Mathlib/Data/Complex/Exponential.lean

tactic: simp [cos_sq]
state_before: x y : ℝ
⊢ ↑(cos x ^ 2) = ↑(1 / 2 + cos (2 * x) / 2)
state_after: no goals
Theorem: WeierstrassCurve.Jacobian.Point.toAffine_neg
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

tactic: by_cases hPz : P z = 0
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
hP : W.Nonsingular P
⊢ toAffine W (W.neg P) = -toAffine W P
state_after: case pos
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
hP : W.Nonsingular P
hPz : P z = 0
⊢ toAffine W (W.neg P) = -toAffine W P

case neg
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
hP : W.Nonsingular P
hPz : ¬P z = 0
⊢ toAffine W (W.neg P) = -toAffine W P

tactic: rw [neg_of_Z_eq_zero hP hPz,
  toAffine_smul _ ((isUnit_Y_of_Z_eq_zero hP hPz).div <| isUnit_X_of_Z_eq_zero hP hPz).neg,
  toAffine_zero, toAffine_of_Z_eq_zero hPz, Affine.Point.neg_zero]
state_before: case pos
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
hP : W.Nonsingular P
hPz : P z = 0
⊢ toAffine W (W.neg P) = -toAffine W P
state_after: no goals

tactic: rw [neg_of_Z_ne_zero hPz, toAffine_smul _ <| Ne.isUnit hPz, toAffine_some <|
    (nonsingular_smul _ <| Ne.isUnit hPz).mp <| neg_of_Z_ne_zero hPz ▸ nonsingular_neg hP,
  toAffine_of_Z_ne_zero hP hPz, Affine.Point.neg_some]
state_before: case neg
R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P : Fin 3 → F
hP : W.Nonsingular P
hPz : ¬P z = 0
⊢ toAffine W (W.neg P) = -toAffine W P
state_after: no goals
Theorem: Filter.tendsto_atTop_add_left_of_le'
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: simpa
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : OrderedAddCommGroup β
l : Filter α
f g : α → β
C : β
hf : ∀ᶠ (x : α) in l, C ≤ f x
hg : Tendsto g l atTop
⊢ ∀ᶠ (x : α) in l, (fun x => -f x) x ≤ -C
state_after: no goals

tactic: simpa
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : OrderedAddCommGroup β
l : Filter α
f g : α → β
C : β
hf : ∀ᶠ (x : α) in l, C ≤ f x
hg : Tendsto g l atTop
⊢ Tendsto (fun x => (fun x => -f x) x + (fun x => f x + g x) x) l atTop
state_after: no goals
Theorem: CategoryTheory.ShortComplex.SnakeInput.L₀X₂ToP_comp_pullback_snd
File: Mathlib/Algebra/Homology/ShortComplex/SnakeLemma.lean

tactic: simp
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
S : SnakeInput C
⊢ S.L₀X₂ToP ≫ pullback.snd = S.L₀.g
state_after: no goals
Theorem: WithBot.bot_mul
File: Mathlib/Algebra/Order/Ring/WithTop.lean

tactic: rw [bot_mul', if_neg hb]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b : WithBot α
hb : b ≠ 0
⊢ ⊥ * b = ⊥
state_after: no goals
Theorem: PNat.Prime.ne_one
File: Mathlib/Data/PNat/Prime.lean

tactic: intro pp
state_before: p : ℕ+
⊢ p.Prime → p ≠ 1
state_after: p : ℕ+
pp : p.Prime
⊢ p ≠ 1

tactic: intro contra
state_before: p : ℕ+
pp : p.Prime
⊢ p ≠ 1
state_after: p : ℕ+
pp : p.Prime
contra : p = 1
⊢ False

tactic: apply Nat.Prime.ne_one pp
state_before: p : ℕ+
pp : p.Prime
contra : p = 1
⊢ False
state_after: p : ℕ+
pp : p.Prime
contra : p = 1
⊢ ↑p = 1

tactic: rw [PNat.coe_eq_one_iff]
state_before: p : ℕ+
pp : p.Prime
contra : p = 1
⊢ ↑p = 1
state_after: p : ℕ+
pp : p.Prime
contra : p = 1
⊢ p = 1

tactic: apply contra
state_before: p : ℕ+
pp : p.Prime
contra : p = 1
⊢ p = 1
state_after: no goals
Theorem: Pi.isCompl_iff
File: Mathlib/Order/PropInstances.lean

tactic: simp_rw [_root_.isCompl_iff, disjoint_iff, codisjoint_iff, forall_and]
state_before: ι : Type u_1
α' : ι → Type u_2
inst✝¹ : (i : ι) → PartialOrder (α' i)
inst✝ : (i : ι) → BoundedOrder (α' i)
f g : (i : ι) → α' i
⊢ IsCompl f g ↔ ∀ (i : ι), IsCompl (f i) (g i)
state_after: no goals
Theorem: Real.rpow_inv_le_iff_of_pos
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: rw [← rpow_le_rpow_iff _ hy hz, rpow_inv_rpow] <;> positivity
state_before: x y z : ℝ
n : ℕ
hx : 0 ≤ x
hy : 0 ≤ y
hz : 0 < z
⊢ x ^ z⁻¹ ≤ y ↔ x ≤ y ^ z
state_after: no goals
Theorem: Polynomial.toFinsupp_sub
File: Mathlib/Algebra/Polynomial/Basic.lean

tactic: rw [sub_eq_add_neg, ← toFinsupp_neg, ← toFinsupp_add]
state_before: R✝ : Type u
a✝ b✝ : R✝
m n : ℕ
inst✝¹ : Semiring R✝
p q : R✝[X]
R : Type u
inst✝ : Ring R
a b : R[X]
⊢ (a - b).toFinsupp = a.toFinsupp - b.toFinsupp
state_after: R✝ : Type u
a✝ b✝ : R✝
m n : ℕ
inst✝¹ : Semiring R✝
p q : R✝[X]
R : Type u
inst✝ : Ring R
a b : R[X]
⊢ (a - b).toFinsupp = (a + -b).toFinsupp

tactic: rfl
state_before: R✝ : Type u
a✝ b✝ : R✝
m n : ℕ
inst✝¹ : Semiring R✝
p q : R✝[X]
R : Type u
inst✝ : Ring R
a b : R[X]
⊢ (a - b).toFinsupp = (a + -b).toFinsupp
state_after: no goals
Theorem: norm_add_sq_real
File: Mathlib/Analysis/InnerProductSpace/Basic.lean

tactic: have h := @norm_add_sq ℝ _ _ _ _ x y
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : _root_.RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
x y : F
⊢ ‖x + y‖ ^ 2 = ‖x‖ ^ 2 + 2 * ⟪x, y⟫_ℝ + ‖y‖ ^ 2
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : _root_.RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
x y : F
h : ‖x + y‖ ^ 2 = ‖x‖ ^ 2 + 2 * re ⟪x, y⟫_ℝ + ‖y‖ ^ 2
⊢ ‖x + y‖ ^ 2 = ‖x‖ ^ 2 + 2 * ⟪x, y⟫_ℝ + ‖y‖ ^ 2

tactic: simpa using h
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : _root_.RCLike 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
x y : F
h : ‖x + y‖ ^ 2 = ‖x‖ ^ 2 + 2 * re ⟪x, y⟫_ℝ + ‖y‖ ^ 2
⊢ ‖x + y‖ ^ 2 = ‖x‖ ^ 2 + 2 * ⟪x, y⟫_ℝ + ‖y‖ ^ 2
state_after: no goals
Theorem: DualNumber.algHom_ext'
File: Mathlib/Algebra/DualNumber.lean

tactic: ext a
state_before: R : Type u_1
A✝ : Type u_2
B : Type u_3
A : Type u_4
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f g : A[ε] →ₐ[R] B
hinl : f.comp (inlAlgHom R A A) = g.comp (inlAlgHom R A A)
hinr :
  f.toLinearMap ∘ₗ ↑R (LinearMap.toSpanSingleton A A[ε] ε) = g.toLinearMap ∘ₗ ↑R (LinearMap.toSpanSingleton A A[ε] ε)
⊢ f.toLinearMap ∘ₗ ↑R (inrHom A A) = g.toLinearMap ∘ₗ ↑R (inrHom A A)
state_after: case h
R : Type u_1
A✝ : Type u_2
B : Type u_3
A : Type u_4
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f g : A[ε] →ₐ[R] B
hinl : f.comp (inlAlgHom R A A) = g.comp (inlAlgHom R A A)
hinr :
  f.toLinearMap ∘ₗ ↑R (LinearMap.toSpanSingleton A A[ε] ε) = g.toLinearMap ∘ₗ ↑R (LinearMap.toSpanSingleton A A[ε] ε)
a : A
⊢ (f.toLinearMap ∘ₗ ↑R (inrHom A A)) a = (g.toLinearMap ∘ₗ ↑R (inrHom A A)) a

tactic: show f (inr a) = g (inr a)
state_before: case h
R : Type u_1
A✝ : Type u_2
B : Type u_3
A : Type u_4
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f g : A[ε] →ₐ[R] B
hinl : f.comp (inlAlgHom R A A) = g.comp (inlAlgHom R A A)
hinr :
  f.toLinearMap ∘ₗ ↑R (LinearMap.toSpanSingleton A A[ε] ε) = g.toLinearMap ∘ₗ ↑R (LinearMap.toSpanSingleton A A[ε] ε)
a : A
⊢ (f.toLinearMap ∘ₗ ↑R (inrHom A A)) a = (g.toLinearMap ∘ₗ ↑R (inrHom A A)) a
state_after: case h
R : Type u_1
A✝ : Type u_2
B : Type u_3
A : Type u_4
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f g : A[ε] →ₐ[R] B
hinl : f.comp (inlAlgHom R A A) = g.comp (inlAlgHom R A A)
hinr :
  f.toLinearMap ∘ₗ ↑R (LinearMap.toSpanSingleton A A[ε] ε) = g.toLinearMap ∘ₗ ↑R (LinearMap.toSpanSingleton A A[ε] ε)
a : A
⊢ f (inr a) = g (inr a)

tactic: simpa only [inr_eq_smul_eps] using DFunLike.congr_fun hinr a
state_before: case h
R : Type u_1
A✝ : Type u_2
B : Type u_3
A : Type u_4
inst✝⁴ : CommSemiring R
inst✝³ : Semiring A
inst✝² : Semiring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f g : A[ε] →ₐ[R] B
hinl : f.comp (inlAlgHom R A A) = g.comp (inlAlgHom R A A)
hinr :
  f.toLinearMap ∘ₗ ↑R (LinearMap.toSpanSingleton A A[ε] ε) = g.toLinearMap ∘ₗ ↑R (LinearMap.toSpanSingleton A A[ε] ε)
a : A
⊢ f (inr a) = g (inr a)
state_after: no goals
Theorem: CochainComplex.mk_d_2_0
File: Mathlib/Algebra/Homology/HomologicalComplex.lean

tactic: change ite (2 = 1 + 1) (d₁ ≫ 𝟙 X₂) 0 = d₁
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
X₀ X₁ X₂ : V
d₀ : X₀ ⟶ X₁
d₁ : X₁ ⟶ X₂
s : d₀ ≫ d₁ = 0
succ : (S : ShortComplex V) → (X₄ : V) ×' (d₂ : S.X₃ ⟶ X₄) ×' S.g ≫ d₂ = 0
⊢ (mk X₀ X₁ X₂ d₀ d₁ s succ).d 1 2 = d₁
state_after: ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
X₀ X₁ X₂ : V
d₀ : X₀ ⟶ X₁
d₁ : X₁ ⟶ X₂
s : d₀ ≫ d₁ = 0
succ : (S : ShortComplex V) → (X₄ : V) ×' (d₂ : S.X₃ ⟶ X₄) ×' S.g ≫ d₂ = 0
⊢ (if 2 = 1 + 1 then d₁ ≫ 𝟙 X₂ else 0) = d₁

tactic: rw [if_pos rfl, Category.comp_id]
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
X₀ X₁ X₂ : V
d₀ : X₀ ⟶ X₁
d₁ : X₁ ⟶ X₂
s : d₀ ≫ d₁ = 0
succ : (S : ShortComplex V) → (X₄ : V) ×' (d₂ : S.X₃ ⟶ X₄) ×' S.g ≫ d₂ = 0
⊢ (if 2 = 1 + 1 then d₁ ≫ 𝟙 X₂ else 0) = d₁
state_after: no goals
Theorem: Polynomial.leadingCoeff_comp
File: Mathlib/Algebra/Polynomial/Degree/Lemmas.lean

tactic: rw [← coeff_comp_degree_mul_degree hq, ← natDegree_comp, coeff_natDegree]
state_before: R : Type u
S : Type v
ι : Type w
a✝ b : R
m n : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroDivisors R
p q : R[X]
a : R
hq : q.natDegree ≠ 0
⊢ (p.comp q).leadingCoeff = p.leadingCoeff * q.leadingCoeff ^ p.natDegree
state_after: no goals
Theorem: Profinite.NobelingProof.coe_πs
File: Mathlib/Topology/Category/Profinite/Nobeling.lean

tactic: rfl
state_before: I : Type u
inst✝¹ : LinearOrder I
inst✝ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
o : Ordinal.{u}
f : LocallyConstant ↑(π C fun x => ord I x < o) ℤ
⊢ ⇑((πs C o) f) = ⇑f ∘ ProjRestrict C fun x => ord I x < o
state_after: no goals
Theorem: PiTensorProduct.projectiveSeminorm_tprod_le
File: Mathlib/Analysis/NormedSpace/PiTensorProduct/ProjectiveSeminorm.lean

tactic: rw [projectiveSeminorm_apply]
state_before: ι : Type uι
inst✝⁵ : Fintype ι
𝕜 : Type u𝕜
inst✝⁴ : NontriviallyNormedField 𝕜
E : ι → Type uE
inst✝³ : (i : ι) → SeminormedAddCommGroup (E i)
inst✝² : (i : ι) → NormedSpace 𝕜 (E i)
F : Type uF
inst✝¹ : SeminormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
m : (i : ι) → E i
⊢ projectiveSeminorm (⨂ₜ[𝕜] (i : ι), m i) ≤ ∏ i : ι, ‖m i‖
state_after: ι : Type uι
inst✝⁵ : Fintype ι
𝕜 : Type u𝕜
inst✝⁴ : NontriviallyNormedField 𝕜
E : ι → Type uE
inst✝³ : (i : ι) → SeminormedAddCommGroup (E i)
inst✝² : (i : ι) → NormedSpace 𝕜 (E i)
F : Type uF
inst✝¹ : SeminormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
m : (i : ι) → E i
⊢ ⨅ p, projectiveSeminormAux ↑p ≤ ∏ i : ι, ‖m i‖

tactic: convert ciInf_le (bddBelow_projectiveSemiNormAux _) ⟨[((1 : 𝕜), m)] ,?_⟩
state_before: ι : Type uι
inst✝⁵ : Fintype ι
𝕜 : Type u𝕜
inst✝⁴ : NontriviallyNormedField 𝕜
E : ι → Type uE
inst✝³ : (i : ι) → SeminormedAddCommGroup (E i)
inst✝² : (i : ι) → NormedSpace 𝕜 (E i)
F : Type uF
inst✝¹ : SeminormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
m : (i : ι) → E i
⊢ ⨅ p, projectiveSeminormAux ↑p ≤ ∏ i : ι, ‖m i‖
state_after: case h.e'_4
ι : Type uι
inst✝⁵ : Fintype ι
𝕜 : Type u𝕜
inst✝⁴ : NontriviallyNormedField 𝕜
E : ι → Type uE
inst✝³ : (i : ι) → SeminormedAddCommGroup (E i)
inst✝² : (i : ι) → NormedSpace 𝕜 (E i)
F : Type uF
inst✝¹ : SeminormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
m : (i : ι) → E i
⊢ ∏ i : ι, ‖m i‖ = projectiveSeminormAux ↑⟨[(1, m)], ?convert_2⟩

case convert_2
ι : Type uι
inst✝⁵ : Fintype ι
𝕜 : Type u𝕜
inst✝⁴ : NontriviallyNormedField 𝕜
E : ι → Type uE
inst✝³ : (i : ι) → SeminormedAddCommGroup (E i)
inst✝² : (i : ι) → NormedSpace 𝕜 (E i)
F : Type uF
inst✝¹ : SeminormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
m : (i : ι) → E i
⊢ [(1, m)] ∈ (⨂ₜ[𝕜] (i : ι), m i).lifts

tactic: simp only [projectiveSeminormAux, Function.comp_apply, List.map_cons, norm_one, one_mul,
List.map_nil, List.sum_cons, List.sum_nil, add_zero]
state_before: case h.e'_4
ι : Type uι
inst✝⁵ : Fintype ι
𝕜 : Type u𝕜
inst✝⁴ : NontriviallyNormedField 𝕜
E : ι → Type uE
inst✝³ : (i : ι) → SeminormedAddCommGroup (E i)
inst✝² : (i : ι) → NormedSpace 𝕜 (E i)
F : Type uF
inst✝¹ : SeminormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
m : (i : ι) → E i
⊢ ∏ i : ι, ‖m i‖ = projectiveSeminormAux ↑⟨[(1, m)], ?convert_2⟩
state_after: no goals

tactic: rw [mem_lifts_iff, List.map_singleton, List.sum_singleton, one_smul]
state_before: case convert_2
ι : Type uι
inst✝⁵ : Fintype ι
𝕜 : Type u𝕜
inst✝⁴ : NontriviallyNormedField 𝕜
E : ι → Type uE
inst✝³ : (i : ι) → SeminormedAddCommGroup (E i)
inst✝² : (i : ι) → NormedSpace 𝕜 (E i)
F : Type uF
inst✝¹ : SeminormedAddCommGroup F
inst✝ : NormedSpace 𝕜 F
m : (i : ι) → E i
⊢ [(1, m)] ∈ (⨂ₜ[𝕜] (i : ι), m i).lifts
state_after: no goals
Theorem: IsLeftRegular.mul_left_eq_zero_iff
File: Mathlib/Algebra/Regular/Basic.lean

tactic: nth_rw 1 [← mul_zero b]
state_before: R : Type u_1
inst✝ : MulZeroClass R
a b : R
hb : IsLeftRegular b
⊢ b * a = 0 ↔ a = 0
state_after: R : Type u_1
inst✝ : MulZeroClass R
a b : R
hb : IsLeftRegular b
⊢ b * a = b * 0 ↔ a = 0

tactic: exact ⟨fun h ↦ hb h, fun ha ↦ by rw [ha]⟩
state_before: R : Type u_1
inst✝ : MulZeroClass R
a b : R
hb : IsLeftRegular b
⊢ b * a = b * 0 ↔ a = 0
state_after: no goals

tactic: rw [ha]
state_before: R : Type u_1
inst✝ : MulZeroClass R
a b : R
hb : IsLeftRegular b
ha : a = 0
⊢ b * a = b * 0
state_after: no goals
Theorem: Filter.Tendsto.uniformity_trans
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: refine le_trans (le_lift'.2 fun s hs => mem_map.2 ?_) comp_le_uniformity
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
l : Filter β
f₁ f₂ f₃ : β → α
h₁₂ : Tendsto (fun x => (f₁ x, f₂ x)) l (𝓤 α)
h₂₃ : Tendsto (fun x => (f₂ x, f₃ x)) l (𝓤 α)
⊢ Tendsto (fun x => (f₁ x, f₃ x)) l (𝓤 α)
state_after: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
l : Filter β
f₁ f₂ f₃ : β → α
h₁₂ : Tendsto (fun x => (f₁ x, f₂ x)) l (𝓤 α)
h₂₃ : Tendsto (fun x => (f₂ x, f₃ x)) l (𝓤 α)
s : Set (α × α)
hs : s ∈ 𝓤 α
⊢ (fun x => (f₁ x, f₃ x)) ⁻¹' (s ○ s) ∈ l

tactic: filter_upwards [mem_map.1 (h₁₂ hs), mem_map.1 (h₂₃ hs)] with x hx₁₂ hx₂₃ using ⟨_, hx₁₂, hx₂₃⟩
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
l : Filter β
f₁ f₂ f₃ : β → α
h₁₂ : Tendsto (fun x => (f₁ x, f₂ x)) l (𝓤 α)
h₂₃ : Tendsto (fun x => (f₂ x, f₃ x)) l (𝓤 α)
s : Set (α × α)
hs : s ∈ 𝓤 α
⊢ (fun x => (f₁ x, f₃ x)) ⁻¹' (s ○ s) ∈ l
state_after: no goals