ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: EuclideanGeometry.dist_div_sin_oangle_left_of_oangle_eq_pi_div_two
File: Mathlib/Geometry/Euclidean/Angle/Oriented/RightAngle.lean

Proof steps:
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
h : ∡ p₁ p₂ p₃ = ↑(π / 2)
⊢ dist p₃ p₂ / (∡ p₃ p₁ p₂).sin = dist p₁ p₃
state_after: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
h : ∡ p₁ p₂ p₃ = ↑(π / 2)
hs : (∡ p₃ p₁ p₂).sign = 1
⊢ dist p₃ p₂ / (∡ p₃ p₁ p₂).sin = dist p₁ p₃
tactic: have hs : (∡ p₃ p₁ p₂).sign = 1 := by rw [← oangle_rotate_sign, h, Real.Angle.sign_coe_pi_div_two]
state_before: V : Type u_1
P : Type u_2
inst✝⁴ : NormedAddCommGroup V
inst✝³ : InnerProductSpace ℝ V
inst✝² : MetricSpace P
inst✝¹ : NormedAddTorsor V P
hd2 : Fact (finrank ℝ V = 2)
inst✝ : Module.Oriented ℝ V (Fin 2)
p₁ p₂ p₃ : P
h : ∡ p₁ p₂ p₃ = ↑(π / 2)
hs : (∡ p₃ p₁ p₂).sign = 1
⊢ dist p₃ p₂ / (∡ p₃ p₁ p₂).sin = dist p₁ p₃
state_after: no goals
tactic: rw [oangle_eq_angle_of_sign_eq_one hs, angle_comm, Real.Angle.sin_coe, dist_comm p₁ p₃,
    dist_div_sin_angle_of_angle_eq_pi_div_two (angle_rev_eq_pi_div_two_of_oangle_eq_pi_div_two h)
      (Or.inl (right_ne_of_oangle_eq_pi_div_two h))]
Theorem: RingSubgroupsBasis.nonarchimedean
File: Mathlib/Topology/Algebra/Nonarchimedean/Bases.lean

Proof steps:
state_before: A : Type u_1
ι : Type u_2
inst✝¹ : Ring A
inst✝ : Nonempty ι
B : ι → AddSubgroup A
hB : RingSubgroupsBasis B
⊢ NonarchimedeanRing A
state_after: A : Type u_1
ι : Type u_2
inst✝¹ : Ring A
inst✝ : Nonempty ι
B : ι → AddSubgroup A
hB : RingSubgroupsBasis B
this : TopologicalSpace A := hB.topology
⊢ NonarchimedeanRing A
tactic: letI := hB.topology
state_before: A : Type u_1
ι : Type u_2
inst✝¹ : Ring A
inst✝ : Nonempty ι
B : ι → AddSubgroup A
hB : RingSubgroupsBasis B
this : TopologicalSpace A := hB.topology
⊢ NonarchimedeanRing A
state_after: case is_nonarchimedean
A : Type u_1
ι : Type u_2
inst✝¹ : Ring A
inst✝ : Nonempty ι
B : ι → AddSubgroup A
hB : RingSubgroupsBasis B
this : TopologicalSpace A := hB.topology
⊢ ∀ U ∈ 𝓝 0, ∃ V, ↑V ⊆ U
tactic: constructor
state_before: case is_nonarchimedean
A : Type u_1
ι : Type u_2
inst✝¹ : Ring A
inst✝ : Nonempty ι
B : ι → AddSubgroup A
hB : RingSubgroupsBasis B
this : TopologicalSpace A := hB.topology
⊢ ∀ U ∈ 𝓝 0, ∃ V, ↑V ⊆ U
state_after: case is_nonarchimedean
A : Type u_1
ι : Type u_2
inst✝¹ : Ring A
inst✝ : Nonempty ι
B : ι → AddSubgroup A
hB : RingSubgroupsBasis B
this : TopologicalSpace A := hB.topology
U : Set A
hU : U ∈ 𝓝 0
⊢ ∃ V, ↑V ⊆ U
tactic: intro U hU
state_before: case is_nonarchimedean
A : Type u_1
ι : Type u_2
inst✝¹ : Ring A
inst✝ : Nonempty ι
B : ι → AddSubgroup A
hB : RingSubgroupsBasis B
this : TopologicalSpace A := hB.topology
U : Set A
hU : U ∈ 𝓝 0
⊢ ∃ V, ↑V ⊆ U
state_after: case is_nonarchimedean.intro.intro
A : Type u_1
ι : Type u_2
inst✝¹ : Ring A
inst✝ : Nonempty ι
B : ι → AddSubgroup A
hB : RingSubgroupsBasis B
this : TopologicalSpace A := hB.topology
U : Set A
hU : U ∈ 𝓝 0
i : ι
hi : ↑(B i) ⊆ U
⊢ ∃ V, ↑V ⊆ U
tactic: obtain ⟨i, -, hi : (B i : Set A) ⊆ U⟩ := hB.hasBasis_nhds_zero.mem_iff.mp hU
state_before: case is_nonarchimedean.intro.intro
A : Type u_1
ι : Type u_2
inst✝¹ : Ring A
inst✝ : Nonempty ι
B : ι → AddSubgroup A
hB : RingSubgroupsBasis B
this : TopologicalSpace A := hB.topology
U : Set A
hU : U ∈ 𝓝 0
i : ι
hi : ↑(B i) ⊆ U
⊢ ∃ V, ↑V ⊆ U
state_after: no goals
tactic: exact ⟨hB.openAddSubgroup i, hi⟩
Theorem: Matrix.cons_val_succ'
File: Mathlib/Data/Fin/VecNotation.lean

