tasksource/leandojo huggingface dataset:
Theorem: LaurentPolynomial.degree_eq_bot_iff
File: Mathlib/Data/Polynomial/Laurent.lean

tactic: refine' ⟨fun h => _, fun h => by rw [h, degree_zero]⟩
state_before: R : Type u_1
inst✝ : Semiring R
f : R[T;T⁻¹]
⊢ degree f = ⊥ ↔ f = 0

tactic: rw [degree, Finset.max_eq_sup_withBot] at h
state_before: R : Type u_1
inst✝ : Semiring R
f : R[T;T⁻¹]
h : degree f = ⊥
⊢ f = 0

tactic: ext n
state_before: R : Type u_1
inst✝ : Semiring R
f : R[T;T⁻¹]
h : Finset.sup f.support WithBot.some = ⊥
⊢ f = 0

tactic: refine' not_not.mp fun f0 => _
state_before: case h
R : Type u_1
inst✝ : Semiring R
f : R[T;T⁻¹]
h : Finset.sup f.support WithBot.some = ⊥
n : ℤ
⊢ ↑f n = ↑0 n

tactic: simp_rw [Finset.sup_eq_bot_iff, Finsupp.mem_support_iff, Ne.def, WithBot.coe_ne_bot] at h
state_before: case h
R : Type u_1
inst✝ : Semiring R
f : R[T;T⁻¹]
h : Finset.sup f.support WithBot.some = ⊥
n : ℤ
f0 : ¬↑f n = ↑0 n
⊢ False

tactic: exact h n f0
state_before: case h
R : Type u_1
inst✝ : Semiring R
f : R[T;T⁻¹]
n : ℤ
f0 : ¬↑f n = ↑0 n
h : ∀ (s : ℤ), ¬↑f s = 0 → False
⊢ False

tactic: rw [h, degree_zero]
state_before: R : Type u_1
inst✝ : Semiring R
f : R[T;T⁻¹]
h : f = 0
⊢ degree f = ⊥
Theorem: BoxIntegral.Prepartition.le_biUnion_iff
File: Mathlib/Analysis/BoxIntegral/Partition/Basic.lean

tactic: refine' ⟨fun H => ⟨H.trans (π.biUnion_le πi), fun J hJ => _⟩, _⟩
state_before: ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
π' : Prepartition I
⊢ π' ≤ biUnion π πi ↔ π' ≤ π ∧ ∀ (J : Box ι), J ∈ π → restrict π' J ≤ πi J

tactic: rw [← π.restrict_biUnion πi hJ]
state_before: case refine'_1
ι : Type u_1
I J✝ J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
π' : Prepartition I
H : π' ≤ biUnion π πi
J : Box ι
hJ : J ∈ π
⊢ restrict π' J ≤ πi J

tactic: exact restrict_mono H
state_before: case refine'_1
ι : Type u_1
I J✝ J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
π' : Prepartition I
H : π' ≤ biUnion π πi
J : Box ι
hJ : J ∈ π
⊢ restrict π' J ≤ restrict (biUnion π πi) J

tactic: rintro ⟨H, Hi⟩ J' hJ'
state_before: case refine'_2
ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
π' : Prepartition I
⊢ (π' ≤ π ∧ ∀ (J : Box ι), J ∈ π → restrict π' J ≤ πi J) → π' ≤ biUnion π πi

tactic: rcases H hJ' with ⟨J, hJ, hle⟩
state_before: case refine'_2.intro
ι : Type u_1
I J J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
π' : Prepartition I
H : π' ≤ π
Hi : ∀ (J : Box ι), J ∈ π → restrict π' J ≤ πi J
J' : Box ι
hJ' : J' ∈ π'
⊢ ∃ I', I' ∈ biUnion π πi ∧ J' ≤ I'

tactic: have : J' ∈ π'.restrict J :=
  π'.mem_restrict.2 ⟨J', hJ', (inf_of_le_right <| WithBot.coe_le_coe.2 hle).symm⟩
state_before: case refine'_2.intro.intro.intro
ι : Type u_1
I J✝ J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
π' : Prepartition I
H : π' ≤ π
Hi : ∀ (J : Box ι), J ∈ π → restrict π' J ≤ πi J
J' : Box ι
hJ' : J' ∈ π'
J : Box ι
hJ : J ∈ π
hle : J' ≤ J
⊢ ∃ I', I' ∈ biUnion π πi ∧ J' ≤ I'

