tasksource/leandojo huggingface dataset:
Theorem: Real.sin_pi_div_thirty_two
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: trans sin (π / 2 ^ 5)
state_before: x : ℝ
⊢ sin (π / 32) = sqrt (2 - sqrt (2 + sqrt (2 + sqrt 2))) / 2

tactic: congr
state_before: x : ℝ
⊢ sin (π / 32) = sin (π / 2 ^ 5)

x : ℝ
⊢ sin (π / 2 ^ 5) = sqrt (2 - sqrt (2 + sqrt (2 + sqrt 2))) / 2

tactic: norm_num
state_before: case e_x.e_a
x : ℝ
⊢ 32 = 2 ^ 5

x : ℝ
⊢ sin (π / 2 ^ 5) = sqrt (2 - sqrt (2 + sqrt (2 + sqrt 2))) / 2

tactic: simp
state_before: x : ℝ
⊢ sin (π / 2 ^ 5) = sqrt (2 - sqrt (2 + sqrt (2 + sqrt 2))) / 2
Theorem: Metric.hausdorffDist_self_zero
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: simp [hausdorffDist]
state_before: ι : Sort ?u.74549
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
⊢ hausdorffDist s s = 0
Theorem: Nat.multinomial_congr
File: Mathlib/Data/Nat/Choose/Multinomial.lean

tactic: simp only [multinomial]
state_before: α : Type u_1
s : Finset α
f✝ : α → ℕ
a b : α
n : ℕ
f g : α → ℕ
h : ∀ (a : α), a ∈ s → f a = g a
⊢ multinomial s f = multinomial s g

tactic: congr 1
state_before: α : Type u_1
s : Finset α
f✝ : α → ℕ
a b : α
n : ℕ
f g : α → ℕ
h : ∀ (a : α), a ∈ s → f a = g a
⊢ (∑ i in s, f i)! / ∏ i in s, (f i)! = (∑ i in s, g i)! / ∏ i in s, (g i)!

tactic: rw [Finset.sum_congr rfl h]
state_before: case e_a
α : Type u_1
s : Finset α
f✝ : α → ℕ
a b : α
n : ℕ
f g : α → ℕ
h : ∀ (a : α), a ∈ s → f a = g a
⊢ (∑ i in s, f i)! = (∑ i in s, g i)!

tactic: exact Finset.prod_congr rfl fun a ha => by rw [h a ha]
state_before: case e_a
α : Type u_1
s : Finset α
f✝ : α → ℕ
a b : α
n : ℕ
f g : α → ℕ
h : ∀ (a : α), a ∈ s → f a = g a
⊢ ∏ i in s, (f i)! = ∏ i in s, (g i)!

tactic: rw [h a ha]
state_before: α : Type u_1
s : Finset α
f✝ : α → ℕ
a✝ b : α
n : ℕ
f g : α → ℕ
h : ∀ (a : α), a ∈ s → f a = g a
a : α
ha : a ∈ s
⊢ (f a)! = (g a)!
Theorem: String.front_eq
File: Std/Data/String/Lemmas.lean

tactic: simpa [front] using get_of_valid [] s.1
state_before: s : String
⊢ front s = List.headD s.data default
Theorem: Turing.ToPartrec.Code.head_eval
File: Mathlib/Computability/TMToPartrec.lean

tactic: simp [head]
state_before: v : List ℕ
⊢ eval head v = pure [List.headI v]
Theorem: sdiff_sup_cancel
File: Mathlib/Order/Heyting/Basic.lean

tactic: rw [sup_comm, sup_sdiff_cancel_right h]
state_before: ι : Type ?u.92974
α : Type u_1
β : Type ?u.92980
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
h : b ≤ a
⊢ a \ b ⊔ b = a
Theorem: FirstOrder.Language.Substructure.fg_def
File: Mathlib/ModelTheory/FinitelyGenerated.lean

tactic: rintro ⟨t', h, rfl⟩
state_before: L : Language
M : Type u_3
inst✝ : Structure L M
N : Substructure L M
⊢ (∃ S, Set.Finite S ∧ LowerAdjoint.toFun (closure L) S = N) → FG N