Proof steps:
state_before: α : Type u
m n o : ℕ
m' : Type u_1
n' : Type u_2
o' : Type u_3
i : ℕ
h : i.succ < m.succ
x : α
u : Fin m → α
⊢ vecCons x u ⟨i.succ, h⟩ = u ⟨i, ⋯⟩
state_after: no goals
tactic: simp only [vecCons, Fin.cons, Fin.cases_succ']
Theorem: Polynomial.content_zero
File: Mathlib/RingTheory/Polynomial/Content.lean

Proof steps:
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
⊢ content 0 = 0
state_after: no goals
tactic: rw [← C_0, content_C, normalize_zero]
Theorem: mem_span_finset
File: Mathlib/LinearAlgebra/Finsupp.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
N : Type u_3
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
s : Finset M
x : M
hx : x ∈ span R ↑s
⊢ x ∈ span R (_root_.id '' ↑s)
state_after: no goals
tactic: rwa [Set.image_id]
Theorem: comap_norm_atTop'
File: Mathlib/Analysis/Normed/Group/Bounded.lean

Proof steps:
state_before: α : Type u_1
ι : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
⊢ comap norm atTop = cobounded E
state_after: no goals
tactic: simpa only [dist_one_right] using comap_dist_right_atTop (1 : E)
Theorem: List.ofFn_getElem
File: Mathlib/Data/List/OfFn.lean

Proof steps:
state_before: α : Type u
⊢ (ofFn fun i => [][↑i]) = []
state_after: no goals
tactic: rw [ofFn_zero]
state_before: α : Type u
a : α
l : List α
⊢ (ofFn fun i => (a :: l)[↑i]) = a :: l
state_after: α : Type u
a : α
l : List α
⊢ ((a :: l)[↑0] :: ofFn fun i => (a :: l)[↑i.succ]) = a :: l
tactic: rw [ofFn_succ]
state_before: α : Type u
a : α
l : List α
⊢ ((a :: l)[↑0] :: ofFn fun i => (a :: l)[↑i.succ]) = a :: l
state_after: case e_tail
α : Type u
a : α
l : List α
⊢ (ofFn fun i => (a :: l)[↑i.succ]) = l
tactic: congr
state_before: case e_tail
α : Type u
a : α
l : List α
⊢ (ofFn fun i => (a :: l)[↑i.succ]) = l
state_after: no goals
tactic: exact ofFn_get l
Theorem: conjugate_pos'
File: Mathlib/Algebra/Star/Order.lean

Proof steps:
state_before: R : Type u
inst✝³ : NonUnitalSemiring R
inst✝² : PartialOrder R
inst✝¹ : StarRing R
inst✝ : StarOrderedRing R
a : R
ha : 0 < a
c : R
hc : IsRegular c
⊢ 0 < c * a * star c
state_after: no goals
tactic: simpa only [star_star] using conjugate_pos ha hc.star
Theorem: MeasureTheory.integral_comp_mul_deriv_Ioi
File: Mathlib/MeasureTheory/Integral/IntegralEqImproper.lean

Proof steps:
state_before: E : Type u_1
f✝ : ℝ → E
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f f' g : ℝ → ℝ
a : ℝ
hf : ContinuousOn f (Ici a)
hft : Tendsto f atTop atTop
hff' : ∀ x ∈ Ioi a, HasDerivWithinAt f (f' x) (Ioi x) x
hg_cont : ContinuousOn g (f '' Ioi a)
hg1 : IntegrableOn g (f '' Ici a) volume
hg2 : IntegrableOn (fun x => (g ∘ f) x * f' x) (Ici a) volume
⊢ ∫ (x : ℝ) in Ioi a, (g ∘ f) x * f' x = ∫ (u : ℝ) in Ioi (f a), g u
state_after: E : Type u_1
f✝ : ℝ → E
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f f' g : ℝ → ℝ
a : ℝ
hf : ContinuousOn f (Ici a)
hft : Tendsto f atTop atTop
hff' : ∀ x ∈ Ioi a, HasDerivWithinAt f (f' x) (Ioi x) x
hg_cont : ContinuousOn g (f '' Ioi a)
hg1 : IntegrableOn g (f '' Ici a) volume
hg2 : IntegrableOn (fun x => (g ∘ f) x * f' x) (Ici a) volume
hg2' : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a) volume
⊢ ∫ (x : ℝ) in Ioi a, (g ∘ f) x * f' x = ∫ (u : ℝ) in Ioi (f a), g u
tactic: have hg2' : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a) := by simpa [mul_comm] using hg2
state_before: E : Type u_1
f✝ : ℝ → E
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f f' g : ℝ → ℝ
a : ℝ
hf : ContinuousOn f (Ici a)
hft : Tendsto f atTop atTop
hff' : ∀ x ∈ Ioi a, HasDerivWithinAt f (f' x) (Ioi x) x
hg_cont : ContinuousOn g (f '' Ioi a)
hg1 : IntegrableOn g (f '' Ici a) volume
hg2 : IntegrableOn (fun x => (g ∘ f) x * f' x) (Ici a) volume
hg2' : IntegrableOn (fun x => f' x • (g ∘ f) x) (Ici a) volume
⊢ ∫ (x : ℝ) in Ioi a, (g ∘ f) x * f' x = ∫ (u : ℝ) in Ioi (f a), g u
state_after: no goals
tactic: simpa [mul_comm] using integral_comp_smul_deriv_Ioi hf hft hff' hg_cont hg1 hg2'
Theorem: Submodule.cardQuot_eq_one_iff
File: Mathlib/RingTheory/Ideal/Norm.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
inst✝² : Ring R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
P : Submodule R M
⊢ P.toAddSubgroup = ⊤ ↔ P = ⊤
state_after: no goals
tactic: simp [SetLike.ext_iff]
Theorem: Set.empty_definable_iff
File: Mathlib/ModelTheory/Definability.lean

