ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: RingEquiv.symm_toNonUnitalRingHom_comp_toNonUnitalRingHom
File: Mathlib/Algebra/Ring/Equiv.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
S : Type u_5
S' : Type u_6
inst✝² : NonUnitalNonAssocSemiring R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring S'
e : R ≃+* S
⊢ e.symm.toNonUnitalRingHom.comp e.toNonUnitalRingHom = NonUnitalRingHom.id R
state_after: case a
F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
S : Type u_5
S' : Type u_6
inst✝² : NonUnitalNonAssocSemiring R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring S'
e : R ≃+* S
x✝ : R
⊢ (e.symm.toNonUnitalRingHom.comp e.toNonUnitalRingHom) x✝ = (NonUnitalRingHom.id R) x✝
tactic: ext
state_before: case a
F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
S : Type u_5
S' : Type u_6
inst✝² : NonUnitalNonAssocSemiring R
inst✝¹ : NonUnitalNonAssocSemiring S
inst✝ : NonUnitalNonAssocSemiring S'
e : R ≃+* S
x✝ : R
⊢ (e.symm.toNonUnitalRingHom.comp e.toNonUnitalRingHom) x✝ = (NonUnitalRingHom.id R) x✝
state_after: no goals
tactic: simp
Theorem: WeierstrassCurve.Jacobian.map_negY
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

Proof steps:
state_before: R : Type u
inst✝² : CommRing R
W' : Jacobian R
F : Type v
inst✝¹ : Field F
W : Jacobian F
S : Type u_1
inst✝ : CommRing S
f : R →+* S
P Q : Fin 3 → R
⊢ negY (map W' f) (⇑f ∘ P) = f (W'.negY P)
state_after: no goals
tactic: simp [negY]
Theorem: Set.exists_chain_of_le_chainHeight
File: Mathlib/Order/Height.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LT α
inst✝ : LT β
s t : Set α
l : List α
a : α
n : ℕ
hn : ↑n ≤ s.chainHeight
⊢ ∃ l ∈ s.subchain, l.length = n
state_after: case inl
α : Type u_1
β : Type u_2
inst✝¹ : LT α
inst✝ : LT β
s t : Set α
l : List α
a : α
n : ℕ
hn : ↑n ≤ s.chainHeight
ha : ⨆ l, ↑(↑l).length = ⊤
⊢ ∃ l ∈ s.subchain, l.length = n

case inr
α : Type u_1
β : Type u_2
inst✝¹ : LT α
inst✝ : LT β
s t : Set α
l : List α
a : α
n : ℕ
hn : ↑n ≤ s.chainHeight
ha : ⨆ l, ↑(↑l).length < ⊤
⊢ ∃ l ∈ s.subchain, l.length = n
tactic: rcases (le_top : s.chainHeight ≤ ⊤).eq_or_lt with ha | ha <;>
    rw [chainHeight_eq_iSup_subtype] at ha
Theorem: MeasurableEmbedding.comap_map
File: Mathlib/MeasureTheory/Measure/Restrict.lean

Proof steps:
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
hf : MeasurableEmbedding f
μ : Measure α
⊢ Measure.comap f (Measure.map f μ) = μ
state_after: case h
R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
hf : MeasurableEmbedding f
μ : Measure α
t : Set α
a✝ : MeasurableSet t
⊢ (Measure.comap f (Measure.map f μ)) t = μ t
tactic: ext t _
state_before: case h
R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
hf : MeasurableEmbedding f
μ : Measure α
t : Set α
a✝ : MeasurableSet t
⊢ (Measure.comap f (Measure.map f μ)) t = μ t
state_after: no goals
tactic: rw [hf.comap_apply, hf.map_apply, preimage_image_eq _ hf.injective]
Theorem: Pell.xn_add
File: Mathlib/NumberTheory/PellMatiyasevic.lean

