ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: FreeAddMagma.hom_ext
File: Mathlib/Algebra/Free.lean

Proof steps:
state_before: α : Type u
β : Type v
inst✝ : Mul β
f g : FreeMagma α →ₙ* β
h : ⇑f ∘ of = ⇑g ∘ of
x : FreeMagma α
⊢ ∀ (x y : FreeMagma α), f x = g x → f y = g y → f (x * y) = g (x * y)
state_after: α : Type u
β : Type v
inst✝ : Mul β
f g : FreeMagma α →ₙ* β
h : ⇑f ∘ of = ⇑g ∘ of
x x✝ y✝ : FreeMagma α
a✝¹ : f x✝ = g x✝
a✝ : f y✝ = g y✝
⊢ f (x✝ * y✝) = g (x✝ * y✝)
tactic: intros
state_before: α : Type u
β : Type v
inst✝ : Mul β
f g : FreeMagma α →ₙ* β
h : ⇑f ∘ of = ⇑g ∘ of
x x✝ y✝ : FreeMagma α
a✝¹ : f x✝ = g x✝
a✝ : f y✝ = g y✝
⊢ f (x✝ * y✝) = g (x✝ * y✝)
state_after: no goals
tactic: simp only [map_mul, *]
Theorem: semilatticeSup_mk'_partialOrder_eq_semilatticeInf_mk'_partialOrder
File: Mathlib/Order/Lattice.lean

Proof steps:
state_before: α✝ : Type u
β : Type v
α : Type u_1
inst✝¹ : Sup α
inst✝ : Inf α
sup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a
sup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)
sup_idem : ∀ (a : α), a ⊔ a = a
inf_comm : ∀ (a b : α), a ⊓ b = b ⊓ a
inf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)
inf_idem : ∀ (a : α), a ⊓ a = a
sup_inf_self : ∀ (a b : α), a ⊔ a ⊓ b = a
inf_sup_self : ∀ (a b : α), a ⊓ (a ⊔ b) = a
a b : α
h : a ⊔ b = b
⊢ b ⊓ a = a
state_after: no goals
tactic: rw [← h, inf_comm, inf_sup_self]
state_before: α✝ : Type u
β : Type v
α : Type u_1
inst✝¹ : Sup α
inst✝ : Inf α
sup_comm : ∀ (a b : α), a ⊔ b = b ⊔ a
sup_assoc : ∀ (a b c : α), a ⊔ b ⊔ c = a ⊔ (b ⊔ c)
sup_idem : ∀ (a : α), a ⊔ a = a
inf_comm : ∀ (a b : α), a ⊓ b = b ⊓ a
inf_assoc : ∀ (a b c : α), a ⊓ b ⊓ c = a ⊓ (b ⊓ c)
inf_idem : ∀ (a : α), a ⊓ a = a
sup_inf_self : ∀ (a b : α), a ⊔ a ⊓ b = a
inf_sup_self : ∀ (a b : α), a ⊓ (a ⊔ b) = a
a b : α
h : b ⊓ a = a
⊢ a ⊔ b = b
state_after: no goals
tactic: rw [← h, sup_comm, sup_inf_self]
Theorem: Batteries.RBNode.reverse_eq_iff
File: .lake/packages/batteries/Batteries/Data/RBMap/WF.lean

Proof steps:
state_before: α : Type u_1
t t' : RBNode α
⊢ t.reverse = t' ↔ t = t'.reverse
state_after: no goals
tactic: constructor <;> rintro rfl <;> simp
Theorem: Complex.sin_antiperiodic
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

Proof steps:
state_before: ⊢ Function.Antiperiodic sin ↑π
state_after: no goals
tactic: simp [sin_add]
Theorem: AddMonoidHom.coprod_comp_inr
File: Mathlib/Algebra/Group/Prod.lean

