ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: IntermediateField.biSup_adjoin_simple
File: Mathlib/FieldTheory/Adjoin.lean

Proof steps:
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
⊢ ⨆ x ∈ S, F⟮x⟯ = adjoin F S
state_after: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
⊢ adjoin F (⨆ t ∈ S, {t}) = adjoin F S
tactic: rw [← iSup_subtype'', ← gc.l_iSup, iSup_subtype'']
state_before: F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
⊢ adjoin F (⨆ t ∈ S, {t}) = adjoin F S
state_after: case e_S
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
⊢ ⨆ t ∈ S, {t} = S
tactic: congr
state_before: case e_S
F : Type u_1
inst✝² : Field F
E : Type u_2
inst✝¹ : Field E
inst✝ : Algebra F E
S : Set E
α : E
⊢ ⨆ t ∈ S, {t} = S
state_after: no goals
tactic: exact S.biUnion_of_singleton
Theorem: AffineSubspace.mem_perpBisector_iff_dist_eq
File: Mathlib/Geometry/Euclidean/PerpBisector.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
c c₁ c₂ p₁ p₂ : P
⊢ c ∈ perpBisector p₁ p₂ ↔ dist c p₁ = dist c p₂
state_after: no goals
tactic: rw [dist_eq_norm_vsub V, dist_eq_norm_vsub V, ← real_inner_add_sub_eq_zero_iff,
    vsub_sub_vsub_cancel_left, inner_add_left, add_eq_zero_iff_eq_neg, ← inner_neg_right,
    neg_vsub_eq_vsub_rev, mem_perpBisector_iff_inner_eq_inner]
Theorem: Cardinal.mk_coe_finset
File: Mathlib/SetTheory/Cardinal/Basic.lean

Proof steps:
state_before: α✝ β α : Type u
s : Finset α
⊢ #{ x // x ∈ s } = ↑s.card
state_after: no goals
tactic: simp
Theorem: variationOnFromTo.antitoneOn
File: Mathlib/Analysis/BoundedVariation.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : α → E
s : Set α
hf : LocallyBoundedVariationOn f s
b : α
bs : b ∈ s
⊢ AntitoneOn (fun a => variationOnFromTo f s a b) s
state_after: α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : α → E
s : Set α
hf : LocallyBoundedVariationOn f s
b : α
bs : b ∈ s
a : α
as : a ∈ s
c : α
cs : c ∈ s
ac : a ≤ c
⊢ (fun a => variationOnFromTo f s a b) c ≤ (fun a => variationOnFromTo f s a b) a
tactic: rintro a as c cs ac
state_before: α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : α → E
s : Set α
hf : LocallyBoundedVariationOn f s
b : α
bs : b ∈ s
a : α
as : a ∈ s
c : α
cs : c ∈ s
ac : a ≤ c
⊢ (fun a => variationOnFromTo f s a b) c ≤ (fun a => variationOnFromTo f s a b) a
state_after: α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : α → E
s : Set α
hf : LocallyBoundedVariationOn f s
b : α
bs : b ∈ s
a : α
as : a ∈ s
c : α
cs : c ∈ s
ac : a ≤ c
⊢ variationOnFromTo f s c b ≤ variationOnFromTo f s a b
tactic: dsimp only
state_before: α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : α → E
s : Set α
hf : LocallyBoundedVariationOn f s
b : α
bs : b ∈ s
a : α
as : a ∈ s
c : α
cs : c ∈ s
ac : a ≤ c
⊢ variationOnFromTo f s c b ≤ variationOnFromTo f s a b
state_after: α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : α → E
s : Set α
hf : LocallyBoundedVariationOn f s
b : α
bs : b ∈ s
a : α
as : a ∈ s
c : α
cs : c ∈ s
ac : a ≤ c
⊢ variationOnFromTo f s c b ≤ variationOnFromTo f s a c + variationOnFromTo f s c b
tactic: rw [← variationOnFromTo.add hf as cs bs]
state_before: α : Type u_1
inst✝¹ : LinearOrder α
E : Type u_2
inst✝ : PseudoEMetricSpace E
f : α → E
s : Set α
hf : LocallyBoundedVariationOn f s
b : α
bs : b ∈ s
a : α
as : a ∈ s
c : α
cs : c ∈ s
ac : a ≤ c
⊢ variationOnFromTo f s c b ≤ variationOnFromTo f s a c + variationOnFromTo f s c b
state_after: no goals
tactic: exact le_add_of_nonneg_left (variationOnFromTo.nonneg_of_le f s ac)
Theorem: PartENat.card_eq_coe_natCard
File: Mathlib/Data/Finite/Card.lean

