ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Complex.cpow_neg_one
File: Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean

Proof steps:
state_before: x : ℂ
⊢ x ^ (-1) = x⁻¹
state_after: no goals
tactic: simpa using cpow_neg x 1
Theorem: PadicInt.toZMod_spec
File: Mathlib/NumberTheory/Padics/RingHoms.lean

Proof steps:
state_before: p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x : ℤ_[p]
⊢ x - (toZMod x).cast ∈ maximalIdeal ℤ_[p]
state_after: case h.e'_4.h.e'_6
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x : ℤ_[p]
⊢ (toZMod x).cast = ↑x.zmodRepr
tactic: convert sub_zmodRepr_mem x using 2
state_before: case h.e'_4.h.e'_6
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x : ℤ_[p]
⊢ (toZMod x).cast = ↑x.zmodRepr
state_after: case h.e'_4.h.e'_6
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x : ℤ_[p]
⊢ (↑x.zmodRepr).cast = ↑x.zmodRepr
tactic: dsimp [toZMod, toZModHom]
state_before: case h.e'_4.h.e'_6
p : ℕ
hp_prime : Fact (Nat.Prime p)
r : ℚ
x : ℤ_[p]
⊢ (↑x.zmodRepr).cast = ↑x.zmodRepr
state_after: case h.e'_4.h.e'_6.intro
r : ℚ
p' : ℕ
hp_prime : Fact (Nat.Prime (0 + p' + 1))
x : ℤ_[0 + p' + 1]
⊢ (↑x.zmodRepr).cast = ↑x.zmodRepr
tactic: rcases Nat.exists_eq_add_of_lt hp_prime.1.pos with ⟨p', rfl⟩
state_before: case h.e'_4.h.e'_6.intro
r : ℚ
p' : ℕ
hp_prime : Fact (Nat.Prime (0 + p' + 1))
x : ℤ_[0 + p' + 1]
⊢ (↑x.zmodRepr).cast = ↑x.zmodRepr
state_after: case h.e'_4.h.e'_6.intro
r : ℚ
p' : ℕ
hp_prime : Fact (Nat.Prime (0 + p' + 1))
x : ℤ_[0 + p' + 1]
⊢ ↑(↑x.zmodRepr).val = ↑x.zmodRepr
tactic: change ↑((_ : ZMod (0 + p' + 1)).val) = (_ : ℤ_[0 + p' + 1])
state_before: case h.e'_4.h.e'_6.intro
r : ℚ
p' : ℕ
hp_prime : Fact (Nat.Prime (0 + p' + 1))
x : ℤ_[0 + p' + 1]
⊢ ↑(↑x.zmodRepr).val = ↑x.zmodRepr
state_after: case h.e'_4.h.e'_6.intro
r : ℚ
p' : ℕ
hp_prime : Fact (Nat.Prime (0 + p' + 1))
x : ℤ_[0 + p' + 1]
⊢ x.zmodRepr % (p' + 1) = x.zmodRepr
tactic: simp only [ZMod.val_natCast, add_zero, add_def, Nat.cast_inj, zero_add]
state_before: case h.e'_4.h.e'_6.intro
r : ℚ
p' : ℕ
hp_prime : Fact (Nat.Prime (0 + p' + 1))
x : ℤ_[0 + p' + 1]
⊢ x.zmodRepr % (p' + 1) = x.zmodRepr
state_after: case h.e'_4.h.e'_6.intro.h
r : ℚ
p' : ℕ
hp_prime : Fact (Nat.Prime (0 + p' + 1))
x : ℤ_[0 + p' + 1]
⊢ x.zmodRepr < p' + 1
tactic: apply mod_eq_of_lt
state_before: case h.e'_4.h.e'_6.intro.h
r : ℚ
p' : ℕ
hp_prime : Fact (Nat.Prime (0 + p' + 1))
x : ℤ_[0 + p' + 1]
⊢ x.zmodRepr < p' + 1
state_after: no goals
tactic: simpa only [zero_add] using zmodRepr_lt_p x
Theorem: AlgebraicGeometry.isOpenImmersion_eq_inf
File: Mathlib/AlgebraicGeometry/Morphisms/OpenImmersion.lean

Proof steps:
state_before: X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
⊢ @IsOpenImmersion =
    (topologically fun {α β} [TopologicalSpace α] [TopologicalSpace β] => OpenEmbedding) ⊓
      stalkwise fun {R S} [CommRing R] [CommRing S] f => Function.Bijective ⇑f
state_after: case h.h.h.a
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
x✝² x✝¹ : Scheme
x✝ : x✝² ⟶ x✝¹
⊢ IsOpenImmersion x✝ ↔
    ((topologically fun {α β} [TopologicalSpace α] [TopologicalSpace β] => OpenEmbedding) ⊓
        stalkwise fun {R S} [CommRing R] [CommRing S] f => Function.Bijective ⇑f)
      x✝
tactic: ext
state_before: case h.h.h.a
X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
x✝² x✝¹ : Scheme
x✝ : x✝² ⟶ x✝¹
⊢ IsOpenImmersion x✝ ↔
    ((topologically fun {α β} [TopologicalSpace α] [TopologicalSpace β] => OpenEmbedding) ⊓
        stalkwise fun {R S} [CommRing R] [CommRing S] f => Function.Bijective ⇑f)
      x✝
state_after: no goals
tactic: exact isOpenImmersion_iff_stalk.trans
    (and_congr Iff.rfl (forall_congr' fun x ↦ ConcreteCategory.isIso_iff_bijective _))
Theorem: norm_sub_le_norm_sub_add_norm_sub
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₂ : ℝ
a b c : E
⊢ ‖a / c‖ ≤ ‖a / b‖ + ‖b / c‖
state_after: no goals
tactic: simpa only [dist_eq_norm_div] using dist_triangle a b c
Theorem: ENNReal.mul_div_cancel'
File: Mathlib/Data/ENNReal/Inv.lean

Proof steps:
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
h0 : a ≠ 0
hI : a ≠ ⊤
⊢ a * (b / a) = b
state_after: no goals
tactic: rw [mul_comm, ENNReal.div_mul_cancel h0 hI]
Theorem: Int.modEq_neg
File: Mathlib/Data/Int/ModEq.lean

Proof steps:
state_before: m n a b c d : ℤ
⊢ a ≡ b [ZMOD -n] ↔ a ≡ b [ZMOD n]
state_after: no goals
tactic: simp [modEq_iff_dvd]
Theorem: Real.exp_bound_div_one_sub_of_interval
File: Mathlib/Data/Complex/Exponential.lean

Proof steps:
state_before: x : ℝ
h1 : 0 ≤ x
h2 : x < 1
⊢ rexp x ≤ 1 / (1 - x)
state_after: case inl
h1 : 0 ≤ 0
h2 : 0 < 1
⊢ rexp 0 ≤ 1 / (1 - 0)

case inr
x : ℝ
h1✝ : 0 ≤ x
h2 : x < 1
h1 : 0 < x
⊢ rexp x ≤ 1 / (1 - x)
tactic: rcases eq_or_lt_of_le h1 with (rfl | h1)
Theorem: Set.preimage_singleton_true
File: Mathlib/Data/Set/Image.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
g : β → γ
p : α → Prop
⊢ p ⁻¹' {True} = {a | p a}
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
g : β → γ
p : α → Prop
x✝ : α
⊢ x✝ ∈ p ⁻¹' {True} ↔ x✝ ∈ {a | p a}
tactic: ext
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f : α → β
g : β → γ
p : α → Prop
x✝ : α
⊢ x✝ ∈ p ⁻¹' {True} ↔ x✝ ∈ {a | p a}
state_after: no goals
tactic: simp
Theorem: Polynomial.natSepDegree_le_of_dvd
File: Mathlib/FieldTheory/SeparableDegree.lean

Proof steps:
state_before: F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
f g : F[X]
h1 : f ∣ g
h2 : g ≠ 0
⊢ f.natSepDegree ≤ g.natSepDegree
state_after: F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
f g : F[X]
h1 : f ∣ g
h2 : g ≠ 0
⊢ (f.aroots (AlgebraicClosure F)).toFinset.card ≤ (g.aroots (AlgebraicClosure F)).toFinset.card
tactic: simp_rw [natSepDegree_eq_of_isAlgClosed (AlgebraicClosure F)]
state_before: F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
f g : F[X]
h1 : f ∣ g
h2 : g ≠ 0
⊢ (f.aroots (AlgebraicClosure F)).toFinset.card ≤ (g.aroots (AlgebraicClosure F)).toFinset.card
state_after: no goals
tactic: exact Finset.card_le_card <| Multiset.toFinset_subset.mpr <|
    Multiset.Le.subset <| roots.le_of_dvd (map_ne_zero h2) <| map_dvd _ h1
Theorem: AlgebraicGeometry.IsOpenImmersion.ΓIso_hom_map
File: Mathlib/AlgebraicGeometry/OpenImmersion.lean

Proof steps:
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z : Scheme
f✝ : X✝ ⟶ Z
g : Y✝ ⟶ Z
H : IsOpenImmersion f✝
X Y : Scheme
f : X ⟶ Y
inst✝ : IsOpenImmersion f
U : Y.Opens
⊢ Scheme.Hom.app f U ≫ (ΓIso f U).hom = Y.presheaf.map (homOfLE ⋯).op
state_after: C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z : Scheme
f✝ : X✝ ⟶ Z
g : Y✝ ⟶ Z
H : IsOpenImmersion f✝
X Y : Scheme
f : X ⟶ Y
inst✝ : IsOpenImmersion f
U : Y.Opens
⊢ (Y.presheaf.map (homOfLE ⋯).op ≫ (ΓIso f U).inv) ≫ (ΓIso f U).hom = Y.presheaf.map (homOfLE ⋯).op
tactic: rw [← map_ΓIso_inv]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
X✝ Y✝ Z : Scheme
f✝ : X✝ ⟶ Z
g : Y✝ ⟶ Z
H : IsOpenImmersion f✝
X Y : Scheme
f : X ⟶ Y
inst✝ : IsOpenImmersion f
U : Y.Opens
⊢ (Y.presheaf.map (homOfLE ⋯).op ≫ (ΓIso f U).inv) ≫ (ΓIso f U).hom = Y.presheaf.map (homOfLE ⋯).op
state_after: no goals
tactic: simp [-ΓIso_inv]
Theorem: AddMonoidHom.map_zmultiples
File: Mathlib/Algebra/Group/Subgroup/ZPowers.lean

Proof steps:
state_before: G : Type u_1
inst✝² : Group G
A : Type u_2
inst✝¹ : AddGroup A
N : Type u_3
inst✝ : Group N
f : G →* N
x : G
⊢ Subgroup.map f (Subgroup.zpowers x) = Subgroup.zpowers (f x)
state_after: no goals
tactic: rw [Subgroup.zpowers_eq_closure, Subgroup.zpowers_eq_closure, f.map_closure, Set.image_singleton]
Theorem: Complex.arg_mul_cos_add_sin_mul_I_eq_toIocMod
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

Proof steps:
state_before: a x z : ℂ
r : ℝ
hr : 0 < r
θ : ℝ
⊢ (↑r * (cos ↑θ + sin ↑θ * I)).arg = toIocMod Real.two_pi_pos (-π) θ
state_after: a x z : ℂ
r : ℝ
hr : 0 < r
θ : ℝ
hi : toIocMod Real.two_pi_pos (-π) θ ∈ Ioc (-π) π
⊢ (↑r * (cos ↑θ + sin ↑θ * I)).arg = toIocMod Real.two_pi_pos (-π) θ
tactic: have hi : toIocMod Real.two_pi_pos (-π) θ ∈ Set.Ioc (-π) π := by
    convert toIocMod_mem_Ioc _ _ θ
    ring
state_before: a x z : ℂ
r : ℝ
hr : 0 < r
θ : ℝ
hi : toIocMod Real.two_pi_pos (-π) θ ∈ Ioc (-π) π
⊢ (↑r * (cos ↑θ + sin ↑θ * I)).arg = toIocMod Real.two_pi_pos (-π) θ
state_after: case h.e'_2.h.e'_1.h.e'_6
a x z : ℂ
r : ℝ
hr : 0 < r
θ : ℝ
hi : toIocMod Real.two_pi_pos (-π) θ ∈ Ioc (-π) π
⊢ cos ↑θ + sin ↑θ * I = cos ↑(toIocMod Real.two_pi_pos (-π) θ) + sin ↑(toIocMod Real.two_pi_pos (-π) θ) * I
tactic: convert arg_mul_cos_add_sin_mul_I hr hi using 3
state_before: case h.e'_2.h.e'_1.h.e'_6
a x z : ℂ
r : ℝ
hr : 0 < r
θ : ℝ
hi : toIocMod Real.two_pi_pos (-π) θ ∈ Ioc (-π) π
⊢ cos ↑θ + sin ↑θ * I = cos ↑(toIocMod Real.two_pi_pos (-π) θ) + sin ↑(toIocMod Real.two_pi_pos (-π) θ) * I
state_after: no goals
tactic: simp [toIocMod, cos_sub_int_mul_two_pi, sin_sub_int_mul_two_pi]
Theorem: hnot_top
File: Mathlib/Order/Heyting/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : CoheytingAlgebra α
a b c : α
⊢ ￢⊤ = ⊥
state_after: no goals
tactic: rw [← top_sdiff', sdiff_self]
Theorem: AddSubmonoid.mem_closure_pair
File: Mathlib/Algebra/Group/Submonoid/Membership.lean

Proof steps:
state_before: M : Type u_1
A✝ : Type u_2
B : Type u_3
A : Type u_4
inst✝ : CommMonoid A
a b c : A
⊢ c ∈ closure {a, b} ↔ ∃ m n, a ^ m * b ^ n = c
state_after: M : Type u_1
A✝ : Type u_2
B : Type u_3
A : Type u_4
inst✝ : CommMonoid A
a b c : A
⊢ (∃ y ∈ closure {a}, ∃ z ∈ closure {b}, y * z = c) ↔ ∃ m n, a ^ m * b ^ n = c
tactic: rw [← Set.singleton_union, Submonoid.closure_union, mem_sup]
state_before: M : Type u_1
A✝ : Type u_2
B : Type u_3
A : Type u_4
inst✝ : CommMonoid A
a b c : A
⊢ (∃ y ∈ closure {a}, ∃ z ∈ closure {b}, y * z = c) ↔ ∃ m n, a ^ m * b ^ n = c
state_after: no goals
tactic: simp_rw [mem_closure_singleton, exists_exists_eq_and]
Theorem: PerfectClosure.intCast
File: Mathlib/FieldTheory/PerfectClosure.lean

Proof steps:
state_before: K : Type u
inst✝² : CommRing K
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP K p
x : ℤ
⊢ ↑x = mk K p (0, ↑x)
state_after: case negSucc
K : Type u
inst✝² : CommRing K
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP K p
a✝ : ℕ
⊢ -mk K p (0, ↑(a✝ + 1)) = mk K p (0, -↑(a✝ + 1))
tactic: induction x <;> simp only [Int.ofNat_eq_coe, Int.cast_natCast, Int.cast_negSucc, natCast K p 0]
state_before: case negSucc
K : Type u
inst✝² : CommRing K
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP K p
a✝ : ℕ
⊢ -mk K p (0, ↑(a✝ + 1)) = mk K p (0, -↑(a✝ + 1))
state_after: no goals
tactic: rfl
Theorem: Nat.Prime.mul_eq_prime_sq_iff
File: Mathlib/Data/Nat/Prime/Basic.lean

Proof steps:
state_before: n x y p : ℕ
hp : Prime p
hx : x ≠ 1
hy : y ≠ 1
⊢ x * y = p ^ 2 ↔ x = p ∧ y = p
state_after: n x y p : ℕ
hp : Prime p
hx : x ≠ 1
hy : y ≠ 1
h : x * y = p ^ 2
⊢ x = p ∧ y = p
tactic: refine ⟨fun h => ?_, fun ⟨h₁, h₂⟩ => h₁.symm ▸ h₂.symm ▸ (sq _).symm⟩
state_before: n x y p : ℕ
hp : Prime p
hx : x ≠ 1
hy : y ≠ 1
h : x * y = p ^ 2
⊢ x = p ∧ y = p
state_after: n x y p : ℕ
hp : Prime p
hx : x ≠ 1
hy : y ≠ 1
h : x * y = p ^ 2
pdvdxy : p ∣ x * y
⊢ x = p ∧ y = p
tactic: have pdvdxy : p ∣ x * y := by rw [h]; simp [sq]
state_before: n x y p : ℕ
hp : Prime p
hx : x ≠ 1
hy : y ≠ 1
h : x * y = p ^ 2
pdvdxy : p ∣ x * y
⊢ x = p ∧ y = p
state_after: n x y p : ℕ
hp : Prime p
hx : x ≠ 1
hy : y ≠ 1
h : x * y = p ^ 2
pdvdxy : p ∣ x * y
⊢ ∀ (x' y' : ℕ), x' ≠ 1 → y' ≠ 1 → x' * y' = p ^ 2 → p ∣ x' → x' = p ∧ y' = p
tactic: suffices ∀ x' y' : ℕ, x' ≠ 1 → y' ≠ 1 → x' * y' = p ^ 2 → p ∣ x' → x' = p ∧ y' = p by
    obtain hx | hy := hp.dvd_mul.1 pdvdxy <;>
      [skip; rw [And.comm]] <;>
      [skip; rw [mul_comm] at h pdvdxy] <;>
      apply this <;>
      assumption
state_before: n x y p : ℕ
hp : Prime p
hx : x ≠ 1
hy : y ≠ 1
h : x * y = p ^ 2
pdvdxy : p ∣ x * y
⊢ ∀ (x' y' : ℕ), x' ≠ 1 → y' ≠ 1 → x' * y' = p ^ 2 → p ∣ x' → x' = p ∧ y' = p
state_after: case intro
n x✝ y✝ p : ℕ
hp : Prime p
hx✝ : x✝ ≠ 1
hy✝ : y✝ ≠ 1
h✝ : x✝ * y✝ = p ^ 2
pdvdxy : p ∣ x✝ * y✝
x y : ℕ
hx : x ≠ 1
hy : y ≠ 1
h : x * y = p ^ 2
a : ℕ
ha : x = p * a
⊢ x = p ∧ y = p
tactic: rintro x y hx hy h ⟨a, ha⟩
state_before: case intro
n x✝ y✝ p : ℕ
hp : Prime p
hx✝ : x✝ ≠ 1
hy✝ : y✝ ≠ 1
h✝ : x✝ * y✝ = p ^ 2
pdvdxy : p ∣ x✝ * y✝
x y : ℕ
hx : x ≠ 1
hy : y ≠ 1
h : x * y = p ^ 2
a : ℕ
ha : x = p * a
⊢ x = p ∧ y = p
state_after: case intro
n x✝ y✝ p : ℕ
hp : Prime p
hx✝ : x✝ ≠ 1
hy✝ : y✝ ≠ 1
h✝ : x✝ * y✝ = p ^ 2
pdvdxy : p ∣ x✝ * y✝
x y : ℕ
hx : x ≠ 1
hy : y ≠ 1
h : x * y = p ^ 2
a : ℕ
ha : x = p * a
this : a ∣ p
⊢ x = p ∧ y = p
tactic: have : a ∣ p := ⟨y, by rwa [ha, sq, mul_assoc, mul_right_inj' hp.ne_zero, eq_comm] at h⟩
state_before: case intro
n x✝ y✝ p : ℕ
hp : Prime p
hx✝ : x✝ ≠ 1
hy✝ : y✝ ≠ 1
h✝ : x✝ * y✝ = p ^ 2
pdvdxy : p ∣ x✝ * y✝
x y : ℕ
hx : x ≠ 1
hy : y ≠ 1
h : x * y = p ^ 2
a : ℕ
ha : x = p * a
this : a ∣ p
⊢ x = p ∧ y = p
state_after: case intro.inl
n x✝ y✝ p : ℕ
hp : Prime p
hx✝ : x✝ ≠ 1
hy✝ : y✝ ≠ 1
h✝ : x✝ * y✝ = p ^ 2
pdvdxy : p ∣ x✝ * y✝
x y : ℕ
hx : x ≠ 1
hy : y ≠ 1
h : x * y = p ^ 2
a : ℕ
ha : x = p * a
this : a ∣ p
ha1 : a = 1
⊢ x = p ∧ y = p

case intro.inr
n x✝ y✝ p : ℕ
hp : Prime p
hx✝ : x✝ ≠ 1
hy✝ : y✝ ≠ 1
h✝ : x✝ * y✝ = p ^ 2
pdvdxy : p ∣ x✝ * y✝
x y : ℕ
hx : x ≠ 1
hy : y ≠ 1
h : x * y = p ^ 2
a : ℕ
ha : x = p * a
this : a ∣ p
hap : a = p
⊢ x = p ∧ y = p
tactic: obtain ha1 | hap := (Nat.dvd_prime hp).mp ‹a ∣ p›
Theorem: Multiset.sum_map_sum_map
File: Mathlib/Algebra/BigOperators/Group/Multiset.lean

Proof steps:
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : CommMonoid α
inst✝ : CommMonoid β
s t : Multiset α
a : α
m✝ : Multiset ι
f✝ g : ι → α
m : Multiset β
n : Multiset γ
f : β → γ → α
⊢ (map (fun a => (map (fun b => f a b) n).prod) 0).prod = (map (fun b => (map (fun a => f a b) 0).prod) n).prod
state_after: no goals
tactic: simp
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : CommMonoid α
inst✝ : CommMonoid β
s t : Multiset α
a✝ : α
m✝¹ : Multiset ι
f✝ g : ι → α
m✝ : Multiset β
n : Multiset γ
f : β → γ → α
a : β
m : Multiset β
ih : (map (fun a => (map (fun b => f a b) n).prod) m).prod = (map (fun b => (map (fun a => f a b) m).prod) n).prod
⊢ (map (fun a => (map (fun b => f a b) n).prod) (a ::ₘ m)).prod =
    (map (fun b => (map (fun a => f a b) (a ::ₘ m)).prod) n).prod
state_after: no goals
tactic: simp [ih]
Theorem: WittVector.v2_coeff
File: Mathlib/RingTheory/WittVector/Defs.lean

Proof steps:
state_before: p : ℕ
R : Type u_1
hp : Fact (Nat.Prime p)
inst✝ : CommRing R
p' : ℕ
R' : Type u_2
x y : WittVector p' R'
i : Fin 2
⊢ (![x, y] i).coeff = ![x.coeff, y.coeff] i
state_after: no goals
tactic: fin_cases i <;> simp
Theorem: Fin2.rev_castSucc
File: Mathlib/Data/Fin/Fin2.lean

Proof steps:
state_before: n : ℕ
i : Fin2 n
⊢ i.castSucc.rev = i.rev.fs
state_after: no goals
tactic: induction i <;> simp_all [rev, castSucc, last]
Theorem: List.cons_diff_of_not_mem
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : BEq α
inst✝ : LawfulBEq α
a : α
l₂ : List α
h : ¬a ∈ l₂
l₁ : List α
⊢ (a :: l₁).diff l₂ = a :: l₁.diff l₂
state_after: no goals
tactic: rw [cons_diff, if_neg h]
Theorem: ConcaveOn.min_le_of_mem_segment
File: Mathlib/Analysis/Convex/Jensen.lean

Proof steps:
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
β : Type u_4
ι : Type u_5
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : LinearOrderedAddCommGroup β
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
s : Set E
f : E → β
t : Finset ι
w : ι → 𝕜
p : ι → E
x y z : E
hf : ConcaveOn 𝕜 [x-[𝕜]y] f
hz : z ∈ [x-[𝕜]y]
⊢ min (f x) (f y) ≤ f z
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
β : Type u_4
ι : Type u_5
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : LinearOrderedAddCommGroup β
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
s : Set E
f : E → β
t : Finset ι
w : ι → 𝕜
p : ι → E
x y z : E
hf : ConcaveOn 𝕜 ((convexHull 𝕜) {x, y}) f
hz : z ∈ (convexHull 𝕜) {x, y}
⊢ min (f x) (f y) ≤ f z
tactic: rw [← convexHull_pair] at hf hz
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
β : Type u_4
ι : Type u_5
inst✝⁵ : LinearOrderedField 𝕜
inst✝⁴ : AddCommGroup E
inst✝³ : LinearOrderedAddCommGroup β
inst✝² : Module 𝕜 E
inst✝¹ : Module 𝕜 β
inst✝ : OrderedSMul 𝕜 β
s : Set E
f : E → β
t : Finset ι
w : ι → 𝕜
p : ι → E
x y z : E
hf : ConcaveOn 𝕜 ((convexHull 𝕜) {x, y}) f
hz : z ∈ (convexHull 𝕜) {x, y}
⊢ min (f x) (f y) ≤ f z
state_after: no goals
tactic: simpa using hf.exists_le_of_mem_convexHull hz
Theorem: zsmul_strictMono_right
File: Mathlib/Algebra/Order/Group/Basic.lean

Proof steps:
state_before: α : Type u_1
M : Type u_2
R : Type u_3
inst✝ : OrderedCommGroup α
m n : ℤ
a✝ b✝ : α
hn : 0 < n
a b : α
hab : a < b
⊢ (fun x => x ^ n) a < (fun x => x ^ n) b
state_after: α : Type u_1
M : Type u_2
R : Type u_3
inst✝ : OrderedCommGroup α
m n : ℤ
a✝ b✝ : α
hn : 0 < n
a b : α
hab : a < b
⊢ 1 < (b / a) ^ n
tactic: rw [← one_lt_div', ← div_zpow]
state_before: α : Type u_1
M : Type u_2
R : Type u_3
inst✝ : OrderedCommGroup α
m n : ℤ
a✝ b✝ : α
hn : 0 < n
a b : α
hab : a < b
⊢ 1 < (b / a) ^ n
state_after: no goals
tactic: exact one_lt_zpow' (one_lt_div'.2 hab) hn
Theorem: Batteries.AssocList.toList_eq_toListTR
File: .lake/packages/batteries/Batteries/Data/AssocList.lean

Proof steps:
state_before: ⊢ @toList = @toListTR
state_after: case h.h.h
α : Type u_2
β : Type u_1
as : AssocList α β
⊢ as.toList = as.toListTR
tactic: funext α β as
state_before: case h.h.h
α : Type u_2
β : Type u_1
as : AssocList α β
⊢ as.toList = as.toListTR
state_after: case h.h.h
α : Type u_2
β : Type u_1
as : AssocList α β
⊢ as.toList = (List.foldl (fun d x => d.push (x.fst, x.snd)) #[] as.toList).data
tactic: simp [toListTR]
state_before: case h.h.h
α : Type u_2
β : Type u_1
as : AssocList α β
⊢ as.toList = (List.foldl (fun d x => d.push (x.fst, x.snd)) #[] as.toList).data
state_after: no goals
tactic: exact .symm <| (Array.foldl_data_eq_map (toList as) _ id).trans (List.map_id _)
Theorem: ProbabilityTheory.centralMoment_one
File: Mathlib/Probability/Moments.lean

Proof steps:
state_before: Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
⊢ centralMoment X 1 μ = 0
state_after: case pos
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
h_int : Integrable X μ
⊢ centralMoment X 1 μ = 0

case neg
Ω : Type u_1
ι : Type u_2
m : MeasurableSpace Ω
X : Ω → ℝ
p : ℕ
μ : Measure Ω
inst✝ : IsProbabilityMeasure μ
h_int : ¬Integrable X μ
⊢ centralMoment X 1 μ = 0
tactic: by_cases h_int : Integrable X μ
Theorem: spectrum.units_conjugate
File: Mathlib/Algebra/Algebra/Spectrum.lean

Proof steps:
state_before: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
u : Aˣ
⊢ spectrum R (↑u * a * ↑u⁻¹) = spectrum R a
state_after: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
u : Aˣ
⊢ ∀ (b : A) (v : Aˣ), spectrum R (↑v * b * ↑v⁻¹) ⊆ spectrum R b
tactic: suffices ∀ (b : A) (v : Aˣ), spectrum R (v * b * v⁻¹) ⊆ spectrum R b by
    refine le_antisymm (this a u) ?_
    apply le_of_eq_of_le ?_ <| this (u * a * u⁻¹) u⁻¹
    simp [mul_assoc]
state_before: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a : A
u : Aˣ
⊢ ∀ (b : A) (v : Aˣ), spectrum R (↑v * b * ↑v⁻¹) ⊆ spectrum R b
state_after: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a✝ : A
u✝ : Aˣ
a : A
u : Aˣ
μ : R
hμ : μ ∈ spectrum R (↑u * a * ↑u⁻¹)
⊢ μ ∈ spectrum R a
tactic: intro a u μ hμ
state_before: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a✝ : A
u✝ : Aˣ
a : A
u : Aˣ
μ : R
hμ : μ ∈ spectrum R (↑u * a * ↑u⁻¹)
⊢ μ ∈ spectrum R a
state_after: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a✝ : A
u✝ : Aˣ
a : A
u : Aˣ
μ : R
hμ : ¬IsUnit ((algebraMap R A) μ - ↑u * a * ↑u⁻¹)
⊢ ¬IsUnit ((algebraMap R A) μ - a)
tactic: rw [spectrum.mem_iff] at hμ ⊢
state_before: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a✝ : A
u✝ : Aˣ
a : A
u : Aˣ
μ : R
hμ : ¬IsUnit ((algebraMap R A) μ - ↑u * a * ↑u⁻¹)
⊢ ¬IsUnit ((algebraMap R A) μ - a)
state_after: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a✝ : A
u✝ : Aˣ
a : A
u : Aˣ
μ : R
hμ : IsUnit ((algebraMap R A) μ - a)
⊢ IsUnit ((algebraMap R A) μ - ↑u * a * ↑u⁻¹)
tactic: contrapose! hμ
state_before: R : Type u_1
A : Type u_2
inst✝² : CommSemiring R
inst✝¹ : Ring A
inst✝ : Algebra R A
a✝ : A
u✝ : Aˣ
a : A
u : Aˣ
μ : R
hμ : IsUnit ((algebraMap R A) μ - a)
⊢ IsUnit ((algebraMap R A) μ - ↑u * a * ↑u⁻¹)
state_after: no goals
tactic: simpa [mul_sub, sub_mul, Algebra.right_comm] using u.isUnit.mul hμ |>.mul u⁻¹.isUnit
Theorem: ZMod.card
File: Mathlib/Data/ZMod/Defs.lean

Proof steps:
state_before: n : ℕ
inst✝ : Fintype (ZMod n)
⊢ Fintype.card (ZMod n) = n
state_after: no goals
tactic: cases n with
  | zero => exact (not_finite (ZMod 0)).elim
  | succ n => convert Fintype.card_fin (n + 1) using 2
Theorem: disjoint_sdiff_comm
File: Mathlib/Order/BooleanAlgebra.lean

Proof steps:
state_before: α : Type u
β : Type u_1
w x y z : α
inst✝ : GeneralizedBooleanAlgebra α
⊢ Disjoint (x \ z) y ↔ Disjoint x (y \ z)
state_after: no goals
tactic: simp_rw [disjoint_iff, inf_sdiff_right_comm, inf_sdiff_assoc]
Theorem: zero_prodMap_dualTensorHom
File: Mathlib/LinearAlgebra/Contraction.lean

Proof steps:
state_before: ι : Type w
R : Type u
M : Type v₁
N : Type v₂
P : Type v₃
Q : Type v₄
inst✝¹⁰ : CommSemiring R
inst✝⁹ : AddCommMonoid M
inst✝⁸ : AddCommMonoid N
inst✝⁷ : AddCommMonoid P
inst✝⁶ : AddCommMonoid Q
inst✝⁵ : Module R M
inst✝⁴ : Module R N
inst✝³ : Module R P
inst✝² : Module R Q
inst✝¹ : DecidableEq ι
inst✝ : Fintype ι
b : Basis ι R M
g : Dual R N
q : Q
⊢ prodMap 0 ((dualTensorHom R N Q) (g ⊗ₜ[R] q)) =
    (dualTensorHom R (M × N) (P × Q)) ((g ∘ₗ snd R M N) ⊗ₜ[R] (inr R P Q) q)
state_after: no goals
tactic: ext <;>
    simp only [coe_comp, coe_inr, Function.comp_apply, prodMap_apply, dualTensorHom_apply,
      snd_apply, Prod.smul_mk, LinearMap.zero_apply, smul_zero]