Proof steps:
state_before: A : Type u_1
B : Type u_2
G : Type u_3
H : Type u_4
M : Type u_5
N : Type u_6
P : Type u_7
inst✝² : MulOneClass M
inst✝¹ : MulOneClass N
inst✝ : CommMonoid P
f : M →* P
g : N →* P
x : N
⊢ ((f.coprod g).comp (inr M N)) x = g x
state_after: no goals
tactic: simp [coprod_apply]
Theorem: Finset.card_eq_three
File: Mathlib/Data/Finset/Card.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
⊢ s.card = 3 ↔ ∃ x y z, x ≠ y ∧ x ≠ z ∧ y ≠ z ∧ s = {x, y, z}
state_after: case mp
α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
⊢ s.card = 3 → ∃ x y z, x ≠ y ∧ x ≠ z ∧ y ≠ z ∧ s = {x, y, z}

case mpr
α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq α
⊢ (∃ x y z, x ≠ y ∧ x ≠ z ∧ y ≠ z ∧ s = {x, y, z}) → s.card = 3
tactic: constructor
Theorem: Filter.prod_pure
File: Mathlib/Order/Filter/Prod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s : Set α
t : Set β
f : Filter α
g : Filter β
b : β
⊢ f ×ˢ pure b = map (fun a => (a, b)) f
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s : Set α
t : Set β
f : Filter α
g : Filter β
b : β
⊢ map ((fun g => g b) ∘ Prod.mk) f = map (fun a => (a, b)) f
tactic: rw [prod_eq, seq_pure, map_map]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s : Set α
t : Set β
f : Filter α
g : Filter β
b : β
⊢ map ((fun g => g b) ∘ Prod.mk) f = map (fun a => (a, b)) f
state_after: no goals
tactic: rfl
Theorem: WithBot.mul_bot
File: Mathlib/Algebra/Order/Ring/WithTop.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : MulZeroClass α
a b : WithBot α
h : a ≠ 0
⊢ a * ⊥ = ⊥
state_after: no goals
tactic: rw [mul_bot', if_neg h]
Theorem: Fintype.sum_eq_add
File: Mathlib/Data/Fintype/BigOperators.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
M : Type u_4
inst✝¹ : Fintype α
inst✝ : CommMonoid M
f : α → M
a b : α
h₁ : a ≠ b
h₂ : ∀ (x : α), x ≠ a ∧ x ≠ b → f x = 1
⊢ ∏ x : α, f x = f a * f b
state_after: no goals
tactic: apply Finset.prod_eq_mul a b h₁ fun x _ hx => h₂ x hx <;>
    exact fun hc => (hc (Finset.mem_univ _)).elim
Theorem: Polynomial.eq_of_degree_le_of_eval_index_eq
File: Mathlib/LinearAlgebra/Lagrange.lean

Proof steps:
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R[X]
ι : Type u_2
v : ι → R
s : Finset ι
hvs : Set.InjOn v ↑s
h_deg_le : f.degree ≤ ↑s.card
h_deg_eq : f.degree = g.degree
hlc : f.leadingCoeff = g.leadingCoeff
h_eval : ∀ i ∈ s, eval (v i) f = eval (v i) g
⊢ f = g
state_after: case inl
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
g : R[X]
ι : Type u_2
v : ι → R
s : Finset ι
hvs : Set.InjOn v ↑s
h_deg_le : degree 0 ≤ ↑s.card
h_deg_eq : degree 0 = g.degree
hlc : leadingCoeff 0 = g.leadingCoeff
h_eval : ∀ i ∈ s, eval (v i) 0 = eval (v i) g
⊢ 0 = g

case inr
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R[X]
ι : Type u_2
v : ι → R
s : Finset ι
hvs : Set.InjOn v ↑s
h_deg_le : f.degree ≤ ↑s.card
h_deg_eq : f.degree = g.degree
hlc : f.leadingCoeff = g.leadingCoeff
h_eval : ∀ i ∈ s, eval (v i) f = eval (v i) g
hf : f ≠ 0
⊢ f = g
tactic: rcases eq_or_ne f 0 with rfl | hf
Theorem: Cardinal.mk_compl_finset_of_infinite
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

Proof steps:
state_before: α : Type u_1
inst✝ : Infinite α
s : Finset α
⊢ #↑(↑s)ᶜ = #α
state_after: case h2
α : Type u_1
inst✝ : Infinite α
s : Finset α
⊢ #↑↑s < #α
tactic: apply mk_compl_of_infinite
state_before: case h2
α : Type u_1
inst✝ : Infinite α
s : Finset α
⊢ #↑↑s < #α
state_after: no goals
tactic: exact (finset_card_lt_aleph0 s).trans_le (aleph0_le_mk α)
Theorem: WeierstrassCurve.Jacobian.addU_of_Z_eq_zero_left
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

Proof steps:
state_before: R : Type u
inst✝¹ : CommRing R
W' : Jacobian R
F : Type v
inst✝ : Field F
W : Jacobian F
P Q : Fin 3 → F
hPz : P z = 0
⊢ addU P Q = 0
state_after: no goals
tactic: rw [addU, hPz, zero_mul, div_zero, neg_zero]
Theorem: WittVector.isUnit_of_coeff_zero_ne_zero
File: Mathlib/RingTheory/WittVector/DiscreteValuationRing.lean

Proof steps:
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝¹ : Field k
inst✝ : CharP k p
x : 𝕎 k
hx : x.coeff 0 ≠ 0
⊢ IsUnit x
state_after: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝¹ : Field k
inst✝ : CharP k p
x : 𝕎 k
hx : x.coeff 0 ≠ 0
y : kˣ := Units.mk0 (x.coeff 0) hx
⊢ IsUnit x
tactic: let y : kˣ := Units.mk0 (x.coeff 0) hx
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝¹ : Field k
inst✝ : CharP k p
x : 𝕎 k
hx : x.coeff 0 ≠ 0
y : kˣ := Units.mk0 (x.coeff 0) hx
⊢ IsUnit x
state_after: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝¹ : Field k
inst✝ : CharP k p
x : 𝕎 k
hx : x.coeff 0 ≠ 0
y : kˣ := Units.mk0 (x.coeff 0) hx
hy : x.coeff 0 = ↑y
⊢ IsUnit x
tactic: have hy : x.coeff 0 = y := rfl
state_before: p : ℕ
hp : Fact (Nat.Prime p)
k : Type u_1
inst✝¹ : Field k
inst✝ : CharP k p
x : 𝕎 k
hx : x.coeff 0 ≠ 0
y : kˣ := Units.mk0 (x.coeff 0) hx
hy : x.coeff 0 = ↑y
⊢ IsUnit x
state_after: no goals
tactic: exact (mkUnit hy).isUnit
Theorem: MeasureTheory.trim_withDensity
File: Mathlib/MeasureTheory/Measure/WithDensity.lean

Proof steps:
state_before: α : Type u_1
m0✝ : MeasurableSpace α
μ✝ : Measure α
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
f : α → ℝ≥0∞
hf : Measurable f
⊢ (μ.withDensity f).trim hm = (μ.trim hm).withDensity f
state_after: α : Type u_1
m0✝ : MeasurableSpace α
μ✝ : Measure α
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
f : α → ℝ≥0∞
hf : Measurable f
s : Set α
hs : MeasurableSet s
⊢ ((μ.withDensity f).trim hm) s = ((μ.trim hm).withDensity f) s
tactic: refine @Measure.ext _ m _ _ (fun s hs ↦ ?_)
state_before: α : Type u_1
m0✝ : MeasurableSpace α
μ✝ : Measure α
m m0 : MeasurableSpace α
μ : Measure α
hm : m ≤ m0
f : α → ℝ≥0∞
hf : Measurable f
s : Set α
hs : MeasurableSet s
⊢ ((μ.withDensity f).trim hm) s = ((μ.trim hm).withDensity f) s
state_after: no goals
tactic: rw [withDensity_apply _ hs, restrict_trim _ _ hs, lintegral_trim _ hf, trim_measurableSet_eq _ hs,
    withDensity_apply _ (hm s hs)]
Theorem: List.disjoint_nil_right
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

Proof steps:
state_before: α : Type u_1
l : List α
⊢ l.Disjoint []
state_after: α : Type u_1
l : List α
⊢ [].Disjoint l
tactic: rw [disjoint_comm]
state_before: α : Type u_1
l : List α
⊢ [].Disjoint l
state_after: no goals
tactic: exact disjoint_nil_left _
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✝⁴ : IsFiniteMeasure ν₁
inst✝³ : IsFiniteMeasure ν₂
inst✝² : ν₁.HaveLebesgueDecomposition μ
inst✝¹ : ν₂.HaveLebesgueDecomposition μ
inst✝ : (ν₁ + ν₂).HaveLebesgueDecomposition μ
⊢ (ν₁ + ν₂).rnDeriv μ =ᶠ[ae μ] ν₁.rnDeriv μ + ν₂.rnDeriv μ
state_after: α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν ν₁ ν₂ μ : Measure α
inst✝⁴ : IsFiniteMeasure ν₁
inst✝³ : IsFiniteMeasure ν₂
inst✝² : ν₁.HaveLebesgueDecomposition μ
inst✝¹ : ν₂.HaveLebesgueDecomposition μ
inst✝ : (ν₁ + ν₂).HaveLebesgueDecomposition μ
⊢ μ.withDensity ((ν₁ + ν₂).rnDeriv μ) = μ.withDensity (ν₁.rnDeriv μ + ν₂.rnDeriv μ)

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

case hg
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν ν₁ ν₂ μ : Measure α
inst✝⁴ : IsFiniteMeasure ν₁
inst✝³ : IsFiniteMeasure ν₂
inst✝² : ν₁.HaveLebesgueDecomposition μ
inst✝¹ : ν₂.HaveLebesgueDecomposition μ
inst✝ : (ν₁ + ν₂).HaveLebesgueDecomposition μ
⊢ AEMeasurable (ν₁.rnDeriv μ + ν₂.rnDeriv μ) μ

case hfi
α : Type u_1
β : Type u_2
m : MeasurableSpace α
μ✝ ν ν₁ ν₂ μ : Measure α
inst✝⁴ : IsFiniteMeasure ν₁
inst✝³ : IsFiniteMeasure ν₂
inst✝² : ν₁.HaveLebesgueDecomposition μ
inst✝¹ : ν₂.HaveLebesgueDecomposition μ
inst✝ : (ν₁ + ν₂).HaveLebesgueDecomposition μ
⊢ ∫⁻ (x : α), (ν₁ + ν₂).rnDeriv μ x ∂μ ≠ ⊤
tactic: rw [← withDensity_eq_iff]
Theorem: AddLECancellable.lt_tsub_of_add_lt_left
File: Mathlib/Algebra/Order/Sub/Defs.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝³ : PartialOrder α
inst✝² : AddCommSemigroup α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
ha : AddLECancellable a
h : a + c < b
⊢ c + a < b
state_after: no goals
tactic: rwa [add_comm]
Theorem: innerDualCone_eq_iInter_innerDualCone_singleton
File: Mathlib/Analysis/Convex/Cone/InnerDual.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
H : Type u_5
inst✝¹ : NormedAddCommGroup H
inst✝ : InnerProductSpace ℝ H
s t : Set H
⊢ ↑s.innerDualCone = ⋂ i, ↑{↑i}.innerDualCone
state_after: no goals
tactic: rw [← ConvexCone.coe_iInf, ← innerDualCone_iUnion, iUnion_of_singleton_coe]
Theorem: Filter.HasBasis.nhds_of_one
File: Mathlib/Topology/Algebra/Group/Basic.lean

Proof steps:
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
ι : Sort u_1
p : ι → Prop
s : ι → Set G
hb : (𝓝 1).HasBasis p s
x : G
⊢ (𝓝 x).HasBasis p fun i => {y | y / x ∈ s i}
state_after: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
ι : Sort u_1
p : ι → Prop
s : ι → Set G
hb : (𝓝 1).HasBasis p s
x : G
⊢ (Filter.comap (fun x_1 => x_1 * x⁻¹) (𝓝 1)).HasBasis p fun i => {y | y / x ∈ s i}
tactic: rw [← nhds_translation_mul_inv]
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
ι : Sort u_1
p : ι → Prop
s : ι → Set G
hb : (𝓝 1).HasBasis p s
x : G
⊢ (Filter.comap (fun x_1 => x_1 * x⁻¹) (𝓝 1)).HasBasis p fun i => {y | y / x ∈ s i}
state_after: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
ι : Sort u_1
p : ι → Prop
s : ι → Set G
hb : (𝓝 1).HasBasis p s
x : G
⊢ (Filter.comap (fun x_1 => x_1 * x⁻¹) (𝓝 1)).HasBasis p fun i => {y | y * x⁻¹ ∈ s i}
tactic: simp_rw [div_eq_mul_inv]
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝³ : TopologicalSpace G
inst✝² : Group G
inst✝¹ : TopologicalGroup G
inst✝ : TopologicalSpace α
f : α → G
s✝ : Set α
x✝ : α
ι : Sort u_1
p : ι → Prop
s : ι → Set G
hb : (𝓝 1).HasBasis p s
x : G
⊢ (Filter.comap (fun x_1 => x_1 * x⁻¹) (𝓝 1)).HasBasis p fun i => {y | y * x⁻¹ ∈ s i}
state_after: no goals
tactic: exact hb.comap _
Theorem: continuousWithinAt_univ
File: Mathlib/Topology/ContinuousOn.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝⁴ : TopologicalSpace α
ι : Type u_5
π : ι → Type u_6
inst✝³ : (i : ι) → TopologicalSpace (π i)
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
f : α → β
x : α
⊢ ContinuousWithinAt f univ x ↔ ContinuousAt f x
state_after: no goals
tactic: rw [ContinuousAt, ContinuousWithinAt, nhdsWithin_univ]
Theorem: CategoryTheory.GrothendieckTopology.sheafifyMap_comp
File: Mathlib/CategoryTheory/Sites/ConcreteSheafification.lean

Proof steps:
state_before: C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝² : Category.{max v u, w} D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : J.Cover X), HasMultiequalizer (S.index P)
inst✝ : ∀ (X : C), HasColimitsOfShape (J.Cover X)ᵒᵖ D
P Q R : Cᵒᵖ ⥤ D
η : P ⟶ Q
γ : Q ⟶ R
⊢ J.sheafifyMap (η ≫ γ) = J.sheafifyMap η ≫ J.sheafifyMap γ
state_after: C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝² : Category.{max v u, w} D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : J.Cover X), HasMultiequalizer (S.index P)
inst✝ : ∀ (X : C), HasColimitsOfShape (J.Cover X)ᵒᵖ D
P Q R : Cᵒᵖ ⥤ D
η : P ⟶ Q
γ : Q ⟶ R
⊢ J.plusMap (J.plusMap (η ≫ γ)) = J.plusMap (J.plusMap η) ≫ J.plusMap (J.plusMap γ)
tactic: dsimp [sheafifyMap, sheafify]
state_before: C : Type u
inst✝³ : Category.{v, u} C
J : GrothendieckTopology C
D : Type w
inst✝² : Category.{max v u, w} D
inst✝¹ : ∀ (P : Cᵒᵖ ⥤ D) (X : C) (S : J.Cover X), HasMultiequalizer (S.index P)
inst✝ : ∀ (X : C), HasColimitsOfShape (J.Cover X)ᵒᵖ D
P Q R : Cᵒᵖ ⥤ D
η : P ⟶ Q
γ : Q ⟶ R
⊢ J.plusMap (J.plusMap (η ≫ γ)) = J.plusMap (J.plusMap η) ≫ J.plusMap (J.plusMap γ)
state_after: no goals
tactic: simp
Theorem: Wbtw.rotate_iff
File: Mathlib/Analysis/Convex/Between.lean