Proof steps:
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Finite α
⊢ card α = ↑(Nat.card α)
state_after: α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Finite α
⊢ Cardinal.toPartENat (Cardinal.mk α) = ↑(Nat.card α)
tactic: unfold PartENat.card
state_before: α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Finite α
⊢ Cardinal.toPartENat (Cardinal.mk α) = ↑(Nat.card α)
state_after: case a
α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Finite α
⊢ ↑(Nat.card α) = Cardinal.toPartENat (Cardinal.mk α)
tactic: apply symm
state_before: case a
α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Finite α
⊢ ↑(Nat.card α) = Cardinal.toPartENat (Cardinal.mk α)
state_after: case a
α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Finite α
⊢ ↑(Nat.card α) = Cardinal.mk α
tactic: rw [Cardinal.natCast_eq_toPartENat_iff]
state_before: case a
α✝ : Type u_1
β : Type u_2
γ : Type u_3
α : Type u_4
inst✝ : Finite α
⊢ ↑(Nat.card α) = Cardinal.mk α
state_after: no goals
tactic: exact Finite.cast_card_eq_mk
Theorem: Real.inner_le_Lp_mul_Lq
File: Mathlib/Analysis/MeanInequalities.lean

Proof steps:
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ
p q : ℝ
hpq : p.IsConjExponent q
⊢ ∑ i ∈ s, f i * g i ≤ (∑ i ∈ s, |f i| ^ p) ^ (1 / p) * (∑ i ∈ s, |g i| ^ q) ^ (1 / q)
state_after: ι : Type u
s : Finset ι
f g : ι → ℝ
p q : ℝ
hpq : p.IsConjExponent q
this :
  ↑(∑ i ∈ s, (fun i => ⟨|f i|, ⋯⟩) i * (fun i => ⟨|g i|, ⋯⟩) i) ≤
    ↑((∑ i ∈ s, (fun i => ⟨|f i|, ⋯⟩) i ^ p) ^ (1 / p) * (∑ i ∈ s, (fun i => ⟨|g i|, ⋯⟩) i ^ q) ^ (1 / q))
⊢ ∑ i ∈ s, f i * g i ≤ (∑ i ∈ s, |f i| ^ p) ^ (1 / p) * (∑ i ∈ s, |g i| ^ q) ^ (1 / q)
tactic: have :=
    NNReal.coe_le_coe.2
      (NNReal.inner_le_Lp_mul_Lq s (fun i => ⟨_, abs_nonneg (f i)⟩) (fun i => ⟨_, abs_nonneg (g i)⟩)
        hpq)
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ
p q : ℝ
hpq : p.IsConjExponent q
this :
  ↑(∑ i ∈ s, (fun i => ⟨|f i|, ⋯⟩) i * (fun i => ⟨|g i|, ⋯⟩) i) ≤
    ↑((∑ i ∈ s, (fun i => ⟨|f i|, ⋯⟩) i ^ p) ^ (1 / p) * (∑ i ∈ s, (fun i => ⟨|g i|, ⋯⟩) i ^ q) ^ (1 / q))