Proof steps:
state_before: a : ℕ
a1 : 1 < a
m n : ℕ
⊢ xn a1 (m + n) = xn a1 m * xn a1 n + Pell.d a1 * yn a1 m * yn a1 n
state_after: a : ℕ
a1 : 1 < a
m n : ℕ
h : ↑(xn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).re + ↑(Pell.d a1) * (pellZd a1 m).im * (pellZd a1 n).im
im_eq✝ : ↑(yn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).im + (pellZd a1 m).im * (pellZd a1 n).re
⊢ xn a1 (m + n) = xn a1 m * xn a1 n + Pell.d a1 * yn a1 m * yn a1 n
tactic: injection pellZd_add a1 m n with h _
state_before: a : ℕ
a1 : 1 < a
m n : ℕ
h : ↑(xn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).re + ↑(Pell.d a1) * (pellZd a1 m).im * (pellZd a1 n).im
im_eq✝ : ↑(yn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).im + (pellZd a1 m).im * (pellZd a1 n).re
⊢ xn a1 (m + n) = xn a1 m * xn a1 n + Pell.d a1 * yn a1 m * yn a1 n
state_after: a : ℕ
a1 : 1 < a
m n : ℕ
h : ↑(xn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).re + ↑(Pell.d a1) * (pellZd a1 m).im * (pellZd a1 n).im
im_eq✝ : ↑(yn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).im + (pellZd a1 m).im * (pellZd a1 n).re
⊢ ↑(xn a1 (m + n)) = ↑(xn a1 m) * ↑(xn a1 n) + ↑(Pell.d a1) * ↑(yn a1 m) * ↑(yn a1 n)
tactic: zify
state_before: a : ℕ
a1 : 1 < a
m n : ℕ
h : ↑(xn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).re + ↑(Pell.d a1) * (pellZd a1 m).im * (pellZd a1 n).im
im_eq✝ : ↑(yn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).im + (pellZd a1 m).im * (pellZd a1 n).re
⊢ ↑(xn a1 (m + n)) = ↑(xn a1 m) * ↑(xn a1 n) + ↑(Pell.d a1) * ↑(yn a1 m) * ↑(yn a1 n)
state_after: a : ℕ
a1 : 1 < a
m n : ℕ
h : ↑(xn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).re + ↑(Pell.d a1) * (pellZd a1 m).im * (pellZd a1 n).im
im_eq✝ : ↑(yn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).im + (pellZd a1 m).im * (pellZd a1 n).re
⊢ (pellZd a1 m).re * (pellZd a1 n).re + ↑(Pell.d a1) * (pellZd a1 m).im * (pellZd a1 n).im =
    ↑(xn a1 m) * ↑(xn a1 n) + ↑(Pell.d a1) * ↑(yn a1 m) * ↑(yn a1 n)
tactic: rw [h]
state_before: a : ℕ
a1 : 1 < a
m n : ℕ
h : ↑(xn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).re + ↑(Pell.d a1) * (pellZd a1 m).im * (pellZd a1 n).im
im_eq✝ : ↑(yn a1 (m + n)) = (pellZd a1 m).re * (pellZd a1 n).im + (pellZd a1 m).im * (pellZd a1 n).re
⊢ (pellZd a1 m).re * (pellZd a1 n).re + ↑(Pell.d a1) * (pellZd a1 m).im * (pellZd a1 n).im =
    ↑(xn a1 m) * ↑(xn a1 n) + ↑(Pell.d a1) * ↑(yn a1 m) * ↑(yn a1 n)
state_after: no goals
tactic: simp [pellZd]
Theorem: FirstOrder.Language.Structure.CG.range
File: Mathlib/ModelTheory/FinitelyGenerated.lean

Proof steps:
state_before: L : Language
M : Type u_1
inst✝¹ : L.Structure M
N : Type u_2
inst✝ : L.Structure N
h : CG L M
f : M →[L] N
⊢ f.range.CG
state_after: L : Language
M : Type u_1
inst✝¹ : L.Structure M
N : Type u_2
inst✝ : L.Structure N
h : CG L M
f : M →[L] N
⊢ (map f ⊤).CG
tactic: rw [Hom.range_eq_map]
state_before: L : Language
M : Type u_1
inst✝¹ : L.Structure M
N : Type u_2
inst✝ : L.Structure N
h : CG L M
f : M →[L] N
⊢ (map f ⊤).CG
state_after: no goals
tactic: exact (cg_def.1 h).map f
Theorem: IsPrimitiveRoot.toInteger_sub_one_not_dvd_two
File: Mathlib/NumberTheory/Cyclotomic/Rat.lean

