ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: FreeAddSemigroup.traverse_add
File: Mathlib/Algebra/Free.lean

Proof steps:
state_before: α β : Type u
m : Type u → Type u
inst✝¹ : Applicative m
F : α → m β
inst✝ : LawfulApplicative m
x✝¹ y✝ : FreeSemigroup α
x✝ : α
L1 : List α
y : α
L2 : List α
hd : α
tl : List α
ih :
  ∀ (x : α),
    traverse F ({ head := x, tail := tl } * { head := y, tail := L2 }) =
      Seq.seq ((fun x x_1 => x * x_1) <$> traverse F { head := x, tail := tl }) fun x =>
        traverse F { head := y, tail := L2 }
x : α
⊢ (Seq.seq ((fun x x_1 => x * x_1) <$> pure <$> F x) fun x =>
      traverse F ({ head := hd, tail := tl } * { head := y, tail := L2 })) =
    Seq.seq
      ((fun x x_1 => x * x_1) <$>
        Seq.seq ((fun x x_1 => x * x_1) <$> pure <$> F x) fun x => traverse F { head := hd, tail := tl })
      fun x => traverse F { head := y, tail := L2 }
state_after: α β : Type u
m : Type u → Type u
inst✝¹ : Applicative m
F : α → m β
inst✝ : LawfulApplicative m
x✝¹ y✝ : FreeSemigroup α
x✝ : α
L1 : List α
y : α
L2 : List α
hd : α
tl : List α
ih :
  ∀ (x : α),
    traverse F ({ head := x, tail := tl } * { head := y, tail := L2 }) =
      Seq.seq ((fun x x_1 => x * x_1) <$> traverse F { head := x, tail := tl }) fun x =>
        traverse F { head := y, tail := L2 }
x : α
⊢ (Seq.seq ((fun x x_1 => x * x_1) <$> pure <$> F x) fun x =>
      Seq.seq ((fun x x_1 => x * x_1) <$> traverse F { head := hd, tail := tl }) fun x =>
        traverse F { head := y, tail := L2 }) =
    Seq.seq
      ((fun x x_1 => x * x_1) <$>
        Seq.seq ((fun x x_1 => x * x_1) <$> pure <$> F x) fun x => traverse F { head := hd, tail := tl })
      fun x => traverse F { head := y, tail := L2 }
tactic: rw [ih]
Theorem: List.formPerm_apply_mem_eq_next
File: Mathlib/GroupTheory/Perm/Cycle/Concrete.lean

Proof steps:
state_before: α : Type u_1
inst✝ : DecidableEq α
l l' : List α
hl : l.Nodup
x : α
hx : x ∈ l
⊢ l.formPerm x = l.next x hx
state_after: case intro
α : Type u_1
inst✝ : DecidableEq α
l l' : List α
hl : l.Nodup
k : Fin l.length
hx : l.get k ∈ l
⊢ l.formPerm (l.get k) = l.next (l.get k) hx
tactic: obtain ⟨k, rfl⟩ := get_of_mem hx
state_before: case intro
α : Type u_1
inst✝ : DecidableEq α
l l' : List α
hl : l.Nodup
k : Fin l.length
hx : l.get k ∈ l
⊢ l.formPerm (l.get k) = l.next (l.get k) hx
state_after: no goals
tactic: rw [next_get _ hl, formPerm_apply_get _ hl]
Theorem: Finset.prod_multiset_map_count
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
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝² : CommMonoid β
inst✝¹ : DecidableEq α
s : Multiset α
M : Type u_6
inst✝ : CommMonoid M
f : α → M
⊢ (Multiset.map f s).prod = ∏ m ∈ s.toFinset, f m ^ Multiset.count m s
state_after: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝² : CommMonoid β
inst✝¹ : DecidableEq α
s : Multiset α
M : Type u_6
inst✝ : CommMonoid M
f : α → M
l : List α
⊢ (Multiset.map f (Quot.mk Setoid.r l)).prod =
    ∏ m ∈ Multiset.toFinset (Quot.mk Setoid.r l), f m ^ Multiset.count m (Quot.mk Setoid.r l)