⊢ ∑ i ∈ s, f i * g i ≤ (∑ i ∈ s, |f i| ^ p) ^ (1 / p) * (∑ i ∈ s, |g i| ^ q) ^ (1 / q)
state_after: ι : Type u
s : Finset ι
f g : ι → ℝ
p q : ℝ
hpq : p.IsConjExponent q
this : ∑ x ∈ s, |f x| * |g x| ≤ (∑ x ∈ s, |f x| ^ p) ^ (1 / p) * (∑ x ∈ s, |g x| ^ q) ^ (1 / q)
⊢ ∑ i ∈ s, f i * g i ≤ (∑ i ∈ s, |f i| ^ p) ^ (1 / p) * (∑ i ∈ s, |g i| ^ q) ^ (1 / q)
tactic: push_cast at this
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ
p q : ℝ
hpq : p.IsConjExponent q
this : ∑ x ∈ s, |f x| * |g x| ≤ (∑ x ∈ s, |f x| ^ p) ^ (1 / p) * (∑ x ∈ s, |g x| ^ q) ^ (1 / q)
⊢ ∑ i ∈ s, f i * g i ≤ (∑ i ∈ s, |f i| ^ p) ^ (1 / p) * (∑ i ∈ s, |g i| ^ q) ^ (1 / q)
state_after: ι : Type u
s : Finset ι
f g : ι → ℝ
p q : ℝ
hpq : p.IsConjExponent q
this : ∑ x ∈ s, |f x| * |g x| ≤ (∑ x ∈ s, |f x| ^ p) ^ (1 / p) * (∑ x ∈ s, |g x| ^ q) ^ (1 / q)
i : ι
x✝ : i ∈ s
⊢ f i * g i ≤ |f i| * |g i|
tactic: refine le_trans (sum_le_sum fun i _ => ?_) this
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ
p q : ℝ
hpq : p.IsConjExponent q
this : ∑ x ∈ s, |f x| * |g x| ≤ (∑ x ∈ s, |f x| ^ p) ^ (1 / p) * (∑ x ∈ s, |g x| ^ q) ^ (1 / q)
i : ι
x✝ : i ∈ s
⊢ f i * g i ≤ |f i| * |g i|
state_after: no goals
tactic: simp only [← abs_mul, le_abs_self]
Theorem: MonotoneOn.mapsTo_Iic
File: Mathlib/Order/Interval/Set/Image.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
f : α → β
inst✝¹ : Preorder α
inst✝ : Preorder β
a b : α
h : MonotoneOn f (Iic b)
x✝¹ : α
x✝ : x✝¹ ∈ Iic b
⊢ f x✝¹ ∈ Iic (f b)
state_after: no goals
tactic: aesop
Theorem: ContinuousMap.not_mem_idealOfSet
File: Mathlib/Topology/ContinuousFunction/Ideals.lean

Proof steps:
state_before: X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
s : Set X
f : C(X, R)
⊢ f ∉ idealOfSet R s ↔ ∃ x ∈ sᶜ, f x ≠ 0
state_after: X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
s : Set X
f : C(X, R)
⊢ (¬∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0) ↔ ∃ x ∈ sᶜ, f x ≠ 0
tactic: simp_rw [mem_idealOfSet]
state_before: X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
s : Set X
f : C(X, R)
⊢ (¬∀ ⦃x : X⦄, x ∈ sᶜ → f x = 0) ↔ ∃ x ∈ sᶜ, f x ≠ 0
state_after: X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
s : Set X
f : C(X, R)
⊢ (∃ x ∈ sᶜ, f x ≠ 0) ↔ ∃ x ∈ sᶜ, f x ≠ 0
tactic: push_neg
state_before: X : Type u_1
R : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : Semiring R
inst✝¹ : TopologicalSpace R
inst✝ : TopologicalSemiring R
s : Set X
f : C(X, R)
⊢ (∃ x ∈ sᶜ, f x ≠ 0) ↔ ∃ x ∈ sᶜ, f x ≠ 0
state_after: no goals
tactic: rfl
Theorem: List.tendsto_nhds
File: Mathlib/Topology/List.lean