Proof steps:
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {p ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))
hodd : p ≠ 2
h : hζ.toInteger - 1 ∣ 2
⊢ False
state_after: p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {p ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))
hodd : p ≠ 2
h : hζ.toInteger - 1 ∣ 2
this : NumberField K
⊢ False
tactic: have : NumberField K := IsCyclotomicExtension.numberField {p ^ (k + 1)} ℚ K
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {p ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))
hodd : p ≠ 2
h : hζ.toInteger - 1 ∣ 2
this : NumberField K
⊢ False
state_after: p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {p ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))
hodd : p ≠ 2
this : NumberField K
h : hζ.toInteger - 1 ∣ ↑2
⊢ False
tactic: replace h : hζ.toInteger - 1 ∣ ↑(2 : ℤ) := by simp [h]
state_before: p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {p ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))
hodd : p ≠ 2
this : NumberField K
h : hζ.toInteger - 1 ∣ ↑2
⊢ False
state_after: p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {p ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))
hodd : p ≠ 2
this : NumberField K
h : ↑↑p ∣ 2
⊢ False

case hx
p : ℕ+
k : ℕ
K : Type u
inst✝² : Field K
inst✝¹ : CharZero K
ζ : K
hp : Fact (Nat.Prime ↑p)
inst✝ : IsCyclotomicExtension {p ^ (k + 1)} ℚ K
hζ : IsPrimitiveRoot ζ ↑(p ^ (k + 1))
hodd : p ≠ 2
this : NumberField K
h : hζ.toInteger - 1 ∣ ↑2
⊢ Prime ((Algebra.norm ℤ) (hζ.toInteger - 1))
tactic: rw [← Ideal.norm_dvd_iff, hζ.norm_toInteger_sub_one_of_prime_ne_two hodd] at h
Theorem: Rat.inv_natCast_den_of_pos
File: Mathlib/Data/Rat/Lemmas.lean

Proof steps:
state_before: a : ℕ
ha0 : 0 < a
⊢ (↑a)⁻¹.den = a
state_after: a : ℕ
ha0 : 0 < a
⊢ 0 < ↑a
tactic: rw [← Int.ofNat_inj, ← Int.cast_natCast a, inv_intCast_den_of_pos]
state_before: a : ℕ
ha0 : 0 < a
⊢ 0 < ↑a
state_after: no goals
tactic: rwa [Int.natCast_pos]
Theorem: root_X_pow_sub_C_ne_zero
File: Mathlib/FieldTheory/KummerExtension.lean