tactic: refine Quot.induction_on s fun l => ?_
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝² : CommMonoid β
inst✝¹ : DecidableEq α
s : Multiset α
M : Type u_6
inst✝ : CommMonoid M
f : α → M
l : List α
⊢ (Multiset.map f (Quot.mk Setoid.r l)).prod =
    ∏ m ∈ Multiset.toFinset (Quot.mk Setoid.r l), f m ^ Multiset.count m (Quot.mk Setoid.r l)
state_after: no goals
tactic: simp [prod_list_map_count l f]
Theorem: CategoryTheory.shiftFunctorAdd_assoc_inv_app
File: Mathlib/CategoryTheory/Shift/Basic.lean

Proof steps:
state_before: C : Type u
A : Type u_1
inst✝² : Category.{v, u} C
inst✝¹ : AddMonoid A
inst✝ : HasShift C A
a₁ a₂ a₃ : A
X : C
⊢ (shiftFunctor C a₃).map ((shiftFunctorAdd C a₁ a₂).inv.app X) ≫ (shiftFunctorAdd C (a₁ + a₂) a₃).inv.app X =
    (shiftFunctorAdd C a₂ a₃).inv.app ((shiftFunctor C a₁).obj X) ≫
      (shiftFunctorAdd' C a₁ (a₂ + a₃) (a₁ + a₂ + a₃) ⋯).inv.app X
state_after: no goals
tactic: simpa using NatTrans.congr_app (congr_arg Iso.inv (shiftFunctorAdd_assoc C a₁ a₂ a₃)) X
Theorem: Set.Finite.injOn_iff_bijOn_of_mapsTo
File: Mathlib/Data/Set/Finite.lean

Proof steps:
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
f : α → α
hs : s.Finite
hm : MapsTo f s s
⊢ InjOn f s ↔ BijOn f s s
state_after: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
f : α → α
hs : s.Finite
hm : MapsTo f s s
h : InjOn f s
⊢ SurjOn f s s
tactic: refine ⟨fun h ↦ ⟨hm, h, ?_⟩, BijOn.injOn⟩
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
f : α → α
hs : s.Finite
hm : MapsTo f s s
h : InjOn f s
⊢ SurjOn f s s
state_after: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
f : α → α
hs : s.Finite
hm : MapsTo f s s
h : InjOn f s
this : Finite ↑s
⊢ SurjOn f s s
tactic: have : Finite s := finite_coe_iff.mpr hs
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s : Set α
f : α → α
hs : s.Finite
hm : MapsTo f s s
h : InjOn f s
this : Finite ↑s
⊢ SurjOn f s s
state_after: no goals
tactic: exact hm.restrict_surjective_iff.mp (Finite.injective_iff_surjective.mp <| hm.restrict_inj.mpr h)
Theorem: Prefunctor.IsCovering.map_injective
File: Mathlib/Combinatorics/Quiver/Covering.lean

Proof steps:
state_before: U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.1952
inst✝ : Quiver W
ψ : V ⥤q W
hφ : φ.IsCovering
u v : U
⊢ Injective fun f => φ.map f
state_after: U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.1952
inst✝ : Quiver W
ψ : V ⥤q W
hφ : φ.IsCovering
u v : U
f g : u ⟶ v
he : (fun f => φ.map f) f = (fun f => φ.map f) g
⊢ f = g
tactic: rintro f g he
state_before: U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.1952
inst✝ : Quiver W
ψ : V ⥤q W
hφ : φ.IsCovering
u v : U
f g : u ⟶ v
he : (fun f => φ.map f) f = (fun f => φ.map f) g
⊢ f = g
state_after: U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.1952
inst✝ : Quiver W
ψ : V ⥤q W
hφ : φ.IsCovering
u v : U
f g : u ⟶ v
he : (fun f => φ.map f) f = (fun f => φ.map f) g
this : φ.star u (Star.mk f) = φ.star u (Star.mk g)
⊢ f = g
tactic: have : φ.star u (Quiver.Star.mk f) = φ.star u (Quiver.Star.mk g) := by simpa using he
state_before: U : Type u_1
inst✝² : Quiver U
V : Type u_2
inst✝¹ : Quiver V
φ : U ⥤q V
W : Type ?u.1952
inst✝ : Quiver W
ψ : V ⥤q W
hφ : φ.IsCovering
u v : U
f g : u ⟶ v
he : (fun f => φ.map f) f = (fun f => φ.map f) g
this : φ.star u (Star.mk f) = φ.star u (Star.mk g)
⊢ f = g
state_after: no goals
tactic: simpa using (hφ.star_bijective u).left this
Theorem: AlgebraicGeometry.isOpenImmersion_stableUnderBaseChange
File: Mathlib/AlgebraicGeometry/Morphisms/OpenImmersion.lean

Proof steps:
state_before: X Y Z : Scheme
f : X ⟶ Y
g : Y ⟶ Z
⊢ ∀ (X Y S : Scheme) (f : X ⟶ S) (g : Y ⟶ S), IsOpenImmersion g → IsOpenImmersion (pullback.fst f g)
state_after: X✝ Y✝ Z✝ : Scheme
f✝ : X✝ ⟶ Y✝
g✝ : Y✝ ⟶ Z✝
X Y Z : Scheme
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion g
⊢ IsOpenImmersion (pullback.fst f g)
tactic: intro X Y Z f g H
state_before: X✝ Y✝ Z✝ : Scheme
f✝ : X✝ ⟶ Y✝
g✝ : Y✝ ⟶ Z✝
X Y Z : Scheme
f : X ⟶ Z
g : Y ⟶ Z
H : IsOpenImmersion g
⊢ IsOpenImmersion (pullback.fst f g)
state_after: no goals
tactic: infer_instance
Theorem: Nat.sub_mod_eq_zero_of_mod_eq
File: Mathlib/Data/Nat/Defs.lean

Proof steps:
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
h : m % k = n % k
⊢ (m - n) % k = 0
state_after: no goals
tactic: rw [← Nat.mod_add_div m k, ← Nat.mod_add_div n k, ← h, ← Nat.sub_sub,
    Nat.add_sub_cancel_left, ← k.mul_sub, Nat.mul_mod_right]
Theorem: TwoSidedIdeal.iInf_ringCon
File: Mathlib/RingTheory/TwoSidedIdeal/Lattice.lean

Proof steps:
state_before: R : Type u_1
inst✝ : NonUnitalNonAssocRing R
ι : Type u_2
I : ι → TwoSidedIdeal R
⊢ (⨅ i, I i).ringCon = ⨅ i, (I i).ringCon
state_after: R : Type u_1
inst✝ : NonUnitalNonAssocRing R
ι : Type u_2
I : ι → TwoSidedIdeal R
⊢ sInf (ringCon '' Set.range fun i => I i) = sInf (Set.range fun i => (I i).ringCon)
tactic: simp only [iInf, sInf_ringCon]
state_before: R : Type u_1
inst✝ : NonUnitalNonAssocRing R
ι : Type u_2
I : ι → TwoSidedIdeal R
⊢ sInf (ringCon '' Set.range fun i => I i) = sInf (Set.range fun i => (I i).ringCon)
state_after: case h.e'_3
R : Type u_1
inst✝ : NonUnitalNonAssocRing R
ι : Type u_2
I : ι → TwoSidedIdeal R
⊢ (ringCon '' Set.range fun i => I i) = Set.range fun i => (I i).ringCon
tactic: congr!
state_before: case h.e'_3
R : Type u_1
inst✝ : NonUnitalNonAssocRing R
ι : Type u_2
I : ι → TwoSidedIdeal R
⊢ (ringCon '' Set.range fun i => I i) = Set.range fun i => (I i).ringCon
state_after: case h.e'_3.h
R : Type u_1
inst✝ : NonUnitalNonAssocRing R
ι : Type u_2
I : ι → TwoSidedIdeal R
x✝ : RingCon R
⊢ (x✝ ∈ ringCon '' Set.range fun i => I i) ↔ x✝ ∈ Set.range fun i => (I i).ringCon
tactic: ext
state_before: case h.e'_3.h
R : Type u_1
inst✝ : NonUnitalNonAssocRing R
ι : Type u_2
I : ι → TwoSidedIdeal R
x✝ : RingCon R
⊢ (x✝ ∈ ringCon '' Set.range fun i => I i) ↔ x✝ ∈ Set.range fun i => (I i).ringCon
state_after: no goals
tactic: simp
Theorem: uniformity_lift_le_swap
File: Mathlib/Topology/UniformSpace/Basic.lean

Proof steps:
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
g : Set (α × α) → Filter β
f : Filter β
hg : Monotone g
h : ((𝓤 α).lift fun s => g (Prod.swap ⁻¹' s)) ≤ f
⊢ (map Prod.swap (𝓤 α)).lift g ≤ f
state_after: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
g : Set (α × α) → Filter β
f : Filter β
hg : Monotone g
h : ((𝓤 α).lift fun s => g (Prod.swap ⁻¹' s)) ≤ f
⊢ (𝓤 α).lift (g ∘ preimage Prod.swap) ≤ f
tactic: rw [map_lift_eq2 hg, image_swap_eq_preimage_swap]
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
g : Set (α × α) → Filter β
f : Filter β
hg : Monotone g
h : ((𝓤 α).lift fun s => g (Prod.swap ⁻¹' s)) ≤ f
⊢ (𝓤 α).lift (g ∘ preimage Prod.swap) ≤ f
state_after: no goals
tactic: exact h
Theorem: CompHaus.epi_iff_surjective
File: Mathlib/Topology/Category/CompHaus/Basic.lean

Proof steps:
state_before: X Y : CompHaus
f : X ⟶ Y
⊢ Epi f ↔ Function.Surjective ⇑f
state_after: case mp
X Y : CompHaus
f : X ⟶ Y
⊢ Epi f → Function.Surjective ⇑f

case mpr
X Y : CompHaus
f : X ⟶ Y
⊢ Function.Surjective ⇑f → Epi f
tactic: constructor
Theorem: finsum_mem_inter_support
File: Mathlib/Algebra/BigOperators/Finprod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝¹ : CommMonoid M
inst✝ : CommMonoid N
f : α → M
s : Set α
⊢ ∏ᶠ (i : α) (_ : i ∈ s ∩ mulSupport f), f i = ∏ᶠ (i : α) (_ : i ∈ s), f i
state_after: no goals
tactic: rw [finprod_mem_def, finprod_mem_def, mulIndicator_inter_mulSupport]
Theorem: Mathlib.Tactic.Ring.one_mul
File: Mathlib/Tactic/Ring/Basic.lean

Proof steps:
state_before: u✝ : Lean.Level
arg : Q(Type u✝)
sα✝ : Q(CommSemiring «$arg»)
u : Lean.Level
α : Q(Type u)
sα : Q(CommSemiring «$α»)
R : Type u_1
inst✝ : CommSemiring R
a✝ a' a₁ a₂ a₃ b b' b₁ b₂ b₃ c c₁ c₂ a : R
⊢ Nat.rawCast 1 * a = a
state_after: no goals
tactic: simp [Nat.rawCast]
Theorem: Ordnode.dual_rotateR
File: Mathlib/Data/Ordmap/Ordset.lean

Proof steps:
state_before: α : Type u_1
l : Ordnode α
x : α
r : Ordnode α
⊢ (l.rotateR x r).dual = r.dual.rotateL x l.dual
state_after: no goals
tactic: rw [← dual_dual (rotateL _ _ _), dual_rotateL, dual_dual, dual_dual]
Theorem: Rel.core_univ
File: Mathlib/Data/Rel.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
⊢ ∀ (x : α), x ∈ r.core Set.univ ↔ x ∈ Set.univ
state_after: no goals
tactic: simp [mem_core]
Theorem: MeasureTheory.lintegral_ofReal_le_lintegral_nnnorm
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
⊢ ∫⁻ (x : α), ENNReal.ofReal (f x) ∂μ ≤ ∫⁻ (x : α), ↑‖f x‖₊ ∂μ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
⊢ ∫⁻ (x : α), ENNReal.ofReal (f x) ∂μ ≤ ∫⁻ (x : α), ENNReal.ofReal ‖f x‖ ∂μ
tactic: simp_rw [← ofReal_norm_eq_coe_nnnorm]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
⊢ ∫⁻ (x : α), ENNReal.ofReal (f x) ∂μ ≤ ∫⁻ (x : α), ENNReal.ofReal ‖f x‖ ∂μ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
x : α
⊢ f x ≤ ‖f x‖
tactic: refine lintegral_mono fun x => ENNReal.ofReal_le_ofReal ?_
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
x : α
⊢ f x ≤ ‖f x‖
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
x : α
⊢ f x ≤ |f x|
tactic: rw [Real.norm_eq_abs]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ
x : α
⊢ f x ≤ |f x|
state_after: no goals
tactic: exact le_abs_self (f x)
Theorem: SymplecticGroup.transpose_mem_iff
File: Mathlib/LinearAlgebra/SymplecticGroup.lean

Proof steps:
state_before: l : Type u_1
R : Type u_2
inst✝² : DecidableEq l
inst✝¹ : Fintype l
inst✝ : CommRing R
A : Matrix (l ⊕ l) (l ⊕ l) R
hA : Aᵀ ∈ symplecticGroup l R
⊢ A ∈ symplecticGroup l R
state_after: no goals
tactic: simpa using transpose_mem hA
Theorem: Finset.neg_univ
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✝¹ : InvolutiveInv α
s : Finset α
a : α
inst✝ : Fintype α
⊢ univ⁻¹ = univ
state_after: case a
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : DecidableEq α
inst✝¹ : InvolutiveInv α
s : Finset α
a : α
inst✝ : Fintype α
a✝ : α
⊢ a✝ ∈ univ⁻¹ ↔ a✝ ∈ univ
tactic: ext
state_before: case a
F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : DecidableEq α
inst✝¹ : InvolutiveInv α
s : Finset α
a : α
inst✝ : Fintype α
a✝ : α
⊢ a✝ ∈ univ⁻¹ ↔ a✝ ∈ univ
state_after: no goals
tactic: simp
Theorem: ProbabilityTheory.condCount_self
File: Mathlib/Probability/CondCount.lean

Proof steps:
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hs : s.Finite
hs' : s.Nonempty
⊢ (condCount s) s = 1
state_after: case h0
Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hs : s.Finite
hs' : s.Nonempty
⊢ Measure.count s ≠ 0

case ht
Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s t u : Set Ω
hs : s.Finite
hs' : s.Nonempty
⊢ Measure.count s ≠ ⊤
tactic: rw [condCount, cond_apply _ hs.measurableSet, Set.inter_self, ENNReal.inv_mul_cancel]
Theorem: Polynomial.nthRoots_zero_right
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]
R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
n : ℕ
⊢ nthRoots n 0 = replicate n 0
state_after: no goals
tactic: rw [nthRoots, C.map_zero, sub_zero, roots_pow, roots_X, Multiset.nsmul_singleton]
Theorem: Multiset.count_map
File: Mathlib/Data/Multiset/Basic.lean

Proof steps:
state_before: α✝ : Type u_1
β✝ : Type v
γ : Type u_2
inst✝¹ : DecidableEq α✝
s✝ : Multiset α✝
α : Type u_3
β : Type u_4
f : α → β
s : Multiset α
inst✝ : DecidableEq β
b : β
⊢ count b (map f s) = card (filter (fun a => b = f a) s)
state_after: no goals
tactic: simp [Bool.beq_eq_decide_eq, eq_comm, count, countP_map]
Theorem: Equiv.Perm.SameCycle.exists_pow_eq'
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
p : α → Prop
x y z : α
inst✝ : Finite α
⊢ f.SameCycle x y → ∃ i < orderOf f, (f ^ i) x = y
state_after: no goals
tactic: classical
    rintro ⟨k, rfl⟩
    use (k % orderOf f).natAbs
    have h₀ := Int.natCast_pos.mpr (orderOf_pos f)
    have h₁ := Int.emod_nonneg k h₀.ne'
    rw [← zpow_natCast, Int.natAbs_of_nonneg h₁, zpow_mod_orderOf]
    refine ⟨?_, by rfl⟩
    rw [← Int.ofNat_lt, Int.natAbs_of_nonneg h₁]
    exact Int.emod_lt_of_pos _ h₀
Theorem: List.Sublist.filter
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

Proof steps:
state_before: α : Type u_1
p : α → Bool
l₁ l₂ : List α
s : l₁ <+ l₂
⊢ List.filter p l₁ <+ List.filter p l₂
state_after: α : Type u_1
p : α → Bool
l₁ l₂ : List α
s : l₁ <+ l₂
⊢ filterMap (Option.guard fun x => p x = true) l₁ <+ filterMap (Option.guard fun x => p x = true) l₂
tactic: rw [← filterMap_eq_filter]
state_before: α : Type u_1
p : α → Bool
l₁ l₂ : List α
s : l₁ <+ l₂
⊢ filterMap (Option.guard fun x => p x = true) l₁ <+ filterMap (Option.guard fun x => p x = true) l₂
state_after: no goals
tactic: apply s.filterMap
Theorem: Finset.compl_ne_univ_iff_nonempty
File: Mathlib/Data/Fintype/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝¹ : Fintype α
s✝ t : Finset α
inst✝ : DecidableEq α
a : α
s : Finset α
⊢ sᶜ ≠ univ ↔ s.Nonempty
state_after: no goals
tactic: simp [eq_univ_iff_forall, Finset.Nonempty]
Theorem: CategoryTheory.MonoidalCategory.pentagon_hom_inv
File: Mathlib/CategoryTheory/Monoidal/CoherenceLemmas.lean

Proof steps:
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : MonoidalCategory C
W X Y Z : C
⊢ (α_ W X (Y ⊗ Z)).hom ≫ (𝟙 W ⊗ (α_ X Y Z).inv) = (α_ (W ⊗ X) Y Z).inv ≫ ((α_ W X Y).hom ⊗ 𝟙 Z) ≫ (α_ W (X ⊗ Y) Z).hom
state_after: no goals
tactic: coherence
Theorem: Polynomial.content_C_mul
File: Mathlib/RingTheory/Polynomial/Content.lean

Proof steps:
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
p : R[X]
⊢ (C r * p).content = normalize r * p.content
state_after: case pos
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
p : R[X]
h0 : r = 0
⊢ (C r * p).content = normalize r * p.content

case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
p : R[X]
h0 : ¬r = 0
⊢ (C r * p).content = normalize r * p.content
tactic: by_cases h0 : r = 0
state_before: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
p : R[X]
h0 : ¬r = 0
⊢ (C r * p).content = normalize r * p.content
state_after: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
p : R[X]
h0 : ¬r = 0
⊢ (C r * p).support.gcd (C r * p).coeff = normalize r * p.content
tactic: rw [content]
state_before: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
p : R[X]
h0 : ¬r = 0
⊢ (C r * p).support.gcd (C r * p).coeff = normalize r * p.content
state_after: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
p : R[X]
h0 : ¬r = 0
⊢ (C r * p).support.gcd (C r * p).coeff = normalize r * p.support.gcd p.coeff
tactic: rw [content]
state_before: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
p : R[X]
h0 : ¬r = 0
⊢ (C r * p).support.gcd (C r * p).coeff = normalize r * p.support.gcd p.coeff
state_after: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
p : R[X]
h0 : ¬r = 0
⊢ (C r * p).support.gcd (C r * p).coeff = p.support.gcd fun x => r * p.coeff x
tactic: rw [← Finset.gcd_mul_left]
state_before: case neg
R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsDomain R
inst✝ : NormalizedGCDMonoid R
r : R
p : R[X]
h0 : ¬r = 0
⊢ (C r * p).support.gcd (C r * p).coeff = p.support.gcd fun x => r * p.coeff x
state_after: no goals
tactic: refine congr (congr rfl ?_) ?_ <;> ext <;> simp [h0, mem_support_iff]
Theorem: ModularGroup.normSq_S_smul_lt_one
File: Mathlib/NumberTheory/Modular.lean

Proof steps:
state_before: g : SL(2, ℤ)
z : ℍ
h : 1 < normSq ↑z
⊢ normSq ↑(S • z) < 1
state_after: no goals
tactic: simpa [coe_S, num, denom] using (inv_lt_inv z.normSq_pos zero_lt_one).mpr h
Theorem: minpolyDiv_eval_eq_zero_of_ne_of_aeval_eq_zero
File: Mathlib/FieldTheory/Minpoly/MinpolyDiv.lean

Proof steps:
state_before: R : Type u_2
K : Type ?u.30406
L : Type ?u.30409
S : Type u_1
inst✝⁶ : CommRing R
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : CommRing S
inst✝² : Algebra R S
inst✝¹ : Algebra K L
x : S
hx : IsIntegral R x
inst✝ : IsDomain S
y : S
hxy : y ≠ x
hy : (aeval y) (minpoly R x) = 0
⊢ eval y (minpolyDiv R x) = 0
state_after: R : Type u_2
K : Type ?u.30406
L : Type ?u.30409
S : Type u_1
inst✝⁶ : CommRing R
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : CommRing S
inst✝² : Algebra R S
inst✝¹ : Algebra K L
x : S
hx : IsIntegral R x
inst✝ : IsDomain S
y : S
hxy : y ≠ x
hy : eval y (minpolyDiv R x * (X - C x)) = 0
⊢ eval y (minpolyDiv R x) = 0
tactic: rw [aeval_def, ← eval_map, ← minpolyDiv_spec R x] at hy
state_before: R : Type u_2
K : Type ?u.30406
L : Type ?u.30409
S : Type u_1
inst✝⁶ : CommRing R
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : CommRing S
inst✝² : Algebra R S
inst✝¹ : Algebra K L
x : S
hx : IsIntegral R x
inst✝ : IsDomain S
y : S
hxy : y ≠ x
hy : eval y (minpolyDiv R x * (X - C x)) = 0
⊢ eval y (minpolyDiv R x) = 0
state_after: R : Type u_2
K : Type ?u.30406
L : Type ?u.30409
S : Type u_1
inst✝⁶ : CommRing R
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : CommRing S
inst✝² : Algebra R S
inst✝¹ : Algebra K L
x : S
hx : IsIntegral R x
inst✝ : IsDomain S
y : S
hxy : y ≠ x
hy : eval y (minpolyDiv R x) = 0 ∨ y - x = 0
⊢ eval y (minpolyDiv R x) = 0
tactic: simp only [eval_mul, eval_sub, eval_X, eval_C, mul_eq_zero] at hy
state_before: R : Type u_2
K : Type ?u.30406
L : Type ?u.30409
S : Type u_1
inst✝⁶ : CommRing R
inst✝⁵ : Field K
inst✝⁴ : Field L
inst✝³ : CommRing S
inst✝² : Algebra R S
inst✝¹ : Algebra K L
x : S
hx : IsIntegral R x
inst✝ : IsDomain S
y : S
hxy : y ≠ x
hy : eval y (minpolyDiv R x) = 0 ∨ y - x = 0
⊢ eval y (minpolyDiv R x) = 0
state_after: no goals
tactic: exact hy.resolve_right (by rwa [sub_eq_zero])
Theorem: Int.map_floor
File: Mathlib/Algebra/Order/Floor.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
inst✝⁵ : LinearOrderedRing α
inst✝⁴ : LinearOrderedRing β
inst✝³ : FloorRing α
inst✝² : FloorRing β
inst✝¹ : FunLike F α β
inst✝ : RingHomClass F α β
a✝ : α
b : β
f : F
hf : StrictMono ⇑f
a : α
n : ℤ
⊢ ↑n ≤ f a ↔ ↑n ≤ a
state_after: no goals
tactic: rw [← map_intCast f, hf.le_iff_le]
Theorem: Module.End.isSemisimple_neg
File: Mathlib/LinearAlgebra/Semisimple.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
inst✝² : CommRing R
inst✝¹ : AddCommGroup M
inst✝ : Module R M
f g : End R M
⊢ (-f).IsSemisimple ↔ f.IsSemisimple
state_after: no goals
tactic: simp [isSemisimple_iff]
Theorem: Sym2.eq_iff
File: Mathlib/Data/Sym/Sym2.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
x y z w : α
⊢ s(x, y) = s(z, w) ↔ x = z ∧ y = w ∨ x = w ∧ y = z
state_after: no goals
tactic: simp
Theorem: isPurelyInseparable_iff_minpoly_eq_X_sub_C_pow
File: Mathlib/FieldTheory/PurelyInseparable.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
q : ℕ
hF : ExpChar F q
⊢ IsPurelyInseparable F E ↔ ∀ (x : E), ∃ n, Polynomial.map (algebraMap F E) (minpoly F x) = (X - C x) ^ q ^ n
state_after: no goals
tactic: simp_rw [isPurelyInseparable_iff_natSepDegree_eq_one,
    minpoly.natSepDegree_eq_one_iff_eq_X_sub_C_pow q]
Theorem: MeasureTheory.measure_eq_iInf'
File: Mathlib/MeasureTheory/Measure/MeasureSpaceDef.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
inst✝ : MeasurableSpace α
μ✝ μ₁ μ₂ : Measure α
s✝ s₁ s₂ t : Set α
μ : Measure α
s : Set α
⊢ μ s = ⨅ t, μ ↑t
state_after: no goals
tactic: simp_rw [iInf_subtype, iInf_and, ← measure_eq_iInf]