Proof steps:
state_before: M : Type w
A : Set M
L : Language
inst✝ : L.Structure M
α : Type u₁
β : Type u_1
B : Set M
s : Set (α → M)
⊢ ∅.Definable L s ↔ ∃ φ, s = setOf φ.Realize
state_after: M : Type w
A : Set M
L : Language
inst✝ : L.Structure M
α : Type u₁
β : Type u_1
B : Set M
s : Set (α → M)
⊢ (∃ φ, s = setOf φ.Realize) ↔ ∃ b, s = setOf ((LEquiv.addEmptyConstants L ↑∅).onFormula.symm b).Realize
tactic: rw [Definable, Equiv.exists_congr_left (LEquiv.addEmptyConstants L (∅ : Set M)).onFormula]
state_before: M : Type w
A : Set M
L : Language
inst✝ : L.Structure M
α : Type u₁
β : Type u_1
B : Set M
s : Set (α → M)
⊢ (∃ φ, s = setOf φ.Realize) ↔ ∃ b, s = setOf ((LEquiv.addEmptyConstants L ↑∅).onFormula.symm b).Realize
state_after: no goals
tactic: simp [-constantsOn]
Theorem: OrderIso.mulLeft_symm
File: Mathlib/Algebra/Order/Group/OrderIso.lean