tactic: rcases Hi J hJ this with ⟨Ji, hJi, hlei⟩
state_before: case refine'_2.intro.intro.intro
ι : Type u_1
I J✝ J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
π' : Prepartition I
H : π' ≤ π
Hi : ∀ (J : Box ι), J ∈ π → restrict π' J ≤ πi J
J' : Box ι
hJ' : J' ∈ π'
J : Box ι
hJ : J ∈ π
hle : J' ≤ J
this : J' ∈ restrict π' J
⊢ ∃ I', I' ∈ biUnion π πi ∧ J' ≤ I'

tactic: exact ⟨Ji, π.mem_biUnion.2 ⟨J, hJ, hJi⟩, hlei⟩
state_before: case refine'_2.intro.intro.intro.intro.intro
ι : Type u_1
I J✝ J₁ J₂ : Box ι
π π₁ π₂ : Prepartition I
x : ι → ℝ
πi✝ πi₁ πi₂ πi : (J : Box ι) → Prepartition J
π' : Prepartition I
H : π' ≤ π
Hi : ∀ (J : Box ι), J ∈ π → restrict π' J ≤ πi J
J' : Box ι
hJ' : J' ∈ π'
J : Box ι
hJ : J ∈ π
hle : J' ≤ J
this : J' ∈ restrict π' J
Ji : Box ι
hJi : Ji ∈ πi J
hlei : J' ≤ Ji
⊢ ∃ I', I' ∈ biUnion π πi ∧ J' ≤ I'
Theorem: Polynomial.Chebyshev.T_real_cos
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Chebyshev.lean

tactic: exact_mod_cast T_complex_cos θ n
state_before: R : Type ?u.111481
A : Type ?u.111484
inst✝² : CommRing R
inst✝¹ : CommRing A
inst✝ : Algebra R A
θ : ℝ
n : ℕ
⊢ eval (cos θ) (T ℝ n) = cos (↑n * θ)
Theorem: Ordnode.Valid'.rotateL_lemma₂
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: linarith
state_before: α : Type ?u.308464
inst✝ : Preorder α
a b c : ℕ
H3 : 2 * (b + c) ≤ 9 * a + 3
h : b < 2 * c
⊢ b < 3 * a + 1
Theorem: MvPolynomial.eval₂_pow
File: Mathlib/Data/MvPolynomial/Basic.lean

tactic: rw [pow_zero, pow_zero]
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
f : R →+* S₁
g : σ → S₁
p : MvPolynomial σ R
⊢ eval₂ f g (p ^ 0) = eval₂ f g p ^ 0

tactic: exact eval₂_one _ _
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
f : R →+* S₁
g : σ → S₁
p : MvPolynomial σ R
⊢ eval₂ f g 1 = 1

tactic: rw [pow_add, pow_one, pow_add, pow_one, eval₂_mul, eval₂_pow]
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
f : R →+* S₁
g : σ → S₁
p : MvPolynomial σ R
n : ℕ
⊢ eval₂ f g (p ^ (n + 1)) = eval₂ f g p ^ (n + 1)
Theorem: MeasureTheory.AEDisjoint.union_left_iff
File: Mathlib/MeasureTheory/Measure/AEDisjoint.lean

tactic: simp [union_eq_iUnion, and_comm]
state_before: ι : Type ?u.6644
α : Type u_1
m : MeasurableSpace α
μ : Measure α
s t u v : Set α
⊢ AEDisjoint μ (s ∪ t) u ↔ AEDisjoint μ s u ∧ AEDisjoint μ t u
Theorem: Lean.Data.AC.Context.eq_of_norm
File: src/lean/Init/Data/AC.lean

tactic: have h := congrArg (evalList α ctx) (eq_of_beq h)
state_before: α : Sort u_1
ctx : Context α
a b : Expr
h : (norm ctx a == norm ctx b) = true
⊢ eval α ctx a = eval α ctx b