Proof steps:
state_before: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁷ : OrderedRing R
inst✝⁶ : AddCommGroup V
inst✝⁵ : Module R V
inst✝⁴ : AddTorsor V P
inst✝³ : AddCommGroup V'
inst✝² : Module R V'
inst✝¹ : AddTorsor V' P'
inst✝ : NoZeroSMulDivisors R V
x y z : P
h : Wbtw R x y z
⊢ Wbtw R z x y ↔ x = y
state_after: no goals
tactic: rw [← wbtw_rotate_iff R x, and_iff_right h]
Theorem: Matrix.conjTranspose_eq_one
File: Mathlib/Data/Matrix/Basic.lean

Proof steps:
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝² : DecidableEq n
inst✝¹ : Semiring α
inst✝ : StarRing α
M : Matrix n n α
⊢ M = 1ᴴ ↔ M = 1
state_after: no goals
tactic: rw [conjTranspose_one]
Theorem: FirstOrder.Language.BoundedFormula.realize_iAlls
File: Mathlib/ModelTheory/Semantics.lean

Proof steps:
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝³ : L.Structure M
inst✝² : L.Structure N
inst✝¹ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
T : L.Theory
inst✝ : Finite γ
f : α → β ⊕ γ
φ : L.Formula α
v : β → M
v' : Fin 0 → M
⊢ Realize (Formula.iAlls f φ) v v' ↔ ∀ (i : γ → M), φ.Realize fun a => Sum.elim v i (f a)
state_after: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝³ : L.Structure M
inst✝² : L.Structure N
inst✝¹ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
T : L.Theory
inst✝ : Finite γ
f : α → β ⊕ γ
φ : L.Formula α
v : β → M
v' : Fin 0 → M
⊢ Realize (Formula.iAlls f φ) v v' = (Formula.iAlls f φ).Realize v
tactic: rw [← Formula.realize_iAlls, iff_iff_eq]
state_before: L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝³ : L.Structure M
inst✝² : L.Structure N
inst✝¹ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
T : L.Theory
inst✝ : Finite γ
f : α → β ⊕ γ
φ : L.Formula α
v : β → M
v' : Fin 0 → M
⊢ Realize (Formula.iAlls f φ) v v' = (Formula.iAlls f φ).Realize v
state_after: case e__xs
L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝³ : L.Structure M
inst✝² : L.Structure N
inst✝¹ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
T : L.Theory
inst✝ : Finite γ
f : α → β ⊕ γ
φ : L.Formula α
v : β → M
v' : Fin 0 → M
⊢ v' = default
tactic: congr
state_before: case e__xs
L : Language
L' : Language
M : Type w
N : Type u_1
P : Type u_2
inst✝³ : L.Structure M
inst✝² : L.Structure N
inst✝¹ : L.Structure P
α : Type u'
β : Type v'
γ : Type u_3
n : ℕ
T : L.Theory
inst✝ : Finite γ
f : α → β ⊕ γ
φ : L.Formula α
v : β → M
v' : Fin 0 → M
⊢ v' = default
state_after: no goals
tactic: simp [eq_iff_true_of_subsingleton]
Theorem: fib_isSol_fibRec
File: Mathlib/Data/Real/GoldenRatio.lean