tactic: rcases Finite.exists_finset_coe h with ⟨t, rfl⟩
state_before: case intro.intro
L : Language
M : Type u_3
inst✝ : Structure L M
t' : Set M
h : Set.Finite t'
⊢ FG (LowerAdjoint.toFun (closure L) t')

tactic: exact ⟨t, rfl⟩
state_before: case intro.intro.intro
L : Language
M : Type u_3
inst✝ : Structure L M
t : Finset M
h : Set.Finite ↑t
⊢ FG (LowerAdjoint.toFun (closure L) ↑t)
Theorem: HomologicalComplex.eqToHom_f
File: Mathlib/Algebra/Homology/HomologicalComplex.lean

tactic: subst h
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
C C₁ C₂ : HomologicalComplex V c
h : C₁ = C₂
n : ι
⊢ Hom.f (eqToHom h) n = eqToHom (_ : X C₁ n = X C₂ n)

tactic: rfl
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
C C₁ : HomologicalComplex V c
n : ι
⊢ Hom.f (eqToHom (_ : C₁ = C₁)) n = eqToHom (_ : X C₁ n = X C₁ n)
Theorem: PartENat.get_le_get
File: Mathlib/Data/Nat/PartENat.lean

tactic: conv =>
  lhs
  rw [← coe_le_coe, natCast_get, natCast_get]
state_before: x y : PartENat
hx : x.Dom
hy : y.Dom
⊢ Part.get x hx ≤ Part.get y hy ↔ x ≤ y
Theorem: List.subperm_cons
File: Mathlib/Data/List/Perm.lean

tactic: cases' s with _ _ _ s' u _ _ s'
state_before: α : Type uu
β : Type vv
l₁✝ l₂✝ : List α
a : α
l₁ l₂ : List α
x✝ : a :: l₁ <+~ a :: l₂
l : List α
p : l ~ a :: l₁
s : l <+ a :: l₂
⊢ l₁ <+~ l₂

tactic: exact (p.subperm_left.2 <| (sublist_cons _ _).subperm).trans s'.subperm
state_before: case cons
α : Type uu
β : Type vv
l₁✝ l₂✝ : List α
a : α
l₁ l₂ : List α
x✝ : a :: l₁ <+~ a :: l₂
l : List α
p : l ~ a :: l₁
s' : l <+ l₂
⊢ l₁ <+~ l₂

tactic: exact ⟨u, p.cons_inv, s'⟩
state_before: case cons₂
α : Type uu
β : Type vv
l₁✝ l₂✝ : List α
a : α
l₁ l₂ : List α
x✝ : a :: l₁ <+~ a :: l₂
u : List α
p : a :: u ~ a :: l₁
s' : u <+ l₂
⊢ l₁ <+~ l₂
Theorem: Cardinal.aleph0_le_aleph'
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: rw [← aleph'_omega, aleph'_le]
state_before: o : Ordinal
⊢ ℵ₀ ≤ aleph' o ↔ ω ≤ o
Theorem: Int.even_or_odd'
File: Mathlib/Data/Int/Parity.lean

tactic: simpa only [two_mul, exists_or, Odd, Even] using even_or_odd n
state_before: m n✝ n : ℤ
⊢ ∃ k, n = 2 * k ∨ n = 2 * k + 1
Theorem: Set.smul_neg
File: Mathlib/Data/Set/Pointwise/SMul.lean

tactic: simp_rw [← image_neg]
state_before: F : Type ?u.209091
α : Type u_2
β : Type u_1
γ : Type ?u.209100
inst✝² : Monoid α
inst✝¹ : AddGroup β
inst✝ : DistribMulAction α β
a : α
s : Set α
t : Set β
⊢ s • -t = -(s • t)

tactic: exact image_image2_right_comm smul_neg
state_before: F : Type ?u.209091
α : Type u_2
β : Type u_1
γ : Type ?u.209100
inst✝² : Monoid α
inst✝¹ : AddGroup β
inst✝ : DistribMulAction α β
a : α
s : Set α
t : Set β
⊢ s • Neg.neg '' t = Neg.neg '' (s • t)
Theorem: disjoint_disjointed
File: Mathlib/Order/Disjointed.lean

tactic: refine' (Symmetric.pairwise_on Disjoint.symm _).2 fun m n h => _
state_before: α : Type u_1
β : Type ?u.2549
inst✝ : GeneralizedBooleanAlgebra α
f : ℕ → α
⊢ Pairwise (Disjoint on disjointed f)

tactic: cases n
state_before: α : Type u_1
β : Type ?u.2549
inst✝ : GeneralizedBooleanAlgebra α
f : ℕ → α
m n : ℕ
h : m < n
⊢ Disjoint (disjointed f m) (disjointed f n)

tactic: exact
  disjoint_sdiff_self_right.mono_left
    ((disjointed_le f m).trans (le_partialSups_of_le f (Nat.lt_add_one_iff.1 h)))
state_before: case succ
α : Type u_1
β : Type ?u.2549
inst✝ : GeneralizedBooleanAlgebra α
f : ℕ → α
m n✝ : ℕ
h : m < Nat.succ n✝
⊢ Disjoint (disjointed f m) (disjointed f (Nat.succ n✝))

tactic: exact (Nat.not_lt_zero _ h).elim
state_before: case zero
α : Type u_1
β : Type ?u.2549
inst✝ : GeneralizedBooleanAlgebra α
f : ℕ → α
m : ℕ
h : m < Nat.zero
⊢ Disjoint (disjointed f m) (disjointed f Nat.zero)
Theorem: Coheyting.boundary_hnot_hnot
File: Mathlib/Order/Heyting/Boundary.lean

tactic: simp_rw [boundary, hnot_hnot_hnot, inf_comm]
state_before: α : Type u_1
inst✝ : CoheytingAlgebra α
a✝ b a : α
⊢ ∂ (￢￢a) = ∂ (￢a)
Theorem: Metric.bounded_iff_subset_ball
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: constructor <;> rintro ⟨C, hC⟩
state_before: α : Type u
β : Type v
X : Type ?u.488478
ι : Type ?u.488481
inst✝ : PseudoMetricSpace α
x : α
s t : Set α
r : ℝ
c : α
⊢ Bounded s ↔ ∃ r, s ⊆ closedBall c r

tactic: rcases s.eq_empty_or_nonempty with (rfl | ⟨x, hx⟩)
state_before: case mp.intro
α : Type u
β : Type v
X : Type ?u.488478
ι : Type ?u.488481
inst✝ : PseudoMetricSpace α
x : α
s t : Set α
r : ℝ
c : α
C : ℝ
hC : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → dist x y ≤ C
⊢ ∃ r, s ⊆ closedBall c r

tactic: exact ⟨0, by simp⟩
state_before: case mp.intro.inl
α : Type u
β : Type v
X : Type ?u.488478
ι : Type ?u.488481
inst✝ : PseudoMetricSpace α
x : α
t : Set α
r : ℝ
c : α
C : ℝ
hC : ∀ (x : α), x ∈ ∅ → ∀ (y : α), y ∈ ∅ → dist x y ≤ C
⊢ ∃ r, ∅ ⊆ closedBall c r

tactic: simp
state_before: α : Type u
β : Type v
X : Type ?u.488478
ι : Type ?u.488481
inst✝ : PseudoMetricSpace α
x : α
t : Set α
r : ℝ
c : α
C : ℝ
hC : ∀ (x : α), x ∈ ∅ → ∀ (y : α), y ∈ ∅ → dist x y ≤ C
⊢ ∅ ⊆ closedBall c 0

tactic: exact ⟨C + dist x c, fun y hy =>
  calc dist y c ≤ dist y x + dist x c := dist_triangle _ _ _
  _ ≤ C + dist x c := add_le_add_right (hC y hy x hx) _⟩
state_before: case mp.intro.inr.intro
α : Type u
β : Type v
X : Type ?u.488478
ι : Type ?u.488481
inst✝ : PseudoMetricSpace α
x✝ : α
s t : Set α
r : ℝ
c : α
C : ℝ
hC : ∀ (x : α), x ∈ s → ∀ (y : α), y ∈ s → dist x y ≤ C
x : α
hx : x ∈ s
⊢ ∃ r, s ⊆ closedBall c r

tactic: exact bounded_closedBall.mono hC
state_before: case mpr.intro
α : Type u
β : Type v
X : Type ?u.488478
ι : Type ?u.488481
inst✝ : PseudoMetricSpace α
x : α
s t : Set α
r : ℝ
c : α
C : ℝ
hC : s ⊆ closedBall c C
⊢ Bounded s
Theorem: Set.multiset_prod_mem_multiset_prod
File: Mathlib/Data/Set/Pointwise/BigOperators.lean

tactic: induction t using Quotient.inductionOn
state_before: ι : Type u_1
α : Type u_2
β : Type ?u.78098
F : Type ?u.78101
inst✝² : CommMonoid α
inst✝¹ : CommMonoid β
inst✝ : MonoidHomClass F α β
t : Multiset ι
f : ι → Set α
g : ι → α
hg : ∀ (i : ι), i ∈ t → g i ∈ f i
⊢ Multiset.prod (Multiset.map g t) ∈ Multiset.prod (Multiset.map f t)

tactic: simp_rw [Multiset.quot_mk_to_coe, Multiset.coe_map, Multiset.coe_prod]
state_before: case h
ι : Type u_1
α : Type u_2
β : Type ?u.78098
F : Type ?u.78101
inst✝² : CommMonoid α
inst✝¹ : CommMonoid β
inst✝ : MonoidHomClass F α β
f : ι → Set α
g : ι → α
a✝ : List ι
hg : ∀ (i : ι), i ∈ Quotient.mk (List.isSetoid ι) a✝ → g i ∈ f i
⊢ Multiset.prod (Multiset.map g (Quotient.mk (List.isSetoid ι) a✝)) ∈
    Multiset.prod (Multiset.map f (Quotient.mk (List.isSetoid ι) a✝))

tactic: exact list_prod_mem_list_prod _ _ _ hg
state_before: case h
ι : Type u_1
α : Type u_2
β : Type ?u.78098
F : Type ?u.78101
inst✝² : CommMonoid α
inst✝¹ : CommMonoid β
inst✝ : MonoidHomClass F α β
f : ι → Set α
g : ι → α
a✝ : List ι
hg : ∀ (i : ι), i ∈ Quotient.mk (List.isSetoid ι) a✝ → g i ∈ f i
⊢ List.prod (List.map g a✝) ∈ List.prod (List.map f a✝)
Theorem: CategoryTheory.LaxMonoidalFunctor.prod'_μ
File: Mathlib/CategoryTheory/Monoidal/Functor.lean

tactic: dsimp [prod']
state_before: C : Type u₁
inst✝⁵ : Category C
inst✝⁴ : MonoidalCategory C
D : Type u₂
inst✝³ : Category D
inst✝² : MonoidalCategory D
E : Type u₃
inst✝¹ : Category E
inst✝ : MonoidalCategory E
F : LaxMonoidalFunctor C D
G : LaxMonoidalFunctor C E
X Y : C
⊢ μ (prod' F G) X Y = (μ F X Y, μ G X Y)

tactic: simp
state_before: C : Type u₁
inst✝⁵ : Category C
inst✝⁴ : MonoidalCategory C
D : Type u₂
inst✝³ : Category D
inst✝² : MonoidalCategory D
E : Type u₃
inst✝¹ : Category E
inst✝ : MonoidalCategory E
F : LaxMonoidalFunctor C D
G : LaxMonoidalFunctor C E
X Y : C
⊢ (μ F X Y ≫ F.map (𝟙 (X ⊗ Y)), μ G X Y ≫ G.map (𝟙 (X ⊗ Y))) = (μ F X Y, μ G X Y)
Theorem: ClusterPt.of_le_nhds
File: Mathlib/Topology/Basic.lean

tactic: rwa [ClusterPt, inf_eq_right.mpr H]
state_before: α : Type u
β : Type v
ι : Sort w
a : α
s s₁ s₂ t : Set α
p p₁ p₂ : α → Prop
inst✝¹ : TopologicalSpace α
x : α
f : Filter α
H : f ≤ 𝓝 x
inst✝ : NeBot f
⊢ ClusterPt x f
Theorem: mem_rootsOfUnity_iff_mem_nthRoots
File: Mathlib/RingTheory/RootsOfUnity/Basic.lean

tactic: simp only [mem_rootsOfUnity, mem_nthRoots k.pos, Units.ext_iff, Units.val_one,
  Units.val_pow_eq_pow_val]
state_before: M : Type ?u.1044729
N : Type ?u.1044732
G : Type ?u.1044735
R : Type u_1
S : Type ?u.1044741
F : Type ?u.1044744
inst✝⁴ : CommMonoid M
inst✝³ : CommMonoid N
inst✝² : DivisionCommMonoid G
k l : ℕ+
inst✝¹ : CommRing R
inst✝ : IsDomain R
ζ : Rˣ
⊢ ζ ∈ rootsOfUnity k R ↔ ↑ζ ∈ nthRoots (↑k) 1
Theorem: div_self'
File: Mathlib/Algebra/Group/Basic.lean

tactic: rw [div_eq_mul_inv, mul_right_inv a]
state_before: α : Type ?u.57205
β : Type ?u.57208
G : Type u_1
inst✝ : Group G
a✝ b c d a : G
⊢ a / a = 1
Theorem: UFModel.Agrees.size_eq
File: Mathlib/Data/UnionFind.lean

tactic: cases H
state_before: α : Type u_1
n : ℕ
β : Sort u_2
f : α → β
arr : Array α
m : Fin n → β
H : Agrees arr f m
⊢ n = Array.size arr

tactic: rfl
state_before: case mk
α : Type u_1
β : Sort u_2
f : α → β
arr : Array α
⊢ Array.size arr = Array.size arr
Theorem: Polynomial.iterate_derivative_sub
File: Mathlib/Data/Polynomial/Derivative.lean

tactic: induction' k with k ih generalizing f g <;> simp [*]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Ring R
k : ℕ
f g : R[X]
⊢ (↑derivative^[k]) (f - g) = (↑derivative^[k]) f - (↑derivative^[k]) g
Theorem: CategoryTheory.GrothendieckTopology.superset_covering
File: Mathlib/CategoryTheory/Sites/Grothendieck.lean

tactic: apply J.transitive sjx R fun Y f hf => _
state_before: C : Type u
inst✝ : Category C
X Y : C
S R : Sieve X
J : GrothendieckTopology C
Hss : S ≤ R
sjx : S ∈ sieves J X
⊢ R ∈ sieves J X

tactic: intros Y f hf
state_before: C : Type u
inst✝ : Category C
X Y : C
S R : Sieve X
J : GrothendieckTopology C
Hss : S ≤ R
sjx : S ∈ sieves J X
⊢ ∀ (Y : C) (f : Y ⟶ X), S.arrows f → Sieve.pullback f R ∈ sieves J Y

tactic: apply covering_of_eq_top
state_before: C : Type u
inst✝ : Category C
X Y✝ : C
S R : Sieve X
J : GrothendieckTopology C
Hss : S ≤ R
sjx : S ∈ sieves J X
Y : C
f : Y ⟶ X
hf : S.arrows f
⊢ Sieve.pullback f R ∈ sieves J Y

tactic: rw [← top_le_iff, ← S.pullback_eq_top_of_mem hf]
state_before: case a
C : Type u
inst✝ : Category C
X Y✝ : C
S R : Sieve X
J : GrothendieckTopology C
Hss : S ≤ R
sjx : S ∈ sieves J X
Y : C
f : Y ⟶ X
hf : S.arrows f
⊢ Sieve.pullback f R = ⊤

tactic: apply Sieve.pullback_monotone _ Hss
state_before: case a
C : Type u
inst✝ : Category C
X Y✝ : C
S R : Sieve X
J : GrothendieckTopology C
Hss : S ≤ R
sjx : S ∈ sieves J X
Y : C
f : Y ⟶ X
hf : S.arrows f
⊢ Sieve.pullback f S ≤ Sieve.pullback f R
Theorem: OreLocalization.mul_one
File: Mathlib/RingTheory/OreLocalization/Basic.lean

tactic: induction' x using OreLocalization.ind with r s
state_before: R : Type u_1
inst✝¹ : Monoid R
S : Submonoid R
inst✝ : OreSet S
x : OreLocalization R S
⊢ x * 1 = x

tactic: simp [OreLocalization.one_def, oreDiv_mul_char r 1 s 1 1 s (by simp)]
state_before: case c
R : Type u_1
inst✝¹ : Monoid R
S : Submonoid R
inst✝ : OreSet S
r : R
s : { x // x ∈ S }
⊢ r /ₒ s * 1 = r /ₒ s

tactic: simp
state_before: R : Type u_1
inst✝¹ : Monoid R
S : Submonoid R
inst✝ : OreSet S
r : R
s : { x // x ∈ S }
⊢ 1 * ↑s = ↑s * 1
Theorem: List.Nodup.concat
File: Mathlib/Data/List/Nodup.lean

tactic: rw [concat_eq_append]
state_before: α : Type u
β : Type v
l l₁ l₂ : List α
r : α → α → Prop
a b : α
h : ¬a ∈ l
h' : Nodup l
⊢ Nodup (concat l a)

tactic: exact h'.append (nodup_singleton _) (disjoint_singleton.2 h)
state_before: α : Type u
β : Type v
l l₁ l₂ : List α
r : α → α → Prop
a b : α
h : ¬a ∈ l
h' : Nodup l
⊢ Nodup (l ++ [a])
Theorem: Mon_.mul_one_hom
File: Mathlib/CategoryTheory/Monoidal/Mon_.lean

tactic: rw [← tensor_id_comp_id_tensor, Category.assoc, M.mul_one, rightUnitor_naturality]
state_before: C : Type u₁
inst✝¹ : Category C
inst✝ : MonoidalCategory C
M : Mon_ C
Z : C
f : Z ⟶ M.X
⊢ (f ⊗ M.one) ≫ M.mul = (ρ_ Z).hom ≫ f
Theorem: Quotient.inductionOn₂
File: src/lean/Init/Core.lean

tactic: induction q₁ using Quotient.ind
state_before: a b c d : Prop
α : Sort uA
β : Sort uB
φ : Sort uC
s₁ : Setoid α
s₂ : Setoid β
motive : Quotient s₁ → Quotient s₂ → Prop
q₁ : Quotient s₁
q₂ : Quotient s₂
h : ∀ (a : α) (b : β), motive (Quotient.mk s₁ a) (Quotient.mk s₂ b)
⊢ motive q₁ q₂

tactic: induction q₂ using Quotient.ind
state_before: case a
a b c d : Prop
α : Sort uA
β : Sort uB
φ : Sort uC
s₁ : Setoid α
s₂ : Setoid β
motive : Quotient s₁ → Quotient s₂ → Prop
q₂ : Quotient s₂
h : ∀ (a : α) (b : β), motive (Quotient.mk s₁ a) (Quotient.mk s₂ b)
a✝ : α
⊢ motive (Quotient.mk s₁ a✝) q₂

tactic: apply h
state_before: case a.a
a b c d : Prop
α : Sort uA
β : Sort uB
φ : Sort uC
s₁ : Setoid α
s₂ : Setoid β
motive : Quotient s₁ → Quotient s₂ → Prop
h : ∀ (a : α) (b : β), motive (Quotient.mk s₁ a) (Quotient.mk s₂ b)
a✝¹ : α
a✝ : β
⊢ motive (Quotient.mk s₁ a✝¹) (Quotient.mk s₂ a✝)
Theorem: Polynomial.natTrailingDegree_eq_support_min'
File: Mathlib/Data/Polynomial/Degree/TrailingDegree.lean

tactic: apply le_antisymm
state_before: R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
h : p ≠ 0
⊢ natTrailingDegree p = min' (support p) (_ : Finset.Nonempty (support p))

tactic: apply le_min'
state_before: case a
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
h : p ≠ 0
⊢ natTrailingDegree p ≤ min' (support p) (_ : Finset.Nonempty (support p))

tactic: intro y hy
state_before: case a.H2
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
h : p ≠ 0
⊢ ∀ (y : ℕ), y ∈ support p → natTrailingDegree p ≤ y

tactic: exact natTrailingDegree_le_of_mem_supp y hy
state_before: case a.H2
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
h : p ≠ 0
y : ℕ
hy : y ∈ support p
⊢ natTrailingDegree p ≤ y

tactic: apply Finset.min'_le
state_before: case a
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
h : p ≠ 0
⊢ min' (support p) (_ : Finset.Nonempty (support p)) ≤ natTrailingDegree p

tactic: exact mem_support_iff.mpr (trailingCoeff_nonzero_iff_nonzero.mpr h)
state_before: case a.H2
R : Type u
S : Type v
a b : R
n m : ℕ
inst✝ : Semiring R
p q r : R[X]
h : p ≠ 0
⊢ natTrailingDegree p ∈ support p
Theorem: Subspace.finrank_add_finrank_dualCoannihilator_eq
File: Mathlib/LinearAlgebra/Dual.lean

tactic: rw [finrank_dualCoannihilator_eq]
state_before: K : Type u
V : Type v
inst✝⁶ : Field K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
W✝ : Subspace K V
V₁ : Type ?u.1350893
inst✝³ : AddCommGroup V₁
inst✝² : Module K V₁
inst✝¹ : FiniteDimensional K V
inst✝ : FiniteDimensional K V₁
W : Subspace K (Module.Dual K V)
⊢ finrank K { x // x ∈ W } + finrank K { x // x ∈ dualCoannihilator W } = finrank K V

tactic: let equiv := W.quotEquivAnnihilator
state_before: K : Type u
V : Type v
inst✝⁶ : Field K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
W✝ : Subspace K V
V₁ : Type ?u.1350893
inst✝³ : AddCommGroup V₁
inst✝² : Module K V₁
inst✝¹ : FiniteDimensional K V
inst✝ : FiniteDimensional K V₁
W : Subspace K (Module.Dual K V)
⊢ finrank K { x // x ∈ W } + finrank K { x // x ∈ dualAnnihilator W } = finrank K V

tactic: have eq := LinearEquiv.finrank_eq (R := K) (M := (Module.Dual K V) ⧸ W)
  (M₂ := { x // x ∈ dualAnnihilator W }) equiv
state_before: K : Type u
V : Type v
inst✝⁶ : Field K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
W✝ : Subspace K V
V₁ : Type ?u.1350893
inst✝³ : AddCommGroup V₁
inst✝² : Module K V₁
inst✝¹ : FiniteDimensional K V
inst✝ : FiniteDimensional K V₁
W : Subspace K (Module.Dual K V)
equiv : (Module.Dual K V ⧸ W) ≃ₗ[K] { x // x ∈ dualAnnihilator W } := quotEquivAnnihilator W
⊢ finrank K { x // x ∈ W } + finrank K { x // x ∈ dualAnnihilator W } = finrank K V

tactic: rw [eq.symm, add_comm, Submodule.finrank_quotient_add_finrank, Subspace.dual_finrank_eq]
state_before: K : Type u
V : Type v
inst✝⁶ : Field K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
W✝ : Subspace K V
V₁ : Type ?u.1350893
inst✝³ : AddCommGroup V₁
inst✝² : Module K V₁
inst✝¹ : FiniteDimensional K V
inst✝ : FiniteDimensional K V₁
W : Subspace K (Module.Dual K V)
equiv : (Module.Dual K V ⧸ W) ≃ₗ[K] { x // x ∈ dualAnnihilator W } := quotEquivAnnihilator W
eq : finrank K (Module.Dual K V ⧸ W) = finrank K { x // x ∈ dualAnnihilator W }
⊢ finrank K { x // x ∈ W } + finrank K { x // x ∈ dualAnnihilator W } = finrank K V
Theorem: AntitoneOn.integral_le_sum_Ico
File: Mathlib/Analysis/SumIntegralComparisons.lean

tactic: rw [(Nat.sub_add_cancel hab).symm, Nat.cast_add]
state_before: x₀ : ℝ
a b : ℕ
f : ℝ → ℝ
hab : a ≤ b
hf : AntitoneOn f (Icc ↑a ↑b)
⊢ (∫ (x : ℝ) in ↑a..↑b, f x) ≤ ∑ x in Finset.Ico a b, f ↑x

tactic: rw [← Finset.sum_Ico_add, Nat.Ico_zero_eq_range]
state_before: x₀ : ℝ
a b : ℕ
f : ℝ → ℝ
hab : a ≤ b
hf : AntitoneOn f (Icc ↑a ↑b)
⊢ (∫ (x : ℝ) in ↑a..↑a + ↑(b - a), f x) ≤ ∑ x in Finset.Ico (0 + a) (b - a + a), f ↑x

tactic: apply AntitoneOn.integral_le_sum
state_before: x₀ : ℝ
a b : ℕ
f : ℝ → ℝ
hab : a ≤ b
hf : AntitoneOn f (Icc ↑a ↑b)
⊢ (∫ (x : ℝ) in ↑a..↑a + ↑(b - a), f x) ≤ ∑ x in Finset.range (b - a), f (↑a + ↑x)

tactic: simp only [hf, hab, Nat.cast_sub, add_sub_cancel'_right]
state_before: case hf
x₀ : ℝ
a b : ℕ
f : ℝ → ℝ
hab : a ≤ b
hf : AntitoneOn f (Icc ↑a ↑b)
⊢ AntitoneOn (fun x => f x) (Icc (↑a) (↑a + ↑(b - a)))
Theorem: Polynomial.map_smul
File: Mathlib/Data/Polynomial/Eval.lean

tactic: rw [map, eval₂_smul, RingHom.comp_apply, C_mul']
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : Semiring R
p q r✝ : R[X]
inst✝ : Semiring S
f : R →+* S
r : R
⊢ map f (r • p) = ↑f r • map f p
Theorem: Nat.frequently_mod_eq
File: Mathlib/Order/Filter/ModEq.lean

tactic: simpa only [Nat.ModEq, mod_eq_of_lt h] using frequently_modEq h.ne_bot d
state_before: d n : ℕ
h : d < n
⊢ ∃ᶠ (m : ℕ) in atTop, m % n = d
Theorem: SimpleGraph.boxProd_degree
File: Mathlib/Combinatorics/SimpleGraph/Prod.lean

tactic: rw [degree, degree, degree, boxProd_neighborFinset, Finset.card_disjUnion]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.89124
G : SimpleGraph α
H : SimpleGraph β
x : α × β
inst✝² : Fintype ↑(neighborSet G x.fst)
inst✝¹ : Fintype ↑(neighborSet H x.snd)
inst✝ : Fintype ↑(neighborSet (G □ H) x)
⊢ degree (G □ H) x = degree G x.fst + degree H x.snd

tactic: simp_rw [Finset.card_product, Finset.card_singleton, mul_one, one_mul]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.89124
G : SimpleGraph α
H : SimpleGraph β
x : α × β
inst✝² : Fintype ↑(neighborSet G x.fst)
inst✝¹ : Fintype ↑(neighborSet H x.snd)
inst✝ : Fintype ↑(neighborSet (G □ H) x)
⊢ Finset.card (neighborFinset G x.fst ×ˢ {x.snd}) + Finset.card ({x.fst} ×ˢ neighborFinset H x.snd) =
    Finset.card (neighborFinset G x.fst) + Finset.card (neighborFinset H x.snd)
Theorem: IntermediateField.finrank_eq_one_iff
File: Mathlib/FieldTheory/Adjoin.lean

tactic: rw [← toSubalgebra_eq_iff, ← finrank_eq_finrank_subalgebra, Subalgebra.finrank_eq_one_iff,
  bot_toSubalgebra]
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
α : E
S : Set E
K L : IntermediateField F E
⊢ finrank F { x // x ∈ K } = 1 ↔ K = ⊥
Theorem: MeasureTheory.AEEqFun.Integrable.add
File: Mathlib/MeasureTheory/Function/L1Space.lean

tactic: refine' induction_on₂ f g fun f hf g hg hfi hgi => _
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.1266441
δ : Type ?u.1266444
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g : α →ₘ[μ] β
⊢ Integrable f → Integrable g → Integrable (f + g)

tactic: simp only [integrable_mk, mk_add_mk] at hfi hgi ⊢
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.1266441
δ : Type ?u.1266444
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f✝ g✝ : α →ₘ[μ] β
f : α → β
hf : AEStronglyMeasurable f μ
g : α → β
hg : AEStronglyMeasurable g μ
hfi : Integrable (mk f hf)
hgi : Integrable (mk g hg)
⊢ Integrable (mk f hf + mk g hg)

tactic: exact hfi.add hgi
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.1266441
δ : Type ?u.1266444
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f✝ g✝ : α →ₘ[μ] β
f : α → β
hf : AEStronglyMeasurable f μ
g : α → β
hg : AEStronglyMeasurable g μ
hfi : MeasureTheory.Integrable f
hgi : MeasureTheory.Integrable g
⊢ MeasureTheory.Integrable (f + g)
Theorem: Nat.not_beq_eq_true_eq
File: src/lean/Init/Data/Nat/Basic.lean

tactic: subst h₂
state_before: a b : Nat
h₁ : (!a == b) = true
h₂ : a = b
⊢ False

tactic: rw [LawfulBEq.rfl] at h₁
state_before: a : Nat
h₁ : (!a == a) = true
⊢ False

tactic: contradiction
state_before: a : Nat
h₁ : (!true) = true
⊢ False

tactic: simp [this]
state_before: a b : Nat
h : ¬a = b
this : ¬(a == b) = true
⊢ (!a == b) = true
Theorem: HomologicalComplex.dFrom_eq
File: Mathlib/Algebra/Homology/HomologicalComplex.lean

tactic: obtain rfl := c.next_eq' r
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
C : HomologicalComplex V c
i j : ι
r : ComplexShape.Rel c i j
⊢ dFrom C i = d C i j ≫ (xNextIso C r).inv

tactic: exact (Category.comp_id _).symm
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category V
inst✝ : HasZeroMorphisms V
c : ComplexShape ι
C : HomologicalComplex V c
i : ι
r : ComplexShape.Rel c i (ComplexShape.next c i)
⊢ dFrom C i = d C i (ComplexShape.next c i) ≫ (xNextIso C r).inv