tactic: rw [eval_norm, eval_norm] at h
state_before: α : Sort u_1
ctx : Context α
a b : Expr
h✝ : (norm ctx a == norm ctx b) = true
h : evalList α ctx (norm ctx a) = evalList α ctx (norm ctx b)
⊢ eval α ctx a = eval α ctx b

tactic: assumption
state_before: α : Sort u_1
ctx : Context α
a b : Expr
h✝ : (norm ctx a == norm ctx b) = true
h : eval α ctx a = eval α ctx b
⊢ eval α ctx a = eval α ctx b
Theorem: IsROrC.norm_sq_re_conj_add
File: Mathlib/Data/IsROrC/Basic.lean

tactic: rw [add_comm, norm_sq_re_add_conj]
state_before: K : Type u_1
E : Type ?u.7115686
inst✝ : IsROrC K
x : K
⊢ ‖↑(starRingEnd K) x + x‖ ^ 2 = ↑re (↑(starRingEnd K) x + x) ^ 2
Theorem: List.Perm.inter_left
File: Mathlib/Data/List/Perm.lean

tactic: simpa using p.mem_iff
state_before: α : Type uu
β : Type vv
l₁ l₂ : List α
inst✝ : DecidableEq α
l t₁ t₂ : List α
p : t₁ ~ t₂
a : α
x✝ : a ∈ l
⊢ decide (a ∈ t₁) = true ↔ decide (a ∈ t₂) = true
Theorem: Polynomial.abs_isBoundedUnder_iff
File: Mathlib/Analysis/SpecialFunctions/Polynomials.lean

tactic: refine' ⟨fun h => _, fun h => ⟨|P.coeff 0|, eventually_map.mpr (eventually_of_forall
  (forall_imp (fun _ => le_of_eq) fun x => congr_arg abs <| _root_.trans (congr_arg (eval x)
  (eq_C_of_degree_le_zero h)) eval_C))⟩⟩
state_before: 𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
⊢ (IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => abs (eval x P)) ↔ degree P ≤ 0

tactic: contrapose! h
state_before: 𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
h : IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => abs (eval x P)
⊢ degree P ≤ 0

tactic: exact not_isBoundedUnder_of_tendsto_atTop (abs_tendsto_atTop P h)
state_before: 𝕜 : Type u_1
inst✝¹ : NormedLinearOrderedField 𝕜
P Q : 𝕜[X]
inst✝ : OrderTopology 𝕜
h : 0 < degree P
⊢ ¬IsBoundedUnder (fun x x_1 => x ≤ x_1) atTop fun x => abs (eval x P)
Theorem: Zsqrtd.sqLe_add_mixed
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: simpa [mul_comm, mul_left_comm] using mul_le_mul xy zw (Nat.zero_le _) (Nat.zero_le _)
state_before: d✝ : ℤ
c d x y z w : ℕ
xy : SqLe x c y d
zw : SqLe z c w d
⊢ c * (x * z) * (c * (x * z)) ≤ d * (y * w) * (d * (y * w))
Theorem: toIcoDiv_add_right'
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: simpa only [one_zsmul] using toIcoDiv_add_zsmul' hp a b 1
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIcoDiv hp (a + p) b = toIcoDiv hp a b - 1
Theorem: TopCat.snd_openEmbedding_of_left_openEmbedding
File: Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean

tactic: convert (homeoOfIso (asIso (pullback.snd : pullback (𝟙 S) g ⟶ _))).openEmbedding.comp
    (pullback_map_openEmbedding_of_open_embeddings (i₂ := 𝟙 Y) f g (𝟙 _) g H
      (homeoOfIso (Iso.refl _)).openEmbedding (𝟙 _) rfl (by simp))
state_before: J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
H : OpenEmbedding ((forget TopCat).map f)
g : Y ⟶ S
⊢ OpenEmbedding ((forget TopCat).map pullback.snd)

tactic: erw [← coe_comp]
state_before: case h.e'_5.h
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
H : OpenEmbedding ((forget TopCat).map f)
g : Y ⟶ S
e_2✝ : (forget TopCat).obj Y = ↑Y
⊢ (forget TopCat).map pullback.snd =
    ↑(homeoOfIso (asIso pullback.snd)) ∘
      (forget TopCat).map (pullback.map f g (𝟙 S) g f (𝟙 Y) (𝟙 S) (_ : f ≫ 𝟙 S = f ≫ 𝟙 S) (_ : g ≫ 𝟙 S = 𝟙 Y ≫ g))

