ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: DifferentiableAt.inversion
File: Mathlib/Geometry/Euclidean/Inversion/Calculus.lean

Proof steps:
state_before: E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
c x : E → F
R : E → ℝ
s : Set E
a : E
n : ℕ∞
hc : DifferentiableAt ℝ c a
hR : DifferentiableAt ℝ R a
hx : DifferentiableAt ℝ x a
hne : x a ≠ c a
⊢ DifferentiableAt ℝ (fun a => inversion (c a) (R a) (x a)) a
state_after: E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
c x : E → F
R : E → ℝ
s : Set E
a : E
n : ℕ∞
hc : DifferentiableWithinAt ℝ c univ a
hR : DifferentiableWithinAt ℝ R univ a
hx : DifferentiableWithinAt ℝ x univ a
hne : x a ≠ c a
⊢ DifferentiableWithinAt ℝ (fun a => inversion (c a) (R a) (x a)) univ a
tactic: rw [← differentiableWithinAt_univ] at *
state_before: E : Type u_1
F : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
inst✝¹ : NormedAddCommGroup F
inst✝ : InnerProductSpace ℝ F
c x : E → F
R : E → ℝ
s : Set E
a : E
n : ℕ∞
hc : DifferentiableWithinAt ℝ c univ a
hR : DifferentiableWithinAt ℝ R univ a
hx : DifferentiableWithinAt ℝ x univ a
hne : x a ≠ c a
⊢ DifferentiableWithinAt ℝ (fun a => inversion (c a) (R a) (x a)) univ a
state_after: no goals
tactic: exact hc.inversion hR hx hne
Theorem: CategoryTheory.Limits.kernelIsIsoComp_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✝¹ : IsIso f
inst✝ : HasKernel g
⊢ (kernel.ι (f ≫ g) ≫ f) ≫ g = 0
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✝¹ : IsIso f
inst✝ : HasKernel g
⊢ (kernel.ι g ≫ inv f) ≫ f ≫ g = 0
state_after: no goals
tactic: simp
Theorem: Zsqrtd.norm_eq_one_iff
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

Proof steps:
state_before: d : ℤ
x : ℤ√d
h : x.norm.natAbs = 1
hx : 0 ≤ x.norm
⊢ 1 = x * star x
state_after: no goals
tactic: rwa [← Int.natCast_inj, Int.natAbs_of_nonneg hx, ← @Int.cast_inj (ℤ√d) _ _,
              norm_eq_mul_conj, eq_comm] at h
state_before: d : ℤ
x : ℤ√d
h : x.norm.natAbs = 1
hx : x.norm ≤ 0
⊢ 1 = x * -star x
state_after: no goals
tactic: rwa [← Int.natCast_inj, Int.ofNat_natAbs_of_nonpos hx, ← @Int.cast_inj (ℤ√d) _ _,
              Int.cast_neg, norm_eq_mul_conj, neg_mul_eq_mul_neg, eq_comm] at h
state_before: d : ℤ
x : ℤ√d
h : IsUnit x
⊢ x.norm.natAbs = 1
state_after: d : ℤ
x : ℤ√d
h : IsUnit x
y : ℤ√d
hy : 1 = x * y
⊢ x.norm.natAbs = 1
tactic: let ⟨y, hy⟩ := isUnit_iff_dvd_one.1 h
state_before: d : ℤ
x : ℤ√d
h : IsUnit x
y : ℤ√d
hy : 1 = x * y
⊢ x.norm.natAbs = 1
state_after: d : ℤ
x : ℤ√d
h : IsUnit x
y : ℤ√d
hy : 1 = x * y
this : (Int.natAbs ∘ norm) 1 = (Int.natAbs ∘ norm) (x * y)
⊢ x.norm.natAbs = 1
tactic: have := congr_arg (Int.natAbs ∘ norm) hy
state_before: d : ℤ
x : ℤ√d
h : IsUnit x
y : ℤ√d
hy : 1 = x * y
this : (Int.natAbs ∘ norm) 1 = (Int.natAbs ∘ norm) (x * y)
⊢ x.norm.natAbs = 1
state_after: d : ℤ
x : ℤ√d
h : IsUnit x
y : ℤ√d
hy : 1 = x * y
this : x.norm.natAbs = 1 ∧ y.norm.natAbs = 1
⊢ x.norm.natAbs = 1
tactic: rw [Function.comp_apply, Function.comp_apply, norm_mul, Int.natAbs_mul, norm_one,
      Int.natAbs_one, eq_comm, mul_eq_one] at this
