ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: CategoryTheory.isIso_right_of_isIso_biprod_map
File: Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean

Proof steps:
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasBinaryBiproducts C
W X Y Z : C
f : W ⟶ Y
g : X ⟶ Z
inst✝ : IsIso (biprod.map f g)
⊢ IsIso (biprod.map g f)
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasBinaryBiproducts C
W X Y Z : C
f : W ⟶ Y
g : X ⟶ Z
inst✝ : IsIso (biprod.map f g)
⊢ IsIso ((biprod.braiding X W).hom ≫ biprod.map f g ≫ (biprod.braiding Y Z).hom)
tactic: rw [← biprod.braiding_map_braiding]
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : HasZeroMorphisms C
inst✝¹ : HasBinaryBiproducts C
W X Y Z : C
f : W ⟶ Y
g : X ⟶ Z
inst✝ : IsIso (biprod.map f g)
⊢ IsIso ((biprod.braiding X W).hom ≫ biprod.map f g ≫ (biprod.braiding Y Z).hom)
state_after: no goals
tactic: infer_instance
Theorem: AffineIndependent.injective
File: Mathlib/LinearAlgebra/AffineSpace/Independent.lean

Proof steps:
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_4
inst✝ : Nontrivial k
p : ι → P
ha : AffineIndependent k p
⊢ Injective p
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_4
inst✝ : Nontrivial k
p : ι → P
ha : AffineIndependent k p
i j : ι
hij : p i = p j
⊢ i = j
tactic: intro i j hij
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_4
inst✝ : Nontrivial k
p : ι → P
ha : AffineIndependent k p
i j : ι
hij : p i = p j
⊢ i = j
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_4
inst✝ : Nontrivial k
p : ι → P
i j : ι
ha : LinearIndependent k fun i => p ↑i -ᵥ p j
hij : p i = p j
⊢ i = j
tactic: rw [affineIndependent_iff_linearIndependent_vsub _ _ j] at ha
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_4
inst✝ : Nontrivial k
p : ι → P
i j : ι
ha : LinearIndependent k fun i => p ↑i -ᵥ p j
hij : p i = p j
⊢ i = j
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_4
inst✝ : Nontrivial k
p : ι → P
i j : ι
ha : LinearIndependent k fun i => p ↑i -ᵥ p j
hij : p i = p j
hij' : ¬i = j
⊢ False
tactic: by_contra hij'
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_4
inst✝ : Nontrivial k
p : ι → P
i j : ι
ha : LinearIndependent k fun i => p ↑i -ᵥ p j
hij : p i = p j
hij' : ¬i = j
⊢ False
state_after: k : Type u_1
V : Type u_2
P : Type u_3
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_4
inst✝ : Nontrivial k
p : ι → P
i j : ι
ha : LinearIndependent k fun i => p ↑i -ᵥ p j
hij : p i = p j
hij' : ¬i = j
⊢ p ↑⟨i, hij'⟩ = p j
tactic: refine ha.ne_zero ⟨i, hij'⟩ (vsub_eq_zero_iff_eq.mpr ?_)
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝⁴ : Ring k
inst✝³ : AddCommGroup V
inst✝² : Module k V
inst✝¹ : AffineSpace V P
ι : Type u_4
inst✝ : Nontrivial k
p : ι → P
i j : ι
ha : LinearIndependent k fun i => p ↑i -ᵥ p j
hij : p i = p j
hij' : ¬i = j
⊢ p ↑⟨i, hij'⟩ = p j
state_after: no goals
tactic: simp_all only [ne_eq]
Theorem: Valued.norm_eq_zero
File: Mathlib/Topology/Algebra/Valued/NormedValued.lean

Proof steps:
state_before: K : Type u_1
hK : NormedField K
h : IsNonarchimedean (sorryAx (K → ℝ) true)
L : Type u_2
inst✝¹ : Field L
Γ₀ : Type u_3
inst✝ : LinearOrderedCommGroupWithZero Γ₀
val : Valued L Γ₀
hv : v.RankOne
x : L
hx : norm x = 0
⊢ x = 0
state_after: no goals
tactic: simpa [norm, NNReal.coe_eq_zero, RankOne.hom_eq_zero_iff, zero_iff] using hx
Theorem: lebesgue_number_lemma_of_metric
File: Mathlib/Topology/MetricSpace/Pseudo/Defs.lean