Proof steps:
state_before: α : Type u_1
inst✝ : CommSemiring α
⊢ fibRec.IsSolution fun x => ↑(Nat.fib x)
state_after: α : Type u_1
inst✝ : CommSemiring α
⊢ { order := 2, coeffs := ![1, 1] }.IsSolution fun x => ↑(Nat.fib x)
tactic: rw [fibRec]
state_before: α : Type u_1
inst✝ : CommSemiring α
⊢ { order := 2, coeffs := ![1, 1] }.IsSolution fun x => ↑(Nat.fib x)
state_after: α : Type u_1
inst✝ : CommSemiring α
n : ℕ
⊢ (fun x => ↑(Nat.fib x)) (n + { order := 2, coeffs := ![1, 1] }.order) =
    ∑ i : Fin { order := 2, coeffs := ![1, 1] }.order,
      { order := 2, coeffs := ![1, 1] }.coeffs i * (fun x => ↑(Nat.fib x)) (n + ↑i)
tactic: intro n
state_before: α : Type u_1
inst✝ : CommSemiring α
n : ℕ
⊢ (fun x => ↑(Nat.fib x)) (n + { order := 2, coeffs := ![1, 1] }.order) =
    ∑ i : Fin { order := 2, coeffs := ![1, 1] }.order,
      { order := 2, coeffs := ![1, 1] }.coeffs i * (fun x => ↑(Nat.fib x)) (n + ↑i)