Proof steps:
state_before: K : Type u
inst✝ : Field K
n : ℕ
hn : 1 < n
a : K
⊢ X.natDegree < (X ^ n - C a).natDegree
state_after: no goals
tactic: rwa [natDegree_X_pow_sub_C, natDegree_X]
Theorem: Polynomial.isNilpotent_iterate_newtonMap_sub_of_isNilpotent
File: Mathlib/Dynamics/Newton.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
inst✝² : CommRing R
inst✝¹ : CommRing S
inst✝ : Algebra R S
P : R[X]
x : S
h : IsNilpotent ((aeval x) P)
n : ℕ
⊢ IsNilpotent (P.newtonMap^[n] x - x)
state_after: no goals
tactic: induction n with
  | zero => simp
  | succ n ih =>
    rw [iterate_succ', comp_apply, newtonMap_apply, sub_right_comm]
    refine (Commute.all _ _).isNilpotent_sub ih <| (Commute.all _ _).isNilpotent_mul_right ?_
    simpa using Commute.isNilpotent_add (Commute.all _ _)
      (isNilpotent_aeval_sub_of_isNilpotent_sub P ih) h
Theorem: Filter.HasBasis.mem_lift_iff
File: Mathlib/Order/Filter/Lift.lean

Proof steps:
state_before: α : Type u_1
β✝ : Type u_2
γ : Type u_3
ι✝ : Sort u_4
f✝ f₁ f₂ : Filter α
g✝ g₁ g₂ : Set α → Filter β✝
ι : Sort u_6
p : ι → Prop
s✝ : ι → Set α
f : Filter α
hf : f.HasBasis p s✝
β : ι → Type u_5
pg : (i : ι) → β i → Prop
sg : (i : ι) → β i → Set γ
g : Set α → Filter γ
hg : ∀ (i : ι), (g (s✝ i)).HasBasis (pg i) (sg i)
gm : Monotone g
s : Set γ
⊢ s ∈ f.lift g ↔ ∃ i, p i ∧ ∃ x, pg i x ∧ sg i x ⊆ s
state_after: case refine_1
α : Type u_1
β✝ : Type u_2
γ : Type u_3
ι✝ : Sort u_4
f✝ f₁ f₂ : Filter α
g✝ g₁ g₂ : Set α → Filter β✝
ι : Sort u_6
p : ι → Prop
s✝ : ι → Set α
f : Filter α
hf : f.HasBasis p s✝
β : ι → Type u_5
pg : (i : ι) → β i → Prop
sg : (i : ι) → β i → Set γ
g : Set α → Filter γ
hg : ∀ (i : ι), (g (s✝ i)).HasBasis (pg i) (sg i)
gm : Monotone g
s : Set γ
⊢ DirectedOn (g ⁻¹'o fun x x_1 => x ≥ x_1) f.sets

case refine_2
α : Type u_1
β✝ : Type u_2
γ : Type u_3
ι✝ : Sort u_4
f✝ f₁ f₂ : Filter α
g✝ g₁ g₂ : Set α → Filter β✝
ι : Sort u_6
p : ι → Prop
s✝ : ι → Set α
f : Filter α
hf : f.HasBasis p s✝
β : ι → Type u_5
pg : (i : ι) → β i → Prop
sg : (i : ι) → β i → Set γ
g : Set α → Filter γ
hg : ∀ (i : ι), (g (s✝ i)).HasBasis (pg i) (sg i)
gm : Monotone g
s : Set γ
⊢ (∃ i ∈ f.sets, s ∈ g i) ↔ ∃ i, p i ∧ ∃ x, pg i x ∧ sg i x ⊆ s
tactic: refine (mem_biInf_of_directed ?_ ⟨univ, univ_sets _⟩).trans ?_
Theorem: Ideal.closure_ne_top
File: Mathlib/Analysis/Normed/Ring/Units.lean

Proof steps:
state_before: R : Type u_1
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
I : Ideal R
hI : I ≠ ⊤
⊢ I.closure ≠ ⊤
state_after: R : Type u_1
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
I : Ideal R
hI : I ≠ ⊤
h : closure ↑I ⊆ nonunits R
⊢ I.closure ≠ ⊤
tactic: have h := closure_minimal (coe_subset_nonunits hI) nonunits.isClosed
state_before: R : Type u_1
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
I : Ideal R
hI : I ≠ ⊤
h : closure ↑I ⊆ nonunits R
⊢ I.closure ≠ ⊤
state_after: no goals
tactic: simpa only [I.closure.eq_top_iff_one, Ne] using mt (@h 1) one_not_mem_nonunits
Theorem: Finset.sigma_preimage_mk_of_subset
File: Mathlib/Data/Finset/Preimage.lean

Proof steps:
state_before: α : Type u
β✝ : Type v
ι : Sort w
γ : Type x
β : α → Type u_1
inst✝ : DecidableEq α
s : Finset ((a : α) × β a)
t : Finset α
ht : image Sigma.fst s ⊆ t
⊢ (t.sigma fun a => s.preimage (Sigma.mk a) ⋯) = s
state_after: no goals
tactic: rw [sigma_preimage_mk, filter_true_of_mem <| image_subset_iff.1 ht]
Theorem: List.permutationsAux2_fst
File: Mathlib/Data/List/Permutation.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
t : α
ts : List α
r : List β
y : α
ys : List α
f : List α → β
⊢ (permutationsAux2 t ts r (y :: ys) f).1 = y :: ys ++ ts
state_after: no goals
tactic: simp [permutationsAux2, permutationsAux2_fst t _ _ ys]
Theorem: Polynomial.aroots_pow
File: Mathlib/Algebra/Polynomial/Roots.lean

Proof steps:
state_before: R : Type u
S : Type v
T : Type w
a b : R
n✝ : ℕ
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
p✝ q : R[X]
inst✝³ : CommRing T
inst✝² : CommRing S
inst✝¹ : IsDomain S
inst✝ : Algebra T S
p : T[X]
n : ℕ
⊢ (p ^ n).aroots S = n • p.aroots S
state_after: no goals
tactic: rw [aroots_def, Polynomial.map_pow, roots_pow]
Theorem: lowerCentralSeries_prod
File: Mathlib/GroupTheory/Nilpotent.lean

Proof steps:
state_before: G : Type u_1
inst✝³ : Group G
H : Subgroup G
inst✝² : H.Normal
G₁ : Type u_2
G₂ : Type u_3
inst✝¹ : Group G₁
inst✝ : Group G₂
n : ℕ
⊢ lowerCentralSeries (G₁ × G₂) n = (lowerCentralSeries G₁ n).prod (lowerCentralSeries G₂ n)
state_after: case zero
G : Type u_1
inst✝³ : Group G
H : Subgroup G
inst✝² : H.Normal
G₁ : Type u_2
G₂ : Type u_3
inst✝¹ : Group G₁
inst✝ : Group G₂
⊢ lowerCentralSeries (G₁ × G₂) 0 = (lowerCentralSeries G₁ 0).prod (lowerCentralSeries G₂ 0)

case succ
G : Type u_1
inst✝³ : Group G
H : Subgroup G
inst✝² : H.Normal
G₁ : Type u_2
G₂ : Type u_3
inst✝¹ : Group G₁
inst✝ : Group G₂
n : ℕ
ih : lowerCentralSeries (G₁ × G₂) n = (lowerCentralSeries G₁ n).prod (lowerCentralSeries G₂ n)
⊢ lowerCentralSeries (G₁ × G₂) (n + 1) = (lowerCentralSeries G₁ (n + 1)).prod (lowerCentralSeries G₂ (n + 1))
tactic: induction' n with n ih
Theorem: Set.card_fintypeInsertOfNotMem
File: Mathlib/Data/Set/Finite.lean

Proof steps:
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
a : α
s : Set α
inst✝ : Fintype ↑s
h : a ∉ s
⊢ Fintype.card ↑(insert a s) = Fintype.card ↑s + 1
state_after: no goals
tactic: simp [fintypeInsertOfNotMem, Fintype.card_ofFinset]
Theorem: CircleDeg1Lift.map_fract_sub_fract_eq
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

Proof steps:
state_before: f g : CircleDeg1Lift
x : ℝ
⊢ f (fract x) - fract x = f x - x
state_after: no goals
tactic: rw [Int.fract, f.map_sub_int, sub_sub_sub_cancel_right]
Theorem: Equiv.Perm.support_prod_of_pairwise_disjoint
File: Mathlib/GroupTheory/Perm/Support.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
l : List (Perm α)
h : List.Pairwise Disjoint l
⊢ l.prod.support = List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support l)
state_after: case nil
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
h : List.Pairwise Disjoint []
⊢ [].prod.support = List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support [])