Proof steps:
state_before: α : Type u_1
β✝ : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β✝
β : Type u_3
f : List α → β
r : List α → Filter β
h_nil : Tendsto f (pure []) (r [])
h_cons : ∀ (l : List α) (a : α), Tendsto f (𝓝 l) (r l) → Tendsto (fun p => f (p.1 :: p.2)) (𝓝 a ×ˢ 𝓝 l) (r (a :: l))
⊢ Tendsto f (𝓝 []) (r [])
state_after: no goals
tactic: rwa [nhds_nil]
state_before: α : Type u_1
β✝ : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β✝
β : Type u_3
f : List α → β
r : List α → Filter β
h_nil : Tendsto f (pure []) (r [])
h_cons : ∀ (l : List α) (a : α), Tendsto f (𝓝 l) (r l) → Tendsto (fun p => f (p.1 :: p.2)) (𝓝 a ×ˢ 𝓝 l) (r (a :: l))
a : α
l : List α
⊢ Tendsto f (𝓝 (a :: l)) (r (a :: l))
state_after: α : Type u_1
β✝ : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β✝
β : Type u_3
f : List α → β
r : List α → Filter β
h_nil : Tendsto f (pure []) (r [])
h_cons : ∀ (l : List α) (a : α), Tendsto f (𝓝 l) (r l) → Tendsto (fun p => f (p.1 :: p.2)) (𝓝 a ×ˢ 𝓝 l) (r (a :: l))
a : α
l : List α
⊢ Tendsto (fun p => f (p.1 :: p.2)) (𝓝 a ×ˢ 𝓝 l) (r (a :: l))
tactic: rw [tendsto_cons_iff]
state_before: α : Type u_1
β✝ : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β✝
β : Type u_3
f : List α → β
r : List α → Filter β
h_nil : Tendsto f (pure []) (r [])
h_cons : ∀ (l : List α) (a : α), Tendsto f (𝓝 l) (r l) → Tendsto (fun p => f (p.1 :: p.2)) (𝓝 a ×ˢ 𝓝 l) (r (a :: l))
a : α
l : List α
⊢ Tendsto (fun p => f (p.1 :: p.2)) (𝓝 a ×ˢ 𝓝 l) (r (a :: l))
state_after: no goals
tactic: exact h_cons l a (@tendsto_nhds _ _ _ h_nil h_cons l)
Theorem: add_right_eq_self
File: Mathlib/Algebra/Group/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M✝ : Type u_4
M : Type u
inst✝ : LeftCancelMonoid M
a b : M
⊢ a * b = a ↔ a * b = a * 1
state_after: no goals
tactic: rw [mul_one]
Theorem: MeasureTheory.Integrable.edist_toL1_toL1
File: Mathlib/MeasureTheory/Function/L1Space.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g : α → β
hf : Integrable f μ
hg : Integrable g μ
⊢ edist (toL1 f hf) (toL1 g hg) = ∫⁻ (a : α), edist (f a) (g a) ∂μ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g : α → β
hf : Integrable f μ
hg : Integrable g μ
⊢ (if 1 = ⊤ then eLpNormEssSup (f - g) μ else ∫⁻ (a : α), ↑‖f a - g a‖₊ ∂μ) = ∫⁻ (a : α), edist (f a) (g a) ∂μ
tactic: simp only [toL1, Lp.edist_toLp_toLp, eLpNorm, one_ne_zero, eLpNorm', Pi.sub_apply, one_toReal,
    ENNReal.rpow_one, ne_eq, not_false_eq_true, div_self, ite_false]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g : α → β
hf : Integrable f μ
hg : Integrable g μ
⊢ (if 1 = ⊤ then eLpNormEssSup (f - g) μ else ∫⁻ (a : α), ↑‖f a - g a‖₊ ∂μ) = ∫⁻ (a : α), edist (f a) (g a) ∂μ
state_after: no goals
tactic: simp [edist_eq_coe_nnnorm_sub]
Theorem: rank_quotient_add_rank_of_divisionRing
File: Mathlib/LinearAlgebra/Dimension/DivisionRing.lean