state_after: α : Type u_1
inst✝ : CommSemiring α
n : ℕ
⊢ ↑(Nat.fib (n + 2)) = ∑ x : Fin 2, ![1, 1] x * ↑(Nat.fib (n + ↑x))
tactic: simp only
state_before: α : Type u_1
inst✝ : CommSemiring α
n : ℕ
⊢ ↑(Nat.fib (n + 2)) = ∑ x : Fin 2, ![1, 1] x * ↑(Nat.fib (n + ↑x))
state_after: α : Type u_1
inst✝ : CommSemiring α
n : ℕ
⊢ ↑(Nat.fib (n + 1) + Nat.fib n) = ∑ x : Fin 2, ![1, 1] x * ↑(Nat.fib (n + ↑x))
tactic: rw [Nat.fib_add_two, add_comm]
state_before: α : Type u_1
inst✝ : CommSemiring α
n : ℕ
⊢ ↑(Nat.fib (n + 1) + Nat.fib n) = ∑ x : Fin 2, ![1, 1] x * ↑(Nat.fib (n + ↑x))
state_after: no goals
tactic: simp [Finset.sum_fin_eq_sum_range, Finset.sum_range_succ']
Theorem: Multiset.filter_eq
File: Mathlib/Data/Multiset/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type v
γ : Type u_2
inst✝ : DecidableEq α
s✝ s : Multiset α
b : α
⊢ filter (Eq b) s = replicate (count b s) b
state_after: no goals
tactic: simp_rw [← filter_eq', eq_comm]
Theorem: CategoryTheory.Quotient.induction
File: Mathlib/CategoryTheory/Quotient.lean

Proof steps:
state_before: C : Type u_1
inst✝ : Category.{u_2, u_1} C
r : HomRel C
P : {a b : Quotient r} → (a ⟶ b) → Prop
h : ∀ {x y : C} (f : x ⟶ y), P ((functor r).map f)
⊢ ∀ {a b : Quotient r} (f : a ⟶ b), P f
state_after: case mk.mk.mk
C : Type u_1
inst✝ : Category.{u_2, u_1} C
r : HomRel C
P : {a b : Quotient r} → (a ⟶ b) → Prop
h : ∀ {x y : C} (f : x ⟶ y), P ((functor r).map f)
x y : C
f✝ : { as := x } ⟶ { as := y }
f : { as := x }.as ⟶ { as := y }.as
⊢ P (Quot.mk (CompClosure r) f)
tactic: rintro ⟨x⟩ ⟨y⟩ ⟨f⟩
state_before: case mk.mk.mk
C : Type u_1
inst✝ : Category.{u_2, u_1} C
r : HomRel C
P : {a b : Quotient r} → (a ⟶ b) → Prop
h : ∀ {x y : C} (f : x ⟶ y), P ((functor r).map f)
x y : C
f✝ : { as := x } ⟶ { as := y }
f : { as := x }.as ⟶ { as := y }.as
⊢ P (Quot.mk (CompClosure r) f)
state_after: no goals
tactic: exact h f
Theorem: List.dedup_cons_of_not_mem'
File: Mathlib/Data/List/Dedup.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝ : DecidableEq α
a : α
l : List α
h : a ∉ l.dedup
⊢ ∀ b ∈ pwFilter (fun x x_1 => x ≠ x_1) l, a ≠ b
state_after: no goals
tactic: simpa only [forall_mem_ne] using h
Theorem: Basis.repr_support_subset_of_mem_span
File: Mathlib/LinearAlgebra/Basis.lean

Proof steps:
state_before: ι : Type u_1
ι' : Type u_2
R : Type u_3
R₂ : Type u_4
K : Type u_5
M : Type u_6
M' : Type u_7
M'' : Type u_8
V : Type u
V' : Type u_9
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
b b₁ : Basis ι R M
i : ι
c : R
x : M
s : Set ι
m : M
hm : m ∈ span R (⇑b '' s)
⊢ ↑(b.repr m).support ⊆ s
state_after: case intro.intro
ι : Type u_1
ι' : Type u_2
R : Type u_3
R₂ : Type u_4
K : Type u_5
M : Type u_6
M' : Type u_7
M'' : Type u_8
V : Type u
V' : Type u_9
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
b b₁ : Basis ι R M
i : ι
c : R
x : M
s : Set ι
l : ι →₀ R
hl : l ∈ Finsupp.supported R R s
hm : (Finsupp.total ι M R ⇑b) l ∈ span R (⇑b '' s)
⊢ ↑(b.repr ((Finsupp.total ι M R ⇑b) l)).support ⊆ s
tactic: rcases (Finsupp.mem_span_image_iff_total _).1 hm with ⟨l, hl, rfl⟩
state_before: case intro.intro
ι : Type u_1
ι' : Type u_2
R : Type u_3
R₂ : Type u_4
K : Type u_5
M : Type u_6
M' : Type u_7
M'' : Type u_8
V : Type u
V' : Type u_9
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
b b₁ : Basis ι R M
i : ι
c : R
x : M
s : Set ι
l : ι →₀ R
hl : l ∈ Finsupp.supported R R s
hm : (Finsupp.total ι M R ⇑b) l ∈ span R (⇑b '' s)
⊢ ↑(b.repr ((Finsupp.total ι M R ⇑b) l)).support ⊆ s
state_after: no goals
tactic: rwa [repr_total, ← Finsupp.mem_supported R l]
Theorem: Polynomial.card_roots_le_map_of_injective
File: Mathlib/Algebra/Polynomial/Roots.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝³ : CommRing A
inst✝² : CommRing B
inst✝¹ : IsDomain A
inst✝ : IsDomain B
p : A[X]
f : A →+* B
hf : Function.Injective ⇑f
⊢ Multiset.card p.roots ≤ Multiset.card (map f p).roots
state_after: case pos
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝³ : CommRing A
inst✝² : CommRing B
inst✝¹ : IsDomain A
inst✝ : IsDomain B
p : A[X]
f : A →+* B
hf : Function.Injective ⇑f
hp0 : p = 0
⊢ Multiset.card p.roots ≤ Multiset.card (map f p).roots

case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝³ : CommRing A
inst✝² : CommRing B
inst✝¹ : IsDomain A
inst✝ : IsDomain B
p : A[X]
f : A →+* B
hf : Function.Injective ⇑f
hp0 : ¬p = 0
⊢ Multiset.card p.roots ≤ Multiset.card (map f p).roots
tactic: by_cases hp0 : p = 0
state_before: case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
A : Type u_1
B : Type u_2
inst✝³ : CommRing A
inst✝² : CommRing B
inst✝¹ : IsDomain A
inst✝ : IsDomain B
p : A[X]
f : A →+* B
hf : Function.Injective ⇑f
hp0 : ¬p = 0
⊢ Multiset.card p.roots ≤ Multiset.card (map f p).roots
state_after: no goals
tactic: exact card_roots_le_map ((Polynomial.map_ne_zero_iff hf).mpr hp0)
Theorem: Polynomial.natTrailingDegree_le_of_trailingDegree_le
File: Mathlib/Algebra/Polynomial/Degree/TrailingDegree.lean

Proof steps:
state_before: R : Type u
S : Type v
a b : R
n✝ m : ℕ
inst✝ : Semiring R
p q r : R[X]
n : ℕ
hp : p ≠ 0
H : ↑n ≤ p.trailingDegree
⊢ n ≤ p.natTrailingDegree
state_after: no goals
tactic: rwa [trailingDegree_eq_natTrailingDegree hp, Nat.cast_le] at H