state_before: d : ℤ
x : ℤ√d
h : IsUnit x
y : ℤ√d
hy : 1 = x * y
this : x.norm.natAbs = 1 ∧ y.norm.natAbs = 1
⊢ x.norm.natAbs = 1
state_after: no goals
tactic: exact this.1
Theorem: CategoryTheory.StructuredArrow.homMk'_mk_comp
File: Mathlib/CategoryTheory/Comma/StructuredArrow.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
S S' S'' : D
Y Y' Y'' : C
T T' : C ⥤ D
f : S ⟶ T.obj Y
g : Y ⟶ Y'
g' : Y' ⟶ Y''
⊢ mk ((mk (f ≫ T.map g)).hom ≫ T.map g') = mk ((mk f).hom ≫ T.map (g ≫ g'))
state_after: no goals
tactic: simp
Theorem: IsNilpotent.isUnit_sub_one
File: Mathlib/RingTheory/Nilpotent/Basic.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
x y : R
inst✝ : Ring R
r : R
hnil : IsNilpotent r
⊢ IsUnit (r - 1)
state_after: case intro
R : Type u_1
S : Type u_2
x y : R
inst✝ : Ring R
r : R
n : ℕ
hn : r ^ n = 0
⊢ IsUnit (r - 1)
tactic: obtain ⟨n, hn⟩ := hnil
state_before: case intro
R : Type u_1
S : Type u_2
x y : R
inst✝ : Ring R
r : R
n : ℕ
hn : r ^ n = 0
⊢ IsUnit (r - 1)
state_after: case intro.refine_1
R : Type u_1
S : Type u_2
x y : R
inst✝ : Ring R
r : R
n : ℕ
hn : r ^ n = 0
⊢ (r - 1) * -∑ i ∈ Finset.range n, r ^ i = 1

case intro.refine_2
R : Type u_1
S : Type u_2
x y : R
inst✝ : Ring R
r : R
n : ℕ
hn : r ^ n = 0
⊢ (-∑ i ∈ Finset.range n, r ^ i) * (r - 1) = 1
tactic: refine ⟨⟨r - 1, -∑ i ∈ Finset.range n, r ^ i, ?_, ?_⟩, rfl⟩
Theorem: quasiIsoAt_iff_comp_right
File: Mathlib/Algebra/Homology/QuasiIso.lean