Proof steps:
state_before: K R : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type u_1
inst✝⁶ : DivisionRing K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
inst✝³ : AddCommGroup V'
inst✝² : Module K V'
inst✝¹ : AddCommGroup V₁
inst✝ : Module K V₁
p : Submodule K V
⊢ Module.rank K (V ⧸ p) + Module.rank K ↥p = Module.rank K V
state_after: no goals
tactic: classical
    let ⟨f⟩ := quotient_prod_linearEquiv p
    exact rank_prod'.symm.trans f.rank_eq
Theorem: Polynomial.coe_mul
File: Mathlib/RingTheory/PowerSeries/Basic.lean

Proof steps:
state_before: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
φ ψ : R[X]
n : ℕ
⊢ (PowerSeries.coeff R n) ↑(φ * ψ) = (PowerSeries.coeff R n) (↑φ * ↑ψ)
state_after: no goals
tactic: simp only [coeff_coe, PowerSeries.coeff_mul, coeff_mul]
Theorem: Matroid.restrict_strictRestriction
File: Mathlib/Data/Matroid/Restrict.lean

Proof steps:
state_before: α : Type u_1
M✝ : Matroid α
R I J X Y : Set α
N M : Matroid α
hR : R ⊂ M.E
⊢ M ↾ R <r M
state_after: α : Type u_1
M✝ : Matroid α
R I J X Y : Set α
N M : Matroid α
hR : R ⊂ M.E
h : M ↾ R = M
⊢ False
tactic: refine (M.restrict_restriction R hR.subset).strictRestriction_of_ne (fun h ↦ ?_)
state_before: α : Type u_1
M✝ : Matroid α
R I J X Y : Set α
N M : Matroid α
hR : R ⊂ M.E
h : M ↾ R = M
⊢ False
state_after: α : Type u_1
M✝ : Matroid α
R I J X Y : Set α
N M : Matroid α
hR : R ⊂ R
h : M ↾ R = M
⊢ False
tactic: rw [← h, restrict_ground_eq] at hR
state_before: α : Type u_1
M✝ : Matroid α
R I J X Y : Set α
N M : Matroid α
hR : R ⊂ R
h : M ↾ R = M
⊢ False
state_after: no goals
tactic: exact hR.ne rfl
Theorem: MeasureTheory.lintegral_eq_zero_of_isAddLeftInvariant
File: Mathlib/MeasureTheory/Group/LIntegral.lean

Proof steps:
state_before: G : Type u_1
inst✝⁷ : MeasurableSpace G
μ : Measure G
g : G
inst✝⁶ : TopologicalSpace G
inst✝⁵ : Group G
inst✝⁴ : TopologicalGroup G
inst✝³ : BorelSpace G
inst✝² : μ.IsMulLeftInvariant
inst✝¹ : μ.Regular
inst✝ : NeZero μ
f : G → ℝ≥0∞
hf : Continuous f
⊢ ∫⁻ (x : G), f x ∂μ = 0 ↔ f = 0
state_after: no goals
tactic: rw [lintegral_eq_zero_iff hf.measurable, hf.ae_eq_iff_eq μ continuous_zero]
Theorem: mul_div_mul_left_eq_div
File: Mathlib/Algebra/Group/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : CommGroup G
a✝ b✝ c✝ d a b c : G
⊢ c * a / (c * b) = a / b
state_after: no goals
tactic: rw [div_eq_mul_inv, mul_inv_rev, mul_comm b⁻¹ c⁻¹, mul_comm c a, mul_assoc, ← mul_assoc c,
    mul_right_inv, one_mul, div_eq_mul_inv]