tactic: simp
state_before: case h.e'_5.h
J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
H : OpenEmbedding ((forget TopCat).map f)
g : Y ⟶ S
e_2✝ : (forget TopCat).obj Y = ↑Y
⊢ (forget TopCat).map pullback.snd =
    (forget TopCat).map
      (pullback.map f g (𝟙 S) g f (𝟙 Y) (𝟙 S) (_ : f ≫ 𝟙 S = f ≫ 𝟙 S) (_ : g ≫ 𝟙 S = 𝟙 Y ≫ g) ≫
        (asIso pullback.snd).hom)

tactic: simp
state_before: J : Type v
inst✝ : SmallCategory J
X✝ Y✝ Z : TopCat
X Y S : TopCat
f : X ⟶ S
H : OpenEmbedding ((forget TopCat).map f)
g : Y ⟶ S
⊢ g ≫ 𝟙 S = 𝟙 Y ≫ g
Theorem: LocalEquiv.symm_symm
File: Mathlib/Logic/Equiv/LocalEquiv.lean

tactic: cases e
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.24956
δ : Type ?u.24959
e : LocalEquiv α β
e' : LocalEquiv β γ
⊢ LocalEquiv.symm (LocalEquiv.symm e) = e

tactic: rfl
state_before: case mk
α : Type u_1
β : Type u_2
γ : Type ?u.24956
δ : Type ?u.24959
e' : LocalEquiv β γ
toFun✝ : α → β
invFun✝ : β → α
source✝ : Set α
target✝ : Set β
map_source'✝ : ∀ ⦃x : α⦄, x ∈ source✝ → toFun✝ x ∈ target✝
map_target'✝ : ∀ ⦃x : β⦄, x ∈ target✝ → invFun✝ x ∈ source✝
left_inv'✝ : ∀ ⦃x : α⦄, x ∈ source✝ → invFun✝ (toFun✝ x) = x
right_inv'✝ : ∀ ⦃x : β⦄, x ∈ target✝ → toFun✝ (invFun✝ x) = x
⊢ LocalEquiv.symm
      (LocalEquiv.symm
        { toFun := toFun✝, invFun := invFun✝, source := source✝, target := target✝, map_source' := map_source'✝,
          map_target' := map_target'✝, left_inv' := left_inv'✝, right_inv' := right_inv'✝ }) =
    { toFun := toFun✝, invFun := invFun✝, source := source✝, target := target✝, map_source' := map_source'✝,
      map_target' := map_target'✝, left_inv' := left_inv'✝, right_inv' := right_inv'✝ }
Theorem: Polynomial.mem_degreeLE
File: Mathlib/RingTheory/Polynomial/Basic.lean

tactic: simp only [degreeLE, Submodule.mem_iInf, degree_le_iff_coeff_zero, LinearMap.mem_ker]
state_before: R : Type u
S : Type ?u.4503
inst✝ : Semiring R
n : WithBot ℕ
f : R[X]
⊢ f ∈ degreeLE R n ↔ degree f ≤ n

tactic: rfl
state_before: R : Type u
S : Type ?u.4503
inst✝ : Semiring R
n : WithBot ℕ
f : R[X]
⊢ (∀ (i : ℕ), ↑i > n → ↑(lcoeff R i) f = 0) ↔ ∀ (m : ℕ), n < ↑m → coeff f m = 0
Theorem: MeasureTheory.snorm'_zero
File: Mathlib/MeasureTheory/Function/LpSeminorm.lean