Proof steps:
state_before: α : Type u
β : Type v
X : Type u_1
ι✝ : Type u_2
inst✝ : PseudoMetricSpace α
s : Set α
ι : Sort u_3
c : ι → Set α
hs : IsCompact s
hc₁ : ∀ (i : ι), IsOpen (c i)
hc₂ : s ⊆ ⋃ i, c i
⊢ ∃ δ > 0, ∀ x ∈ s, ∃ i, ball x δ ⊆ c i
state_after: no goals
tactic: simpa only [ball, UniformSpace.ball, preimage_setOf_eq, dist_comm]
    using uniformity_basis_dist.lebesgue_number_lemma hs hc₁ hc₂
Theorem: Equiv.Perm.Disjoint.mul_eq_one_iff
File: Mathlib/GroupTheory/Perm/Support.lean

Proof steps:
state_before: α : Type u_1
f g h σ τ : Perm α
hστ : σ.Disjoint τ
⊢ σ * τ = 1 ↔ σ = 1 ∧ τ = 1
state_after: no goals
tactic: simp_rw [Perm.ext_iff, one_apply, hστ.mul_apply_eq_iff, forall_and]
Theorem: Nat.totient_even
File: Mathlib/Data/Nat/Totient.lean

Proof steps:
state_before: n : ℕ
hn : 2 < n
⊢ Even (φ n)
state_after: n : ℕ
hn : 2 < n
this : Fact (1 < n)
⊢ Even (φ n)
tactic: haveI : Fact (1 < n) := ⟨one_lt_two.trans hn⟩
state_before: n : ℕ
hn : 2 < n
this : Fact (1 < n)
⊢ Even (φ n)
state_after: n : ℕ
hn : 2 < n
this✝ : Fact (1 < n)
this : NeZero n
⊢ Even (φ n)
tactic: haveI : NeZero n := NeZero.of_gt hn
state_before: n : ℕ
hn : 2 < n
this✝ : Fact (1 < n)
this : NeZero n
⊢ Even (φ n)
state_after: n : ℕ
hn : 2 < n
this✝ : Fact (1 < n)
this : NeZero n
⊢ 2 = orderOf (-1)
tactic: suffices 2 = orderOf (-1 : (ZMod n)ˣ) by
    rw [← ZMod.card_units_eq_totient, even_iff_two_dvd, this]
    exact orderOf_dvd_card