Theorem: Set.eq_empty_or_encard_eq_top_or_encard_diff_singleton_lt
File: Mathlib/Data/Set/Card.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
s✝ t : Set α
a b : α
s : Set α
⊢ s = ∅ ∨ s.encard = ⊤ ∨ ∃ a ∈ s, (s \ {a}).encard < s.encard
state_after: α : Type u_1
β : Type u_2
s✝ t : Set α
a✝ b : α
s : Set α
x✝ : s.Nonempty
a : α
ha : a ∈ s
hfin : s.Finite
⊢ (s \ {a}).encard < s.encard
tactic: refine s.eq_empty_or_nonempty.elim Or.inl (Or.inr ∘ fun ⟨a,ha⟩ ↦
    (s.finite_or_infinite.elim (fun hfin ↦ Or.inr ⟨a, ha, ?_⟩) (Or.inl ∘ Infinite.encard_eq)))
state_before: α : Type u_1
β : Type u_2
s✝ t : Set α
a✝ b : α
s : Set α
x✝ : s.Nonempty
a : α
ha : a ∈ s
hfin : s.Finite
⊢ (s \ {a}).encard < s.encard
state_after: α : Type u_1
β : Type u_2
s✝ t : Set α
a✝ b : α
s : Set α
x✝ : s.Nonempty
a : α
ha : a ∈ s
hfin : s.Finite
⊢ (s \ {a}).encard < (s \ {a}).encard + 1
tactic: rw [← encard_diff_singleton_add_one ha]
state_before: α : Type u_1
β : Type u_2
s✝ t : Set α
a✝ b : α
s : Set α
x✝ : s.Nonempty
a : α
ha : a ∈ s
hfin : s.Finite
⊢ (s \ {a}).encard < (s \ {a}).encard + 1
state_after: α : Type u_1
β : Type u_2
s✝ t : Set α
a✝ b : α
s : Set α
x✝ : s.Nonempty
a : α
ha : a ∈ s
hfin : s.Finite
⊢ (s \ {a}).encard + 0 < (s \ {a}).encard + 1
tactic: nth_rw 1 [← add_zero (encard _)]
state_before: α : Type u_1
β : Type u_2
s✝ t : Set α
a✝ b : α
s : Set α
x✝ : s.Nonempty
a : α
ha : a ∈ s
hfin : s.Finite
⊢ (s \ {a}).encard + 0 < (s \ {a}).encard + 1
state_after: no goals
tactic: exact WithTop.add_lt_add_left (hfin.diff _).encard_lt_top.ne zero_lt_one
Theorem: LinearOrderedField.smul_Iic
File: Mathlib/Algebra/Order/Pointwise.lean

Proof steps:
state_before: α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
⊢ r • Iic a = Iic (r • a)
state_after: case h
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ x ∈ r • Iic a ↔ x ∈ Iic (r • a)
tactic: ext x
state_before: case h
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ x ∈ r • Iic a ↔ x ∈ Iic (r • a)
state_after: case h
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ (∃ y ∈ Iic a, r * y = x) ↔ x ∈ Iic (r * a)
tactic: simp only [mem_smul_set, smul_eq_mul, mem_Iio]
state_before: case h
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ (∃ y ∈ Iic a, r * y = x) ↔ x ∈ Iic (r * a)
state_after: case h.mp
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ (∃ y ∈ Iic a, r * y = x) → x ∈ Iic (r * a)

case h.mpr
α : Type u_1
K : Type u_2
inst✝ : LinearOrderedField K
a b r : K
hr : 0 < r
x : K
⊢ x ∈ Iic (r * a) → ∃ y ∈ Iic a, r * y = x
tactic: constructor
Theorem: Set.card_sub_le
File: Mathlib/Data/Finset/Pointwise.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Group α
s t : Set α
⊢ Nat.card ↑(s / t) ≤ Nat.card ↑s * Nat.card ↑t
state_after: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Group α
s t : Set α
⊢ Nat.card ↑(s * t⁻¹) ≤ Nat.card ↑s * Nat.card ↑t⁻¹
tactic: rw [div_eq_mul_inv, ← card_inv t]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : Group α
s t : Set α
⊢ Nat.card ↑(s * t⁻¹) ≤ Nat.card ↑s * Nat.card ↑t⁻¹
state_after: no goals
tactic: exact card_mul_le
Theorem: Filter.exists_mem_and_iff
File: Mathlib/Order/Filter/Basic.lean

