ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Multiset.fold_cons_right
File: Mathlib/Data/Multiset/Fold.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
op : α → α → α
hc : Std.Commutative op
ha : Std.Associative op
b a : α
s : Multiset α
⊢ fold op b (a ::ₘ s) = op (fold op b s) a
state_after: no goals
tactic: simp [hc.comm]
Theorem: Matroid.sum'_indep_iff
File: Mathlib/Data/Matroid/Sum.lean

Proof steps:
state_before: α : Type u_1
ι : Type u_2
M : ι → Matroid α
I : Set (ι × α)
⊢ (Matroid.sum' M).Indep I ↔ ∀ (i : ι), (M i).Indep (Prod.mk i ⁻¹' I)
state_after: α : Type u_1
ι : Type u_2
M : ι → Matroid α
I : Set (ι × α)
⊢ (∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' ((fun a => ⟨a.1, a.2⟩) '' I))) ↔ ∀ (i : ι), (M i).Indep (Prod.mk i ⁻¹' I)
tactic: simp only [Matroid.sum', mapEquiv_indep_iff, Equiv.sigmaEquivProd_symm_apply, sigma_indep_iff]
state_before: α : Type u_1
ι : Type u_2
M : ι → Matroid α
I : Set (ι × α)
⊢ (∀ (i : ι), (M i).Indep (Sigma.mk i ⁻¹' ((fun a => ⟨a.1, a.2⟩) '' I))) ↔ ∀ (i : ι), (M i).Indep (Prod.mk i ⁻¹' I)
state_after: case h.e'_2.h.h.e'_3
α : Type u_1
ι : Type u_2
M : ι → Matroid α
I : Set (ι × α)
a✝ : ι
⊢ Prod.mk a✝ ⁻¹' I = Sigma.mk a✝ ⁻¹' ((fun a => ⟨a.1, a.2⟩) '' I)
tactic: convert Iff.rfl
state_before: case h.e'_2.h.h.e'_3
α : Type u_1
ι : Type u_2
M : ι → Matroid α
I : Set (ι × α)
a✝ : ι
⊢ Prod.mk a✝ ⁻¹' I = Sigma.mk a✝ ⁻¹' ((fun a => ⟨a.1, a.2⟩) '' I)
state_after: case h.e'_2.h.h.e'_3.h
α : Type u_1
ι : Type u_2
M : ι → Matroid α
I : Set (ι × α)
a✝ : ι
x✝ : α
⊢ x✝ ∈ Prod.mk a✝ ⁻¹' I ↔ x✝ ∈ Sigma.mk a✝ ⁻¹' ((fun a => ⟨a.1, a.2⟩) '' I)
tactic: ext
state_before: case h.e'_2.h.h.e'_3.h
α : Type u_1
ι : Type u_2
M : ι → Matroid α
I : Set (ι × α)
a✝ : ι
x✝ : α
⊢ x✝ ∈ Prod.mk a✝ ⁻¹' I ↔ x✝ ∈ Sigma.mk a✝ ⁻¹' ((fun a => ⟨a.1, a.2⟩) '' I)
state_after: no goals
tactic: simp
Theorem: mul_smul_one
File: Mathlib/Algebra/Group/Action/Defs.lean

Proof steps:
state_before: M✝ : Type u_1
N✝ : Type u_2
G : Type u_3
H : Type u_4
A : Type u_5
B : Type u_6
α : Type u_7
β : Type u_8
γ : Type u_9
δ : Type u_10
M : Type u_11
N : Type u_12
inst✝² : MulOneClass N
inst✝¹ : SMul M N
inst✝ : SMulCommClass M N N
x : M
y : N
⊢ y * x • 1 = x • y
state_after: no goals
tactic: rw [← smul_eq_mul, ← smul_comm, smul_eq_mul, mul_one]
Theorem: LinearMap.compQuadraticMap_polar
File: Mathlib/LinearAlgebra/QuadraticForm/Basic.lean

Proof steps:
state_before: S : Type u_1
T : Type u_2
R : Type u_3
M : Type u_4
N : Type u_5
P : Type u_6
A : Type u_7
inst✝¹³ : CommRing R
inst✝¹² : AddCommGroup M
inst✝¹¹ : AddCommGroup N
inst✝¹⁰ : Module R M
inst✝⁹ : Module R N
B : BilinMap R M N
N' : Type u_8
inst✝⁸ : AddCommGroup N'
inst✝⁷ : Module R N'
inst✝⁶ : CommSemiring S
inst✝⁵ : Algebra S R
inst✝⁴ : Module S N
inst✝³ : Module S N'
inst✝² : IsScalarTower S R N
inst✝¹ : Module S M
inst✝ : IsScalarTower S R M
f : N →ₗ[S] N'
Q : QuadraticMap R M N
x y : M
⊢ polar (⇑(f.compQuadraticMap' Q)) x y = f (polar (⇑Q) x y)
state_after: no goals
tactic: simp [polar]
Theorem: nonempty_embedding_to_cardinal
File: Mathlib/SetTheory/Ordinal/Basic.lean

Proof steps:
state_before: α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
σ : Type u
x✝ : Nonempty (Cardinal.{u} ↪ σ)
f : Cardinal.{u} → σ
hf : Injective f
g : σ → Cardinal.{u} := invFun f
x : σ
hx : g x = 2 ^ sum g
this : g x ≤ sum g
⊢ g x > sum g
state_after: α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
σ : Type u
x✝ : Nonempty (Cardinal.{u} ↪ σ)
f : Cardinal.{u} → σ
hf : Injective f
g : σ → Cardinal.{u} := invFun f
x : σ
hx : g x = 2 ^ sum g
this : g x ≤ sum g
⊢ 2 ^ sum g > sum g
tactic: rw [hx]
state_before: α : Type u
β : Type u_1
γ : Type u_2
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
σ : Type u
x✝ : Nonempty (Cardinal.{u} ↪ σ)
f : Cardinal.{u} → σ
hf : Injective f
g : σ → Cardinal.{u} := invFun f
x : σ
hx : g x = 2 ^ sum g
this : g x ≤ sum g
⊢ 2 ^ sum g > sum g
state_after: no goals
tactic: exact cantor _
Theorem: CategoryTheory.Limits.kernelCompMono_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✝² : HasKernel f✝
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝¹ : HasKernel f
inst✝ : Mono g
⊢ kernel.ι (f ≫ g) ≫ f = 0
state_after: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
X✝ Y✝ : C
f✝ : X✝ ⟶ Y✝
inst✝² : HasKernel f✝
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝¹ : HasKernel f
inst✝ : Mono g
⊢ (kernel.ι (f ≫ g) ≫ f) ≫ g = 0 ≫ g
tactic: rw [← cancel_mono g]
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
X✝ Y✝ : C
f✝ : X✝ ⟶ Y✝
inst✝² : HasKernel f✝
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝¹ : HasKernel f
inst✝ : Mono g
⊢ (kernel.ι (f ≫ g) ≫ f) ≫ g = 0 ≫ g
state_after: no goals
tactic: simp
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
X✝ Y✝ : C
f✝ : X✝ ⟶ Y✝
inst✝² : HasKernel f✝
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝¹ : HasKernel f
inst✝ : Mono g
⊢ kernel.ι f ≫ f ≫ g = 0
state_after: no goals
tactic: simp
Theorem: ArithmeticFunction.moebius_sq
File: Mathlib/NumberTheory/ArithmeticFunction.lean

Proof steps:
state_before: R : Type u_1
n : ℕ
⊢ μ n ^ 2 = if Squarefree n then 1 else 0
state_after: case pos
R : Type u_1
n : ℕ
h : Squarefree n
⊢ μ n ^ 2 = 1

case neg
R : Type u_1
n : ℕ
h : ¬Squarefree n
⊢ μ n ^ 2 = 0
tactic: split_ifs with h
Theorem: Cardinal.mk_arrow_eq_zero_iff
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

Proof steps:
state_before: α β : Type u
β' : Type v
⊢ #(α → β') = 0 ↔ #α ≠ 0 ∧ #β' = 0
state_after: no goals
tactic: simp_rw [mk_eq_zero_iff, mk_ne_zero_iff, isEmpty_fun]
Theorem: AddCircle.gcd_mul_addOrderOf_div_eq
File: Mathlib/Topology/Instances/AddCircle.lean

Proof steps:
state_before: 𝕜 : Type u_1
B : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q : 𝕜
hp : Fact (0 < p)
n m : ℕ
hn : 0 < n
⊢ m.gcd n * addOrderOf ↑(↑m / ↑n * p) = n
state_after: 𝕜 : Type u_1
B : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q : 𝕜
hp : Fact (0 < p)
n m : ℕ
hn : 0 < n
⊢ m.gcd n * (addOrderOf ↑(p / ↑n) / (addOrderOf ↑(p / ↑n)).gcd m) = n

case h
𝕜 : Type u_1
B : Type u_2
inst✝² : LinearOrderedField 𝕜
inst✝¹ : TopologicalSpace 𝕜
inst✝ : OrderTopology 𝕜
p q : 𝕜
hp : Fact (0 < p)
n m : ℕ
hn : 0 < n
⊢ IsOfFinAddOrder ↑(p / ↑n)
tactic: rw [mul_comm_div, ← nsmul_eq_mul, coe_nsmul, IsOfFinAddOrder.addOrderOf_nsmul]
Theorem: MeasureTheory.setLIntegral_congr_fun
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f g : α → ℝ≥0∞
s : Set α
hs : MeasurableSet s
hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → f x = g x
⊢ ∫⁻ (x : α) in s, f x ∂μ = ∫⁻ (x : α) in s, g x ∂μ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f g : α → ℝ≥0∞
s : Set α
hs : MeasurableSet s
hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → f x = g x
⊢ f =ᶠ[ae (μ.restrict s)] g
tactic: rw [lintegral_congr_ae]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f g : α → ℝ≥0∞
s : Set α
hs : MeasurableSet s
hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → f x = g x
⊢ f =ᶠ[ae (μ.restrict s)] g
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f g : α → ℝ≥0∞
s : Set α
hs : MeasurableSet s
hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → f x = g x
⊢ ∀ᵐ (x : α) ∂μ.restrict s, f x = g x
tactic: rw [EventuallyEq]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f g : α → ℝ≥0∞
s : Set α
hs : MeasurableSet s
hfg : ∀ᵐ (x : α) ∂μ, x ∈ s → f x = g x
⊢ ∀ᵐ (x : α) ∂μ.restrict s, f x = g x
state_after: no goals
tactic: rwa [ae_restrict_iff' hs]
Theorem: locallyConnectedSpace_iff_connectedComponentIn_open
File: Mathlib/Topology/Connected/LocallyConnected.lean

Proof steps:
state_before: α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
⊢ LocallyConnectedSpace α ↔ ∀ (F : Set α), IsOpen F → ∀ x ∈ F, IsOpen (connectedComponentIn F x)
state_after: case mp
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
⊢ LocallyConnectedSpace α → ∀ (F : Set α), IsOpen F → ∀ x ∈ F, IsOpen (connectedComponentIn F x)

case mpr
α : Type u
β : Type v
ι : Type u_1
π : ι → Type u_2
inst✝ : TopologicalSpace α
s t u v : Set α
⊢ (∀ (F : Set α), IsOpen F → ∀ x ∈ F, IsOpen (connectedComponentIn F x)) → LocallyConnectedSpace α
tactic: constructor
Theorem: Orientation.left_ne_zero_of_oangle_sign_eq_one
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Basic.lean

Proof steps:
state_before: V : Type u_1
V' : Type u_2
inst✝⁵ : NormedAddCommGroup V
inst✝⁴ : NormedAddCommGroup V'
inst✝³ : InnerProductSpace ℝ V
inst✝² : InnerProductSpace ℝ V'
inst✝¹ : Fact (finrank ℝ V = 2)
inst✝ : Fact (finrank ℝ V' = 2)
o : Orientation ℝ V (Fin 2)
x y : V
h : (o.oangle x y).sign = 1
⊢ 1 ≠ 0
state_after: no goals
tactic: decide
Theorem: MeasureTheory.eLpNorm_sub_le
File: Mathlib/MeasureTheory/Function/LpSeminorm/TriangleInequality.lean

Proof steps:
state_before: α : Type u_1
E : Type u_2
m : MeasurableSpace α
inst✝ : NormedAddCommGroup E
p : ℝ≥0∞
q : ℝ
μ : Measure α
f✝ g✝ f g : α → E
hf : AEStronglyMeasurable f μ
hg : AEStronglyMeasurable g μ
hp : 1 ≤ p
⊢ eLpNorm (f - g) p μ ≤ eLpNorm f p μ + eLpNorm g p μ
state_after: no goals
tactic: simpa [LpAddConst_of_one_le hp] using eLpNorm_sub_le' hf hg p
Theorem: ContinuousMap.HomotopyRel.cast_apply
File: Mathlib/Topology/Homotopy/Basic.lean

Proof steps:
state_before: F✝ : Type u_1
X : Type u
Y : Type v
Z : Type w
Z' : Type x
ι : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace Z'
f₀✝ f₁✝ f₂ : C(X, Y)
S : Set X
f₀ f₁ g₀ g₁ : C(X, Y)
F : f₀.HomotopyRel f₁ S
h₀ : f₀ = g₀
h₁ : f₁ = g₁
t : ↑I
x : X
hx : x ∈ S
⊢ { toFun := fun x => (F.cast h₀ h₁).toFun (t, x), continuous_toFun := ⋯ } x = g₀ x
state_after: no goals
tactic: simpa only [← h₀, ← h₁] using F.prop t x hx
Theorem: List.Subset.union_eq_right
File: Mathlib/Data/List/Lattice.lean

Proof steps:
state_before: α : Type u_1
l l₁ l₂ : List α
p : α → Prop
a : α
inst✝ : DecidableEq α
xs ys : List α
h : xs ⊆ ys
⊢ xs ∪ ys = ys
state_after: no goals
tactic: induction xs with
  | nil => simp
  | cons x xs ih =>
    rw [cons_union, insert_of_mem <| mem_union_right _ <| h <| mem_cons_self _ _,
      ih <| subset_of_cons_subset h]
Theorem: MeasureTheory.Measure.rnDeriv_add'
File: Mathlib/MeasureTheory/Decomposition/Lebesgue.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν ν₁ ν₂ μ : Measure α
inst✝² : SigmaFinite ν₁
inst✝¹ : SigmaFinite ν₂
inst✝ : SigmaFinite μ
⊢ (ν₁ + ν₂).rnDeriv μ =ᶠ[ae μ] ν₁.rnDeriv μ + ν₂.rnDeriv μ
state_after: α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν ν₁ ν₂ μ : Measure α
inst✝² : SigmaFinite ν₁
inst✝¹ : SigmaFinite ν₂
inst✝ : SigmaFinite μ
⊢ μ.withDensity ((ν₁ + ν₂).rnDeriv μ) = μ.withDensity (ν₁.rnDeriv μ + ν₂.rnDeriv μ)

case hf
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν ν₁ ν₂ μ : Measure α
inst✝² : SigmaFinite ν₁
inst✝¹ : SigmaFinite ν₂
inst✝ : SigmaFinite μ
⊢ AEMeasurable ((ν₁ + ν₂).rnDeriv μ) μ

case hg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν ν₁ ν₂ μ : Measure α
inst✝² : SigmaFinite ν₁
inst✝¹ : SigmaFinite ν₂
inst✝ : SigmaFinite μ
⊢ AEMeasurable (ν₁.rnDeriv μ + ν₂.rnDeriv μ) μ
tactic: rw [← withDensity_eq_iff_of_sigmaFinite]
Theorem: intervalIntegral.integral_add_adjacent_intervals
File: Mathlib/MeasureTheory/Integral/IntervalIntegral.lean

Proof steps:
state_before: ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝² : NormedAddCommGroup E
inst✝¹ : CompleteSpace E
inst✝ : NormedSpace ℝ E
a b c d : ℝ
f g : ℝ → E
μ : Measure ℝ
hab : IntervalIntegrable f μ a b
hbc : IntervalIntegrable f μ b c
⊢ ∫ (x : ℝ) in a..b, f x ∂μ + ∫ (x : ℝ) in b..c, f x ∂μ = ∫ (x : ℝ) in a..c, f x ∂μ
state_after: no goals
tactic: rw [← add_neg_eq_zero, ← integral_symm, integral_add_adjacent_intervals_cancel hab hbc]
Theorem: NumberField.InfinitePlace.IsUnramified.stabilizer_eq_bot
File: Mathlib/NumberTheory/NumberField/Embeddings.lean

Proof steps:
state_before: k : Type u_1
inst✝⁷ : Field k
K : Type u_2
inst✝⁶ : Field K
F : Type u_3
inst✝⁵ : Field F
inst✝⁴ : NumberField K
inst✝³ : Algebra k K
inst✝² : Algebra k F
inst✝¹ : Algebra K F
inst✝ : IsScalarTower k K F
σ : K ≃ₐ[k] K
w : InfinitePlace K
h : IsUnramified k w
⊢ Stab w = ⊥
state_after: k : Type u_1
inst✝⁷ : Field k
K : Type u_2
inst✝⁶ : Field K
F : Type u_3
inst✝⁵ : Field F
inst✝⁴ : NumberField K
inst✝³ : Algebra k K
inst✝² : Algebra k F
inst✝¹ : Algebra K F
inst✝ : IsScalarTower k K F
σ : K ≃ₐ[k] K
w : InfinitePlace K
h : IsUnramified k w
⊢ ∀ ⦃x : K ≃ₐ[k] K⦄, x ∈ Stab (mk w.embedding) → x ∈ ⊥
tactic: rw [eq_bot_iff, ← mk_embedding w, SetLike.le_def]
state_before: k : Type u_1
inst✝⁷ : Field k
K : Type u_2
inst✝⁶ : Field K
F : Type u_3
inst✝⁵ : Field F
inst✝⁴ : NumberField K
inst✝³ : Algebra k K
inst✝² : Algebra k F
inst✝¹ : Algebra K F
inst✝ : IsScalarTower k K F
σ : K ≃ₐ[k] K
w : InfinitePlace K
h : IsUnramified k w
⊢ ∀ ⦃x : K ≃ₐ[k] K⦄, x ∈ Stab (mk w.embedding) → x ∈ ⊥
state_after: k : Type u_1
inst✝⁷ : Field k
K : Type u_2
inst✝⁶ : Field K
F : Type u_3
inst✝⁵ : Field F
inst✝⁴ : NumberField K
inst✝³ : Algebra k K
inst✝² : Algebra k F
inst✝¹ : Algebra K F
inst✝ : IsScalarTower k K F
σ : K ≃ₐ[k] K
w : InfinitePlace K
h : IsUnramified k w
⊢ ∀ (a : K ≃ₐ[k] K), ComplexEmbedding.IsConj w.embedding a → a = 1
tactic: simp only [mem_stabilizer_mk_iff, Subgroup.mem_bot, forall_eq_or_imp, true_and]
state_before: k : Type u_1
inst✝⁷ : Field k
K : Type u_2
inst✝⁶ : Field K
F : Type u_3
inst✝⁵ : Field F
inst✝⁴ : NumberField K
inst✝³ : Algebra k K
inst✝² : Algebra k F
inst✝¹ : Algebra K F
inst✝ : IsScalarTower k K F
σ : K ≃ₐ[k] K
w : InfinitePlace K
h : IsUnramified k w
⊢ ∀ (a : K ≃ₐ[k] K), ComplexEmbedding.IsConj w.embedding a → a = 1
state_after: no goals
tactic: exact fun σ hσ ↦ hσ.isUnramified_mk_iff.mp ((mk_embedding w).symm ▸ h)
Theorem: SimpleGraph.Walk.length_copy
File: Mathlib/Combinatorics/SimpleGraph/Walk.lean

Proof steps:
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v u' v' : V
p : G.Walk u v
hu : u = u'
hv : v = v'
⊢ (p.copy hu hv).length = p.length
state_after: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u' v' : V
p : G.Walk u' v'
⊢ (p.copy ⋯ ⋯).length = p.length
tactic: subst_vars
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u' v' : V
p : G.Walk u' v'
⊢ (p.copy ⋯ ⋯).length = p.length
state_after: no goals
tactic: rfl
Theorem: ZNum.of_nat_toZNumNeg
File: Mathlib/Data/Num/Lemmas.lean

Proof steps:
state_before: α : Type u_1
n : ℕ
⊢ (↑n).toZNumNeg = -↑n
state_after: no goals
tactic: rw [← of_nat_toZNum, Num.zneg_toZNum]
Theorem: Nat.nth_of_card_le
File: Mathlib/Data/Nat/Nth.lean

Proof steps:
state_before: p : ℕ → Prop
hf : (setOf p).Finite
n : ℕ
hn : hf.toFinset.card ≤ n
⊢ nth p n = 0
state_after: case hn
p : ℕ → Prop
hf : (setOf p).Finite
n : ℕ
hn : hf.toFinset.card ≤ n
⊢ (sort (fun x x_1 => x ≤ x_1) hf.toFinset).length ≤ n
tactic: rw [nth, dif_pos hf, List.getD_eq_default]
state_before: case hn
p : ℕ → Prop
hf : (setOf p).Finite
n : ℕ
hn : hf.toFinset.card ≤ n
⊢ (sort (fun x x_1 => x ≤ x_1) hf.toFinset).length ≤ n
state_after: no goals
tactic: rwa [Finset.length_sort]
Theorem: ProbabilityTheory.cond_inter_self
File: Mathlib/Probability/ConditionalProbability.lean

Proof steps:
state_before: Ω : Type u_1
Ω' : Type u_2
α : Type u_3
m : MeasurableSpace Ω
m' : MeasurableSpace Ω'
μ : Measure Ω
s t✝ : Set Ω
hms : MeasurableSet s
t : Set Ω
⊢ μ[|s] (s ∩ t) = μ[|s] t
state_after: no goals
tactic: rw [cond_apply _ hms, ← Set.inter_assoc, Set.inter_self, ← cond_apply _ hms]
Theorem: Num.le_to_nat
File: Mathlib/Data/Num/Lemmas.lean

Proof steps:
state_before: α : Type u_1
m n : Num
⊢ ↑m ≤ ↑n ↔ m ≤ n
state_after: α : Type u_1
m n : Num
⊢ ¬↑n < ↑m ↔ m ≤ n
tactic: rw [← not_lt]
state_before: α : Type u_1
m n : Num
⊢ ¬↑n < ↑m ↔ m ≤ n
state_after: no goals
tactic: exact not_congr lt_to_nat
Theorem: Zspan.fract_zspan_add
File: Mathlib/Algebra/Module/Zlattice/Basic.lean

Proof steps:
state_before: E : Type u_1
ι : Type u_2
K : Type u_3
inst✝⁴ : NormedLinearOrderedField K
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace K E
b : Basis ι K E
inst✝¹ : FloorRing K
inst✝ : Fintype ι
m v : E
h : v ∈ span ℤ (Set.range ⇑b)
⊢ fract b (v + m) = fract b m
state_after: no goals
tactic: classical
  refine (Basis.ext_elem_iff b).mpr fun i => ?_
  simp_rw [repr_fract_apply, Int.fract_eq_fract]
  use (b.restrictScalars ℤ).repr ⟨v, h⟩ i
  rw [map_add, Finsupp.coe_add, Pi.add_apply, add_tsub_cancel_right,
    ← eq_intCast (algebraMap ℤ K) _, Basis.restrictScalars_repr_apply, coe_mk]
Theorem: mabs_sup_div_sup_le_mabs
File: Mathlib/Algebra/Order/Group/Unbundled/Abs.lean

Proof steps:
state_before: α : Type u_1
inst✝² : Lattice α
inst✝¹ : CommGroup α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a✝ b✝ a b c : α
⊢ mabs ((a ⊔ c) / (b ⊔ c)) ≤ mabs (a / b)
state_after: α : Type u_1
inst✝² : Lattice α
inst✝¹ : CommGroup α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a✝ b✝ a b c : α
⊢ mabs ((a ⊔ c) / (b ⊔ c)) * mabs ?m.25410 ≤ mabs (a / b)
tactic: apply le_of_mul_le_of_one_le_left _ (one_le_mabs _)
state_before: α : Type u_1
inst✝² : Lattice α
inst✝¹ : CommGroup α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a✝ b✝ a b c : α
⊢ mabs ((a ⊔ c) / (b ⊔ c)) * mabs ?m.25410 ≤ mabs (a / b)
state_after: no goals
tactic: rw [mabs_div_sup_mul_mabs_div_inf]
Theorem: Set.image2_iInter₂_subset_left
File: Mathlib/Data/Set/Lattice.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
f : α → β → γ
s✝ : Set α
t✝ : Set β
s : (i : ι) → κ i → Set α
t : Set β
⊢ image2 f (⋂ i, ⋂ j, s i j) t ⊆ ⋂ i, ⋂ j, image2 f (s i j) t
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
f : α → β → γ
s✝ : Set α
t✝ : Set β
s : (i : ι) → κ i → Set α
t : Set β
⊢ ∀ (x : α), (∀ (i : ι) (i_1 : κ i), x ∈ s i i_1) → ∀ y ∈ t, ∀ (i : ι) (i_1 : κ i), f x y ∈ image2 f (s i i_1) t
tactic: simp_rw [image2_subset_iff, mem_iInter]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
ι₂ : Sort u_6
κ : ι → Sort u_7
κ₁ : ι → Sort u_8
κ₂ : ι → Sort u_9
κ' : ι' → Sort u_10
f : α → β → γ
s✝ : Set α
t✝ : Set β
s : (i : ι) → κ i → Set α
t : Set β
⊢ ∀ (x : α), (∀ (i : ι) (i_1 : κ i), x ∈ s i i_1) → ∀ y ∈ t, ∀ (i : ι) (i_1 : κ i), f x y ∈ image2 f (s i i_1) t
state_after: no goals
tactic: exact fun x hx y hy i j => mem_image2_of_mem (hx _ _) hy
Theorem: CochainComplex.HomComplex.Cochain.comp_id
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplex.lean

Proof steps:
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n✝ m n : ℤ
z₁ : Cochain F G n
⊢ z₁.comp (ofHom (𝟙 G)) ⋯ = z₁
state_after: case h
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n✝ m n : ℤ
z₁ : Cochain F G n
p q : ℤ
hpq : p + n = q
⊢ (z₁.comp (ofHom (𝟙 G)) ⋯).v p q hpq = z₁.v p q hpq
tactic: ext p q hpq
state_before: case h
C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
R : Type u_1
inst✝¹ : Ring R
inst✝ : Linear R C
F G K L : CochainComplex C ℤ
n✝ m n : ℤ
z₁ : Cochain F G n
p q : ℤ
hpq : p + n = q
⊢ (z₁.comp (ofHom (𝟙 G)) ⋯).v p q hpq = z₁.v p q hpq
state_after: no goals
tactic: simp only [comp_zero_cochain_v, ofHom_v, HomologicalComplex.id_f, comp_id]
Theorem: IsUpperSet.add_left
File: Mathlib/Algebra/Order/UpperLower.lean

Proof steps:
state_before: α : Type u_1
inst✝ : OrderedCommGroup α
s t : Set α
a : α
ht : IsUpperSet t
⊢ IsUpperSet (s * t)
state_after: α : Type u_1
inst✝ : OrderedCommGroup α
s t : Set α
a : α
ht : IsUpperSet t
⊢ IsUpperSet (⋃ a ∈ s, a • t)
tactic: rw [← smul_eq_mul, ← Set.iUnion_smul_set]
state_before: α : Type u_1
inst✝ : OrderedCommGroup α
s t : Set α
a : α
ht : IsUpperSet t
⊢ IsUpperSet (⋃ a ∈ s, a • t)
state_after: no goals
tactic: exact isUpperSet_iUnion₂ fun x _ ↦ ht.smul
Theorem: AlgebraicGeometry.Scheme.Pullback.t'_fst_fst_fst
File: Mathlib/AlgebraicGeometry/Pullbacks.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X Y Z : Scheme
𝒰 : X.OpenCover
f : X ⟶ Z
g : Y ⟶ Z
inst✝ : ∀ (i : 𝒰.J), HasPullback (𝒰.map i ≫ f) g
i j k : 𝒰.J
⊢ t' 𝒰 f g i j k ≫
      pullback.fst (fV 𝒰 f g j k) (fV 𝒰 f g j i) ≫
        pullback.fst (pullback.fst (𝒰.map j ≫ f) g ≫ 𝒰.map j) (𝒰.map k) ≫ pullback.fst (𝒰.map j ≫ f) g =
    pullback.fst (fV 𝒰 f g i j) (fV 𝒰 f g i k) ≫ pullback.snd (pullback.fst (𝒰.map i ≫ f) g ≫ 𝒰.map i) (𝒰.map j)
state_after: no goals
tactic: simp only [t', Category.assoc, pullbackSymmetry_hom_comp_fst_assoc,
    pullbackRightPullbackFstIso_inv_snd_fst_assoc, pullback.lift_fst_assoc, t_fst_fst,
    pullbackRightPullbackFstIso_hom_fst_assoc]
Theorem: Polynomial.div_C_mul
File: Mathlib/Algebra/Polynomial/FieldDivision.lean

Proof steps:
state_before: R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p q : R[X]
⊢ p / (C a * q) = C a⁻¹ * (p / q)
state_after: case pos
R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p q : R[X]
ha : a = 0
⊢ p / (C a * q) = C a⁻¹ * (p / q)

case neg
R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p q : R[X]
ha : ¬a = 0
⊢ p / (C a * q) = C a⁻¹ * (p / q)
tactic: by_cases ha : a = 0
state_before: case neg
R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p q : R[X]
ha : ¬a = 0
⊢ p / (C a * q) = C a⁻¹ * (p / q)
state_after: case neg
R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p q : R[X]
ha : ¬a = 0
⊢ C a⁻¹ * (C q.leadingCoeff⁻¹ * (p /ₘ (C a * (q * (C a⁻¹ * C q.leadingCoeff⁻¹))))) =
    C a⁻¹ * (C q.leadingCoeff⁻¹ * (p /ₘ (q * C q.leadingCoeff⁻¹)))
tactic: simp only [div_def, leadingCoeff_mul, mul_inv, leadingCoeff_C, C.map_mul, mul_assoc]
state_before: case neg
R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p q : R[X]
ha : ¬a = 0
⊢ C a⁻¹ * (C q.leadingCoeff⁻¹ * (p /ₘ (C a * (q * (C a⁻¹ * C q.leadingCoeff⁻¹))))) =
    C a⁻¹ * (C q.leadingCoeff⁻¹ * (p /ₘ (q * C q.leadingCoeff⁻¹)))
state_after: case neg.e_a.e_a.e_q
R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p q : R[X]
ha : ¬a = 0
⊢ C a * (q * (C a⁻¹ * C q.leadingCoeff⁻¹)) = q * C q.leadingCoeff⁻¹
tactic: congr 3
state_before: case neg.e_a.e_a.e_q
R : Type u
S : Type v
k : Type y
A : Type z
a b : R
n : ℕ
inst✝ : Field R
p q : R[X]
ha : ¬a = 0
⊢ C a * (q * (C a⁻¹ * C q.leadingCoeff⁻¹)) = q * C q.leadingCoeff⁻¹
state_after: no goals
tactic: rw [mul_left_comm q, ← mul_assoc, ← C.map_mul, mul_inv_cancel ha, C.map_one, one_mul]
Theorem: finsum_mem_union''
File: Mathlib/Algebra/BigOperators/Finprod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f g : α → M
a b : α
s t : Set α
hst : Disjoint (s ∩ mulSupport f) (t ∩ mulSupport f)
hs : (s ∩ mulSupport f).Finite
ht : (t ∩ mulSupport f).Finite
⊢ ∏ᶠ (i : α) (_ : i ∈ s ∪ t), f i = (∏ᶠ (i : α) (_ : i ∈ s), f i) * ∏ᶠ (i : α) (_ : i ∈ t), f i
state_after: no goals
tactic: rw [← finprod_mem_inter_mulSupport f s, ← finprod_mem_inter_mulSupport f t, ←
    finprod_mem_union hst hs ht, ← union_inter_distrib_right, finprod_mem_inter_mulSupport]