tactic: simp [snorm', hp0_lt]
state_before: α : Type u_1
E : Type ?u.911849
F : Type u_2
G : Type ?u.911855
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
hp0_lt : 0 < q
⊢ snorm' 0 q μ = 0
Theorem: Fin.card_Ioo
File: Mathlib/Data/Fin/Interval.lean

tactic: rw [← Nat.card_Ioo, ← map_valEmbedding_Ioo, card_map]
state_before: n : ℕ
a b : Fin n
⊢ card (Ioo a b) = ↑b - ↑a - 1
Theorem: IsTrichotomous.swap
File: Mathlib/Order/RelClasses.lean

tactic: simpa [Function.swap, or_comm, or_left_comm] using trichotomous_of r a b
state_before: α : Type u
β : Type v
r✝ : α → α → Prop
s : β → β → Prop
r : α → α → Prop
inst✝ : IsTrichotomous α r
a b : α
⊢ Function.swap r a b ∨ a = b ∨ Function.swap r b a
Theorem: Function.Semiconj₂.isIdempotent_right
File: Mathlib/Logic/Function/Conjugate.lean

tactic: simp only [← h.eq, @IsIdempotent.idempotent _ ga]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.3743
f : α → β
ga : α → α → α
gb : β → β → β
inst✝ : IsIdempotent α ga
h : Semiconj₂ f ga gb
h_surj : Surjective f
x : α
⊢ gb (f x) (f x) = f x
Theorem: tendsto_atBot_isLUB
File: Mathlib/Topology/Algebra/Order/MonotoneConvergence.lean

tactic: convert tendsto_atTop_isLUB h_anti.dual_left ha using 1
state_before: α : Type u_2
β : Type ?u.6300
ι : Type u_1
inst✝³ : Preorder ι
inst✝² : TopologicalSpace α
inst✝¹ : Preorder α
inst✝ : SupConvergenceClass α
f : ι → α
a : α
h_anti : Antitone f
ha : IsLUB (range f) a
⊢ Tendsto f atBot (𝓝 a)
Theorem: Polynomial.coeff_eq_zero_of_lt_natTrailingDegree
File: Mathlib/Data/Polynomial/Degree/TrailingDegree.lean

tactic: apply coeff_eq_zero_of_trailingDegree_lt
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
n : ℕ
h : n < natTrailingDegree p
⊢ coeff p n = 0

tactic: by_cases hp : p = 0
state_before: case h
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
n : ℕ
h : n < natTrailingDegree p
⊢ ↑n < trailingDegree p

tactic: rw [hp, trailingDegree_zero]
state_before: case pos
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
n : ℕ
h : n < natTrailingDegree p
hp : p = 0
⊢ ↑n < trailingDegree p

tactic: exact WithTop.coe_lt_top n
state_before: case pos
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
n : ℕ
h : n < natTrailingDegree p
hp : p = 0
⊢ ↑n < ⊤

tactic: rw [trailingDegree_eq_natTrailingDegree hp]
state_before: case neg
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
n : ℕ
h : n < natTrailingDegree p
hp : ¬p = 0
⊢ ↑n < trailingDegree p

tactic: exact WithTop.coe_lt_coe.2 h
state_before: case neg
R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p✝ q r p : R[X]
n : ℕ
h : n < natTrailingDegree p
hp : ¬p = 0
⊢ ↑n < ↑(natTrailingDegree p)
Theorem: Subalgebra.rangeS_algebraMap
File: Mathlib/Algebra/Algebra/Subalgebra/Basic.lean

tactic: rw [algebraMap_eq, Algebra.id.map_eq_id, RingHom.id_comp, ← toSubsemiring_subtype,
  Subsemiring.rangeS_subtype]
state_before: R✝ : Type u
A✝ : Type v
B : Type w
inst✝⁷ : CommSemiring R✝
inst✝⁶ : Semiring A✝
inst✝⁵ : Algebra R✝ A✝
inst✝⁴ : Semiring B
inst✝³ : Algebra R✝ B
S✝ : Subalgebra R✝ A✝
α : Type ?u.1950480
β : Type ?u.1950483
R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : CommSemiring A
inst✝ : Algebra R A
S : Subalgebra R A
⊢ RingHom.rangeS (algebraMap { x // x ∈ S } A) = S.toSubsemiring
Theorem: Polynomial.mul_eq_sum_sum
File: Mathlib/Data/Polynomial/Basic.lean

tactic: apply toFinsupp_injective
state_before: R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
p q : R[X]
⊢ p * q = ∑ i in support p, sum q fun j a => ↑(monomial (i + j)) (coeff p i * a)

tactic: rcases p with ⟨⟩
state_before: case a
R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
p q : R[X]
⊢ (p * q).toFinsupp = (∑ i in support p, sum q fun j a => ↑(monomial (i + j)) (coeff p i * a)).toFinsupp

tactic: rcases q with ⟨⟩
state_before: case a.ofFinsupp
R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
q : R[X]
toFinsupp✝ : AddMonoidAlgebra R ℕ
⊢ ({ toFinsupp := toFinsupp✝ } * q).toFinsupp =
    (∑ i in support { toFinsupp := toFinsupp✝ },
        sum q fun j a => ↑(monomial (i + j)) (coeff { toFinsupp := toFinsupp✝ } i * a)).toFinsupp

tactic: simp [support, sum, coeff, toFinsupp_sum]
state_before: case a.ofFinsupp.ofFinsupp
R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
toFinsupp✝¹ toFinsupp✝ : AddMonoidAlgebra R ℕ
⊢ ({ toFinsupp := toFinsupp✝¹ } * { toFinsupp := toFinsupp✝ }).toFinsupp =
    (∑ i in support { toFinsupp := toFinsupp✝¹ },
        sum { toFinsupp := toFinsupp✝ } fun j a =>
          ↑(monomial (i + j)) (coeff { toFinsupp := toFinsupp✝¹ } i * a)).toFinsupp

tactic: rfl
state_before: case a.ofFinsupp.ofFinsupp
R : Type u
a b : R
m n : ℕ
inst✝ : Semiring R
toFinsupp✝¹ toFinsupp✝ : AddMonoidAlgebra R ℕ
⊢ toFinsupp✝¹ * toFinsupp✝ =
    ∑ x in toFinsupp✝¹.support, ∑ x_1 in toFinsupp✝.support, Finsupp.single (x + x_1) (↑toFinsupp✝¹ x * ↑toFinsupp✝ x_1)
Theorem: ContinuousLinearMap.op_nnnorm_le_bound'
File: Mathlib/Analysis/NormedSpace/OperatorNorm.lean

tactic: rwa [← NNReal.coe_ne_zero]
state_before: 𝕜 : Type u_1
𝕜₂ : Type u_2
𝕜₃ : Type ?u.621442
E : Type u_3
Eₗ : Type ?u.621448
F : Type u_4
Fₗ : Type ?u.621454
G : Type ?u.621457
Gₗ : Type ?u.621460
𝓕 : Type ?u.621463
inst✝¹⁷ : SeminormedAddCommGroup E
inst✝¹⁶ : SeminormedAddCommGroup Eₗ
inst✝¹⁵ : SeminormedAddCommGroup F
inst✝¹⁴ : SeminormedAddCommGroup Fₗ
inst✝¹³ : SeminormedAddCommGroup G
inst✝¹² : SeminormedAddCommGroup Gₗ
inst✝¹¹ : NontriviallyNormedField 𝕜
inst✝¹⁰ : NontriviallyNormedField 𝕜₂
inst✝⁹ : NontriviallyNormedField 𝕜₃
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : NormedSpace 𝕜 Eₗ
inst✝⁶ : NormedSpace 𝕜₂ F
inst✝⁵ : NormedSpace 𝕜 Fₗ
inst✝⁴ : NormedSpace 𝕜₃ G
inst✝³ : NormedSpace 𝕜 Gₗ
σ₁₂ : 𝕜 →+* 𝕜₂
σ₂₃ : 𝕜₂ →+* 𝕜₃
σ₁₃ : 𝕜 →+* 𝕜₃
inst✝² : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝¹ : RingHomIsometric σ₁₂
inst✝ : RingHomIsometric σ₂₃
f✝ g : E →SL[σ₁₂] F
h : F →SL[σ₂₃] G
x✝ : E
f : E →SL[σ₁₂] F
M : ℝ≥0
hM : ∀ (x : E), ‖x‖₊ ≠ 0 → ‖↑f x‖₊ ≤ M * ‖x‖₊
x : E
hx : ‖x‖ ≠ 0
⊢ ‖x‖₊ ≠ 0
Theorem: Set.Countable.prod
File: Mathlib/Data/Set/Countable.lean

tactic: haveI : Countable s := hs.to_subtype
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
t : Set β
hs : Set.Countable s
ht : Set.Countable t
⊢ Set.Countable (s ×ˢ t)

tactic: haveI : Countable t := ht.to_subtype
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
t : Set β
hs : Set.Countable s
ht : Set.Countable t
this : Countable ↑s
⊢ Set.Countable (s ×ˢ t)

tactic: exact (Countable.of_equiv _ <| (Equiv.Set.prod _ _).symm).to_set
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
t : Set β
hs : Set.Countable s
ht : Set.Countable t
this✝ : Countable ↑s
this : Countable ↑t
⊢ Set.Countable (s ×ˢ t)
Theorem: ProjectiveSpectrum.zeroLocus_bUnion
File: Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean

tactic: simp only [zeroLocus_iUnion]
state_before: R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
s : Set (Set A)
⊢ zeroLocus 𝒜 (⋃ (s' : Set A) (_ : s' ∈ s), s') = ⋂ (s' : Set A) (_ : s' ∈ s), zeroLocus 𝒜 s'
Theorem: Submodule.bot_orthogonal_eq_top
File: Mathlib/Analysis/InnerProductSpace/Orthogonal.lean

tactic: rw [← top_orthogonal_eq_bot, eq_top_iff]
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.89112
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace 𝕜 F
K : Submodule 𝕜 E
⊢ ⊥ᗮ = ⊤

tactic: exact le_orthogonal_orthogonal ⊤
state_before: 𝕜 : Type u_2
E : Type u_1
F : Type ?u.89112
inst✝⁴ : IsROrC 𝕜
inst✝³ : NormedAddCommGroup E
inst✝² : InnerProductSpace 𝕜 E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace 𝕜 F
K : Submodule 𝕜 E
⊢ ⊤ ≤ ⊤ᗮᗮ
Theorem: Ordinal.succ_pred_iff_is_succ
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: simp only [e, pred_succ]
state_before: α : Type ?u.85057
β : Type ?u.85060
γ : Type ?u.85063
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
o : Ordinal
x✝ : ∃ a, o = succ a
a : Ordinal
e : o = succ a
⊢ succ (pred o) = o
Theorem: Cycle.formPerm_eq_formPerm_iff
File: Mathlib/GroupTheory/Perm/Cycle/Concrete.lean

tactic: rw [Cycle.length_subsingleton_iff, Cycle.length_subsingleton_iff]
state_before: α✝ : Type ?u.33186
inst✝¹ : DecidableEq α✝
s✝ s'✝ : Cycle α✝
α : Type u_1
inst✝ : DecidableEq α
s s' : Cycle α
hs : Nodup s
hs' : Nodup s'
⊢ formPerm s hs = formPerm s' hs' ↔ s = s' ∨ Subsingleton s ∧ Subsingleton s'

tactic: revert s s'
state_before: α✝ : Type ?u.33186
inst✝¹ : DecidableEq α✝
s✝ s'✝ : Cycle α✝
α : Type u_1
inst✝ : DecidableEq α
s s' : Cycle α
hs : Nodup s
hs' : Nodup s'
⊢ formPerm s hs = formPerm s' hs' ↔ s = s' ∨ length s ≤ 1 ∧ length s' ≤ 1

tactic: intro s s'
state_before: α✝ : Type ?u.33186
inst✝¹ : DecidableEq α✝
s s' : Cycle α✝
α : Type u_1
inst✝ : DecidableEq α
⊢ ∀ {s s' : Cycle α} {hs : Nodup s} {hs' : Nodup s'},
    formPerm s hs = formPerm s' hs' ↔ s = s' ∨ length s ≤ 1 ∧ length s' ≤ 1

tactic: apply @Quotient.inductionOn₂' _ _ _ _ _ s s'
state_before: α✝ : Type ?u.33186
inst✝¹ : DecidableEq α✝
s✝ s'✝ : Cycle α✝
α : Type u_1
inst✝ : DecidableEq α
s s' : Cycle α
⊢ ∀ {hs : Nodup s} {hs' : Nodup s'}, formPerm s hs = formPerm s' hs' ↔ s = s' ∨ length s ≤ 1 ∧ length s' ≤ 1

tactic: intro l l'
state_before: α✝ : Type ?u.33186
inst✝¹ : DecidableEq α✝
s✝ s'✝ : Cycle α✝
α : Type u_1
inst✝ : DecidableEq α
s s' : Cycle α
⊢ ∀ (a₁ a₂ : List α) {hs : Nodup (Quotient.mk'' a₁)} {hs' : Nodup (Quotient.mk'' a₂)},
    formPerm (Quotient.mk'' a₁) hs = formPerm (Quotient.mk'' a₂) hs' ↔
      Quotient.mk'' a₁ = Quotient.mk'' a₂ ∨ length (Quotient.mk'' a₁) ≤ 1 ∧ length (Quotient.mk'' a₂) ≤ 1

tactic: simp_all
state_before: α✝ : Type ?u.33186
inst✝¹ : DecidableEq α✝
s✝ s'✝ : Cycle α✝
α : Type u_1
inst✝ : DecidableEq α
s s' : Cycle α
l l' : List α
⊢ ∀ {hs : Nodup (Quotient.mk'' l)} {hs' : Nodup (Quotient.mk'' l')},
    formPerm (Quotient.mk'' l) hs = formPerm (Quotient.mk'' l') hs' ↔
      Quotient.mk'' l = Quotient.mk'' l' ∨ length (Quotient.mk'' l) ≤ 1 ∧ length (Quotient.mk'' l') ≤ 1

tactic: intro hs hs'
state_before: α✝ : Type ?u.33186
inst✝¹ : DecidableEq α✝
s✝ s'✝ : Cycle α✝
α : Type u_1
inst✝ : DecidableEq α
s s' : Cycle α
l l' : List α
⊢ ∀ {hs : List.Nodup l} {hs' : List.Nodup l'},
    List.formPerm l = List.formPerm l' ↔ l ~r l' ∨ List.length l ≤ 1 ∧ List.length l' ≤ 1

tactic: constructor <;> intro h <;> simp_all only [formPerm_eq_formPerm_iff]
state_before: α✝ : Type ?u.33186
inst✝¹ : DecidableEq α✝
s✝ s'✝ : Cycle α✝
α : Type u_1
inst✝ : DecidableEq α
s s' : Cycle α
l l' : List α
hs : List.Nodup l
hs' : List.Nodup l'
⊢ List.formPerm l = List.formPerm l' ↔ l ~r l' ∨ List.length l ≤ 1 ∧ List.length l' ≤ 1
Theorem: Nat.max_eq_right
File: Std/Data/Nat/Lemmas.lean

tactic: simp [Nat.max_def, h, Nat.not_lt.2 h]
state_before: a b : Nat
h : a ≤ b
⊢ max a b = b
Theorem: String.Iterator.ValidFor.hasPrev
File: Std/Data/String/Lemmas.lean

tactic: simp [Iterator.hasPrev, h.pos, Nat.pos_iff_ne_zero]
state_before: l r : List Char
it : Iterator
h : ValidFor l r it
⊢ Iterator.hasPrev it = true ↔ l ≠ []
Theorem: ZNum.lt_to_int
File: Mathlib/Data/Num/Lemmas.lean

tactic: simp at h
state_before: α : Type ?u.981446
m n : ZNum
h : Ordering.casesOn Ordering.lt (↑m < ↑n) (m = n) (↑n < ↑m)
⊢ ↑m < ↑n ↔ Ordering.lt = Ordering.lt

tactic: simp [h]
state_before: α : Type ?u.981446
m n : ZNum
h : ↑m < ↑n
⊢ ↑m < ↑n ↔ Ordering.lt = Ordering.lt

tactic: simp at h
state_before: α : Type ?u.981446
m n : ZNum
h : Ordering.casesOn Ordering.eq (↑m < ↑n) (m = n) (↑n < ↑m)
⊢ ↑m < ↑n ↔ Ordering.eq = Ordering.lt

tactic: simp [h, lt_irrefl]
state_before: α : Type ?u.981446
m n : ZNum
h : m = n
⊢ ↑m < ↑n ↔ Ordering.eq = Ordering.lt

tactic: simp [not_lt_of_gt h]
state_before: α : Type ?u.981446
m n : ZNum
h : Ordering.casesOn Ordering.gt (↑m < ↑n) (m = n) (↑n < ↑m)
⊢ ↑m < ↑n ↔ Ordering.gt = Ordering.lt