Proof steps:
state_before: α : Type u
f g : Filter α
s t : Set α
P Q : Set α → Prop
hP : Antitone P
hQ : Antitone Q
⊢ ((∃ u ∈ f, P u) ∧ ∃ u ∈ f, Q u) ↔ ∃ u ∈ f, P u ∧ Q u
state_after: case mp
α : Type u
f g : Filter α
s t : Set α
P Q : Set α → Prop
hP : Antitone P
hQ : Antitone Q
⊢ ((∃ u ∈ f, P u) ∧ ∃ u ∈ f, Q u) → ∃ u ∈ f, P u ∧ Q u

case mpr
α : Type u
f g : Filter α
s t : Set α
P Q : Set α → Prop
hP : Antitone P
hQ : Antitone Q
⊢ (∃ u ∈ f, P u ∧ Q u) → (∃ u ∈ f, P u) ∧ ∃ u ∈ f, Q u
tactic: constructor
Theorem: Matrix.trace_blockDiagonal
File: Mathlib/LinearAlgebra/Matrix/Trace.lean

Proof steps:
state_before: ι : Type u_1
m : Type u_2
n : Type u_3
p : Type u_4
α : Type u_5
R : Type u_6
S : Type u_7
inst✝⁴ : Fintype m
inst✝³ : Fintype n
inst✝² : Fintype p
inst✝¹ : AddCommMonoid R
inst✝ : DecidableEq p
M : p → Matrix n n R
⊢ (blockDiagonal M).trace = ∑ i : p, (M i).trace
state_after: no goals
tactic: simp [blockDiagonal, trace, Finset.sum_comm (γ := n)]
Theorem: CategoryTheory.Limits.cokernel.mapIso_inv
File: Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean

Proof steps:
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝¹ : HasCokernel f
X' Y' : C
f' : X' ⟶ Y'
inst✝ : HasCokernel f'
p : X ≅ X'
q : Y ≅ Y'
w : f ≫ q.hom = p.hom ≫ f'
⊢ f' ≫ q.inv = p.inv ≫ f
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝¹ : HasCokernel f
X' Y' : C
f' : X' ⟶ Y'
inst✝ : HasCokernel f'
p : X ≅ X'
q : Y ≅ Y'
w : f ≫ q.hom = p.hom ≫ f'
⊢ (f' ≫ q.inv) ≫ q.hom = (p.inv ≫ f) ≫ q.hom
tactic: refine (cancel_mono q.hom).1 ?_
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝¹ : HasCokernel f
X' Y' : C
f' : X' ⟶ Y'
inst✝ : HasCokernel f'
p : X ≅ X'
q : Y ≅ Y'
w : f ≫ q.hom = p.hom ≫ f'
⊢ (f' ≫ q.inv) ≫ q.hom = (p.inv ≫ f) ≫ q.hom
state_after: no goals
tactic: simp [w]
Theorem: CategoryTheory.IsPushout.of_id_fst
File: Mathlib/CategoryTheory/Limits/Shapes/Pullback/CommSq.lean

Proof steps:
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
Z X Y P : C
f : Z ⟶ X
g : Z ⟶ Y
inl : X ⟶ P
inr : Y ⟶ P
⊢ 𝟙 Z ≫ f = f ≫ 𝟙 X
state_after: no goals
tactic: simp
Theorem: CategoryTheory.Functor.FullyFaithful.hasShift.map_add_hom_app
File: Mathlib/CategoryTheory/Shift/Basic.lean

Proof steps:
state_before: C : Type u
A : Type u_1
inst✝³ : Category.{v, u} C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : AddMonoid A
inst✝ : HasShift D A
F : C ⥤ D
hF : F.FullyFaithful
s : A → C ⥤ C
i : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i
a b : A
X : C
⊢ F.map ((add hF s i a b).hom.app X) =
    (i (a + b)).hom.app X ≫
      (shiftFunctorAdd D a b).hom.app (F.obj X) ≫ (shiftFunctor D b).map ((i a).inv.app X) ≫ (i b).inv.app ((s a).obj X)
state_after: C : Type u
A : Type u_1
inst✝³ : Category.{v, u} C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : AddMonoid A
inst✝ : HasShift D A
F : C ⥤ D
hF : F.FullyFaithful
s : A → C ⥤ C
i : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i
a b : A
X : C
⊢ F.map
      (hF.preimage
        ((i (a + b)).hom.app X ≫
          (shiftFunctorAdd D a b).hom.app (F.obj X) ≫
            𝟙 ((shiftFunctor D b).obj ((shiftFunctor D a).obj (F.obj X))) ≫
              (shiftFunctor D b).map ((i a).inv.app X) ≫
                𝟙 ((shiftFunctor D b).obj (F.obj ((s a).obj X))) ≫
                  (i b).inv.app ((s a).obj X) ≫ 𝟙 (F.obj ((s b).obj ((s a).obj X))))) =
    (i (a + b)).hom.app X ≫
      (shiftFunctorAdd D a b).hom.app (F.obj X) ≫ (shiftFunctor D b).map ((i a).inv.app X) ≫ (i b).inv.app ((s a).obj X)
tactic: dsimp [add]
state_before: C : Type u
A : Type u_1
inst✝³ : Category.{v, u} C
D : Type u_2
inst✝² : Category.{u_3, u_2} D
inst✝¹ : AddMonoid A
inst✝ : HasShift D A
F : C ⥤ D
hF : F.FullyFaithful
s : A → C ⥤ C
i : (i : A) → s i ⋙ F ≅ F ⋙ shiftFunctor D i
a b : A
X : C
⊢ F.map
      (hF.preimage
        ((i (a + b)).hom.app X ≫
          (shiftFunctorAdd D a b).hom.app (F.obj X) ≫
            𝟙 ((shiftFunctor D b).obj ((shiftFunctor D a).obj (F.obj X))) ≫
              (shiftFunctor D b).map ((i a).inv.app X) ≫
                𝟙 ((shiftFunctor D b).obj (F.obj ((s a).obj X))) ≫
                  (i b).inv.app ((s a).obj X) ≫ 𝟙 (F.obj ((s b).obj ((s a).obj X))))) =
    (i (a + b)).hom.app X ≫
      (shiftFunctorAdd D a b).hom.app (F.obj X) ≫ (shiftFunctor D b).map ((i a).inv.app X) ≫ (i b).inv.app ((s a).obj X)
state_after: no goals
tactic: simp
Theorem: MvPolynomial.monic_monomial_eq
File: Mathlib/Algebra/MvPolynomial/Basic.lean

Proof steps:
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
m : σ →₀ ℕ
⊢ (monomial m) 1 = m.prod fun n e => X n ^ e
state_after: no goals
tactic: simp [monomial_eq]
Theorem: Set.restrict_extend_range
File: Mathlib/Data/Set/Function.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
f : α → β
g : α → γ
g' : β → γ
⊢ (range f).restrict (extend f g g') = fun x => g (Exists.choose ⋯)
state_after: no goals
tactic: classical
  exact restrict_dite _ _
Theorem: dist_one_right
File: Mathlib/Analysis/Normed/Group/Basic.lean

Proof steps:
state_before: 𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝² : SeminormedGroup E
inst✝¹ : SeminormedGroup F
inst✝ : SeminormedGroup G
s : Set E
a✝ a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
a : E
⊢ dist a 1 = ‖a‖
state_after: no goals
tactic: rw [dist_eq_norm_div, div_one]