state_before: n : ℕ
hn : 2 < n
this✝ : Fact (1 < n)
this : NeZero n
⊢ 2 = orderOf (-1)
state_after: no goals
tactic: rw [← orderOf_units, Units.coe_neg_one, orderOf_neg_one, ringChar.eq (ZMod n) n, if_neg hn.ne']
Theorem: CategoryTheory.PresheafOfGroups.OneCocycle.ev_refl
File: Mathlib/CategoryTheory/Sites/NonabelianCohomology/H1.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
G : Cᵒᵖ ⥤ Grp
X : C
I : Type w'
U : I → C
γ : OneCocycle G U
i : I
T : C
a : T ⟶ U i
⊢ γ.ev i i a a = 1
state_after: no goals
tactic: simpa using γ.ev_trans i i i a a a
Theorem: UpperHalfPlane.cosh_dist'
File: Mathlib/Analysis/Complex/UpperHalfPlane/Metric.lean

Proof steps:
state_before: z✝ w✝ : ℍ
r R : ℝ
z w : ℍ
⊢ Real.cosh (dist z w) = ((z.re - w.re) ^ 2 + z.im ^ 2 + w.im ^ 2) / (2 * z.im * w.im)
state_after: z✝ w✝ : ℍ
r R : ℝ
z w : ℍ
⊢ 2 * z.im * w.im + ((z.re - w.re) * (z.re - w.re) + (z.im - w.im) * (z.im - w.im)) =
    (z.re - w.re) ^ 2 + z.im ^ 2 + w.im ^ 2
tactic: field_simp [cosh_dist, Complex.dist_eq, Complex.sq_abs, normSq_apply]
state_before: z✝ w✝ : ℍ
r R : ℝ
z w : ℍ
⊢ 2 * z.im * w.im + ((z.re - w.re) * (z.re - w.re) + (z.im - w.im) * (z.im - w.im)) =
    (z.re - w.re) ^ 2 + z.im ^ 2 + w.im ^ 2
state_after: no goals
tactic: ring
Theorem: ArithmeticFunction.IsMultiplicative.prodPrimeFactors_one_sub_of_squarefree
File: Mathlib/NumberTheory/ArithmeticFunction.lean

Proof steps:
state_before: R : Type u_1
inst✝ : CommRing R
f : ArithmeticFunction R
hf : f.IsMultiplicative
n : ℕ
hn : Squarefree n
⊢ ∏ p ∈ n.primeFactors, (1 - f p) = ∑ d ∈ n.divisors, ↑(μ d) * f d
state_after: R : Type u_1
inst✝ : CommRing R
f : ArithmeticFunction R
hf : f.IsMultiplicative
n : ℕ
hn : Squarefree n
⊢ ∏ p ∈ n.primeFactors, (1 - f p) = ∏ p ∈ n.primeFactors, (1 + ((↑μ).pmul f) p)

R : Type u_1
inst✝ : CommRing R
f : ArithmeticFunction R
hf : f.IsMultiplicative
n : ℕ
hn : Squarefree n
⊢ ∏ p ∈ n.primeFactors, (1 + ((↑μ).pmul f) p) = ∑ d ∈ n.divisors, ↑(μ d) * f d
tactic: trans (∏ p ∈ n.primeFactors, (1 + (ArithmeticFunction.pmul (μ : ArithmeticFunction R) f) p))
Theorem: List.getLast?_eq_none
File: Mathlib/Data/List/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
⊢ [].getLast? = none ↔ [] = []
state_after: no goals
tactic: simp
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
a : α
⊢ [a].getLast? = none ↔ [a] = []
state_after: no goals
tactic: simp
state_before: ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
a b : α
l : List α
⊢ (a :: b :: l).getLast? = none ↔ a :: b :: l = []
state_after: no goals
tactic: simp [@getLast?_eq_none (b :: l)]
Theorem: CochainComplex.HomComplex.Cochain.leftShift_rightShift
File: Mathlib/Algebra/Homology/HomotopyCategory/HomComplexShift.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
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n' + a = n
⊢ (γ.rightShift a n' hn').leftShift a n hn' = (a * n + a * (a - 1) / 2).negOnePow • γ.shift a
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
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n' + a = n
p q : ℤ
hpq : p + n = q
⊢ ((γ.rightShift a n' hn').leftShift a n hn').v p q hpq = ((a * n + a * (a - 1) / 2).negOnePow • γ.shift a).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
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n' + a = n
p q : ℤ
hpq : p + n = q
⊢ ((γ.rightShift a n' hn').leftShift a n hn').v p q hpq = ((a * n + a * (a - 1) / 2).negOnePow • γ.shift a).v p q hpq
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
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n' + a = n
p q : ℤ
hpq : p + n = q
⊢ (a * n + a * (a - 1) / 2).negOnePow •
      (K.shiftFunctorObjXIso a p (p + a) ⋯).hom ≫ γ.v (p + a) (q + a) ⋯ ≫ (L.shiftFunctorObjXIso a q (q + a) ⋯).inv =
    (a * n + a * (a - 1) / 2).negOnePow • γ.v (p + a) (q + a) ⋯
tactic: simp only [leftShift_v _ a n hn' p q hpq (p + a) (by omega),
    rightShift_v _ a n' hn' (p + a) q (by omega) (q + a) (by omega), units_smul_v, shift_v']
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
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n' + a = n
p q : ℤ
hpq : p + n = q
⊢ (a * n + a * (a - 1) / 2).negOnePow •
      (K.shiftFunctorObjXIso a p (p + a) ⋯).hom ≫ γ.v (p + a) (q + a) ⋯ ≫ (L.shiftFunctorObjXIso a q (q + a) ⋯).inv =
    (a * n + a * (a - 1) / 2).negOnePow • γ.v (p + a) (q + a) ⋯
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
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n' + a = n
p q : ℤ
hpq : p + n = q
⊢ (a * n + a * (a - 1) / 2).negOnePow • 𝟙 (K.X (p + a)) ≫ γ.v (p + a) (q + a) ⋯ ≫ 𝟙 (L.X (q + a)) =
    (a * n + a * (a - 1) / 2).negOnePow • γ.v (p + a) (q + a) ⋯
tactic: dsimp
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
K L M : CochainComplex C ℤ
n : ℤ
γ γ₁ γ₂ : Cochain K L n
a n' : ℤ
hn' : n' + a = n
p q : ℤ
hpq : p + n = q
⊢ (a * n + a * (a - 1) / 2).negOnePow • 𝟙 (K.X (p + a)) ≫ γ.v (p + a) (q + a) ⋯ ≫ 𝟙 (L.X (q + a)) =
    (a * n + a * (a - 1) / 2).negOnePow • γ.v (p + a) (q + a) ⋯
state_after: no goals
tactic: rw [id_comp, comp_id]
Theorem: CircleDeg1Lift.iterate_pos_le_iff
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

Proof steps:
state_before: f g : CircleDeg1Lift
x : ℝ
m : ℤ
n : ℕ
hn : 0 < n
⊢ (⇑f)^[n] x ≤ x + ↑n * ↑m ↔ f x ≤ x + ↑m
state_after: no goals
tactic: simpa only [nsmul_eq_mul, add_right_iterate] using
    (f.commute_add_int m).iterate_pos_le_iff_map_le f.monotone (strictMono_id.add_const (m : ℝ)) hn
Theorem: Matrix.matPolyEquiv_charmatrix
File: Mathlib/LinearAlgebra/Matrix/Charpoly/Basic.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
m : Type u_3
n : Type u_4
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : Fintype m
inst✝ : Fintype n
M₁₁ : Matrix m m R
M₁₂ : Matrix m n R
M₂₁ : Matrix n m R
M₂₂ M : Matrix n n R
i j : n
⊢ matPolyEquiv M.charmatrix = X - C M
state_after: case a.a
R : Type u_1
S : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
m : Type u_3
n : Type u_4
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : Fintype m
inst✝ : Fintype n
M₁₁ : Matrix m m R
M₁₂ : Matrix m n R
M₂₁ : Matrix n m R
M₂₂ M : Matrix n n R
i✝ j✝ : n
k : ℕ
i j : n
⊢ (matPolyEquiv M.charmatrix).coeff k i j = (X - C M).coeff k i j
tactic: ext k i j
state_before: case a.a
R : Type u_1
S : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
m : Type u_3
n : Type u_4
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : Fintype m
inst✝ : Fintype n
M₁₁ : Matrix m m R
M₁₂ : Matrix m n R
M₂₁ : Matrix n m R
M₂₂ M : Matrix n n R
i✝ j✝ : n
k : ℕ
i j : n
⊢ (matPolyEquiv M.charmatrix).coeff k i j = (X - C M).coeff k i j
state_after: case a.a
R : Type u_1
S : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
m : Type u_3
n : Type u_4
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : Fintype m
inst✝ : Fintype n
M₁₁ : Matrix m m R
M₁₂ : Matrix m n R
M₂₁ : Matrix n m R
M₂₂ M : Matrix n n R
i✝ j✝ : n
k : ℕ
i j : n
⊢ (M.charmatrix i j).coeff k = (X.coeff k - (C M).coeff k) i j
tactic: simp only [matPolyEquiv_coeff_apply, coeff_sub, Pi.sub_apply]
state_before: case a.a
R : Type u_1
S : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
m : Type u_3
n : Type u_4
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : Fintype m
inst✝ : Fintype n
M₁₁ : Matrix m m R
M₁₂ : Matrix m n R
M₂₁ : Matrix n m R
M₂₂ M : Matrix n n R
i✝ j✝ : n
k : ℕ
i j : n
⊢ (M.charmatrix i j).coeff k = (X.coeff k - (C M).coeff k) i j
state_after: case pos
R : Type u_1
S : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
m : Type u_3
n : Type u_4
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : Fintype m
inst✝ : Fintype n
M₁₁ : Matrix m m R
M₁₂ : Matrix m n R
M₂₁ : Matrix n m R
M₂₂ M : Matrix n n R
i✝ j✝ : n
k : ℕ
i j : n
h : i = j
⊢ (M.charmatrix i j).coeff k = (X.coeff k - (C M).coeff k) i j

case neg
R : Type u_1
S : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
m : Type u_3
n : Type u_4
inst✝³ : DecidableEq m
inst✝² : DecidableEq n
inst✝¹ : Fintype m
inst✝ : Fintype n
M₁₁ : Matrix m m R
M₁₂ : Matrix m n R
M₂₁ : Matrix n m R
M₂₂ M : Matrix n n R
i✝ j✝ : n
k : ℕ
i j : n
h : ¬i = j
⊢ (M.charmatrix i j).coeff k = (X.coeff k - (C M).coeff k) i j
tactic: by_cases h : i = j
Theorem: String.any_iff
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

Proof steps:
state_before: s : String
p : Char → Bool
⊢ s.any p = true ↔ ∃ c, c ∈ s.data ∧ p c = true
state_after: no goals
tactic: simp [any_eq]
Theorem: Finset.prod_primes_dvd
File: Mathlib/Algebra/BigOperators/Associated.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝¹ : CancelCommMonoidWithZero α
inst✝ : Unique αˣ
s : Finset α
n : α
h : ∀ a ∈ s, Prime a
div : ∀ a ∈ s, a ∣ n
⊢ ∏ p ∈ s, p ∣ n
state_after: no goals
tactic: classical
    exact
      Multiset.prod_primes_dvd n (by simpa only [Multiset.map_id', Finset.mem_def] using h)
        (by simpa only [Multiset.map_id', Finset.mem_def] using div)
        (by
          simp only [Multiset.map_id', associated_eq_eq, Multiset.countP_eq_card_filter,
            ← s.val.count_eq_card_filter_eq, ← Multiset.nodup_iff_count_le_one, s.nodup])
Theorem: List.dedup_cons_of_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, not_not] using h
Theorem: Int.cast_negOfNat
File: Mathlib/Data/Int/Cast/Basic.lean

Proof steps:
state_before: R : Type u
inst✝ : AddGroupWithOne R
n : ℕ
⊢ ↑(negOfNat n) = -↑n
state_after: no goals
tactic: simp [Int.cast_neg, negOfNat_eq]
Theorem: Submodule.singleton_set_smul
File: Mathlib/Algebra/Module/Submodule/Pointwise.lean

Proof steps:
state_before: α : Type u_1
R : Type u_2
M : Type u_3
inst✝⁷ : Semiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : Module R M
S : Type u_4
inst✝⁴ : Monoid S
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : DistribMulAction S M
sR : Set R
s : Set S
N : Submodule R M
inst✝ : SMulCommClass S R M
r : S
⊢ {r} • N = r • N
state_after: case closed_under_smul
α : Type u_1
R : Type u_2
M : Type u_3
inst✝⁷ : Semiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : Module R M
S : Type u_4
inst✝⁴ : Monoid S
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : DistribMulAction S M
sR : Set R
s : Set S
N : Submodule R M
inst✝ : SMulCommClass S R M
r : S
⊢ ∀ ⦃r_1 : S⦄ ⦃n : M⦄, r_1 ∈ {r} → n ∈ N → r_1 • n ∈ r • N

case le
α : Type u_1
R : Type u_2
M : Type u_3
inst✝⁷ : Semiring R
inst✝⁶ : AddCommMonoid M
inst✝⁵ : Module R M
S : Type u_4
inst✝⁴ : Monoid S
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : DistribMulAction S M
sR : Set R
s : Set S
N : Submodule R M
inst✝ : SMulCommClass S R M
r : S
⊢ r • N ≤ {r} • N
tactic: apply set_smul_eq_of_le
Theorem: Polynomial.scaleRoots_C
File: Mathlib/RingTheory/Polynomial/ScaleRoots.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
r c : R
⊢ (C c).scaleRoots r = C c
state_after: case a
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
r c : R
n✝ : ℕ
⊢ ((C c).scaleRoots r).coeff n✝ = (C c).coeff n✝
tactic: ext
state_before: case a
R : Type u_1
S : Type u_2
A : Type u_3
K : Type u_4
inst✝¹ : Semiring R
inst✝ : Semiring S
r c : R
n✝ : ℕ
⊢ ((C c).scaleRoots r).coeff n✝ = (C c).coeff n✝
state_after: no goals
tactic: simp
Theorem: homeomorphUnitSphereProd_apply_fst_coe
File: Mathlib/Analysis/NormedSpace/SphereNormEquiv.lean

Proof steps:
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : ↑{0}ᶜ
⊢ ‖↑x‖⁻¹ • ↑x ∈ sphere 0 1
state_after: no goals
tactic: rw [mem_sphere_zero_iff_norm, norm_smul, norm_inv, norm_norm,
      inv_mul_cancel (norm_ne_zero_iff.2 x.2)]
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : ↑{0}ᶜ
⊢ ↑((fun x => ⟨↑x.2 • ↑x.1, ⋯⟩) ((fun x => (⟨‖↑x‖⁻¹ • ↑x, ⋯⟩, ⟨‖↑x‖, ⋯⟩)) x)) = ↑x
state_after: no goals
tactic: simp [smul_inv_smul₀ (norm_ne_zero_iff.2 x.2)]
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
hx : x ∈ sphere 0 1
r : ℝ
hr : r ∈ Ioi 0
⊢ (fun x => (⟨‖↑x‖⁻¹ • ↑x, ⋯⟩, ⟨‖↑x‖, ⋯⟩)) ((fun x => ⟨↑x.2 • ↑x.1, ⋯⟩) (⟨x, hx⟩, ⟨r, hr⟩)) = (⟨x, hx⟩, ⟨r, hr⟩)
state_after: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
hx✝ : x ∈ sphere 0 1
hx : ‖x‖ = 1
r : ℝ
hr : r ∈ Ioi 0
⊢ (fun x => (⟨‖↑x‖⁻¹ • ↑x, ⋯⟩, ⟨‖↑x‖, ⋯⟩)) ((fun x => ⟨↑x.2 • ↑x.1, ⋯⟩) (⟨x, hx✝⟩, ⟨r, hr⟩)) = (⟨x, hx✝⟩, ⟨r, hr⟩)
tactic: rw [mem_sphere_zero_iff_norm] at hx
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
hx✝ : x ∈ sphere 0 1
hx : ‖x‖ = 1
r : ℝ
hr : r ∈ Ioi 0
⊢ (fun x => (⟨‖↑x‖⁻¹ • ↑x, ⋯⟩, ⟨‖↑x‖, ⋯⟩)) ((fun x => ⟨↑x.2 • ↑x.1, ⋯⟩) (⟨x, hx✝⟩, ⟨r, hr⟩)) = (⟨x, hx✝⟩, ⟨r, hr⟩)
state_after: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
hx✝ : x ∈ sphere 0 1
hx : ‖x‖ = 1
r : ℝ
hr✝ : r ∈ Ioi 0
hr : 0 < r
⊢ (fun x => (⟨‖↑x‖⁻¹ • ↑x, ⋯⟩, ⟨‖↑x‖, ⋯⟩)) ((fun x => ⟨↑x.2 • ↑x.1, ⋯⟩) (⟨x, hx✝⟩, ⟨r, hr✝⟩)) = (⟨x, hx✝⟩, ⟨r, hr✝⟩)
tactic: rw [mem_Ioi] at hr
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
x : E
hx✝ : x ∈ sphere 0 1
hx : ‖x‖ = 1
r : ℝ
hr✝ : r ∈ Ioi 0
hr : 0 < r
⊢ (fun x => (⟨‖↑x‖⁻¹ • ↑x, ⋯⟩, ⟨‖↑x‖, ⋯⟩)) ((fun x => ⟨↑x.2 • ↑x.1, ⋯⟩) (⟨x, hx✝⟩, ⟨r, hr✝⟩)) = (⟨x, hx✝⟩, ⟨r, hr✝⟩)
state_after: no goals
tactic: ext <;> simp [hx, norm_smul, hr.le, abs_of_pos hr, hr.ne']
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ Continuous
    { toFun := fun x => (⟨‖↑x‖⁻¹ • ↑x, ⋯⟩, ⟨‖↑x‖, ⋯⟩), invFun := fun x => ⟨↑x.2 • ↑x.1, ⋯⟩, left_inv := ⋯,
        right_inv := ⋯ }.toFun
state_after: case refine_1
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ Continuous fun x => ‖↑x‖

case refine_2
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ ∀ (x : ↑{0}ᶜ), ‖↑x‖ ≠ 0

case refine_3
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ Continuous Subtype.val

case refine_4
E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ Continuous fun x => ⟨‖↑x‖, ⋯⟩
tactic: refine .prod_mk (.codRestrict (.smul (.inv₀ ?_ ?_) ?_) _) ?_
state_before: E : Type u_1
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
⊢ Continuous
    { toFun := fun x => (⟨‖↑x‖⁻¹ • ↑x, ⋯⟩, ⟨‖↑x‖, ⋯⟩), invFun := fun x => ⟨↑x.2 • ↑x.1, ⋯⟩, left_inv := ⋯,
        right_inv := ⋯ }.invFun
state_after: no goals
tactic: apply Continuous.subtype_mk (by fun_prop)
Theorem: Stream'.Seq.not_terminates_iff
File: Mathlib/Data/Seq/Seq.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
s : Seq α
⊢ ¬s.Terminates ↔ ∀ (n : ℕ), (s.get? n).isSome = true
state_after: no goals
tactic: simp only [Terminates, TerminatedAt, ← Ne.eq_def, Option.ne_none_iff_isSome, not_exists, iff_self]
Theorem: CategoryTheory.Limits.isIso_of_isTerminal
File: Mathlib/CategoryTheory/Limits/Shapes/Terminal.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
J : Type u
inst✝ : Category.{v, u} J
X Y : C
hX : IsTerminal X
hY : IsTerminal Y
f : X ⟶ Y
⊢ IsIso f
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
J : Type u
inst✝ : Category.{v, u} J
X Y : C
hX : IsTerminal X
hY : IsTerminal Y
f : X ⟶ Y
⊢ f ≫ hX.from Y = 𝟙 X ∧ hX.from Y ≫ f = 𝟙 Y
tactic: refine ⟨⟨IsTerminal.from hX Y, ?_⟩⟩
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
J : Type u
inst✝ : Category.{v, u} J
X Y : C
hX : IsTerminal X
hY : IsTerminal Y
f : X ⟶ Y
⊢ f ≫ hX.from Y = 𝟙 X ∧ hX.from Y ≫ f = 𝟙 Y
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
J : Type u
inst✝ : Category.{v, u} J
X Y : C
hX : IsTerminal X
hY : IsTerminal Y
f : X ⟶ Y
⊢ hX.from Y ≫ f = 𝟙 Y
tactic: simp only [IsTerminal.comp_from, IsTerminal.from_self, true_and]
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
J : Type u
inst✝ : Category.{v, u} J
X Y : C
hX : IsTerminal X
hY : IsTerminal Y
f : X ⟶ Y
⊢ hX.from Y ≫ f = 𝟙 Y
state_after: no goals
tactic: apply IsTerminal.hom_ext hY
Theorem: isProperMap_iff_isClosedMap_of_inj
File: Mathlib/Topology/Maps/Proper/Basic.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
W : Type u_4
ι : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f : X → Y
g : Y → Z
f_cont : Continuous f
f_inj : Injective f
⊢ IsProperMap f ↔ IsClosedMap f
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
W : Type u_4
ι : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f : X → Y
g : Y → Z
f_cont : Continuous f
f_inj : Injective f
h : IsClosedMap f
⊢ IsProperMap f
tactic: refine ⟨fun h ↦ h.isClosedMap, fun h ↦ ?_⟩
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
W : Type u_4
ι : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f : X → Y
g : Y → Z
f_cont : Continuous f
f_inj : Injective f
h : IsClosedMap f
⊢ IsProperMap f
state_after: X : Type u_1
Y : Type u_2
Z : Type u_3
W : Type u_4
ι : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f : X → Y
g : Y → Z
f_cont : Continuous f
f_inj : Injective f
h : IsClosedMap f
⊢ Continuous f ∧ IsClosedMap f ∧ ∀ (y : Y), IsCompact (f ⁻¹' {y})
tactic: rw [isProperMap_iff_isClosedMap_and_compact_fibers]
state_before: X : Type u_1
Y : Type u_2
Z : Type u_3
W : Type u_4
ι : Type u_5
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace W
f : X → Y
g : Y → Z
f_cont : Continuous f
f_inj : Injective f
h : IsClosedMap f
⊢ Continuous f ∧ IsClosedMap f ∧ ∀ (y : Y), IsCompact (f ⁻¹' {y})
state_after: no goals
tactic: exact ⟨f_cont, h, fun y ↦ (subsingleton_singleton.preimage f_inj).isCompact⟩