case cons
α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g hd : Perm α
tl : List (Perm α)
hl : List.Pairwise Disjoint tl → tl.prod.support = List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support tl)
h : List.Pairwise Disjoint (hd :: tl)
⊢ (hd :: tl).prod.support = List.foldr (fun x x_1 => x ⊔ x_1) ⊥ (List.map support (hd :: tl))
tactic: induction' l with hd tl hl
Theorem: Multiset.map_noncommSum_aux
File: Mathlib/Data/Finset/NoncommProd.lean

Proof steps:
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : FunLike F α β
inst✝ : MonoidHomClass F α β
s : Multiset α
comm : {x | x ∈ s}.Pairwise Commute
f : F
⊢ {x | x ∈ map (⇑f) s}.Pairwise Commute
state_after: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : FunLike F α β
inst✝ : MonoidHomClass F α β
s : Multiset α
comm : {x | x ∈ s}.Pairwise Commute
f : F
⊢ {x | ∃ a ∈ s, f a = x}.Pairwise Commute
tactic: simp only [Multiset.mem_map]
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : FunLike F α β
inst✝ : MonoidHomClass F α β
s : Multiset α
comm : {x | x ∈ s}.Pairwise Commute
f : F
⊢ {x | ∃ a ∈ s, f a = x}.Pairwise Commute
state_after: case intro.intro.intro.intro
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : FunLike F α β
inst✝ : MonoidHomClass F α β
s : Multiset α
comm : {x | x ∈ s}.Pairwise Commute
f : F
x : α
hx : x ∈ s
y : α
hy : y ∈ s
a✝ : f x ≠ f y
⊢ Commute (f x) (f y)
tactic: rintro _ ⟨x, hx, rfl⟩ _ ⟨y, hy, rfl⟩ _
state_before: case intro.intro.intro.intro
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f✝ : α → β → β
op : α → α → α
inst✝³ : Monoid α
inst✝² : Monoid β
inst✝¹ : FunLike F α β
inst✝ : MonoidHomClass F α β
s : Multiset α
comm : {x | x ∈ s}.Pairwise Commute
f : F
x : α
hx : x ∈ s
y : α
hy : y ∈ s
a✝ : f x ≠ f y
⊢ Commute (f x) (f y)
state_after: no goals
tactic: exact (comm.of_refl hx hy).map f
Theorem: PerfectClosure.natCast_eq_iff
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 y : ℕ
⊢ ↑x = ↑y ↔ ↑x = ↑y
state_after: case mp
K : Type u
inst✝² : CommRing K
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP K p
x y : ℕ
H : ↑x = ↑y
⊢ ↑x = ↑y