Proof steps:
state_before: ι : Type u_1
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
c : ComplexShape ι
K L M K' L' : HomologicalComplex C c
φ : K ⟶ L
φ' : L ⟶ M
i : ι
inst✝² : K.HasHomology i
inst✝¹ : L.HasHomology i
inst✝ : M.HasHomology i
hφ' : QuasiIsoAt φ' i
⊢ QuasiIsoAt (φ ≫ φ') i ↔ QuasiIsoAt φ i
state_after: case mp
ι : Type u_1
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
c : ComplexShape ι
K L M K' L' : HomologicalComplex C c
φ : K ⟶ L
φ' : L ⟶ M
i : ι
inst✝² : K.HasHomology i
inst✝¹ : L.HasHomology i
inst✝ : M.HasHomology i
hφ' : QuasiIsoAt φ' i
⊢ QuasiIsoAt (φ ≫ φ') i → QuasiIsoAt φ i

case mpr
ι : Type u_1
C : Type u
inst✝⁴ : Category.{v, u} C
inst✝³ : HasZeroMorphisms C
c : ComplexShape ι
K L M K' L' : HomologicalComplex C c
φ : K ⟶ L
φ' : L ⟶ M
i : ι
inst✝² : K.HasHomology i
inst✝¹ : L.HasHomology i
inst✝ : M.HasHomology i
hφ' : QuasiIsoAt φ' i
⊢ QuasiIsoAt φ i → QuasiIsoAt (φ ≫ φ') i
tactic: constructor
Theorem: Nat.Partrec.Code.eval_curry
File: Mathlib/Computability/PartrecCode.lean

Proof steps:
state_before: c : Code
n x : ℕ
⊢ (c.curry n).eval x = c.eval (Nat.pair n x)
state_after: no goals
tactic: simp! [Seq.seq]
Theorem: MeasureTheory.AEEqFun.comp₂_toGerm
File: Mathlib/MeasureTheory/Function/AEEqFun.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝³ : MeasurableSpace α
μ ν : Measure α
inst✝² : TopologicalSpace β
inst✝¹ : TopologicalSpace γ
inst✝ : TopologicalSpace δ
g : β → γ → δ
hg : Continuous (uncurry g)
f₁✝ : α →ₘ[μ] β
f₂✝ : α →ₘ[μ] γ
f₁ : α → β
x✝¹ : AEStronglyMeasurable f₁ μ
f₂ : α → γ
x✝ : AEStronglyMeasurable f₂ μ
⊢ (comp₂ g hg (mk f₁ x✝¹) (mk f₂ x✝)).toGerm = Germ.map₂ g (mk f₁ x✝¹).toGerm (mk f₂ x✝).toGerm
state_after: no goals
tactic: simp
Theorem: ZMod.toAddCircle_injective
File: Mathlib/Topology/Instances/AddCircle.lean

Proof steps:
state_before: 𝕜 : Type u_1
B : Type u_2
N : ℕ
inst✝ : NeZero N
⊢ Injective ⇑toAddCircle
state_after: 𝕜 : Type u_1
B : Type u_2
N : ℕ
inst✝ : NeZero N
x y : ZMod N
hxy : toAddCircle x = toAddCircle y
⊢ x = y
tactic: intro x y hxy
state_before: 𝕜 : Type u_1
B : Type u_2
N : ℕ
inst✝ : NeZero N
x y : ZMod N
hxy : toAddCircle x = toAddCircle y
⊢ x = y
state_after: 𝕜 : Type u_1
B : Type u_2
N : ℕ
inst✝ : NeZero N
x y : ZMod N
hxy : toAddCircle x = toAddCircle y
this : 0 < ↑N
⊢ x = y
tactic: have : (0 : ℝ) < N := Nat.cast_pos.mpr (NeZero.pos _)
state_before: 𝕜 : Type u_1
B : Type u_2
N : ℕ
inst✝ : NeZero N
x y : ZMod N
hxy : toAddCircle x = toAddCircle y
this : 0 < ↑N
⊢ x = y
state_after: no goals
tactic: rwa [toAddCircle_apply, toAddCircle_apply, AddCircle.coe_eq_coe_iff_of_mem_Ico
    (hp := Real.fact_zero_lt_one) (a := 0), div_left_inj' this.ne', Nat.cast_inj,
    (val_injective N).eq_iff] at hxy <;>
  exact ⟨by positivity, by simpa only [zero_add, div_lt_one this, Nat.cast_lt] using val_lt _⟩
Theorem: Finset.prod_val
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

Proof steps:
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : CommMonoid α
s : Finset α
⊢ s.val.prod = s.prod id
state_after: no goals
tactic: rw [Finset.prod, Multiset.map_id]
Theorem: Complex.Gammaℝ_mul_Gammaℝ_add_one
File: Mathlib/Analysis/SpecialFunctions/Gamma/Deligne.lean

Proof steps:
state_before: s : ℂ
⊢ s.Gammaℝ * (s + 1).Gammaℝ = s.Gammaℂ
state_after: s : ℂ
⊢ ↑π ^ (-s / 2) * Gamma (s / 2) * (↑π ^ (-(s + 1) / 2) * Gamma ((s + 1) / 2)) = 2 * (2 * ↑π) ^ (-s) * Gamma s
tactic: simp only [Gammaℝ_def, Gammaℂ_def]
state_before: s : ℂ
⊢ ↑π ^ (-s / 2) * Gamma (s / 2) * (↑π ^ (-(s + 1) / 2) * Gamma ((s + 1) / 2)) = 2 * (2 * ↑π) ^ (-s) * Gamma s
state_after: no goals
tactic: calc
  _ = (π ^ (-s / 2) * π ^ (-(s + 1) / 2)) * (Gamma (s / 2) * Gamma (s / 2 + 1 / 2)) := by ring_nf
  _ = 2 ^ (1 - s) * (π ^ (-1 / 2 - s) * π ^ (1 / 2 : ℂ)) * Gamma s := by
    rw [← cpow_add _ _ (ofReal_ne_zero.mpr pi_ne_zero), Complex.Gamma_mul_Gamma_add_half,
      sqrt_eq_rpow, ofReal_cpow pi_pos.le, ofReal_div, ofReal_one, ofReal_ofNat]
    ring_nf
  _ = 2 * ((2 : ℝ) ^ (-s) * π ^ (-s)) * Gamma s := by
    rw [sub_eq_add_neg, cpow_add _ _ two_ne_zero, cpow_one,
      ← cpow_add _ _ (ofReal_ne_zero.mpr pi_ne_zero), ofReal_ofNat]
    ring_nf
  _ = 2 * (2 * π) ^ (-s) * Gamma s := by
    rw [← mul_cpow_ofReal_nonneg two_pos.le pi_pos.le, ofReal_ofNat]
Theorem: toIocMod_add_right
File: Mathlib/Algebra/Order/ToIntervalMod.lean

Proof steps:
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIocMod hp a (b + p) = toIocMod hp a b
state_after: no goals
tactic: simpa only [one_zsmul] using toIocMod_add_zsmul hp a b 1
Theorem: Int.cast_eq_zero
File: Mathlib/Data/Int/Cast/Lemmas.lean

Proof steps:
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝¹ : AddGroupWithOne α
inst✝ : CharZero α
m n : ℤ
h : ↑n = 0
⊢ n = 0
state_after: case ofNat
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝¹ : AddGroupWithOne α
inst✝ : CharZero α
m : ℤ
a✝ : ℕ
h : ↑(ofNat a✝) = 0
⊢ ofNat a✝ = 0

case negSucc
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝¹ : AddGroupWithOne α
inst✝ : CharZero α
m : ℤ
a✝ : ℕ
h : ↑-[a✝+1] = 0
⊢ -[a✝+1] = 0
tactic: cases n
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
inst✝¹ : AddGroupWithOne α
inst✝ : CharZero α
m n : ℤ
h : n = 0
⊢ ↑n = 0
state_after: no goals
tactic: rw [h, cast_zero]
Theorem: continuum_le_cardinal_of_isOpen
File: Mathlib/Topology/Algebra/Module/Cardinality.lean

Proof steps:
state_before: E : Type u_1
𝕜 : Type u_2
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : CompleteSpace 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : Module 𝕜 E
inst✝³ : Nontrivial E
inst✝² : TopologicalSpace E
inst✝¹ : ContinuousAdd E
inst✝ : ContinuousSMul 𝕜 E
s : Set E
hs : IsOpen s
h's : s.Nonempty
⊢ 𝔠 ≤ #↑s
state_after: no goals
tactic: simpa [cardinal_eq_of_isOpen 𝕜 hs h's] using continuum_le_cardinal_of_module 𝕜 E
Theorem: Nat.succ_mul_binomial
File: Mathlib/Data/Nat/Choose/Multinomial.lean

Proof steps:
state_before: α : Type u_1
s : Finset α
f : α → ℕ
a b : α
n : ℕ
inst✝ : DecidableEq α
h : a ≠ b
⊢ (f a + f b).succ * multinomial {a, b} f = (f a).succ * multinomial {a, b} (Function.update f a (f a).succ)
state_after: α : Type u_1
s : Finset α
f : α → ℕ
a b : α
n : ℕ
inst✝ : DecidableEq α
h : a ≠ b
⊢ (f a + f b).succ * (f a + f b).choose (f a) = ((f a).succ + f b).choose (f a).succ * (f a).succ
tactic: rw [binomial_eq_choose h, binomial_eq_choose h, mul_comm (f a).succ, Function.update_same,
    Function.update_noteq (ne_comm.mp h)]
state_before: α : Type u_1
s : Finset α
f : α → ℕ
a b : α
n : ℕ
inst✝ : DecidableEq α
h : a ≠ b
⊢ (f a + f b).succ * (f a + f b).choose (f a) = ((f a).succ + f b).choose (f a).succ * (f a).succ
state_after: no goals
tactic: rw [succ_mul_choose_eq (f a + f b) (f a), succ_add (f a) (f b)]
Theorem: Finset.coe_zpow
File: Mathlib/Data/Finset/Pointwise.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DivisionMonoid α
s✝ t s : Finset α
n : ℕ
⊢ ↑(s ^ Int.negSucc n) = ↑s ^ Int.negSucc n
state_after: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DivisionMonoid α
s✝ t s : Finset α
n : ℕ
⊢ (↑(npowRec n.succ s))⁻¹ = ↑s ^ Int.negSucc n
tactic: refine (coe_inv _).trans ?_
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DivisionMonoid α
s✝ t s : Finset α
n : ℕ
⊢ (↑(npowRec n.succ s))⁻¹ = ↑s ^ Int.negSucc n
state_after: no goals
tactic: exact congr_arg Inv.inv (coe_pow _ _)
Theorem: Matrix.trace_permutation
File: Mathlib/LinearAlgebra/Matrix/Permutation.lean

Proof steps:
state_before: n : Type u_1
R : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
σ : Perm n
inst✝ : AddCommMonoidWithOne R
⊢ (Perm.permMatrix R σ).trace = ↑(Function.fixedPoints ⇑σ).ncard
state_after: n : Type u_1
R : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
σ : Perm n
inst✝ : AddCommMonoidWithOne R
⊢ ∑ i : n, (Perm.permMatrix R σ).diag i = ↑(Function.fixedPoints ⇑σ).ncard
tactic: delta trace
state_before: n : Type u_1
R : Type u_2
inst✝² : DecidableEq n
inst✝¹ : Fintype n
σ : Perm n
inst✝ : AddCommMonoidWithOne R
⊢ ∑ i : n, (Perm.permMatrix R σ).diag i = ↑(Function.fixedPoints ⇑σ).ncard
state_after: no goals
tactic: simp [toPEquiv_apply, ← Set.ncard_coe_Finset, Function.fixedPoints, Function.IsFixedPt]
Theorem: MeasureTheory.SimpleFunc.measurableSet_cut
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
r : α → β → Prop
f : α →ₛ β
h : ∀ (b : β), MeasurableSet {a | r a b}
⊢ MeasurableSet {a | r a (↑f a)}
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
r : α → β → Prop
f : α →ₛ β
h : ∀ (b : β), MeasurableSet {a | r a b}
this : {a | r a (↑f a)} = ⋃ b ∈ range ↑f, {a | r a b} ∩ ↑f ⁻¹' {b}
⊢ MeasurableSet {a | r a (↑f a)}
tactic: have : { a | r a (f a) } = ⋃ b ∈ range f, { a | r a b } ∩ f ⁻¹' {b} := by
    ext a
    suffices r a (f a) ↔ ∃ i, r a (f i) ∧ f a = f i by simpa
    exact ⟨fun h => ⟨a, ⟨h, rfl⟩⟩, fun ⟨a', ⟨h', e⟩⟩ => e.symm ▸ h'⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
r : α → β → Prop
f : α →ₛ β
h : ∀ (b : β), MeasurableSet {a | r a b}
this : {a | r a (↑f a)} = ⋃ b ∈ range ↑f, {a | r a b} ∩ ↑f ⁻¹' {b}
⊢ MeasurableSet {a | r a (↑f a)}
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
r : α → β → Prop
f : α →ₛ β
h : ∀ (b : β), MeasurableSet {a | r a b}
this : {a | r a (↑f a)} = ⋃ b ∈ range ↑f, {a | r a b} ∩ ↑f ⁻¹' {b}
⊢ MeasurableSet (⋃ b ∈ range ↑f, {a | r a b} ∩ ↑f ⁻¹' {b})
tactic: rw [this]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
r : α → β → Prop
f : α →ₛ β
h : ∀ (b : β), MeasurableSet {a | r a b}
this : {a | r a (↑f a)} = ⋃ b ∈ range ↑f, {a | r a b} ∩ ↑f ⁻¹' {b}
⊢ MeasurableSet (⋃ b ∈ range ↑f, {a | r a b} ∩ ↑f ⁻¹' {b})
state_after: no goals
tactic: exact
    MeasurableSet.biUnion f.finite_range.countable fun b _ =>
      MeasurableSet.inter (h b) (f.measurableSet_fiber _)
Theorem: Filter.HasBasis.uniformity_of_nhds_zero_neg_add_swapped
File: Mathlib/Topology/Algebra/UniformGroup.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
ι : Sort u_3
p : ι → Prop
U : ι → Set α
h : (𝓝 1).HasBasis p U
⊢ (𝓤 α).HasBasis p fun i => {x | x.2⁻¹ * x.1 ∈ U i}
state_after: α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
ι : Sort u_3
p : ι → Prop
U : ι → Set α
h : (𝓝 1).HasBasis p U
⊢ (Filter.comap (fun x => x.2⁻¹ * x.1) (𝓝 1)).HasBasis p fun i => {x | x.2⁻¹ * x.1 ∈ U i}
tactic: rw [uniformity_eq_comap_inv_mul_nhds_one_swapped]
state_before: α : Type u_1
β : Type u_2
inst✝² : UniformSpace α
inst✝¹ : Group α
inst✝ : UniformGroup α
ι : Sort u_3
p : ι → Prop
U : ι → Set α
h : (𝓝 1).HasBasis p U
⊢ (Filter.comap (fun x => x.2⁻¹ * x.1) (𝓝 1)).HasBasis p fun i => {x | x.2⁻¹ * x.1 ∈ U i}
state_after: no goals
tactic: exact h.comap _
Theorem: PrimeSpectrum.zeroLocus_singleton_pow
File: Mathlib/RingTheory/PrimeSpectrum.lean

Proof steps:
state_before: R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
f : R
n : ℕ
hn : 0 < n
x : PrimeSpectrum R
⊢ x ∈ zeroLocus {f ^ n} ↔ x ∈ zeroLocus {f}
state_after: no goals
tactic: simpa using x.2.pow_mem_iff_mem n hn
Theorem: dist_smul_add_one_sub_smul_le
File: Mathlib/Analysis/NormedSpace/Real.lean

Proof steps:
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
x y : E
h : r ∈ Icc 0 1
⊢ dist (r • x + (1 - r) • y) x = ‖1 - r‖ * ‖x - y‖
state_after: no goals
tactic: simp_rw [dist_eq_norm', ← norm_smul, sub_smul, one_smul, smul_sub, ← sub_sub, ← sub_add,
        sub_right_comm]
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
x y : E
h : r ∈ Icc 0 1
⊢ ‖1 - r‖ * ‖x - y‖ = (1 - r) * dist y x
state_after: no goals
tactic: rw [Real.norm_eq_abs, abs_eq_self.mpr (sub_nonneg.mpr h.2), dist_eq_norm']
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
x y : E
h : r ∈ Icc 0 1
⊢ (1 - r) * dist y x ≤ (1 - 0) * dist y x
state_after: case h.h
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
x y : E
h : r ∈ Icc 0 1
⊢ 0 ≤ r
tactic: gcongr
state_before: case h.h
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
x y : E
h : r ∈ Icc 0 1
⊢ 0 ≤ r
state_after: no goals
tactic: exact h.1
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
x y : E
h : r ∈ Icc 0 1
⊢ (1 - 0) * dist y x = dist y x
state_after: no goals
tactic: rw [sub_zero, one_mul]
Theorem: Polynomial.eval_one_map
File: Mathlib/Algebra/Polynomial/Eval.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
a b : R
m n : ℕ
inst✝¹ : Semiring R
p✝ q r : R[X]
inst✝ : Semiring S
f✝ f : R →+* S
p : R[X]
⊢ eval 1 (map f p) = f (eval 1 p)
state_after: no goals
tactic: induction p using Polynomial.induction_on' with
  | h_add p q hp hq =>
    simp only [hp, hq, Polynomial.map_add, RingHom.map_add, eval_add]
  | h_monomial n r =>
    simp only [one_pow, mul_one, eval_monomial, map_monomial]
Theorem: Nat.Prime.multiplicity_choose_aux
File: Mathlib/Data/Nat/Multiplicity.lean

Proof steps:
state_before: p n b k : ℕ
hp : Prime p
hkn : k ≤ n
⊢ ∑ i ∈ Ico 1 b, n / p ^ i = ∑ i ∈ Ico 1 b, (k + (n - k)) / p ^ i
state_after: no goals
tactic: simp only [add_tsub_cancel_of_le hkn]
state_before: p n b k : ℕ
hp : Prime p
hkn : k ≤ n
⊢ ∑ i ∈ Ico 1 b, (k + (n - k)) / p ^ i =
    ∑ i ∈ Ico 1 b, (k / p ^ i + (n - k) / p ^ i + if p ^ i ≤ k % p ^ i + (n - k) % p ^ i then 1 else 0)
state_after: no goals
tactic: simp only [Nat.add_div (pow_pos hp.pos _)]
state_before: p n b k : ℕ
hp : Prime p
hkn : k ≤ n
⊢ ∑ i ∈ Ico 1 b, (k / p ^ i + (n - k) / p ^ i + if p ^ i ≤ k % p ^ i + (n - k) % p ^ i then 1 else 0) =
    ∑ i ∈ Ico 1 b, k / p ^ i + ∑ i ∈ Ico 1 b, (n - k) / p ^ i +
      (filter (fun i => p ^ i ≤ k % p ^ i + (n - k) % p ^ i) (Ico 1 b)).card
state_after: no goals
tactic: simp [sum_add_distrib, sum_boole]
Theorem: PartENat.withTopEquiv_symm_le
File: Mathlib/Data/Nat/PartENat.lean

Proof steps:
state_before: x y : ℕ∞
⊢ withTopEquiv.symm x ≤ withTopEquiv.symm y ↔ x ≤ y
state_after: no goals
tactic: simp
Theorem: Filter.mem_cardinaleGenerate_iff
File: Mathlib/Order/Filter/CardinalInter.lean

Proof steps:
state_before: ι α β : Type u
c : Cardinal.{u}
l : Filter α
inst✝ : CardinalInterFilter l c
g : Set (Set α)
s : Set α
hreg : c.IsRegular
⊢ s ∈ cardinalGenerate g ⋯ ↔ ∃ S ⊆ g, #↑S < c ∧ ⋂₀ S ⊆ s
state_after: case mp
ι α β : Type u
c : Cardinal.{u}
l : Filter α
inst✝ : CardinalInterFilter l c
g : Set (Set α)
s : Set α
hreg : c.IsRegular
h : s ∈ cardinalGenerate g ⋯
⊢ ∃ S ⊆ g, #↑S < c ∧ ⋂₀ S ⊆ s

case mpr
ι α β : Type u
c : Cardinal.{u}
l : Filter α
inst✝ : CardinalInterFilter l c
g : Set (Set α)
s : Set α
hreg : c.IsRegular
h : ∃ S ⊆ g, #↑S < c ∧ ⋂₀ S ⊆ s
⊢ s ∈ cardinalGenerate g ⋯
tactic: constructor <;> intro h
state_before: case mpr
ι α β : Type u
c : Cardinal.{u}
l : Filter α
inst✝ : CardinalInterFilter l c
g : Set (Set α)
s : Set α
hreg : c.IsRegular
h : ∃ S ⊆ g, #↑S < c ∧ ⋂₀ S ⊆ s
⊢ s ∈ cardinalGenerate g ⋯
state_after: case mpr.intro.intro.intro
ι α β : Type u
c : Cardinal.{u}
l : Filter α
inst✝ : CardinalInterFilter l c
g : Set (Set α)
s : Set α
hreg : c.IsRegular
S : Set (Set α)
Sg : S ⊆ g
Sct : #↑S < c
hS : ⋂₀ S ⊆ s
⊢ s ∈ cardinalGenerate g ⋯
tactic: rcases h with ⟨S, Sg, Sct, hS⟩
state_before: case mpr.intro.intro.intro
ι α β : Type u
c : Cardinal.{u}
l : Filter α
inst✝ : CardinalInterFilter l c
g : Set (Set α)
s : Set α
hreg : c.IsRegular
S : Set (Set α)
Sg : S ⊆ g
Sct : #↑S < c
hS : ⋂₀ S ⊆ s
⊢ s ∈ cardinalGenerate g ⋯
state_after: case mpr.intro.intro.intro
ι α β : Type u
c : Cardinal.{u}
l : Filter α
inst✝ : CardinalInterFilter l c
g : Set (Set α)
s : Set α
hreg : c.IsRegular
S : Set (Set α)
Sg : S ⊆ g
Sct : #↑S < c
hS : ⋂₀ S ⊆ s
this : CardinalInterFilter (cardinalGenerate g ⋯) c
⊢ s ∈ cardinalGenerate g ⋯
tactic: have : CardinalInterFilter (cardinalGenerate g (IsRegular.nat_lt hreg 2)) c :=
    cardinalInter_ofCardinalGenerate _ _
state_before: case mpr.intro.intro.intro
ι α β : Type u
c : Cardinal.{u}
l : Filter α
inst✝ : CardinalInterFilter l c
g : Set (Set α)
s : Set α
hreg : c.IsRegular
S : Set (Set α)
Sg : S ⊆ g
Sct : #↑S < c
hS : ⋂₀ S ⊆ s
this : CardinalInterFilter (cardinalGenerate g ⋯) c
⊢ s ∈ cardinalGenerate g ⋯
state_after: no goals
tactic: exact mem_of_superset ((cardinal_sInter_mem Sct).mpr
    (fun s H => CardinalGenerateSets.basic (Sg H))) hS
Theorem: PowerSeries.subsingleton_iff
File: Mathlib/RingTheory/PowerSeries/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝ : Semiring R
⊢ Subsingleton R⟦X⟧ ↔ Subsingleton R
state_after: R : Type u_1
inst✝ : Semiring R
h : Subsingleton R⟦X⟧
⊢ Subsingleton R
tactic: refine ⟨fun h ↦ ?_, fun _ ↦ inferInstance⟩
state_before: R : Type u_1
inst✝ : Semiring R
h : Subsingleton R⟦X⟧
⊢ Subsingleton R
state_after: R : Type u_1
inst✝ : Semiring R
h : ∀ (x y : R⟦X⟧), x = y
⊢ ∀ (x y : R), x = y
tactic: rw [subsingleton_iff] at h ⊢
state_before: R : Type u_1
inst✝ : Semiring R
h : ∀ (x y : R⟦X⟧), x = y
⊢ ∀ (x y : R), x = y
state_after: no goals
tactic: exact fun a b ↦ C_injective (h (C R a) (C R b))
Theorem: MeasureTheory.tilted_zero
File: Mathlib/MeasureTheory/Measure/Tilted.lean

Proof steps:
state_before: α : Type u_1
mα : MeasurableSpace α
μ✝ : Measure α
f : α → ℝ
μ : Measure α
inst✝ : IsProbabilityMeasure μ
⊢ μ.tilted 0 = μ
state_after: no goals
tactic: simp