Proof steps:
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a : α
⊢ (mulLeft a).symm = mulLeft a⁻¹
state_after: case h.h
α : Type u
inst✝² : Group α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a x : α
⊢ (mulLeft a).symm x = (mulLeft a⁻¹) x
tactic: ext x
state_before: case h.h
α : Type u
inst✝² : Group α
inst✝¹ : LE α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a x : α
⊢ (mulLeft a).symm x = (mulLeft a⁻¹) x
state_after: no goals
tactic: rfl
Theorem: strictAntiOn_of_deriv_neg
File: Mathlib/Analysis/Calculus/MeanValue.lean

Proof steps:
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
D : Set ℝ
hD : Convex ℝ D
f : ℝ → ℝ
hf : ContinuousOn f D
hf' : ∀ x ∈ interior D, deriv f x < 0
x : ℝ
hx : x ∈ D
y : ℝ
⊢ y ∈ D → x < y → f y < f x
state_after: no goals
tactic: simpa only [zero_mul, sub_lt_zero] using
    hD.image_sub_lt_mul_sub_of_deriv_lt hf
      (fun z hz => (differentiableAt_of_deriv_ne_zero (hf' z hz).ne).differentiableWithinAt) hf' x
      hx y
Theorem: MeasureTheory.toReal_setLaverage
File: Mathlib/MeasureTheory/Integral/Average.lean

Proof steps:
state_before: α : Type u_1
E : Type u_2
F : Type u_3
m0 : MeasurableSpace α
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace ℝ E
inst✝³ : CompleteSpace E
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
inst✝ : CompleteSpace F
μ ν : Measure α
s t : Set α
f : α → ℝ≥0∞
hf : AEMeasurable f (μ.restrict s)
hf' : ∀ᵐ (x : α) ∂μ.restrict s, f x ≠ ⊤
⊢ (⨍⁻ (x : α) in s, f x ∂μ).toReal = ⨍ (x : α) in s, (f x).toReal ∂μ
state_after: no goals
tactic: simpa [laverage_eq] using toReal_laverage hf hf'
Theorem: Set.inclusion_inclusion
File: Mathlib/Data/Set/Basic.lean

Proof steps:
state_before: α : Type u_1
s t u : Set α
hst : s ⊆ t
htu : t ⊆ u
x : ↑s
⊢ inclusion htu (inclusion hst x) = inclusion ⋯ x
state_after: case mk
α : Type u_1
s t u : Set α
hst : s ⊆ t
htu : t ⊆ u
val✝ : α
property✝ : val✝ ∈ s
⊢ inclusion htu (inclusion hst ⟨val✝, property✝⟩) = inclusion ⋯ ⟨val✝, property✝⟩
tactic: cases x
state_before: case mk
α : Type u_1
s t u : Set α
hst : s ⊆ t
htu : t ⊆ u
val✝ : α
property✝ : val✝ ∈ s
⊢ inclusion htu (inclusion hst ⟨val✝, property✝⟩) = inclusion ⋯ ⟨val✝, property✝⟩
state_after: no goals
tactic: rfl
Theorem: OpenEmbedding.locallyCompactSpace
File: Mathlib/Topology/Compactness/LocallyCompact.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
ι : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s t : Set X
inst✝ : LocallyCompactSpace Y
f : X → Y
hf : OpenEmbedding f
this : ∀ (x : X), (𝓝 x).HasBasis (fun s => (s ∈ 𝓝 (f x) ∧ IsCompact s) ∧ s ⊆ range f) fun x => f ⁻¹' x
⊢ LocallyCompactSpace X
state_after: X : Type u_1
Y : Type u_2
ι : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s✝ t : Set X
inst✝ : LocallyCompactSpace Y
f : X → Y
hf : OpenEmbedding f
this : ∀ (x : X), (𝓝 x).HasBasis (fun s => (s ∈ 𝓝 (f x) ∧ IsCompact s) ∧ s ⊆ range f) fun x => f ⁻¹' x
x : X
s : Set Y
hs : (s ∈ 𝓝 (f x) ∧ IsCompact s) ∧ s ⊆ range f
⊢ IsCompact (f ⁻¹' s)
tactic: refine .of_hasBasis this fun x s hs => ?_
state_before: X : Type u_1
Y : Type u_2
ι : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s✝ t : Set X
inst✝ : LocallyCompactSpace Y
f : X → Y
hf : OpenEmbedding f
this : ∀ (x : X), (𝓝 x).HasBasis (fun s => (s ∈ 𝓝 (f x) ∧ IsCompact s) ∧ s ⊆ range f) fun x => f ⁻¹' x
x : X
s : Set Y
hs : (s ∈ 𝓝 (f x) ∧ IsCompact s) ∧ s ⊆ range f
⊢ IsCompact (f ⁻¹' s)
state_after: X : Type u_1
Y : Type u_2
ι : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s✝ t : Set X
inst✝ : LocallyCompactSpace Y
f : X → Y
hf : OpenEmbedding f
this : ∀ (x : X), (𝓝 x).HasBasis (fun s => (s ∈ 𝓝 (f x) ∧ IsCompact s) ∧ s ⊆ range f) fun x => f ⁻¹' x
x : X
s : Set Y
hs : (s ∈ 𝓝 (f x) ∧ IsCompact s) ∧ s ⊆ range f
⊢ IsCompact s
tactic: rw [hf.toInducing.isCompact_iff, image_preimage_eq_of_subset hs.2]
state_before: X : Type u_1
Y : Type u_2
ι : Type u_3
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace Y
s✝ t : Set X
inst✝ : LocallyCompactSpace Y
f : X → Y
hf : OpenEmbedding f
this : ∀ (x : X), (𝓝 x).HasBasis (fun s => (s ∈ 𝓝 (f x) ∧ IsCompact s) ∧ s ⊆ range f) fun x => f ⁻¹' x
x : X
s : Set Y
hs : (s ∈ 𝓝 (f x) ∧ IsCompact s) ∧ s ⊆ range f
⊢ IsCompact s
state_after: no goals
tactic: exact hs.1.2
Theorem: Complex.exp_zero
File: Mathlib/Data/Complex/Exponential.lean

Proof steps:
state_before: x y : ℂ
⊢ cexp 0 = 1
state_after: x y : ℂ
⊢ (exp' 0).lim = 1
tactic: rw [exp]
state_before: x y : ℂ
⊢ (exp' 0).lim = 1
state_after: x y : ℂ
ε : ℝ
ε0 : ε > 0
j : ℕ
hj : j ≥ 1
⊢ abs (↑(exp' 0 - const (⇑abs) 1) j) < ε
tactic: refine lim_eq_of_equiv_const fun ε ε0 => ⟨1, fun j hj => ?_⟩
state_before: x y : ℂ
ε : ℝ
ε0 : ε > 0
j : ℕ
hj : j ≥ 1
⊢ abs (↑(exp' 0 - const (⇑abs) 1) j) < ε
state_after: case h.e'_3
x y : ℂ
ε : ℝ
ε0 : ε > 0
j : ℕ
hj : j ≥ 1
⊢ abs (↑(exp' 0 - const (⇑abs) 1) j) = 0
tactic: convert (config := .unfoldSameFun) ε0
state_before: case h.e'_3
x y : ℂ
ε : ℝ
ε0 : ε > 0
j : ℕ
hj : j ≥ 1
⊢ abs (↑(exp' 0 - const (⇑abs) 1) j) = 0
state_after: case h.e'_3.zero
x y : ℂ
ε : ℝ
ε0 : ε > 0
hj : 0 ≥ 1
⊢ abs (↑(exp' 0 - const (⇑abs) 1) 0) = 0

case h.e'_3.succ
x y : ℂ
ε : ℝ
ε0 : ε > 0
j : ℕ
hj : j + 1 ≥ 1
⊢ abs (↑(exp' 0 - const (⇑abs) 1) (j + 1)) = 0
tactic: cases' j with j j
Theorem: Rat.comap_cast_atTop
File: Mathlib/Order/Filter/Archimedean.lean

Proof steps:
state_before: α : Type u_1
R : Type u_2
inst✝¹ : LinearOrderedField R
inst✝ : Archimedean R
r : R
n : ℕ
hn : r ≤ ↑n
⊢ r ≤ ↑↑n
state_after: no goals
tactic: simpa
Theorem: Function.ext_iff_support
File: Mathlib/Algebra/Group/Support.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
A : Type u_3
B : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
inst✝² : One M
inst✝¹ : One N
inst✝ : One P
f g : α → M
x✝ : mulSupport f = mulSupport g ∧ ∀ x ∈ mulSupport f, f x = g x
h₁ : mulSupport f = mulSupport g
h₂ : ∀ x ∈ mulSupport f, f x = g x
x : α
⊢ f x = g x
state_after: no goals
tactic: if hx : x ∈ f.mulSupport then exact h₂ x hx
    else rw [nmem_mulSupport.1 hx, nmem_mulSupport.1 (mt (Set.ext_iff.1 h₁ x).2 hx)]
Theorem: Polynomial.induction_with_natDegree_le
File: Mathlib/Algebra/Polynomial/EraseLead.lean

Proof steps:
state_before: R : Type u_1
inst✝ : Semiring R
f : R[X]
P : R[X] → Prop
N : ℕ
P_0 : P 0
P_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (C r * X ^ n)
P_C_add : ∀ (f g : R[X]), f.natDegree < g.natDegree → g.natDegree ≤ N → P f → P g → P (f + g)
⊢ ∀ (f : R[X]), f.natDegree ≤ N → P f
state_after: R : Type u_1
inst✝ : Semiring R
f✝ : R[X]
P : R[X] → Prop
N : ℕ
P_0 : P 0
P_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (C r * X ^ n)
P_C_add : ∀ (f g : R[X]), f.natDegree < g.natDegree → g.natDegree ≤ N → P f → P g → P (f + g)
f : R[X]
df : f.natDegree ≤ N
⊢ P f
tactic: intro f df
state_before: R : Type u_1
inst✝ : Semiring R
f✝ : R[X]
P : R[X] → Prop
N : ℕ
P_0 : P 0
P_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (C r * X ^ n)
P_C_add : ∀ (f g : R[X]), f.natDegree < g.natDegree → g.natDegree ≤ N → P f → P g → P (f + g)
f : R[X]
df : f.natDegree ≤ N
⊢ P f
state_after: R : Type u_1
inst✝ : Semiring R
f✝ : R[X]
P : R[X] → Prop
N : ℕ
P_0 : P 0
P_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (C r * X ^ n)
P_C_add : ∀ (f g : R[X]), f.natDegree < g.natDegree → g.natDegree ≤ N → P f → P g → P (f + g)
f : R[X]
df : f.natDegree ≤ N
c : ℕ
hd : f.support.card = c
⊢ P f
tactic: generalize hd : card f.support = c
state_before: R : Type u_1
inst✝ : Semiring R
f✝ : R[X]
P : R[X] → Prop
N : ℕ
P_0 : P 0
P_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (C r * X ^ n)
P_C_add : ∀ (f g : R[X]), f.natDegree < g.natDegree → g.natDegree ≤ N → P f → P g → P (f + g)
f : R[X]
df : f.natDegree ≤ N
c : ℕ
hd : f.support.card = c
⊢ P f
state_after: R : Type u_1
inst✝ : Semiring R
f : R[X]
P : R[X] → Prop
N : ℕ
P_0 : P 0
P_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (C r * X ^ n)
P_C_add : ∀ (f g : R[X]), f.natDegree < g.natDegree → g.natDegree ≤ N → P f → P g → P (f + g)
c : ℕ
⊢ ∀ (f : R[X]), f.natDegree ≤ N → f.support.card = c → P f
tactic: revert f
state_before: R : Type u_1
inst✝ : Semiring R
f : R[X]
P : R[X] → Prop
N : ℕ
P_0 : P 0
P_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (C r * X ^ n)
P_C_add : ∀ (f g : R[X]), f.natDegree < g.natDegree → g.natDegree ≤ N → P f → P g → P (f + g)
c : ℕ
⊢ ∀ (f : R[X]), f.natDegree ≤ N → f.support.card = c → P f
state_after: case zero
R : Type u_1
inst✝ : Semiring R
f : R[X]
P : R[X] → Prop
N : ℕ
P_0 : P 0
P_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (C r * X ^ n)
P_C_add : ∀ (f g : R[X]), f.natDegree < g.natDegree → g.natDegree ≤ N → P f → P g → P (f + g)
⊢ ∀ (f : R[X]), f.natDegree ≤ N → f.support.card = 0 → P f

case succ
R : Type u_1
inst✝ : Semiring R
f : R[X]
P : R[X] → Prop
N : ℕ
P_0 : P 0
P_C_mul_pow : ∀ (n : ℕ) (r : R), r ≠ 0 → n ≤ N → P (C r * X ^ n)
P_C_add : ∀ (f g : R[X]), f.natDegree < g.natDegree → g.natDegree ≤ N → P f → P g → P (f + g)
c : ℕ
hc : ∀ (f : R[X]), f.natDegree ≤ N → f.support.card = c → P f
⊢ ∀ (f : R[X]), f.natDegree ≤ N → f.support.card = c + 1 → P f
tactic: induction' c with c hc
Theorem: QuasispectrumRestricts.algebraMap_image
File: Mathlib/Algebra/Algebra/Quasispectrum.lean

Proof steps:
state_before: R✝ : Type u_1
A✝ : Type u_2
inst✝¹³ : CommSemiring R✝
inst✝¹² : NonUnitalRing A✝
inst✝¹¹ : Module R✝ A✝
inst✝¹⁰ : IsScalarTower R✝ A✝ A✝
inst✝⁹ : SMulCommClass R✝ A✝ A✝
R : Type u_3
S : Type u_4
A : Type u_5
inst✝⁸ : Semifield R
inst✝⁷ : Field S
inst✝⁶ : NonUnitalRing A
inst✝⁵ : Module R A
inst✝⁴ : Module S A
inst✝³ : IsScalarTower S A A
inst✝² : SMulCommClass S A A
inst✝¹ : Algebra R S
a : A
f : S → R
inst✝ : IsScalarTower R S A
h : QuasispectrumRestricts a f
⊢ ⇑(algebraMap R S) '' quasispectrum R a = quasispectrum S a
state_after: case refine_1
R✝ : Type u_1
A✝ : Type u_2
inst✝¹³ : CommSemiring R✝
inst✝¹² : NonUnitalRing A✝
inst✝¹¹ : Module R✝ A✝
inst✝¹⁰ : IsScalarTower R✝ A✝ A✝
inst✝⁹ : SMulCommClass R✝ A✝ A✝
R : Type u_3
S : Type u_4
A : Type u_5
inst✝⁸ : Semifield R
inst✝⁷ : Field S
inst✝⁶ : NonUnitalRing A
inst✝⁵ : Module R A
inst✝⁴ : Module S A
inst✝³ : IsScalarTower S A A
inst✝² : SMulCommClass S A A
inst✝¹ : Algebra R S
a : A
f : S → R
inst✝ : IsScalarTower R S A
h : QuasispectrumRestricts a f
⊢ ⇑(algebraMap R S) '' quasispectrum R a ⊆ quasispectrum S a

case refine_2
R✝ : Type u_1
A✝ : Type u_2
inst✝¹³ : CommSemiring R✝
inst✝¹² : NonUnitalRing A✝
inst✝¹¹ : Module R✝ A✝
inst✝¹⁰ : IsScalarTower R✝ A✝ A✝
inst✝⁹ : SMulCommClass R✝ A✝ A✝
R : Type u_3
S : Type u_4
A : Type u_5
inst✝⁸ : Semifield R
inst✝⁷ : Field S
inst✝⁶ : NonUnitalRing A
inst✝⁵ : Module R A
inst✝⁴ : Module S A
inst✝³ : IsScalarTower S A A
inst✝² : SMulCommClass S A A
inst✝¹ : Algebra R S
a : A
f : S → R
inst✝ : IsScalarTower R S A
h : QuasispectrumRestricts a f
s : S
hs : s ∈ quasispectrum S a
⊢ f s ∈ quasispectrum R a ∧ (algebraMap R S) (f s) = s
tactic: refine Set.eq_of_subset_of_subset ?_ fun s hs => ⟨f s, ?_⟩
state_before: case refine_2
R✝ : Type u_1
A✝ : Type u_2
inst✝¹³ : CommSemiring R✝
inst✝¹² : NonUnitalRing A✝
inst✝¹¹ : Module R✝ A✝
inst✝¹⁰ : IsScalarTower R✝ A✝ A✝
inst✝⁹ : SMulCommClass R✝ A✝ A✝
R : Type u_3
S : Type u_4
A : Type u_5
inst✝⁸ : Semifield R
inst✝⁷ : Field S
inst✝⁶ : NonUnitalRing A
inst✝⁵ : Module R A
inst✝⁴ : Module S A
inst✝³ : IsScalarTower S A A
inst✝² : SMulCommClass S A A
inst✝¹ : Algebra R S
a : A
f : S → R
inst✝ : IsScalarTower R S A
h : QuasispectrumRestricts a f
s : S
hs : s ∈ quasispectrum S a
⊢ f s ∈ quasispectrum R a ∧ (algebraMap R S) (f s) = s
state_after: no goals
tactic: exact ⟨quasispectrum.of_algebraMap_mem S ((h.rightInvOn hs).symm ▸ hs), h.rightInvOn hs⟩
Theorem: Finsupp.sum_add_index_of_disjoint
File: Mathlib/Algebra/BigOperators/Finsupp.lean

Proof steps:
state_before: α : Type u_1
ι : Type u_2
γ : Type u_3
A : Type u_4
B : Type u_5
C : Type u_6
inst✝⁴ : AddCommMonoid A
inst✝³ : AddCommMonoid B
inst✝² : AddCommMonoid C
t : ι → A → C
h0 : ∀ (i : ι), t i 0 = 0
h1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y
s : Finset α
f : α → ι →₀ A
i : ι
g✝ : ι →₀ A
k : ι → A → γ → B
x : γ
β✝ : Type u_7
M : Type u_8
M' : Type u_9
N : Type u_10
P : Type u_11
G : Type u_12
H : Type u_13
R : Type u_14
S : Type u_15
inst✝¹ : AddCommMonoid M
f1 f2 : α →₀ M
hd : Disjoint f1.support f2.support
β : Type u_16
inst✝ : CommMonoid β
g : α → M → β
⊢ (f1 + f2).prod g = f1.prod g * f2.prod g
state_after: α : Type u_1
ι : Type u_2
γ : Type u_3
A : Type u_4
B : Type u_5
C : Type u_6
inst✝⁴ : AddCommMonoid A
inst✝³ : AddCommMonoid B
inst✝² : AddCommMonoid C
t : ι → A → C
h0 : ∀ (i : ι), t i 0 = 0
h1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y
s : Finset α
f : α → ι →₀ A
i : ι
g✝ : ι →₀ A
k : ι → A → γ → B
x : γ
β✝ : Type u_7
M : Type u_8
M' : Type u_9
N : Type u_10
P : Type u_11
G : Type u_12
H : Type u_13
R : Type u_14
S : Type u_15
inst✝¹ : AddCommMonoid M
f1 f2 : α →₀ M
hd : Disjoint f1.support f2.support
β : Type u_16
inst✝ : CommMonoid β
g : α → M → β
this : ∀ {f1 f2 : α →₀ M}, Disjoint f1.support f2.support → ∏ x ∈ f1.support, g x (f1 x + f2 x) = f1.prod g
⊢ (f1 + f2).prod g = f1.prod g * f2.prod g
tactic: have :
    ∀ {f1 f2 : α →₀ M},
      Disjoint f1.support f2.support → (∏ x ∈ f1.support, g x (f1 x + f2 x)) = f1.prod g :=
    fun hd =>
    Finset.prod_congr rfl fun x hx => by
      simp only [not_mem_support_iff.mp (disjoint_left.mp hd hx), add_zero]
state_before: α : Type u_1
ι : Type u_2
γ : Type u_3
A : Type u_4
B : Type u_5
C : Type u_6
inst✝⁴ : AddCommMonoid A
inst✝³ : AddCommMonoid B
inst✝² : AddCommMonoid C
t : ι → A → C
h0 : ∀ (i : ι), t i 0 = 0
h1 : ∀ (i : ι) (x y : A), t i (x + y) = t i x + t i y
s : Finset α
f : α → ι →₀ A
i : ι
g✝ : ι →₀ A
k : ι → A → γ → B
x : γ
β✝ : Type u_7
M : Type u_8
M' : Type u_9
N : Type u_10
P : Type u_11
G : Type u_12
H : Type u_13
R : Type u_14
S : Type u_15
inst✝¹ : AddCommMonoid M
f1 f2 : α →₀ M
hd : Disjoint f1.support f2.support
β : Type u_16
inst✝ : CommMonoid β
g : α → M → β
this : ∀ {f1 f2 : α →₀ M}, Disjoint f1.support f2.support → ∏ x ∈ f1.support, g x (f1 x + f2 x) = f1.prod g
⊢ (f1 + f2).prod g = f1.prod g * f2.prod g
state_after: no goals
tactic: classical simp_rw [← this hd, ← this hd.symm, add_comm (f2 _), Finsupp.prod, support_add_eq hd,
      prod_union hd, add_apply]