ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: EuclideanGeometry.left_ne_of_oangle_sign_eq_one
File: Mathlib/Geometry/Euclidean/Angle/Oriented/Affine.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₃).sign = 1
⊢ 1 ≠ 0
state_after: no goals
tactic: decide
Theorem: MeasureTheory.Measure.comap_preimage
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

Proof steps:
state_before: α : Type u_1
β✝ : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
R : Type u_6
R' : Type u_7
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β✝
inst✝¹ : MeasurableSpace γ
μ✝ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s✝ s' t : Set α
f✝ : α → β✝
β : Type u_8
inst✝ : MeasurableSpace α
mβ : MeasurableSpace β
f : α → β
μ : Measure β
s : Set β
hf : Injective f
hf' : Measurable f
h : ∀ (t : Set α), MeasurableSet t → NullMeasurableSet (f '' t) μ
hs : MeasurableSet s
⊢ (comap f μ) (f ⁻¹' s) = μ (s ∩ range f)
state_after: no goals
tactic: rw [comap_apply₀ _ _ hf h (hf' hs).nullMeasurableSet, image_preimage_eq_inter_range]
Theorem: Subgroup.IsComplement.equiv_one
File: Mathlib/GroupTheory/Complement.lean

Proof steps:
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hST : IsComplement S T
hHT : IsComplement (↑H) T
hSK : IsComplement S ↑K
hs1 : 1 ∈ S
ht1 : 1 ∈ T
⊢ hST.equiv 1 = (⟨1, hs1⟩, ⟨1, ht1⟩)
state_after: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hST : IsComplement S T
hHT : IsComplement (↑H) T
hSK : IsComplement S ↑K
hs1 : 1 ∈ S
ht1 : 1 ∈ T
⊢ 1 = hST.equiv.symm (⟨1, hs1⟩, ⟨1, ht1⟩)
tactic: rw [Equiv.apply_eq_iff_eq_symm_apply]
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
hST : IsComplement S T
hHT : IsComplement (↑H) T
hSK : IsComplement S ↑K
hs1 : 1 ∈ S
ht1 : 1 ∈ T
⊢ 1 = hST.equiv.symm (⟨1, hs1⟩, ⟨1, ht1⟩)
state_after: no goals
tactic: simp [equiv]
Theorem: LinearMap.traceAux_eq
File: Mathlib/LinearAlgebra/Trace.lean

Proof steps:
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b : Basis ι R M
c : Basis κ R M
f : M →ₗ[R] M
⊢ ((toMatrix b b) f).trace = ((toMatrix b b) ((id ∘ₗ f) ∘ₗ id)).trace
state_after: no goals
tactic: rw [LinearMap.id_comp, LinearMap.comp_id]
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b : Basis ι R M
c : Basis κ R M
f : M →ₗ[R] M
⊢ ((toMatrix b b) ((id ∘ₗ f) ∘ₗ id)).trace = ((toMatrix c b) id * (toMatrix c c) f * (toMatrix b c) id).trace
state_after: no goals
tactic: rw [LinearMap.toMatrix_comp _ c, LinearMap.toMatrix_comp _ c]
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b : Basis ι R M
c : Basis κ R M
f : M →ₗ[R] M
⊢ ((toMatrix c b) id * (toMatrix c c) f * (toMatrix b c) id).trace =
    ((toMatrix c c) f * (toMatrix b c) id * (toMatrix c b) id).trace
state_after: no goals
tactic: rw [Matrix.mul_assoc, Matrix.trace_mul_comm]
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b : Basis ι R M
c : Basis κ R M
f : M →ₗ[R] M
⊢ ((toMatrix c c) f * (toMatrix b c) id * (toMatrix c b) id).trace = ((toMatrix c c) ((f ∘ₗ id) ∘ₗ id)).trace
state_after: no goals
tactic: rw [LinearMap.toMatrix_comp _ b, LinearMap.toMatrix_comp _ c]
state_before: R : Type u
inst✝⁶ : CommSemiring R
M : Type v
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
ι : Type w
inst✝³ : DecidableEq ι
inst✝² : Fintype ι
κ : Type u_1
inst✝¹ : DecidableEq κ
inst✝ : Fintype κ
b : Basis ι R M
c : Basis κ R M
f : M →ₗ[R] M
⊢ ((toMatrix c c) ((f ∘ₗ id) ∘ₗ id)).trace = ((toMatrix c c) f).trace
state_after: no goals
tactic: rw [LinearMap.comp_id, LinearMap.comp_id]
Theorem: legendreSym.at_one
File: Mathlib/NumberTheory/LegendreSymbol/Basic.lean

Proof steps:
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
⊢ legendreSym p 1 = 1
state_after: no goals
tactic: rw [legendreSym, Int.cast_one, MulChar.map_one]
Theorem: CategoryTheory.Limits.Cofork.coequalizer_ext
File: Mathlib/CategoryTheory/Limits/Shapes/Equalizers.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y : C
f g : X ⟶ Y
s : Cofork f g
W : C
k l : s.pt ⟶ W
h : s.π ≫ k = s.π ≫ l
⊢ s.ι.app zero ≫ k = s.ι.app zero ≫ l
state_after: no goals
tactic: simp only [s.app_zero_eq_comp_π_left, Category.assoc, h]
Theorem: Nat.odd_mod_four_iff
File: Mathlib/Data/Nat/ModEq.lean

Proof steps:
state_before: m n✝ a b c d n : ℕ
⊢ ∀ m < 4, m % 2 = 1 → m = 1 ∨ m = 3
state_after: no goals
tactic: decide
state_before: m n✝ a b c d n : ℕ
help : ∀ m < 4, m % 2 = 1 → m = 1 ∨ m = 3
hn : n % 2 = 1
⊢ 4 > 0
state_after: no goals
tactic: norm_num
state_before: m n✝ a b c d n : ℕ
help : ∀ m < 4, m % 2 = 1 → m = 1 ∨ m = 3
hn : n % 2 = 1
⊢ 2 ∣ 4
state_after: no goals
tactic: decide
Theorem: FreeRing.coe_sub
File: Mathlib/RingTheory/FreeCommRing.lean

Proof steps:
state_before: α : Type u
x y : FreeRing α
⊢ ↑(x - y) = ↑x - ↑y
state_after: no goals
tactic: rw [castFreeCommRing, map_sub]
Theorem: TopCat.inducing_prod_map
File: Mathlib/Topology/Category/TopCat/Limits/Products.lean

Proof steps:
state_before: J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Inducing ⇑f
hg : Inducing ⇑g
⊢ Inducing ⇑(prod.map f g)
state_after: case induced
J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Inducing ⇑f
hg : Inducing ⇑g
⊢ (W ⨯ Y).topologicalSpace_coe = induced (⇑(prod.map f g)) (X ⨯ Z).topologicalSpace_coe
tactic: constructor
state_before: case induced
J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Inducing ⇑f
hg : Inducing ⇑g
⊢ (W ⨯ Y).topologicalSpace_coe = induced (⇑(prod.map f g)) (X ⨯ Z).topologicalSpace_coe
state_after: case induced
J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Inducing ⇑f
hg : Inducing ⇑g
⊢ induced (⇑prod.fst) W.str ⊓ induced (⇑prod.snd) Y.str =
    induced (⇑prod.fst) (induced (⇑f) X.str) ⊓ induced (⇑prod.snd) (induced (⇑g) Z.str)
tactic: simp_rw [topologicalSpace_coe, prod_topology, induced_inf, induced_compose, ← coe_comp,
    prod.map_fst, prod.map_snd, coe_comp, ← induced_compose (g := f), ← induced_compose (g := g)]
state_before: case induced
J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Inducing ⇑f
hg : Inducing ⇑g
⊢ induced (⇑prod.fst) W.str ⊓ induced (⇑prod.snd) Y.str =
    induced (⇑prod.fst) (induced (⇑f) X.str) ⊓ induced (⇑prod.snd) (induced (⇑g) Z.str)
state_after: case induced
J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Inducing ⇑f
hg : Inducing ⇑g
⊢ induced (⇑prod.fst) W.str ⊓ induced (⇑prod.snd) Y.str =
    induced (⇑prod.fst) W.topologicalSpace_coe ⊓ induced (⇑prod.snd) Y.topologicalSpace_coe
tactic: erw [← hf.induced, ← hg.induced]
state_before: case induced
J : Type v
inst✝ : SmallCategory J
W X Y Z : TopCat
f : W ⟶ X
g : Y ⟶ Z
hf : Inducing ⇑f
hg : Inducing ⇑g
⊢ induced (⇑prod.fst) W.str ⊓ induced (⇑prod.snd) Y.str =
    induced (⇑prod.fst) W.topologicalSpace_coe ⊓ induced (⇑prod.snd) Y.topologicalSpace_coe
state_after: no goals
tactic: rfl
Theorem: CategoryTheory.Pretriangulated.Triangle.isZero₃_iff_isIso₁
File: Mathlib/CategoryTheory/Triangulated/Pretriangulated.lean

Proof steps:
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
hT : T ∈ distinguishedTriangles
⊢ IsZero T.obj₃ ↔ IsIso T.mor₁
state_after: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
hT : T ∈ distinguishedTriangles
⊢ IsZero T.obj₃ ↔ IsZero T.invRotate.obj₁
tactic: refine Iff.trans ?_ (Triangle.isZero₁_iff_isIso₂ _ (inv_rot_of_distTriang _ hT))
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
hT : T ∈ distinguishedTriangles
⊢ IsZero T.obj₃ ↔ IsZero T.invRotate.obj₁
state_after: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
hT : T ∈ distinguishedTriangles
⊢ IsZero T.obj₃ ↔ IsZero ((CategoryTheory.shiftFunctor C (-1)).obj T.obj₃)
tactic: dsimp
state_before: C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroObject C
inst✝² : HasShift C ℤ
inst✝¹ : Preadditive C
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
hC : Pretriangulated C
T : Triangle C
hT : T ∈ distinguishedTriangles
⊢ IsZero T.obj₃ ↔ IsZero ((CategoryTheory.shiftFunctor C (-1)).obj T.obj₃)
state_after: no goals
tactic: simp only [IsZero.iff_id_eq_zero, ← Functor.map_id, Functor.map_eq_zero_iff]
Theorem: DFinsupp.filter_add
File: Mathlib/Data/DFinsupp/Basic.lean

Proof steps:
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : (i : ι) → AddZeroClass (β i)
p : ι → Prop
inst✝ : DecidablePred p
f g : Π₀ (i : ι), β i
⊢ filter p (f + g) = filter p f + filter p g
state_after: case h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : (i : ι) → AddZeroClass (β i)
p : ι → Prop
inst✝ : DecidablePred p
f g : Π₀ (i : ι), β i
i✝ : ι
⊢ (filter p (f + g)) i✝ = (filter p f + filter p g) i✝
tactic: ext
state_before: case h
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : (i : ι) → AddZeroClass (β i)
p : ι → Prop
inst✝ : DecidablePred p
f g : Π₀ (i : ι), β i
i✝ : ι
⊢ (filter p (f + g)) i✝ = (filter p f + filter p g) i✝
state_after: no goals
tactic: simp [ite_add_zero]
Theorem: PartENat.withTopEquiv_symm_top
File: Mathlib/Data/Nat/PartENat.lean

Proof steps:
state_before: ⊢ withTopEquiv.symm ⊤ = ⊤
state_after: no goals
tactic: simp
Theorem: Nat.ModEq.pow_totient
File: Mathlib/FieldTheory/Finite/Basic.lean

Proof steps:
state_before: K : Type u_1
R : Type u_2
x n : ℕ
h : x.Coprime n
⊢ x ^ φ n ≡ 1 [MOD n]
state_after: K : Type u_1
R : Type u_2
x n : ℕ
h : x.Coprime n
⊢ ↑(x ^ φ n) = ↑1
tactic: rw [← ZMod.eq_iff_modEq_nat]
state_before: K : Type u_1
R : Type u_2
x n : ℕ
h : x.Coprime n
⊢ ↑(x ^ φ n) = ↑1
state_after: K : Type u_1
R : Type u_2
x n : ℕ
h : x.Coprime n
x' : (ZMod n)ˣ := unitOfCoprime x h
⊢ ↑(x ^ φ n) = ↑1
tactic: let x' : Units (ZMod n) := ZMod.unitOfCoprime _ h
state_before: K : Type u_1
R : Type u_2
x n : ℕ
h : x.Coprime n
x' : (ZMod n)ˣ := unitOfCoprime x h
⊢ ↑(x ^ φ n) = ↑1
state_after: K : Type u_1
R : Type u_2
x n : ℕ
h : x.Coprime n
x' : (ZMod n)ˣ := unitOfCoprime x h
this : x' ^ φ n = 1
⊢ ↑(x ^ φ n) = ↑1
tactic: have := ZMod.pow_totient x'
state_before: K : Type u_1
R : Type u_2
x n : ℕ
h : x.Coprime n
x' : (ZMod n)ˣ := unitOfCoprime x h
this : x' ^ φ n = 1
⊢ ↑(x ^ φ n) = ↑1
state_after: K : Type u_1
R : Type u_2
x n : ℕ
h : x.Coprime n
x' : (ZMod n)ˣ := unitOfCoprime x h
this : ↑(x' ^ φ n) = ↑1
⊢ ↑(x ^ φ n) = ↑1
tactic: apply_fun ((fun (x : Units (ZMod n)) => (x : ZMod n)) : Units (ZMod n) → ZMod n) at this
state_before: K : Type u_1
R : Type u_2
x n : ℕ
h : x.Coprime n
x' : (ZMod n)ˣ := unitOfCoprime x h
this : ↑(x' ^ φ n) = ↑1
⊢ ↑(x ^ φ n) = ↑1
state_after: no goals
tactic: simpa only [Nat.succ_eq_add_one, Nat.cast_pow, Units.val_one, Nat.cast_one,
    coe_unitOfCoprime, Units.val_pow_eq_pow_val]
Theorem: Basis.total_repr
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
⊢ (Finsupp.total ι M R ⇑b) (b.repr x) = x
state_after: ι : 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
⊢ ↑b.repr.symm (b.repr x) = x
tactic: rw [← b.coe_repr_symm]
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
⊢ ↑b.repr.symm (b.repr x) = x
state_after: no goals
tactic: exact b.repr.symm_apply_apply x
Theorem: AddUnits.add_neg_cancel_left
File: Mathlib/Algebra/Group/Units.lean

Proof steps:
state_before: α : Type u
inst✝ : Monoid α
a✝ b✝ c u a : αˣ
b : α
⊢ ↑a * (↑a⁻¹ * b) = b
state_after: no goals
tactic: rw [← mul_assoc, mul_inv, one_mul]
Theorem: DiscreteTopology.of_forall_le_norm
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₂ : ℝ
hpos : 0 < r
hr : ∀ (x : E), x ≠ 1 → r ≤ ‖x‖
x y : E
hne : x ≠ y
⊢ (fun x x_1 => r ≤ dist x x_1) x y
state_after: 𝓕 : 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₂ : ℝ
hpos : 0 < r
hr : ∀ (x : E), x ≠ 1 → r ≤ ‖x‖
x y : E
hne : x ≠ y
⊢ r ≤ ‖x / y‖
tactic: simp only [dist_eq_norm_div]
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₂ : ℝ
hpos : 0 < r
hr : ∀ (x : E), x ≠ 1 → r ≤ ‖x‖
x y : E
hne : x ≠ y
⊢ r ≤ ‖x / y‖
state_after: no goals
tactic: exact hr _ (div_ne_one.2 hne)
Theorem: Quiver.Hom.cast_cast
File: Mathlib/Combinatorics/Quiver/Cast.lean

Proof steps:
state_before: U : Type u_1
inst✝ : Quiver U
u v u' v' u'' v'' : U
e : u ⟶ v
hu : u = u'
hv : v = v'
hu' : u' = u''
hv' : v' = v''
⊢ cast hu' hv' (cast hu hv e) = cast ⋯ ⋯ e
state_after: U : Type u_1
inst✝ : Quiver U
u'' v'' : U
e : u'' ⟶ v''
⊢ cast ⋯ ⋯ (cast ⋯ ⋯ e) = cast ⋯ ⋯ e
tactic: subst_vars
state_before: U : Type u_1
inst✝ : Quiver U
u'' v'' : U
e : u'' ⟶ v''
⊢ cast ⋯ ⋯ (cast ⋯ ⋯ e) = cast ⋯ ⋯ e
state_after: no goals
tactic: rfl
Theorem: Set.encard_le_coe_iff_finite_ncard_le
File: Mathlib/Data/Set/Card.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
s t : Set α
k : ℕ
⊢ s.encard ≤ ↑k ↔ s.Finite ∧ s.ncard ≤ k
state_after: α : Type u_1
β : Type u_2
s t : Set α
k : ℕ
⊢ s.Finite → ((∃ n₀, s.encard = ↑n₀ ∧ n₀ ≤ k) ↔ s.ncard ≤ k)
tactic: rw [encard_le_coe_iff, and_congr_right_iff]
state_before: α : Type u_1
β : Type u_2
s t : Set α
k : ℕ
⊢ s.Finite → ((∃ n₀, s.encard = ↑n₀ ∧ n₀ ≤ k) ↔ s.ncard ≤ k)
state_after: no goals
tactic: exact fun hfin ↦ ⟨fun ⟨n₀, hn₀, hle⟩ ↦ by rwa [ncard_def, hn₀, ENat.toNat_coe],
    fun h ↦ ⟨s.ncard, by rw [hfin.cast_ncard_eq], h⟩⟩
Theorem: Polynomial.smeval_pow
File: Mathlib/Algebra/Polynomial/Smeval.lean

Proof steps:
state_before: R : Type u_1
inst✝⁶ : Semiring R
p✝ : R[X]
r : R
p q : R[X]
S : Type u_2
inst✝⁵ : NonAssocSemiring S
inst✝⁴ : Module R S
inst✝³ : IsScalarTower R S S
inst✝² : SMulCommClass R S S
inst✝¹ : Pow S ℕ
inst✝ : NatPowAssoc S
x : S
⊢ (p ^ 0).smeval x = p.smeval x ^ 0
state_after: no goals
tactic: simp only [npow_zero, smeval_one, one_smul]
state_before: R : Type u_1
inst✝⁶ : Semiring R
p✝ : R[X]
r : R
p q : R[X]
S : Type u_2
inst✝⁵ : NonAssocSemiring S
inst✝⁴ : Module R S
inst✝³ : IsScalarTower R S S
inst✝² : SMulCommClass R S S
inst✝¹ : Pow S ℕ
inst✝ : NatPowAssoc S
x : S
n : ℕ
⊢ (p ^ (n + 1)).smeval x = p.smeval x ^ (n + 1)
state_after: no goals
tactic: rw [npow_add, smeval_mul, smeval_pow n, pow_one, npow_add, npow_one]
Theorem: MeasureTheory.IsSetSemiring.disjoint_sUnion_diffFinset₀
File: Mathlib/MeasureTheory/SetSemiring.lean

Proof steps:
state_before: α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
hC : IsSetSemiring C
hs : s ∈ C
hI : ↑I ⊆ C
⊢ Disjoint (⋃₀ ↑I) (⋃₀ ↑(hC.diffFinset₀ hs hI))
state_after: α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
hC : IsSetSemiring C
hs : s ∈ C
hI : ↑I ⊆ C
⊢ Disjoint (⋃₀ ↑I) (s \ ⋃₀ ↑I)
tactic: rw [← hC.diff_sUnion_eq_sUnion_diffFinset₀]
state_before: α : Type u_1
C : Set (Set α)
s t : Set α
I : Finset (Set α)
hC : IsSetSemiring C
hs : s ∈ C
hI : ↑I ⊆ C
⊢ Disjoint (⋃₀ ↑I) (s \ ⋃₀ ↑I)
state_after: no goals
tactic: exact Set.disjoint_sdiff_right
Theorem: exists_rat_lt
File: Mathlib/Algebra/Order/Archimedean.lean

Proof steps:
state_before: α : Type u_1
M : Type u_2
inst✝¹ : LinearOrderedField α
inst✝ : Archimedean α
x✝ y ε x : α
n : ℤ
h : ↑n < x
⊢ ↑↑n < x
state_after: no goals
tactic: rwa [Rat.cast_intCast]
Theorem: Real.one_le_sqrt
File: Mathlib/Data/Real/Sqrt.lean

Proof steps:
state_before: x y : ℝ
⊢ 1 ≤ √x ↔ 1 ≤ x
state_after: no goals
tactic: rw [← sqrt_one, sqrt_le_sqrt_iff' zero_lt_one, sqrt_one]
Theorem: PolynomialModule.eval_apply
File: Mathlib/Algebra/Polynomial/Module/Basic.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
inst✝¹² : CommRing R
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Module R M
I : Ideal R
S : Type u_3
inst✝⁹ : CommSemiring S
inst✝⁸ : Algebra S R
inst✝⁷ : Module S M
inst✝⁶ : IsScalarTower S R M
R' : Type u_4
M' : Type u_5
inst✝⁵ : CommRing R'
inst✝⁴ : AddCommGroup M'
inst✝³ : Module R' M'
inst✝² : Algebra R R'
inst✝¹ : Module R M'
inst✝ : IsScalarTower R R' M'
r s : R
m : PolynomialModule R M
⊢ { toFun := fun p => Finsupp.sum p fun i m => r ^ i • m, map_add' := ⋯ }.toFun (s • m) =
    (RingHom.id R) s • { toFun := fun p => Finsupp.sum p fun i m => r ^ i • m, map_add' := ⋯ }.toFun m
state_after: case refine_1
R : Type u_1
M : Type u_2
inst✝¹² : CommRing R
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Module R M
I : Ideal R
S : Type u_3
inst✝⁹ : CommSemiring S
inst✝⁸ : Algebra S R
inst✝⁷ : Module S M
inst✝⁶ : IsScalarTower S R M
R' : Type u_4
M' : Type u_5
inst✝⁵ : CommRing R'
inst✝⁴ : AddCommGroup M'
inst✝³ : Module R' M'
inst✝² : Algebra R R'
inst✝¹ : Module R M'
inst✝ : IsScalarTower R R' M'
r s : R
m : PolynomialModule R M
⊢ ∀ (i : ℕ), r ^ i • 0 = 0

case refine_2
R : Type u_1
M : Type u_2
inst✝¹² : CommRing R
inst✝¹¹ : AddCommGroup M
inst✝¹⁰ : Module R M
I : Ideal R
S : Type u_3
inst✝⁹ : CommSemiring S
inst✝⁸ : Algebra S R
inst✝⁷ : Module S M
inst✝⁶ : IsScalarTower S R M
R' : Type u_4
M' : Type u_5
inst✝⁵ : CommRing R'
inst✝⁴ : AddCommGroup M'
inst✝³ : Module R' M'
inst✝² : Algebra R R'
inst✝¹ : Module R M'
inst✝ : IsScalarTower R R' M'
r s : R
m : PolynomialModule R M
⊢ (Finsupp.sum m fun i c => r ^ i • s • c) =
    (RingHom.id R) s • { toFun := fun p => Finsupp.sum p fun i m => r ^ i • m, map_add' := ⋯ }.toFun m
tactic: refine (Finsupp.sum_smul_index' ?_).trans ?_
Theorem: AddSubsemigroup.mem_sSup_of_mem
File: Mathlib/Algebra/Group/Subsemigroup/Membership.lean

Proof steps:
state_before: ι : Sort u_1
M : Type u_2
A : Type u_3
B : Type u_4
inst✝ : Mul M
S : Set (Subsemigroup M)
s : Subsemigroup M
hs : s ∈ S
⊢ ∀ {x : M}, x ∈ s → x ∈ sSup S
state_after: ι : Sort u_1
M : Type u_2
A : Type u_3
B : Type u_4
inst✝ : Mul M
S : Set (Subsemigroup M)
s : Subsemigroup M
hs : s ∈ S
this : s ≤ sSup S
⊢ ∀ {x : M}, x ∈ s → x ∈ sSup S
tactic: have : s ≤ sSup S := le_sSup hs
state_before: ι : Sort u_1
M : Type u_2
A : Type u_3
B : Type u_4
inst✝ : Mul M
S : Set (Subsemigroup M)
s : Subsemigroup M
hs : s ∈ S
this : s ≤ sSup S
⊢ ∀ {x : M}, x ∈ s → x ∈ sSup S
state_after: no goals
tactic: tauto
Theorem: AnalyticAt.pow
File: Mathlib/Analysis/Analytic/Constructions.lean

Proof steps:
state_before: α : Type u_1
𝕜 : Type u_2
inst✝¹² : NontriviallyNormedField 𝕜
E : Type u_3
F : Type u_4
G : Type u_5
H : Type u_6
inst✝¹¹ : NormedAddCommGroup E
inst✝¹⁰ : NormedSpace 𝕜 E
inst✝⁹ : NormedAddCommGroup F
inst✝⁸ : NormedSpace 𝕜 F
inst✝⁷ : NormedAddCommGroup G
inst✝⁶ : NormedSpace 𝕜 G
inst✝⁵ : NormedAddCommGroup H
inst✝⁴ : NormedSpace 𝕜 H
𝕝 : Type u_7
inst✝³ : NontriviallyNormedField 𝕝
inst✝² : NormedAlgebra 𝕜 𝕝
A : Type u_8
inst✝¹ : NormedRing A
inst✝ : NormedAlgebra 𝕜 A
f : E → A
z : E
hf : AnalyticAt 𝕜 f z
n : ℕ
⊢ AnalyticAt 𝕜 (fun x => f x ^ n) z
state_after: no goals
tactic: induction n with
  | zero =>
    simp only [Nat.zero_eq, pow_zero]
    apply analyticAt_const
  | succ m hm =>
    simp only [pow_succ]
    exact hm.mul hf
Theorem: ContDiff.sub
File: Mathlib/Analysis/Calculus/ContDiff/Basic.lean

Proof steps:
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
D : Type uD
inst✝⁹ : NormedAddCommGroup D
inst✝⁸ : NormedSpace 𝕜 D
E : Type uE
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type uF
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type uG
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
X : Type u_2
inst✝¹ : NormedAddCommGroup X
inst✝ : NormedSpace 𝕜 X
s s₁ t u : Set E
f✝ f₁ : E → F
g✝ : F → G
x x₀ : E
c : F
b : E × F → G
m n : ℕ∞
p : E → FormalMultilinearSeries 𝕜 E F
f g : E → F
hf : ContDiff 𝕜 n f
hg : ContDiff 𝕜 n g
⊢ ContDiff 𝕜 n fun x => f x - g x
state_after: no goals
tactic: simpa only [sub_eq_add_neg] using hf.add hg.neg
Theorem: AddCommGroup.toAddGroup_injective
File: Mathlib/Algebra/Group/Ext.lean

Proof steps:
state_before: G : Type u_1
⊢ Injective (@toGroup G)
state_after: case mk.mk.refl
G : Type u_1
toGroup✝ : Group G
mul_comm✝¹ mul_comm✝ : ∀ (a b : G), a * b = b * a
⊢ mk mul_comm✝¹ = mk mul_comm✝
tactic: rintro ⟨⟩ ⟨⟩ ⟨⟩
state_before: case mk.mk.refl
G : Type u_1
toGroup✝ : Group G
mul_comm✝¹ mul_comm✝ : ∀ (a b : G), a * b = b * a
⊢ mk mul_comm✝¹ = mk mul_comm✝
state_after: no goals
tactic: rfl
Theorem: ProjectiveSpectrum.union_zeroLocus
File: Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean

Proof steps:
state_before: R : Type u_1
A : Type u_2
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
s s' : Set A
⊢ zeroLocus 𝒜 s ∪ zeroLocus 𝒜 s' = zeroLocus 𝒜 ↑(Ideal.span s ⊓ Ideal.span s')
state_after: R : Type u_1
A : Type u_2
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
s s' : Set A
⊢ zeroLocus 𝒜 s ∪ zeroLocus 𝒜 s' = zeroLocus 𝒜 ↑(Ideal.span s) ∪ zeroLocus 𝒜 ↑(Ideal.span s')
tactic: rw [zeroLocus_inf]
state_before: R : Type u_1
A : Type u_2
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
s s' : Set A
⊢ zeroLocus 𝒜 s ∪ zeroLocus 𝒜 s' = zeroLocus 𝒜 ↑(Ideal.span s) ∪ zeroLocus 𝒜 ↑(Ideal.span s')
state_after: no goals
tactic: simp
Theorem: EuclideanDomain.gcdB_zero_left
File: Mathlib/Algebra/EuclideanDomain/Defs.lean

Proof steps:
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
s : R
⊢ gcdB 0 s = 1
state_after: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
s : R
⊢ (xgcd 0 s).2 = 1
tactic: unfold gcdB
state_before: R : Type u
inst✝¹ : EuclideanDomain R
inst✝ : DecidableEq R
s : R
⊢ (xgcd 0 s).2 = 1
state_after: no goals
tactic: rw [xgcd, xgcd_zero_left]
Theorem: ZMod.toCircle_natCast
File: Mathlib/Analysis/SpecialFunctions/Complex/Circle.lean

Proof steps:
state_before: N : ℕ
inst✝ : NeZero N
j : ℕ
⊢ ↑(toCircle ↑j) = cexp (2 * ↑π * I * ↑j / ↑N)
state_after: no goals
tactic: simpa using toCircle_intCast (N := N) j