case mpr
K : Type u
inst✝² : CommRing K
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP K p
x y : ℕ
H : ↑x = ↑y
⊢ ↑x = ↑y
tactic: constructor <;> intro H
state_before: case mpr
K : Type u
inst✝² : CommRing K
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : CharP K p
x y : ℕ
H : ↑x = ↑y
⊢ ↑x = ↑y
state_after: no goals
tactic: rw [natCast K p 0, natCast K p 0, H]
Theorem: Finset.mulEnergy_mono
File: Mathlib/Combinatorics/Additive/Energy.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Mul α
s s₁ s₂ t t₁ t₂ : Finset α
hs : s₁ ⊆ s₂
ht : t₁ ⊆ t₂
⊢ Eₘ[s₁, t₁] ≤ Eₘ[s₂, t₂]
state_after: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Mul α
s s₁ s₂ t t₁ t₂ : Finset α
hs : s₁ ⊆ s₂
ht : t₁ ⊆ t₂
⊢ (filter (fun x => x.1.1 * x.2.1 = x.1.2 * x.2.2) ((s₁ ×ˢ s₁) ×ˢ t₁ ×ˢ t₁)).card ≤
    (filter (fun x => x.1.1 * x.2.1 = x.1.2 * x.2.2) ((s₂ ×ˢ s₂) ×ˢ t₂ ×ˢ t₂)).card
tactic: unfold mulEnergy
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Mul α
s s₁ s₂ t t₁ t₂ : Finset α
hs : s₁ ⊆ s₂
ht : t₁ ⊆ t₂
⊢ (filter (fun x => x.1.1 * x.2.1 = x.1.2 * x.2.2) ((s₁ ×ˢ s₁) ×ˢ t₁ ×ˢ t₁)).card ≤
    (filter (fun x => x.1.1 * x.2.1 = x.1.2 * x.2.2) ((s₂ ×ˢ s₂) ×ˢ t₂ ×ˢ t₂)).card
state_after: no goals
tactic: gcongr
Theorem: Module.AEval.X_smul_of
File: Mathlib/Algebra/Polynomial/Module/AEval.lean

Proof steps:
state_before: R : Type u_2
A : Type u_3
M : Type u_1
inst✝⁶ : CommSemiring R
inst✝⁵ : Semiring A
a : A
inst✝⁴ : Algebra R A
inst✝³ : AddCommMonoid M
inst✝² : Module A M
inst✝¹ : Module R M
inst✝ : IsScalarTower R A M
m : M
⊢ X • (of R M a) m = (of R M a) (a • m)
state_after: no goals
tactic: rw [← of_aeval_smul, aeval_X]
Theorem: CategoryTheory.IsPushout.IsVanKampen.isPullback_of_mono_left
File: Mathlib/CategoryTheory/Adhesive.lean

Proof steps:
state_before: J : Type v'
inst✝² : Category.{u', v'} J
C : Type u
inst✝¹ : Category.{v, u} C
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : Mono f
H : IsPushout f g h i
H' : H.IsVanKampen
⊢ g ≫ 𝟙 Y = 𝟙 W ≫ g
state_after: no goals
tactic: simp
state_before: J : Type v'
inst✝² : Category.{u', v'} J
C : Type u
inst✝¹ : Category.{v, u} C
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : Mono f
H : IsPushout f g h i
H' : H.IsVanKampen
⊢ 𝟙 W ≫ g = g ≫ 𝟙 Y
state_after: no goals
tactic: simp
state_before: J : Type v'
inst✝² : Category.{u', v'} J
C : Type u
inst✝¹ : Category.{v, u} C
W X Y Z : C
f : W ⟶ X
g : W ⟶ Y
h : X ⟶ Z
i : Y ⟶ Z
inst✝ : Mono f
H : IsPushout f g h i
H' : H.IsVanKampen
⊢ 𝟙 W ≫ g = g ≫ 𝟙 Y
state_after: no goals
tactic: simp
Theorem: Finset.isLowerSet_shatterer
File: Mathlib/Combinatorics/SetFamily/Shatter.lean

Proof steps:
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜✝ ℬ : Finset (Finset α)
s✝ t✝ : Finset α
a : α
n : ℕ
𝒜 : Finset (Finset α)
s t : Finset α
⊢ t ≤ s → s ∈ ↑𝒜.shatterer → t ∈ ↑𝒜.shatterer
state_after: no goals
tactic: simpa using Shatters.mono_right
Theorem: Nat.div2_bits_eq_tail
File: Mathlib/Data/Nat/Bits.lean

Proof steps:
state_before: m n✝ n : ℕ
⊢ n.div2.bits = n.bits.tail
state_after: case z
m n : ℕ
⊢ (div2 0).bits = (bits 0).tail

case f
m n✝ : ℕ
b : Bool
n : ℕ
h : n = 0 → b = true
a✝ : n.div2.bits = n.bits.tail
⊢ (bit b n).div2.bits = (bit b n).bits.tail
tactic: induction' n using Nat.binaryRec' with b n h _
state_before: case f
m n✝ : ℕ
b : Bool
n : ℕ
h : n = 0 → b = true
a✝ : n.div2.bits = n.bits.tail
⊢ (bit b n).div2.bits = (bit b n).bits.tail
state_after: no goals
tactic: simp [div2_bit, bits_append_bit _ _ h]
Theorem: Finsupp.prod_filter_index
File: Mathlib/Data/Finsupp/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝² : Zero M
p : α → Prop
inst✝¹ : DecidablePred p
f : α →₀ M
inst✝ : CommMonoid N
g : α → M → N
⊢ (filter p f).prod g = ∏ x ∈ (filter p f).support, g x (f x)
state_after: no goals
tactic: classical
    refine Finset.prod_congr rfl fun x hx => ?_
    rw [support_filter, Finset.mem_filter] at hx
    rw [filter_apply_pos _ _ hx.2]
Theorem: Nat.lt_base_pow_length_digits'
File: Mathlib/Data/Nat/Digits.lean

Proof steps:
state_before: n b m : ℕ
⊢ m < (b + 2) ^ ((b + 2).digits m).length
state_after: case h.e'_3
n b m : ℕ
⊢ m = ofDigits (b + 2) ((b + 2).digits m)
tactic: convert @ofDigits_lt_base_pow_length' b (digits (b + 2) m) fun _ => digits_lt_base'
state_before: case h.e'_3
n b m : ℕ
⊢ m = ofDigits (b + 2) ((b + 2).digits m)
state_after: no goals
tactic: rw [ofDigits_digits (b + 2) m]
Theorem: Bornology.isBounded_prod
File: Mathlib/Topology/Bornology/Constructions.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
⊢ IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t
state_after: case inl
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
t : Set β
S : (i : ι) → Set (π i)
⊢ IsBounded (∅ ×ˢ t) ↔ ∅ = ∅ ∨ t = ∅ ∨ IsBounded ∅ ∧ IsBounded t

case inr
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
hs : s.Nonempty
⊢ IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t
tactic: rcases s.eq_empty_or_nonempty with (rfl | hs)
state_before: case inr
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
hs : s.Nonempty
⊢ IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t
state_after: case inr.inl
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
S : (i : ι) → Set (π i)
hs : s.Nonempty
⊢ IsBounded (s ×ˢ ∅) ↔ s = ∅ ∨ ∅ = ∅ ∨ IsBounded s ∧ IsBounded ∅

case inr.inr
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
hs : s.Nonempty
ht : t.Nonempty
⊢ IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t
tactic: rcases t.eq_empty_or_nonempty with (rfl | ht)
state_before: case inr.inr
α : Type u_1
β : Type u_2
ι : Type u_3
π : ι → Type u_4
inst✝² : Bornology α
inst✝¹ : Bornology β
inst✝ : (i : ι) → Bornology (π i)
s : Set α
t : Set β
S : (i : ι) → Set (π i)
hs : s.Nonempty
ht : t.Nonempty
⊢ IsBounded (s ×ˢ t) ↔ s = ∅ ∨ t = ∅ ∨ IsBounded s ∧ IsBounded t
state_after: no goals
tactic: simp only [hs.ne_empty, ht.ne_empty, isBounded_prod_of_nonempty (hs.prod ht), false_or_iff]